Crybaby stability questions. Can anybody read nyquist plots?

Started by Max999, July 07, 2017, 12:53:05 AM

Previous topic - Next topic

Max999

Hi guys. To solve some headroom issues with a Crybaby I am playing with LT spice to implement rail to rail opamps in it. I have made two versions of the circuit virtually. I made two versions because you can swap the order between buffer/ inverting amplifier/ buffer, and buffer/ non inverting amplifier/ inverting buffer. I also modeled an original Crybaby, with the normal components.

I would like to know if these circuits are stable. As far as phase shift in a normal bode plot, I know 0dB at -180 degrees is bad news. What about -190? Is it also unstable when it reaches +180?

In trying to make it simpler so see if it is stable I read that Nyquist plots are easy for it. Well .. I tried to understand it but I am not quite there yet to say the least.

Can anybody tell me which of these circuits is the most stable?


antonis

I hate math analysis but, IMHO, you have to superimpose all three graphs in one Nyquist plot to estimate (you never can be sure) which of them is closer to stability (actually, less ustable than the other..)

In theory, in a graph of the magnitude and phase of an amplifier gain indicates system's stability if the gain margin (gain at 180o phase) and phase margin (phase at zero gain) are both possitive - in other words, a typical Bode plot..

From these, it's relatively easy (via some software :icon_cool:) to construct a Nyquist diagram that will more certainly indicate "stability"..
(the way the diagram is constructed, a plot that lies outside the point -1,0 indicates instability whereas one that lies within this point indicates stability and one that passes through -1,0 point should be considerd marginally stable (or marginally unstable).

Probably, an example of posted diagram would be more interpretive than my above bad English ravings but I haven't a handy one and, IMHO again, you don't have to worry too much as long as you ensure that the amplifier has very low gain at a frequency that will cause phase reversal..  :icon_wink:

edit: Just found a relevant Bode(a) - Nyquist(b) scheme..

"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Transmogrifox

Just break the feedback loop and do an AC sweep on the loop gain.  That will be easier to interpret than a Nyquist plot if you're not familiar with the concepts.  Follow this up with a transient simulation of impulse response.

If you are truly replacing the function of the transistors with op amps and keeping the gains about the same then you don't even need to worry about stability in this circuit.

Quote
I would like to know if these circuits are stable. As far as phase shift in a normal bode plot, I know 0dB at -180 degrees is bad news. What about -190? Is it also unstable when it reaches +180?
You got it backwards.  >0dB at 0 degrees (or 360 degrees) is bad.  -180 degrees is as stable as you get.

As you approach 0 degrees from either end the system response becomes more oscillatory (higher Q) and this is why a Crybaby is more resonant at the lower frequency.  Typically sweeps from a Q of about 12 at heel position to Q of 4 at toe position.  It's the effect of narrowing phase/gain margins (at least this is one way to look at it).

Your simulation should use the .step function to step the pot position over several increments so you get 10 or so traces on your pot.
trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

amptramp

Is there some reason a Bode plot won't work?  They are a lot easier to understand than Nyquist plots.

Max999

I appreciate all the answers a lot. It is very easy to make rookie mistakes with knowledge that you have only just dipped your toe in, so  I should probably leave the Nyquist plots alone at this point for analysis. I will ask about them for gaining knowledge though.

I started thinking about stability issues of the Crybaby when I upped the voltage to 12, 18, 24 and 36v ( 9.1 zener diode at dc input removed). The distortion in the toe down position stayed!
So I started reading about the circuit ( thanks geofex and electrosmash), and I saw that there is a lot of negative feedback being used. From experiences with tube amp modding I know negative feedback can lead to oscillations.

@antonis: you said "the way the diagram is constructed, a plot that lies outside the point -1,0 indicates instability whereas one that lies within this point indicates stability and one that passes through -1,0 point should be considerd marginally stable (or marginally unstable". Now I keep looking at the Nyquist diagram you showed, and isn't the one that does not pass around -1 the one labeled "stable"?
When I clicked "nyquist plot" in LT Spice I got the image that I showed in the first post. There are three plots: one original Crybaby, one opamp Crybaby 1 and one opamp Crybaby 2.

@Transmorgrifox: Are >0dB at 0 degrees/ 360 degrees the only bad condiditions? Or is it also at -360 for example? I will try the step function. The opamp circuits respond exactly like the Original crybaby sound wise, other then that the one that has the inverting, non inverting order flipped has a different phase response.

@amptramp: I will stick to the Bode plot, it is hard enough for me to understand as is. What is your approach to seeing phase related instability on Bode plots?

Transmogrifox

0 degrees is the same as 360 degrees is the same as -360 degrees.

In theory it is stable for all phase >0 and <360.  In practice you want some margin.  For example, you don't want 0.1 degree phase at 0 dB open loop gain or you will have a very high-Q filter (long sustained oscillation) which likely goes unstable with temperature change.  Theoretically 0 dB gain with 0.1 degree phase would eventually settle out.

Think of a clock.  12 O'clock is the same as 00:00:00 which is the same as -12:00:00 and the same as 12:00:00 (change the 12's to 24 on a 24-hour digital clock representation).

Negative feedback is a GOOD thing.  You want the feedback to be negative for stability.  The reason you run into issues in tube amps using negative feedback is because phase shift over frequency rotates around 180 degrees to where the output is in phase with the input at some frequency, and that is where it oscillates.

Quote
I started thinking about stability issues of the Crybaby when I upped the voltage to 12, 18, 24 and 36v ( 9.1 zener diode at dc input removed). The distortion in the toe down position stayed!

Actually the toe position is the most stable because there is little to no feedback.  Distortion is coming from something else.  Did you check and adjust the bias on the transistor as you increased voltage?  You might be simply overdriving your amp or whatever is following the crybaby.  In this case a perfectly clean tone out of the wah pedal is useless.

My experience is the stock wah is pretty clean, and simulations show signal level has to get relatively high to clip.  Quick simulation tells me 18V should have been more than enough to keep a typical guitar output clean.  Did you check bias on the collector when you did this?  My simulation says you should have been around 7 to 8 volts there.  Changing bias would center it better to make better use of the 18V, but still 7 or 8 volts is more than you would need.

It's true an op amp implementation would be cleaner when you're concerned about 2% THD vs 0.001%THD.  I can't hear the difference in a guitar going through a typical guitar amp.

I'm thinking stability analysis is a red herring as regards to the problem you're trying to solve.  From an educational point of view, this is a good experience so I don't discourage it.  Just do it for the educational benefit as I don't think it's going to reveal anything insightful about why you hear distortion in the toe position.

As for an op amp wah, have you looked at what RG Keen put on geofex?  I don't see anything in RG's circuit that would make me worry about stability unless you really started to jack the gain.

trans·mog·ri·fy
tr.v. trans·mog·ri·fied, trans·mog·ri·fy·ing, trans·mog·ri·fies To change into a different shape or form, especially one that is fantastic or bizarre.

PRR

>stability issues of the Crybaby when I upped the voltage to 12, 18, 24 and 36v

Most good transistor circuits do not change gain much as supply is changed. So if OK at 9V, I would not expect disaster at 36V.

It is difficult to make a one-transistor stage oscillate (without another inversion). The CB's 2nd transistor is an emitter follower with much more bandwidth than the 1st transistor, so it is nearly a one-transistor stability problem.

Op-amps are even less affected by supply voltage.

"Rail to rail" opamps are beneficial if you must swing all the way to either rail. Since most non-R2R chips will swing near a volt, for supplies over about 9V there is negligible advantage to R2R. At 12V a '072 will swing 8Vpp. If 8Vpp is not enough, then 11.9Vpp is hardly-enough.

> The distortion in the toe down position stayed!

Jacking the supply voltage does not necessarily increase headroom at all internal points. You might try a 'scope and some head-scratch to identify where the signal head-bangs.

Turn down the guitar. Or turn-down in the CB before the filter, and boost on the way out. This sacrifices S/N a bit, but if it is distorting, S/N is perhaps ample anyway.
  • SUPPORTER

ElectricDruid

#7
Quote from: Max999 on July 07, 2017, 01:45:31 PM
So I started reading about the circuit ( thanks geofex and electrosmash), and I saw that there is a lot of negative feedback being used. From experiences with tube amp modding I know negative feedback can lead to oscillations.

That's not right! It's *positive* feedback that leads to oscillations. As Transmogrifox said, if you got oscillations with "negative" feedback in your tube amp, there must have been some other phase shift somewhere that was inverting that feedback and making it positive, at least for some frequency.

The crybaby is a resonant filter circuit, so there is a good degree of frequency-dependent gain, boosting a certain point. It wouldn't be too hard to tweak it to oscillate (increase the Q and/or the gain), but messing with the power supply shouldn't do that.

HTH,
Tom

Max999

Ok just to follow this up so I can tell what happened with my clipping Crybaby issue. After some experiments with recording I found out that the level meter on my screen ( using computer for recording) is not really usefull for seeing if the input of my soundcard clips or not. So the distortion that stayed at the higher voltages was not really coming from the pedal. I can say now that the pedal will be ( transistor) clean from 24 volts and up, with my pickups.

The thing I found though, is that the effect of the Crybaby, being totally clean in the toe down position, makes the pedal a lot less dynamic. It starts to sound more and more like a tone knob, and less "vowely". This is offcourse taste related.

The clipping is a bit nasty, and when I really can't have tube clipping I personally like the symmetric two diode in the feedback loop Tubescreamer style. Is there any way to implement this in the Crybaby with the clipping staying dynamic ( only occuring in the toe down position) ?