Port from Gm/ID Starter Kit
After loading .mat
file.
using Gm_ID_kit
nch = ParseMAT(joinpath(dirname(pathof(Gm_ID_kit)), "..", "test", "180nch.mat"), "nch")
ID = LookUp(nch, "ID"; VGS = 0.6, L = 0.28)[1]
GM_CGG = LookUp(nch, "GM_CGG"; VGS = 0.6, L = 0.28)[1]
GM_CDD = LookUp(nch, "GM_CDD", "GM_ID", 15.0; VDS = 0.6, L = 0.28)[1]
VGS = LookUpVGS(nch; GM_ID = 10, VDS = 0.6, VSB = 0.1, L = 0.18)[1]
VGS = LookUpVGS(nch; GM_ID = 10.0, VDB = 0.6, VGB = 1.0, L = 0.18)[1]
# Plot ID versus VDS
vds = nch["VDS"]
vgs = collect(0.4:0.05:0.6)
ID = LookUp(nch, "ID"; VDS=vds, VGS=vgs)
plot(vds, ID[1,1,:,1], label="VGS=$(vgs[1])")
plot!(vds, ID[1,2,:,1], label="VGS=$(vgs[2])")
plot!(vds, ID[1,3,:,1], label="VGS=$(vgs[3])")
plot!(vds, ID[1,4,:,1], label="VGS=$(vgs[4])")
plot!(vds, ID[1,5,:,1], label="VGS=$(vgs[5])")
# plot!(legend=:outerbottom, legendcolumns=5)
title!("ID vs VDS")
xlabel!("VDS")
ylabel!("ID")
for more see tests.
To be used with JuMP.
- Refactor
LookUp
+ unittest - Refactor
LookUpVGS
+ unittest - Rename to
GM_ID_Kit
- use Julia naming conventions
- Optimization with JuMP
- Extract LUTs from spice simulators
- Generate .mat files or better file format!
- Add examples
- Get rid of allocations
Original MATLAB code: Copyright (c) 2019 Boris Murmann ([email protected])
Test example is taken from Analog/Mixed-Signal Simulation and Modeling
Lab 04
: Copyright (c) 2022 Dr. Hesham Omran ([email protected])
Copyright (c) 2022 Islam Omar ([email protected])