DC Servo question...

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.

GK

Disabled Account
Joined 2006
gootee said:
Anyway, I'm now back to this: What should be the MINIMUM amplifier output offset-correction range, for a "regular" type of DC Servo? I realize that it might be dependent on the rail voltages, type of amplifier topology, etc. But is there a general "rule of thumb", for choosing it? I think that I have seen a "generally accepted" maximum DC offset value, somewhere, but can't quite remember what it was.

I know that I could just "pick a value", such as, say, 300 mV. But the exact value chosen probably matters a lot, especially if "best" performance is a serious goal. The chosen "maximum correctable offest" value, besides determining many of the servo circuit's parameters, also directly affects the maximum amplitude of the AC that is allowed to be injected back into the amplifier input. The SMALLER the maximum correctable offset value needs to be, the lower the maximum feedback-injected AC can be, and the lower the added distortion can be (and the better the accuracy and precision can be, probably).


This is a good point. Most designers implement DC servos which are more than capable of driving the amplifier to the rails several times over.
Suppose your servo is an opamp powered with +/-15V. Its output will swing something like +/-12V - when this figure is multiplied by the amplifiers gain, it's obvious that it's excessive.
The best approach here is to simply divide the output of the servo with a resistive divider - even to a degree of 100:1. That will instantly give you 40dB less ac feedback. Only problem is, if the servo has a really long time constant, you might have to wait a bit for its output to swing to the voltage level necessary to null the DC offset every time the amp is powered up.
The trick fix here is to augment the servo with a DC-null trimpot, which is adjusted when the amp is commissioned to null out the majority of the amplifiers DC offset. This trimpot is adjusted for close to zero volts at the output of the servo.

Well thats how I do it anyway.

Cheers,
Glen
 
The trick fix here is to augment the servo with a DC-null trimpot, which is adjusted when the amp is commissioned to null out the majority of the amplifiers DC offset. This trimpot is adjusted for close to zero volts at the output of the servo.
Hi Glen,
Tom & I discussed this point and we came to an agreement that the DC null should be done cold. Then the DC servo corrects for warm up drift.
Are you in agreement with this or do you implement this differently?
ref, posts 19, 20 &29.
 
Dxvideo,

I have reworked the DC Servo design, assuming that it needs to be able to eliminate a maximum of only 300 mV of DC output offset, or 100 mV of DC input offset.

This version provides 90% offset correction in less than 6 seconds, and injects almost no distortion, even at very low frequencies.

I have also lowered the values of the resistors near the integrator opamp, to give a lower noise figure.

Here is the schematic:

An externally hosted image should be here but it was not working when we last tested it.


This servo will be able to zero-out the stated offset voltages when the Preamp input is 2V p-p or less and its gain=3 or less, with input frequencies of 10 Hz or more, assuming that the integrator opamp that's used can swing its output to within about 1.67v of the power supply voltages. If the input voltage's amplitude is larger, or the gain is higher, or the opamp can't swing it output to within about 1.67v of the power supply voltages, then the maximum correctable offset would probably be somewhat smaller.

If more offset-correction range is needed, the value of the 68K resistor, R12, could be decreased (or the values of R2 and R1 could both be increased, while keeping R1/R2=gain-1). The ratio, R12/R2 (keeping R1/R2=gain-1) is what actually determines the correction range, to which the ratio is inversely proportional. (But note that lowering that ratio will also increase the proportion of the AC from the servo, at the amplifier's negative input.)

-------------------------

Below is a plot of the DC Servo's component of the AC voltage at the amplifier's negative input, relative to an AC level from the inner-loop feedback of 0 dB at the amplifier's negative input, which means that the plot below indicates the proportion of the negative input's total AC voltage that comes only from the DC Servo. i.e. The level of the AC from the servo is below the level of the AC from the inner feedback loop by the value indicated in the plot, at each frequency. (Well, almost, since technically we might have to subtract the relatively-small FB_LEVEL AC level from the inner loop's much larger AC level, before comparing them, I think. The comparison would be about .025 dB worse at 10 Hz, in that case, and .0075 dB worse at 20 Hz, and .0003 dB worse at 100 Hz, etc.)

If even less AC from the servo was desired, then the values of C1 and C3, OR the values of R5 and R8, could be increased (equally), which would also increase the time needed for the correction of an offset.


DC SERVO'S COMPONENT OF TOTAL AC VOLTAGE AT AMPLIFIER INPUT:

An externally hosted image should be here but it was not working when we last tested it.




And here is the TEST VERSION of the circuit above, that was used to make the plot above:

An externally hosted image should be here but it was not working when we last tested it.



Regards,

Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
if you use an LF411 max supply is +-18Vdc and the LF411a is +-22Vdc.

Tom,
could you post the sim page/s that shows how to get the the other graphs you have described for us?
particularly a.) the time to correct, and b.) the distortion.

you have chosen input filter @ 2.7Hz and output filter @ ~4.8Hz.
can you explain why you c.) chose this ratio and d.) those particular values and e.) input lower than output? Speed of response, or most effective trial & error, or intuition, or by calculated design?

and can you alert AndyC to your sim posts. He is considering editting a new SPICE category for us less skilled users.
 
AndrewT said:

Tom,
could you post the sim page/s that shows how to get the the other graphs you have described for us?
particularly a.) the time to correct, and b.) the distortion.

Hi Andrew,

Below are links for downloading the LT-Spice files, for both of my last-posted schematics. Simply right-click on each link, select Save Target As, remove the .TXT from the filename (in the save dialog), select the desired folder (in your SWCADIII hierarchy, probably), and click the Save button. Put all four of them in the same folder.

Regular version:
http://www.fullnet.com/~tomg/dxservo3.asc.txt
http://www.fullnet.com/~tomg/dxservo3.plt.txt

Test Version:
http://www.fullnet.com/~tomg/dxserv3t.asc.txt
http://www.fullnet.com/~tomg/dxserv3t.plt.txt

I have added some basic instructions to the schematics, for new LT-Spice users, so they can get these simulations up and running in about 20 seconds.

If you don't already have LT-spice, there is a direct download link on my spice page, at http://www.fullnet.com/~tomg/gooteesp.htm . (I would right-click the link and select "Open in New Window".)

I took the liberty of changing the opamps to something that is already in LT-Spice's built-in library, to make things simpler for everyone else. And I also changed the power supplies to +/-18V, since some of the LT library's opamps that I tried bumped into the rails, when using +/-15v. Performance changes, due to those changes, appear to be fairly minor.

If you want to try the OP275 opamp model that I used, it's downloadable from my spice page, at the URL I mentioned above.

AndrewT said:
if you use an LF411 max supply is +-18Vdc and the LF411a is +-22Vdc.

It's almost time for me to take a nap. But...

I used +/-15v, originally (even though the OP275 also goes to +/-22v), just so people could use it with a wider selection of opamps, since +/-15v is a common limit, and the ones that run on higher rails would also work, then. Of course, with higher rails, a larger correction range would be available, and, more-importantly, for the SAME correction range, R12 could be made a little larger, lowering the AC contribution of the servo to the opamp input.

AndrewT said:

you have chosen input filter @ 2.7Hz and output filter @ ~4.8Hz.
can you explain why you c.) chose this ratio and d.) those particular values and e.) input lower than output? Speed of response, or most effective trial & error, or intuition, or by calculated design?

I didn't do any rigorous "classical control theory" types of analysis, for this. It was basically just simple calculations, educated guesses, and trial and error.

I originally chose the integrator R and C to be 1Meg and 220 nF, to put the time constant at 1/2/Pi/R/C = about 0.7 Hz (and so the nice, small, red Wima MKP2-series 0.22uF polypropylene box caps could be used, there). Later, after playing-around with the filters, and R12, etc, and looking at the (very slow) speed and the "more than low-enough" FB_LEVEL AC component, I found that I could lower the R5 and R8 values, which I thought might be good for lower noise.

I chose the input filter R and C to be the same as those of the integrator, with the hope of balancing the impedances seen by the inputs of the integrator opamp, to try for the lowest offsets and drifts, and hoping that the whole thing would still be stable, which it was.

For the output filter, I would normally use an RxC that was about ten times larger than the integrator's RxC, to help ensure stability. But, in this case, (maybe because the amplifier gain and loop gain are so low) I was able to put them closer together. I originally did have the output filter f almost 7X the integrator's. But it still seems fine, how it is now.

It has close to a "deadbeat" response, i.e. with no overshoot, i.e. approximately "critically damped". (That MIGHT change, if R12, or anything else, is changed, which might make one want to re-tune the filter or integrator component values.) I also don't think I remembered to re-check the amplifier offset with the input grounded. I often change R5 and R8, to adjust that, and adjust C1 and C3 at the same time, so that the RxC numbers stay about the same. (There are other ways, of course.)

Nap time.

Have fun with the LTspice simulations!

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
Dxvideo, et al,

I have made what looks like quite a SIGNIFICANT IMPROVEMENT to the DC Servo circuit.

Revised schematics and plot of servo feedback's AC level are farther below.

-----------------

CHANGE SUMMARY for DC servo schematics in Post #64:


1. CHANGE POWER SUPPLIES from +/-15v to +/-22V (see below).

2. CHANGE R12 from 68K to 100K.

Don't forget to ALSO change R6 to 100K, in the "Test Version".

3. CHANGE R5 from 270K to 464K.

4. CHANGE C3 from 220 nF to 2.2 uF.

5. CHANGE R12 from 100K to 115K.

Don't forget to ALSO change R6 to 115K, in the "Test Version".

----------------

All changes above should be made to both the regular version's schematic AND the "Test Version"'s schematic that were given in Post #64 of this "DC Servo Questiion..." thread at diyaudio.com.


----------------- The story:

Increasing the power supply voltages to +/-22V (and not increasing the maximum correctable DC offset range, i.e. 300 mV@output) allows us to increase R12 to about 107K (or, say, 100K, to play it safe, but see farther below).

NOTE: If someone has only +/-15V available, and cannot change it to +/-22V, (And this probably should apply to +/-18v supplies, too. I'd have to check, though.) then R12 (AND R6 in the "Test Version") should NOT be increased, from their 68K values. Otherwise, the integrator opamps output voltage might hit its maximum (Check this for your particular opamp, though. It may work OK.) The servo system will be slightly under-damped, then (i.e. with a bit of overshoot when correcting a "step" offset test-input). But it should work fine in actual use. And the Servo's feedback's AC level should still be about -70dB below the inner feedback loop's AC level, at 10 Hz, and about -82 dB below it at 20 Hz (compared to -75dB and -86.5dB with +/-22v supplies, but still way better than the -46dB and -57dB without the other changes mentioned in this post.).

Changing R5 from 270K to 464K (ideally, 460k, for the offset at least), while keeping R8 at 270K, almost eliminated the amplifier's DC output offset (now about 80 uV, with 464k), when the preamp input is grounded, at least when there are LT1028A opamp models in place. It will probably vary, for other opamps.

A ***MAJOR IMPROVEMENT*** has been effected, by increasing the value of C3 (and R5; see above), in the integrator's input low-pass filter, from 220 nF to 2.2 uF.

This is embarrassing. I don't know why I didn't realize that this could/should be done, before (Or, if I DO know, I'm not saying. :). But, "next time", maybe I'll try using the rigorous "classical control theory" mathematical methods, again, so I won't miss something like this!

With the new C3 and R5 values, which puts the integrator input filter's f-3dB at about 0.156 Hz, the amplitude of the AC in the integrator's output has been decreased, SIGNIFICANTLY(!), AND, maybe amazingly, with only a moderate increase in the time needed to correct a DC offset (now about 7.5 seconds for 90% correction).

Looking at the plot of FB_LEVEL (farther below), like the one posted recently in post 64 but with the circuit changes just mentioned, the servo's feedback's AC voltage component at the amplifier input, at 10 Hz, compared to the inner feedback loop's AC component there (0 dB), went from about -46 dB to about -75 db! And at 20 Hz it went from to about -57 dB to about -86.5 dB! This is VERY GOOD NEWS.

The simulated distortion is so low that it's difficult to believe the results, even for "just a simulation": Extending the simulation time to 35 seconds (to try to allow enough time to get 20 more cycles after everything's settled completely) and using an input frequency of 1 Hz (ONE Hertz!), with an input of 2V p-p (6V p-p output), and a 0.1V input DC offset, the output THD that LTspice reports, using 9 harmonics for the last 20 cycles of the output waveform, was only .008727% (which might actually be lower, if a longer sim time were used, now that I think about it). Trying it with 20 harmonics instead of 9 gave .008733%, for a 1 Hz signal. (While still using 20 harmonics over 20 cycles: ) For 2 Hz, THD was .000118%. For 3 Hz, and for all other frequencies that I tried, above that, the THD of the output was the same as the THD of the input, which was reported as .000001%. Hmmm.

You can download and run the sims, to check it yourself. It gives the magnitude and phase of each harmonic. You can have LT-Spice run an FFT (Fast Fourier Transform), and see the amplitude spectrum (Make sure that you use the mouse to drag a rectangle around only the steady-state portion of the plot, first, until the portion you want to use for the FFT is magnified to fill the entire plot window. Then, also, specify to use only that part, in the first FFT dialog box that comes up.).

-----------------

Here is the revised DC Servo schematic, with all of the latest changes:


An externally hosted image should be here but it was not working when we last tested it.

Download the LTspice simulation files for the schematic above:
http://www.fullnet.com/~tomg/dxservo4.asc.txt
http://www.fullnet.com/~tomg/dxservo4.plt.txt


And here is the revised DC Servo "Test Version" schematic, that does the FB_LEVEL plot when simulating with LT-Spice:


An externally hosted image should be here but it was not working when we last tested it.

Download the LTspice simulation file for the schematic above:
http://www.fullnet.com/~tomg/dxserv4t.asc.txt
http://www.fullnet.com/~tomg/dxserv4t.plt.txt


Download note: Right-click on each of the simulation file links, above, and select "Save Target As", then remove the ".txt" from the filename, in the save dialog, then select your folder, then click the Save button.

If you don't already have the free LT-Spice simulation software, go to http://www.fullnet.com/~tomg/gooteesp.htm , and use the direct download link, there.

----------------


DC SERVO'S AC FEEDBACK VOLTAGE COMPARED TO INNER LOOP'S AC VOLTAGE, AT AMPLIFIER'S NEG INPUT:


An externally hosted image should be here but it was not working when we last tested it.




Well, that's it, for now. I'm sure there's room for more improvement. Since everyone has access to the LT-Spice simulation files, now, maybe someone else will suggest something.

I think I'll see if I can do something similar for a power-amp servo.

I've also got a pretty-good start on a servo that uses the "AC Cancellation" topology that Glen Kleinschmidt first mentioned here, in case anyone is interested. Theoretically, it should be able to beat the pants off of anything that uses only low-pass filters and an integrator.

And for yet-another DC Servo circuit, that uses an interesting 3rd-order "DC Accurate" filter, and also has a downloadable LT-Spice file, see: http://www.fullnet.com/~tomg/gooteesp.htm .

Cheers!

- Tom Gootee

http://www.fullnet.com/~tomg/index.html

-
 
P.S.

DIFFERENT OPAMP TYPES:

In the DC Servo (w/preamp) schematics that I just posted, the opamps are shown as LT1028A. However, many different opamps could used, instead. I only used the LT1028A because it is included in the standard LT-Spice opamp library, and I was only interested in the general performance of the DC Servo portion of the system. But I do think that for the servo's integrator opamp, a "reasonably-fast" opamp with low offsets and low offsets' drifts, and FET inputs if possible, might be a good choice.

DIFFERENT POWER SUPPLY VOLTAGES:

And if you need to use lower-voltage power supply rails than +/-22V shown, such as +/-18v or +/-15v, then you can either run the simulation files above, with your particular opamps' spice models, and see if R12 needs to be lower than 115k, or if it can even be increased above 68k, OR... simply specify a slightly-smaller maximum offset correction range! :)


And in case anyone likes phase plots:

I didn't include the PHASE ANGLE plot, with the plot of FB_LEVEL versus frequency, in my last post. But, in looking at it now, it seems (maybe) interesting that from about 200 Hz to about 10 kHz, it's within 1 degree or less of -180 degrees, and only varies from -180 by about 1.5 degrees out to 100 Hz and 20 kHz. Between 1 Hz and 8 Hz, it varies up then down between about -160 degrees and -155.7 degrees (3.4 Hz), then curves smoothly down through -171 deg at 10 Hz to -179 degrees at 200 Hz.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
Hi

Just to point a “pro“ way.

This link points to Crest audio amplifier schematics.
http://www.diyaudio.com/forums/showthread.php?postid=1278257#post1278257

For example, in the now classical 8002 model, page-4 // IC4 it seems that they transform the whole amplifier in an standard active Hi-pass filter with their “Servo“circuit implementation.
I guess that the phase-shift will transverse the full bass region until 100Hz.

At last, a good reason to do not mix different brand and/or models to drive bass loudspeaker clusters…
 
some bode plots of Tom's servo

Hi Tom,

Some comments on your schem "DC servo 4" from post #49 which I simmed in MircoSim SPICE (using *very* rough modelled OP275 for signal and LT1028 for servo), and on that type of circuit in general:

Basicly, we want an integrator. With the non-inv config we can't get that from the RC (R8, C1) around the servo op-amp alone, gain won't go below 0dB, we have a zero there. Therefore we need another RC (a pole) ahead of or behind the op-amp that breaks in when the op-amps stops to roll off. To get a perfect blend of these roll-offs they need to have equal time constants, f_pole=f_zero. That is not exactly the case here, you chose the follow-up RC (R7//R12, C2) to be slightly higher (in freq) than the op-amp RC. That explains the wobbly phase in the 1..10Hz region (see bode plots). This all gives us a (more or less) perfect -20dB/dec slope, thus a constant 90° phase, from the servo loop's view. Therefore 90° phase margin, no stability issues.

Now we add a second RC, the servo's input RC in your case. This will add another -20dB/dec slope and 90° shift for frequencies way above (x10) its break frequeny. Here we get in trouble when the servo's open loop gain is >1 and the additional phase lag is already significant, as it starts to add from 1/10 of the break freq upwards. This partly happens in your design, there is a little peaking in the closed loop response of the circuit at ~100mHz. Servo's OLG transit is at 40mHz with a 76° phase margin.

The servo's OLG plot scales with two factors:
i) the integrator's time constant(s).
ii) the amount of chosen offset catch range as adjusted with R12. The main amp presents an inverting gain stage for the servo loop, with a gain less than 0dB.

Some trade-off thoughts:
For quick response, we want high DC- and LF-gain and only 1st order integrator response in the OLG region above 0dB of servo OLG. Below 0dB, the is little to no corrective action of the servo. High DC- and LF-gain means higher 0dB-point and tight coupling to the main amp, thus a bigger catch range but bigger AC feedthrough also.

For stability, we want to be at least 90° away from zero phase at the 0dB intersect (zero phase would mean full positive feedback).

For little AC feedtrough we want low gain and a steeper slope in the audio region, 2nd order in this case. That steeper slope should break in way above (half a decade al least) the 0dB intersect, to keep a good phase margin. That suggests a low 0dB point of the OLG.

The distribution of the 3 poles and zeros itself together with noise/headroom issues of the servo-op-amp also is a trade-off.

Sort of a trade-off hell, I'd say....


Bode plots:
Servo open loop magnitude and phase:

An externally hosted image should be here but it was not working when we last tested it.


green: phase
red: total mag of the servo OLG, the product of the following terms:
blue: roll-off of the first RC
yellow: behaviour of the servo op-amp with its RC
purple: second RC's roll-off.
cyan: transfer function of the signal amp stage, from the servo's view. Flat, essentially.

- Yellow and purple form the constant -20dB/dec integrator roll- off (as mentioned, not perfectly).
- From 1mHz to 100mHz we see the -20dB/dec, 90° from the intergrator. Somwhere below 1mHz it will flat out when the servo amp runs out of gain.
- Above 100mHz the second RC's roll-off come into play, getting us -40dB/dec, and 0° (from 30Hz to 300kHz. Above 300kHz, the signal op-amp starts to roll off).

The cursors are at the 0dB transit, the 76° phase margin can be directly read from the graph.
We can see the slight curvature in the gain curve which produces the corresponding phase wobble (or vice versa, this is a minimum phase system)


Closed loop signal magnitude and phase:

An externally hosted image should be here but it was not working when we last tested it.


There is that little +1dB bump at the lower corner, and the roll-off is 20dB/dec as expected from the OLG plots (below 100mHz there is only the main integrator contributing). Phase is not an issue.

More stuff is likely to follow, I feel just to have scatched the tip of that servo iceberg...
Things I might dig in further:
- A higher order design, 2nd ist just the worst case for stability.
- Pros and cons of inverting servo coupling to non-inv of signal amp and vice versa.
- Where does the distortion in the feedtrough mainly come from? If the feedthrough were clean, we wouldn't need to bother at all.
- Maybe a full integrator isn't best, if we can tolerate some millivolts a rolled off one might be better.
- What frequencies are actually to chose, that is e.g.: how low do we want to go without getting 1/f noise troubles.
- ...


Regards, Klaus
 
Hi Klaus,

Thanks for sharing all of your wonderful work! I am very-much looking forward to seeing anything else you might come up with.

I tried changing R7 to 27K (and R12 to 103K, then, to keep the total = 130K), so the integrator time constant and the output RC lowpass time constant would be approximately equal. Among other things, it lowered the AC in the servo feedback to -78.5 dB at 10 Hz and -90.5 dB at 20 Hz.

I also made a simulation schematic that uses the Tian method to plot the open-loop gain and phase, which I will post below. I hope that I have implemented it correctly.

The phase margin I got, with the Tian-method simulation agrees with your results (about 76 degrees). (I found the implementation of the Tian method in the Files section of the LT-SPICE group, at http:/www.yahoogroups.com .)

Unfortunately, I have to leave town, now, probably until Sunday evening.

Below is the schematic for the simulation to plot the open-loop gain and phase, using the Tian method. I will try to post the LT-Spice file for it, after I get back from out of town.

- Tom Gootee

http://www.fullnet.com/~tomg/index.html

An externally hosted image should be here but it was not working when we last tested it.
 
Re: some bode plots of Tom's servo

KSTR said:
Hi Tom,

Some comments on your schem "DC servo 4" from post #49 which I simmed in MircoSim SPICE (using *very* rough modelled OP275 for signal and LT1028 for servo), and on that type of circuit in general:

Basicly, we want an integrator. With the non-inv config we can't get that from the RC (R8, C1) around the servo op-amp alone, gain won't go below 0dB, we have a zero there. Therefore we need another RC (a pole) ahead of or behind the op-amp that breaks in when the op-amps stops to roll off. To get a perfect blend of these roll-offs they need to have equal time constants, f_pole=f_zero. That is not exactly the case here, you chose the follow-up RC (R7//R12, C2) to be slightly higher (in freq) than the op-amp RC. That explains the wobbly phase in the 1..10Hz region (see bode plots). This all gives us a (more or less) perfect -20dB/dec slope, thus a constant 90° phase, from the servo loop's view. Therefore 90° phase margin, no stability issues.

Now we add a second RC, the servo's input RC in your case. This will add another -20dB/dec slope and 90° shift for frequencies way above (x10) its break frequeny. Here we get in trouble when the servo's open loop gain is >1 and the additional phase lag is already significant, as it starts to add from 1/10 of the break freq upwards. This partly happens in your design, there is a little peaking in the closed loop response of the circuit at ~100mHz. Servo's OLG transit is at 40mHz with a 76° phase margin.

The servo's OLG plot scales with two factors:
i) the integrator's time constant(s).
ii) the amount of chosen offset catch range as adjusted with R12. The main amp presents an inverting gain stage for the servo loop, with a gain less than 0dB.

Some trade-off thoughts:
For quick response, we want high DC- and LF-gain and only 1st order integrator response in the OLG region above 0dB of servo OLG. Below 0dB, the is little to no corrective action of the servo. High DC- and LF-gain means higher 0dB-point and tight coupling to the main amp, thus a bigger catch range but bigger AC feedthrough also.

For stability, we want to be at least 90° away from zero phase at the 0dB intersect (zero phase would mean full positive feedback).

For little AC feedtrough we want low gain and a steeper slope in the audio region, 2nd order in this case. That steeper slope should break in way above (half a decade al least) the 0dB intersect, to keep a good phase margin. That suggests a low 0dB point of the OLG.

The distribution of the 3 poles and zeros itself together with noise/headroom issues of the servo-op-amp also is a trade-off.

Sort of a trade-off hell, I'd say....


Bode plots:
Servo open loop magnitude and phase:

<plot snipped>

green: phase
red: total mag of the servo OLG, the product of the following terms:
blue: roll-off of the first RC
yellow: behaviour of the servo op-amp with its RC
purple: second RC's roll-off.
cyan: transfer function of the signal amp stage, from the servo's view. Flat, essentially.

- Yellow and purple form the constant -20dB/dec integrator roll- off (as mentioned, not perfectly).
- From 1mHz to 100mHz we see the -20dB/dec, 90° from the intergrator. Somwhere below 1mHz it will flat out when the servo amp runs out of gain.
- Above 100mHz the second RC's roll-off come into play, getting us -40dB/dec, and 0° (from 30Hz to 300kHz. Above 300kHz, the signal op-amp starts to roll off).

The cursors are at the 0dB transit, the 76° phase margin can be directly read from the graph.
We can see the slight curvature in the gain curve which produces the corresponding phase wobble (or vice versa, this is a minimum phase system)


Closed loop signal magnitude and phase:

<plot snipped>

There is that little +1dB bump at the lower corner, and the roll-off is 20dB/dec as expected from the OLG plots (below 100mHz there is only the main integrator contributing). Phase is not an issue.

More stuff is likely to follow, I feel just to have scatched the tip of that servo iceberg...
Things I might dig in further:
- A higher order design, 2nd ist just the worst case for stability.
- Pros and cons of inverting servo coupling to non-inv of signal amp and vice versa.
- Where does the distortion in the feedtrough mainly come from? If the feedthrough were clean, we wouldn't need to bother at all.
- Maybe a full integrator isn't best, if we can tolerate some millivolts a rolled off one might be better.
- What frequencies are actually to chose, that is e.g.: how low do we want to go without getting 1/f noise troubles.
- ...


Regards, Klaus


Hi Klaus,

I am wondering what an adequate phase-margin would be, for this type of DC Servo, or, rather, how to "easily" determine when stability is adequate (i.e. "good-enough").

[ASIDE: I am also wondering if I am calculating the phase margin with an appropriate method. I sometimes seem to have forgotten almost as much as I used to know, about control systems. Is it "phase angle when OLG=CLG (i.e. when OLG=1) minus negative 180 degrees" (which would be Phi - (-180))? When is it Phi - (-360), instead?]

I realize that for systems that might encounter somewhat-reactive loads, we might want to be extremely conservative with the phase margin, for best stability. But I thought that, sometimes, even as little as 40-45 degrees of phase margin could be considered to be "OK".

I was thinking that we could tell if a less-than-90-degress phase margin was "OK" by looking at the STEP-RESPONSE of the system, and that if the step response had no overshoot or ringing (with the expected load, at least), then the system could be considered "stable-enough".

In the case of my "DC Servo 4" (schematic farther above), I had adjusted the input filter's capacitance, C3, to be as large as possible without producing any overshoot, for a 300 mV output (i.e. 100 mV input) DC offset step (and that value of C3, 2.2uF, resulted in the 76-degree phase margin that you noted). And in the "DC Servo 5" case, in which I also changed R7 from 15k to 27k, to match the RC time constants of the integrator and the output filter, per your reminder, the overshoot for a 300 mV DC output offset step is still only about 350 nV (i.e. basically "no" overshoot).

So, while not optimal, if considering ONLY stability, do you think that the slightly-degraded phase margin, due to the input filter, is a worthwhile and feasible trade-off, since it lowers the AC component of the servo's feedback, relative to the inner loop feedback's AC level, by (in the DC Servo 5 case) about 40 dB at 20 Hz (to about -98 dB) and by about 30 dB at 10 Hz (to about -79 dB)? i.e. Is it "stable-enough".

I also have a "worse" example, which I call DC Servo 5_canc, which includes an "AC Cancellation" circuit (as mentioned by Glen Kleinschmidt, farther above in this thread), between the integrator and the post-filter, but otherwise uses the "DC Servo 5" circuit (with the same component values, for the following example). There are more "tuning" options, for that one, and I have not yet really tried to optimize it. But, for one configuration of that circuit, just as an example, it gives a servo-feedback AC-component that is below the inner loop's AC component by about -96 dB at 10 Hz and by about -114 dB at 20 Hz. The overshoot of the output is about 41 uV, for a 300 mV correction (for a 300 mV DC output offset step) of a 6V p-p 10 Hz sine (with the same overshoot, similarly, for 50 Hz). It gives 90% correction of a 300 mV output offset in about 7.1 seconds. BUT, the PHASE MARGIN, using the method of Tian, as shown in the schematic I posted (with "DC Servo 5"), is about 74 degrees (See "EDIT", below". I had made an error that caused the PM to be reported as 34.7 degrees, which is why I was asking.)

Is it "stable-enough"? Or, how can we tell?

EDIT: In the last example, I originally ALSO had the main input sources connected, when simulating with the "Tian method for getting open-loop gain & phase from the closed-loop system", and had gotten a reported phase margin of 34.7 degrees. But with the main input grounded, when running the simulation, as it should be (I hope), then the phase margin is reported as about 74 degrees. At any rate, it "seems" stable-enough, given the step-response that I tried. But do you think that is actually IS stable-enough?

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
Hi Andrew,

Get the OP275.ASY (the symbol file) from Tom's website, copy it with the OP275.SUB to your working folder.

In LTSpice (starting it from that folder, or saving/loading a new empty .ASC to thar dir to get there), you can get the part pressing F2 (and then select the top dir to be your working dir). Maybe there is an easier way to change the working dir, I just couldn't figure it out so far...

Then add a spice directive line (press S) .INCLUDE OP275.SUB to link the symbol to the model.

You can use the symbol for other op-amps as well with the same basic options (no comp/offset pins) by loading it, rename it to the op-amp you want to use, then include the model for it (must have the same name). One usually has to check if the pin order in the model is right (fitting the .ASY), if not you get kind of a mess. Typical convention for this is the order -IN, +IN, +Vs, -Vs, OUT.

I myself am currently working into the depths of LTSpice as it is getting more and more a standard. I'm using MicSim's PSpiceAD normally, the user frontend is totally different...

Regards, Klaus
 
AndrewT said:
Hi,
Tom's DC servo sim calls up op275.sub
I have downloaded AD spice model for the op275 and it opens in LTspice.

What do I do to link the spice model with the sim?

Hi Andrew,

It's probably easier to just delete the line ".include op275.sub" and then delete all of the opamps labeled op275 and then replace them with LT1028A from the LT-Spice opamps library.

I used LT1028A for all of the later schematics, to make it easier for everyone, but had forgotten to delete the line ".include op275.sub".

- Tom

P.S. If you DO want to keep the op275 opamps, but don't have my op275.asy file, you can use the opamp2 part from the standard library, then right-click on it an set Prefix to X and Value to op275. Then duplicate that one for the others.
 
Hi Tom,

To get the phase margin one has to think about what phase angle would give positive feedback and then look at the distance to that point grom the actual phase angle. CLG (meaning signal gain) is not always the point of attention, the intersect of 1/beta (feedback factor) and OLG is. Two very good texts on this (without overburdening math) are:
http://eportal.apexmicrotech.com/mainsite/pdf/an19u.pdf
http://www.ti.com/litv/pdf/sboa015


For the servo, I feel that phase margin isn't too much of an issue. For the frequences involved we would need a very large capacitve load together with a very high OL-Rout of the signal op-amp to get a margin reduction. So, reactive loads are not an issue for the servo, but for the signal amp it would be. Of couse I think we would not like to have significant gain peaking and overshoot in low Hz and sub-Hz range, thinking of the increasing of 1/f noise in that region. In a power-amp the corrective action might also change the supply voltages which in turn could change offsets which then in turn would provoke servo action. If we are unlucky, this might form a positive feedback loop, resulting in "motor-boating".

For the in-loop stability analysis other sources that the test source should be off. I didn't use the Tian method and did it really open-loop (disconnecting the servo's input and hooking it to an extra v-source) which is only OK if you sim textbook perfect op-amp without supplies, commen mode limits, etc. I probably will check the correct method and see if it gives me the same results (which it should).


Some thoughts on performance:

Looking around the net and in my collection of amp circuits on my hard-disk I couldn't find higher order designs. All were first order, either inverting or non-inverting, without post filter. So whatever works in the industry should be OK for us also.
But, from a perfectionist noise standpoint a post RC is a good thing, as the servo-opamp produces its noise with the noise gain of the circuit which can't go below unity up to the GBWP of the opamp. Too much bandwidth is not usefull here. OTOH, to have low distortion for the AC feedthrough we sure would like to have some 40..60dB loop gain available for feedback. Again, the post filter would provide further reduction of the AC.

Elsewhere here I read John Curl uses OPA134 for servos which seem to have the right mix of specs for this task at a reasonable cost. The LT1028 doesn't look too good, it tends to be unstable as an integrator without extra compensation (wonder why this doesn't show up in the sim). Its cousin, the LT1128, looks better, has a lot DC-OLG and good noise/dc specs, but then again both are to be used with low source impedances which would complicate things here, getting us very large cap values and so on.
In summary, I thing a post filter can be useful if we can afford to inject the servo signal into the main loop via a rather high resistance. Otherwise that resistance together with the filter cap would introduce another significant pole/zero pair which raises the main signal gain a little at low frequencies (or lowers it, if we have an inverting servo feeding into the non-inv input). The filter cap practially is a part of the signal path and therefore like the integrator cap(s) needs to be of high quality.

Regarding correctable offset range, with op-amp circuits I see to major factors.
i) the op-amps worst-case offset in the actual circuit, say, with x5 safety margin. This part is easy as we have full control.
ii) the expected input signal worst-case offset. I don't know if there are "industry standard" values around. My thinking is, a preamp output should be well below ~3mV because with a typical power-amp gain of sometimes > x100 this would present 300mV to the speakers, given the power amp is DC-coupled.

Really a lot of trade-offs, after all...


Regards, Klaus

PS. Your Iron Toner Transfer Method for PCBs is really a great revelation, ingeniuity at its best. I will try this out and check if my Epson printer has the right toner and if I can find a good paper over here in Germany.
 
One other important " DC Servo Design " question, that I am still "wrestling with", is the aceptable maximum for the TIME it takes for the servo to effect its correction of a DC offset.

Obviously, if we let the allowable offset-correction time become longer and longer, we could use larger and larger RC time constants in the offset control loop, and could get the AC component that is fed back into the amplifier by the servo to be as small as we want (and thereby get the potential added distortion as low as we want). So we need some constraint on the overall offset-correction loop time-constant, so that we can try to minimize the potential for added distortion, within that constraint.

What should be considered, to try to decide how long is too long? And what would then be the maximum time that should be allowed, for, say, a 90% correction? (Failing that, what might be a "good guess", or a "generally accepted" time value?)

Some beginning ideas:

Maybe a "trivial" answer, in the case of an audio system where the speakers' turn-on relay is time-delayed, so that any DC offset is mostly gone before the speakers are turned on, is simply, "How long do we want to wait?".

Another offset-related "time factor" is probably the speed with which thermal effects might change the output offset of an audio amplifier. What might be the speed (and magnitude) of the output offset change, due to such thermal effects? (And I wonder how those might vary, for different types of amplifiers; for example, between a solid-state preamp and a 50W chipamp.)

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
I think a good time constant would be something similar to what one would choose for capacitor coupling. For a very conservative 1 degree phase error at 20Hz one would choose a -3dB corner freq of 0.35Hz, corresponding to a R*C time constant of 0.45s. A step signal would be down to 37% of its initial value after that, and down to 0.7% after five times that time (2.25s). So I'd choose the servo response not be any slower than that. And if we can accept about 6 deg phase error at 20Hz, we could go up to 2Hz (80ms R*C) which is more than 5 times faster. And to keep the AC low in the significant audio range, one could use the post filter, maybe even a second order type (RCRC).

The offset effects from load induced thermal changes are sure an issue to look at, chip-amps should do better there (AndrewT brought that up a while ago) than most discrete designs, apart of these new OnSemi ThermalTrak BJTs. OTOH, I think the main job of a servo is to minimize the long term offset drifts (say, above the seconds range). This much depends on the application, a power amp feeding a tweeter in an acvtive speaker should surely not impose any DC or LF on it, especially not on ribbon types which are often sort of quasi-shorts at DC and LF (sub-ohm impedances).

Regards, Klaus
 
KSTR said:
I think a good time constant would be something similar to what one would choose for capacitor coupling. For a very conservative 1 degree phase error at 20Hz one would choose a -3dB corner freq of 0.35Hz, corresponding to a R*C time constant of 0.45s. A step signal would be down to 37% of its initial value after that, and down to 0.7% after five times that time (2.25s). So I'd choose the servo response not be any slower than that. And if we can accept about 6 deg phase error at 20Hz, we could go up to 2Hz (80ms R*C) which is more than 5 times faster. And to keep the AC low in the significant audio range, one could use the post filter, maybe even a second order type (RCRC).

The offset effects from load induced thermal changes are sure an issue to look at, chip-amps should do better there (AndrewT brought that up a while ago) than most discrete designs, apart of these new OnSemi ThermalTrak BJTs. OTOH, I think the main job of a servo is to minimize the long term offset drifts (say, above the seconds range). This much depends on the application, a power amp feeding a tweeter in an acvtive speaker should surely not impose any DC or LF on it, especially not on ribbon types which are often sort of quasi-shorts at DC and LF (sub-ohm impedances).

Regards, Klaus

Hi Klaus,

Are you saying that a DC offset should be 99.3% corrected in <= 2.25 seconds? Ouch! That's fast.

Can we have -110 dB servo feedback AC component at 20 Hz, with that? :)

Could you please explain a little more about WHY you think 0.45 seconds would be a good DC Servo time-constant?

- Tom Gootee

http://www.fullnet.com/~tomg/index.html
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.