Control Systems Notes
Control Systems Notes
back to home
Contents
1
11
14
Controls Lab
16
7.1
7.2
Lab 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Good to know
18
n2
s +2 n s +n2
2
For this case, we only concern about Steady State: Y = A|G( j )| sin(t +). Since if eigen complex, |G( j )| = n2 / (n2 2 )2 + (2
we have:
Heavily Damped p1 < < 1, |G( j )| decrease monotonously for ANY input .
2
Critical point = p1 , |G( j )| = n2 / n2 + 2 , threshold for resonance, arguably the fastest to steady state
2
p
Moderatly Damped < p1 , resonace! |G( j )| peaks at p = n 1 2 Not n ! If = 1, then p = n !
2
y =1 p
e n t sin( 1 2 n t + )
12
i
n e n t h
y0 = p
sin( 1 2 n t + ) 1 2 cos( 1 2 n t + )
12
a perfect chance to apply trig:
i
n e n t h
y0 = p
sin( 1 2 n t + )
12
i
n e n t h
y0 = p
sin( 1 2 n t )
12
thus we have critical pts at
1 2 n t = k where k = 1, 2, 3...
p
we want the solution to be fully enveloped by the error band of a fixed percentage. The error at first peak t1 = / 1 2 n
is the key:
y1 = 1 p
=1+ p
1
1
1
e n t1 sin( + )
e n t1 sin()
1
1
e n t1
12
1 2
n p
1 2 n
Tm
P
M
H
(a) Before
G
1+GH
(b) After
Error is the error signal E(s ) = H C (s ) R(s) rather than nominal errorc(t ) r (t )
Defn: Noise and disturbance
Noise is extraneous electronic signals;Disturbance is extraneous energy variable. Influence of these additional input
signal can calculated using Superposition, i.e zero out other inputs and reduce the block algebra just for that input.
Beware of inverting signals and check if the feedback formula is truely applicable.
Defn: Unity Feedback
A feedback block of 1 impies the signal used for feedback has the same unit with that of the reference. We do this,
however, in order to implement Matlab step() function:
R
C
R
1
H
H
(a) Before
(b) After
Integral( sI ) and Derivative(KD s) control are almost always used with Proportional(KP ) control, in a positive feedforward
loop. Note gains could be negative in sense! But in PID, we restrict it to postive realvalue
Defn: Open/Closed Loop control
Open if the control system has no feedback loops; closed otherwise.
Rule: Inverse Laplace tranformation
1.Reduce the block diagram to a single transfer function;
2.Find intial condition(final value thm) of system for the use of superposition;
3.Solve for eigenvalue, ,n (the denominator);
4.Split numerator/ factor denominator;
5. Perform partial fraction(use if numerator order lower than denominator, watch for repeated root);
6. Inverse Laplace by table.
Pf: Since
L { f 0 } = s F (s ) f (0)
we have:
Z
lim{s F (s)} = lim{L { f 0 } + f (0)} = lim{
e s t f 0 (t ) d t + f (0)}
s 0
s 0
s 0 0
Z
=
1 f 0 (t ) d t + f (0) = f (t ) + f (0)
0
= lim { f (t )}
t
s0
e n t sin(d t + )
= cos
n d
d
ds
GH = 1/K to get break pts: branching is always perpendicular: proof: Let s = x +y j , so GH (s) = u(s)+v(s ) j .
GP I D
G p l an t
GP I D
G p l an t
H
(a) PID paradigm: H6= 1 R may not be desired output, merely
reference
Type
P
P-D
transfer function
n-m order
G(s) = KP
move on branch
+1
-1
G(s) = KD (s + K P )
D
P-I
G(s) = KP
s+ KI
s
K
P-I-D
G(s) = KD
s 2+ KP s + K I
D
points! these are due to complex poles sucked into the real axis instead of the asymptotes. One pair of such poles brings
1 break-in+1 break-out.
Remark: PID design steps
1.choose the PID permutations, I eliminates S.S error signal; D is easy.
2.Given desired closed loop zero, place your controller zero by angle deficiency method. Note this sd e s i r e is best to fall
on = 0.707 line. which sd e s i r e d ?
3.To improve accuracy of root loci, iterate with angle criterion.
4.Select a target closed loop point: most negative real, = 0.707, 5.Calculate Gain required to attain that point. Limit
to 100 6.Produce step response
Remark: Limit Controller max gain to 100
K
s 2+ KP s + K I
D
D
when attempting to limit the max controller gain, go to G(s) = KD
and plug in the zeros placed in your proto
s
design and get the ratio between KP , KI and KD to set the target bound of 100. Why 100? too high a gain degrades the
signal to noise ratio, and increase power required.
s+z
s+p
j + z
j + p
j + z
| sin(t + )
j + p
Remark: in LL controller
LL as a function of varying can be thought of as a pair of vectors(one from controller zero and one from pole)
sweeping the imaginery axis. Thus the one thats closer to origin has the bigger angle. Zero closer means lead; pole
closer means lag. Also, we have:
0 l ead 90 ; 90 l a g 0
Remark: Cause and effect
Lead and lag of controlled signal doesnt violate cause and effect since this is steady state response.
Remark: Crux of LL controller design
place the Controller zero and pole to obtain desired closed loop pole.
1. angle deficiency + rule of bisection gives zero and pole(note, keep the controller net angle between 0 and 90 for lead,
-90 to 0 for lag.). Graphical or trig can be used.
2.calculate gain
9
Remark: LL vs PID
1. LL is generally faster than Integral control, since no poles are placed near origin.
2. LL has a steady state error that is a function of Gain. Thus a compensation of input signal is required! In fact, it would
take infinite gain to reach zero error signal.
Remark: Potentiometer
Pot" is essentially Uninsulated high resistance wire winding around a circular or helical frame and a rotating Wiper.
Pot can be used as Variable resistor, or a voltage divider, which is a analog rotational position encoder. Thus angular
position and voltage of wiper has a one-to-one correspondence.
Remark: Digital position encoder
Two types of Boolean" or 0/1 position encoders: incremental and absolute. Incremental use 2 or 3 Boolean variables:
one or two for flagging an increment and the index" for flagging the completion of a revolution. If we have two sensor
for increment, separated by a quadrature, then the encoder has 4 times the resolution(line number) than without.
Absolute type has fixed zero and measures the absolute position relative to that zero, requires more binary digit as
resolution of revolution becomes finer.
Remark: Quadrature incremental encoder
We have a fixed resolution of lines and clear area, say 500 lines and clears. By using 2 sensors placed a quadrature apart
we increased the resolution from one line-clear cycle to quadrature of a line-clear cycle or 2000 increments. To convert
digital to analog voltage, we use Encoder Ditial to Analog Converter (EDAC), that spans 0 to 4000 Boolean count with
9.962 1r e v
0 to 0.962 Volts. Thus the volt per rad position decoder constant is Ke nc od e r = 2r
e v 2
Operation: Op-Amp
Op-Amp is a differential amplifier that can be operated in two modes: without feedback(comparator) or with feedback
signals( various amplifier).
Naming:
V + , i + non-inverting terminal.
V , i inverting terminal.
Vou t output
V s + positive power supply, rail voltages
V s negative power supply
Comparator Mode:
no output to input feedback, any difference from the two terminals will produce a fixed magnitude voltage difference,
whose sign switches as terminal inputs are switched. Amplifier Mode:
If output-input feedback exist, we follow these rules for non-saturated Ideal amplifier:
V =V+
i = i+ = 0
Gai n =
Remark: Saturation
Opt-Amp reaches Saturation if output reaches 90% rail voltage, at which point output is constant and additional input
yields no additional output.
Remark: Op-Amp DIP
8 pin Dual In Line Package means two rows of 4 spaced 0.1 inch apart (through hole), as opposed to "surface mount".
Note: Dot marks pin 1.
Remark: Having multiple op Ampt in one IC
Dual Op-Amp 8 Pin DIP has two op Amp in one Integrated circuit.
Remark: Single Op-Amp Circuits, Amplifier mode
Remark: Complex Impedance
Laplace transform of Elemental equation of circuit elements yields its complex impedance.
In series and in parallel of impedance follows identical rules with resistors.
10
For single input voltage, when deriving the transfer function of a op Amp network, use lumped inverting input
V
impedance Z with lumped feedback impedance Z f b and a ground on non-inverting input, we have: Vo u t = G(s) =
in
Zfb .
For multiple inputs, one cannot derive a single impedance, like the above case, use superposition if linear! Eg: inverting
summer before saturation.
Remark: flaws in Ideal integrator, Ideal differentiator
1
but is prone to self saturating, thus a non saturating integrator is used in stead near its linear
Ideal Integrator has Rs
region; the cost is the introduction of a zero at negative real axis. Ideal differentiator has C s/R but is unstable due
to internal Amp oscillations, thus a stable non-ideal differentiator is used: the cost associated is the introduction of a
zero at negative real axis. However, we do have control on where is zero or pole is placed by changing resistance and
capacitance.
Remark: Non-ideal is pretty good though
The result is better if time constant of the non-ideal integrator far exceeds time constant of the plant see figure bellow:
Figure 4: how non-ideal integrator approach ideal as i nt e g rat o r increase
11
Steady state: when systems natural/unforced/homogeneous response vanished and systems excited(driven)/forced/particular
response dominates. For sinusoidal steady state, theres no change between cycles in time, not no change in time.
Remark: Decibels
2 schemes of definition exist!
Scheme A: {x} d B s = 10 log(x)
Scheme B: {x} d Be = 20 log(x), we use scheme B in controls and ECE.
eg: 1 0 dB, 105 100dB, 0.707 -3.01 dB
if plotting log graph, y minus -1 corresponds to -20 dB
Remark: Interpolating on log scale
10
2 0.3
3.16 0.5
4 0.6
5 0.7
8 0.9
10 1
accurate to 2 decimals.
Interpolating on log scale with any base between point a < p < b :, use formula:
L pa
L
x{ p} = a ba b a
Remark: Phase angle Bode plot
the following rules apply for phase angle Bode plot:
use rad/s for degrees for phase shift.
at = 0, = 0 for every factor.
view the net phase shift as the sum(and difference) of all phase angle contributor from numerator and denominator
factors.
identical factors on numerator and denominator are symmetric around = 0 axis.
asymptotic phase angle rule is 180 for 2nd order factor on numerator, 180 on denominator, 90 for 1st order
factor on numerator.
negative phase shift is lag, positive means lead.
pass through half the change to asymptotic phase angle at = corner frequency(1/, or n ). But magnitude response is not max or min at corner frequency, but at d !
differentiator adds a lead of 90 ; integrator adds a lag of 90 . they are straight lines on phase plot.
For 2nd order factor,fix natural frequency, and reduce damping ratio pinches the phase response steeper toward c
at which point must be half the asymptotic frequency. Pf: use circle for constant natural frequency and use low
rays cluster near imaginary axis, = 1 is real axis. Show = n implies the angle sums up to 90 and < n high
damping ratio has bigger phase angle in magnitude and > n lower damping ratio has bigger phase angle.
for 2nd order no damp, we have the limiting case of sharp cuspy corner. or a step transition from 0 to 180
Procedure for phase bode plot for transfer function: put in pole zero form, identify the numerator factors, denominator factors and the order and corner frequency for each factor. Then plot each and superimpose.
Remark: Asymptotic Approximation of Log-Mag Bode Plot
Using this technique, the log magnitude of Bode is accurate except near c , which is related to n and most often near
d
for 2nd order system, asymptotic approx is more accurate at corner freq if damping is larger.
2
2 s
asymptotic form: convert all factors into the following 1st or 2nd order form: s 0 + 1 and s 2 + 2n + 1
n
the corner frequency c is n or the pseudo natural frequency for first order: n0 = 1/.
what is the corner frequency and what its not? its the point of intersection of low freq approx and high freq approx;
its the at which the phase is half the asymptotic phase shift in phase Bode. Its NOT the frequency at which resonance
or max mag occurs!! = d is! However, when 0, the two coincides.
Bandwidth of a frequency response of a transfer function is the frequency range where log mag is above -3dB or an
attenuation of 0.707 and above.
12
gain factor is the gain extracted from all factors after converted to asymptotic form. This will be a constant offset is
the Asymptotic approx.
Integrator and differentiator are 1 slope straight lines crossing (1, 0)
Remark: 1st order pseudo frequency and 2nd order term natural frequency
A
When using frequency response, for 1st order term s+a
, the a is 1 and can be treated as pseudo frequency n of the 1st
B
order term. This frequency is the corner frequency of the log magnitude bode plot.For 2nd order term s 2 + s
has
+ 2
corner frequency at the natural frequency of this term, namely n
13
For frequency response on open loop transfer function Go.l = KGH , if at the frequency input(180 ) where phase
Bode passes 180 , the log mag bode point exceeds 0, then crossing frequency exists and its value is the input frequency.
The critical gain is the gain is the K that make the log mag bode passes exactly 0.
The phase bode plot for any K is the same. But to check if a particular gain is stable or not, we need the log mag Bode
with K equal to the gain of interest. If log(|Go.l (180 )|) 0 we are in stable region, and =" implies marginally stable.
The Log Gain Margin is the log margin from reaching marginally stable at crossing frequency.
Phase margin is defined similarly but reverses the order of utilizing phase and log mag bode. At log mag equal to 0,
the phase shift relative to 180 is the phase margin.
Remark: The following are equivalent
closed loop response of step input blows up
root loci head to marginally stable or unstable region.
bode gain margin is 0 or negative
bode phase margin is 0 or negative
Nyquist plot encloses -1 on real axis
Remark: Transport lag stability
for transfer function of the form KG(s)e s T where T is the lag, we can make the following observation:
bode gain margin and phase margin criteria still works. i.e. the gain is too large if at 180 the log mag exceeds 0, or
K Kc
the prominent trait of transport lag is phase heading to
thus if G(s) s log magnitude slope upward eventually, the lag sys always blows up regardless of gain K or lag T .
effect of reducing lag period:phase plot stretches to the right and 180 increases, system is safer in this case if
log |KG(s )| exceeds 0 at some point; else if none exceeds 0, were always safe whatever the lag time T is.
Reducing lag time(system respond more swiftly) will play a role (stablize system) if G(s) and K is such that the log
magnitude exceeds 0 at some point(however small a ) in the bode mag plot.
K > Kc will always make system unstable under a lag.
e sT in Laplace domain is a time shift (i.e lag) is the time domain: L { f (t T )} = e s T F (s) and {u s (t T ) f (t T )} =
F (s)
e sT s .
Remark: Nyquist
Read magnitude increase and phase angle from Nyquist plot. Based on these info, transfer functions the order(phase
angle range), resonance(increase in mag at some j ), stability(enclosed -1 or not) can be determined.
digital signal :
quantized voltage , quantized time sampling
14
(1)
nX
o X
X
X
(t nT ) = u s (nT ), n = 0, 1, 2...
L 1 {1 e s(nT ) } =
L 1 {z n } =
z n =
(2)
n=0
n=0
n=0
n=0
which is a series of lagging impulses(not Dirac delta impulse) starting at t = 0 and is indistinguishable with a step in
digital space.
P
z transform of step is
z n
n=0
Defn: Z transform
P
Z { f (kT )} =
f (kT )z k this is simply the discrete version of Laplace transform.
k=0
R
L { f (t )} = 0 f (t )e s t d t
Remark: Z transform pairs
here the is not the Dirac delta function.
Z {(t )}
Z {u(t )}
Z {u(t L)}
all z
z k =
k=0
X
k=k
z k =
1
1 z k
1
1 z k
z >1
z > 1, k > L, mi n
(3)
(4)
s0
z1
(5)
Controls Lab
7.1
Op amp:
1. Operational amplifier amplifies the differential voltage input. Two ways of using it include (1) open loop and
(2) closed loop. The open loop(no feedback) gain is usually extremely large: 10,000-100,000. Closed loop use,
however, keeps the gain to much more practical levels.
2.
Ideal Opt-Amp are feedback circuit controllers such that the following rules holds:
- if voltage information is fed back, then V + = V
17
- else, if inputs are not identically the same then opt amp gives discrete digital outputs that are at saturated voltage(90% of
supply voltage).
- infinite input complex impedance to current
- infinite gain
- from the above rules
Remark: Complex impedence
can be used to conveniently obtain the transfer function of opt-amps
7.2
Lab 11
Good to know
COMPLEX IMPEDENCE In the steady state signal of a circuit with complex compnents under sinusoidal voltage
forcing. The steady state current signal is also a sinusoid scaled by a (complex) resistance and a phase shift. Such two
changes can be conveniently captured by the so-called complex impedence Z of the equivalent circuit. For example, a
resistor has Z = R, so it provides the resistance scaling, but no phase shift on the current. A capacitor Z = j /C ,
on the other hand, provides no scaling if used alone, but a phase shift whose influence becomes greater at lower
frequencies. The inductor, Z = j L provides phase shift at higher voltage frequenies.
The current thus has, for Z = Z0 e j and V = V0 e j t :
I=
V0
Z0
e j (t )
Note that the complex resistance Z0 is a combination of resistance, capacitance and inductance since it is the modulus
of the complex impedence Z rather than its real part which is R.
Remark: Series Parallel
The rule for computing equivalent complex impedence for elements in series and paralle follows the resistor rule.
Remark: Complex impedence
can be used to conveniently obtain the transfer function of opt-amps
18