Classical and Modern Control Design
Classical and Modern Control Design
Richard Tymerski
Portland State University
Frank Rytkonen
Oregon Institute of Technology
iii
iv © Richard Tymerski and Frank Rytkonen, 2017
Contents
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
2 System Stability 15
2.1 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Stability Analysis by Inspection . . . . . . . . . . . . . . . . . . . 15
2.2.1 Parameterized Stability Analysis by Inspection . . . . . . 16
2.2.2 Examples of Stability Analysis by Inspection . . . . . . . 16
2.3 Routh-Hurwitz Analysis . . . . . . . . . . . . . . . . . . . . . . . 17
2.3.1 Zero in First Column . . . . . . . . . . . . . . . . . . . . . 20
2.3.2 A Row of Zeros . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3.3 Parameterized Routh-Hurwitz Analysis . . . . . . . . . . 21
v
4 Bode Plots 59
4.1 Simple Gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.2 Pole at Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.3 Zero at Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.4 Pole at ωo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.5 Zero at ωo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.6 Right Half Plane Zero at ωo . . . . . . . . . . . . . . . . . . . . . 63
4.7 Complex Pole Pair with Resonant Frequency at ωo . . . . . . . . 63
4.8 Complex Zero Pair with Resonant Frequency at ωo . . . . . . . . 64
4.9 Composite Transfer Functions . . . . . . . . . . . . . . . . . . . . 65
4.10 Summary of Bode Plots . . . . . . . . . . . . . . . . . . . . . . . 70
5 Compensator Design 73
5.1 Design Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.1.2 Uncompensated System . . . . . . . . . . . . . . . . . . . 74
5.1.3 Proportional Compensated System . . . . . . . . . . . . . 78
5.1.4 Dominant Pole Compensated System . . . . . . . . . . . . 80
5.1.5 Dominant Pole Compensated System with zero . . . . . . 82
5.1.6 Dominant Pole Compensated System with zero, improved
phase margin . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.1.7 Lead Compensated System . . . . . . . . . . . . . . . . . 85
5.1.8 Lead Compensated System with integrator and zero . . . 87
5.1.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.1.10 MATLAB Code . . . . . . . . . . . . . . . . . . . . . . . . 103
12 Lab 2 223
12.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
12.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
12.3 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
12.3.1 PECS simulation . . . . . . . . . . . . . . . . . . . . . . . 226
12.3.2 Matlab simulation results check . . . . . . . . . . . . . . 227
14 Lab 4 249
14.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
14.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
14.3 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
14.4 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
14.5 Notes - Buck converter components: . . . . . . . . . . . . . . . . 256
15 Lab 5 257
15.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
15.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
15.3 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
15.3.1 Pre-Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
15.3.2 In the Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
15.3.3 Post-Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
15.4 Optional Tasks - Alternative compensators . . . . . . . . . . . . 266
15.4.1 Proportional Control . . . . . . . . . . . . . . . . . . . . . 266
15.4.2 Lead Control . . . . . . . . . . . . . . . . . . . . . . . . . 266
15.5 Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
16 Lab 6 269
16.1 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
16.2 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
16.3 Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
16.3.1 Pre-Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
16.3.2 In the Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
16.3.3 Post-Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
26 Conclusion 395
Appendix C PECS 397
C.1 PECS Overall Description . . . . . . . . . . . . . . . . . . . . . . 397
C.2 PECS Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
C.2.1 Building a circuit schematic in PECS . . . . . . . . . . . 398
C.2.2 Setting simulation parameters . . . . . . . . . . . . . . . . 400
C.2.3 Running the simulation . . . . . . . . . . . . . . . . . . . 401
C.2.4 Selecting the desired output(s) to plot . . . . . . . . . . . 401
C.3 Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
C.3.1 Basic passive elements: R (resistor), C (capacitor) and L
(inductor) . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
C.3.2 Sources: VDC (DC voltage), IDC (DC current), VAC (AC
voltage) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
C.3.3 Ports: Vport (voltage port) and Iport (current port) . . . 407
C.3.4 Switches: Sw (controlled switch) and D (diode) . . . . . . 408
C.3.5 Switch control elements: Clk (Clock) and (MOD) PWM
Modulator . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
C.3.6 Miscellaneous: OPAMP (operational amplier), current
sensor (no symbol name), ground node (no symbol name) 412
C.4 PECSPLOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
C.5 Terminology: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
C.6 General use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
C.7 Menu items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
C.7.1 File menu commands . . . . . . . . . . . . . . . . . . . . . 416
C.7.2 Edit menu commands . . . . . . . . . . . . . . . . . . . . 417
C.7.3 Plots Menu commands . . . . . . . . . . . . . . . . . . . . 417
C.7.4 View menu commands . . . . . . . . . . . . . . . . . . . . 419
C.7.5 Options menu commands . . . . . . . . . . . . . . . . . . 419
C.7.6 Help menu commands . . . . . . . . . . . . . . . . . . . . 419
C.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
Classical Control:
Fundamentals
1
Chapter 1
Introduction
Y (s) G(s)
= (1.1)
U (s) 1 + G(s)H(s)
1 G(s)H(s)
= (1.2)
H(s) 1 + G(s)H(s)
The product G(s)H(s) (more strictly, −G(s)H(s)) is termed the loop gain as
it is the product of the gains around the feedback loop. Equation (1.3) is termed
3
the closed loop gain of the system. The advantages that feedback provides is
derived from the fact that as long as the magnitude of the loop gain is large,
that is, |G(s)H(s)| 1, then the closed loop gain is determined by H(s).
However, the price to be paid for this is the possibility that the denominator
polynomial, known as the characteristic polynomial, i.e. 1 + G(s)H(s) may
vanish at some frequency resulting in the closed loop gain becoming unbounded,
that is unstable. The purpose of the compensator Gc (s) therefore is to provide
loop shaping to avoid this instability condition.
From this discussion we can therefore summarize the purpose of each of the
three blocks: G(s) is the plant, which implements the operational function that
is desired; the feedback block H(s) (under the condition of high loop gain) sets
the value of closed loop gain
Y (s) 1
≈ for |G(s)H(s)| 1
U (s) H(s)
and the compensator Gc (s) block improves the stability and performance of the
closed loop system.
The performance of the closed loop system will be assessed by examining the
response to step inputs. Specically, with reference to gure 12.2 we will look at
the rise time, settling time and percentage overshoot. Rise time, tr , is dened
as the time it takes for the step response to go from 10% to 90% of the nal
value. Settling time, ts , refers to the time it takes for the response to remain in
a band of ±5% of the nal value. The percentage overshoot (OS) is determined
by the following formula
B−A
OS = × 100 (1.3)
A
where A and B represent the largest overshoot value and nal value, respec-
tively.
1 + G(s)H(s)|s=jω = 0 (1.4)
These frequencies are the 'poles' of the closed loop system. The locations of
pole frequencies can be mathematically determined by a root nding procedure.
Stability can be subsequently assessed by examining whether all of these com-
plex valued quantities have a negative real parts. If so, the system is said to be
absolutely stable.
Note also that (under certain mild assumptions concerning the loop gain) the
phase margin may be used to determine the stability of the closed loop system.
The phase margin test for absolute stability requires that
The gain margin does enter into the absolute stability consideration. This
may be seen as rather unusual and so an example will be presented in the
next section demonstrating this as well as tying up a number of other concepts
presented here.
It should be emphasized that the stability of the closed loop system which
G
has transfer function
1+GH can be assessed by looking at a property the loop
gain which has transfer function GH , specically the phase margin.
The design of the compensator may be approached several ways. In this book
the use of Bode plots to shape the loop is demonstrated
s s
1+ ωz 1+ ω1
T (s) = A
s3
Using the methodology that has been developed to this point, the loop gain,
T (s) will be analyzed to determine whether the system is stable.
Negative
Gain
| T ( s) | Margin
Phase
Margin
−180o
A
√
ωc2 =1 or ωc = A = 17.3rad/s
ωc ωc
P M = 180o − 270o + tan−1 + tan−1
ωz ω1
17.3 17.3
P M = 180o − 270o + tan−1 + tan−1 = 20o
40 1
To determine the gain margin, the phase equation is used to determine the
frequency in which the phase is −180o .
ωm ωm
−180o = −270o + tan−1 + tan−1
ωz ω1
Inserting the computed value of ωm into the magnitude equation, the gain
margin is calculated as follows:
A 300
|T (jωm )| = 2
= = 7.5
ωm 6.322
Using MATLAB to verify the asymptotic bode plot, Figure 1.5 conrms the
phase and gain margin analysis, with a gain margin and phase margin error
of 1.1% and 6.1% respectively, due to the approximations of the asymptotic
magnitude plot.
With a positive phase margin, and a negative gain margin, additional criterion
are necessary to determine if the system is stable. Another method used to
determine the stability of a system is the Routh-Hurwitz stability criterion.
150
Magnitude (dB)
100
50
-50
-90
-135
Phase (deg)
-180
-225
-270
-2 -1 0 1 2 3
10 10 10 10 10 10
Frequency (rad/s)
1
Tcl (s) =
1 + T (s)
1
Tcl (s) =
s3 +A(1+ ωsz ) 1+ ωs
1
s3
s3
Tcl (s) =
s3 + ωzAω1 s2 + A ω1z + 1
ω1 s+A
Applying the system parameters, Figure 1.8 conrms that no sign changes
are present in the rst column. This conrms that the system is stable, while
having negative gain margin.
With the system conrmed as stable, the next item to explore is the possible
parameter shifting in the system that could cause the system to become unsta-
ble. From the derivations shown in Figure 1.7, the only term that could cause
a sign change in the rst column is the s1 term. Setting this term to zero and
solving for A:
A (ω1 + ωz )
− ω1 ωz = 0
ω1 ωz
1
A= = 39.024
ωz + ω1
| T (s) |
−180o
Figure 1.9: Bode Plot: System Loop Gain with parametric shift
A
Applying the new value of A to the magnitude equation,
ωc2 = 1 or ωc =
√
A = 6.25rad/s. With this frequency, the phase margin is calculated to be
−0.2o .
150
Magnitude (dB)
100
50
-50
-100
-90
-135
Phase (deg)
-180
-225
-270
-2 -1 0 1 2 3
10 10 10 10 10 10
Frequency (rad/s)
Figure 1.10: Matlab Analysis of phase and gain margin with parametric shift
Summary
This chapter has shown the reader how to apply asymptotic bode plots to
determine the stability of a system. The reader has also learned that in some
scenarios it may be necessary to use asymptotic bode plot analysis in conjunction
Student Version
with the Routh-Hurwitz stability criterion to determine the stability of of
a MATLAB
system.
1 clear all;
2 close all;
3
4 f = logspace(−3,3,10000);
5 w = 2*pi*f;
6 s = tf('s');
7
8 A = 300;
9 w1 = 1;
10 wz = 40;
11
12 %====================================================================
13 %System Loop Gain
14 %====================================================================
15 sys = A*(1+s/w1)*(1+s/wz)/(s^3);
16
17 figure(1)
18 [mag, phase] = bode(sys,w);
19 margin(mag, phase, w)
20
21 h = gcr;
22 xlim([10^−2 10^3]);
23 h.AxesGrid.TitleStyle.FontSize = 16;
24 h.AxesGrid.XLabelStyle.FontSize = 12;
25 h.AxesGrid.YLabelStyle.FontSize = 12;
26 %====================================================================
27
28
29 %====================================================================
30 %Plot Marginal Stability Per Routh Hurwitz
31 %====================================================================
32 A=39.024;
33
34 sys = A*(1+s/w1)*(1+s/wz)/(s^3);
35
36 figure(2)
37 [mag, phase] = bode(sys,w);
38 margin(mag, phase, w)
39
40 h = gcr;
41 xlim([10^−2 10^3]);
42 h.AxesGrid.TitleStyle.FontSize = 16;
43 h.AxesGrid.XLabelStyle.FontSize = 12;
44 h.AxesGrid.YLabelStyle.FontSize = 12;
45 %====================================================================
System Stability
2.1 Stability
Asymptotic stability means that, in the absence of energy coming into the sys-
tem's input, any stored energy in the system will asymptotically decay to zero
over time. A system is considered asymptotically stable if all of the proper
transfer function's poles have real components in the open left-half of the com-
plex plane (LHP). This means that the real part of any complex pole s = σ + jω
must be negative, i.e., σ < 0, for stability (since the open LHP means that the
jω axis is excluded). Therefore, a stable system cannot have poles on the jω
axis or in the right-half of the complex plane (RHP).
Bounded-input, bounded-output (BIBO) stability means that, in the absence
of stored energy in the system, any input signal that is bounded in magnitude,
i.e., −∞ < umin ≤ u(t) ≤ umax < ∞ will produce an output signal that is
bounded in magnitude, i.e., −∞ < ymin ≤ y(t) ≤ ymax < ∞. BIBO stability
exists if the integral of the absolute value of the impulse response is nite,
R∞
i.e.,
0
|g(τ )|dτ < ∞. In order to test BIBO stability, the impulse response
function g(t) must be determined for a given transfer function G(s) by applying
the inverse Laplace transform, an action that is not always trivial.
This text will focus on determining the asymptotic stability of a system, so
when a system is declared stable, it is referring to asymptotic stability.
15
All coecients of powers of s must have the same sign
If these three criteria are met, the characteristic equation is stable by inspec-
tion. If even one of these criteria is violated, the system is unstable. Third-order
and higher-order systems cannot have their stability evaluated by inspection.
s2 + 13s + 8
determine whether or not system is stable by inspection. Verify the result with
the MATLAB roots command.
The characteristic equation is second-order. The coecients of powers of s,
in descending order, are {1, 13, 8}, and are all non-zero. The sign on all of the
coecients of s is positive. Since all three criteria are met, the transfer function
is stable.
Check: since the characteristic polynomial was known, the roots command
was used in MATLAB to determine the poles were at [-12.3523 -0.6477], which
not only shows that all poles have real parts in the open left-half of the complex
frequency plane, but gives their locations as well.
Given a transfer function characteristic polynomial of:
s−9
determine whether or not system is stable by inspection. Verify the result with
the MATLAB roots command.
The characteristic equation is less than second-order. The coecients of
powers of s, in descending order, are {1, −9}, and are all non-zero. The sign
on the rst coecient is positive, but the second sign is negative indicating the
third requirement for stability by inspection is violated, therefore the transfer
function is unstable.
Check: since the characteristic polynomial was known, the roots command
was used in MATLAB to determine the poles were at [9], which shows that the
pole is real and in the right-half of the complex frequency plane.
Given a transfer function characteristic polynomial of:
4s2 + 3
determine whether or not system is stable by inspection. Verify the result with
the MATLAB roots command.
s+4−K
sn an an−2 an−4
n−1
s an−1 an−3 an−5
sn−2 b1 b2 b3
sn−3 c1 c2 c3
. . . .
. . . .
. . . .
s0 h1
By examination, the rst two rows are created using by alternating the coe-
cients of the characterstic polynomial, starting with the coecient of the highest
order of s in the rst column of the rst row. The entries in the third row and
beyond are calculated by using the coecients of previous rows. For example,
b1 is determined using the following calculation:
an an−2
−
an−1 an−3 an−1 an−2 − an an−3
b1 = =
an−1 an−1
The entry b2 is determined by:
an an−4
−
an−1 an−5 an−1 an−4 − an an−5
b2 = =
an−1 an−1
The entry c1 is determined by:
an−1 an−3
−
b1 b2 b1 an−3 − b2 an−1
c1 = =
b1 b1
Therefore, the general rule is:
The entry in row x + 2, column y is calculated by forming the negative of
the determinant formed using the entries from the previous two rows in column
1 and the previous two rows in column y + 1, then dividing it by the entry from
the previous row in column 1.
Once the Routh-Hurwitz array has been formed, the number of sign changes
in the leftmost column of the array indicates the number of poles in the open
right-half of the complex frequency plane, i.e., the number of unstable poles.
Given a transfer function with a characteristic polynomial of s4 + 3s3 + 4s2 +
6s + 1, form the Routh-Hurwitz array and determine whether or not the system
is stable. Verify the result with the MATLAB roots command.
The initial part of the array is formed as:
s4 1 4 1
s3 3 6 0
s2
s1
s0
1 4
−
3 6 3·4−1·6
b1 = = =2
3 3
The second element of the s2 row is calculated by:
1 1
−
3 0 3·1−1·0
b2 = = =1
3 3
The rst element of the s1 row is calculated by:
3 6
−
2 1 2·6−3·1
c1 = = = 4.5
2 2
The second element of the s1 row is calculated by:
3 0
−
2 0 2·0−3·0
c2 = = =0
2 2
Further calculations reveal the other s1 row elements are all zeros.
0
The rst element of the s row is calculated by:
2 1
−
4.5 0 4.5 · 1 − 2 · 0
d1 = = =1
2 4.5
Further calculations reveal the other s0 row elements are all zeros.
Thus, the full array is:
s4 1 4 1
s3 3 6 0
s2 2 1 0
s1 4.5 0 0
s0 1 0 0
Since no sign changes occur in the leftmost column, the system is stable.
Check: since the characteristic polynomial was known, the roots command
was used in MATLAB to determine the poles were at [-2.312 -0.251±j1.501,
-0.187], which not only shows that all poles have real parts in the open left-half
of the complex frequency plane, but gives their locations as well.
Once the Routh-Hurwitz array has been created, there are some special cases
that may occur that require handling.
s4 2 4 7
s3 3 6 0
s2 0 7 0
s1
s0
The s2 row becomes Row A. Shifting this once to the left, padding with
zeros, and multiplying by -1 (due to only one shift to the left) forms Row B =
[-7 0]. Adding Rows A and B together forms Row C = [-7 7]. This now goes into
the original array in place of Row A and the remaining elements are calculated
as indicated below.
s4 2 4 7
s3 3 6 0
s2 −7 7 0
s1 9 0 0
s0 7 0 0
Since there are two sign changes in the rst column, there are two poles in
the open right-half of the complex frequency plane, and the system is unstable.
Check: since the characteristic polynomial was known, the roots command
was used in MATLAB to determine the poles were at [0.384±j1.337, -1.134±j0.722],
which not only shows two poles whose real parts are in the open right-half of
the complex frequency plane, but gives all of the pole locations as well.
10
s3 + 9s2 + 23s + 15
form the Routh-Hurwitz array, then determine the range of K for which the
system is stable. Verify the result with the MATLAB roots command.
The closed-loop transfer function is:
10K
T (s) =
s3 + 9s2 + 23s + (15 + 10K)
The Routh-Hurwitz array is formed from the characteristic equation:
s3 1 23
s2 9 15 + 10K
9·23−1·(15+10K)
s1 9
s0 15 + 10K
Evaluation of the rst column terms indicates that 15+10K < 207 and
15+10K > 0. These two inequalities lead to a range for stable operation that
is -1.5 < K < 19.2.
Check: The characteristic polynomial with K = -1.5 is s3 + 9s2 + 23s.
The roots command was used in MATLAB to determine the poles were at
form the Routh-Hurwitz array, then determine the range of ∆ for which the
system is stable. Verify the result with the MATLAB roots command.
The Routh-Hurwitz array is formed from the characteristic equation:
s3 1 2
s2 3(1 + ∆) 6
s1 1 + 3∆
s0 6
Evaluation of the rst column terms indicates that 1 + 3∆ > 0. This in-
equality leads to a range for stable operation that is ∆ > −1 3 .
Check: The characteristic polynomial with ∆ = −1
3
3 2
is s + 2s + 2s + 4.
The roots command was used in MATLAB to determine the poles were at [-
√
2, 0±j 2]. Since there are a complex pole pair on the jω axis, the system is
unstable for this value of ∆. Thus, the range for stable operation is veried to
−1
be ∆> 3 .
The output of a system, y(t) can be decomposed into two components: 1) steady
state response, yss (t), and 2) transient response,ytr (t), so that
y (t) = yss (t) + y tr (t)
For a stable system the transient component will eventually die out, leaving just
the steady state response.
In this chapter we will examine the steady state response of feedback systems.
The desired steady state response will dictate the type of frequency compen-
sation than can be used for a specic system. Generally, the input(s) used in
assessing the steady state response is one or all of the following:
1
1. Step: r (t) = u(t), with R (s) = L {r (t)} = s
1
2. Ramp: r (t) = t, with R (s) = L {r (t)} = s2
The motivation for using these inputs may be seen by observing a Taylor series
expansion of a general input signal, r(t) (around point t = a):
dr 1 d2 r 2
r (t) = r (a) + (t − a) + (t − a) + . . .
dt t=a 2! dt2 t=a
= A0 + A1 t + A2 t 2 + . . .
Thus the step, ramp and parabolic inputs can be seen as the rst three order
terms of a general input signal.
23
1. H(s) = 1, i.e. unity gain feedback
As we have seen the closed loop gain of the system of Figure 3.1 is given by
Y (s) G (s)
=
R(s) 1 + G (s) H(s)
which can also be written as
G (s) H(s)
≈ 1, for |G (s) H (s)| 1
1 + G (s) H(s)
so that
Y (s) 1
≈ , for |G (s) H (s)| 1
R(s) H (s)
Of course, this is precisely the reason that feedback is used in the rst place.
Namely, for a large loop gain, the overall gain of the system can be controlled
by a highly stable gain H(s).
1
We consider the gain,
H(s) , as the ideal closed loop gain. Furthermore, the term
G(s)H(s)
1+G(s)H(s) , will be seen as a correction term, which deviates from unity at nite
values of loop gain.
The ideal output for a unity gain system is the input, i.e. Y (s) = R(s), since
Y (s) 1
R(s) = H(s) = 1. Any deviations of the output from the input, due to the
correction term, can be seen as the error. So that we can dene the error signal
as
E (s) = R (s) − Y (s)
In terms of the unity gain feedback structure, this is seen as the signal at the
input of the transfer function G (s).
To determine ess , the full response of a system, y (t), may be determined and
use of the above expression may be made. To illustrate this, let us consider a
1
feedback system with G (s) = s(s+2) (and H (s) = 1). The closed loop system
gain is given by:
Y (s) G (s)
=
R(s) 1 + G(s)
1
s(s+2)
= 1
1 + s(s+2)
1
= 2
(s + 1)
1
With a unit step input, R(s) = s , the output, Y (s), is given by
1 1
Y (s) = 2 ·
(s + 1) s
1 1 1
Y (s) = − −
s s + 1 (s + 1)2
We can identify the two components of the output response: yss (t) = 1, and
ytr (t) = −e−t − te−t .
Note however that it is more expeditious to use the Laplace Transform Final
Value Theorem to determine the steady state error, ess . The nal value theorem
states that for a signal e (t), for which, L {e (t)} = E(s), the nal value, ess , is
given by
ess = lim e(t) = lim sE(s)
t→∞ s→0
Given the error as dened above, in the Laplace domain:
This agrees with the previous result obtained using the full time response and
taking the limit as time goes to innity.
1 1
= lim s · 2
s→0 1 + G (s) s
" #
s(s + 2) 1
= lim s 2 ·
s→0 (s + 1) s2
=2
1 1
= lim s ·
s→0 1 + G (s) s3
" #
s(s + 2) 1
= lim s 2 ·
s→0 (s + 1) s3
=∞
To summarize, we see that the steady state error for the three inputs of unit step,
unit ramp and unit parabola exhibit values of 0, 2 (a nite value) and innity,
respectively. In general, it can be stated that there are two main factors which
impinge on the value of steady state error.
2. a property of the system, which is termed the system type. This is dened
next.
System Type:
The general form of the transfer function of a system is given as follows:
n(s)
G (s) =
d(s)
1
ess = lim s · R(s)
s→0 1 + G (s)
Substituting for G (s) from above we have
¯
sN · d(s)
ess = lim s
s→0 ¯ + n(s) · R(s)
sN · d(s)
1
Given inputs that are powers of
s , that is inputs of the form
1
R (s) =
si
where constant, i = 1, 2, 3 . . . , then the steady state error is given by
¯
d(s)
ess = lim N ¯ ·sN −i+1
s→0 s · d(s) + n(s)
Relating this back to our previous example with transfer function given by
1
G (s) =
s(s + 2)
We see that the system type number is 1, i.e. N = 1, as there is one pole at
s = 0. For a step input, i = 1, which corresponds to case (1) above leading to
ess = 0. For a ramp input, i = 2, this is case (2) (since N = 1) so that the
steady state error is given by
=2
Error Constants:
It is customary to dene steady state error in terms of system error constants.
These are the position error constant, Kp , the velocity error constant, Kv , and
the acceleration error constant, Ka . They are dened for a system G (s) as
follows:
Position error constant:
Kp , lim G(s)
s→0
Kv , lim sG(s)
s→0
Ka , lim s2 G(s)
s→0
The steady state error may be dened in terms of these constants. As we have
seen, in general
1
ess = lim s · R(s)
s→0 1 + G (s)
For the dierent inputs we have:
Step input:
1 1
ess = lim s ·
s→0 1 + G (s) s
1
=
1 + lims→0 G(s)
1
=
1 + Kp
Table 3.1: Steady State Error, ess , for systems of dierent type numbers, N,
and for dierent inputs.
A
1 ess = 0 ess = ess = ∞
Kv
A
2 ess = 0 ess = 0 ess =
Ka
We can now summarize the procedure to determine the steady state error of
unity gain feedback systems.
2. With the system and input types, the steady state error, ess , can be read
from Table 3.1 for most combinations or determined using the appropriate
error constant.
3.1.1 Example 1:
40
Consider a unity gain feedback system with G (s) = s+4 (and H (s) = 1).
a) Determine the steady state error for a unit step, unit ramp and unit
parabolic inputs using the results of Table 3.1.
b) Conrm your results of (a) by deriving the time domain response and
taking the limit in time.
Solution:
a) System type is N = 0, as there are no poles at s = 0. We can see the
steady state errors for the three inputs from the rst row of Table 3.1.
For both the ramp and parabolic inputs, we have ess = ∞. For the step
1
input, the steady state error is nite and given by ess = 1+K p
, where the
error constant, Kp , needs to be determined for this system.
It is given by
Kp , lim G(s)
s→0
40
= lim
s→0 s+4
= 10
Accordingly,
1
ess =
1 + Kp
1
=
1 + 10
= 0.0909
b) We'll now conrm the above results by deriving the time domain responses
for the three input types.
Y (s) G(s)
=
R (s) 1 + G(s)
40
s+4
= 40
1 + s+4
So that
Y (s) 40
=
R (s) s + 44
Step input:
1
With a step input, r (t) = u (t), so that, R(s) = s , the output, Y (s), is
given by
40 1
Y (s) = ·
s + 44 s
0.909 0.909
= −
s s + 44
So that
Ramp input:
1
For a ramp input, r (t) = t, so that, R(s) = s2 , the output, Y (s), is given
by
40 1
Y (s) = ·
s + 44 s2
A partial fraction expansion leads to
5 1 10 1 5 1
Y (s) = − · + · + ·
242 s 11 s2 242 s + 44
Parabolic input:
2
For a parabolic input, r (t) = 21 t , so that, R(s) = 1
s3 , the output, Y (s),
is given by
40 1
Y (s) = ·
s + 44 s3
By a partial fraction expansion we have
5 1 5 1 10 1 5 1
Y (s) = · − · 2+ · 3− ·
10648 s 242 s 11 s 10648 s + 44
The steady state error is given by
1
Y (s) = R(s)
H(s)
G(s)H(s)
This is considered the ideal output. The factor
1+G(s)H(s) is considered a cor-
rection term which causes the actual output to deviate from the ideal when the
loop gain, i.e. G (s) H(s), is nite.
However, as we are interested in the steady state response, the dc gain of H (s)
is used to dene the scaling constant. To this end we dene the term kH (with
the assumption that H (s) has no poles at zero):
1
ess = lim s R (s) − Y (s)
s→0 kH
Substituting the closed loop transfer function, M (s)
1
ess = lim s R (s) − M (s)R (s)
s→0 kH
1
= lim s {1 − kH M (s)}R (s)
kH s→0
where M (s) is given by
Y (s) G(s)
M (s) = =
R (s) 1 + G (s) H(s)
We now dene the system type number for the non-unity gain feedback system
as the number of zeros of the transfer function 1 − kH M (s) appearing at s = 0.
This, together with the type of input, R(s), are the major determinants of
the steady state error. Representing the transfer function, 1 − kH M (s), in the
following form:
sN · n̄(s)
1 − kH M (s) =
d(s)
where N represents the system type and the numerator, n (s) = sN · n̄(s)
N
1 s · n̄(s)
ess = lim s ·R(s)
kH s→0 d (s)
For inputs of the form R (s) = sAi , (such as for a step (i = 1), ramp (i = 2), and
parabolic inputs (i = 2)), the steady state error is given by
A n̄ (s)
ess = lim ·sN −i+1
kH s→0 d (s)
As before for the unity feedback system, we consider the following three cases:
Looking more closely at case (2), and represent M (s) by a rational polynomial:
bm sm + bm−1 sm−1 + · · · + b1 s + b0
M (s) =
sn + an−1 sn−1 + · · · + a1 s + a0
We are now in a position to determine the steady state errors for the various
inputs. Substituting for M (s) in the following expression for ess
1
ess = lim s · [1 − kH M (s)] · R (s)
kH s→0
for each of the three inputs leads to the following results:
Step input:
For a step input, i = 1, case (2) corresponds to a type 0 system, since N =
i − 1 = 0. Substituting R(s) = As leads to
n
1 s + · · · + (a1 − b1 kH ) s + (a0 − b0 kH ) A
ess = · lim s · ·
kH s→0 sn + an−1 sn−1 + · · · + a1 s + a0 s
A (a0 − b0 kH )
=
kH a0
Ramp input:
For a ramp input, i = 2, case (2) corresponds to a type 1 system, since N =
i − 1 = 1. Substituting R(s) = sA2 leads to
( )
1 s sn−1 + · · · + (a2 − b2 kH ) s + (a1 − b1 kH ) A
ess = · lim s · · 2
kH s→0 sn + an−1 sn−1 + · · · + a1 s + a0 s
A (a1 − b1 kH )
=
kH a0
Parabolic input:
For a parabolic input, i = 3, case (2) corresponds to a type 2 system, since
N = i − 1 = 2. Substituting R(s) = sA3 leads to
( )
1 s2 sn−2 + · · · + (a3 − b3 kH ) s + (a2 − b2 kH ) A
ess = · lim s · n n−1
· 3
kH s→0 s + an−1 s + · · · + a1 s + a0 s
A (a2 − b2 kH )
=
kH a0
Table 3.2: Steady State Error, ess , for systems of dierent type numbers, N,
and for dierent inputs for non-unity gain systems. kH , lims→0 H (s) = H(0)
(a1 − b1 kH )
A
1 ess = 0 ess =
kH a0 ess = ∞
(a2 − b2 kH )
A
2 ess = 0 ess = 0 ess =
kH a0
We can now summarize the procedure to determine the steady state error of
non-unity gain, as well as unity gain, feedback systems. A unity gain feed-
back systems error analysis using this approach is demonstrated in one of the
examples below.
Procedure to determine steady state error:
Given G (s) and H (s) and the type of input:
3. With the system type number and input type, the steady state error, ess ,
can be read from Table 3.2 for most combinations or determined using
the appropriate coecients of certain numerator and denominator terms
of M (s).
3.2.1 Example 2:
40
Given a feedback system with, G (s) = s+4 and H (s) = 0.5.
b) Conrm your results by deriving the full output time response and taking
the limit as time goes to innity. Recall that steady state error is dened
1
as the dierence between the ideal steady state output, i.e.
kH r(t), and
the actual output, y(t), so that
1
ess = lim r (t) − y(t)
t→∞ kH
Solution:
a) Steps:
40
s+4
M (s) = 40
1 + 0.5 · s+4
40
=
s + 24
Furthermore
40
1 − kH M (s) = 1 − 0.5 ·
s + 24
s+4
=
s + 24
Y (s) 40
= M (s) =
R (s) s + 24
1
For a unit step input, R (s) = s,
−1 40 1
y (t) = L ·
s + 24 s
1.667 1.667
y(t) = L−1 −
s s + 24
= 1.667 − 1.667e−24t
where yss (t) = 1.667 and ytr (t) = −1.667e−24t . The transient term ytr (t)
will decay to zero as time progresses. The steady state error is dened by
1
ess = lim r (t) − y(t)
t→∞ kH
1
= lim r (t) − [y ss (t) + ytr (t)]
t→∞ kH
The transient response will die out to zero so ignoring the transient com-
ponent in the output, we have:
1
ess = lim r (t) − yss (t)
t→∞ kH
1
= − 1.667
0.5
= 0.33
Figure 3.4: The time evolution of the error. The error signal settles to 0.33 in
the steady state.
Ramp input:
1
For a unit ramp input, R (s) = s2 , the output is given by
where yss (t) = −0.069 + 1.667t and ytr (t) = −0.069e−24t . The transient
term ytr (t) will decay to zero as time progresses, so ignoring the transient
component in the output, we have:
1
ess = lim r (t) − yss (t)
t→∞ kH
Parabolic input:
1
For unit parabolic input, R (s) = s3 ,
−1 40 1
y (t) = L ·
s + 24 s3
Obtaining a partial fraction expansion
−10.0029 0.069 1.667 0.0029
y(t) = L − 2 + 3 −
s s s s + 24
t2
= 0.0029 − 0.069t + 1.667 − 0.0029e−24t
2
1 t2 t2
ess = lim · − [0.0029 − 0.069t + 1.667 ]
t→∞ 0.5 2 2
t2
= lim −0.0029 + 0.069t + 0.333
t→∞ 2
=∞
3.2.2 Example 3:
40
Given a feedback system with, G (s) = s+4 and H (s) = 1.
a) Find the steady state error, ess , for unit step, ramp and parabolic inputs.
b) Conrm your result for the input that produces a nite (non-zero) steady
state error by deriving the full output time response and taking the limit
as time goes to innity.
Solution:
a) Steps:
40
s+4
M (s) = 40
1 + s+4
40
=
s + 44
and
40
1 − kH M (s) = 1 − 1 ·
s + 44
s+4
=
s + 44
From which we can see that the system type = 0, as there are no
zeros at s = 0.
Y (s) 40
M (s) = =
R (s) s + 44
1
For a unit step input, R (s) = s , and the output is
−1 0.909 0.909
y(t) = L −
s s + 44
= 0.91 − 0.91e−44t
where yss (t) = 0.91 and ytr (t)=−0.91e−44t . The steady state error is
given by:
1
ess = lim r (t) − yss (t)
t→∞ kH
a) Find the steady state error, ess , for unit step, ramp and parabolic inputs.
b) Conrm your results for step and ramp inputs by deriving the full output
time response and taking the limit as time goes to innity.
Solution:
a) Steps:
2
1) As H (s) = s+4 , the constant kH , lims→0 H (s) = H (0) = 24 = 0.5.
G(s)
2) The closed loop gain M (s) = 1+G(s)H(s) so that
1
s
M (s) = 1 2
1+ s · s+4
s+4
= 2
s + 4s + 2
and
s+4
1 − kH M (s) = 1 − 0.5 ·
s2 + 4s + 2
s(s + 3.5)
= 2
s + 4s + 2
From which we can see that the system type = 1, as there is one zero
at s = 0.
3) With a system type of 1, from the second row of Table 3.2 we see
that ess = 0 and ess = ∞ for step and parabolic inputs, respectively.
For a unit ramp (with A = 1), the error is given by
1 (a1 − b1 kH )
ess =
kH a0
Noting the numerator and denominator coecients of M (s) we see
that a0 = 2, a1 = 4, b1 = 1 and with kH = 0.5, we nd that ess = 3.5.
b) We will conrm this last result from the full time domain response for a
ramp input (R (s) = s12 ).
Y (s) s+4
M (s) = = 2
R (s) s + 4s + 2
−1 3.5 2 1.78 3.52
y(t) = L − + 2− +
s s s + 3.41 s + 0.586
= −3.5 + 2t − 1.78e−3.41t + 3.52e−0.586t
Where the rst two terms represent the steady state response, i.e. yss (t) =
−3.5 + 2t and the last two terms represent the transient response, i.e.
ytr (t) = −1.78e−3.41t + 3.52e−0.586t .
For a unit ramp, r (t) = t, the steady state error is given by:
1
ess = lim r (t) − yss (t)
t→∞ kH
1
= t − (−3.5 + 2t)
0.5
= 3.5
Figure 3.5 shows the ideal and actual outputs as a function of time. The
dierence is the error. The error as a function of time is shown in Figure
3.6, where it is seen that it converges to its steady state value of 3.5 after
10 seconds.
Figure 3.6: The error is seen to reach its steady state value of 3.5 after 10
seconds.
Step input:
We will now conrm the steady state error result for a unit step input
2 0.061 2.06
y(t) = L−1 + −
s s + 3.41 s + 0.586
= 2 + 0.061e−3.41t + 2.06e−0.586t
Where the rst term represents the steady state response, i.e. yss (t) = 2,
and the remaining two terms represent the transient response, i.e. ytr (t) =
0.061e−3.41t + 2.06e−0.586t .
For a unit step input, r (t) = 1, t > 0, the steady state error is given by:
1
ess = lim r (t) − yss (t)
t→∞ kH
1
= ·1−2
0.5
=0
3.2.4 Example 5:
1 4
Given a feedback system with, G (s) = s and H (s) = s+4 .
a) Find the steady state error, ess , for unit step, ramp and parabolic inputs.
b) Conrm your results for the step and ramp inputs by deriving the full
output time response and taking the limit as time goes to innity.
Solution:
a) Steps:
4
1) As H (s) = s+4 , the constant kH , lims→0 H (s) = H (0) = 44 = 1.
1
s
M (s) = 1 4
1+ s · s+4
s+4
= 2
(s + 2)
and
s+4
1 − kH M (s) = 1 − 1 · 2
(s + 2)
s(s + 3)
= 2
s + 4s + 4
s(s + 3)
= 2
(s + 2)
3) With a system type of 1, from the second row of Table 3.2 we see
that ess = 0 and ess = ∞ for step and parabolic inputs, respectively.
For a unit ramp, (with A = 1), the error is given by
1 (a1 − b1 kH )
ess =
kH a0
Noting coecients of the numerator and denominator of M (s) we
have, a0 = 4, a1 = 4, b1 = 1 and with kH = 1, we nd, ess = 0.75.
b) We will conrm this last result by deriving the full time domain response
for a ramp input (R (s) = s12 ).
Y (s) s+4
M (s) = = 2
R (s) (s + 2)
Where the rst two terms represent the steady state response, i.e. yss (t) =
−0.75 + t, and the remaining two terms represent the transient response,
−2t
i.e . ytr (t) = 0.75e + 0.5te−2t .
For a unit step ramp, r (t) = t, the steady state error is given by:
1
ess = lim r (t) − yss (t)
t→∞ kH
= lim {t − (−0.75 + t)}
t→∞
= 0.75
Step input:
We will now conrm the steady state error result for a unit step input
(R (s) = 1s ) by deriving the full time domain response:
Y (s) s+4
M (s) = = 2
R (s) (s + 2)
We have the output
a) Find the steady state error, ess , for unit step, ramp and parabolic inputs.
b) Conrm your results for a unit ramp input by deriving the full output
time response and taking the limit as time goes to innity.
Solution:
a) Steps:
8(s+1)
1) As H (s) = s+4 , the constant kH = lims→0 H (s) = H (0) = 84 = 2.
G(s)
2) The closed loop gain, M (s) = 1+G(s)H(s) , so that
1
s2 (s+10)
M (s) = 8(s+1)
1
1+ s2 (s+10) · s+4
s+4
=
s4 + 14s3 + 40s2 + 8s + 8
and
s+4
1 − kH M (s) = 1 − 2 ·
s4 + 14s3 + 40s2 + 8s + 8
3) With a system type of 1, from the second row of Table 3.2 we see
that ess = 0 and ess = ∞ for step and parabolic inputs, respectively.
For a unit ramp (with A = 1), the error is given by
1 (a1 − b1 kH )
ess =
kH a0
Noting coecients of the numerator and denominator of M (s) we
have, a0 = 8, a1 = 8, b1 = 1 and with kH = 2, we nd ess = 0.375
b) We will conrm this last result by deriving the full time domain response
for a ramp input (R (s) = s12 ). Since
Y (s) s+4
M (s) = = 4
R (s) s + 14s3 + 40s2 + 8s + 8
A note at the end of this chapter is provided that illustrates how a complex
conjugate pole pair and their associated complex conjugate residues may
be converted to a cos/sin representation, as shown above.
where the rst two terms represent the steady state response, i.e. yss (t) =
−0.375 + 0.5t, and the remaining terms represent the transient response.
This leads to
1
ess = lim r (t) − yss (t)
t→∞ kH
1
= lim t − (−0.375 + 0.5t)
t→∞ 2
= 0.375
Figure 3.7 show the time evolution of the error, which attains a steady
state value of 0.375.
3.2.6 Example 7:
1 4(s+1)
Given a feedback system with, G (s) = s2 (s+10) and H (s) = s+4 .
a) Find the steady state error, ess , for unit step, ramp and parabolic inputs.
b) Conrm your results for a unit ramp input by deriving the full output
time response and taking the limit as time goes to innity.
Solution:
a) Steps:
4(s+1)
1) As H (s) = s+4 , the constant kH , lims→0 H (s) = H (0) = 44 = 1.
G(s)
2) The closed loop gain M (s) = 1+G(s)H(s) so that
1
s2 (s+10)
M (s) = 4(s+1)
1
1+ s2 (s+10) · s+4
s+4
=
s4 + 14s3 + 40s2 + 4s + 4
and
s+4
1 − kH M (s) = 1 − 1 ·
s4 + 14s3 + 40s2 + 4s + 4
3) With a system type of 1, from the second row of Table 3.2 we see that
ess = 0 and ess = ∞ for both step and parabolic inputs, respectively.
For a unit ramp (with A = 1), the error is given by
1 (a1 − b1 kH )
ess =
kH a0
Noting coecients of the numerator and denominator of M (s) we
have, a0 = 4, a1 = 4, b1 = 1and with kH = 1, we nd ess = 0.75.
b) We will conrm this last result by deriving the full time domain response
1
for a unit ramp input (R (s) = s2 ).
Y (s) s+4
M (s) = = 4
R (s) s + 14s + 40s2 + 4s + 4
3
9.62·10−5 9.1·10−5
0.75 1
y(t) = L−1 − + 2+ +
s s s + 10 s + 3.875
0.375 + j1.53 0.375 − j1.53
+ +
s + 0.033 − j0.32 s + 0.033 + j0.32
This leads to
1
ess = lim r (t) − y (t)
t→∞ kH
= lim {t − (−0.75 + t)}
t→∞
= 0.75
3.2.7 Example 8:
This nal example will illustrate both the non-unity gain and unity gain feedback
methods in assessing steady state error.
4(s+1)
Given a feedback system with, G (s) = s2 (s+10)(s+4) and H (s) = 1.
a) Find the steady state error, ess , for unit step, ramp and parabolic inputs.
b) Conrm your results for a unit ramp input by deriving the full output
time response and taking the limit as time goes to innity.
Solutions:
Non unity gain method:
a) Steps:
4s + 4
=
s4 + 14s3 + 40s2 + 4s + 4
and
4s + 4
1 − kH M (s) = 1 − 1 ·
s4 + 14s3 + 40s2 + 4s + 4
3) With a system type of 2, from the second row of Table 3.2 we see
that ess = 0 and ess = 0 for both step and ramp inputs, respectively.
For a unit parabola (with A = 1), the error is given by
1 (a2 − b2 kH )
ess =
kH a0
Noting coecients of the numerator and denominator of M (s) we
have, a0 = 4, a2 = 40, b2 = 0 and with kH = 1, we nd ess = 10.
b) We will conrm this result by deriving the full time domain response for
1
a unit parabolic input (R (s) = s3 ).
Y (s) 4s + 4
M (s) = = 4
R (s) s + 14s3 + 40s2 + 4s + 4
5.72·10−5 2.15·10−3
−1 10 1
y(t) = L − + 3− +
s s s + 10 s + 3.875
5 − j0.53 5 + j0.53
+ +
s + 0.033 − j0.32 s + 0.033 + j0.32
t2
= −10 + + 5.7·10−5 e−10t + 2.15·10−3 e−3.875t
2
+ 10e−0.033t cos (0.32t) + 1.06e−0.033t sin (0.32t)
Where the rst two terms represent the steady state components (i.e.
t2
yss (t) = −10 + 2 ) and the remaining terms represent the transient re-
sponse which will decay to zero as time progresses.
This leads to
1
ess = lim r (t) − y (t)
t→∞ kH
2
t2
t
= lim − (−10 + )
t→∞ 2 2
= 10
1
Figure 3.9 shows the time evolution of output, both the ideal, i.e.
kH r (t),
and the actual outputs. However, due the axis scaling involved the outputs
appear as identical. By looking closely at a small portion of the output
responses the dierence between the ideal and actual outputs can be seen.
This is shown in Figure 3.10 where the dierence can be seen to have a
value of 10, which represents the steady state error. Figure 3.11 shows the
time evolution of the error.
Figure 3.10: The dierence between the ideal and actual outputs can be seen
here when looking at a small portion of the time response. The dierence seen
above has a value of 10, the steady state error.
Following the procedure given for unity gain feedback system, we rst determine
the system type by noting the number of poles appearing at s=0 of transfer
function G (s) . The type number = 2. Consulting Table 3.1 across the third
row of this table which corresponds to a system of type number 2, it can be
seen that ess = 0 for both the step and ramp inputs and that for a parabolic
input, ess = K1a , (for A = 1) where Ka is the acceleration error constant given
by Ka = lims→0 s2 · G(s)
4(s + 1)
Ka = lim s2 ·
s→0 s2 (s + 10)(s + 4)
1
=
10
Therefore the steady state error is
1
ess =
Ka
= 10
k1∗
k1 a + jb a − jb
L−1 + = L−1
+
s − p1 s − p∗1 s − α − jβ s − α + jβ
−1 (a + jb) (s − α + jβ) + (a − jb) (s − α − jβ)
=L
(s − α − jβ)(s − α + jβ)
" #
2a (s − α) − 2bβ
= L−1 2
(s − α) + β 2
" # " #
−1 (s − α) −1 β
= 2aL 2 − 2bL 2
(s − α) + β 2 (s − α) + β 2
Bode Plots
Introduction
In the following we will present magnitude and phase asymptotic approxima-
tions to a number of basic transfer functions. The value of these asymptotic
approximations is that simplied mathematical expressions may be used to pre-
cisely describe the asymptote. In the case of the magnitude characteristic it
is generally displayed with magnitude in dB versus frequency presented on a
log scale. When plotted using these scales, it can be well approximated using
straight line asymptotic segments. It is these segments that exact formulas may
be presented. Note however that annotations on the magnitude plot use the
absolute value rather than the relative value which the dB value represents.
Magnitude in dB is obtained by:
The phase plot is represented by phase angle in degrees versus log frequency.
The phase plot of a transfer function is obtained by setting
√ s = jω where
j= −1, and where ω represents the angular radian frequency. In sections of
ω
this book, we will prefer to use f= 2π when dealing with actual frequencies.
H (s) = A (4.3)
59
In this case the asymptotic and exact magnitude and phase characteristics
are the same and are shown in gure 4.1. As just mentioned above, note that the
magnitude line is annotated with its absolute value, rather than its dB value.
|H(s)|
A
0◦
H(s)
Figure 4.1: Simple Gain
A
H (s) = (4.4)
s
This transfer function is that of an integrator. The case of a nite pole
frequency dierent than zero is tackled below. The asymptotic magnitude and
phase plots are shown in gure 4.2. With reference to this gure, we can in-
terpret the parameter A as the gain of the transfer function at the angular
frequency of ω = 1.
A
ω
A
|H(s)| −20dB/dec
ω=1
−90◦
H(s)
Figure 4.2: Pole at Zero
ωo
ω
1
|H(s)| −20dB/dec
ω = ωo
Figure 4.3: Pole at Zero
H (s) = As (4.5)
+20dB/dec
|H(s)| A
Aω
ω=1
+90◦
H(s)
Figure 4.4: Zero at Zero
+20dB/dec
|H(s)| 1 ω
ωo
ω = ωo
Figure 4.5: Zero at Zero
4.4 Pole at ωo
The next transfer function considered is that of a single pole at a frequency
of ωo , as given by:
A
H (s) = (4.6)
1 + ωso
The asymptotic magnitude and phase plots are shown in gure 4.6.
A 3dB
Aωo
ω
|H(s)|
ωo
−20dB/dec
◦ 10
0
−45◦
H(s) −45◦ /dec
−90◦
ωo 10ωo
Figure 4.6: Pole at ωo
s
H (s) = A 1 + (4.7)
ωo
The asymptotic magnitude and phase plots are shown in gure 4.7.
Aω
|H(s)| 3dB
ωo
A +20dB/dec
10ωo +90◦
H(s) +45◦
0◦ +45◦ /dec
ωo
10 ωo
Figure 4.7: Zero at ωo
s
H (s) = A 1 − (4.8)
ωo
The asymptotic magnitude and phase plots are shown in gure 4.8.
A
H (s) = 2 (4.9)
s s
1+ Qωo + ωo
The asymptotic magnitude and phase plots are shown in gure 4.9.
A +20dB/dec
ωo
0◦ 10
−45◦
H(s) −45◦ /dec
−90◦
10ωo
ωo
Figure 4.8: Right Half Plane Zero at ωo
AQ
A
A( ωωo )2
|H(s)|
1
−40dB/dec
10− 2Q ωo
0◦
H(s)
−90◦
ωo
Figure 4.9: Second Order Complex Pole at ωo
40dB/dec
|H(s)| A( ωωo )2
Q
A
A
Q
1
10 2Q ωo
180◦
Q × 180◦ /dec
H(s)
90◦
0◦
1
10− 2Q ωo
ωo
Figure 4.10: Second Order Complex Zero at ωo
T
T (s) = o (4.11)
1 + ωs1 1 + ωs2 1+ s
ω3
where
To 1 1
T (s) = (4.12)
s s
1+ ω1 1+ ω2 1 + ωs3
| {z } | {z } | {z }
Ta (s) Tb (s) Tc (s)
We will rst construct the magnitude plot. Figure 4.11a shows the asymptotic
response for each of the components. Note that the magnitude annotations are
given in absolute terms so that the composite magnitude is simply the product
of the constituent magnitudes in the relevant frequency interval. In contrast, the
slopes expressed in dB are simply added together. The result of the composite
magnitude is shown in gure 4.11b.
Similarly the constituent phase response is shown in gure 4.12a; and com-
posite phase plot is shown in gure 4.12b.
The nal form of the asymptotic Bode plot is given in its customary form
with magnitude response place above the phase response, shown in gure 4.13.
−20dB/dec
1 f2
|Tb (s)| f
−20dB/dec
1 f3
|Tc (s)| f
−20dB/dec
b) To To f1
f
To f1 f2
f2
|T (s)|
−20dB/dec
T o f1 f2 f3
f3
−40dB/dec
−60dB/dec
Figure 4.11: a) Asymptotic magnitude plots for the constituent transfer func-
tions, b) Asymptotic magnitude plot for the composite transfer function
−45◦ /dec
−90◦
◦
0
Tb (s) −arctan( ff2 )
−45◦ /dec
◦
−90◦
0
Tc (s) −arctan( ff3 )
−45◦ /dec
0◦
b)
−90◦
T (s) −45◦ /dec
−90◦ /dec
−135◦ /dec
−90◦ /dec
−270◦
◦
−45 /dec
Figure 4.12: a) Asymptotic phase plots for the constituent transfer functions,
b) Asymptotic plot plot for the composite transfer function
−60dB/dec
0◦
b)
−90◦ /dec
−135◦ /dec
−90◦ /dec
−270◦
−45◦ /dec
f1 f2 f3
10 10
10f1 f3 10f2 10f3
10
Compensator Design
To demonstrate the design procedure, in the sequel we will use a plant and
feedback gain with the following transfer functions:
Go
G (s) = (5.1)
s
1+ ω1 1 + ωs2 1+ s
ω3
H (s) = k (5.2)
73
The compensators considered in the sequel are the following:
1) Proportional (P) compensator:
Gc (s) = kp (5.3)
ωI
Gc (s) = (5.4)
s
3) Dominant pole with zero (PI, proportional plus integrator) compensator:
ωI s
Gc (s) = 1+ (5.5)
s ωz
4) Lead compensator:
s
1+ ωz
Gc (s) = Gco s , ωz < ωp (5.6)
1+ ωp
s s
ωI 1 + ωz1 1+ ωz2
Gc (s) = (5.7)
s 1 + ωsp
T
T (s) = o (5.8)
s
1+ ω1 1 + ωs2 1+ s
ω3
where
−60dB/dec
0◦
b)
T (s) −45◦ /dec
−90◦ /dec
−135◦ /dec
−180◦
Negative
Phase
Margin
◦
−90 /dec
−270◦
◦
−45 /dec
To f1 f2 f3 p
3
= 1 =⇒ fc = To f1 f2 f3 (5.9)
fc3
fc fc fc
P M = 180 − arctan − arctan − arctan (5.10)
f1 f2 f3
In a similar fashion we can also determine fGM , the frequency at which the
phase reaches −180◦ , and subsequently the gain margin:
fGM fGM fGM
−180 = − arctan − arctan − arctan (5.11)
f1 f2 f3
To f1 f2
GM = −20 log 2 (5.12)
fGM
Evaluating 5.11 and 5.12 results in fGM = 184 Hz and GM = −17.3 dB,
respectively.
Figure 5.3 is a Matlab Bode plot of the uncompensated loop gain produced
using the 'margin' command. Matlab uses the unapproximated transfer func-
tion models and so is able to accurately determine the margins and associated
frequencies: fc = 385 Hz, P M = −36.1◦ , fGM = 184 Hz and GM = −14.8 dB.
A side by side comparison of these results with those from the asymptotic line
analysis is shown in Table 5.1.
The phase margin test indicates that the uncompensated closed loop system is
unstable. A Matlab time domain simulation of the step response of the uncom-
pensated system is shown in Figure 5.4. The output quickly becomes unbounded
for the unit step input indicative of an unstable system. So compensation is
needed to make the system stable and further to improve the performance.
−50
−100
0
Phase (deg)
−90
−180
−270
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
79
x 10 Uncompensated System
6
0
Magnitude
−2
−4
−6
−8
−10
0.325 0.33 0.335 0.34 0.345
Time (sec)
Gc (s) = kp (5.13)
kp simply represents a constant gain. Note that the eect of varying the value
of kp is to raise and lower the magnitude Bode plot while keeping the phase
plot unaected. So the value of kp can be set to obtain a unity gain crossover
frequency (fc ) which results in an acceptable phase margin.
Generally the design procedure would require that asymptotic Bode plots
for the now compensated loop gain be constructed, however, in the case of a
proportional compensator, since the shape of the plots (magnitude and phase)
are unchanged we need simply to replace any occurrences of the To with kp T o
in Figure 5.2 and proceed accordingly.
kp To f1
= 1 =⇒ fc = kp To f1 (5.14)
fc
We can substitute the above equation for fc into the phase margin equation
shown next to determine the required value of kp .
fc fc fc
P M = 180 − arctan − arctan − arctan
f1 f2 f3
kp To f1 kp To f1
= 180 − arctan (kp To ) − arctan − arctan (5.15)
f2 f3
With a desired value of phase margin of P M = 45◦ equation (5.15) evaluates
to kp = 0.0311 and fc = 77.65.
−50
−100
−150
0
Phase (deg)
−90
−180
−270
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
Proportional Compensation
2.5
1.5
Magnitude
0.5
0
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035
Time (sec)
Proportional Compensation
Characteristics Value
Overshoot 20 %
Rise time 2.9 ms
Settling time 15.4 ms
Steady-state error −11 %
Bandwidth 63 Hz
Phase margin 55◦
Gain margin 15 dB
ωI
Gc (s) =
s
where ωI = 2π · fI is an appropriately chosen design constant. It represents
the frequency (in Hz) at which the compensator gain is at unity. Figure 5.7
shows the Bode plot asymptotes for the magnitude and phase of this compen-
sator.
Figure 5.8 shows the graphical construction of the phase asymptotes for the
loop gain with the compensator. Note that because the plant's transfer func-
tion is third order (with no zeros), it features a phase shift of −270◦ at high
frequencies. Also, since the next higher frequency f2 ≥ 10 · f1 the phase shift
at f1 is −45◦ . Furthermore, the compensator contributes its own −90◦ phase
shift and does so for all frequencies. Consequently, the total phase shift of the
| ωsI |
−20dB/dec
1 ⇒ 0dB
fI
ωI
s −90◦
Figure 5.7: Bode Plot: Dominant Pole Compensator
Figure 5.9 shows how the plant and compensator transfer functions combine
to produce the magnitude response of the compensated loop. To achieve a phase
margin that is +45◦ , we require the magnitude at f1 to equal 1 (0dB), therefore
fc = f1 .
fI To
=1
f1
f1 10
fI = = = 0.04
To 250
The dominant pole compensator in this case is:
ωI 2π · 0.04
Gc (s) = =
s s
Figure 5.10 shows resulting gain and phase asymptotic construction of the
Bode plot. We next run the full unapproximated compensated loop transfer
function through the Matlab 'margin' command to verify the design results.
Figure 5.11 shows the results obtained. In particular, a phase margin of PM =
45.9◦ with a unity gain crossover frequency fc = 7.84 Hz was obtained, which
◦
compares favorably with the design values of P M = 45 and fc = f1 = 10 Hz.
Figure 5.12 shows the unit step response of the dominant pole compensated
closed loop system. It is clearly seen that zero steady state response has been
attained but not without going through signicant overshoot rst. The features
of the closed loop system are summarized in the Table 5.3.
ωI s
Gc (s) = 1+
s ωz
where
ωz = ω1
The compensated loop gain T (s) = kGc (s)G(s) with this compensator now
becomes:
To ωI
T (s) =
s s
s 1+ ω2 1+ ω3
=⇒ fc = To fI (5.16)
f f
φf = −90 − arctan − arctan (5.17)
f2 f3
Consequently the phase margin is given by:
P M = 180 + φfc
fc fc
= 90 − arctan − arctan
f2 f3
To fI To fI
= 90 − arctan − arctan (5.18)
f2 f3
To verify the design procedure the unapproximated loop gain transfer function
is run through the Matlab 'margin' command which produces the plot shown
in Figure 5.15. The obtained phase margin and bandwidth are seen to be
P M = 51◦ and fc = 56 Hz. The bandwidth has been greatly improved.
The unit step response of the closed loop system is shown in Figure 5.16. A
summary of the performance using this compensator is shown in Table 5.4.
Overshoot 22.2%
Rise time 3.05 ms
Settling time 16.7 ms
Steady-state error 0 %
Bandwidth 62.3 Hz
Phase margin 46.3 degree
Gain margin 14.5 dB
Using the same compensator as in the previous section, we will now redesign
it to achieve a phase margin of 60◦ . The zero frequency is left unchanged, so
that fz = f1 , but a new value of fI will be determined to achieve the desired 60◦
phase margin. Solving equation (5.18), now with P M = 60 we see the required
value of fI = 0.1636 so that ωI = 2πfI = 1.0276.
To verify the design the Bode plot of the loop gain was produced using the
'margin' command in Matlab. This plot is shown in gure 5.17. We see that
a phase margin of 62◦ was achieved with a bandwidth of 37.9 Hz. Of course
the extension in phase margin is necessarily accompanied by a reduction in
bandwidth.
The step response of the closed loop system is shown in Figure 5.18. The
resulting performance characteristics are tabulated in the Table 5.5. There we
see that the overshoot has been reduced to 4.46%. Recall that a phase margin of
45◦ had previously resulted in a 17% overshoot. This reduction in overshoot has
been attained at the expense of an increase in rise time. However, the settling
time has been slightly reduced.
Table 5.5: Dominant Pole with Zero (Improved PM) Compensated System Fea-
tures
Overshoot 4.46 %
Rise time 5.81 ms
Settling time 16.5 ms
Steady-state error 0
Bandwidth 35.1 Hz
Phase margin 64 degree
Gain margin 20.6 dB
s
1+ ωz
Gc (s) = Gco s , ωz < ωp (5.19)
1+ ωp
p
fφmax = fz fp (5.20)
When the compensator is placed in the loop, the loop gain of the system now
becomes:
To Gco 1 + ωsz
T (s) =
1 + ωsp 1 + ωs1 1 + ωs2 1+ s
ω3
P M = 180 + φfc
fc fc fc
= 180 + arctan − arctan − arctan
fz fp f1
fc fc
− arctan − arctan (5.22)
f2 f3
As mentioned previously, we will set the unity gain crossover frequency fc
to the maximum phase boost frequency fφmax so that using equation (5.20) we
have:
fc = fφmax
p
= fz fp (5.23)
In order to minimize the eect on the phase margin of the phase lag due
to the compensator pole we will set this pole frequency an order of magnitude
above the crossover frequency:
fp = 10fc (5.24)
fp = 100fz (5.25)
We can use the zero frequency of the compensator to cancel the pole fre-
quency f2 of the plant, so that fz = f2 . This together with equations (5.25)
and (5.22) may be used to determine the unity gain crossover frequency, fc , for
a given desired phase margin. For a margin of 60◦ we nd fc = 187 Hz.
From the magnitude asymptote we see that
To Gco f1
=1 (5.26)
fc
so that for a given fc we can solve for the required compensator low frequency
gain Gco :
fc
Gco = (5.27)
To f1
For our design we obtain a value of Gco = 0.0749.
The unit step response of the closed loop system with this compensation is
shown in gure 5.23. The features of the step response are presented in the
Table 5.7. We see, due to the extended bandwidth, that the speed of response,
represented by the rise and settling times is quite good. Percentage overshoot
is also relatively low due to the 60◦ phase margin employed. However, as there
is no longer an integrator in the forward path, the steady state error is now
non-zero. This will be remedied in the next and nal compensator design.
Lead Compensation
Feature Value
Overshoot 4.23 %
Rise time 2.25 ms
Settling time 6.29 ms
Steady-state error 10%
Bandwidth 83.8 Hz
Phase margin 71.2◦
Gain margin 19.3 dB
s s
ωI 1 + ωz1 1+ ωz2
Gc (s) = (5.28)
s 1 + ωsp
fI
= Gco =⇒ fI = Gco f1 (5.29)
f1
This completes the design of this compensator. To verify our design we
produce the plot using the Matlab 'margin' command on the unapproximated
transfer functions of the compensated loop. This is show in gure 5.24. There
we nd that the obtained phase margin is P M = 60◦ with fc = 164 Hz, which
very closely agrees with the results obtained for the lead compensator.
Next, we exam the step response of the closed loop system which is shown in
5.25. It is clear that now we have zero steady state error. Further performance
features are given in the table below.
Overshoot 4.23 %
Rise time 2.25 ms
Settling time 6.29 ms
Steady-state error 10%
Bandwidth 83.8 Hz
Phase margin 71.2◦
Gain margin 19.3 dB
5.1.9 Summary
The following table shows the summary of all of the results.
−45◦ /dec
T (s)U N COM P
−90◦ /dec
−135◦ /dec
−180◦
b) −90◦ /dec
−270◦
ωI −45◦ /dec
s −90◦
−90◦
c)
T (s) −45◦ /dec
−90◦ /dec
−135◦ /dec
−270◦
−90◦ /dec
−360◦
◦
−45 /dec
−60dB/dec
b) fI
f
1 ⇒ 0dB
| ωsI | fI
−20dB/dec
To fI
c) f
1 ⇒ 0dB
−20dB/dec To f1 fI
f2
|T (s)| T o f1 f2 fI
f3
−40dB/dec
−60dB/dec To f1 f2 f3 fI
f4
−80dB/dec
1 ⇒ 0dB
−20dB/dec To f1 fI
f2
|T (s)| T o f1 f2 fI
f3
−40dB/dec
To f1 f2 f3 fI
−60dB/dec f4
−80dB/dec
−90◦
c)
T (s) −45◦ /dec
Phase
Margin
−180◦
−90◦ /dec
−135◦ /dec
−270◦
−90◦ /dec
−360◦
◦
−45 /dec
−100
−150
−200
−90
Phase (deg)
−180
−270
−360
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
1.5
Magnitude
0.5
0
0 0.05 0.1 0.15 0.2 0.25 0.3
Time (sec)
−60dB/dec
b) fI
f
fI
|GC (s)| f1
−20dB/dec
c) To fI
f
−20dB/dec
T o fI f2
f2 1 ⇒ 0dB
|T (s)| T o fI f2 f3
f3
−40dB/dec
−60dB/dec
−20dB/dec
To fI f2
f2 1 ⇒ 0dB
|T (s)| To fI f2 f3
f3
−40dB/dec
−60dB/dec
b) −90◦
−45◦ /dec
T (s)
Phase
Margin
◦
−180
−90◦ /dec
−270◦
◦
−45 /dec
50
Magnitude (dB)
−50
−100
−150
−90
Phase (deg)
−135
−180
−225
−270
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
Figure 5.15: Loop Gain and Phase Response of the Dominant Pole Compensated
System with Zero
1.5
Magnitude
0.5
0
0 0.005 0.01 0.015 0.02 0.025 0.03
Time (sec)
Figure 5.16: Step Response of the Dominant Pole with Zero Compensated Sys-
tem
50
Magnitude (dB) 0
−50
−100
−150
−90
Phase (deg)
−135
−180
−225
−270
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
Figure 5.17: Matlab Analysis of Dominant Pole Compensated System with Zero
(Improved Margin)
1.5
Magnitude
0.5
0
0 0.005 0.01 0.015 0.02 0.025 0.03
Time (sec)
Figure 5.18: Step Response of the Dominant Pole with Zero Compensated Sys-
tem (Improved Margin)
|Gc (s)|
Gco
20dB/dec
p
fz fp
b)
fz fp fc 10fz 10fp
10 10
−60dB/dec
c)
To Gco To Gco f1
f
|T (s)| To Gco f1 f2
f2
−20dB/dec
−40dB/dec 1 ⇒ 0dB
To Gco f1 f3 fp
f3
−60dB/dec
a)
To Gco To Gco f1
f
−40dB/dec
To Gco f1 f3 fp
f3
−60dB/dec
0◦
b)
T (s) −45◦ /dec
−90◦ /dec
−135◦ /dec
Phase
Margin −180◦
20
Magnitude (dB)
0
−20
−40
−60
−80
0
−45
Phase (deg)
−90
−135
−180
−225
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
Lead Compensation
2.5
1.5
Magnitude
0.5
0
0 1 2 3 4 5 6 7 8
Time (sec) −3
x 10
50
−50
−100
−90
Phase (deg)
−135
−180
−225
−1 0 1 2 3 4
10 10 10 10 10 10
Frequency (Hz)
Figure 5.24: Matlab Analysis of Lead Compensated System with integrator and
zero
Combined Compensator
2.5
1.5
Magnitude
0.5
0
0 1 2 3 4 5 6 7 8
Time (sec) −3
x 10
Figure 5.25: Step Response of the Lead Compensated System with integrator
and zero
G (s) = Go
1+ ωs 1+ ωs 1+ ωs
1 2 3
H (s) = k
ωI
s ωI = 0.25 7.8 46 18 22 25 137 0
ωI s
s
1+ ωz
ωI = 1.62 56 51 16 17 34 18 0
ωz = 2π(10)
ωI s
s
1+ ωz
ωI = 1.03 38 62 20 6 5.3 16 0
ωz = 2π(10)
s
1+
Gco 1+ ωsz Gco = 0.075 164 64 35 8.1 1.3 3.9 -5
ωp
ωz = 2π(100)
ωp = 2π(10, 000)
ωI 1+ ωsz 1+ ωsz
1 2 ωI = 4.71 164 60 35 8.3 1.3 4 0
s
s 1+ ωp ωz1 = 2π(10)
ωz2 = 2π(100)
ωp = 2π(10, 000)
1 function compensators
2
3 clear all;
4 close all;
5
6 t = linspace(0, 0.35, 10000);
7 f = logspace(−1, 4, 1000);
8 w = 2*pi*f;
9 s = tf('s');
10
11 Go = 500;
12 f1 = 10;
13 f2 = 100;
14 f3 = 300;
15
16 w1 = 2*pi*f1;
17 w2 = 2*pi*f2;
18 w3 = 2*pi*f3;
19 k = 0.5;
20 To = Go*k;
21 yf = 2;
22
23 %====================================================================
24 %====================================================================
25 % UNCOMPENSATED
26 %====================================================================
27
28 G = Go/((1+s/w1)*(1+s/w2)*(1+s/w3));
29
30 titl = 'Uncompensated System';
31 Gc = 1;
32
33 xlmt = [0.325 0.35];
34 disp(titl)
35 analysis(Gc, G, k, w, titl, t, xlmt, yf)
36
37 % RiseTime: 0.0031
38 % SettlingTime: 0.3500
39 % SettlingMin: −9.9007e+79
40 % SettlingMax: −8.9587e+79
41 % Overshoot: 0
42 % Undershoot: 55.0478
43 % Peak: 9.9007e+79
44 % PeakTime: 0.3500
45
46 %====================================================================
47 %====================================================================
48 % Proportional Compensation
49 %====================================================================
50
51 fn = @(kp) 135 − atand(To*f1*kp/f1) − atand(To*f1*kp/f2) ...
52 − atand(To*f1*kp/f3);
53
54 kp = fzero(fn, 0) % kp = 0.0311
109
Chapter 6
Modelling - Introduction
6.1 Introduction
In the following chapters we will present a simple practical system to which we
will apply precise control. This system is a dc-to-dc power converter for which
we desire to have accurate control of the output voltage as it will function as a
voltage regulator subject to input voltage and output load variations.
thus we start with a plant which is given as a circuit conguration for which
we need to derive a model, which in the case of the classical control design
approach we will be applying, will need to be a transfer function model. Using
this model a compensator transfer function will be designed and subsequently
the closed loop performance will be simulated.
To fully verify the practical design a number of extra steps will need to be
undertaken. This involves actual realization of the compensator transfer func-
tion into an appropriate circuit which is then used in a circuit level simulation
to assess the performance achieved. If deemed not satisfactory then this process
may be iterated. This procedure is represented in the ow chart shown in Figure
6.1.
111
Figure 6.1: Design Flow Diagram
The System
7.1 Introduction
In this chapter, the parameters for an example control system will be dened
and derived. From the parameters of this example system, subsequent chap-
ters will be devoted to applying control design techniques to optimize system
performance parameters.
A control system begins with a model for plant, that has at least one particular
parameter to be controlled. To control the plant, the parameter to be controlled
is compared to a stable reference value and the dierence is input to an error
amplier. The error amplier then commands the plant, controlling the desired
plant parameter. A basic diagram illustrating this architecture is shown in
Figure 7.1.
Compensator Plant
113
7.2 The Plant: Buck Converter
7.2.1 Introduction
The fundamental item in every control system is the plant, the item that is to
be controlled. In this section, the plant will be dened as a buck converter, a
switched mode DC power supply.
The buck regulator, which is shown complete in Figure 7.2 including circuit
losses and feedback compensation, is a basic switched mode power supply. The
buck regulator acts to reduce the steady state output voltage based on an applied
duty cycle of applied input voltage. The duty cycle is switched at a frequency
higher than the resonant frequency LC tank on the output. The output lter
allows the circuit to convert the input voltage to a lower output voltage with
minimal circuit losses.
The complete system block diagram for the buck regulator is shown in Fig-
ure 7.4. The output voltage of the system is fed back to a reference (reduced by
H(s)), and the dierence (error signal) is fed to a compensator which drives a
pulse-width modulator to control the output voltage. Additionally, this model
includes disturbance inputs in terms of step loading and input voltage variation
for design characterization.
voltage, or open loop output impedance Zout (s). Additional transfer functions
will be derived in the section, such as the control to inductor current Gid (s),
output current to inductor current Gii (s), and the input voltage to inductor
current Givg (s). These transfer functions will be utilized in following chapters.
Using the state space analysis approach, the complete set of transfer functions
will be derived for the buck converter shown in Figure 7.5.
Listed below are the fundamental equations for state space analysis. x denes
the state variables of the system and the u variables dene the inputs. The
number of states is dened by the number of storage elements in the system.
For the buck converter, there are two states. The output voltage of the converter
is the voltage across the capacitor and the corresponding parasitic resistance.
i
x=
v
vg
u=
io
x˙ = Ax + Bu
y = Cx + Eu
During DTs,
diL R
L = −(rl + rc || R)iL − Vc + Vg + Io (R || rc )
dt R + rc
dVc R 1 R
C = iL − Vc + 0Vg − Io
dt R + rc R + rl R + rc
R
Vout = (rc || R) iL + Vc + 0Vg − (R || rc ) Io
R + rc
During D'Ts,
diL R
L = −(rl + rc || R)iL − Vc + 0Vg + Io (R || rc )
dt R + rc
dVc R 1 R
C = iL − Vc + 0Vg − Io
dt R + rc R + rl R + rc
R
Vout = (rc || R) iL + Vc + 0Vg − (R || rc ) Io
R + rc
With the circuit dened over the two subintervals, the A, B, C, and E matrices
can be dened as shown below:
" #
− (rc kR+r
L
l)
− (R+rR
c )L
A1 = A2 = A = R 1
(rc +R)C − (rc +R)C
1
B1 = L
0
0
B2 =
0
D
B= L
0
E1 = E2 = E = 0 − (rc || R)
With the state space matrices dened, the control to output transfer function
Gvd (s) = C(sI − A)−1 Bd + Ed, where Bd = (A1 − A2 )X +
can be calculated as
(B1 − B2 )U and Ed = (C1 − C2 )X + (E1 − E2 )U . Applying basic matrix
manipulation techniques, Gvd (s) is calculated below.
DV g R2 Rrc
R+r − Io(R+rc )(R+rl ) − (R+rc )(R+r l)
X = −A−1 BU = l
R 2 rc R(Rrc +Rrl +rc rl )
DRVg
Io (R+rc )(R+rl ) + (R+rc )(R+rl ) + R+rl
Vg
Bd = (A1 − A2 )X + (B1 − B2 )U = L
0
Ed = (C1 − C2 )X + (E1 − E2 )U = 0
Vg (1 + sRC)
Gvd (s) = C(sI−A)−1 Bd+Ed = rc +R 2 rc rl (R+rl )
L
R s LC +s R + rl + rc + R C + R
y=i
C1 = C2 = C = 1 0
E1 = E2 = E = 0 0
Using the values found above, the output load to inductor current function
is equal to Gii (s) = −(C(sI − A)−1 B + E), with the negative sign due to the
dened current direction.
R−rc
R+rl + src C
Gii (s) = C(sI − A)−1 B + E = rc +R 2 rc rl (R+rl )
L
R s LC +s R + rl + rc + R C + R
Vg (1 + s (R + rc ) C)
Gid (s) = C(sI−A)−1 Bd+Ed = (R+rl )
R rc +R 2 L rc rl
R s LC +s R + rl + rc + R C + R
D (1 + src C)
Gvvg (s) = C(sI−A)−1 B+E = rc +R 2 rc rl (R+rl )
L
R s LC +s R + rl + rc + R C + R
D
(1 + s (R + rc ) C)
Givg (s) = C(sI−A)−1 B+E = rc +R 2
R
rc rl (R+rl )
L
R s LC +s R + rl + rc + R C + R
Zo (s) Analysis
To calculate the output impedance of the Buck converter, it is possible to use
state space analyses techniques. However, due to the input voltage connection
of the Buck converter we can take advantage of the fact that the impedance of
the buck on the output looks the same regardless of the switch location.
1 sL
Zo (s) = SLk kR = L
sC 1 + s R + s2 LC
One way to incorporate losses into the impedance function is to replace the
energy storage element in the impedance equation with the sum of the element
and its non-ideal resistive component. Starting with the inductor, every instance
of sL is replaced with sL + rl in Zo (s).
sL + rl
Zo (s) = rl L
1+ R +s R + rl C + s2 LC
rl
Assuming
R << 1
sL + rl
Zo (s) = L
1+s R + rl C + s2 LC
sC
sC ⇒
1 + SRc
(sL + rl ) (1 + src C)
Zo (s) = L
rc
1+s R + (rl + rc ) C + s2 1 + R LC
rl 1 + s rLl (1 + src C)
Zo (s) = L
1+s R + (rl + rc ) C + s2 LC
rc
Assuming (
R << 1).
To summarize the results of this section, Figure 7.10 shows the results of the
state space analysis for the buck converter presented in this chapter. The results
of the analysis will be leveraged throughout the text.
From inspection of Figure 13.2, it can be approximated that the duty cycle
can be represented by the following relationship:
Vc (t)
d (t) = for 0 ≤ Vc (t) ≤ VM
VM
d(t) 1
Rearranging,
Vc (t) = VM . For a complete derivation conrming the PWM
conversion gain can be approximated to this equation, refer to the analysis
presented in [1].
7.4 Summary
Now that the basic system has been dened, the nal block to be derived in
the Buck converter system model is the compensator, Gc (s). The compensator
will be the primary topic of the next several chapters, as it will be leveraged to
improve the closed-loop performance of the derived buck regulator system. The
equations in this chapter will be heavily leveraged in the remainder of the text.
125
126 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 8
This chapter develops a buck converter design example using dierent compen-
sation methods to ensure closed loop stability and to optimize system perfor-
mance. Various compensators are designed using asymptotic Bode plots based
primarily on loop bandwidth and stability margins. Computer simulation re-
sults are included to show time domain step response behavior and to verify
performance improvements.
8.1 Introduction
The buck converter is a switch mode, DC-DC, power supply. It accepts a
source voltage, Vg and produces a lower output voltage, V with high eciency.
An important component of a practical buck converter is control feedback which
assures a constant output voltage and attenuates unwanted disturbances. The
feedback loop of a buck converter presents several challenges which are explored
in the compensation examples.
127
eects of Vg transients, a common problem in real power supply designs. A
Matlab [2] simulation is also performed to validate the manual Bode analysis
and to determine the exact gain and phase margin. Finally a closed loop Mat-
lab simulation is used to show the ability of the feedback system to attenuate
undesired eects as a function of frequency.
1
T (s) = Gc (s) Gvd (s)H(s) (8.1)
VM
1
Gvd (s) = Vg 2 (8.2)
s s
1+ +
Qω0 ω0
1
ωo = √ (8.3)
LC
r
C
Q=R (8.4)
L
Consider the transfer function v(s)/vd (s) of the low pass lter formed by the
LCR network. The switching frequency fs = 100kHz is much higher than the
resonant frequency f0 = 1kHz of the LCR network. During circuit operation,
the switch toggles the LCR input between Vg and ground with a duty cycle D
determined by the feedback loop. A Fourier analysis of the LCR input waveform
includes an average DC component V = DVg and an fs fundamental component
and its harmonics as typied by a rectangular waveform. The LCR acts as a
low pass lter with a cut o frequency equal to fo . It passes the DC component
to the output but attenuates fs and its harmonics.
To
T (s) = 2 (8.5)
s s
1+ +
Qω0 ωo
where
Vg H(0)
To = (8.6)
Vm
fo = 1kHz
To Q = 22
To = 2.33 Q = 9.5
|T (s)|
To ( ffo )2
fc
1 ⇒ 0dB
1 −40dB/dec
10− 2Q fo =
900Hz
0◦
−Q × 180◦ /dec
T (s)
−90◦
f
−tan−1 Qfo
1−( ffo )2
, ∀f
1
10 2Q fo =
1.1kHz
−180◦
From the Bode plot it can be determined that unity gain occurs at a frequency,
f = fc such that
2
fo
To =1 (8.7)
fc
which with To =2.33 and fo =1kHz, results in fc =1.5kHz. At this frequency
the phase is −180◦ providing zero phase margin. The phase asymptotes show
◦
that phase does not cross the −180 phase level (but is asymptotic to it) which
implies that the gain margin is innite. Figure 8.5 is a Matlab margin plot
indicating the actual unity gain frequency to be 1.8 kHz with a phase margin
◦
of 4.7 . Also, the Matlab analysis indicates an innite gain margin.
20
Magnitude (dB)
10
-10
-20
-30
-40
0
-45
Phase (deg)
-90
-135
-180
2 3 4
10 10 10
Frequency (Hz)
Figure 8.6 shows a PECS implementation of the open loop buck converter
system. The input to the modulator is set to 2.1V which results in the target
V 15
steady state duty ratio of D=
Vg = 28 = 0.54 required to set the output voltage
at V = 15V for a nominal input voltage of Vg = 28V.
Figure 8.7 shows the output voltage response of the open loop system shown
in Figure 8.6 for voltage steps in Vg of 28V→30V→28V. The response is in-
dicative of the high resonance Q of 9.5 at the resonant frequency fo =1kHz.
Note also that at an input voltage of Vg =30V the output voltage settles at
V = DVg =0.54×30 = 16.2V, as shown in Fig. 8.7.
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
V2
2.1
k1 = 1.0
k2 = 0.0
k3 = 0.0
Vpk = 4.0
Period = 10 u
x101 VP1
1.70
1.65
1.60
1.55
1.50
1.45
1.40
8.0 10.0 12.0 14.0 16.0 18.0 20.0 22.0
x10-2
2. The gain at the plant's lowest frequency pole is less than or equal to
0dB. This condition ensures a positive phase margin and, consequently,
stability.
For the case of dominant pole compensation, these objectives are achieved
using a compensator consisting of a single pole at a frequency well below those
of the plant's poles. For the purposes of this example, an integrator is employed
ωI
Gc (s) = (8.8)
s
where ωI (= 2πfi ) is an appropriately chosen design constant. Figure 8.8
shows the Bode plot asymptotes for the magnitude and phase of this compen-
sator.
fI
f
| ωsI |
−20dB/dec
1 ⇒ 0dB
fI
1
s −90◦
Figure 8.9 shows the graphical construction of the phase asymptotes for the
loop gain with the compensator. Note that because the plant's dominant pole
is second order, it contributes a phase shift of −180◦ at high frequencies and a
◦
shift of exactly −90 at fo . Furthermore, the compensator contributes its own
−90◦ phase shift and does so for all frequencies. Consequently, the total phase
shift of the compensated loop gain transfer function is −180◦ at the dominant
pole frequency, fo . For this reason it is prudent to design in some additional
gain margin. A value of 3dB is initially chosen for this analysis.
− 1 fo =
10 2Q fo =
900Hz 1kHz
0◦
−Q × 180◦ /dec
1
s
1+ Qω o
+( ωso )2
−90◦
f
−tan−1 Qfo
1−( ffo )2
, ∀f 1
10 2Q fo =
1.1kHz
−180◦
1 −90◦
s
− 1
10 2Q fo =
900Hz
−90◦
−Q × 180◦ /dec
T (s)
−180◦
f
−90 − tan−1 Qfo
1−( ffo )2
, ∀f 1
10 2Q fo =
1.1kHz
−270◦
fI To Q
= 0.7 (8.10)
fo
fo = 1kHz
To Q = 22
To = 2.33 Q = 9.5
To
s
+( ωso )2
1+ Qω o To ( ffo )2
1 ⇒ 0dB
−40dB/dec
1 ⇒ 0dB
| ωsI | −20dB/dec
fI
f
fI To fI To Q
fc f fo
1 ⇒ 0dB
3dB
−20dB/dec Q = 9.5 −3dB ⇒ 0.7
|T (s)|
fI To
fo
fI To fo 2
f ( f )
−60dB/dec
Figure 8.11 shows the Bode plot of the resulting gain and phase asymptotes
and Figure 8.12 shows a Matlab margin analysis which conrms the design.
fI To fI To Q
f fo
1 ⇒ 0dB
3dB
−20dB/dec Q = 9.5 −3dB ⇒ 0.7
|T (s)|
fI To
fo
2
fI To fo
f f
1
10− 2Q fo = −60dB/dec
−90◦ 900Hz
Phase
Margin
= 90◦ −Q × 180◦ /dec
T (s) −180◦
f
−90 − tan−1 Qfo
1−( ffo )2
, ∀f 1
10 2Q fo =
1.1kHz
−270◦
Figure 8.11: Dominant Pole Compensated Loop Gain Asymptotic Bode Plot
With a compensator designed and veried via Matlab, the next stage is to
design a circuit that implements the compensator. Figure 8.13 shows the general
form of an operational amplier in a integrator conguration. The transfer
function for this circuit is given by:
−1
G(s) = (8.11)
(s/ωo )
where
1
ωo = (8.12)
RC
A capacitor value of 50nF is chosen for C. This value is within the range of
low-cost, commercially available ceramic capacitors and is small enough to avoid
Magnitude (dB)
0
-50
-100
-90
-135
Phase (deg)
-180
-225
-270
1 2 3 4
10 10 10 10
Frequency (Hz)
any op-amp slew rate issues. Equating ωo with the compensator parameter, ωI
(= 2πfI ) and solving for R gives
1 1
R= = ≈ 100kΩ (8.13)
ωI C 2π(32)(50nF)
Figure 8.15 shows the results of the PECS simulation for a 2V disturbance
on the supply voltage, Vg . The input voltage steps are 28V→30V→28V. The
simulation exhibits several undesirable characteristics:
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
C4 R6
50 n R5 2.0 k
100 k R7
V3
1.0 k
5.0
k1 = 1.0
k2 = 0.0
k3 = 0.0
Vpk = 4.0
Period = 10 u
1. The regulator does a poor job of rejecting the input voltage disturbance.
Nearly all of the input voltage excursion shows up as a transient on the
output.
It is clear from the simulation results that, although the design is stable and
exhibits zero steady-state error, there is much room for improvement, particu-
larly with respect to its transient response.
One can see clearly that the ringing of the previous design has been eliminated.
Unfortunately, the poor rejection of input voltage transients remains.
1.65
1.60
1.55
1.50
1.45
1.40
1.35
1.30
8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0
x10-2
SW1 L1
V1 D1 50 u C1 R8 R1 VP1
5.0 m
C4 R6
50 n R5 2.0 k
100 k R7
V3
1.0 k
5.0
k1 = 1.0
k2 = 0.0
k3 = 0.0
Vpk = 4.0
Period = 10 u
x101 VP1
1.65
1.60
1.55
1.50
1.45
1.40
1.35
8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0
x10-2
2. by shifting the frequency at which the phase reaches −180◦ beyond the
resonant frequency and the gain peak due to the plant's Q.
1 + s/ωz
Gc (s) = ωI (8.14)
s
ωz
We will use ωz = ωo or fz = 2π = fo . Which results in a loop gain of
1 + s/ωo To
T (s) = ωI 2 (8.15)
s
s s
1+ Qωo + ωo
Figure 8.19 shows the resulting Bode plot asymptotes. We would like to set
√
the gain at fo to 1/ 10 (which corresponds to -10dB). From the magnitude plot
we see that we want
fI To Q 1
=√ (8.16)
fo 10
which given To = 2.33, Q = 9.5, fo = 1kHz , results in fI = 14.3. Figure
8.20 shows a Matlab conrmation of the Bode plot. Note that a gain margin
of 11dB is predicted at a phase cross-over frequency of 1.06kHz, slightly higher
than the plant's resonant frequency.
Figure 8.21 shows a standard op-amp implementation with the desired trans-
fer function. The transfer characteristics of the circuit are given by:
1 + s/ω1
G(s) = −A s (8.17)
ω1
where:
fI To fI To Q
f fo
1 ⇒ 0dB
10dB
−20dB/dec Q = 9.5 −10dB ⇒ √1
10
|T (s)|
fI To
fo
2
fI To fo
f f
−40dB/dec
− 1
10 2Q fo =
900Hz
−47◦
f
−90◦ + tan−1 ( ff ) − tan−1 Qfo
, ∀f
fz o 1−( ff )2
◦ 10
45◦ /dec o
−90
Phase Margin =
45◦ /dec
−222◦
1
10 2Q fo =
1.1kHz
Figure 8.19: Open Loop System Gain and Phase with pole-zero Compensation
(10dB GM)
R2 1
A= and ω1 = (8.18)
R1 R2 C1
ω1
Equating f1 (=
2π ) to the plant resonant frequency, fo and ωI to Aω1 provides
two equations with three unknowns. Choosing, somewhat arbitrarily, a value of
100k for R1, leads to the following values.
fI R1 (14.3)(100kΩ)
R2 = = = 1.4kΩ (8.19)
f1 (1kΩ)
1 1
C1 = = = 110nF (8.20)
ω1 R 2 2π(1kHz)(1.4kΩ)
Magnitude (dB)
-50
-100
-150
-45
-90
Phase (deg)
-135
-180
-225
1 2 3 4 5
10 10 10 10 10
Frequency (Hz)
Figure 8.22 shows a PECS circuit implementation of the system with the new
compensator. Figure 8.23 shows the response of the system to a transient on
the input voltage.
The modied compensator shows little improvement over the original circuit.
It still fails to provide good rejection of input voltage transients and the previ-
ously observed ringing is still present.
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
C2 R4 R2
x101 VP1
1.70
1.65
1.60
1.55
1.50
1.45
1.40
1.35
1.30
8.0 10.0 12.0 14.0 16.0 18.0 20.0 22.0
x10-2
Figure 8.23: PECS Simulation of Dominant Pole with Zero Compensation (10
dB GM)
s
1+ ωz
Gc (s) = Gco , (8.21)
s
1+ ωp
where ωz < ωp . As can be seen from the plot of the transfer function shown in
Figure 8.24, the lead compensator provides both a phase boost that is adjustable
based on the pole and zero frequencies, and a gain boost at higher frequencies
that can result in a higher crossover frequency for a lead-compensated buck
converter. Generally, a lead compensator is used to provide a phase boost, the
level of which is chosen to improve the phase margin to a desired value. The
new crossover frequency can be chosen arbitrarily. The design shown here will
be to obtain a 45◦ phase margin and a crossover frequency of 5 kHz for the loop
gain with a lead compensator.
f
Gco fpz
a) Gco ffz
|Gc (s)|
Gco
20dB/dec
fp
45◦ log
p
fz fp fz
b)
10f f
45◦ log fz −45◦ log 10fp
fz fp fc 10fz 10fp
10 10
1 ⇒ 0dB
2
−20dB/dec
fo
To Gco f 2
fc fp f fo
f2 = To Gco fpz f
10f
45◦ log fz
−40dB/dec
0◦ 45◦ /dec
1 1
10
− 2Q
fo 10 2Q fo fc 10fz 10fz
fz fo fp
10 10
When the compensator is placed in the loop, the loop gain of the buck con-
verter system becomes
1 + ωsz
T (s) = T0 Gc0 2 (8.22)
1 + ωsp 1 + Qω s
0
+ s
ω0
◦ fp
φM = 45 log
fz
For a desired phase margin of 45◦ we have
fp
45◦ = 45◦ log
fz
or
fp = 10fz
Also, the crossover frequency, fc will necessarily be the geometric mean of
the pole and the zero frequency. Since the phase margin condition gives a
relationship between the pole and zero frequencies, this can be used to solve for
both.
p
fc =
fz fp
p
5 kHz = 10fz2
5 kHz
fz = √
10
fz = 1.58 kHz and fp = 15.8 kHz
These relationships result in the pole and zero frequencies for the lead com-
pensator. To complete the design, the required low-frequency gain Gco of the
compensator to place the unity-gain point at the appropriate frequency must be
determined. This can be found by equating the values of the gain asymptotes
at fz .
2
f0 fc
T0 Gc0 =
fz fz
Substituting the values of fo and To for the example converter, and the values
of fz and fc as previously calculated, the gain Gco of the compensator is
2
1 fz fc
Gco =
T0 f0 fz
2
1 1.58 kHz 5 kHz
Gco =
2.33 1 kHz 1.58 kHz
Gco = 3.4
As seen in previous designs and now in the phase plot of Fig. 8.25, the
phase response is asymptotic to −180◦ at high frequencies and so does not cross
through this level which implies an innite gain margin.
Bode Diagram
40
Gm = Inf dB (at Inf Hz) , Pm = 55.9 deg (at 5.35e+003 Hz)
20
Magnitude (dB)
-20
-40
-60
-80
45
0
Phase (deg)
-45
-90
-135
-180
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
With all of the parameters of the lead compensator determined, what remains
is to implement the compensator using an op-amp circuit and simulate the
closed-loop converter to evaluate its performance. A general circuit that can
be used to implement any lead or lag compensator is shown in Fig. 8.27. The
transfer function of this circuit is
s
1+ ωz
Gc (s) = Gco s (8.23)
1+ ωp
where
R2
Gco = − (8.24)
R1
ωz 1
fz = = (8.25)
2π 2πR1 C1
ωp 1
fp = = (8.26)
2π 2πR2 C2
1
C2 = ⇒ C2 = 33 pF
2π (15.8 kHz) (330 kΩ)
It it also necessary to derive a value for the reference voltage on the non-
inverting input of the op-amp. The sensed voltage from the output will be 5 V
in steady-state as before, and the control voltage should be 2.14 V. Using these
in combination with the resistor values for the lead compensator, the reference
voltage can be found.
R2 R1
Vref = Vsense + Vcontrol
R1 + R2 R1 + R2
330 kΩ 100 kΩ
Vref = (5 V) + (2.14 V) = 4.33 V
100 kΩ + 330 kΩ 100 kΩ + 330 kΩ
Using these values in the PECS simulator (see Figure 8.28 for PECS schematic),
the response of the lead-compensated buck converter to a step in the input volt-
age was simulated as before. The results of the simulation are shown in Fig-
ure 8.29. The lead compensator is quite eective in increasing the phase margin
of the system. The oscillatory behavior evident in the output voltage of the
uncompensated converter is not present, and the magnitude of the steady-state
error due to the step is reduced, though not eliminated. Thus, the system with
the lead compensator is very stable, but will still exhibit steady-state errors to
Del = 0.0
Per = 10 u
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
C3 C2
R2
33 p 1.0 n
R5 R4 2.0 k
330 k 100 k R3
1.0 k
V3
k1 = 1.0
k2 = 0.0
k3 = 0.0 4.3
Vpk = 4.0
Period = 10 u
ωI 1 + ωs1 1+ s
ωz
Gc (s) = (8.27)
s 1 + ωsp
1.510
1.508
1.506
1.504
1.502
1.500
1.498
8.0 10.0 12.0 14.0 16.0 18.0 20.0 22.0
x10-2
In the rst case f1 will be chosen to be the largest frequency which, based
on the phase asymptote, contributes +90◦ to the crossover frequency fc , thus
◦
fully canceling the −90 contribution from the integrator pole. This eectively
leaves the phase margin unchanged from the lead compensator design of the
previous section. From the phase asymptotes plots of a zero, we see that the
fc
zero frequency f1 should be at
10 which is 500Hz.
In the second design considered here we will lower the zero frequency to
f1 = 150Hz and examine the eect on the closed loop performance.
ωI 1 + ωs1 1 + ωsz
T (s) = To 2 (8.28)
s 1 + ωsp 1 + Qω s
o
+ s
ωo
ωI
where f1 is either 500Hz or 150Hz, as discussed above and fI = 2π is the
only design variable to be determined.
phase plot for the new loop gain is shown in the bottom plot. Both magnitude
and phase plots for the new loop gain are shown together in Fig. 8.31.
To determine, fI , the one unknown variable in the loop gain, we note that at
the frequency f1 the magnitude is set equal to the low frequency loop gain of
the lead compensation design of the last section.
fI
T0 = T0 Gco |lead (8.29)
f1
For f1 = 500 we nd fI = 1770. Thus the expression for the compensator is
as given in (8.27) with the following values
ωI = 2π(1770)
ω1 = 2π(800)
(8.30)
ωz = 2π(1580)
ωp = 2π(15800)
To conrm the accuracy of the design, the Bode plot of the exact loop gain
was evaluated using Matlab. This is shown in Fig. 8.32. Our asymptotic design
values of crossover frequency fc and phase margin of 5kHz and 45◦ , respec-
tively were determined by Matlab as given by the Matlab "margin" command
to be more precisely 5,370Hz and 50.5◦ , respectively, thus conrming the design
procedure.
1
ωI =
R1 (C2 + C3 )
1
ω1 =
R2 C 2
(8.31)
1
ωz =
R1 C 1
1
ωp = C2 C3
R2 C2 +C3
0◦ 45◦ /dec
fp
T (s) − (Q × 180◦ − 45◦ ) /dec 45◦ log fz − 180◦
p
lead
fz fp
f
−45◦ log 10fp − 180◦
+90◦ /dec
10f
45◦ log f1
−90◦ +45◦ /dec p
fz fp
1
− 2Q 1
f1 fz 10 fo f 10 2Q fo fp fc = 10fz 10fp
o
10 10 10
10f1
−40dB/dec
◦
+90 /dec
◦ 10f
45 log f1
−90◦ +45◦ /dec p
fz fp
1
− 2Q 1
10 fo 10 2Q fo
f1 fz fp fc = 10fz 10fp
10 10 10
10f1
fo
Figure 8.31: Bode Plot of System with Lead plus Integral Compensation (500Hz)
1
C1 = = 2.2nF
ωz R 1
1
C2 = = 1nF
ωI R1
(8.32)
1
R2 = = 330kΩ
ω1 C2
1
C3 = = 33pF
ωp R2
60
Magnitude (dB)
40
20
-20
-40
-60
-80
-100
0
-45
Phase (deg)
-90
-135
-180
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 8.32: Matlab Lead Compensator with Integrator and Zero at 500Hz
Figure 8.33: Compensator Circuit for Dominant Pole with Lead Compensation
A PECS implementation of the closed loop system is shown in Fig. 8.34. The
simulated response of input voltage steps 26V → 30V → 28V is shown in Fig.
8.35. Clearly seen here is the zero steady state error and a maximum voltage
deviation of around 80 mV with a settling time of around 1 ms.
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
C3 C2
R2
33 p 2.2 n
C4 R5 R4 2.0 k
1.0 n 330 k 43 k R3
1.0 k
V3
k1 = 1.0
k2 = 0.0
k3 = 0.0 5.0
Vpk = 4.0
Period = 10 u
Figure 8.34: PECS Schematic of Lead Compensated System with Zero at 500Hz
x101 VP1
1.5040
1.5030
1.5020
1.5010
1.5000
1.4990
1.4980
1.4970
1.4960
9.80 9.90 10.00 10.10 10.20 10.30 10.40 10.50 10.60 10.70 10.80
x10-2
Figure 8.35: PECS Simulation of Lead Compensated System with Zero at 500Hz
8.36. The nal magnitude and phase asymptotic plots are given in Fig. 8.37.
Using the new values of fI = 351 and f1 = 150, a more precise value of
crossover frequency and phase margin is found from Matlab to be 5,350Hz and
54.3◦ , respectively, as seen in Fig. 8.38. Recall that the asymptotic plots indi-
cate 5kHz and 45◦ , respectively.
s s
ωI 1 + ωz1 1+ ωz2
Gc (s) = (8.34)
s
z1 ω z2 ω
The zeros fz1 (= 2π and fz2 =
2π are simply chosen as follows. Zero fz2 is
set so fz2 = fo so as to counter the eects of the plant complex pole pair. The
fo
lower frequency zero fz1 is set so that fz1 =
10 to minimize the phase drop at
fo . The resulting loop gain expression is given by
The asymptotic magnitude and phase responses of the resulting loop gain are
shown in Fig. 8.41, where the phase contributions of the dierent factors are
individually drawn and then summed at the bottom plot to produce the overall
asymptotic loop gain phase plot.
To fI fo
=1 (8.36)
fz1 fc
0◦ 45◦ /dec
+90◦ /dec
10f
45◦ log f1
−90◦ +45◦ /dec p
fz fp
1
− 2Q 1
f1 fz 10 fo f 10 2Q fo fp fc = 10fz 10fp
o
10 10 10
10f1
−40dB/dec
+90◦ /dec
45◦ log( 10f
f1 )
−90◦ +45◦ /dec p
fz fp
1
− 2Q 1
10 fo 10 2Q fo
f1 fz fp
10 10 10 = fc 10fz 10fp
fo 10f1
Figure 8.37: Bode Plot of System with Lead plus Integral Compensation (150Hz)
so that we have
fz1 fc
fI = (8.37)
To fo
with the values at hand we nd
fI = 172 (8.38)
From the phase asymptotic plot of Fig. 8.41 we can clearly see that the
expected phase margin is 90◦ . Using Matlab we more precisely nd with the
design values used fc = 40kHz and phase margin is 88.6◦ as shown in Fig. 8.42.
60
Magnitude (dB)
40
20
-20
-40
-60
-80
-100
45
0
Phase (deg)
-45
-90
-135
-180
0 1 2 3 4 5 6
10 10 10 10 10 10 10
Frequency (Hz)
Figure 8.38: Matlab Lead Compensator with Integrator and Zero at 150Hz
The resulting PECS implementation is shown in Fig. 8.43 along with the
response of input voltage steps of 28V → 30V → 28V , in Fig. 8.44. We now
see that the peak voltage variation has greatly reduced to just 30mV.
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
C3 C2
R2
33 p 2.2 n
C4 R5 R4 2.0 k
3.3 n 330 k 43 k R3
1.0 k
V3
k1 = 1.0
k2 = 0.0
k3 = 0.0 5.0
Vpk = 4.0
Period = 10 u
Figure 8.39: PECS Schematic of Lead Compensated System with Zero at 150Hz
x101 VP1
1.506
1.504
1.502
1.500
1.498
1.496
1.494
9.8 10.0 10.2 10.4 10.6 10.8 11.0 11.2 11.4
x10-2
Figure 8.40: PECS Simulation of Lead Compensated System with Zero at 150Hz
80
Magnitude (dB)
60
40
20
-20
45
0
Phase (deg)
-45
-90
-135
0 1 2 3 4 5
10 10 10 10 10 10
Frequency (Hz)
Del = 0.0
Per = 10 u
SW1 L1
V1 D1 50 u C1 R1 VP1
28 500 u 3.0
R7 C2
68 k 18 n C4 R6
10 n 16 k
R7
V2
8.0 k
k1 = 1.0
k2 = 0.0 5.0
k3 = 0.0
Vpk = 4.0
Period = 10 u
1.5010
1.5005
1.5000
1.4995
1.4990
1.4985
1.4980
8.0 10.0 12.0 14.0 16.0 18.0 20.0 22.0
x10-2
To
Loop Gain T (s) = Gc (s) 2,
s
1+ Qω o
+( ωso )
169
Appendix
8.9.1 Compensator Circuits
1 clear all
2 close all
3
4 f0 = 1000;
5 Q = 9.5;
6 T0 = 2.33;
7 w0 = 2*pi*f0;
8
9 s = tf('s');
10 Ts = T0/((s/w0)^2 + s/(Q*w0) + 1);
11
12 %%%%%%%%%%%%%%%%%
13 % Open loop
14
15 figure(1)
16 margin(Ts)
17 h = gcr;
18 h.AxesGrid.Xunits = 'Hz';
19 h.AxesGrid.TitleStyle.FontSize = 16;
20 h.AxesGrid.XLabelStyle.FontSize = 12;
21 h.AxesGrid.YLabelStyle.FontSize = 12;
22
23 %%%%%%%%%%%%%%%%%%
24 % Lead compensation
25
26 Gc0 = 3.4;
27 wz = 2*pi*1500;
28 wp = 2*pi*15000;
29
30 Gc1 = Gc0*(1+s/wz)/(1+s/wp);
31
32 Ts1 = Gc1*Ts;
33
34 figure(2)
35 margin(Ts1)
36 h = gcr;
37 h.AxesGrid.Xunits = 'Hz';
38 h.AxesGrid.TitleStyle.FontSize = 16;
39 h.AxesGrid.XLabelStyle.FontSize = 12;
40 h.AxesGrid.YLabelStyle.FontSize = 12;
41
42
43 %%%%%%%%%%%%%%%%%%
44 % 500
45
46 wi = Gc0*2*pi*500;
47 wz2 = 2*pi*500;
48 wz = 2*pi*1500;
49 wp = 2*pi*15000;
50
51 Gc2 = wi/s*(1+s/wz2)*(1+s/wz)/(1+s/wp);
52 Ts2 = Gc2*Ts;
53
175
()
Abstract
Constant output voltage is an important feature of a DC voltage regulator.
This paper describes three compensation techniques including voltage droop,
inductor current droop, and voltage compensation to minimize voltage devi-
ation to changes in the output load of the system. Through simulation it is
conrmed that droop compensation improves voltage deviation by a factor of
two in comparison to traditional voltage compensation.
9.1 Introduction
In DC-DC voltage regulators, it is important to supply a constant voltage,
regardless of the current load on the output. The goal of this paper is to describe
three feedback compensation techniques for the Buck converter to limit the
voltage deviation in response to a current step on the output. The designs to
be implemented include a voltage droop compensator [1], an inductor current
compensator [2], and a conventional voltage compensation circuit. For this
design, resistive losses will be included for the inductor and the capacitor to
provide a more complete and accurate analysis.
9.2 Design
9.2.1 Passive Droop Compensation
Concept of droop control
As discussed in [1], the basic concept behind droop control is to apply com-
pensation to the Buck converter in a way that creates a constant, closed-loop
output impedance. By creating a constant output impedance, any variation in
load current will result in a change in output voltage to maintain a constant
impedance. Knowing the maximum load current requirements, the maximum
droop of the system is simply ∆V = ∆IR.
Reviewing the output section of the buck converter including losses, it can
be seen that the open loop output impedance at high frequencies is equal to
the parasitic resistance of the output capacitor. For this design, the parasitic
resistance of the capacitor will be utilized as the value of the output impedance
for the compensated Buck converter.
voltage, and variations in the load current. For this example, input voltage
variations will be neglected.
By denition,
Zo (s)
Zoc (s) = (9.1)
1 + T (s)
Following Figure 9.4, T (s) = Fm HGvd (s)Gcon (s), where Fm is the PWM
comparator eect, Gvd (s) is the control to output transfer function, H is the
feedback attentuation, and Gcon (s) is the compensation block to be designed.
To nd Zoc (s) it is necessary to rst calculate Zo (s) (the open loop output
Magnitude (dB)
-10
-20
-30
-40
-50
-60
-70
-80
0
-45
Phase (deg)
-90
-135
-180
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
impedance) and Gvd (s). Applying state space averaging methods to calculate
the small signal model of Zo (s) and Gvd (s), the functions are realized as shown
below.
Recalling that our aim is to derive a compensator circuit that will implement
a constant output impedance equal to the parasitic resistance of the capacitor,
Zoc is set equal to rc .
Zo (s) Zo (s)
Zoc (s) = = = rc
1 + T (s) 1 + Fm Gvd (s)Gcon (s)
Expanding Zo (s) and Gvd (s):
(1+ ωs )(1+ ωsc )
rl s
l
s 2
1+ Qω o
+ω 2
o
rc = Fm (1+ ωsc )Vg
1+ s s 2 Gcon (s)
1+ Qω o
+ω 2
o
s 1 1 rc rl rl
rc Fm Vg (1 + )Gcon (s) = rl − rc + [( + )rl − ]s + ( − 2 )s2
ωc ωl ωc Qωo ωl ωc ωo
rl rc rl rc
− 2 = rl 1 − 1 = rc (LC − LC) = 0
ωl ωc ωo L rc C LC
s
1+ ωzv
Gcon (s) = Kv s (9.4)
1+ ωpv
rl −rc Rl −Rc
Where Kv = rc Vg Fm H ,ωpv = ωc , and ωzv = L−Rc2 C .
Figure 9.5 show the frequency response of the loop gain of the system. Note
that in this compensation design, a small gain at low frequencies is implemented,
which is contrary to typical feedback designs where nearly innite DC gain is
desired.
With the compensator circuit now completely dened, it can be realized us-
ing an operational amplier circuit. As seen in Figure 9.8, the circuit can be
implemented using a single op-amp.
Since the loop gain of this system is very low, it is not safe to assume that a
reference of 5 V (Vo H ) will work for this system. Looking at the block diagram,
D
if the duty ratio is known, the output voltage of the amplier is
Fm . Using this
value, the value of Vref can found by applying nodal analysis at V− . Using the
V
DC value of D (
Vg = .53), Vref is found to be equal to approximately 3.9 V.
Through simulation of the droop circuit (Figure 9.8), it is found that the
system performs exactly as expected for a step in current of 0.1 A to 5.0 A.
With an output impedance of 50mΩ, the voltage change ideally would be equal
to 4V = (4.9A)(50mΩ) = .245V , which is approximately what is seen in Fig-
ure 9.8. In the next section, we will expand upon this design to incorporate
additional compensation using the inductor current.
Bode Diagram
20
Gm = Inf , Pm = 92.9 deg (at 6.33e+003 Hz)
10
0
Magnitude (dB)
-10
-20
-30
-40
-50
-60
45
Phase (deg)
-45
-90
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 9.5: MATLAB Bode Plot of Loop Gain with Passive Droop Compensa-
tion
-10
Magnitude (dB)
-15
-20
-25
-30
45
Phase (deg)
-45
-90
2 3 4 5 6
10 10 10 10 10
Frequency (Hz)
Figure 9.6: MATLAB Bode Plot of Zo for Passive Droop Compensated System
-10
-20
Magnitude (dB)
-30
-40
-50
-60
-70
-80
0
-45
Phase (deg)
-90
-135
-180
1 2 3 4 5
10 10 10 10 10
Frequency (Hz)
Figure 9.7: MATLAB Bode Plot of Gvg for Passive Droop Compensated System
SW1 Rl L1
250 m 50 u C1
V1 I1 VP1
500 u
Rc
28 SW2 100 m
50 m
C2 C3
R5
146 p 2.4 n
R6 R2 2.0 k
171 k 100 k R7
1.0 k
V2
k1 = 1.0
k2 = 0.0
k3 = 0.0 4.0
Vpk = 4.0
Period = 10 u
x101 VP1
1.505
1.500
1.495
1.490
1.485
1.480
1.475
1.470
9.5 10.0 10.5 11.0 11.5 12.0
x10-3
1.495
1.490
1.485
1.480
1.475
1.470
9.5 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 14.0
x10-3
Figure 9.12 shows the current and voltage loops in terms of transfer functions
via small-signal block diagram. Zo (s), Gvd (s), and Fm are the same transfer
functions used in the voltage droop mode. Ri is the inductor current sensing
gain. Av (s) is the transfer function of the feedback compensator, and is syno-
mynous to Gcon (s) in the voltage droop mode. Gii (s) is the transfer function
of inductor current to load current. Gid (s) is the transfer function of induc-
tor current to duty cycle. Applying state space averaging methods to calculate
the small signal model of Gii (s) and Gid (s)(see Appendix 1), the functions are
realized as shown below.
s
1+ ωc
Gii (s) = 2 (9.5)
s s
1+ Qω0 + ω0
s
Vin 1+ ωR
Gid (s) = 2 (9.6)
Ro
s s
1+ Qω0 + ω0
√
√1 , 1 Rl 1 LC
where ωo ≈ CL
ωc = Rc C , ωl = L , ωR = RC , and Q≈ Rl +Rc .
In order to determine a single compensator Av (s) for both loops, Ti (s) and
Tv (s) need to be related. Because the compensator eects both loops, it is
important to design the loops with the same characteristics. This allows both
loops to be in unison and not work against each other. This can be achieved by
designing both loops to have the same crossover frequency. This happens when
the ratio of the two loops is set equal to 1.
It can be seen that this ratio equals 1 when Ri = Rc and when ω > ωc , since
the zero from the output capacitor is normally much larger than ωR .
The design should be similar to the voltage droop control in terms of having
a constant impedance gain equal to the parasitic losses of the output capacitor.
The closed-loop output impedance function, Zoc (s), is shown below.
Setting the above equation equal to the value of Rc the transfer function
of Av (s) can be derived. From [2], the current loop should be stable with a
phase margin of around 90◦ . In order to achieve this, a zero, ωz , is needed to
compensate for the power stage double pole. The high frequency switching noise
should also be ltered. This requires a pole, ωp , placed well before the switching
frequency. The current loop should have a crossover frequency that is higher
than the parasitic zero of the output capacitor. This can be done by making
the gain, ωi , of the compensator suciently large. Since innite DC gain is
1
required, an integrator is used by placing a pole at zero,
s . The compensator
transfer function can now be realized.
The loop gain of this system is a ratio of the current and voltage loops, and
once again it's not safe to assume a reference of 5 V will work for this system.
Vref is found to be approximately 3.8 V in this design.
Tv (s)
T2 (s) = (9.12)
1 + Ti (s)
It can be seen in Figure 9.14 that all three loops have the same crossover
frequency. Stability is veried with T2 having a phase margin of about 105◦ .
This is really close to the design of 90◦ , with other poles and zeros from Tv and
Ti accounting for the slight dierence.
It can be observed in Figure 9.15 that the impedance gain is nearly constant.
The impedance phase is also nearly constant as it changes only slightly over the
entire range of frequencies.
In Figure 9.18, the current sensing droop control was simulated with a step
in the load current, the same as was performed Section 1. The results are
nearly the same as with the voltage droop control. There are slight transient
spikes, but they are small and are on the order of the ripple. These spikes are
caused from the slight deviation in the constant output impedance. With the
output impedance at 50mΩ, the ideal voltage change would again be .245 V.
Aside from the slight transient spikes, this is what is approximately seen in
Figure 9.18. This two loop compensation control can achieve the same results
as the simple voltage droop control, yet have the versatility to compensate for
both voltage and current. In the next section, a voltage compensation scheme
will be presented and compared to the droop control methods.
60
Magnitude (dB)
40
20
-20
-40
-60
-80
-100
0
-45
Phase (deg)
-90
-135
-180
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 9.14: MATLAB Bode Plot of Loop Gains with Active Droop Compen-
sation
By following the loop in Figure 9.4, it can be seen by inspection that Gcl (s) =
Gvg (s)
1+T (s) , where T (s) = Gvd (s)(F m)Gcon (s) and Gvd (s) is the same as in Section
1 and Section 2. Gvg (s) can be found to equal the following expression:
s
1+ ωc
Gvg (s) = D 2 (9.13)
s s
1+ Qω0 + ω0
-10
Magnitude (dB)
-15
-20
-25
-30
45
Phase (deg)
-45
-90
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 9.15: MATLAB Bode Plot of Zo for Active Droop Compensated System
-10
-20
Magnitude (dB)
-30
-40
-50
-60
-70
-80
-90
-100
360
Phase (deg)
180
-180
0 1 2 3 4 5 6
10 10 10 10 10 10 10
Frequency (Hz)
Figure 9.16: MATLAB Bode Plot of Gvg for Active Droop Compensated System
SW1 Rl L1
250 m 50 u C1
V1 R14 I1 VP1
500 u
R8 2.0 k R13 Rc
28 SW2 100 m
50 m 1.0 k 50 m
C2
33 p
R11 C3 R10 R7
96 k 1.6 n 5.5 k
R9 2.0 k
5.5 k R12
V2
k1 = 1.0
k2 = 0.0 1.0 k
k3 = 0.0 2.5
Vpk = 4.0
Period = 10 u
x101 VP1
1.505
1.500
1.495
1.490
1.485
1.480
1.475
1.470
9.5 10.0 10.5 11.0 11.5 12.0
x10-3
1.480
1.478
1.476
1.474
1.472
1.470
1.468
9.5 10.0 10.5 11.0 11.5 12.0
x10-3
Figure 9.20: Complete Small-signal block diagram of the current sensing mode
s s
ωI (1 + ωz1 )(1 + ωz2 )
Gcon (s) = s s (9.14)
s (1 + ωp1 )(1 + ωp2 )
where ωI is the constant gain and ωz1 , ωz2 , ωp1 , and ωp2 are the new param-
eters to be designed.
krad
ωz1 = (2π)5.06
s
krad
ωz2 = (2π)8.22
s
krad
ωp1 = ω( z) = (2π)6.37
s
krad
ωp2 = (2π)63.6
s
rad
ωI = 17k
s
Figure 9.24 describe the loop gain of the system as a function of frequency.
Note that with the previously discussed changes, high DC gain, switching fre-
quency attenuation, and system stability are all accomplished.
60
Magnitude (dB)
40
20
-20
-40
-60
-80
-100
-45
Phase (deg)
-90
-135
-180
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 9.24: MATLAB Bode Plot of Loop Gains with Voltage Mode Compen-
sation
-10
-20
Magnitude (dB)
-30
-40
-50
-60
-70
-80
90
45
Phase (deg)
-45
-90
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 9.25: MATLAB Bode Plot of Zo for Voltage Mode Compensated System
-10
-20
Magnitude (dB)
-30
-40
-50
-60
-70
-80
-90
-100
90
45
Phase (deg)
-45
-90
-135
-180
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
Figure 9.26: MATLAB Bode Plot of Gvg for Voltage Mode Compensated System
Del = 0.0
Per = 10 u
SW1 Rl L1
250 m 50 u C1
V1 I1 VP1
500 u
Rc
28 SW2 100 m
50 m
C2 R8 C3
R5
33 p 4.5 k 5.5 n
R2 C2 R2 2.0 k
76 k 7.0 n 24 k R7
1.0 k
V2
k1 = 1.0
k2 = 0.0
k3 = 0.0 5.0
Vpk = 4.0
Period = 10 u
1.520
1.510
1.500
1.490
1.480
1.470
9.5 10.0 10.5 11.0 11.5 12.0 12.5 13.0 13.5 14.0
x10-3
x101 VP1
1.515
1.510
1.505
1.500
1.495
1.490
1.485
9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0
x10-3
Overall, due to the fact that regulated voltages are dened over an acceptable
output range, the droop control methods both allow the smallest deviation that
can t in a given tolerance window. Ideally the current sensing droop control is
the most complete method of compensation due to the two loop compensation.
Practically, however, the voltage droop method accurately reduces the output
voltage deviation and is the simplest to implement in terms of components.
1 clear
2 close all
3 format compact
4
5 s = tf('s');
6
7 Vg = 28;
8 R = 3;
9 L = 50e−6;
10 C = 500e−6;
11 rl = 0.25;
12 rc = 0.05;
13 Vm = 4;
14 Vo = 15;
15 D = Vo/Vg;
16
17
18 H = 1/3;
19 w0 = 1/sqrt(L*C);
20 f0 = w0/(2*pi);
21 wc = 1/(rc*C);
22 wr = 1/(R*C);
23 wl = rl/L;
24 Q = sqrt(L/C)/(rl+rc);
25 PWM = 1/Vm;
26 T0 = Vg*H*PWM;
27
28
[2] K. Yao, K. Lee, M. Xu and F. Lee, Optimal Design of the Active Droop
Control Method for the Transient Response, in IEEE Applied Power Elec.
Conf. and Expo., vol. 2, 2003, pp. 718723.
209
210 © Richard Tymerski and Frank Rytkonen, 2017
Part III
211
Chapter 10
The classical control design methodology requires that a system model in the
form a transfer function be available. This is complicated by the fact that often
a suitable model may not be apparent. The following set of labs starts with a
simple system consisting of a single-pole, double-throw switch followed by an
LC lter, proceeds through the modelling of the system and subsequently to the
design of an eective controller. The purpose of this system is to convert a dc
voltage at a higher level to a lower level while achieving a high power eciency,
typically in the 90% range. The system examined is known a Buck dc-to-dc
power converter and is widely used in industry. The endgame is to enclose this
system with negative feedback to produce an eective voltage regulation, in the
face of input voltage and output load variations, and so an eective controller
needs to be designed.
The apparent simplicity of the buck converter belies the modeling challenges
that can be brought to light. The function of the switch in the system is to
produce pulses whose width can be varied. The control of the pulse width is
undertaken by a pulse width modulator (PWM). This is inherently a nonlinear
device since a sinusoidal input produces a sinusoidally modulated pulse train
which contains spectral components not present in the input. In this case, a
so-called describing function analysis is used in modelling the system. This ap-
proach determines the magnitude and phase of the spectral component in the
output which is at the same frequency as the sinusoidal input.
Furthermore the buck converter itself is a time varying system but from basic
considerations we are able to dene an average model which features a number
of dierent transfer functions of interest. In essence the system considered has
213
three inputs and one output (the output voltage). There is one control input
and two disturbance inputs, leading to a total of three transfer functions that
need to be modelled.
Two sets of software tools are used to help with the design and verication
in these labs:
2. PECS: This simulator permits circuit level simulation of the physical cir-
cuit, rather than just its small-signal model, and so more faithfully repre-
sents the operation of the actual system, showing large-signal eects such
as ripple voltage.
The software tools will be used to verify the derived transfer functions and,
in the process, help to obtain a better understanding of the system. The circuit
simulator allows one to see waveforms that closely resemble those that would be
observed in a hardware implementation as large signal eects can also be seen in
the simulation. Having arrived at transfer function models for a system, these
transfer functions are used in the classical control design process and can also
be used to produce time domain simulations. Thus it becomes instructive to see
how well these time domain simulations conform to the simulations obtained
from Matlab resulting from small-signal transfer function models. Becoming
further instructive when observing waveforms of the hardware implementation.
It is the aim of these series of labs to start with a simple system, that is widely
used, and to go through the whole process from understanding system operation
to the end point of reaching a design that incorporates feedback control. A big
picture set of aims for this series of labs is the following:
6. Test the improved system design and understand how and why the im-
provement has been achieved.
Lab 4: Open loop system construction and testing: the Buck dc-to-dc
voltage converter
Lab 1
Before using the PECS simulator, read the documentation which provides an
overview of PECS sucient for this and subsequent labs.
11.2 Circuit #1
The circuit in Figure 11.1 switches a voltage source (V1) ON and OFF to pro-
duce a rectangular wave (appearing across voltage port VP1) which is then
ltered through an LC network which produces a lower dc voltage across a load
(R1). This voltage, monitored by port VP2, will be examined.
This example circuit also illustrates how clock elements can be used to control
switches.
217
Figure 11.1: A pulse generator followed by a second order (LC) lter, (L =
560 µH, C = 100 µF and R = 25 Ω) constitutes a dc-to-dc voltage converter.
(buck_clocks.ckt)
11.2.1 Tasks
1. Construct the circuit in Figure 11.1 in PECS. Leave the initial conditions
for L and C at zero and set the initial state of the switches to ON and
OFF for the top and bottom switches, respectively. (However, the initial
switch state is not important here but must be set to some state prior to
trying to run a simulation). Also, be aware when building the circuit that
connections to components are only made at the nodes of the components
2. Use the following simulation parameters: Final Time = 6e-2, Step Size =
2e-7, Start time = 0, End time = 6e-2. These simulation parameters will
provide a simulation of the circuit for 60 ms (as specied by Final Time )
where recording of the waveform points occur every 200 ns (as specied by
Step Size ) as well as points occurring at switching discontinuities. At the
end of the simulation time points occurring between the Start Time and
End Time will be saved to the hard drive, which will subsequently be read
by the plotting program (PECSPLOT). For the times chosen here, points
from the whole simulation run will be saved. The relatively short Step
Size value chosen results in many points being saved which will produce
smooth output plots.
3. Run the simulation. This can be initiated from the menu items by selecting
Simulation → Run, or more conveniently from the top icon bar by clicking
the (left) script R (which appears in red).
4. Obtain a plot of the waveform across VP2, the output voltage. Looking
at your plot determine the steady state value, that is, the value of the
output voltage at the end of the simulation.
5. We would like to now look more closely at 4 or 5 cycles at the end of the
simulation. Use the Zoom feature in PECSPLOT to isolate these. Access
6. Under the plot obtained in the previous task add the VP1 waveform. Do
this by accessing from the menu items: Plots → Add Plot then select the
desired out from the list of outputs shown.
7. Use the measuring feature (accessed through menu item Plots → Measure )
to nd the peak-to-peak voltage ripple of the output voltage (VP2). Use
the right (→ ) and left (← ) arrows on the keyboard to precisely pinpoint
the maximum and minimum values of the waveform after initially placing
the measurement markers by clicking the left and right mouse buttons.
8. For the waveform of VP1, note the peak amplitude, period and pulse width
of this waveform. Determine the duty ratio of the pulse train. The duty
ratio is dened as the length of the high portion of the pulse, i.e. the pulse
width, divided by the period.
9. Taking the above plots into consideration, explain why you would expect
to get the steady state value you found in task (4).
11.3 Circuit #2
The circuit in Figure 11.2 produces a sawtooth voltage waveform which ap-
pears across the capacitor (C1). This is achieved by using a constant current
source (I1) to charge the capacitor and having the capacitor rapidly discharged
through the resistor (R1) when the voltage has reached a preset level. The ca-
pacitor voltage and current are monitored by VP1 and IP1, respectively.
This circuit illustrates the use of the pulse width modulator element. However,
in this circuit not all features of the modulator are used. The modulator is
basically a comparator with four inputs, two of which connect externally, one
connects to a user set constant value and the last connects to an internal saw-
tooth signal. We will just use one of the external connections and the internal
constant input. (The internal sawtooth signal is not used).
11.3.1 Tasks
1. Construct the circuit in Figure 11.2 in PECS. Note that for the modulator
we are setting K1 = −1 and K3 = 2, with the other modulator parameters
left untouched. The clock element has a Delay = 0 and Period = 210e-6.
2. Use the following simulation parameters: Final Time = 1e-3, Step Size =
1e-6, Start time = 0, End time = 1e-3. Run the simulation.
3. Obtain a plot of the voltage waveform across the capacitor (VP1) and
under this have a plot of the capacitor current (IP1).
4. For the waveform of VP1, note the peak amplitude and period. Given
that K1 = −1, what other factors in the circuit determines the peak
amplitude and why?
11.4 Circuit #3
We will modify the circuit in Figure 11.1 by replacing one of the clocks with a
modulator and a DC voltage source. The modulator output is connected to the
switch control terminal where the deleted clock had been. The added voltage
source's positive terminal is connected to the top input of the modulator. The
negative terminal is connected to ground. The conguration we are seeking is
for the modulator to turn OFF the upper switch (and turn ON the lower switch).
The modulator parameter K1 associated with the top modulator input is set to
K1 = 1. (Also be sure to have K2 = 0 and K3 = 0). We will also specify the
modulator internal sawtooth to have a peak voltage of 5 V, i.e. Vpk = 5.
Also, we will operate the circuit at 50% duty ratio. Determine the value of the
voltage source needed to achieve this, given the parameters stated above.
11.4.1 Tasks
1. Obtain a copy of your schematic. (buck_mod.ckt)
Lab 2
12.2 Background
In classical control a transfer function is used to mathematically describe the
system to be controlled. The LCR network examined in this lab is an important
component of the system we will be using in subsequent labs for which we will
be designing controllers.
System identication is the term used to describe the process by which a
system's transfer function is determined by suitable probing of inputs and ex-
amining the resulting output response. In this lab we will examine the step
response of a second order system to determine the parameters of its transfer
function. We will use a small-signal approach. Small signal refers to the fact
that the response will be examined for a small variation around the DC operat-
ing point which is not necessarily zero. Since the LCR circuit is linear, all small
signal models will be identical. That is, a change of operating point does not
alter the transfer function in this case. Nevertheless we will demonstrate the
small signal approach here.
Note that for an LCR network the transfer function can be easily determined
through fundamental circuit analysis, so the student will use the results obtained
through this procedure to conrm their identied model.
The LCR network examined in this lab is shown in Figure 12.1.
223
Figure 12.1: PECS schematic of the LCR network used in this lab. The
values of the components are L = 560 µH , C = 100 µF and R = 25 Ω.
(LCR_step_0.ckt)
The input is V1, the 5 V voltage source, and the output is the voltage which
appears across R1 which in PECS is monitored by the voltage port VP1. (In
PECS the presence of a voltage port dictates to the simulator the requirement
to store the voltage appearing across this port in the output variables to be
subsequently plotted).
To obtain the small-signal response, a 10% step input will be applied (V1
changes from 5V to 5.5V) and the consequential voltage changes around the
steady state value of the output voltage will be examined.
We will consider a second order transfer function, G (s) , expressed as follows:
1
G(s) = K
a2 s2 + a1 s + 1
We see that there are three parameters a1 , a2 and K that need to be de-
termined by the identication procedure to fully characterize this system. In
the case of a second order underdamped system, that is, a system that features
complex poles. The transfer function can also be written as
1
G(s) = K 2
s
ωn + 2ζ ωsn + 1
q
1 −ζω n t 2
c (t) = 1 − p 2
e cos ω n 1 − ζ t − φ
1−ζ
where φ = tan−1 √ζ .
1−ζ 2
A typical step response for an underdamped second order system is shown
in Figure 12.2.
cmax
1.02cf inal
cf inal
0.98cf inal
0.9cf inal
0.1cf inal
t
Tr Tp Ts
cmax − cf inal
%OS = × 100
cf inal
The variables cmax and cf inal are shown in Figure 12.2.
On the other hand, the settling time, Ts , is the time taken from the initiation
of the step for the output waveform oscillations to remain within a band of ±2%
of the nal value.
We will determine these two measures from a simulation and use them to
subsequently determine ωn and ζ as seen next.
Using the expression for the output step response, the percentage overshoot
can be found to be given by
− √ ζπ
1−ζ 2
%OS = e × 100
Making ζ the subject of the equation leads to:
4
Ts =
ζω n
or
4
ωn =
ζTs
Thus from the simulation plot one can determine the variables cmax , cf inal
and Ts and then utilize the above formulas to nd ωn and ζ.
The nal parameter to be determined is K, which represents the DC (i.e.
zero frequency) gain of the transfer function and is given by
∆c cf inal − c0
K= =
∆v vf inal − v0
where cf inal and c0 represent the nal (steady state) output level after the
step has been applied and the (steady state) value of the output before the
application of the step input, respectively. Similarly for vf inal and v0 which now
refers to the input. We will apply a 10% step input ∆v = 0.5 with vf inal = 5.5
and v0 = 5.
12.3 Tasks
12.3.1 PECS simulation
1. Enter the LCR schematic shown in Fig. 1 into PECS. Note the values of
the components: L = 560 µH , C = 100 µF and R = 25 Ω. Leave the
initial conditions for the inductor and capacitor at zero.
2. Setup the input source to achieve a 10% step of the input voltage. As
mentioned above we will change the input voltage from V1 = 5 V to
V 1 = 5.5 V . To set this up in PECS we need to bring up the V1 element
dialog window by double clicking on the V1 symbol. Enter the initial
value of V1=5 V in the Value parameter space. Next click on the Steps
button and then enter t1 = 0.11 and v1 = 5.5. This is the time at which
and value to which the input voltage V1 will change.
3. To set up the simulation parameters for the simulation click on the menu
item Simulation → Parameters . . . This will bring up a dialog window.
Enter the following parameters: Final time = 0.2, Step Size = 1e-6, Start
Time = 0.101 and End time = 0.2.
6. Using the values from Task (5) determine the percentage overshoot, %OS ,
and subsequently determine the damping factor, ζ, using the formulas
given above.
7. We will now determine the settling time. From your step response plot
0
determine the time value Ts at which further oscillations remain with
±2 % of the small signal nal value. The small signal settling time Ts is
obtained by osetting the time of the step:
0
T s = T s − step time
8. The nal parameter of our model K can next be determined using the
appropriate formula from above. The model is now fully specied.
9. Derive the transfer function of the LCR circuit. This is perhaps most
easily achieved using the impedance divider rule. Obtain your transfer
function in symbolic form. Identify the transfer function coecients K, a1
and a2 which are functions of the component values L, C and R. Complete
the following table and include it in your report:
K
ωn
10. We will now use a simulation function available in Matlab (lsim ) to obtain
the step response in an analogous fashion to that obtained using PECS.
Use the following Matlab code to do this. Be sure to understand each line
of code.
L = 560e-6;
C = 100e-6;
R = 25;
% enter transfer function parameters K, a1 & a2 as functions of L, C and R
K = ?; % transfer function DC gain
a1 = ?; % coefficient of s^1 in denominator polynomial
a2 = ?; % coefficient of s^2 in denominator polynomial
tf_LCR = tf(K, [a2, a1, 1]); % transfer function of the RLC network
figure(2)
plot(ts, ys)
title('Step response')
11. Compare the plots obtained from the Matlab code to that obtained using
PECS.
From From
Response
PECS Matlab function
Feature
Simulation stepinfo
% overshoot
%OS
Settling
Time, Ts
13. In the subsequent labs we will use the LCR network as a low pass lter
but we will include the losses of the inductor which are modelled as an
equivalent series resistance (ESR ). In this task we'll qualitatively assess
the eect of this ESR on the transfer function.
Rederive the transfer function of the network where the inductor L is now
replaced with a series combination of the inductor L and a resistor rL .
Note: in deriving the new transfer function a short cut can be taken by
using the previously obtained transfer function and replacing any term of
sL with sL + rL .
To more easily determine the qualitative eect of loss inclusion in the
transfer function, the newly obtained transfer function is simplied with
the approximation:
R + rL ≈ R
(a) DC gain?
Reference:
th
[1] Norman S. Nise, Control Systems Engineering, 7 edition. Pages 173
176.
Lab 3
13.1 Objectives
The circuit simulator PECS will used to examine and characterize the steady
state operating conditions of the dc-to-dc buck converter and will aid in the
conrmation of the system transfer functions. The open loop response to step
changes in the input voltage as well as step load changes are also examined us-
ing both PECS and Matlab. Matlab will also be used in examining the system
transfer functions. Through these simulations the student will gain a better
understanding of the operation of the buck converter circuit. The transfer func-
tions veried here will be used later to design eective closed loop feedback
control.
13.2 Background
The LCR network examined in the previous lab is used together with a single
pole, double throw switch to derive a power processing circuit known as the
dc-to-dc Buck converter. This circuit takes a dc voltage source at the input and
transforms it to a lower value dc level at the output, whilst achieving a high
power eciency, typically in the 90% range. This is possible through the use of
a high frequency switch.
The schematic of the buck converter is shown below in Figure 13.1. The con-
verter schematic has been divided into 3 sections: 1) the input voltage source,
Vg , 2) the single-pole double-throw switch, and 3) the LCR network which com-
231
prises the low-pass lter. To more accurately model the losses in the inductor a
series resistor, rL , is included. The output load to which the power is delivered
in represented by resistance R.
0
The length of time remaining until the end of cycle is D0 T s where D ≡ 1−D.
So we see that through the switching action the voltage vs appearing at the
input of the low pass lter is a rectangular wave. The output of the lter is
predominately a constant dc level, which corresponds to the average of the input
waveform, together with a small ripple which represents the unltered residuals
of the input waveform. Neglecting losses (which generally will be very small by
design) the dc output voltage is given by V = DVg . Given the range of D we
see that the output can be adjusted from 0 to Vg . Control of the output voltage
is achieved by variation of the duty ratio. To denote a time varying quantity a
lower case symbol will be used and thus a varying duty ratio is denoted by d.
Also, to further highlight a signal that represents a deviation around a steady
state average, we will use a caret `^', so that dˆ is the small signal deviation
around the average duty ratio D. Therefore, the time varying duty ratio d (t )
is comprised of an average (DC) value together with a deviation dˆ around this
average so that d = D + dˆ or alternatively, dˆ = d − D.
(a)
(b)
Figure 13.2: (a) PWM comparator, (b) comparison of the control signal, vc ,
with the sawtooth waveform vsaw , results in a variable pulse width rectangular
waveform used to drive the switch in the buck converter.
v̂ v̂ dˆ
= Gvd · GP W M = ·
v̂c dˆ v̂c
where the caret (^) has been used to denote a small signal signal quantity.
Note that since the modulator is nonlinear, a so-called describing function anal-
ysis method is used to determine the transfer function which ends up being a
(frequency independent) constant gain given by:
dˆ 1
GP W M = =
v̂c VM
The control-to-output transfer function plays a very important role in con-
trol design as it forms part of the loop gain which is important to stability and
achieving good stability margins (both phase and gain).
v̂
2. output load current to output voltage transfer function:
îo
= −Zout
These transfer functions quantify how variations in the input quantity at
various frequencies propagate to the output. That is, how much of an aect
does input voltage variations or load current variations have on the output volt-
age. Ideally, in a voltage regulator system as we are considering here, we would
like this to be zero. In this lab we will examine the Bode magnitude response to
see what level of transmission is achieved in open loop operation. With a prop-
erly designed control system incorporating feedback, these input disturbance
propagations through the system will be greatly diminished.
A block diagram model of the buck converter transfer functions which will
be used in a later lab for controller design is shown in Figure 13.4. In this lab
we'll do a partial verication of these transfer functions comparing them with
previously derived results.
Figure 13.4: Block diagram model of the Buck converter along with the pulse
width modulator.
For transfer functions Gvg and Gvd considering the signal ow from the input
through to the output of the converter, one can readily assume a form as follows
v̂s v̂
Gvg (s) = · = Kvg ·GLP F (s)
v̂g v̂s
v̂s v̂
Gvd (s) = · = Kvd ·GLP F (s)
dˆ v̂s
where v̂s represents the small signal voltage variations at the input of the
output lter and where Kvg and Kvd are constant gains and GLP F (s) represents
the transfer function of the second order low pass LCR lter which, as seen in
the previous lab, is given by
1
GLP F (s) = 2
s
ωn + 2ξ ωsn + 1
Note that the damping ratio, ξ, now includes the eect of inductor losses, as
considered at the end of Lab. 2, by including rL , the inductor ESR (equivalent
series resistance). Constants Kvg and Kvd represent the eect of the switching
elements in propagating variations of the input voltage level (for Gvg ) or vari-
ations of the duty ratio (for Gvd ) to the input of the low pass lter. Kvg and
Kvd represent the DC gain of the relevant transfer functions and will be found
through simulation below.
1
Zout = (sL + rL ) k k R
sC
You will be asked to evaluate this in a latter task.
(a) (b)
Figure 13.5: Buck converter conguration during (a) the rst subinterval, DT s ,
and (b) the second subinterval, D0 T s .
io = Io + îo
where the capitalized symbol refers to the DC steady state value and the
term with a caret (^) indicates a small-signal variation. A similar expression
can be written for the output voltage: v = V + v̂
Figure 13.6: The eect of output current variations,îo , causing output voltage
variations, v̂ , is quantied by transfer function −Zout .
Consequently the small signal transfer function for the output impedance
Zout is given by
v̂
Zout =
−îo
v̂
and consequently the transfer function of interest which we would like to
îo
determine is given by
v̂
(s) = −Zout
îo
Note however that in the simulation (and later in the lab with the hardware
implementation), in order to achieve output current variations we will be step-
ping the load, that is, changing the load resistance between two dierent values.
This however causes the system transfer functions to be modied somewhat.
However, as seen in Lab. 2 the major change that occurs is that of varying
the damping factor of the circuit. Nevertheless considering the convenience of
performing a step load change in the lab, the approximation considered here
will be accepted.
Figure 13.7: PECS schematic of the Buck converter with pulse width modulator.
(Lab3_1.ckt)
(b) The peak-to-peak output voltage (this is the output voltage `ripple')
Explain how the duty ratio is set in the circuit, given the current param-
eters of the sawtooth waveform.
3. Kvg and Step input voltage change: We will now determine constant
Kvg using a step change of the input voltage and monitoring the resulting
output voltage change, as was previously done in Lab 2. Recall from Lab
2 that
∆c cf inal − c0
Kvg = =
∆v vf inal − v0
where cf inal and c0 represent the nal (steady state) output level after the
step has been applied and the value of the output before the application of
the step input, respectively. Similarly for vf inal and v0 which now refers
to the input. We will apply a unit step input ∆v = 1 with vf inal = 11 and
v0 = 10.
To set this up in PECS we will introduce two step changes in the input
source. Bring up the input source (V1) parameter dialog window click on
the Steps . . . button and set t1 = 0.025 with v1 = 11 and t2 = 0.04 with
v2 = 10. We'll also change the simulation parameter Start Time = 2.001e-
002. Obtain the simulation plot and subsequently determine K vg using
the above equation. Also determine the maximum peak-to-peak output
voltage deviation ∆v and steady state error, SSE. The SSE is simply the
absolute dierence between the steady state values before and after the
input change, so this is represented by |cf inal − c0 |. For an example of how
these are determined see the note below. The SSE is somewhat misnamed
in the open loop context we have here but this metric will be used later
in comparison with closed loop contexts where the steady state output
voltage is desired to remain unchanged in the presence of a disturbance
input. (Lab3_1b.ckt)
Run the simulation and obtain a plot of the driving sinusoid (VP3). Con-
rm that the amplitude and frequency are as desired. Now use the add
plot feature in PECSPLOT to add the plot of the output voltage (VP1)
below the current plot. Obtain peak-to-peak measurements of the two
waveforms and determine the voltage gain. Take note of the phase rela-
tionship between the two waveforms. Are they in-phase or out-of-phase?
Considering the inuence of the PWM gain, determine Kvd . Hint: From
previous discussions (and also from Figure 13.4) we see that the gain found
is given by
v̂
(s) = GP W M · Gvd = GP W M · Kvd GLP F (s)
v̂c
1
With GP W M = VM (with VM known) and for the frequency used at
well below the low pass lter corner frequency such that GLP F ≈ 1, the
parameter Kvd may be easily determined.
5. Step load change: We next examine the output voltage change to a step
in load. This test can be easily performed for an actual circuit and so will
be undertaken subsequently on the hardware in the lab and will form the
basis for examining how well the application of feedback improves on the
open loop performance.
6. Matlab
In the following tasks we will analyze the open-loop system using Matlab.
We'll examine both disturbance input transfer functions and also use Mat-
lab to perform time-domain simulations based on these transfer functions.
In the model for the PWM modulator use a peak-to-peak ramp amplitude
value of VM = 5.
Transfer functions
(a) Loop gain: Under the condition that there is no compensator, i.e.
Gc = 1 and the desired output voltage and reference voltages are,
V
V = 5 and Vref = 2.5, respectively so that H(s) = ref
V = 2.5
5 = 0.5,
determine the loop gain transfer function and use the Matlab margin
command to obtain the Bode plot of this (uncompensated) loop gain.
Have the plot display frequency in Hz. The command will also obtain
the unity gain and −180◦ phase crossover frequencies and the phase
and gain margins of the system. Make note of these in your report.
Matlab code to do this:
s = tf('s');
G_loop = ?; % input your loop gain expression as a function
of s
figure(1)
margin(G_loop)
h = gcr;
(b) Input voltage to output voltage: Using the model for the (open-
loop) input source voltage to output voltage transfer function, Gvg ,
use the Matlab bodemag command to obtain the magnitude frequency
response of this transfer function (with frequency in Hz).
(c) Output current to output voltage: Using the model for the
(open-loop) output current to output voltage transfer function, −Zout ,
use the Matlab bodemag command to obtain the magnitude frequency
response of this transfer function (with frequency in Hz).
Be sure to include your Matlab code for (b) and (c) in your report.
These magnitude responses show the gain at various frequencies of in-
put disturbance in propagating to the output. With the subsequent
incorporation of feedback these responses will be greatly reduced.
Ideally we would like the response to be zero across all frequencies.
Needless to say that this cannot be achieved perfectly in practice.
Open-loop simulations:
Note that the following simulations obtained using Matlab are based
on the small-signal model only. Thus DC conditions and large sig-
nal eects are not modelled and consequently do not show up in the
simulations. In order to more easily compare the Matlab simulations
with those obtained from PECS we will simply add the average con-
verter output voltage to the response obtained from Matlab.
(d) Input voltage step response: Use the transfer function obtained
above for Gvg to obtain the response to 10% step input voltage
change. Since the nominal input voltage level is 10 V, we there-
fore will use a unit step input. Use the Matlab lsim command to
perform this simulation. Determine the maximum peak-to-peak out-
put voltage deviation, ∆v , and steady state error, SSE. Matlab code
to do this:
Vg = 10;
D = 0.5;
V = D*Vg;
s = tf('s');
Gvg = ? ; % input your expression for Gvg as a function of s
t = linspace(0.02, 0.06, 1000);
Vg_diff = 1;
u(ind) = u(ind) + Vg_diff;% form input vector containing the step
figure(2)
y = lsim(Gvg, u, t); % simulate the step response
plot(t,y+V) % add steady state voltage to the output and plot it
s = tf('s');
Zout = ? ; % input your expression for Zout as a function of s
Vg = 10;
D = 0.5;
V = D*Vg;
Io_1 = V/25; % load current before step. (25 ohm load)
Io_2 = V/5; % load current after step. (5 ohm load)
Io_diff = Io_2 - Io_1; % current step
t = linspace(0.02, 0.06, 1000);
u = zeros(size(t));
ind = find(t>=0.025 & t<=0.04);% step is between 0.025<t<0.04
13.5 Note
Computing maximum peak-to-peak output voltage deviation, ∆v , and
steady state error, SSE :
With reference to Figure 13.10 we see that the output voltage before the
input step is at 5 V (see value at time = 0.2646). The input step occurs at time
0.30 causing the output to oscillate between max and min values of 5.996 and
3.199 before settling to new steady state output value of 4.816. Subsequently
the input step reverts to its initial value at time 0.34 resulting in oscillations
occurring between max and min values of 6.617 and 3.82. The quantity ∆v is
determined as the dierence between the maximum and minimum deviations in
the step response, so that ∆v = 6.617 − 3.199 = 3.418 V. The SSE (steady state
error) is determined as the dierence in the two steady state values, so that SSE
= 5.0 − 4.816 = 0.1840 V.
Figure 13.10: The plot shows the output voltage response to an input step
change. This response is used to determine the maximum peak-to-peak output
voltage deviation, ∆v , and steady state error, SSE.
PECS Matlab
Tasks (3) and (5) Tasks (6d) and (6e)
vg step: ∆v
vg step: SSE
iout step: ∆v
iout step: SSE
Provide answers to the following questions regarding the step response re-
sults:
1. Comparison of the results for ∆v for iout step changes obtained from
PECS and Matlab dier more than one might expect. Provide a reason
why. (Hint: look closely to how this is modelled).
13.7 Postscript
In this lab we have developed a linear model for the buck converter system which
resulted in deriving three transfer functions: 1) Gvd , 2) Gvg and 3) −Zout . These
transfer functions quantify how the duty ratio control input, dˆ, and other (dis-
turbance) inputs, v̂g and îo , cause output voltage variations, v̂ . The pulse width
modulator `describing function' is much more involved to determine despite the
simplicity of the nal result being a constant, which was given here without
Lab 4
14.1 Objectives
To build and examine the operation of an open loop dc-to-dc buck converter.
This system converts a dc voltage level to a lower dc voltage level at high power
eciency. We will examine the performance of this circuit to step load changes.
This will establish a baseline level of performance by which the closed loop
designs of later labs will be judged.
14.2 Background
The open loop dc-to-dc buck converter circuit to be constructed is shown in
Figure 14.1 where the individual function blocks are identied. There are several
function blocks that are discussed below:
1. Buck converter power stage: This contains the LC lter and load re-
sistance as well as the switches. The single-pole, double-throw switch of
the buck converter is implemented using a mosfet and diode combination.
(a) Buck converter mosfet: high power mosfet with low RDS(on) value.
(b) Diode: this needs to be fast reverse recovery power diode. The diode
that has been specied is a Schottky diode which features a very
249
Figure 14.1: Schematic of the open-loop dc-to-dc buck converter.
(d) Capacitor: this should be a high quality capacitor with a low ESR.
Note also that the load resistances need to handle the power that they
will dissipate, so the specied power rating needs to be observed.
2. Load switching mosfet: The load will be switched between two dierent
values in order to examine the stepped-load performance of the converter.
Switching of the load is done by turning ON and OFF a mosfet which
is in parallel with a portion of the load. This mosfet is controlled by an
external square wave generator.
3. Mosfet driver: this is required in order to drive the mosfet with sharp
step transitions at a high frequency. It interfaces between the comparator
and the buck converter power mosfet.
The adjustable DC allows for the duty ratio, which controls the buck
converter, to be set. An external AC signal may be fed into the circuit
which superimposes the AC on top of the DC level. The resulting AC
modulated duty ratio will be see in the buck converter output voltage.
14.3 Tasks
We will construct the circuit in a step-by-step fashion and test each function
block as it is constructed. Note that we will be using two dierent power supply
sources. A 10 V high current source is needed for the buck converter and a 15
V low current source will power the rest of the circuit. A number of tasks below
ask that you take a screenshot (or a photo) of the waveform(s) appearing on the
oscilloscope. If this is not possible you'll need to neatly sketch the waveform
providing voltage level and time period annotations.
(a) After you assemble the circuit, use an oscilloscope to monitor the
sawtooth voltage waveform across the charging capacitor, C4. Adjust
the potentiometer (VR2) to obtain a frequency of 40 kHz.
(b) Take a screenshot of the sawtooth waveform. What are the mini-
mum and maximum voltage levels of the sawtooth? The peak-to-
peak voltage dierence represents VM in our modelling of the PWM
modulator.
(a) Assemble the circuit. At this time we will open jumper J1 and
close jumper J2. Also the just-constructed sawtooth generator signal
should be connected to the non-inverting input of the comparator.
(b) Based on the sawtooth waveform you've just observed, what range of
duty ratios are you able to achieve by varying the Duty Ratio Adjust-
ment potentiometer (VR1) from one extreme to the other? Show how
you can calculate this. Conrm your results in the lab. Note that
the duty ratio is dened by the length of the high time of the pulse
that appears at the input of the output lter as a ratio of the period.
Due to use of a p-channel mosfet in the buck converter power stage a
low comparator output corresponds to the mosfet turning ON, which
produces the high portion of the pulse, the time interval of which
determines the duty ratio, as was just mentioned. Therefore, use
this time interval of the low voltage level at the comparator output
divided by the square wave period as the duty ratio value.
(c) Use an oscilloscope to monitor the output of the LM311 (pin 7). Vary
the duty-ratio adjustment potentiometer (VR1) to set a 50% duty
(a) Connect the two transistors and resistor of the mosfet driver to the
10 V power supply. We will connect the just-constructed comparator
circuit by closing jumper J1 and opening jumper J2.
(a) Assemble the Buck converter. (Do not add the load switching mos-
fet at this time). At this point the whole circuit should be fully
functional (without load switching).
(c) To further verify proper functioning of your power stage, use the
oscilloscope to monitor the voltage across the output load, the series
combination of the 5 Ω and 20 Ω resistors. Determine its DC value. Is
this in accordance with the duty ratio value that you had previously
set up?
(d) For even further verication of the proper operation of the circuit we
will inject a small sinusoidal waveform that will modulate the duty
ratio, the eect of which will be seen in output voltage. Recall that
this was done previously via PECS simulation in Lab 3. You'll be
now able to conrm the results obtained there.
Also take note of the phase dierence between the output and the
input. Is the output in-phase or out-of-phase with the input at the
chosen frequency? In this task we simply want to verify whether the
signal is being inverted in this signal path. In the next lab we will be
closing the loop with negative feedback via a compensator so we will
need to determine whether the compensator will need to provide the
◦
180 phase inversion. What is your assessment of this?
At the present point you should have a fully functional dc-to-dc converter
which is converting the 10 V DC input to a 5 V DC output across the
series resistor combination of 5Ω and 20 Ω (for a total of 25 Ω) load.
(a) We will now attach the load switching mosfet circuit and further
connect it to a square wave generator which provides a 5 V amplitude
signal at a low frequency. The square wave lower voltage level should
be 0 V and the higher voltage level should be 5 V. The frequency
should be adjusted so as to see the full settled output response of the
converter. (A square wave frequency in the range of 50 Hz to 100 Hz
should be ne). The mosfet will be turning ON and OFF shorting
out the 20 Ω resistor in the load. Thus the output current will be
5 V 5 V
pulsing between
25 Ω = 0.2 A and 5 Ω = 1 A (ignoring output
voltage changes).
(b) The varying load current will cause the output voltage to vary. Take
a screenshot of the output voltage response. Determine the maximum
peak-to-peak output voltage deviation, ∆v , and the steady state er-
ror, SSE. If necessary, please see the note in Lab. 3 concerning how
to determine these quantities.
14.4 Results
(a) Complete the following tables to summarize your waveform observa-
tions in the previous tasks.
(b) To see how well our prior simulations conform to practice complete
the following table:
(c) Write your observations concerning the io step response results and
provide explanations for any discrepancies you see.
Inductor: The 560 µH inductor is manufactured by Bourns Inc. and has part
number 2200HT-561-V-RC. It has a maximum DC resistance of 230 mΩ. We
have used this value in our modeling. This is the only parasitic element that
is included in our system model. This was done as it has appreciable eect on
load regulation, i.e. output voltage variation due to load changes.
Diode: The diode used is manufactured by Sanken and has part number RA
13V1. It is a Schottky diode with a fast switching recovery time of less than
500 ns, and has a forward conduction drop of just 360 mV @ 2 A. This compares
very favorably compared to the 0.6 V to 0.7 V conduction drop of the average
silicon diode. Thus further minimizing parasitic eects.
Load resistors: The values and power ratings of the load resistances are
5 Ω, 5 W and 20 Ω, 2 W .
Lab 5
15.1 Objectives
To build and examine the performance of a closed-loop dc-to-dc buck voltage
regulator. A simple compensator is provided. (In the next lab this will be
replaced by a better performing, albeit more complicated, compensator designed
by the student). First an analysis of the system using the closed loop transfer
functions is examined. Subsequently a simulation of the closed loop system is
performed both at the transfer function level, using Matlab, and at the circuit
level, using PECS. Having rst gained an appreciation of the operation of the
circuit and the performance of the system through simulation, next a hardware
implementation is built and performance is examined in the laboratory and
results are compared with those previously obtained by simulation.
15.2 Background
The dc-to-dc converter together with the PWM modulator, introduced in Lab.
3, is now operated in closed loop as depicted in Figure 15.1. As seen in this
gure, the output voltage (the controlled variable) is scaled (via the resistive
divider comprising Ra and Rb ), fed back and compared with a reference voltage
producing an error signal. This signal is next processed through the feedback
compensator (also known as a frequency compensator) which produces the con-
trol signal to the converter via the PWM modulator.
The output voltage of the system, v , is a function of its three inputs: 1) duty
ratio, d, 2) input source voltage, vg , and, 3) load current, io . So that
257
Figure 15.1: Closed loop dc-to-dc buck converter voltage regulator
Figure 15.2: Closed loop dc-to-dc buck converter voltage regulator block dia-
gram
Gc (s)
dˆ = (v̂ref − H (s) v̂)
VM
where v̂ref is the reference voltage (which in a regulator system is constant, so
later we will set v̂ref = 0). When substituted and rearranged, the above results
in:
1 T (s)
Gvref _CL (s) =
H(s) 1 + T (s)
Gvg (s)
Gvg_CL (s) =
1 + T (s)
Zout (s)
Zout_CL (s) =
1 + T (s)
Where T (s) is the loop gain given by:
1
T (s) = · Gc (s) · Gvd (s) · H(s)
VM
Alternatively, these closed loop transfer functions could also have been straight-
forwardly derived by a block diagram reduction of Figure 15.2.
The open loop transfer functions for the converter and modulator are summa-
rized in Table 15.1.
2 √
s s LC √1
∆ (s) = 1 + ω0 Q + ω0 , Q= L ,
rL C+ R
ω0 = LC
v̂ Vg
Gvd ,
dˆ ∆(s)
v̂ D
Gvg ,
v̂g ∆(s)
v̂ sL
rL 1 + rL
−Z out , −
îo ∆(s)
dˆ 1
GP W M ,
v̂c VM
Rb
H(s)− feedback gain
Ra + Rb
The system to be analyzed and built in this lab is shown in Figure 15.4. This
is a modication of the open loop circuit examined in Lab. 4. A number of
elements have been added to the open-loop circuit:
2. Divider: this is a resistive divider which takes the output converter volt-
age and divides it to produce a lower level voltage which will be compared
to a suitable reference voltage. From a control theoretic point of view, this
is denoted as the feedback gain in the standard non-unity gain feedback
block diagram.
The compensator used in this lab is the integral compensator, which is shown
in its usual form in Figure 15.3. The transfer function for this compensator is
given by:
1
Gc (s) = −
RCs
15.3 Tasks
15.3.1 Pre-Lab
In the following tasks we will analyze the closed-loop system. For the PWM
modulator model use the peak-to-peak ramp amplitude value VM that you mea-
sured as part of Lab. 4.
iii. Construct the (composite) asymptotic Bode plot for the com-
pensated loop gain. Do this by graphically combining the plots
of (i) and (ii). Don't forget to annotate the sketch. Using this
(a) Input voltage step response: Use the transfer function previously
obtained for Gvg_CL to obtain the output step response for a 10%
(b) Output current step response: Use the transfer function previ-
ously obtained for −Z out_CL to determine the step response for a
step load change. If required, refer to Lab. 3 to see how to determine
the current load step value and to see how it can be used with the
Matlab lsim command to perform step response simulation. Obtain
the step response plot and determine the maximum peak-to-peak
output voltage deviation, ∆v , and steady state error, SSE.
15.3.3 Post-Lab
6. In your report include the following tables to succinctly summarize your
results.
(a) In the following table, summarize results of your loop analysis ob-
tained by
Asymptotes
Matlab
(b) To compare the step response results obtained by the three ap-
proaches summarize them in the following table:
Matlab PECS
Lab
Simulation Simulation
vg : step ∆v Unavailable
vg : step SSE Unavailable
iout : step ∆v
iout : step SSE
7. The next two tasks (i.e. Tasks (8) and (9)) are optional. Consider doing
either one or both. They examine the performance of the system using
alternative compensators. In Task (8), the performance of a proportional
compensator i.e. Gc (s) = −Kp , where Kp is a constant, is examined. In
s
1+
Task (9), a lead compensator, where Gc (s) = −K 1+ ωsz where ωz and ωp
ωp
The zero and pole frequencies are given by ω z = R11C1 and ω p = R21C2 and
K= R 2
R1 . Use R1 = 22 kΩ, R2 = 820 kΩ, C1 = 4.7 nF and C2 = 12 pF.
Repeat tasks (1) to (6), to examine the performance of the lead controller.
15.5 Note
The op-amp used in the compensator, i.e. the CA3140, was chosen since, as
stated in the datasheet, it has a common mode input voltage capability down
to 0.5 V below the negative supply terminal which is more than adequate for
our use of a 2.5 V reference voltage at one of its input terminals. Other op-amps
do not fair so well so one needs to bear this in mind in seeking a substitute for
this device.
Lab 6
16.1 Objectives
This is the nal in this series of six labs culminating in the design of an eective
frequency compensator for a practical feedback system. There are four main
objectives:
3. Building the complete feedback system in the lab and subsequently testing
it.
(c) Closed loop with `dominant pole plus lead' compensation (Lab. 6
(this lab))
269
16.2 Background
For this lab we start with the circuit implementation of Lab. 5. The integral
compensator in the Lab 5 circuit will be replaced with a `dominant pole plus
lead' compensator that will be designed in this lab. The compensator has a
transfer function given by:
ω0 1 + ωs1 1+ s
ω2
Gc (s) = −
s 1 + ωs3
Figure 16.1: `Dominant pole plus lead' compensator to be designed in this lab.
The poles and zeros of the compensator in terms of component values are given
by:
1
ω0 =
R1 (C2 + C3 )
1
ω1 =
R 2 C2
1
ω2 =
R 1 C1
1
ω3 =
R2 C2 C3
C2 +C3
Ki
Gc (s) = Kp + + Kd s
s
where the third (derivative) term has now been added. Note however that this
third term, on its own, is non-causal and therefore not realizable. To remedy
this, it is customary to associate a high frequency pole with this term. This
results in the following for the total PID compensator
Ki Kd s
Gc (s) = Kp + +
s 1 + as
where a represents the added high frequency pole. The above may be arranged
in quotient form
16.3 Tasks
16.3.1 Pre-Lab
1. Design of feedback compensator: Design a `dominant pole plus lead'
compensator for the system. The compensator should achieve a phase
margin ≥ 45◦ and gain margin ≥ 10 dB. The loop gain bandwidth (i.e.
1
the unity gain crossover frequency) should be set at
8 of the switching
40 kHz
frequency, i.e.
8 = 5 kHz. Note that use of this compensator, which
features a pole at zero, assures a performance characteristic of zero steady
state error to step inputs. Fully document your design procedure.
Use the asymptotic Bode plot method to design your compensator. This
methodology involves using asymptotic Bode plot construction of the
desired loop gain from which simplied equations may be derived for use
in the design process. It does not inherently rely on trial and error
iteration and so you are requested not to use such an approach. In the
text by Tymerski & Rytkonen the methodology is discussed for the
suggested compensator for the buck regulator in a section entitled
Dominant Pole with Lead Compensation. There are two design
In the following tasks we will analyze the closed-loop system using Matlab
and PECS.
(b) Output current step response: Use the transfer function ob-
tained above for −Z out_CL to obtain the step response for a step
load change. If required, refer to Lab. 3 to see how to determine
the current load step value and to see how it can be used with the
Matlab lsim command to perform step response simulation. As with
the input voltage step simulation add the average output voltage to
the simulation to simplify the comparison with the PECS simulation
which follows. Obtain the step response plot and determine the max-
imum peak-to-peak output voltage deviation, ∆v , and steady state
error, SSE.
(b) Output current step response: Apply the load switching signal
and observe the output voltage response. Adjust the frequency of
load switching, if necessary. Take a screen shot of the output volt-
age response. Determine the maximum peak-to-peak output voltage
deviation, ∆v , and steady state error, SSE.
16.3.3 Post-Lab
Results:
6. In your report include the following tables to succinctly summarize your
results.
(a) In the following table, summarize results of your loop design obtained
by
i) Asymptotes
ii) Matlab
(b) Summarize the performance of your design. We will also take the
opportunity to compare the results with those obtained from previous
labs.
iii. Closed loop with `dominant pole plus lead' compensation (Lab.
6, this lab)
SSE : steady state error voltage result obtained from the LAB,
PECS or MATLAB.
*This is the open loop (uncompensated) system. That is, unlike the
other two systems feedback is not applied. It is included here to see
how well feedback control is able to improve on open loop control.
List of Parts
277
No. Item
C1 100 µF capacitor
electrolytic
C2 100 µF capacitor
Kemet A758EK107M1AAAE016
C3 10 nF capacitor
C4 3.3nF capacitor
C5 1 µF capacitor
C6 1 µF capacitor
C7 1 µF capacitor
C8 1 µF capacitor
C9 22 nF capacitor
D1 Power Schottky Diode
Sanken RA 13V1
D2 1N5222 2.5 V Zener Diode
D3 1N5222 2.5 V Zener Diode
L1 560 µH inductor
Bourns Inc. 2200HT-561-V-RC
1
R1 1 kΩ 16 W Resistor
R2 5 Ω 5 W Power Resistor
R3 20 Ω 2 W Power Resistor
1
R4 Ω 16
47 W Resistor
1
R5 2.7 kΩ
16 W Resistor
1
R6 560 Ω
16 W Resistor
1
R7 4.7 kΩ
16 W Resistor
1
R8 3.3 kΩ
16 W Resistor
1
R9 220 kΩ
16 W Resistor
1
R10 12 kΩ
16 W Resistor
1
R11 100 kΩ
16 W Resistor
1
R15 1 kΩ
16 W Resistor
1
R16 1 kΩ
16 W Resistor
Q1 Q2N2222 NPN Transistor
Q2 Q2N2907 PNP Transistor
Q3 IRF 9530 P-Channel MOSFET
Q4 IRF 530 N-Channel MOSFET
Q5 Q2N2907 PNP Transistor
U1 LM555 Timer
VR1 10kΩ Variable Resistor
VR2 1kΩ Variable Resistor
X1 LM311 Voltage Comparator
X2 CA3140 Op Amp
279
Lab 1 Grading Sheet
Circuit #1:
1. Your PECS schematic /1
2. Task 4:
(i) VP2 plot /1
(ii) Steady state output voltage value /1
3. Tasks 6 and 7:
(i) Zoomed plot with VP2 and VP1 /1
(ii) Peak-to-peak ripple of VP2 /1
4. Task 8: VP1:
(i) peak amplitude /1
(ii) period /1
(iii) pulse width /1
(iv) duty ratio /1
5. Task 9: Explanation of steady state value /1
Circuit #2:
1. Task 1: Your PECS schematic /1
2. Task 3: Plot of VP1 and IP1 /1
3. Task 4: VP1 (voltage across the capacitor):
(i) peak amplitude /1
(ii) period /1
(iii) Factors determining amplitude and /1
(iv) why? /1
Circuit #3:
1. Task 1: Your PECS schematic /3
2. Task 2
(i) VP2 plot /1
(ii) Steady state output voltage value /1
(iii) Zoomed plot with VP2 and VP1 /1
(iv) Peak-to-peak ripple of VP2 /1
(v) VP1:
(a) peak amplitude /1
(b) period /1
(c) pulse width /1
(d) duty ratio /1
(vi) Explanation of steady state value /1
Total: /40
Total: /45
Total: /70
Report: /5
Total: /50
Total: /55
Report: /9
Total: /100
Modern Control
291
Chapter 17
Introduction
There are three main problems that can be examined in the study of systems
in the controls context: system dynamics, system identication or modeling,
and system control. They develop from the three aspects that are present in
the block diagram of a basic system: input, system, and output [1]. Typically,
two of the three aspects are known, and the third must be determined from the
other two.
In system control, the system is known, and the input to the system that pro-
duces a desired output must be determined. Part II focuses on the fundamental
control problem of regulation for disturbance rejection as it pertains to DC-DC
converters, and uses the uk DC-DC converter as the platform for applying
the various design steps, leading up to a mimimal-order compensator design,
demonstrated in Chapter 23. It is assumed that the reader of this part of the
book is familiar with the classical control system design techniques presented
earlier as the modern control design methods build on a classical foundation.
Note that for the regulation problem, the desired output value is xed, whereas
in the servo problem, the desired output is to track a changing setpoint.
The uk DC-DC converter was chosen as an example system for two main
purposes. This nonlinear switching circuit can act to raise (boost) or lower
(buck) the voltage from input to output, making it a generic DC-DC converter
(compared to converters that can only boost or buck the input voltage, but not
do both). Also, the circuit contains four energy storage devices leading to a
fourth-order system, which creates sucient complexity in an output feedback
compensator to require compensator order reduction. This allows an original
idea regarding order reduction to be presented. Boost or buck converters are
typically implemented with only two energy storage components, and the result-
ing simplicity in compensators designed using modern control techniques either
does not require model reduction or renders one of the techniques presented in
this part of the text practically useless.
Analysis of the uk converter circuit begins in Chapter 18. The control
system analysis and design procedures use MATLAB from The Mathworks,
Inc., and code is presented at the end of each chapter for the relevant chap-
293
ter material. The nonlinear uk switching circuit is modeled as a small-signal
continuous linear time invariant (LTI) system using state space averaging. The
LTI model to be used during the design process is validated by transient com-
parison with a nonlinear circuit simulation to justify the assumption that the
small-signal model would be adequate. The open-loop performance character-
istics are tested, and a set of performance criteria for the closed-loop controlled
system are specied.
Chapter 19 covers pole placement using state feedback. This chapter uses
desired poles given by a lter prototype that is optimal with respect to an
integral performance index and discusses how to select a weighting parameter
that determines the closed-loop pole locations.
Integral augmentation of the state feedback architecture is described in
Chapter 20. This allows the closed-loop system to completely eliminate steady
state error, which could not be accomplished by state feedback alone.
Chapter 21 discusses state estimation using full- and reduced-order observers
to allow for the use of output feedback, as state information is not always
available to the designer.
Chapter 22 shows the application of optimal control and estimation using
linear quadratic methods. These techniques allow the designer to determine
optimal controller and optimal estimator gains. Loop transfer recovery is dis-
cussed as a means to recover desirable frequency-domain stability margins that
are lost when designing an optimal output feedback compensator.
In order to design compensators that can be constructed from a minimum
number of components, Chapter 23 covers order reduction methods. First, a
reduced-order optimal compensator with recovered loop gain is designed. This
step is followed by applying balanced realization and truncation techniques to
eliminate states with little eect on performance, resulting in additional com-
pensator order reduction.
Chapter 24 describes how to implement two of the nal compensator designs
that were created and shows the dierence in analog controller circuit complexity
that can arise from only one additional order in the compensator.
Chapter 25 presents the minimal compensator circuit test results from a
power electronics simulator that prove the performance of the nal controller
design exceeded the original design specications.
Finally, Chapter 26 wraps up Part II of the text with a recap of the methods
presented and their results.
295
296 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 18
System Analysis
Prior to designing a controller for a system, the control system designer must
understand the system's characteristics. For example, is the system open-loop
stable? Are there dominant poles? Are there poles that may be neglected during
design? Is the system controllable using the selected inputs? Can an estimator
be constructed based on the measured outputs? These types of questions should
be answered both intuitively and mathematically prior to embarking on an
attempt to design a controller for the system.
As stated in Chapter 17, the uk DC-DC converter is used here as the
example system for demonstrating the compensator design processes described
in Part II. The starting point is the construction of a mathematical model of
the system in MATLAB. The model is a mathematical description of some or
all of the behavior of the real-world system that is adequate for performing
controller design. State space averaging yields a linear small-signal model for
the nonlinear switching system [1]. Additionally, a nonlinear circuit model was
created in the Power Electronics Circuit Simulator (PECS) software package in
order to validate the performance of the assumed linear model. PECS uses a
schematic-based circuit editor and features its own plotting tool, PECSPLOT.
A note on notation: the zeros, poles, and gains of systems discussed in Part
IV are in the Evans form, i.e., the coecient of the highest power of s in each
factored term is unity and the stated gain is not the DC gain of the system. This
is in contrast to Bode form, where the constant in each factored term is unity
and the DC gain is explicitly stated. Evans form was chosen for convenience,
as it is the form used by zpk systems in MATLAB.
297
Figure 18.1: uk converter with inductor equivalent series resistances.
The inductor currents are the input and output currents, therefore, if the prin-
ciple of conservation of energy is applied:
vo Ds
= (18.2)
vg 1 − Ds
∆ ton
where Ds is the duty cycle of the switch, Ds = ton +tof f . Equation 18.2 shows
that by controlling the duty cycle of the switch (by small-signal deviation d),
the output voltage vo can be controlled and can be higher or lower than the
input voltage vg . By using a controller to vary the duty cycle during operation,
the circuit can also be made to reject disturbances, as will be shown.
di1 di2
vL1 = L1 +M
dt dt
di1 di2
vL2 = M + L2
dt dt
The solutions of the two simultaneous equations are:
di1 L2 −M
= vL + vL
dt L1 L2 − M 2 1 L1 L2 − M 2 2
di2 −M L1
= vL + vL
dt L1 L2 − M 2 1 L1 L2 − M 2 2
For the circuit with equivalent series resistances included in the inductor models
when Q1 conducts:
vL1 = vg − i1 R1
vL2 = v1 − v2 − i2 R2
therefore:
di1 M −M M R2 −L2 R1 L2
= 2
v2 + 2 v1 + 2
i2 + 2
i1 + 2 vg
dt σ σ σ σ σ
di2 −L1 L1 −L1 R2 M R1 −M
= 2
v2 + 2 v1 + 2
i2 + 2
i1 + 2 vg
dt σ σ σ σ σ
with σ2 = L1 L2 − M 2 .
vL1 = vg − i1 R1 − v1
vL2 = −v2 − i2 R2
therefore:
0
x = v2 v1 i2 i1
1 1
− RC
2
0 C2 0
−1
0 0 C1 0
A1 =
− L12 L1
− L1σR 2 M R1
σ σ2 2 σ2
M R2
M
σ2 − σM2 σ2 − L2σR
2
1
0
0
B1 =
M
− 2
σ
L2
σ2
C1 = 1 0 0 0
D1 = [0]
1 1
− RC
2
0 C2 0
−1
0 0 0 C1
A2 =
− L12 M
− L1σR 2 M R1
σ σ2 2 σ2
M
σ2 − Lσ22 M R2
σ2 − L2σR
2
1
0
0
B2 =
− M2
σ
L2
σ2
C2 = 1 0 0 0
D2 = [0]
By representing the duty cycle of the switch as Ds , the following results may
be obtained for a state space averaged model of the uk converter:
∆
Ds0 = 1 − Ds
Vo Ds Ds
= = 0
Vg 1 − Ds Ds
A = Ds A1 + Ds0 A2
B = Ds B1 + Ds0 B2
C = Ds C1 + Ds0 C2
D = Ds D1 + Ds0 D2
X = −A−1 BVg
Bd = (A1 − A2 ) X + (B1 − B2 ) Vg
Dd = (C1 − C2 ) X + (D1 − D2 ) Vg
where the tilde ( ˜ ) indicates a small signal deviation from nominal, and:
x = X + x̃
vg = Vg + ṽg
d = Ds + d˜
vo = Vo + v˜o
−D 1−Ds
0 0 s
C1 C1
A =
Ds L1 +M −Ds M
L1
− 0 0
L1 L2 −M 2 L1 L2 −M 2
M −Ds M −L2 +L2 Ds
L1 L2 −M 2 L1 L2 −M 2 0 0
0
0
B =
− L LM−M 2
1 2
L2
L1 L2 −M 2
C = 1 0 0 0
D = [0]
0
s D Vg
− R(1−D 2
s ) C1
Bd =
Vg (L1 −M )
(1−Ds )(L1 L2 −M 2 )
Vg (−M +L2 )
(1−Ds )(L1 L2 −M 2 )
Dd = [0]
Ds Vg
V2
1−Ds
Vg
V1 1−Ds
X= =
I2 Ds Vg
R(1−Ds )
I1 Ds 2 Vg
R(1−Ds )2
L1 = 0.5 mH
R1 = 0.01 Ω
L2 = 7.5 mH
R2 = 0.01 Ω
M = −1.5 mH
C1 = 2.0 µF
C2 = 20 µF
R = 30 Ω
Vg = 12 V
d = 0.667
f = 100 kHz
ẋ = Ax + Bvg + Bd d (18.3)
vo = Cx
0
x = v2 v1 i2 i1
The state space matrices for the open-loop model from the disturbance input
vg vo are the state space averaged matrices {A, B, C, D}. The state
to the output
space matrices for the open-loop system from the control input d to the output
vo are the state space averaged matrices {A, Bd , C, D}. Thus, the model of the
uk converter has two inputs (a control input d and a disturbance input vg )
and one output (vo ).
The MATLAB model open-loop response to a unit step disturbance in vg is
shown in Figure 18.3. By inspection of the plotted response, it was determined
that the system reached lightly damped oscillations around a steady state DC
value in approximately 20 ms. The steady state value was 26 V, a value predicted
from the gain equation for the uk converter:
Ds
vo = vg (18.4)
1 − Ds
With nominal duty cycle Ds = 0.667, a 1 V step input in vg produces a 2 V
step in the output voltage vo . This shows that the open-loop system does not
reject disturbances on the input voltage vg . Also, note that the output of the
circuit is a lightly damped sinusoid, with an approximate frequency of 1.83 kHz
(11.5 krad/s).
The PECS circuit is shown in Figure 18.4. The simulator was set up to check
the performance of the nonlinear converter in response to a unit step up in vg .
27
26.5
Amplitude (V)
26
25.5
25
24.5
24
0 0.005 0.01 0.015 0.02 0.025 0.03
Time (s)
Figure 18.3: uk converter output voltage response to a unit step disturbance
in vg .
The pole-zero plot of Tvo d is shown in Figure 18.6. All poles and zeros are in
the LHP, therefore the uk converter is a stable minimum-phase system. The
locations for the zeros and poles are:
z = −1490 ± j9000
p = −879 ± j3641, −40 ± j11500
where the zeroes and poles have units of rad/s. The 1.83 kHz ringing in the
output transient caused by the unit step disturbance is due to the frequency
associated with the dominant pole pair at −40 ± j11500 rad/s.
0.5
Imaginary Axis
−0.5
−1
−1.5
−1500 −1000 −500 0
Real Axis
A2 B An−1 B
Mc = B AB ... (18.5)
where n is the order of the system. IfMc is a full rank matrix, the system is fully
controllable. The rank deciency of Mc tells the designer how many modes are
uncontrollable. There is no rank deciency in Mc for the uk converter model,
therefore the system is fully controllable.
Therefore, the nominal duty cycle at the operating point of 24 V for an input
of 12 V is determined to be 0.667. However, the purpose of controller design is
to ensure the output voltage remains within 1% of 24 V despite disturbances in
the input voltage. Since a deviation model is used, the dierence between the
nominal operating duty cycle and the duty cycle required to keep the output at
exactly 24 V may be approximated, and this is shown in Figure 18.7.
0.08
0.06
0.04
∆ Duty Cycle
0.02
−0.02
−0.04
9 9.5 10 10.5 11 11.5 12 12.5 13 13.5 14
Input Voltage (V)
Figure 18.7: The small-signal duty cycle required over the full input voltage
range to maintain nominal output voltage.
It is this change in duty cycle that the controller must provide, as the devi-
ation in duty cycle is the small-signal control input of the uk converter. Thus,
313
314 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 19
Pole Placement
For a system that is completely controllable and where all the states are acces-
sible, feedback of all of the states through a gain matrix can be used to place
the poles at any desired location in the complex plane. The control law used
for state feedback is:
u = −Kx (19.1)
which uses the matrix K to place the poles of the system at desired locations [1].
This type of compensator is said to employ full state feedback (FSFB). A FSFB
regulator is shown in Figure 19.1.
315
19.1 Pole Placement via Ackermann's Formula
Ackermann's formula may be used with single-input, single-output (SISO) sys-
tems like the uk converter. Ackermann's formula is:
This method of determining K may be used with the system in any representa-
tion. It is this method of pole placement that is used in the designs of the state
feedback controllers that follow.
Select pole locations such that a dominant complex pole pair exists. This
technique is generally used when designing tracking systems, for which
the transient time domain requirements (e.g., rise time, overshoot, settling
time, etc.) are able to be recast into desired dominant pole locations.
Select pole locations that have been determined to give a prototype time-
domain response, e.g., lter pole locations.
The latter method is used in this chapter for pole placement with full state
feedback control.
Graham and Lathrop [3] discuss assigning the system poles of higher-order
systems to prototype locations that minimizes a performance index (or cost
function) known as the integral of the time-weighted absolute error (ITAE) to
an input signal:
Z ∞
JIT AE = t |e(t)| dt (19.3)
0
as a measurement metric for each iteration during the design, m can be cho-
sen that produces a steady state error within the performance specication of
1%. Figure 19.2 shows a plot of steady-state error vs. ω, and this gure was
used to select a value of ω that corresponded to 0.24 V (1% voltage regulation).
Initially, a wide range of frequencies was selected with a large increment, then
the range and the increment were made smaller in order to narrow in on the
rst frequency with less than 0.24 V of steady state error, which occurs at ω
= 10115. This prevents moving the poles farther into the left half of the com-
plex plane than necessary to achieve the desired performance. Moving poles
too far results in increases in control eort that may see the control eort hit
a saturation limit in actual systems, e.g., if the duty cycle were to try to go
below 0 or above 1, it could not. The unit step disturbance response of the
system with a full state feedback controller designed in this manner is shown in
Figure 19.3. Note that there is no more than 0.24 V of maximum error to the 1
V step disturbance in input voltage, indicating that the disturbance is rejected
to within the performance specications. The amplitude and settling time of
the transient meet design specications, so this controller has very desirable
time-domain response characteristics. The loop gain of the regulated system is
shown in Figure 19.4, where the loop is broken at the large X shown on the
control input d in Figure 19.5.
1 Frequency-normalization in this case refers to the fact that the minimum natural frequency
given by the pole locations for any of the nth-order set of poles listed (without the frequency
multiplier ω ) is equal to 1 rad/s
0.27
Maximum Absolute Error (V)
0.26
0.25
0.24
0.23
0.22
1 1.002 1.004 1.006 1.008 1.01 1.012 1.014 1.016 1.018 1.02
Frequency Multiplier ω 4
x 10
24.25
24.2
Amplitude (V)
24.15
24.1
24.05
24
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s) x 10
−3
40
Magnitude (dB)
20
−20
−40
45
0
Phase (deg)
−45
−90
−135
−180
1 2 3 4 5
10 10 10 10 10
Frequency (Hz)
Figure 19.4: Loop gain with the full state feedback controller.
Figure 19.5: The full state feedback controller applied to the uk converter.
0.675
0.67
0.665
Duty Cycle
0.66
0.655
0.65
0.645
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s) −3
x 10
Figure 19.6: Control eort with the full state feedback controller.
It can also be seen that the steady-state deviation control eort is approxi-
mately -0.0163, which corresponds roughly to calculations using Equation 18.7.
323
324 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 20
Integral Action
The previous state feedback design for the uk converter resulted in a maximum
error of 0.24 V of due to the 1 V disturbance in input voltage, which is just within
design specications. The steady state error was 0.22 V. Additional gain could
reduce this error, though it could never be eliminated, as the uk converter is
a type 0 system, which means that there will always be some nite steady-state
error to a unit step disturbance or setpoint change, even in a controlled system,
no matter how high the gain. However, it is desirable to eliminate steady-state
error to the unit step entirely if possible. The only way to do this is to have
1
the controller raise the type number . Full state feedback does not introduce
an integrator into the closed loop, therefore does not change the type number.
1 The concept of type number goes hand-in-hand with the internal model principle, which
states that a loop must contain a transfer function that has a model of the signal it is trying
to reject. For example, if trying to reject a unit step 1
s
, at least one transfer function in the
loop must contain 1
s
.
325
Figure 20.1: Generic system controlled with a FSFB regulator and output inte-
gral feedback.
The integrating controller integrates the error between any reference signal
and the output e(t) = r(t) − y(t) and adds it to the state feedback control
R eort
to eliminate steady-state error. The equation for the integrator is xi = edt, or
ẋi = e. Since each row in the state space representation is a rst-order linear
dierential equation, and the integrator adds one new dierential equation to
the system ẋi = −y = −Cx, one new state xi must be added to the state vector
to raise the uk system from type 0 to type 1. The augmented state vector is
[x xi ]0 and the new state space quadruple is:
" #
A 0
A = (20.1)
−C 0
0
B = B 0
C = C 0
D = 0
The control law for this augmented system is u = −kx − ki xi . From the
above modications, the desired poles (with an added desired closed-loop pole
location to account for the pole associated with the integrator) can be used to
determine the state feedback gain, which has the structure K = [k ki ].
The state quadruple for the system augmented with the new state and con-
trolled with the new control law may be derived from the block diagram.
vo = Cx
A − Bd k −Bd ki
Ā = (20.3)
−C 0
0
B̄ = B 0
C̄ = C 0
D̄ = [D]
vo = C̄x
0.248
0.246
0.244
Maximum Absolute Error (V)
0.242
0.24
0.238
0.236
0.234
0.232
0.23
0.228
7500 7510 7520 7530 7540 7550 7560 7570 7580 7590 7600
Frequency Multiplier ω
24.3
24.25
24.2
Amplitude (V)
24.15
24.1
24.05
24
Figure 20.4: Unit step disturbance response of system with FSFBI controller.
Bode Diagram
Gm = Inf , Pm = 75.5 deg (at 3.56e+003 Hz)
60
40
Magnitude (dB)
20
−20
−40
45
0
Phase (deg)
−45
−90
−135
1 2 3 4 5
10 10 10 10 10
Frequency (Hz)
Figure 20.6 shows the change in duty cycle eected by the FSFBI controller
to control the uk converter. Note that the nal value of the control eort
is -0.018. This is the approximate change in duty cycle that is necessary to
completely reject the unit step disturbance in vg as shown in Figure 18.7.
0.67
0.665
Duty Cycle
0.66
0.655
0.65
0.645
0.64
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s) −3
x 10
From this point forward in this paper, all of the example compensator de-
signs will include an integrator term to completely reject the eects of the step
disturbance in vg , and though sometimes not explicitly stated in the compen-
sator name, terms related to the integrator will appear in the state equations
as well as the block diagrams relating to control of the uk converter.
State Estimation
Since an n -th order system requires n states be fed back to the gain matrix K
to allow pole placement anywhere in the complex plane, this requires at least
n measurements of the state variables. This can be prohibitively expensive or
complex. In some cases, the internal system states may not even be measurable.
In general, only the input and output of a system are available to the control
system designer. However, if the system is fully observable, a state estimator
(also known as an observer) may be used to provide estimated state values for
use in feedback control. The use of an observer requires that the state estimates
converge to the actual state values (if starting from dierent initial states) more
rapidly than the system itself responds. The control law used is then:
u = −K x̂ (21.1)
where x̂ indicates that the states fed back into the system are estimates.
In order to quickly force the state estimate to converge to the actual values
of the state from arbitrary initial conditions, a correction term must be applied
to the estimator dynamics such that the error dynamics approach zero rapidly.
e = y − C x̂ (21.2)
= C(x − x̂)
333
Multiplying this error by a gain vector L, the desired state error correction term
is formed, which can then be added to the dynamics of the estimator to form:
= (A − LC)x̂ + Bu + LCx
When L is chosen such that the eigenvalues of A − LC lie in the left half of the
complex plane, the estimator error e→0 as t → ∞. Since the state estimate
must converge to the controlled state faster than the state itself can change, the
eigenvalues of A − LC should be placed farther to the left than the eigenvalues
of A − BK . A good rule of thumb is to make the estimator dynamics at least
twice as fast as the controlled system dynamics.
To form an output feedback compensator based on an estimator, the sepa-
ration principle of controller design holds, which states that the controller gain
K and the observer gain L can be found independently. The proof of this is in
many other references (e.g., [1]), so it shall not be repeated here, but application
shall be made of the principle in the design examples to follow.
When paired with the linear state feedback control law, the estimator-based
compensator is formed. For the case of state feedback without an integral state
added, the compensator is given by:
u = −K x̂
Where the state of the system has been augmented by an integrator state, the
compensator is given by:
x̂˙
A − Bk − LC −Bki x̂ L
= + y (21.5)
ẋi 0 0 xi −1
x̂
u = −k −ki
xi
ẋi = −Cx
x̂˙ = LCx − Bd ki xi + (A − Bd k − LC) x̂
vo = Cx
A −Bd ki −Bd k
Ā = −C 0 0 (21.7)
LC −Bd ki A − Bd k − LC
0
B̄ = B 0 0
C̄ = C 0 0
D̄ = [D]
The step disturbance transient is shown in Figure 21.2. There is more os-
cillatory behavior in the initial part of the transient response compared to the
response under FSFBI control. This is likely caused by the initial estimation of
states and their convergence to the actual state values. Comparison of the set-
tling times shows that they are approximately the same, and the only transient
dierences occur early in the transient.
24.1
24.05
24
Amplitude (V)
23.95
23.9
23.85
23.8
23.75
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s) −3
x 10
Figure 21.2: Unit step disturbance response of uk converter with ESFBI com-
pensator.
The loop gain of the controlled system may be seen in Figure 21.3, where
the loop is broken at the large X shown on the control input d in Figure 21.1.
MATLAB calculations give the gain margin as 5.97 dB and a phase margin
of 26.3◦ . These are signicantly lower than the stability margins of previous
controllers designed, and these clearly do not meet the design specications.
−50
−100
−150
0
Phase (deg)
−90
−180
−270
1 2 3 4 5 6
10 10 10 10 10 10
Frequency (Hz)
0.675
0.67
0.665
0.66
Duty Cycle
0.655
0.65
0.645
0.64
0.635
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Time (s) −3
x 10
Since the uk converter has four states, the observer itself will be a fourth-
order system. Along with the integral state, the compensator becomes a fth-
order system. When evaluating desired observer pole locations, keep in mind
C
P = (21.8)
T
ẋm A11 A12 xm B1
= + u (21.10)
ẋu A21 A22 xu B2
y = xm
K = [km ku ]
Since xm corresponds to the states that appear in the output of the measurement
equation, xu represents the remaining unmeasured states. As xm is present in
the output, these states do not require estimation. This means that a reduced-
order state estimator can be constructed that allows the estimation of xu in
such a manner that all states (either measured or estimated) are available for
feedback via a linear control law:
x̂u = Ly + z (21.12)
ż = Ez + F y + Gu (21.13)
Adding zero to the right side of x̂˙ u in the form of Exu − Exu :
This gives the following equation for the estimator error dynamics when substi-
tuted into the time derivative of the unmeasured error ėu = ẋu − x̂˙ u :
F = A21 − LA11 + EL
G = B2 − LB1
u = −ku z + (−ku L − km )y
Where the state of the system has been augmented by an integrator state, the
reduced-order compensator is given by:
ż E − Gku −Gki z F − Gku L − Gkm
= + y (21.19)
ẋi 0 0 xi −1
z
u = −ku −ki + (−ku L − km )y
xi
ẋ = (A − Bd ku LC − Bd km C) x − Bd ki xi − Bd ku z + Bvg (21.20)
ẋi = −Cx
ż = (F C − Gkm C − Gku LC) x − Gki xi + (D − Gku ) z
vo = Cx
from which were determined the matrices:
A − Bd km C − Bd ku LC −Bd ki −Bd ku
Ā = −C 0 0 (21.21)
F C − Gkm C − Gku LC −Gki E − Gku
0
B̄ = B 0 0
C̄ = C 0 0
D̄ = [D]
where
F = EL + A21 − LA11
G = Bd2 − LBd1
24.15
24.1
24.05
Amplitude (V)
24
23.95
23.9
23.85
23.8
0 0.5 1 1.5 2 2.5 3
Time (s) x 10
−3
Figure 21.7: Unit step disturbance response of uk converter with ROESFBI
compensator.
The loop gain of the controlled system may be seen in Figure 21.8, where
the loop is broken at the large X shown on the control input d in Figure 21.6.
MATLAB calculations give the gain margin as −24.9 dB and a phase margin of
36.5◦ . These clearly do not meet the design specications, and uncertainty in
the system model may make the controlled system unstable.
40
Magnitude (dB) 20
−20
−40
−60
0
Phase (deg)
−90
−180
−270
1 2 3 4 5
10 10 10 10 10
Frequency (Hz)
351
352 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 22
Linear quadratic optimal control uses penalties on state transients x and control
eort u to optimize system performance with respect to a gure of merit deter-
mined by a cost function. There is typically a classical trade-o designed into
the cost function: one cannot have tight control over state transients with small
control eort. In other words, small output transients require large controller
gains (and therefore control eort). Additionally, quadratic forms are used to
ensure that only the magnitude and not the sign of the transient contributes to
the cost determined by the penalty function.
ẋ = Ax + Bu (22.2)
This is known as the linear quadratic regulator (LQR) problem. The weight
matrix Q is an n×n positive semidenite matrix (for a system with n states) that
penalizes variation of the state from the desired state. The weight matrix R is
an m × m positive denite matrix that penalizes control eort. Solutions for the
constrained optimal system can be found in [1], [2], and [3]. The well-published
time invariant solution to this problem is:
K = R−1 B T P (22.3)
353
where P is the unique, symmetric, positive denite solution to the steady-state
algebraic Riccati equation (ARE):
P A + AT P − P BR−1 B T P + Q = 0 (22.4)
The minimum value of the cost function is based on the initial state x0 , and is
given by:
The LQR designed for a SISO system can be shown to possess very desirable
stability properties: it always has a gain margin between {-6 dB, ∞} and a phase
◦
margin of at least 60 . However, it has a high frequency roll-o rate of only 20
dB per decade so the open loop frequency response shows susceptibility to high
frequency noise.
Since the weight matrices Q and R are both included in the summation term
within the cost function, it is really the relative size of the weights within each
quadratic form which are important. Simple inspection of the cost function
shows that multiplying both weight matrices by the same real constant (e.g., κ)
will not aect their ratio. The multiplier κ may be factored out of the integral,
thus returning the cost function to its original form. Thus, the problem of
minimizing κJ becomes the same as minimizing J. Therefore, holding one
weight matrix constant while varying either the individual elements or a scalar
multiplier of the other is an acceptable technique for iterative design. It is good
for the designer to maintain an understanding of the eects of manipulating
individual weights, however. In general, raising the eective penalty a single
state or control input by manipulating its individual weight will tighten the
control over the variation in that parameter, however it may do so at the expense
of larger variation in the other states or inputs.
24.025
24.02
Amplitude (V)
24.015
24.01
24.005
24
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
Time (s)
Figure 22.1: Unit step disturbance response of the uk converter controlled by
LQR.
The loop gain of the controlled system is shown in Figure 22.2, where the
loop is broken at the large X shown on the control input d.
60
Magnitude (dB)
40
20
−20
0
−45
Phase (deg)
−90
−135
−180
0 1 2 3 4 5
10 10 10 10 10 10
Frequency (Hz)
Figure 22.3 shows the control eort produced by the optimal controller.
−0.005
∆ Duty Cycle
−0.01
−0.015
−0.02
−0.025
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
Time (s)
Note that the time of the unit step disturbance transient with the LQR
compensator was signicantly longer than the settling times of the previously
designed compensators. However, the amplitude deviation was signicantly
ẋ = Ax + Bu + ω (22.6)
y = Cx + ν
L = P0 C T R0−1 (22.7)
24.025
24.02
Amplitude (V)
24.015
24.01
24.005
24
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
Time (s)
Figure 22.4: Unit step disturbance response of uk converter controlled by LQG
compensator.
A comparison of the loop gains of the LQR and LQG controlled systems is
shown in Figure 22.5, where the loop is broken at the control input d. Loss
of gain and phase margins has clearly occurred, and the negative gain margin
indicates that the system will no longer be closed-loop stable.
50
Magnitude (dB)
−50
−100
−150
0
LQRI
LQGI
Phase (deg)
−90
−180
−270
0 1 2 3 4 5 6
10 10 10 10 10 10 10
Frequency (Hz)
Figure 22.5: Loop gain of uk converter controlled by LQR vs. LQG.
Figure 22.6 shows the control eort produced by the LQG controller.
−0.005
∆ Duty Cycle
−0.01
−0.015
−0.02
−0.025
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
Time (s)
Ro = 1 and Qo = q 2 BB 0
The fact that the plant must be minimum-phase (all poles and zeros in the
left half of the complex plane and no pure delays) prevents the compensator
designed from being unstable, since the LTR technique moves some of the com-
pensator poles toward the plant zeros where pole-zero cancellation makes them
unobservable. (Other LTR methods may be used with nonminimum-phase sys-
tems by using subspace [8] or loop-shaping techniques [9].) The remainder of the
poles (an excess of poles exists because the plant is strictly proper) move toward
innity in the left-half of the complex plane in a Butterworth lter pattern [10].
The eect of loop transfer recovery is to essentially decouple the observer
from the control input u by raising the observer gain L so that the state estimate
x̂ depends only on the plant output y . This is illustrated in Figure 22.7. The
decoupling is accomplished by the increasing noise intensity on u, which causes
L to increase such that y has a larger contribution to the state estimate.
1 A variety of other methods for LTR have been presented in the controls literature, includ-
ing several which require employment of subspace methods or special coordinate bases [7], [8],
but these techniques are beyond the scope of this work.
In order to accomplish LTR, the loop is broken at the large X on the control
input shown in Figure 21.1. The loop is explicitly shown in Figure 22.8. The
frequency response of the loop from d to d0 is driven to asymptotically approach
the frequency response of the system with LQR control.
Figure 22.8: The loop to be recovered during loop transfer recovery with a
full-order observer.
Figure 22.9 shows the LQGI/LTR iterative design process applied to the uk
Bode Diagram
Gm = 30.2 dB (at 2.5e+005 Hz) , Pm = 61.7 deg (at 1.19e+004 Hz)
100
50
Magnitude (dB)
−50 LQRI
q=100
−100
q=102
−150 q=104
q=106
−200
0
Phase (deg)
−90
−180
−270
0 1 2 3 4 5 6 7
10 10 10 10 10 10 10 10
Frequency (Hz)
[1] B. N. Datta, Numerical Methods for Linear Control Systems. San Diego,
CA: Elsevier Academic Press, 2004.
[2] R. C. Dorf and R. H. Bishop, Modern Control Systems, 10th ed. Upper
Saddle River, NJ: Pearson Prentice Hall, 2005.
[5] J. C. Doyle, Guaranteed margins for LQG regulators, IEEE Trans. Au-
tomat. Contr., vol. 23, pp. 756757, Aug. 1978.
[6] J. C. Doyle and G. Stein, Robustness with observers, IEEE Trans. Au-
tomat. Contr., vol. 24, pp. 607611, Aug. 1979.
[7] B. M. Chen, Theory of loop transfer recovery for multivariable linear sys-
tems, Ph.D. dissertation, Washington State Univ., Pullman, WA, Dec.
1991.
[8] A. Saberi and P. Sannuti, Observer design for loop transfer recovery and
for uncertain dynamical systems, IEEE Trans. Automat. Contr., vol. 35,
pp. 878897, Aug. 1990.
[9] G. Stein and M. Athans, The LQG/LTR procedure for multivariable feed-
back control design, IEEE Trans. Automat. Contr., vol. 32, pp. 105114,
Feb. 1987.
367
368 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 23
Compensator Order
Reduction
With the advent of computer control of systems, high-order system models can
be created that allow model-based control methods (such as observer-based com-
pensators) to be easily implemented. These digital controller implementations
have many advantages over analog controllers, which may be considered to be
outdated. However, analog control can often still be performed at the circuit
level with a few discrete components and may be more cost-eective to imple-
ment when compared to a microprocessor and its associated support circuitry
and programming. Thus, this section examines the idea of controller order re-
duction for use with analog circuitry. It focuses rst on reducing the order of
an LQGI/LTR compensator using model reduction techniques, then design of
an LQGI/LTR compensator using a reduced-order Kalman lter (ROKF), and
nally, application of model reduction techniques to the ROKF-based compen-
sator. This nal two-step order reduction technique has not been previously
seen in the literature.
369
and observability Gramian matrices. In a balanced realization, the Hankel sin-
gular values are the diagonal entries of the common controllability/observability
Gramian matrix, and the states are ordered from highest to lowest Hankel sin-
gular value [2]. Compensator states with small Hankel singular values may be
eliminated with little impact to the performance of the compensator using the
modred command in MATLAB.
In this case, the system to be reduced is the compensator. The balreal com-
mand identies only two states that may be eliminated from the LQGI/LTR
compensator designed previously without signicant loss of accuracy, as may be
predicted by the information provided from the pole-zero plot in Figure 23.1.
Model reduction resulted in the addition of a high-frequency zero for this par-
ticular compensator. This zero was a simulation artifact created by the modred
command, therefore it was removed by truncation.
Examination of the LQGI/LTR compensator poles, zeros, and gain of the
transfer function yields:
p = −1490 ± j9000 −1129500 ± j1129500 0 (23.1)
z = −32410 −319 −1440 ± j9090
k = 7.195 × 107
6
x 10
1.5
0.5
Imaginary Axis
−0.5
−1
−1.5
−12 −10 −8 −6 −4 −2 0
Real Axis 5
x 10
By comparing the frequencies at which the poles and zeros occur and their
complex plane locations, it can be seen that a complex pair of zeros at −1490 ±
j9000 essentially cancels out a complex pair of poles at −1440 ± j9090. This is
more readily viewed in the close-up view of the pole-zero plot in Figure 23.2.
Examination of the compensator after model reduction methods yields:
0.5
Imaginary Axis
−0.5
−1
−1.5
−4 −3.5 −3 −2.5 −2 −1.5 −1 −0.5 0 0.5
Real Axis 4
x 10
Figure 23.2: Compensator pole-zero plot showing likely pole-zero pair cancella-
tion.
pr = −1126800 ± j1132300
0 (23.2)
zr = −319.5 −33035
kr = 7.18 × 107
30
Magnitude (dB)
20
10
−10
90
LQGI/LTR
MRLQGI/LTR
45
Phase (deg)
−45
−90
0 1 2 3 4 5 6 7
10 10 10 10 10 10 10 10
Frequency (Hz)
24.025
24.02
24.015
24.01
24.005
24
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
ẋ = Ax + Bu + W ω (23.3)
y = xm
V22 = W2 V1 W20 +q 2
B2 V2 B20 (23.6)
Then with:
0 −1
Ā = A22 − V12 V11 A12 (23.7)
0 −1
V̄ = V22 − V12 V11 V12
−1
L = (Qo A012 + V12
0
)V11 (23.9)
50
Magnitude (dB)
−50
−100
100
LQR
−10
50 q=10
q=10−9
−8
0 q=10
−7
Phase (deg)
q=10
−50
−100
−150
−200
2 3 4 5 6
10 10 10 10 10
Frequency (rad/s)
During simulation, it was found that the original matrices selected to repre-
sent the process noise had values that were too large. The initial results showed
loop transfer recovery had already occurred, therefore the noise values had to
be made smaller to verify that LTR was taking place. For the model of the uk
converter to be controlled, the following partitions of the W and V matrices
were used to simulate the ctitious noise:
1 × 10−5
0 0
1 × 10−4
1 × 10−5
W1 = 0 0 , W2 =
0 0
0 0 1 × 10−5
1 × 10−5
0 0
, V2 = 1 × 10−5
1 × 10−5
V1 =
0 0
0 0 1 × 10−5
The scalar q was allowed to vary from 1 × 10−10 to 1 × 10−7 during the recovery
process.
Examination of the ROLQGI/LTR compensator transfer function yields:
pr = −1490.0 ± j9000.0 −2466000.0 0.0 (23.10)
zr = −32990.0 −319.2 −1442.0 ± j9087.0
kr = 70.74
pr = 0.0 −2469000.0 (23.11)
zr = −319.4 −33570.0
kr = 70.76
where the poles and zeros are given in rad/s. This model-reduced compensator
has a pole at the origin and two zeros on the negative real axis left of the pole,
which is a classical PID controller. It also has another pole on the negative real
axis beyond the zeros, which corresponds to high frequency low-pass ltering. It
may therefore be thought of as a feedback PID compensator with the derivative
term acted upon by a rst-order low-pass lter. This type of ltered derivative
action is typically included in PID controllers to reduce the bandwidth of the
controller and associated undesirable amplication of high-frequency noise, as
well as to make them implementable (the ideal PID equation is non-causal due
to the fact that there is an excess of zeros). This PID controller is very simple to
implement with a single inverting operational amplier conguration. A second
inverter buer stage is needed to eliminate the undesired inversion caused by
the rst stage.
A frequency response comparison of the two compensators designed in this
section is shown in Figure 23.7. There is excellent correlation between the Bode
plots, showing that the MRROLQGI/LTR compensator performance will be
almost exactly the same as the ROLQGI/LTR compensator.
30
Magnitude (dB)
20
10
−10
90
45
Phase (deg)
−45
−90
0 1 2 3 4 5 6 7
10 10 10 10 10 10 10 10
Frequency (Hz)
24.018
24.016
24.014
Amplitude (V)
24.012
24.01
24.008
24.006
24.004
24.002
24
0 0.002 0.004 0.006 0.008 0.01 0.012 0.014 0.016 0.018 0.02
Time (s)
[1] MATLAB Control Systems Toolbox 6.0 User's Guide, The Mathworks, 2004.
383
384 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 24
Compensator Implementation
At this point, four optimal compensator designs that rely on output feedback
and state estimation have been developed. The initial design of the optimal
compensator began with a fth-order controller, with estimated states for each
of the four states in the plant and an augmented integral state (LQGI/LTR).
Model reduction techniques applied directly resulted in a third-order controller
(MRLQGI/LTR), which was a signicant improvement in terms of minimizing
the circuitry for implementation. The nal design began with a fourth-order
compensator based on three states from a reduced-order observer augmented by
an integral state (ROLQGI/LTR), to which model reduction techniques were
applied to form a second-order transfer function (MRROLQGI/LTR). This nal
regulator had the form of a classical PID controller. The nal design had a
signicant reduction in circuitry yet maintained excellent performance in both
the time and frequency domains.
The reduced-order compensators developed in Chapter 23 using model re-
duction techniques can be implemented with analog circuits using operational
ampliers. The goal is to use the minimum amount of components and circuitry
for control (to minimize manufacturing costs) while maintaining adequate con-
troller performance.
a2 s2 + a1 s + a0
Tb (s) = (24.1)
b2 s2 + b1 s + b0
385
The biquad lter section is used to implement the second-order denominator
term with a simple zero by setting a2 = 0. The PI section is used to implement
the other real zero and the pole at the origin. For both sections, it is desirable
to keep the poles and zeros within a certain frequency tolerance of each other
to keep the component values reasonable in size.
C1 1
(s + C1 R1 )
Tp (s) = − C2 (24.2)
s
The transfer function of the biquad lter section is given by:
1 1
C3 R2 s + C32 R4 R5
Tb (s) = − 2 (24.3)
s + C31R3 s + C 21R2
3 4
R3 1 1
R2 (s + C2 R3 )(s + R1 C1 )
T (s) = R2 +R1
(24.4)
s(s + R1 R2 C1 )
h i
−(R2 +R1 )
poles = 0 R1 R2 C1
(24.5)
−1 −1
zeros = C2 R3 R1 C1
R3
gain =
R2
Component values may be determined by equating the expressions in Equation
24.5 with the compensator values given in Equation 23.11. Since there are
fewer equations than unknowns, one of the component values must be xed
before the other component values may be determined. The nal design used
the component values given in Table 24.1.
Component Value
R1 100 kΩ
R2 1.4 kΩ
R3 100 kΩ
C1 0.29 nF
C2 31.3 nF
[2] W. J. Palm, Control Systems Engineering. New York, NY: Wiley, 1986.
389
390 © Richard Tymerski and Frank Rytkonen, 2017
Chapter 25
391
Figure 25.1: PECS simulation of uk converter - MRROLQGI/LTR compen-
sator.
The maximum deviation of 0.11 V in the output voltage occurred when the
input voltage drops sharply from 14 V to 9 V but is rapidly brought back under
control. This value is well within the 0.24 V tolerance that was specied for
controller performance.
Finally, a simulation was set up to provide for 25% load current steps (0.214
A) around the nominal load current of 0.857 A. The results of this simulation
are shown in Figure 25.4.
The maximum deviation of 0.175 V in the output voltage occurred when the
load current dropped sharply from 1.071 A to 0.643 A, but this is within the
transient design specication of regulation to within 1% of the nominal output
voltage.
The ability to reject large scale input voltage and load disturbances shows
that the compensator design is excellent. The MRROLQGI/LTR controller
allowed the system to not only meet the performance specications, but to
exceed them, and achieved these results after two separate reduction of order
techniques (reduced-order observer and model reduction) were applied during
the design process.
Conclusion
395
396 © Richard Tymerski and Frank Rytkonen, 2017
Appendix C
PECS
Figure C.1 shows the PECS user interface with a displayed circuit schematic.
PECSPLOT is discussed more fully in the next section..
397
Figure C.1: The PECS program showing a circuit schematic.
Ground node: PECS requires that a ground node be placed in the circuit.
This is the left most icon in the bottom element icon bar. Output ports: PECS
requires that at least one voltage or current port appear in the circuit. Ports
indicate to PECS which variables are to be stored for latter plotting.
Sources: VDC (DC voltage), IDC (DC current), VAC (AC voltage)
iii Start time: this is the time from which the output is saved to disk.
iv End time: this is the time to which the output is saved to disk. Generally
this should be the same as the simulation nal time.
Assuming the schematic has been constituted properly the simulation will
start and a progress bar at the bottom of PECS will appear. At the end of
the simulation a dialog window appears indicating the total real time used to
perform the simulation. When this dialog is dismissed PECSPLOT will auto-
matically be called.
Capacitor:
The schematic symbol of a capacitor is shown in Figure C.5. The capacitor
value and an initial voltage are the parameters that need to be specied in the
dialog window shown in Figure C.6.
Inductor:
The schematic symbol of an inductor is shown in Figure C.7. The inductor
value and an initial current are the parameters that need to be specied in the
dialog window shown in Figure C.8.
Figure C.11: DC Voltage Source, showing voltage step times and values
DC Current Source:
The schematic symbol of a DC current source is shown in Figure C.12. The
value of the current is a user specied parameter that is entered in the dialog
window, shown in Figure C.13.
Figure C.14: DC Current Source dialog window, showing voltage step times and
values
AC Voltage Source:
The schematic symbol of an AC voltage source is shown in Figure C.15. This
element produces a sinusoidal voltage waveform. The peak amplitude (volts),
frequency (Hz) and phase (degrees) comprise the parameters that are entered
into the dialog window, see Figure C.16, which will specify its characteristics.
Current Port:
The schematic symbol of a current port is shown in Figure C.19. The purpose
A switch features two electrical terminals and two control terminals which
are labeled ON and OFF. The connection to the control terminals is not electri-
cal. Only specic switch control elements may be connected to these terminals.
The switch control elements that are discussed here are:
1. Clock
2. PWM Modulator
Note that once a switch turns ON or OFF by the (conceptual) impulses driv-
ing it, it remains in this state until the time instant of a counter-acting control
signal.
Diode:
The schematic symbol of a diode is shown in Figure C.23, with the dialog window
shown in Figure C.24. As with the switch element, there is facility to stipulate
the initial state of the diode which is used to dene the starting state at the
beginning of a switching cycle. Should this state be incompatible with current
circuit conditions the simulator will change the diode state.
A clock has only one terminal which can only be connected to a switch ON
or OFF node. The parameters of a clock element are:
1. Delay time
2. Period
With reference to Figure C.26, we see that after an initial delay of Delay
seconds the switch is then turned ON (OFF). Following this initial signal, sub-
sequent signals are issued every Period seconds. Thus, if the clock element is
connected to the ON (OFF) terminal of the switch, these subsequent signals
repeatedly turn the switch ON (OFF).
The Delay and Period parameters are entered into the dialog window as seen
in Figure C.27.
The PWM dialog window is shown in Figure C.29 where the input gains,
K1 , K2 and K3 , and sawtooth parameters, the peak to peak voltage (Vpk−pk
and period can be entered.
The model of the op-amp used in PECS is shown in Figure C.31. There
are three parameters that characterize this model: 1) input resistance, Ri , 2)
output resistance, Ro , and 3) op-amp gain. The values of these parameters
can be changed via the element dialog window which is shown in Figure C.32.
Generally the default values will need not be changed.
Current sensor:
The schematic symbol for a current sensor element is shown in Figure C.33.
There are no user dened parameters for this device and so there is no associated
dialog window.
Ground node:
The schematic symbol for a ground node element is shown in Figure C.34. There
are no user dened parameters for this device and so there is no associated dialog
window.
5. Auto-scaling of the amplitude axis for single and multiple waveform plots.
C.5 Terminology:
1. Waveform - a signal that is shown within a plot. Multiple waveforms can
be shown within the same plot. Necessarily all waveforms share the same
scaling of the vertical axis.
2. Plot - A time and amplitude axis pair within which waveforms appear.
Waveforms of widely diering amplitudes are best graphed in separate
plots with their own individual vertical scaling.
To illustrate these terms, let us consider Figure C.35 which shows PEC-
SPLOT displaying a number of waveforms. Specically there are two plots.
The top plot shows the waveforms VP1 in red and VP2 in green. The bottom
plot shows only the VP2 waveform. Because the scaling in the top plot is dom-
inated by the amplitude of the VP1 waveform not much detail can be seen for
the VP2 waveform. However, this detail is available in the bottom plot where
the vertical scaling accommodates for the amplitude of the VP2 alone.
Figure C.35: PECSPLOT displaying two plots. The top plot show two wave-
forms and the bottom show only one.
1. File menu
2. Edit menu
3. Plots menu
4. View menu
5. Options menu
6. Help menu
3. Save: Saves an opened PECSPLOT le using the same le name. Only
currently displayed waveforms will be saved, other waveforms appearing
in the le will be deleted.
6. Print Preview: Displays the current plot(s) seen on the screen as it would
appear printed.
2. Edit Title: Two captions that appear on the top left and top right positions
of the printout may be edited. The default are the PECSPLOT le name
(top left) and the current date and time (top right).
5. Max: Show the maximum value of all waveforms (as well as the times at
which they occur) in the chosen plot. Measure mode must rst be chosen
to un-gray this menu item.
6. Min: Show the minimum value of all waveforms (as well as the time at
which they occur) in the chosen plot. Measure mode must rst be chosen
to un-gray this menu item.
Selecting the Plots → Measure menu item (or alternatively clicking on the
calipers icon in the icon bar) will bring up the measurement display screen as
shown in Figure C.37. Measurement is undertaken by rst left and/or right
clicking inside a plot at the desired position(s). Accurate placement of the mea-
surement lines may be obtained using the left and right keyboard arrow keys.
This aects movement of the measurement lines on a data point by point basis.
Sux M k m u n p
Value 1E+6 1E+3 1E-3 1E-6 1E-9 1E-12
For example, 10k = 10,000. Be sure not to use any waveform names that
correspond to these suxes.
Any level of parenthetical expression with "(" and ")" may be used. An
example of a valid expression is:
Figure C.37: The measure display dialog usually appears at the lower left corner
of the computer screen. Here it has been moved to the position shown for display
purposes. Clicking the left and right mouse buttons in the bottom plot area at
the appropriate positions results in the vertical lines appearing and the value of
the waveform(s), as well as the time values, being displayed. The third column
indicates the dierence between the two values, which in this case results in a
measurement of the peak-to-peak amplitude of the displayed waveform.
2. Zoom All: Use maximum x-axis limits given by the data in the PEC-
SPLOT le.
1. Text Settings: Change the font style, font size, font color.