Maker Pro
Maker Pro

Updated, Op-Amp based control-loop, help with simulation

R

ROb

Jan 1, 1970
0
Hi,

I had posted earlier asking for help with an op-amp based simulation.
Several people requested a schematic. I have setup a Flickr page:

http://www.flickr.com/photos/16936025@N08/

There are two images:

- Matlab simulation of compensator, step response
- LTI SPICE simulation of op-amp based simulation, step-response

Matlab shows a step-response time of 45 ms, SPICE shows ~ 5ms.

I can change the feedback values (.1uF to 1000uF) and my control-loop
still settles within 5 ms. So it seems my control-loops step-response
depends on some op-amp parameters (Avol?) instead of the external
feedback components...

Note:

Op-amp drives L-C filter, modeling the filter of the buck supply. This
means I assume PWM controller, power-stage, etc all have gain of "1", so
I should match Matlab.

Thanks for your help.
 
S

Spehro Pefhany

Jan 1, 1970
0
Hi,

I had posted earlier asking for help with an op-amp based simulation.
Several people requested a schematic. I have setup a Flickr page:

http://www.flickr.com/photos/16936025@N08/

There are two images:

- Matlab simulation of compensator, step response
- LTI SPICE simulation of op-amp based simulation, step-response

Matlab shows a step-response time of 45 ms, SPICE shows ~ 5ms.

I can change the feedback values (.1uF to 1000uF) and my control-loop
still settles within 5 ms. So it seems my control-loops step-response
depends on some op-amp parameters (Avol?) instead of the external
feedback components...

Note:

Op-amp drives L-C filter, modeling the filter of the buck supply. This
means I assume PWM controller, power-stage, etc all have gain of "1", so
I should match Matlab.

Thanks for your help.


Look again at the transfer function-- wrt the reference input the
transfer function with the feedback = 0 is 1 + k/s not k/s. If you do
a longer simulation you'll see the integrator ramp up after the
initial step to Vref. The time to reach Vref is indeed determined by
op-amp parameters (slew rate mainly).


Best regards,
Spehro Pefhany
 
J

John Popelish

Jan 1, 1970
0
ROb said:
Hi,

I had posted earlier asking for help with an op-amp based simulation.
Several people requested a schematic. I have setup a Flickr page:

http://www.flickr.com/photos/16936025@N08/

There are two images:

- Matlab simulation of compensator, step response
- LTI SPICE simulation of op-amp based simulation, step-response

Matlab shows a step-response time of 45 ms, SPICE shows ~ 5ms.

The difference is because your spice does not model an ideal
integrator. The step on the reference goes straight through
with a gain of 1, rather than being integrated. Move the
pulse input to the inverting input (with a 10k resistor to
change the voltage to a current but maintain a gain of 1,
well -1, anyway), and you will see something very much
closer to what Matlab predicts (except inverting).
 
J

John Popelish

Jan 1, 1970
0
ROb said:
I see your points now, thank you. A few things still confused me, maybe
these are dumb questions but I would appreciate some help.

1. If I want to build the "ideal" integrator control-loop, can I do it
using one op-amp, or do I need another to generate the error term and
feed that output to the integrator op-amp? I guess for an ideal
integrator, the second op-amp would have V+ grounded.

Yes, and ideal integrator controller subtracts the process
measurement from the setpoint and integrates that difference
to produce the control output.

Which way the subtraction takes place (which of the two
terms being added has a negative sign preceding it, or which
is subtracted from the other) depends on whether the process
responds directly or reversely to the control output.

Direct response would mean that an increasing control output
drives an increasing process measurement. A reverse acting
process would mean that a greater control output produces a
decreasing process measurement. Any general controller must
handle either of those cases.

In this example, I think you have been assuming that the
process is just a copy of the controller output (direct
acting with a gain of 1), so you are really just feeding the
controller output back as the process measurement.

There has to be one inversion in that feedback process, to
make it a negative feedback controller. So either you
subtract the process measurement from the setpoint and do a
non inverting integration of that difference to produce the
controller output, or you subtract the setpoint from the
process measurement and use an inverting integrator to
produce the controller output from that difference. Either
way, you get one inversion from process measurement to
controller output.

If you follow my directions it the last post, you will be
using an inverting integrator, and subtracting the setpoint
from the process measurement. You would need an additional
opamp inverter to add the negative sign to the setpoint, to
you to input a non inverted setpoint.

You could also use that additional opamp to make a
subtractor (that takes 4 resistors) to produce an error
voltage and integrate that output. This is the more obvious
form and easier to generalize to other controllers.
2. If I continue to use my existing circuit, if I wanted to "limit" the
bandwidth would I be remiss for just putting in a low-pass after the op-
amp output?

Integrators are inherent low pass filters. Adding more
filtering in the feedback loop from output back to process
measurement input will produce phase delay that will make
the controller less stable. If you want to slow the
response to setpoint changes, you can add all the filtering
to that input you like before producing the error term to be
integrated. If you want lower controller bandwidth, I
suggest you just increase the size of the integrator cap so
that the integration proceeds with a lower gain factor.
3. I was following http://www.onsemi.com/pub/Collateral/AND8143-D.PDF
for some guidance on implementing op-amp based control-loops, figure 5.

I assume the transfer function they give is wrong since their
implementation is like mine?

They are assuming that Vref (the setpoint) is fixed, so the
response to changes in it don't matter. Their Rbias
resistor is essentially the variable setpoint input I have
been describing.
4. Are there any good resources on practical control-loop
implementation using op-amps? I'm OK with control-loop theory, and I've
done a few closed-loop designs digitally, never fully in the analog
world. I'm finding too many articles that are dumbed down introducing
PID (which I'm OK with), neglecting some of the salient points in using
op-amps for this kind of stuff.

I'll look around, and maybe, get back to you on that.
 
R

ROb

Jan 1, 1970
0
John, Spehro,

The difference is because your spice does not model an ideal
integrator. The step on the reference goes straight through
with a gain of 1, rather than being integrated. Move the
pulse input to the inverting input (with a 10k resistor to
change the voltage to a current but maintain a gain of 1,
well -1, anyway), and you will see something very much
closer to what Matlab predicts (except inverting).

I see your points now, thank you. A few things still confused me, maybe
these are dumb questions but I would appreciate some help.

1. If I want to build the "ideal" integrator control-loop, can I do it
using one op-amp, or do I need another to generate the error term and
feed that output to the integrator op-amp? I guess for an ideal
integrator, the second op-amp would have V+ grounded.

2. If I continue to use my existing circuit, if I wanted to "limit" the
bandwidth would I be remiss for just putting in a low-pass after the op-
amp output?

3. I was following http://www.onsemi.com/pub/Collateral/AND8143-D.PDF
for some guidance on implementing op-amp based control-loops, figure 5.

I assume the transfer function they give is wrong since their
implementation is like mine?

4. Are there any good resources on practical control-loop
implementation using op-amps? I'm OK with control-loop theory, and I've
done a few closed-loop designs digitally, never fully in the analog
world. I'm finding too many articles that are dumbed down introducing
PID (which I'm OK with), neglecting some of the salient points in using
op-amps for this kind of stuff.

Thanks
Rob.
 
Top