I have an error when I run Middlebrook method usin...
# openlane
a
I have an error when I run Middlebrook method using GF180. please find the code, test bench and error message: ".options savecurrents .control let runs=2 let run=0 alter @Vprobe1[acmag]=1 alter @iprobe1[acmag]=0 while run le runs set run =”$&run” ac dec 20 0.01 10G remzerovec write OTA_STB_TB.raw save all alter @Vprobe1[acmag]=0 alter @iprobe1[acmag]=1 let run = run + 1 set appendwrite end let ip22 = ac2.i(Vprobe2) let vprb1 = ac1.probe let mb = 1/(vprb1+ip22)-1 let phase_mb = 180/PI*vp(mb) plot vdb(mb) plot phase_mb echo "-------------------------------" echo "-------------------------------" meas ac peak MAX vmag(mb) FROM=2 TO=1.5GHZ let f3db = peak/sqrt(2) meas ac f1 WHEN vmag(mb)=f3db RISE=1 meas ac f2 WHEN vmag(mb)=f3db FALL=1 let GBW = peak*f2 print peak print f2 print GBW .endc" what should I do ?
v
#xschem
d
There is a lot going on to make Middlebrook work and it is definitely not a question for the openlane thread. Last year I spent 2 months getting the Tian technique working in ngspice / xschem. This is essentially the preferred implementation for analysing open loop stability without having to break the loop and is what the commercial EDAs employ. Attached is a doc detailed everything you need to know to get it working. If you pick through that you should get all the answers you want. It will take a few iterations but once you get it working it will drop into any tb and work.