I implemented a Miller OPAMP. After I have checked it reaches the desired gain and swing, I put it into the simplest form of closed loop with UNITY negative feedback. The schematic is as follows:

enter image description here

As you can see, the loop is simply a direct negative feedback. I expect the overall gain to be 1. So I am expecting the output signal is exactly the same one as the input sine. However, after a period of time, it fails. Really strange as it can follow in the few microseconds, but fail later.

enter image description here

The green curve that is covered and thus invisible is my input; the blue one is the output.

Where goes wrong and how may I fix it?

  • \$\begingroup\$ Have you actually built it or is it a simulation? You need to check the open loop response at the frequency that it is unstable. You'll find that it has 180 degrees phase shift and more than unity amplification. This makes it unstable. \$\endgroup\$
    – Andy aka
    Nov 2, 2013 at 10:06
  • \$\begingroup\$ Looks like classic instability. Try adding more compensation. Also, you circuit doesn't show what you consider the input and the output. \$\endgroup\$ Nov 2, 2013 at 13:13
  • \$\begingroup\$ @OlinLathrop Yeah, thanks! I also just realized that. I may need to add a capacitor to compensate. But I have difficulties deciding the value of the capacitor. any suggestion please? \$\endgroup\$ Nov 2, 2013 at 13:17
  • \$\begingroup\$ @Andyaka Simulation. I now have problems deciding the compensation compacitance. \$\endgroup\$ Nov 2, 2013 at 13:18
  • \$\begingroup\$ @ tell us all the parameters including the W/L for N and P MOS, then try to help you calculate \$\endgroup\$
    – user31195
    Nov 2, 2013 at 16:09

1 Answer 1


If the simulation suddenly changes state like this, it is probably due to numerical noise, but the design has a "resonance point". Numerical noise is really small, but it can still affect the simulation if the design has issues.

You would probably see this kind of thing in reality, if you could physically design the circuit with zero capacitance (which is impossible). A pcb naturally acts as a low pass filter for high frequency noise.

The numerical noise can be reduced by increasing cshunt (a small capacitor tied to every node, adding a capacitor to the output (thus creating a low pass filter and reducing the bandwidth of the circuit and noise).

It is really useful to understand real world parasitics and know when and where to use them in your simulation. Large resistors (<100M) can be added to simulate air, and increase numerical stability. Capacitors on the order of pF's can be added from signal to ground to simulate the capacitance of a PCB. Inductors can be added to simulate wire or pcb traces.


Your Answer

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

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