eCircuit Center |
About SPICE |
SPICE Basics | Running SPICE
| CIRCUIT COLLECTION |
SPICE Commands | SPICE Demos and Downloads |
Op Amp Control System - Part 2
CIRCUIT
OP_CONTROL.CIR
Download the
SPICE file
In Part 1, we explored a basic control system
based on the op amp and how it
works. But when your system begins to overshoot and oscillate, how do you
bring the behavior back under control?
OP AMP CIRCUIT TO CONTROL
BLOCKS
Let's write some equations.
NOTE: Recall from part 1, because the summing / integrator op amp is inverting, VSET must be set to the negative of our desired output. VSET' = VSET * -1. Sub this equation and make R1=R2.
Okay - it looks like the classic equations for the summing junction and controller (integrator, in this case). Here are the classic control theory blocks for this op amp circuit. The integrator block delivers big gain at low frequencies - good for accuracy of control system. However the gain rolls off at -20db/dec to unity gain at
OPEN-LOOP ANALYSIS In this case, the feedback element (tachometer) is a good
point. Then insert an AC voltage source of 1 VRMS. And don't forget to set
VSET's AC
value to 0 VRMS. 1. Find response going around the loop by
plotting the Magnitude and Phase
of V(20)/V(200).
YOU CAN TUNE A LOOP
FAST RESPONSE - NO DELAY
Set integrator components R1=R2=100k, C1 = 0.1 uF and
the delay caps CP1=CP2=0.1pF. In the open-loop AC analysis plot, what
is the phase where the magnitude hits unity? It should be around +90 deg
(-279 deg). This is largely due to the integrator response (-90 deg) and
negative input of the summing junction (-180 deg) for a total of -270 or +90
deg phase shift. Now run a closed-loop response. It don't get much better
than this. A nice fast response with no overshoot or ringing! ADD MORE DELAY Set both caps to CP1=CP2-0.1uF. Things can only get worse. More delay in the loop means more phase shaft in the open-loop plot. Can you make a guess about the closed-loop response? This overshoot and ringing may be unacceptable at this point!
TUNE THE SYSTEM
A simple method to tuning is simply adjust the bandwidth
(via
C1) until you get the desired response. Let's try reducing the bandwidth
by making C1=0.1 uF larger by a factor of 2 or 4 or more. What happens to
the open-loop response? Reducing the bandwidth shifts the entire plot
DOWN. This means the response hits unity gain at a lower frequency where the phase is
more POSITIVE - a good thing! Run the closed-loop file. What happened
to the overshoot and ringing? It should be reduced - but at the cost of a
slower rise time.
NEXT UP
OPEN-LOOP SPICE FILE OP_CONTROL_OL.CIR * * SET POINT VS 100 0 AC 0 * * INVERTER EINV 1 0 100 0 -1 * * OPEN-LOOP TEST VOLTAGE VTEST 200 0 AC 1 * * CLASSIC CONTROL AMPLIFIER R1 1 2 100K R2 200 2 100K CI 2 3 0.1UF XOP1 0 2 3 op_001 * * POWER AMP WITH LIMIT EAMP 10 0 VALUE = { LIMIT( 1 * V(3), +15, -15 ) } * * PROCESS (MOTOR, HEATER, ETC) EP1 15 0 VALUE = { 100 * V(10) } * LOSSES (FRICTION, HEAT LOSS, ETC.) RL1 15 16 0.1 RL2 16 0 100 * DELAY (INERTIA, THERMAL MASS, ETC.) RP1 16 17 100K CP1 17 0 0.1PF RP2 17 18 100K CP2 18 0 0.1PF * * SENSOR (TACHOMETER, THERMISTOR, ETC.) ESENSE 20 0 VALUE = { 1/100 * V(18) } * * * BASIC OP AMP MODEL * Device Pins In+ In- Vout .SUBCKT op_001 1 2 82 RIN 1 2 1e9 * Aol=1000000, fu=1000000 Hz G1 0 10 VALUE = { 1.0 * V(1,2) } R1 10 0 1e6 C1 10 0 1.59e-7 * OUTPUT STAGE EOUT 80 0 10 0 1 ROUT 80 82 10 .ENDS * * ANALYSIS ************************************* *.TRAN 0.1MS 1000MS .AC DEC 20 0.01 1e5 .PROBE .END
CLOSED-LOOP SPICE FILE OP_CONTROL.CIR * * SET POINT VS 1 0 AC 1 PWL(0US 0V 0.01US -10V) * * CLASSIC CONTROL AMPLIFIER R1 1 2 100K R2 20 2 100K CI 2 3 0.1UF XOP1 0 2 3 op_001 * * POWER AMP WITH LIMIT EAMP 10 0 VALUE = { LIMIT( 1 * V(3), +15, -15 ) } * * PROCESS (MOTOR, HEATER, ETC) EP1 15 0 VALUE = { 100 * V(10) } * LOSSES (FRICTION, HEAT LOSS, ETC.) RL1 15 16 0.1 RL2 16 0 100 * DELAY (INERTIA, THERMAL MASS, ETC.) RP1 16 17 100K CP1 17 0 0.1PF RP2 17 18 100K CP2 18 0 0.1PF * * SENSOR (TACHOMETER, THERMISTOR, ETC.) ESENSE 20 0 VALUE = { 1/100 * V(18) } * * * BASIC OP AMP MODEL * Device Pins In+ In- Vout .SUBCKT op_001 1 2 82 RIN 1 2 1e9 * Aol=1000000, fu=1000000 Hz G1 0 10 VALUE = { 1.0 * V(1,2) } R1 10 0 1e6 C1 10 0 1.59e-7 * OUTPUT STAGE EOUT 80 0 10 0 1 ROUT 80 82 10 .ENDS * * ANALYSIS ************************************* .TRAN 0.1MS 1000MS *.AC DEC 20 0.1 1000MEG .PROBE .END
2010 eCircuit Center |
|