6
\$\begingroup\$

I am playing with a cascode op-amp design and I have problems judging its stability (schematic at the end of the post).

When I judge the DC or AC analyses, it all looks good. No peaking and good phase margin well beyond the unity gain point (~10 MHz ballpark).

However, in the time domain (.tran) analysis, the whole thing is oscillating, at about 1-10 MHz. Essentially, the current mirror is oscillating between fully on and fully off, with the current alternating between both input legs. I have tried changing several things, but the oscillation persists, only changes frequency slightly:

  • component values
  • inserting some .options such as cshunt or gmin
  • replacing the ideal elements with real elements
  • reducing the gain on the current mirror and on the level shifter M3
  • compensation capacitors
  • setting the input voltage source to zero constantly
  • replacing V4 with a current source and resistor

The only thing that remedied the oscillations in the time domain analysis, was to reduce abstol=1e-4. But as this is such a 'weak' convergence value, I think that it would rather mask issues instead of repair them.

Another remedy comes with the fix recommended by @James in comments, however, this seems to deteriorate the AC plots severely as seen below the schematic at the end.

Question

Does this mean that the below op-amp structure is by design not going to work? If so, why not?

If there is no fundamental flaw, do you have some suggestions what could be the issue?

enter image description here

AC plots before and after fix recommended by @James

The fix was to add a 100 pF miller cap to M3 and increase the closed loop gain to 10. The time domain sim becomes stable. But I would have thought, that the "fixed" version looks much worse in AC - with even negative phase at the point of 0 dB gain. Probably, the fix doesn't oscillate because the input bandwidth is restricted to before the danger zone by R5-C3.

BEFORE: enter image description here

AFTER: enter image description here

\$\endgroup\$
20
  • 1
    \$\begingroup\$ Two things to try - 100pF comp cap from gate to drain of M3 and/or significantly increasing value of R14 to several kohms to increase the closed loop gain which reduces the loop gain. \$\endgroup\$
    – user173271
    Aug 3, 2022 at 11:54
  • 1
    \$\begingroup\$ @James Thanks! both taken together - a gain of 10 and 100pF miller cap - made it work. Hmm so it looks indeed like it is oscillating "in a normal way", i.e. by running out of phase margin while still having gain... Why would the AC analysis not show this. I will add a plot of the AC analysis \$\endgroup\$
    – tobalt
    Aug 3, 2022 at 11:57
  • 1
    \$\begingroup\$ @Andyaka Just tried: oscillating. \$\endgroup\$
    – tobalt
    Aug 3, 2022 at 12:04
  • 1
    \$\begingroup\$ @tobalt Ac analysis involves opening the loop (say at the inverting input), injecting a signal into the inverting input and measuring the gain and phase of the returned signal at the other side of the break whilst the non-inverting input is grounded. This can be difficult as the dc conditions across the break have to be catered for, this can be done with a large inductor (GH) connected across the break and injecting the test signal into the inverting input via a large capacitor. Are you just looking at the closed loop gain (input to output)? \$\endgroup\$
    – user173271
    Aug 3, 2022 at 12:20
  • 1
    \$\begingroup\$ @tobalt You seem to have used "real" transistors, yet you are also using a VCVS (E2)? How do you intend to replace that? If you don't, then why not use a quasi-small-signal approach (e.g. simple gm current sources)? At any rate, if I replace E2 with a more palpable choice, it doesn't oscillate. \$\endgroup\$ Aug 3, 2022 at 13:58

1 Answer 1

1
\$\begingroup\$

Just to close this off. User @James basically answered my issue in the comments (and @aconcernedcitizen refined the approach with respect to LTspice).

I did the AC analysis wrong with respect to judging phase margin/stability.

When done properly, I could easily see the lack of phase margin in the design and could fix it precisely with well known compensation techniques such as Miller RC around M3.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.