How to do stabilty in ac simulation?
a
How to do stabilty in ac simulation?
👍 1
l
It is a bit complicated. Commercial tools use lstb analysis. You can learn about the inner workings of this here: https://sites.google.com/site/frankwiedmann/loopgain In you case, if you want to test if your circuit is stable, you could make a transient simulation with a small step in the voltage supply. If there is ringing, or even oscillation after the step, you will know it.
l
Hi Alok, I use an Open-Loop ac analysis and generate a BODE Plot to determine the stability of a loop. When you do an AC analysis, this will first do a dc operating point analysis to calculate all the bias points of the transistors in your circuit, then it will follow up with the Ac analysis. The resistors in ngspice, as well as other spice simulators, have an additional parameter on the resistor to specify both the dc value of the resistor and the ac value of the resistor. You can use the resistors to effectively open and close the loop around you amplifier. You can place a feedback resistor around your amplifier and specify both the dc value and the ac value of this resistor. For the dc analysis you can specify a very small value, example 1 ohm, which closes the loop around your amplifier, so that the dc bias of all the transistors are correctly calculated. For the ac analysis, you can have a very large value, example of 100MEG ohm. This large ac value for the resistor, effectively opens the loop for the AC Open-Loop analysis. Here is my test schematic of my "opAmp2" as well as the "Edit properties" window for resistor R2.
Screenshot from 2023-08-02 09-05-43.png,Screenshot from 2023-08-02 09-21-48.png
Note that the dc value of R1 is 100Meg ohm, the dc value of R2 is 1 ohm. The ac value of R1 is 1 ohm, and the ac value of R2 is 100Meg ohm
👍 1
l
And I hope you're not using 50 mA to bias your amplifier.
l
For the simulation I captured the schematic from, I had the bias current set to 5uA, just to see how much headroom I had on all my transistors. Typically, for this amp, I use 1uA
a
thank you @Luis Henrique Rodovalho @Larry Harris