Professional Documents
Culture Documents
1335 Petrovas Rinkeviciene Automatic Web PDF
1335 Petrovas Rinkeviciene Automatic Web PDF
Roma RINKEVIČIENĖ
AUTOMATIC CONTROL
THEORY
I, II
Project No
VP1-2.2-ŠMM-07-K-01-047
Andrius PETROVAS
Roma RINKEVIČIENĖ
AUTOMATIC CONTROL
THEORY
I, II
A Laboratory Manual
Descriptions of laboratory works are for students of technology sciences study field,
electrical engineering study branch, automation study programme, taking course in
automatic control theory. Descriptions of laboratory works will also be useful for
incoming students in the frame of Erasmus program or other students of Exchange
programs in energetic systems and mechatronics study branches. Every description
of the laboratory work includes the aim of the work, a wide theoretical part, tasks,
content of the report and control questions. Basic knowledge of MATLAB applica-
tion is presented and specialized commands for this purpose are considered.
Reviewed by:
Assoc. Prof PhD Saulius Lisauskas, VGTU Department of Automation
Assoc. Prof PhD Zita Savickienė, VGTU Department of Automation
This publication has been produced with the financial assistance of Europe Social
Fund and VGTU (Project No VP1-2.2-ŠMM-07-K-01-047). The book is a part of
the project “The Essential Renewal of Undergraduates Study Programs of VGTU
Electronics Faculty”.
eISBN 978-609-457-162-6
doi:10.3846/1335-S
The second order systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Laboratory work No4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Theoretical part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Problems of the second order system analysis. . . . . . . . . . . . . 79
Content of the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Control questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
Analysis of algebraic methods of stability. . . . . . . . . . . . . . . . . . 83
Laboratory work No.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Theoretical part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Examples of algebraic stability metods application. . . . . . . . . 93
Content of report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Control questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
References. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Introduction
• application development, including graphical user interface
building.
MATLAB is an interactive system the basic data element of which
is an array that does not require dimensioning.
The name MATLAB stands for matrix laboratory. MATLAB was
originally written to provide easy access to matrix software devel-
oped by LINPACK and EISPACK projects. Today MATLAB en-
gines incorporate LAPACK and BLAS libraries, embedding the
state of the art in software for matrix computation.
MATLAB has evolved over a period of years with input from many
users. In university environments it is the standard instructional tool
for introductory and advanced courses in mathematics, engineering,
and science. In industry MATLAB is the tool of choice for high-pro-
ductivity research, development, and analysis.
MATLAB features a family of add-on application-specific solu-
tions called toolboxes. Toolboxes are comprehensive collections of
MATLAB functions that extend the MATLAB environment to solve
particular classes of problems. You can add on toolboxes for signal
processing, control systems, neural networks, fuzzy logic, wavelets,
simulation, and many other areas.
MATRIXES
Entering Matrices
The best way for you to get started with MATLAB is to learn how
to handle matrices. Start MATLAB and follow along with each ex-
ample.
Matrices can be entered into MATLAB in several different ways:
1. Enter an explicit list of elements.
2. Load matrices from external data files.
3. Generate matrices using built-in functions.
4. Create matrices with your own functions in M-files.
Start by entering Dürer’s matrix as a list of its elements. You only
have to follow a few basic conventions:
• Separate the elements of a row with blanks or commas.
• Use a semicolon, ; , to indicate the end of each row.
• Surround the entire list of elements with square brackets, [ ].
To enter Dürer's matrix, simply type in the Command Window
A =
16 3 2 13
5 10 11 8
9 6 7 12
4 15 14 1
This matrix matches the numbers in the engraving. Once the matrix
is entered, it is automatically remembered in MATLAB workspace.
It can be referred to simply as A.
You are probably already aware that the special properties of a mag-
ic square have to do with the various ways of summing its elements.
If you take the sum along any row or column, or along either of the
two main diagonals, you will always get the same number. Let us
verify that using MATLAB. The first statement to try is:
sum(A)
MATLAB gives
ans =
34 34 34 34
When you do not specify an output variable, MATLAB uses the
variable ans, short for answer, to store the results of a calculation.
You have computed a row vector containing the sums of the col-
umns of A. Each of the columns has the same sum, the magic sum,
34.
The sum of the elements on the main diagonal is obtained with the
sum and the diag functions:
46H 47H
diag(A)
produces
ans =
16
10
7
1
and
sum(diag(A))
produces
ans =
34
MATLAB software provides four functions that generate basic ma-
trices:
zeros
48H
All zeros
ones
49H
All ones
rand
50H
Uniformly distributed random elements
randn
51H
Normally distributed random elements
Here are some examples:
Z = zeros(2,4)
Z=
0 0 0 0
0 0 0 0
F = 5*ones(3,3)
F=
5 5 5
5 5 5
5 5 5
N = fix(10*rand(1,10))
N =
9 2 6 4 8 7 4 0 8 4
R = randn(4,4)
R =
0.6353 0.0860 -0.3210 -1.2316
-0.6014 -2.0046 1.2366 1.0556
0.5512 -0.4931 -0.6313 -0.1132
-1.0998 0.4620 -2.3252 0.3792
Subscripts
10
is
100 93 86 79 72 65 58 51
and
0:pi/4:pi
is
0 0.7854 1.5708 2.3562 3.1416
Subscript expressions involving colons refer to portions of a ma-
trix:
A(1:k,j)
is the first k elements of the jth column of A. Thus:
sum(A(1:4,4))
computes the sum of the fourth column and gives
ans =
34
MATLAB does not require any type declarations or dimension state-
ments. When MATLAB encounters a new variable name, it auto-
matically creates the variable and allocates the appropriate amount
of storage. If the variable already exists, MATLAB changes its con-
tents and, if necessary, allocates new storage. For example,
num_students = 25
11
Numbers
abs(3+4i)
ans =
5
12
Functions
functions are part of MATLAB core, so they are very efficient. Other
functions, like gamma and sinh, are implemented in M-files.
59H 60H
pi 3.14159265...
61H
i Imaginary unit,
62H
j Same as i
63H
13
The Colon Operator
14
Building Tables
Array operations are useful for building tables. Suppose n is the col-
umn vector
n = (0:9)’;
Then
pows = [n n.^2 2.^n]
builds a table of squares and powers of 2:
pows =
0 0 1
1 1 2
2 4 4
3 9 8
4 16 16
5 25 32
6 36 64
7 49 128
8 64 256
9 81 512
The elementary math functions operate on arrays element by ele-
ment. So format
short g
x = (1:0.1:2)’;
logs = [x log10(x)]
builds a table of logarithms.
logs =
1.0 0
1.1 0.04139
1.2 0.07918
1.3 0.11394
15
1.4 0.14613
1.5 0.17609
1.6 0.20412
1.7 0.23045
1.8 0.25527
1.9 0.27875
2.0 0.30103
Representing Polynomials
Evaluating Polynomials
To evaluate p at x = 5, use
polyval(p,5)
ans =
110
Roots
r = roots(p)
16
r =
2.0946
-1.0473 + 1.1359i
-1.0473 - 1.1359i
By convention, the MATLAB software stores roots in column vec-
tors. The function poly returns to the polynomial coefficients:
67H
p2 = poly(r)
p2 =
1 8.8818e-16 -2 -5
poly and roots are inverse functions, up to ordering, scaling, and
roundoff error.
The following list of commands can be very useful for future refer-
ence. Use help in MATLAB for more information on how to use
the commands.
Usualy commands both from MATLAB and from Control Systems
Toolbox, as well as some commands/functions which we wrote our-
selves are used. For those commands/functions which are not stand-
ard in MATLAB, we give links to their descriptions. For more infor-
mation on writing MATLAB functions, see the function page.
68H
17
Convolution (useful for multiplying polynomi-
conv
als), see also deconv
det Find the determinant of a matrix
eig Compute the eigenvalues of a matrix
eps MATLAB’s numerical tolerance
Create a new figure or redefine the current fig-
figure
ure, see also subplot, axis
for For, next loop
format Number format (significant digits, exponents)
function Creates function m-files
grid Draw the grid lines on the current plot
help HELP!
hold Hold the current graph, see also figure
if Conditionally execute statements
Returns the imaginary part of a complex number,
imag
see also real
Impulse response of linear systems, see also
impulse
step, lsim
input Prompt for user input
inv Find the inverse of a matrix
legend Graph legend
length Length of a vector, see also size
linspace Returns a linearly spaced vector
Produce a Nyquist plot on a logarithmic scale,
lnyquist
see also nyquist1
69H
Nyquist plots
18
Returns a vector or matrix of ones, see also ze-
ones
ros
plot
72H Draw a plot, see also figure, axis, subplot.
poly Returns the characteristic polynomial
polyval Polynomial evaluation
Print the current plot (to a printer or postscript
print
file)
pzmap Pole-zero map of linear systems
Find the number of linearly independent rows or
rank
columns of a matrix
Returns the real part of a complex number, see
real
also imag
rlocus Draw the root locus
roots Find the roots of a polynomial
Set(gca,’Xtick’,xticks,’Ytick’,yticks) to control
set the number and spacing of tick marks on the
axes
sqrt Square root
Create state-space models or convert LTI model
Ss
to state space, see also tf
ssdata Access to state-space data. See also tfdata
step
73H Plot the step response, see also impulse, lsim
Add a piece of text to the current plot, see also
text
title, xlabel, ylabel, gtext
Creation of transfer functions or conversion to
Tf
transfer function, see also ss
tfdata Access to transfer function data, see also ssdata
title Add a title to the current plot
Add a label to the horizontal/vertical axis of the
xlabel/ylabel
current plot, see also title, text, gtext
zeros Returns a vector or matrix of zeros
19
Introduction to MATLAB Functions
When entering a command such as roots, plot, or step into
MATLAB what you are really doing is running an m-file with in-
74H
puts and outputs that has been written to accomplish a specific task.
These types of m-files are similar to subroutines in programming
languages in that they have inputs (parameters which are passed to
the m-file), outputs (values which are returned from the m-file), and
a body of commands which can contain local variab. MATLAB calls
these m-files functions. You can write your own functions using
function command.
A new function must be given a filename with a ‘.m’ extension. This
file should be saved in the same directory as MATLAB software, or
in a directory which is contained in MATLAB’s search path. The
first line of the file should contain the syntax for this function in the
form:
20
Obviously, most functions will be more complex than the one
demonstrated here. This example just shows what the basic form
looks like. Look at the functions created for this tutorial listed be-
low, or at the functions in the toolbox folder in MATLAB software
(for more sophisticated examples), or try help function for more
information.
21
Composition of dynamic systems in
MATLAB
Theoretical part
22
The first way is most complex, but it is most general. It can be
The first way is most complex, but it is most general. It can be
applied for linear and non-linear systems and is suitable not only
applied for linear and non-linear systems and is suitable not only for
for MATLAB, but also for similar programs, for example, Scilab.
MATLAB, but also for similar programs, for example, Scilab. It has
It has only one shortcoming: its application requires good skills in
only one shortcoming: its application requires good skills in pro-
programming, therefore it will not be considered here. We will deal
gramming, therefore it will not be considered here. We will deal with
with the last ones.
the last ones.
Control system toolbox is collection of MATLAB programs
Control system toolbox is collection of MATLAB programs
for analysis and synthesis of automatic control systems. The men-
for analysis and synthesis of automatic control systems. The men-
tioned ltiview also enters as part MATLAB. Control system toolbox
tioned ltiview also enters as part MATLAB. Control system toolbox
is also widely used for linear systems.
is also widely used for linear systems.
Simulink is visual environment for simulation of dynamic sys-
Simulink is visual environment for simulation of dynamic sys-
tems. It is applied for simulation of linear, nonlinear and discrete
tems. It is applied for simulation of linear, nonlinear and discrete
systems. Its application for linear systems and non-linear systems
systems. Its application for linear systems and non-linear systems
will be described.
will be described.
The linear differential equation looks like this:
The linear differential equation looks like this:
n dk y m d lu
¦ ak ¦ bl ; kur t .m.
kur n ≥n m (1) (1)
k 0 dt k l 0 dt l
where: an ir bn – constants; y – system output; u – system in-
put. an ir bn – constants; y – system output; u – system input.
where:
Expression (1) can(1)
Expression be can
rewritten in operational
be rewritten form: form:
in operational
nn m
m
∑ aakk sskk = U
YY ¦ U¦∑bbll ssll ;; kur
kur nn t≥ m
m.. (2) (2)
kk =00 ll =00
Although linear differential equations can be solved analyti-
Although linear differential
cally, automatic control theory equations uses can be solved
definition analytically,
of transfer function.
automatic control
Transfer theory is
function uses definition
defined of transfer
as ratio of outputfunction. Transfer
and input signals in
function is definedform:
operational as ratio of output and input signals in operational
form: m
l
l ∑ bl s
m
Y¦( sb)l s l =0
YG( s( s) ) = l 0 = n . (3)
G (s) Un ( s ) . (3)
k
U (s) k ∑ a s
¦ ak s k =0 k
k 0
23
24
Transfer function does not depend on output and input signals,
therefore it is a very convenient tool to describe any control system.
Using Control system toolbox tool transfer function is developed
with tf command. Its generalized form looks like that:
24
W K n
. (6)
s pk
k 0
25
Step (G_plant)
Step (G_plant, t_vect)
[y_vect, t_vect] = step (G_plant)
y_vect = step (G_plant, t_vect)
where variables u_vect ir t_vect are input signal and time val-
ues vectors correspondingly. The first command presents output in
graphical window, the second – by numerical values.
For generation of input signal vector u_vect values gensig
command can be used. It is designated for generation of sine, rect-
angular or repeating pulses. Command form is:
26
Examples of dynamic system modeling and analysis
u
u2
R1
Cs R1
Z1 ( s ) = = . (8)
1 R1Cs + 1
R1 +
Cs
System transfer function is equal to division ratio and is calcu-
lated as:
U ( s) R2 R2 R2 (R1Cs + 1)
G (s) = 2 = = = . (9)
U ( s ) Z ( s ) + R R1 R R Cs + R + R
1 2 + R2 2 1 2 1
R1Cs + 1
27
System model in MATLAB is constructed by tf command. Let
R1 = 1 kΩ, R2 = 5 kΩ and C = 1 μF. Then MATLAB command, de-
scribing the circuit in Fig. 1 looks like this:
Transfer function:
2.5 s + 5000
------------
2.5 s + 6000
>> zpk(G)
Zero/pole/gain:
(s+2000)
--------
(s+2400)
28
tem is composed from real differentiating and first order (exponen-
tial) elements.
1
10,98
0,980,96
0,960,94
0,94
0,92
0,92
U ,U0,900,90
1
U1 ,U 0,88
0,88
0,86
0,86
0,84
0,84
0,820,82
0 0 0,5 0,5 1 1 1,5 1,5 2 2 2,5 2,5-3
Time, x10x10
s s
-3
Time,
Fig. 2. Unit step response of the system
Fig. 2. Unit step response of the system
In the same way system response to impulse or other shape sig-
In the
nals can same way system response to impulse or other shape sig-
be obtained.
nalsExample
can be obtained.
2. Develop mathematical model of the circuit, shown
in Fig. 3 in the 2.
Example Develop
form mathematical
of transfer function, model of thesignal
when input circuit,
is shown
voltage
u1 and output is voltage u2. Assume operational amplifier beingvolt-
in Fig. 3 in the form of transfer function, when input signal is ide-
age u1 and output
al.pavaizduotos is voltage
elektrinơs u2. Assume
grandinơs operational
matematinƳ amplifier
perdavimo being
funkcijos
ideal.
pavidalu.
Fig.3. Analyzed
29 circuit
29
Assumption of ideal operational amplifier facilitates analysis
of the system. At first, the gain of ideal op-amp does not depend
on frequency and approaches to infinity: koa→∞. Else, input imped-
ance of op-amp is equal to infinity, threrefore currents do not flow
for direct either inverse inputs. With these assumptions analysis of
circuit simplifies and we can apply the so called “virtual ground”
principle. With koa→∞ we can assume u+≈u–, where u+ voltage of is
direct and u– is inverse input voltage. From Fig. 3 it can be seen, that
u+=0, therefore we can state, that u–≈0 V, and all circuits, connected
to that inverse input, can be considered as virtually connected to the
ground.
Parrallel connected impedances R1C1 ir R2C2 can be written in
operational form as:
1
Rx
Cx s Rx
Z x (s) = = ; (11)
1 R C s + 1
Rx + x x
Cx s
where x is element index: x = {1,2}.
While current does not flow to inverse input, application of the first
Kirchhoff’s law for virtual ground node, i. e. for node to which in-
verse input is connected, can be written as:
R1C1s + 1 R C s +1
I1 = − I 2 ↔ U1 = −U 2 2 2 (12)
R1 R2
30
Content of the report:
Control questions:
31
Frequency response of dynamic systems
FREQUENCY RESPONSE OF DYNAMIC SYSTEMS
Laboratory work No. 2
Laboratory work ʋ2
Objective: to get acquainted with definition of frequency re-
sponse, its calculation
Objective: andacquainted
to get visualization methods.
with definition of frequency re-
sponse, its calculation and visualization methods.
Tasks of the laboratory work:
1. Task
Derive transfer
of the function,
laboratory indicated by the teacher.
work:
2. 5. Plot system
Derive frequency
transfer response
function, andby
indicated Bode plot of this sys-
the teacher.
6. tem.
Plot system frequency response and Bode plot of this system.
3. 7. Define
Definesystem
systemgain
gain and
and phase
phase angle
angle at frequency,
at frequency, indicated
indicated
by the teacher.
by the teacher.
Teoretical
Teoretical part
part
Linear dynamic systems in general case are described by differ-
Linear dynamic systems in general case are described by dif-
ential equations in this way:
ferential equations in this way:
n dk y m d lu
¦ ak k ¦ bl ; (1)(1)
k 0 dt l 0 dt l
where: n ≥ m, an ir bn are constants; y is system output; u is system
where: n t m, an ir bn are constants; y is system output; u is system
input.
input.At known input signal u, describing function in time domain
u = fu(t) At Eq.
known input
1 can solvedu,indescribing
besignal analyticalfunction
way to ingettime domain u =
analythical
f (t)
function,
u the Eq. 1 can be solved in analytical way to get analythical
describing output signal. This analysis method, operating func-
tion,functions,
with describing output signal.
depending Thisis analysis
on time, method,
called time domain operating
analysis.with
functions, depending on time, is called time domain
Solution of high order differential equations even n ≥ 3 is rather analysis. Solu-
tion of highproblem,
complicated order differential equations
therefore analysis in even n 3 is spread
time domain rather only
compli-
cated problem, therefore analysis
after fast and powerful computers have spread.in time domain spread only after
fastTogether
and powerful computers
with systems have spread.
analysis in time domain, the other meth-
Together with systems
od, analysis in frequency domain, analysis
is widelyin time
used. domain,
This metod the as-
other
method,
sumes thatanalysis in frequency
system input is harmonicdomain
signal,is changing
widely used.
by sineThis
law:metod
assumes that system input is harmonic signal, changing by sine law:
32
33
u U sin Zt (2)
u U sin Zt (2)
where:
where:UUisisinput
inputsignal amplitude, Ȧωisis signal
signalamplitude, signal frequency
frequency in radians
in radians
per second.
per second.
where: U is input signal amplitude, Ȧ is signal frequency in radians
The following frequency-domain plots of G ( j�) versus are of-
The following frequency-domain plots of G (jω) versus are of-
per second.
ten used in the analysis and design of linear control systems in the
tenThe
usedfollowing frequency-domain
in the analysis and design of plots of G
linear ( j�) systems
control versus are in theof-
frequency domain.
tenfrequency
used in the analysis and design of linear control systems in the
1. Polar domain.
plot. A plot of the magnitude versus phase in the polar
frequency domain.
1. Polar plot. Afrom
plot zero
of thetomagnitude
coordinates is varied infinity. versus phase in the polar
1. Polar
coordinates plot. A
is variedplot of the
fromofzero magnitude
infinity. versus phase in the polar
2. Bode plot. A plot thetomagnitude in decibels versus (or
coordinates is varied from zero to infinity.
log10)2.in Bode
semilog plot.
(orArectangular)
plot of thecoordinates.
magnitude in decibels versus (or
2. Bode plot. A plot of the magnitude in decibels versus (or
3. Magnitude-phase
log10) plot. A plotcoordinates.
of the magnitude (in decibels)
log10) inin semilog
semilog (or(or rectangular)
rectangular) coordinates.
versus3.theMagnitude-phase
phase on rectangular plot. coordinates,
A plot of the with a variable
the magnitude
magnitude parame-
(in decibels)
decibels)
3. Magnitude-phase plot. A plot of (in
terversus
on thethe
curve.
phaseononrectangular
rectangularcoordinates,
coordinates,with witha avariable
variableparame-
param-
versus the phase
The
eter on polar
the plot of a function of the complex variable s, G (s), is a
curve.
ter on the curve.
plot of the magnitude of G ( j�) versus the phase of G ( j�) on polar
TheThepolar
polarplot
plotofof
a function
a function ofofthethecomplex variables, s,GG(s),
complexvariable (s),is isa
coordinates as � is varied from zero to infinity.
plot of the
a plot magnitude
of the magnitude of Gof (Gj�) (jω) versus
versusthe phaseofofGG( (jω)
thephase j�) on polar
To illustrate
coordinates asas�ωisthe construction of the polar plot of a function G
coordinates isvaried
variedfromfromzero zerototoinfinity.
infinity.
(s), consider the
ToToillustrate function
illustratethetheconstruction
constructionofofthe thepolar
polar plot
plot of
of aa function
function G G
(s), consider the function
(s), consider the function 1
G(s) (3)
Ts11 1
G (( ss )) =
G (3)
(3)
Ts
Ts + 11
where T is positive constant.
where T is positive constant.
Substututing s jZ yields:
where Substututing
T is positive constant.
s = jω yields:
Substututing s jZ yields:
1
G ( jZ ) (4)
TjZ1 1
G ( jZ ) (4)
Eq. 4 can be rewritten in terms TjZ of 1 magnitude and angle as:
Eq. 4 can be rewritten in terms of magnitude and angle as:
1
G ( jω) = in terms of∠
Eq. 4 can be rewritten − tan −1 ωTand angle as:
magnitude (5)
2 2
T ω 1 +1
G ( jZ) tan 1 ZT (5)
When ω is zero, the magnitude T Z 2 2
1 1 G (jω)
of 1
is unity, and the phase
of G (jω) is at 0°. G (Thus,
jZ) at ω = 0, G(jω) tan ZT
is represented by a vector (5)
T 2 Z2 1
34
33
34
1
G ( jZ) tan 1 ZT (5)
2 2
T Z 1
of unit length directed in the 0° direction. As ω increases, the mag-
nitude of G (jω) decreases, and the phase becomes more negative.
When ݉ is zero, the magnitude of G( j݉) is unity, and the phase
As ω increases, the length of the vector in the polar coordinates de-
of G( j݉) is at 0°. Thus, at ݉=0, G( j݉) is represented by a vector of
creases, and the vector rotates in the clockwise (negative) direction.
unit length directed in the 0° direction. As ݉ increases, the magni-
When ω approaches infinity, the magnitude of G (jω) becomes zero,
tude of G( j݉) decreases, and the phase becomes more negative. As
(can be assumed of very small magnitude) and the phase reaches
݉ increases, the length of the vector in the polar coordinates decreas-
–90°. By substituting other values of ω into Eq. (4), the exact plot of
es, and the vector rotates in the clockwise (negative) direction. When
G (jω) seems as semicircle, as shown in Fig. 2.
݉ approaches infinity, the magnitude of G( j݉) becomes zero,(can be
assumed of very
j IM Gsmall magnitude) and the phase reaches –90°. By
substituting other values of ݉ into Eq. (4), the exact plot of G( j݉)
seems as semicircle, as shown in Fig.
G ( jω2.
) − plane
ω→∞ ω=0
0 −1 1 Re G
j IM G tan ωT Phasor of G ( jω)
G ( jZ) plane
Zof Z 0
0 1
tan 1 ZT Phasor of G ( jZ) Re G 1
1 + ω2T 2
H = freqresp(G_plant,w_vect)
j IM G
G ( jω) − plane ω→
(T2 > T1 )
0 1 ω=0 ω=∞
ω=∞ T2 / T1 Re G
←ω
(T2 < T1 )
1 + jωT2
Fig. 3. Polar plots of G ( jω ) =
1 + jωT1
35
In general way H = freqresp(sys,w) computes the frequency
response H of the linear time invariant (LTI) model sys at the fre-
quencies specified by the vector w.
These frequencies should be real and expressed in radians/sec-
ond.
Polar plots, shown in Fig. 5 and Fig.6 usually are called hodograph
and are used mainly for analysis of system stability.
The other possible analysis method calculates dependence of mag-
nitude |G (jω)| and phase angle ∠G ( jω) on frequency. Boths plots
can be represented separately.
If magnitude of the system is expressed by decibels
36
used for the calculated dependence of magnitude versus ω.
Before command plot commands abs and angle are used.
Then magnitude is expressed by decibels according to Eq. (12) and
using command semilogx the magnitude and angle versus ω are
plotted in semilogarithmic scale.
Example of commands application:
plot(abs(G_jw))
plot(angle(G_jw))
bode(G_plant)
bode(G_plant, w_vect)
y_vect = logspace(a,b,n)
37
Command in the second row of Table 1 executes replacement
s = jω described in expression (8). At least the expression of fre-
quency response according to (15) is calculated in the third row.
The obtained numerical values of frequency response are desig-
nated in the complex plane. For this MATLAB command is used:
plot(G_jw). Command plot gives graph, shown in Fig. 1. It is
called polar plot.
38
Fig. 2. Bode plot
39
4. Results of calculation of gain and phase angle for the indi-
cated frequency.
Control questions
40
The First Order Dynamic Systems
Tasks:
1. Elaborate mathematical modul of the system, indicated by
the teacher.
2. Expand the elaborated model to series connection of the first
order systems, if it is necessary.
3. According to differential equations plot step responses and
frequency responses.
4. Check results with Matlab software.
Theoretical part
y p = K1(t ). (2)
GP = K . (3)
41
Frequency response of the system G ( jω) = K + 0 j.
Plot G ( jω) is given in Fig. 5.
Bode plot of this function is calculated as:
and does not depend on frequency. The Bode plot L (ω) is shown in
Fig. 6. The phase angle of proportional system:
Im G ( jω)
ϕ = tan −1 = tan −1 0 = 0; (5)
Re G ( jω)
is horizontal straight, shown in Fig. 7.
The simplest electrical examples of propotional system are
shown in Fig. 1 a – voltage divider and Fig. 1 b – amplifier.
42
changes in the range 0 d K d 1 .
The system with operational amplifier gives posibility to change
output voltage. For the ideal operational amplifier can be applied
principle of virtual ground which gives:
u1 u u1 Ru2 R
2 ; o uR = − 1 u;.→ u2 = − 1 u1. (7) (7)
R2R1 R2
2 1
R2 R1 2
Therefore,Therefore,
varying varying
ratio of ratio R1 R2posibility
R1 Rof2 gives gives possibility to change
to change
gainrange.
gain in wide in wide range.
The
The propotional propotional
system has system has nonevertheless
no inertic, inertic, nevertheless all real sys-
all real sys-
tems havetems
that.have that. Therefore
Therefore propotionalpropotional
system is system is idealized
idealized real sys-real sys-
tem. As example the real oscillograme of the operational
tem. As example the real oscillograme of the operational amplifier, amplifier,
shown inshown
Fig. 2,in corresponding
Fig. 2, corresponding
to the to theresponse
step step response of amplifier, is
of amplifier,
shown
shown in Fig. 1 a.in Fig. 1 a.
In thewas
In the circuit circuit
used operational
operational amplifier
amplifier LMLM 741
741 and
and resistances
re-
sistances R1 R2 10 kȍ. were used.
43
The integrating circuit is described as:
t dy
y = K I ∫ udt + y0 ; → = K I u; (8)
0 dt
where: K I – coefficient, y0 – initial value of output signal.
Step response of integrating systems is:
t
yI = K I ∫ 1(0)dt + y0 = K I t + y0 . (9)
0
KI
LI (ω) = 20lg GI ( jω) = 20lg = 20lg K I − 20lg ω. (12)
ω
44
Comparison of (12) and (13) expressions shows the reduction
of the integrating system magnitude by 20 dB/dec .
Frequency ω0 , at which magnitude LI (ω0 ) = 0 , is called in-
tersection frequency and calculated as:
(15) shows that output signal phase angle does not depend
on frequency and is equal to –90 °. Graphically ϕ I (ω) is shown in
Fig. 7.
The practical examples of integrating circuits are shown in
Fig. 3.
45
the body and surface is not considered, the dynamics of the system
is described by the second Newton‘s Law:
dv
m = F; (16)
dt
where: F is force, acting the body, v is speed of the body.
If the movement is one dimensional, i.e. along x axis, vector
equation (16) can be replaced by projections of vectors:
dvx dvx 1
m = Fx ; → = Fx (17)
dt dt m
Assuming system input and output signals correspondingly
u = Fx ; y = vx and K I = m −1 , the expression (17) becomes similar
to integrating system equation (8).
At analysis of circuit in Fig. 3 b it is convenient to apply vir-
tual ground principle:
u1 u1 du du2 u
= −i2 ; → = −C1 2 ; → = − 1 . (18)
R1 R1 dt dt C1R1
46
dy
T + y = K Au ; (20)
dt
where K A is the first order system gain and T is time constant.
The general solution of homogeneous system, in engineering
called as free movement, has the form:
t
yh = C1 exp − ; (21)
T
where C1 is integrating constant, calculated from the initial condi-
tions, t is time.
Solution of Eq. 20 is equal to the sum of solutions of general
solution and solution of non-homogenic solution, which depends on
input signal u. If the input signal is unit step and boundary conditions
are assumed y (0 ) = 0 and y (∞ ) = K A , then solution of Eq. (20) is:
t
y A = K A 1 − exp − . (22)
T
Unit step response of the first order system is plotted in Fig. 4
according to expression (22).
Fig. 4. Unit step responses of proportional (P), integrating (I) and first
order system (A)
47
Figure 4 shows that unit response of the first order system ex-
ponentially approaches to steady-state value K A . Settling time ts is
called time, after which the response differs from steady-state value
by assumed ε value. If it is assumed that ε = 5 %, then ts ≈ 3T . For
ε = 2 %, settling time ts ≈ 4T .
The first order system transfer function is:
KA
G A (s ) = . (23)
Ts + 1
Frequency response is calculated by replacing s with jω in
transfer function (23):
KA 1 − Tjω
G A ( jω) = = KA 2
. (24)
Tjω + 1 1 + (T ω)
KA a
x ≡ Re G ( jω) = 2
; y ≡ Im G ( jω) = − K A . (25)
1+ a 1 + a2
KA
−1
x KA
y = −K A = −x − 1. (27)
KA x
x
48
2 2
2 2 K K K
y = K A x − x ; y 2 + x 2 − 2 A x + A = A ;
→ 2 2 2 (28)
y ≤ 0;
y ≤ 0.
Finally, Eq. (28) can be rewritten as:
2 2 2
K K
y + x − A = A
2 2 (29)
y ≤ 0.
The first equation of the set (29) describes the circle with
center coordinates x0 = (0, K A 2 ) and radius R = K A 2 . The sec-
ond unequality shows, that the characteristic is situated in below
horizontal axis. Therefore in general way polar plot of the first order
system is halfcircle, shown in Fig. 5.
Fig. 5. Polar plots of proportional (P), integrating (I) and first order
system (A)
49
the third characteristic point with coordinates x = (K A 2, − K A 2 ) .
It corresponds to frequency ω = 1 .
T
Magnitude of frequency response is calculated from expres-
sion (24):
2
K A 1 + (T ω)
G A ( jω) = 2
. (30)
1 + (T ω)
It is expressed in decibels:
2
K A 1 + (T ω) .
LA (ω) = 20lg G A ( jω) = 20lg (31)
1+ Tω 2
( )
Simple program can be made to plot the expression (31),
but design of controllers uses asymptotic diagrams, made from
the straight lines, asymptotically approaching to actual diagram.
Asymptotic, or corner Bode, plot is analysed in the range of low and
highfrequency.
frequency.
frequency. InInlow
In the thelow
the low frequency
frequency
frequency range
rangerange at
at Tat
Z 1, expression
T 1Z, expression
expression
(31) (31)
(31) becomes:
becomes:
becomes:
LA ZLA Z ZT|20 K lg. K .
lg20
| (32) (32)
Z (ω1 ) 1 ≈ A20lgAK A .
LTA
ωT <<1
(32)
Therefore,
Therefore,
Therefore, in low
inin the
the the low
low frequency
frequency
frequency rangerange
range Bode
the the Bode
diagram
Bode diagram
can can
diagram be can
be be
plotted plotted
plottedbyby by
horizontalhorizontal
horizontal straightstraight
straightline.
line. line.
In high
InIn the
the the
highhigh frequency
frequency
frequency range,range,
TZ T 1Z, 1 , expression
expression
expression (31) (31)
(31) is re-is re-
is re-
written
written as:
written as: as:
§ K A§·K ·
LA ZLLA Z | 20lg| 20lg ¨ KAA20lg K A K
¸ = 20lg T Z ;T Z ;
A 20lg
K20lg (33) (33)
AZ(Tω!!
) 1ωT >>1 ≈ 20lg
¨ ¸ ¹ 20lg A − 20lg T ω (33)
© T Z©¹TTZ
Z T !!1
ω
changing
changing the frequency
the frequency 10 times
10 times yields:
yields:
changing the
LAZ10Z | 20lg frequency 10 times yields:
LA 10 | 20lg K 20lg10
K 20lg10 TZ TZ
ZT !!1ZT !!1
LA (10ω) ≈ 20lg K20lg
− 20lg10 T ω = Z 20 L Z
ωT >>1 K 20lg
20lg K 20lg T Z T20 LA ZA ZT!!
20. 20.
1 (34)
ZT !!1
= 20lg K − 20lg T ω − 20 = LA (ω) − 20.
(34) (34) ωT >>1
Therefore
Therefore in range
in the the range of high
of high frequency
frequency is represented
is represented by by
straight
straight line with
line with scopescope
of of . So .inSothein low
5020 dB/dec
20 dB/dec the and
low high
and high
fre- fre-
quency
quency ranges
ranges asymptotic
asymptotic BodeBode diagram
diagram is constructed
is constructed fromfrom straight
straight
lines.lines.
TheyThey intersect
intersect at a at a corner
corner frequency
frequency ZS which
ZS which is calculated
is calculated
Therefore in the range of high frequency it is represented by
straight line with slope of −20 dB/dec . So in the low and high fre-
quency ranges asymptotic Bode diagram is constructed in straight
lines. They intersect at a corner frequency ωS which is calculated
comparing (32) and (33) expressions:
The actual LA (ω) and the asymptotic LAa (ω) Bode dia-
grams, plotted correspondingly according to (31) and (32)–(33) ex-
pressions, are shown in Fig. 6.
Fig. 6. Bode plots of proportional (P), integrating (I) and first order sys-
Fig. 6 shows that the Bode plot of the first order system is
horizontal line at low frequencies with magnitude of 20lg (K A ) dB.
1
In the middle range of frequencies at frequency ωs = , the differ-
T
ence between magnitudes of actual and asymptotic diagrams reaches
51
about 3 dB. Finally in the high frequency range actual and asymptot-
ic diagrams coincide and slope of the diagram is −20 dB/dec . The
phase angle dependence versus frequency also is plotted in semilog
coordinates. The phase angle is calculated from expression:
Im G A ( jω)
ϕ A (ω) = arctan . 6)
Re G A ( jω)
Dependence of phase angle versus frequency of the first order
system is shown in Fig. 7.
Figure 7 shows that the phase angle of the first order system
ϕ (ω) in the low frequency range is close to zero, i. e. is similar
to that proportional system. In the middle frequency range phase
it reaches – 45º at frequency ω = T −1 . Finally, the phase angle ap-
proaches – 90º in the high frequency range. The asymptotic phase
angle characteristic ϕ Aa is also presented in Fig. 7. According to as-
ymptotic characteristic it is possible to separate three ranges of fre-
quency: low frequency range, while ω < ωs /10 ; ωs /10 < ω < 10ω
is middle frequency range and ω > 10ωs is high frequency range.
52
Examples of the first order system are given in Fig. 8.
The system shown in Fig. 8a differs from the system
shown in
Fig. 3a just with assumption non-zero friction force FT . For sliding
movement:
FT = −kT v ; (37)
53
di
L + Ri = u1; (40)
dt
where i is current.
Output voltage according to Ohm‘s low is calculated as:
u2
u2 = iR; → i = . (41)
R
Substituting (41) to (40) yields:
L du2
+ u2 = u1. (42)
R dt
From Eq. (41) it is evident, that the gain of the system K A = 1
and time constant T = L .
R
Ideal and real differentiating systems also depend on the first
order systems. Ideal differentiating system is described as:
du b du du
a0 y = b1 ;→ y = 1 = KD ; (43)
dt a0 dt dt
where K D is gain of the system.
Step response of ideal differentiating system is Dirac impulse
δ (t ) :
∞, t = 0;
δ (t ) = (44)
0, t ≠ 0.
Dirac function is impulse function with limited signal power:
∞
∫ δ (t )dt = 1. (45)
−∞
54
Y (s )
a0Y (s ) = b1U (s )s → GDI (s ) ≡ = K DI s. (46)
U (s )
Fig. 9. Step responses of ideal (DI) and real (DR) differentating systems
56
According to (52) the transfer function of real differentiating system
is:
K DR s
GDR = . (54)
Ts + 1
Transfer function of real differentiating system in frequency
domain is expressed as:
K DR jω T ω2 + jω
GDR ( jω) = = K DR 2
. (55)
Tjω + 1 1 + (T ω)
Real and imaginary part of expression (55) has the form:
K DRT ω2 K DR ω
x ≡ Re G ( jω) = 2
; y ≡ Im G ( jω) = 2
. (56)
1 + (T ω) 1 + (T ω)
x
K DR
T (K D − Tx ) x
y= = (K DR − Tx ) . (58)
1+ T 2 x T (K DR − Tx )
T (K D − Tx )
y
2
x 2 K
2
= ; y + x − x DR = 0;
K DR − Tx T (K DR − Tx ) → T (59)
y ≥ 0.
y ≥ 0;
57
Parametric equation (59) is rewritten in this way:
2 2 2
2 K DR K DR K DR
y + x − 2 x+ = ;
2T 2T 2T
y ≥ 0; (60)
2 2 2
K DR K DR
y + x − = .
→ 2T 2T
y ≥ 0.
The first equation of the set (60) describes circle with cen-
tre coordinates x0 = [0, K DR 2T ] and radius R = K DR (2T ) . The
second equation states the polar plot being over the real axis as half
cycle. Polar plot of real differentiating system is shown in Fig. 10.
Fig. 10. Polar plot of ideal (DI) and real (DR) differentiating systems
2
K DR ω K DR ω (T ω) + 1
GDR ( jω) = 2
Tω + j = 2
. (61)
1 + (T ω) 1 + (T ω)
58
GDR jZ 2
TZ j 2
.
1 T Z 1 T Z
(61)
Bode plots uses magnitudes, expressed by decibels, thus:
Bode plot uses magnitudes, expressed by decibels, thus:
2
K DR Z T Z 1
LDR Z 20lg GDR jZ 20lg 2 2
.
K DR ω 1 (Tω
T )Z + 1
LDR (ω) = 20lg GDR ( jω) = 20lg 2
. (62)
(62) 1 + (T ω)
Expression
Expression(62)(62)cancanbebe
directly
directlyused
usedtotoplot
plotBode
Bodediagram
diagram by
by computer,
computer, but inin many
manycases casesthethe
asymptotic
asymptotic Bode plots
Bode are con-
plots are con-
structed. ForFor
structed. this
thisatatfirst
firsttwo
twofrequency
frequencyranges
rangesareare analysed:
analysed: low
low fre-
quency range at T Z 1 and high frequency range at T Z 1 . At
frequency At low
lowfrequency
frequencyrange
rangeexpression
expression(62)(62)becomes:
becomes:
59
Fig. 11. Bode plots of ideal (DI) and real (DR) differentiating systems
Fig. 12. Phase characteristic of the frequency response of ideal (DI) and
real (RD) differentiating system in semi-log scale
60
In the same Fig. 12 the asymptotic phase angle curve ϕ DRa (ω)
is presented. It approximates real phase angle characteristic and is
convenient for design of the desired controller characteristics.
The simple circuit, realizing real differentiating system is
shown in Fig. 13.
u2 = iR1. (68)
61
Content of the report
Control questions
62
The second order systems
Theoretical part
In general case the second order system is described by dif-
ferential equation:
d2y dy d 2u du
a2 + a1 + a0 y = b2 2 + b1 + b0u (1)
dt 2 dt dt dt
where: u and y are system input and output signals, a0, a1, a2,
b0 and b1 are constants. For practical cases it is convenient to assume
b1 = b0 = 0 and Eq. 1 becomes:
d2y dy
a2 2
+ a1 + a0 y = b0u (2)
dt dt
63
Notations, chosen in this way, take the physical meaning: ω0
is natural frequency of the system, ρ is damping ratio and K is gain.
Solution of Eq. (3) is equal to the sum of solutions of homog-
enous equation (if the right hand side of Eq. 3 is equal to zero), the
so called free movement of the system and solution of non-homog-
enous system (the so called forced movement). General solution of
homogeneous system depends on roots of characteristic equation. It
d
is obtained replacing → λ in Eq. 3:
dt
1 2ρ
λ2 + λ + 1 = 0. (4)
ω02 ω0
2ρ 4ρ2 4
− ± 2
− 2
ω0 ω0 ω0
p1,2 = = −ρω0 ± ω0 ρ2 − 1. (5)
2
ω02
64
ynh = A (7)
Substituting (7) and its derivatives, that are equal to zero, into
Eq. 3 and assuming u = 1(0 ) yields:
ynh ≡ A ≡ K (8)
Summing Eq. (6) and Eq. (8), the general solution of differen-
tial equation (3) at unit step input is:
Kp2
C1 = − p − p ;
2 1
(11)
C = Kp 1
.
2 p2 − p1
Finally, if δ > 1 and the system has zero initial conditions, step
response is described as:
Kp2 exp ( p1t ) Kp1 exp ( p2t )
y=− + + K; (12)
p2 − p1 p2 − p1
where: p1,2 are calculated from Eq. (5).
While p1,2 < 0, the solution is composed from the sum of two
terms, decaying by exponential low and gain K. At zero initial con-
65
ditions there is no any overshoot in this case, therefore y has dead-
beat shape and with time approaches to gain value K.
The set of second order system responses with ω0 = 5 and K =
2,5 at ρ = [0,5; 0,75; 1; 1,25; 1,5]. Two graphs are presented for ρ =
1,25 and ρ = 1,5. Increase damping ratio increases settling time. The
shape of step response remains the same. If ρ 2 − 1 = 0; → ρ = 0 , then
p ≡ p1= p2 and p ∈ R . Then the general solution of homogenous
system is described as:
66
Fig. 1. Set of the second order system step responses at different ρ values
If theIfinput
the input
is unitisstep,
unit then
step,the
then the particular
particular solutionsolution
of non-of non-
If the input is unit step, then the particular solution
h ĺ of non-
homogenous
homogenous systemsystem
again again will the
will have have the (7).
form form yh → 0yand
(7). While
While 0 and
tĺhomogenous
, expressionsystem again
then expression iswill have the form (7). While y ĺ 0 and
t → ∞, then (8) is(8)
valid valid alsothe
also and andgeneral
rhe general solution
solution is:h is:
t ĺ , then expression (8) is valid also and rhe general solution is:
y
C1 exp UZ0t sin Z0 1 U2 t
y C1 exp UZ0t sin Z0 1 U2 t
(19) (19)
C2 exp UZ0t cos Z0 1 U2 t K .
C2 exp UZ0t cos Z0 1 U2 t K .
(19)
67
Constants C1 and C2 are calculated from initial conditions. If
the zeroConstants C1 and are
initial conditions C2 are calculated
assumed , i. e. from
y = 0 initial
and y‘ conditions.
= 0 at t = 0,If
the the
then zerosetinitial conditions
of equations forare , i. e. y =looks
assumedconstants
calculation y‘ =this:
0 andlike 0 at t = 0,
Constants C1 and C2 are calculated from initial conditions. If
zero initial conditions are assumed , i. e. y = 0 and y‘ = 0 at t = 0, then
the set of equations for calculation constants looks like this:
C2 + K = 0; C2 + K = 0;
→ (20)
C1 Im p1,2 + C2 Re p1,2 = 0;
2
C1ω0 1 − ρ − C2 ω0ρ = 0.
expresses as:K U
y exp UZ0t sin Z0 1 U2 t
2
1 UK U
y exp UZ0t sin Z0 1 U2 t (22)
2
1 U
K exp UZ0t cos Z0 1 U t K .
2
(22)
(22)
K exp UZ0t cos Z0 1 U2 t K .
Expession (22) causes difficulties in its application, therefore
it can beExpession
presented (22)simpler
Expessionin(22)
causes form.
difficulties in its
The first
causes difficulties intwo
application
its terms
therefore
of equation,
application, therefore
it can be the
describing presented in a simpler
free response form. The first
are solution two terms of equa-
it can be presented in simpler form. Theoffirst
homogenic
two termsequation at
of equation,
tion, describing
zerodescribing the
initial conditions free response is solution of homogenic equation
the freeand can be are
response rewritten in this
solution way:
of homogenic equation at
at zero initial conditions and can be rewritten in this way:
zero initial conditions and can be rewritten in this way:
yh
KU
exp UZ0t sin Z0 1 U2 t
2
1 UK U
yh exp UZ0t sin Z0 1 U2 t
2
K exp UZ 1 t Ucos Z 1 U2 t
0 0
(23)
ª U
K exp UZ0t cos Z0 1 U2 t
sin Z0 1 U2 t »
º
(23)
«
2U
K exp UZ0t « 1ª« U º
sin Z0 1 U2 t» . »
« 2
1 U1 U2 t »
K exp UZ«0cos
t« Z 0 » ».
¬ «
«cos Z0 1 U2 t
¬
¼ »
»
¼
Demote a = tanij and apply68 formula:
Demote a = tanij and apply formula:
sin M cos Z t M
cos Z t a sin Z t cos Z t sin Z t . (24)
Demote a = tanφ and apply formula:
sin ϕ cos (ω t + ϕ )
cos ω t + a sin ω t = cos ω t − sin ω t = . (24)
cos ϕ cos ϕ
. (25)
(25)
cos Z0 1cos UM2
tM
.
cos M
In order to express cos ij by parameters of Eq. (3), the set
equations musttobeexpress
In order solved:cos φ by parameters of Eq. (3), the set
In order to express cos ij by parameters of Eq. (3), the set
equations must be solved:
equations must be 2solved: 2 sin 2 M cos 2 M 1;
sin M cos M 1;
°2 2
sin ϕ + cos ϕ = 1; °
sin 2 ϕ + cos 2 ϕ = 1;
sin®2 tan 2 U o
®sin
2 U
M Mcosρ M 1; ; sin 2 M 1; cos M;
MM cos (26)
°
°− tan ϕ = 2 → ° ° ρ
U12;U o ®sin¯ϕ = − U2 ϕ;
U12 cos
® ¯ (26)
° tan M 1 − ρ 2 ; 2 °sin M 1 − ρ 2 cos M; (26)
¯ o cos M 1 U 1 U . ¯
2
1 U
→ cos ϕ = 1 − ρ .
o cos M 1 U2 .
Application of express (25) an (26) for (23) gives:
Application of express (25) and (26) for (23) gives:
Application of
K express (25) an (26) for (23) 2gives:
yh exp UZ0t cos Z0 1 U t M ; (28)(28)
2
K1 U
yh exp UZ0t cos Z0 1 U2 t M ; (28)
2 ρ
1 U
where ϕ = − arctan . U
where M arctan
1 − ρ2 .
2
U1 U
where M arctan .
Expressions (27) and 1 U(28)
2 are more suitable for analysis.
They showExpressions (27) and
exponentially (28) are
decaying more suitable
oscillations. for analysis.
Frequency They
of oscil-
show exponentially decaying oscillations. Frequency of oscillations:
lations:
Expressions (27) and (28) are more suitable for analysis. They
show exponentially decaying2oscillations.
69 Frequency of oscillations:
Zs Z0 1 U Im p1,2 ; (29)
is called
Z Z frequency
1 U2 ofIm
selfoscillations.
p ; (29)
s 0 1,2
ωs = ω0 1 − ρ2 = Im p1,2 ; (29)
70
Y (s) K
G ( s) ≡ = 2 . (32)
U ( s) s 2ρ
+ s +1
ω02 ω0
The polar plot of the first order system has two characteristic
points. From Eq. (33) at ω = 0 the initial point is calculated as:
G ( j 0) = K ; (34)
K K α (ω) − β (ω) j
G ( jω) = = 2 . (37)
α (ω) + β (ω) j α (ω) + β2 (ω)
71
K α (ω)
ℜG ( jω) = . (38)
α (ω) + β2 (ω)
2
Fig. 2. Polar plot of the second order system with different ρ values
72
It is evident, that all characteristics begin at point x(0) = (K;
0) = (2,5; 0) and end at point x(∞) = (0; 0). In this figure frequencies
ω0 are marked by small squares.
Expression (37) is convenient for analysis of magnitude and
phase Bode plots. Frequency response magnitude characteristic is:
2 2
K α (ω) K β (ω)
G ( jω) = 2 + =
α (ω) + β (ω) α (ω) + β (ω)
2 2 2
(41)
K
= .
α 2 (ω) + β2 (ω)
K
L (ω) ≡ 20lg G ( jω) = 20lg . (42)
α 2 (ω) + β2 (ω)
73
In the high frequency range, at ω >> ω0, then α(ω) ≈ − (ω/
ω0)2, therefore magnitude is:
K K ω0
G ( jω) = = . (44)
ωT >>1 4 2 2
ω 2 ω ω 2
+ 4ρ ω + 4ρ
ω0 ω0 ω0
ω 2 ω
L (ω) = 20lg K 0 = 20lg K − 40lg . (46)
ωT >>1
ω ω0
10ω ω
L (10ω) = 20lg K − 40lg = 20lg K − 40lg − 40 =
ωT >>1 ω0 ω0 (47)
= L (ω) − 40;
ωT >>1
74
2
ω
K = K 0 ; → ωs = ω0 . (48)
ωs
Corner plot ωs is equal to system resonant frequency ω0.
The Bode plot of the second order system with ω0 = 5, K = 2,5
and ρ = [0,25; 0,5; 0,75; 1,0; 1,25; 1,5] are presented in Fig. 3.
Fig. 3. Bode plot of the second order system with different ρ values
− K β (ω)
ℑG ( jω) α (ω) + β2 (ω)
2
ϕ (ω) = arctan = arctan =
ℜG ( jω) K α (ω)
(49)
α 2 (ω) + β2 (ω)
−β (ω)
arctan .
α (ω)
75
Substituting (36) to expression (49) yields:
ω
−2ρ
ω0
ϕ (ω) = arctan 2
. (50)
ω
1−
ω0
ω
ϕ (ω) = arctan −2ρ ≈ arctan (−0 ) ≈ −0 ;
(51)
ωT <<1
ω0
Fig. 4. Phase angle Bode plot of the second order system with different ρ
values
FH = k H x; (57)
FT = kT v. (58)
Fig.
Fig. 6.6. Second
Second order
order system
system
Fig. 6. Second order system
8282
It is required:
79
used and Laplace transform is applied for variables: UI ≡ L[uI];
UO ≡ L[uO]; ΦI ≡ L[φ1]; Φ 2≡ L[φ2], where L denotes Laplace
transform. Regarding directions of currents, for nodes φ1 and φ2 the
equations are valid:
U I − Φ1 U O − Φ1 Φ1 − Φ 2 Φ1
R + − − = 0;
1 R2 R3 1/ (C2 s )
(61)
Φ1 − Φ 2 + U O − Φ 2 = 0.
R3
1/ (C1s )
U I − Φ1 U O − Φ1 Φ1
R + − − Φ1C2 s = 0;
1 R2 R3
(62)
Φ1 + U O = 0, → Φ = −U C R s.
R3 1/ (C1s ) 1 O 1 3
U I + U O C1R3 s U O + U O C1R3 s
+ + U O C1s +
R1 R2 (63)
2
U O C1C2 R3 s = 0.
80
UO R2 R1
G (s ) ≡ =− . (65)
UI C1C2 R2 R3 s + C1s (R2 R3 R1 + R3 + R2 ) + 1
2
In this case the values of circuit elements R1, R2, R3, C1 and C2
are calculated:
1 1
= C1C2 R2 R3 ; → ω0 = ≈ 5; (66 a)
ω02 C1C2 R2 R3
2ρ R R
= C1 2 3 + R3 + R2 ; →
ω0 R1
R R (66 b)
C1 2 3 + R3 + R2
R
→ρ= 1 ω ≈ 0, 4;
0
2
and
R2 33 ⋅ 103
K =− =− ≈ −2,54. (66 c)
R1 13 ⋅ 103
While similar system was already discussed, the plots are not
repeated here.
81
Content of the report
Control questions
82
Analysis of algebraic methods of
stability
Theoretical part
83
Roots of characteristic polynomial, set equal to zero, are
called system poles and have notation pn, where n = 1, 2, ..., N. It is
evident, that d(pn ) = 0.
Linear system can be applied as principle of superposition,
therefore it is possible to discuss contribution of each homogeneous
equation root to solution of the system, and the overal solution is the
sum of all contributions.
Therefore all roots are classified as:
1) aliquant roots;
2) multiple roots.
If the system has G aliquant roots, then their contribution to
solution of homogeneous equations is:
D
yh1 = ∑ Cd exp ( pd t ); (4)
d =1
84
Constants C1 and C2 are calculated according to initial condi-
tions and are real.
In general there may be several groups of multiple real roots.
For example, (λ + 1)2(λ + 2)2 = 0 has 4 roots, which can be devided
in two groups of multiple roots: p1,2 = − 1 and p3,4 = − 2. If the group
of multiple roots has E multiple roots p1 = p2 =....= pE ≡ p , then con-
tribution of those roots to the solution of homogeneous equation is
described as:
E
yh3 = exp (t p ) ∑ Cet e−1 ; (7)
e =1
lim yh = 0. (9)
t →∞
85
One more definition of stability is realated to behaviour of
asymptotic non-homogeneous equation (1) solution. It is stated that
the system is stable if the condition:
∃Y ≠ ±∞ : lim y = Y ; (10)
t →∞
is fulfilled.
While solution of non-homogeneous equation depends on in-
put signal u, therefore the limit of y for different u is different.
The last definition of stability states, that if the system is sta-
ble at bounded input |u| ≤ M, where M is finite real number, then the
system output y, if t → ∞, also remains bounded. This definition is
called „Bounded Input – Bounded Output“ (BIBO).
Linear system is valid superposition principle, therefore if the
characteristic equation has no N roots, then its solution is equal to
the sum of N contributions. Therefore the system is stable, when
every solution, corresponding to every root, is stable.
86
pends on function exp(αt), where α ≡ Re(pn) asymptotic behaviour.
Figure 1 shows set of functions exp(αt) at variable parameter α. It is
evident, that exp(αt) → 0 when t→∞ if α < 0.
Solution (3) corresponds to aliquant real roots. Thus, the
system is stable, if real roots or real parts of roots are negative:
Re(pn) < 0. Analysis of solutions with multiple roots (7 and 8 ex-
pressions) can be seen, that they have product te·exp (α t), where
α ≡ Re(pe). At t→∞, function te→∞. Fig. 1 shows at t→∞ function
te·exp (α t)→∞ at any positive α and the system will be unstable. If
α > 0, then the limit of the mentioned expression is calculated:
te
lim t e exp (− α t )= lim . (11)
t →∞ t →∞ exp ( α t )
87
According to (13), the undamped oscillations occure in the
system and this system is stable by the meaning „bounded input-
bounded output“, but it is not stable according to asymptotic solu-
tion meaning, because (9) is not valid. It is said that this system is on
the boundary of stability.
Real pole in this point pn = 0 + 0j corresponds to differential
equation:
dy 1
a = u; → y= ∫ udt. (14)
dt a
88
Im
Re
roots(coef_vect)
zone_vect = roots(coef_vect)
p_vect = pole(G_sys)
89
The same Control System Toolbox has command pzmap,
which depicts system zeros and poles in the complex plane. Its form
is:
pzmap(G_sys)
[p_vect, z_vect] = pzmap(G_sys)
then, the system will be stable, when all polynomial coefficients an,
an-1,..., a1, a0 are positive and determinants are positive:
a1 a3 a5
a a3
D1 = a1 > 0; D2 = 1 > 0; D3 = a0 a2 a4 > 0; (17)
a0 a2
0 a1 a3
90
a1 a3 a5 0
a1 a3 a5 a7
a0 a2 a4 0
a a2 a4 a6
D4 = 0 > 0; Dn = 0 a1 a3 0 > 0. (18)
0 a1 a3 a5
0 a0 a2 0
0 a0 a2 a4
0 0 an
a1 a3 a5 a7 a9 ...
a0 a2 a4 a6 a8 ...
0 a1 a3 a5 a7 ...
0 a0 a2 a4 a6 ...
0 0 a1 a3 a5 ...
0 0 a0 a2 a4 ...
...
91
Then the determinants, separated by dash lines, are calculated.
Calculation of determinants higher than 3 order is difficult.
Therefore Rauth present a simplyfied formulation of criterion not
including high order determinants.
For Rauth formulation the table of characteristic equation (16)
coefficients is composed. The general view of the table is:
The first two rows of the table are made directly from coef-
ficients of characteritic equation.
Then coeffcients c are calculated as:
c1 = sgn (an −1 )⋅ (an −1an − 2 − an an −3 );
c3 = sgn (an −1 )⋅ (an −1an − 4 − an an −5 );
(19)
ci = sgn (an −1 )⋅ (an −1an −i −1 − an an −i − 2 );
92
Coefficients e are calculated in a similar way:
Example 1.
Given: two objects with transfer functions:
5s + 3
G1 = 2
;
s + 1, 2 s + 1
(22)
5s + 3
G2 = .
s 5 + 8s 4 + 6 s 3 + 5s 2 + 4 s + 1
Required:
1. Plot unit response of system G1(s) and G2(s).
2. Depict the system poles and zeroes in the complex plan
and decide about system stability.
93
3. Check stability of the system, described by transfer
function G1(s), using Hurwitz formulation of Rauth-
Hurwitz method.
4. Check stability of the system, described by transfer
function G2(s), using Hurwitz formulation of Rauth-
Hurwitz method.
5. Check stability of the system, described by transfer
function G2(s), using roots method.
6. Plot step response of the system, described by transfer
function G2(s).
Solution:
While both systems are described by transfer functions, then
the objects, corresponding to those, are developed using tf com-
mands:
t_vect = [0:0.01:10]
y1_vect = step(W_1, t_vect)
y2_vect = step(W_2, t_vect)
plot(t_vect, y1_vect, t_vect, y2_vect)
94
Fig. 3. Step responses of systems G1(s) and G2(s)
pzmap(G_1)
95
Zeros of transfer function are designated by „0“ and poles
„x“ symbols. Fig. 4 shows that all system poles, that mean roots of
characteristic equation are located on the left hand side semiplane of
complex plane, therefore the system is stable.
The characteritic equation of the system is:
where: a5 = 1; a4 = 8; a3 = 6; a2 = 5; a1 = 4 ir a0 = 2
The Hurwitz determinant is constructed as this:
a1 a3 a5 4 6 1
a 11 a
a a33 aa55 4444 6666 1111
D3 = a1 0 aa3a32 aa5a5 4
a a
1 = 2 5 8 = −72.
DD3333 a
DD a00000 aaaa22a22 aaaa44a44
aa 2222 5555 8888 72.
72.
1 3 0 4 6 72. 72.
0
000 aaaa11 aaaa33
11 33
0000 4444 6666
Hurwitz determinant in the third order determinant. The other
Hurwitz
Hurwitzdeterminant
Hurwitz
determinants
Hurwitz determinantin
determinant
are:
determinant inthe
inin thethird
the
the thirdorder
third
third orderdeterminant.
order
order determinant.The
determinant.
determinant. Theother
The
The other
other
other
determinants
determinants
determinants
determinantsare:are:
are:
are: a1 a3 4 6
DD D1 =aaa1 = 4 4!0;
! >0;0;
DD D2 =aaaa1111 aaaa3333 =4444 6666 8=8!8!0.
> 0.
DD1111 aa1111 44!!0;0;DD2222 aaa0 aaa2 222 555 88!!0.0.
4 0.
aa00 aa22 22 55
00 22
Hurwitz stability formulation states, that the system is sta-
Hurwitz
Hurwitz
ble, when
Hurwitz
Hurwitz stability
stability
Hurwitz formulation
formulation
determinant
stability
stability and all
formulation
formulation states,
states, that
the lower
states,
states, that system
system
thatorder
that system isis stable,
isis stable,
determinants
system stable,
stable,
when
when
are
when Hurwitz
Hurwitz
positive.
whenHurwitz determinant
determinant
Hurwitz
Hurwitzdeterminant and
and
determinant
determinantand all
andall allthe
the
of
allthe lower
lower
this
thelower order
systemorder
lowerorder D determinants
determinants
< 0 is
orderdeterminants are
negative,are
3 determinantsare are
positive.
positive.
therefore
positive.
positive. Hurwitz
Hurwitz determinant
determinant
the system
Hurwitz
Hurwitz of
ofthis
ofof
is unstable.
determinant
determinant this system D
system
system
Application
this
thissystem DD <0
3<0
D33of
<0 isisnegative,
isis
Rauth
3<0
negative, there-
there-
formulation
negative,
negative, there-
there-
fore
fore the
the system
the
requires
fore
fore the tosystem isis unstable.
isis
construct
system
system unstable.
the Application
Application
table, which
unstable.
unstable. of
ofof
looks like
Application
Application Rauth
Rauth formulation
Rauth
of this:
Rauth formulation
formulation
formulation
requires
requiresto
requires
requires toconstruct
toto constructthe
construct
construct thetable,
the
the table,which
table,
table, whichlook
which
which looklike
look
look likethis:
like
like this:
this:
this:
1 a5 = 1 a3 = 6 a1 =4
aa5=15=1 aa3=63=6 aa1=4
1=4
2 aa4a5==1
5=1
8 a2a=a3=6
35=6 aa1=4
a0 =2 1=4
aa4=84=8 aa2=52=5 aa0=2
0=2
aa4=84=8 aa2=52=5 aa0=2
0=2
3 c1c1 aa44aa33aa55aa22 43 43 cc33 aa44aa11aa55aa00 30
30 c5=0
cc5=0
5=0
c1c1 aa44aa33aa55aa22 43 43 cc33 aa44aa11aa55aa00 30
30 cc5=0
5=0
dd11 c1ca1a22aa44cc33 25 25 dd33 c1ca1a00aa44cc55 86
86 dd5=0
5=0
4 dd11 c1ca1a22aa44cc33 25 25 dd33 c1ca1a00aa44cc55 86
86 d5=0
dd5=0
5=0
e1e1 11dd1c1c33c1cd1d33 4448
4448 ee3=0
3=0 ee5=0
5=0
ee 11ddcc ccd1d33 4448 4448
5 11 e1 = (− 111)(3d31c31− c1d 3 ) = 4448 e3 e=e3=0
30=0 ee5=0
e5=0 5=0
Analysis
Analysisof
Analysis
Analysis ofthe
ofof thefirst
the
the firstcolumn
first
first columnshows,
column
column shows,that
shows,
shows, thatthe
that
that thecoeffcients
the
the coeffcientshave
coeffcients
coeffcients have
have
have
96
different
differentsigns,
different
different signs,therefore
signs,
signs, thereforethe
therefore
therefore the
the systemG
thesystem
system
system G22(s)
GG 2(s)isisunstable.
(s) unstable.While
unstable.
2(s)isisunstable. Whilethe
While
While thesign
the
the sign
sign
sign
of
of coefficients
coefficients
ofofcoefficients changes
changes
coefficientschanges twices,
changestwices,twices, passing
passing
twices,passing from
from
passingfrom third
third
fromthird row
row
thirdrow to
tofourth
fourth
rowtotofourth and
and
fourthand
and
from
fromfourth
from
from fourthto
fourth
fourth tofifth,
toto fifth,it
fifth,
fifth, itcan
itit canbe
can
can bebeconcluded,
be concluded,that
concluded,
concluded, thatsystem
that
that systemhas
system
system hastwo
has
has twopositive
two
two positive
positive
positive
Analysis of the first column shows, that the coeffcients have
different signs, therefore the system G2(s) is unstable. While the
sign of coefficients changes twice, passing from the third row to the
fourth and from the fourth to the fifth, it can be concluded, that the
system has two positive roots on the right hand semiplane.
Content of report
Control questions
97
References
98