0
\$\begingroup\$

I have created a series, shunt LC bandstop/notch filter.

https://github.com/promach/frequency_trap/tree/development

I am using gEDA with noqsi gnetlist backend and ngspice simulator

However, I could not obtain the desired inductor value from the gyrator made up of X1 and GM2 circuit blocks.

If all resorts failed, I am thinking of using S-parameter to check the value of the active inductance created from gyrator structure consisting of CMOS inverter and GM2 circuit blocks.

frequency_trap.net

* gnetlist -L ../.. -g spice-noqsi -o frequency_trap.net frequency_trap.sch
* SPICE file generated by spice-noqsi version 20130710
* Send requests or bug reports to [email protected]
Ctest X1.IN Vout 1n      
Vd Vdd GND 'SUPPLY'
Vs Vss GND 0V
.GLOBAL Vdd Vss
.INCLUDE CMOS_Inverter.net
.INCLUDE Gm2.net
.INCLUDE active_inductor.net
.PARAM SUPPLY=3.3v
.options TEMP=25
.MODEL n1 NMOS
.MODEL p1 PMOS
Vtest Vtest GND dc 0
+ac 1
CL GND Gm2.IN 0.07pF      
XGm2 Gm2.IN Gm2.OUT GM2
X1 X1.IN X1.OUT INV1
V_IP_X1 X1.OUT Gm2.IN DC 0V  
V_IP_Gm2 Gm2.OUT X1.IN DC 0V  
Rs Vtest Vout 1e-6      
.control
op
ac lin 10000 100 2000
write frequency_trap.raw
gnuplot vtest db(vtest)
gnuplot vout db(vout)
*plot Vtest Vout
tran 0.1p 400p
plot Vtest X1.IN X1.OUT
setplot
plot i(v.xgm2.v_ip3) i(v.xgm2.v_ip4) i(v.xgm2.v_ip5) i(v.xgm2.v_ip6)
noise v(Vtest) Vtest lin 100 1 10G
setplot noise1
let noise_figure=db(inoise_spectrum)/2-db(2*sqrt(boltz*290*50))
plot noise_figure
.endc

CMOS_Inverter.net

* gnetlist -L ../.. -g spice-noqsi -o CMOS_Inverter.net CMOS_Inverter.sch
* SPICE file generated by spice-noqsi version 20130710
* Send requests or bug reports to [email protected]
.subckt INV1 2 1
M4 1 2 Vdd Vdd P1  l=0.4u w=3u         m=25
M1 1 2 Vss Vss N1  l=1.2u w=3u         m=25
*
*
.ENDS

Gm2.net

* gnetlist -L ../.. -g spice-noqsi -o Gm2.net Gm2.sch
* SPICE file generated by spice-noqsi version 20130710
* Send requests or bug reports to [email protected]
.subckt GM2 7 3
M4 g3 g3 1 1 P1  l=1u w=3u         
M3 3 g3 2 2 P1  l=1u w=3u         
M5 3 5 4 Vss N1  l=1u w=3u         
M6 g3 7 6 Vss N1  l=1u w=3u         
I2 8 Vss 40uA
I1 9 Vss 40uA
Vb 5 Vss 1.8V
Rs 9 8 500k      
*
*
V_IP6 6 8 DC 0V  
V_IP5 4 9 DC 0V  
V_IP4 Vdd 1 DC 0V  
V_IP3 Vdd 2 DC 0V  
.ENDS

In ngspice simulation, .OP gave me the following:

I am looking at it now. Does anyone have any comment ?

Initial Transient Solution
--------------------------

Node                                   Voltage
----                                   -------
x1.in                                  2.09899
vout                                         0
vdd                                        3.3
vss                                          0
vtest                                        0
gm2.in                                     1.8
xgm2.g3                                2.14857
xgm2.1                                     3.3
gm2.out                                2.09899
xgm2.2                                     3.3
xgm2.5                                     1.8
xgm2.4                                0.649101
xgm2.6                                0.649101
xgm2.8                                0.649101
xgm2.9                                0.649101
x1.out                                     1.8
v_ip_gm2#branch                              0
v_ip_x1#branch                               0
v.xgm2.v_ip3#branch                      4e-05
v.xgm2.v_ip4#branch                      4e-05
v.xgm2.v_ip5#branch                      4e-05
v.xgm2.v_ip6#branch                      4e-05
v.xgm2.vb#branch                             0
vtest#branch                                 0
vs#branch                           0.00280043
vd#branch                          -0.00280043

frequency_trap.sch CMOS_Inverter.sch Gm2.sch

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I don't feel like today is the right day for joining gitplace or whatever it's called so post a shematic and some real results that make sense. \$\endgroup\$
    – Andy aka
    Commented Jan 30, 2018 at 16:55
  • 1
    \$\begingroup\$ @Andyaka Could you comment on sourceforge.net/p/ngspice/discussion/133842/thread/428ee822/… ? \$\endgroup\$
    – kevin
    Commented Feb 17, 2018 at 17:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.