Phase Margin

Discussion in 'General Electronics Chat' started by blah2222, Nov 27, 2013.

  1. blah2222

    Thread Starter Well-Known Member

    May 3, 2010
    553
    33
    Hi,

    I am working on project that encompasses picking up surface potentials on the forearm which are then passed through an instrumentation amplifier (gain=10), passive high-pass filter (fc=15 Hz), gain stage (gain=100), and finally a precision rectifier with a capacitor in parallel with the feedback resistor R5 to create a low-pass filter (fc=800).

    Upon hooking everything up things seem to work normally except for the output of the rectifier. I am getting a high-frequency oscillation (50-100 KHz). Trying to deduce the problem I ran through my simulations again but found that they were showing a phase margin of around -71deg which is more than enough room.

    I am seeing this when I am using both a battery supply and a wall-wart.

    Attached are my schematic and frequency response.

    Wondering if anyone has any suggestions. I've been at this for a while now, can't seem to crack the code.
     
    • EMG.png
      EMG.png
      File size:
      49.1 KB
      Views:
      27
    • freq.png
      freq.png
      File size:
      50.4 KB
      Views:
      23
  2. LvW

    Active Member

    Jun 13, 2013
    674
    100
    blah2222, I didn´t (and I couldn`t) anyalyze the circuit diagram - however, I am not sure if you know
    * what phase margin means
    * how it is determined.

    At first, you have mentioned a PM=-71 deg. Please note that stable systems require a POSITIIVE margin
    Secondly, what does your display show? Which gain and which phase?
    Your phase looks rather strange - it starts with positive values (slightly less than 100deg, correct?) and crosses the 0 deg line.
    Instead, a stable feedback system has a loop phase starting at -180 deg.
    Therefore, please answer my questions regarding the applied simulation method.
     
  3. blah2222

    Thread Starter Well-Known Member

    May 3, 2010
    553
    33
    This is overall frequency response (gain and phase) taken at the output of the precision rectifier (output of U4).

    U1: gain stage (gain = 1 + (100k/1k) = 101)
    U2: rail splitter to give +2.5V reference
    U3: first half of precision rectifier circuit
    U4: latter half of precision rectifier circuit
    U5: instrumentation input head stage (gain = 1 + (49.4k/5.49k) = 10)

    input --> U5 --> U1 --> passive HPF --> U1 --> U3 + U4 --> output
    U2 sets Vref

    Phase margin is the difference in phase at the 0dB and -180deg. The phase at 0dB is -251deg, so PM = 180deg + (-251deg) = -71deg.

    It does look weird, so my system is unstable then?
     
  4. ronv

    AAC Fanatic!

    Nov 12, 2008
    3,281
    1,231
  5. crutschow

    Expert

    Mar 14, 2008
    12,974
    3,220
    You have an open-loop circuit (aside from load feedback around each amp) so the overall gain/phase margin is not really applicable. I would suspect you have a layout or decoupling issue. How is your circuit built and what decoupling capacitors do you have? I don't see any at the amplifier power terminals, or the virtual ground.
     
  6. blah2222

    Thread Starter Well-Known Member

    May 3, 2010
    553
    33
    I have two 22uF caps between ground and +5V along with the 1uF attached to the +2.5V reference.
     
  7. LvW

    Active Member

    Jun 13, 2013
    674
    100
    In addition to chrutschow`s remark (non-applicability of the phase margin concept) I like to mention that this stability concept applies to LINEAR systems only.
     
  8. bountyhunter

    Well-Known Member

    Sep 7, 2009
    2,498
    507
    A cautionary fable as to why sims can NEVER be used to calculate stability criteria.

    Breadboard it and stabilize it. As mentioned, in the real world decoupling and bypass caps are usually mandatory for stable operation.

    NOTE: the LT1492 may not work for your negative rectifier stage because I don't think it is unity gain stable. That rect acts as a unity gain amp when the signal swings in the other direction. You could try a small bypass cap like 100 pF across the FB resistor R5 but I am not sure it will be stable.

    Why are you using a wideband amp for an instrumentation amplifier? The LT1492 is 5 MHz gain-BW which means it is prone to taking off and singing.
     
    Last edited: Nov 28, 2013
  9. crutschow

    Expert

    Mar 14, 2008
    12,974
    3,220
    Never say NEVER. :rolleyes: It really depends upon the accuracy of your models and proper understanding of the circuit. I build a buck regulator and fine tuned the lead-lag compensation using a Spice simulator. My real circuit built as a PCB breadboard from that had a bode plot that closely followed the simulation bode plot. It would have taken me considerably longer to optimize the circuit response if I hadn't done the simulation first.

    But in this case closed-loop stability criteria does not even apply so I don't understand how that is a cautionary fable. :confused:
     
  10. LvW

    Active Member

    Jun 13, 2013
    674
    100
    Fully agreed. If not blindly applied and if evaluated (!!) properly such a simulation can be very helpful and can reveal criticul design points.
     
Loading...