682 Appendix B
Example 2. Matrix multiplication
23 23
! 2 1 0 4! ! 2 1 11 !
2 1 3 64 0 3 1 57 ¼ 7 11 2 1 3 46 0 3 75 ¼ 7
141 121 3 15 5 141 12 3 15
23 23
2 1 ! 5 6 7 2 1! 1 0! 4 3!
46 0 3 57 2 1 3 46 3 12 3 57
¼ ¼
141 11 23 33
12 4 95
2 1! 1! 5! 2!
¼ ½1 3 ¼ ½5
03 3 9
1
B.7 MULTIPLICATION OF A MATRIX BY A SCALAR
The multiplication of matrix M by a scalar k is effected by multiplying each
element mij by k, that is,
kM ¼ Mk ¼ ½kmij ðB:10Þ
Example 3.
0 !! 2 !
1 À7 1 0 10 0
2 5 ¼ 5 À7 2¼ À14
B.8 UNIT OR IDENTITY MATRIX
A unit matrix, denoted I, is a diagonal matrix in which each element on the
principal diagonal is unity. Sometimes the notation In is used to indicate an
identity matrix of order n. An example of a unit matrix is
23
1000
I ¼ 664 0 1 0 0 775 ðB:11Þ
0 0 1 0
0001
The premultiplication or postmultiplication of a matrix M by the unit matrix I
leaves the matrix unchanged.
MI ¼ IM ¼ M ðB:12Þ
Copyright © 2003 Marcel Dekker, Inc.
Matrix Linear Algebra 683
B.9 DIFFERENTIATION OF A MATRIX
The differentiation of a matrix with respect to a scalar is effected by differen-
tiating each element of the matrix with respect to the indicated variable:
2 m_ 11 m_ 12 Á Á Á m_ 1b 3
d ½MðtÞ ¼ M_ ðtÞ ¼ ÂÃ ¼ 6664 m_ 21 m_ 22 ÁÁÁ m_ 2b 7757 ðB:13Þ
dt m_ ij ... ... ... ...
m_ a1 m_ a2 Á Á Á m_ ab
The derivative of a product of matrices follows rules similar to those for the
derivative of a scalar product,with preservation of order. Thus, typically,
d ½MðtÞNðtÞ ¼ MðtÞN_ ðtÞ þ M_ ðt ÞNðtÞ ðB:14Þ
dt
B.10 INTEGRATION OF A MATRIX
The integration of a matrix is effected by integrating each element of the matrix
with respect to the indicated variable: ðB:15Þ
RR
MðtÞ dt ¼ ½ mij dt
B.11 ADDITIONAL MATRIX OPERATIONS
AND PROPERTIES
Additional characteristics of matrices required to solve matrix state equations
by using the Laplace transform are presented in this section.
PRINCIPAL DIAGONAL. The principal diagonal of a square matrix M ¼
[mij] consists of the elements mii.
DIAGONAL MATRIX. A diagonal matrix is a square matrix in which all
the elements off the principal diagonal are zero. This fact can be expressed as
mij ¼ 0 for i 6¼ j and the principal diagonal elements mii ¼ mi are not all zero.
When the diagonal elements are all equal, the matrix is called a scalar matrix.
TRACE. The trace of a square matrix M of order n is the sum of all the
elements along the principal diagonal; that is,
Xn ðB:16Þ
trace M ¼ m11 þ m22 þ Á Á Á þ mnn ¼ mii
i¼1
Copyright © 2003 Marcel Dekker, Inc.
684 Appendix B
For the state equation x_ ¼ Ax þ Bu, ðB:17Þ
X Xn
trace A ¼ ðAÞ ¼ i
i¼1
where (A) is the spectrum of A.
DETERMINANT. The determinant of a square matrix M of order n is the
sum of all possible signed products of n elements containing one and only
one element from every row and column in the matrix. The determinant of a
matrix can be represented by replacing the brackets by vertical bars. The
determinant of M may be denoted by jMj, or det M, or ÁM. It is assumed that
the reader knows how to evaluate determinants.
Example 4. jMj ¼ 3 1 2 ¼ 63 ðB:18Þ
1 0 À4
23 1 23 0 5
M ¼ 4 1 0 À4 5 7
05 7
Characteristics of determinants are as follows:
1. The determinant of a unit matrix is jIj ¼ 1.
2. The determinant of a matrix is zero if (a) any row or column contains
all zeros or (b) the elements of any two rows (or columns) have a
common ratio.
SINGULAR MATRIX. A square matrix is said to be singular if the value of
its determinant is zero. If the value of its determinant is not zero, the matrix is
nonsingular.
MINOR. The minor Mij of a square matrix M of order n is the determinant
formed after the ith row and jth column are deleted from M.
PRINCIPAL MINOR. A principal minor is a minor Mii whose diagonal
elements are also the diagonal elements of the square matrix M.
COFACTOR. A cofactor is a signed minor and is given by ðB:19Þ
Cij ¼ Áij ¼ ðÀ1ÞiþjMij
Example 5. For the matrix M of Example 4, the cofactor C21 is obtained by
deleting the second row and first column, giving
ðÀ1Þ2þ1
C21 ¼ 1 2 ¼ þ3 ðB:20Þ
5 7
Copyright © 2003 Marcel Dekker, Inc.
Matrix Linear Algebra 685
B.12 GENERALIZED DETERMINANT
The determinant of a square matrix M of order n can also be computed from
the sum of terms obtained by an expansion along any row i or along any
column j as follows:
1. The cofactors Cij are formed for each element mij of any row of the
matrix M. Then
Xn
jMj ¼ mijCij for any row i ðB:21Þ
j¼1
2. The cofactors Cij are formed for each element mij of any column j of
the matrix M. Then
Xn for any column j ðB:22Þ
jMj ¼ mij Cij
i¼1
ADJOINT MATRIX. The adjoint of square matrix M, denoted as adj M,
is the transpose of the cofactor matrix. The cofactor matrix is formed by
replacing each element of M by its cofactor.
Adj M ¼ ! !T array of !T ðB:23Þ
Cji ¼ Cij ¼ cofactor
Example 6. The adj M for the matrix M of Example 4 is
2 8 3T 2 3
20 À7 20 3 À4
Adj M ¼ 4 3 21 À15 5 ¼ 4 À7 21 14 5 ðB:24Þ
À4 14 À1 5 À15 À1
INVERSE MATRIX. The product of a matrix and its adjoint is a scalar
matrix, as illustrated by the following example.
Example 7. The product M adj M, using values in Examples 4 and 6, is
2 32 32 3
3 1 2 20 3 À4 63 0 0
M adj M ¼ 4 1 0 À4 54 À7 21 14 5 ¼ 4 0 63 0 5 ¼ 63I ¼ jMjI
0 5 7 5 À15 À1 0 0 63
ðB:25Þ
The inverse of a square matrix M is denoted by MÀ1and has the property
MMÀ1 ¼ MÀ1M ¼ I ðB:26Þ
Copyright © 2003 Marcel Dekker, Inc.
686 Appendix B
The inverse matrix MÀ1 is defined from the result of Example 7 as
MÀ1 ¼ adj M ðB:27Þ
jMj
The inverse exists only if jMj 6¼ 0; that is, the matrix M is nonsingular.
INVERSE OF A PRODUCT OF MATRICES. The inverse of a product of
matrices is equal to the product of the inverses of the individual matrices in
reverse order:
½A BÀ1 ¼ BÀ1AÀ1 ðB:28Þ
PRODUCT OF DETERMINANTS. The determinant of the product of
square matrices is equal to the product of the individual determinants:
jABCj ¼ jAj Á jBj Á jCj ðB:29Þ
RANK OF A MATRIX. The rank r of a matrix M, not necessarily square,
is the order of the largest square array contained in M that has a nonzero
determinant.
Example 8. ðB:30Þ
23
123
M ¼ 42 3 45
357
The determinant jMj ¼ 0; that is, M is a singular matrix. The square array
obtained by deleting the first row and second column has a nonzero
determinant:
2 4 ¼ 2 ðB:31Þ
3 7
Therefore, M has a rank of 2.
DEGENERACY (OR NULLITY) OF A MATRIX. When a matrix M
of order n has rank r, there are q ¼ n À r rows or columns which are linear
combinations of the r rows or columns. The matrix M is then said to have
degeneracy q. In Example 8 the matrix M is of order n ¼ 3, the rank is r ¼ 2,
and the degeneracy is q ¼1 (simple degeneracy). Note that the third row of M
is the sum of the first two rows. Also, the third column is two times the second
column minus the first column.
SYMMETRIC MATRIX. A square matrix containing only real elements is
symmetric if it is equal to its transpose, that is, A ¼ AT. The relationship
Copyright © 2003 Marcel Dekker, Inc.
Matrix Linear Algebra 687
between the elements is
aij ¼ aji
A symmetric matrix is symmetrical about its principal diagonal.
TRANSPOSE OF A PRODUCT OF MATRICES. The transpose of
a product of matrices is the product of the transposed matrices in reverse
order:
½ABT ¼ BT AT ðB:32Þ
This relationship can be described by the statement that the product of trans-
posed matrices is equal to the transpose of the product in reverse order of the
original matrices.
B.13 HERMITE NORMAL FORM
A number of properties of a matrix can be determined by transforming the
matrix to Hermite normal form (HNF). These properties include the deter-
mination of the rank of a matrix, the inverse of a matrix of full rank, the char-
acteristic polynomial of a matrix, the eigenvectors associated with the
eigenvalue, the controllability of a system, and the observability of a system.
The transformation is accomplished on a matrix M by performing the
following basic or elementary operations:
1. Interchanging the ith and jth rows
2. Multiplying the ith row by a nonzero scalar k
3. Adding to the elements of the ith row the corresponding elements of
the jth row multiplied by a scalar k
The purpose of these operations is to produce a unit element as the first non-
zero element in each row (from the left), with the remaining elements of the
column all zero. These operations can be accomplished by premultiplying by
elementary matrices, where the elementary matrices are formed by performing
the desired basic operations on a unit matrix. For example, for a third-order
matrix M, premultiplying by the following elementary matrices Ei produces
the results indicated:
2 3
0 1 0 2 0 32 0 3 ðB:33Þ
0 0 775 1 1 01 1 0
646 1 05 40 k5
40
001 00k 001
Interchanging Multiplying Adding k times
rows 1 and 2 row 3 by k row 3 to row 2
Copyright © 2003 Marcel Dekker, Inc.
688 Appendix B
Example 9. The matrix of Example 8 is reduced to HNF by the following
operations:
1. Subtract 2 times row 1 from row 2 and 3 times row 1 from row 3.
Premultiplying by the corresponding elementary matrix E1produces
2 32 3 2 3
100 123 123
E1M ¼ 4 À2 1 0 54 2 3 4 5 ¼ 4 0 À1 À2 5 ¼ M1 ðB:34Þ
À3 0 1 3 5 7 0 À1 À2
2. Add 2 times row 2 to row 1, subtract row 2 from row 3, and multiply
row 2 by À 1. Premultiplying by the corresponding elementary
matrix E2 produces
2 32 32 1 0 À1 3
1 20 1 2 3
E2M1 ¼ 4 0 À1 0 54 0 À1 À2 5 ¼ 4 0 1 2 5 ¼ M2 ðB:35Þ
0 À1 1 0 À1 À2 00 0
The matrix M2 is in Hermite normal form and has the same rank as
the matrix M. Since M2 has one zero row, it has a rank of 2, which
agrees with the result of Example 8.
B.14 MATRIX INVERSION BY ROW OPERATIONS --
The inverse MÀ1 of a nonsingular matrix M can be obtained as follows:
1. Form the augmented matrix [M I].
2. Perform row operations on the augmented matrix so that the left
portion M becomes the identity matrix I. When the left portion is
so transformed, the right portion I is transformed into the matrix
inverse MÀ1. Thus, the transformed augmented matrix
becomes [I MÀ1].
--
Example 10. For the matrix of Example 4, the augmented matrix is----------
23 1 2 3
100
½M I ¼ 4 1 0 À4 0 1 0 5 ðB:36Þ
--
05 7 001
A suitable set of basic row operations includes subtracting 3 times row 2 from----------
row 1 and then interchanging rows 1 and 2, yielding
23
1 0 À4 0 1 0
4 0 1 14 1 À3 0 5
05 7 0 01
Copyright © 2003 Marcel Dekker, Inc.
Matrix Linear Algebra 689
Subtracting 5 times row 2 from row 3 yields
2 ---------- 3
1 0 À4 0 10
1 À3 0 5
4 0 1 14
À5 15 1
0 0 À63
Dividing row 3 by À63, adding 4 times the new row 3 to row 1, and subtracting
14 times the new row 3 from row 2 yields
2 ---------- 20=63 3=63 3 -- MÀ1 ðB:37Þ
100 À7=63 21=63 À4=63
À15=63 14=63 5 ¼ ½I
40 1 0 5=63 À1=63
001
The inverse matrix MÀ1 agrees with the value obtained from Eq. (B.27) and
the results of Examples 4 and 6.
B.15 EVALUATION OF THE
CHARACTERISTIC POLYNOMIAL
The characteristic polynomial for the matrix A appearing in the state
equation
x_ ¼ Ax þ bu ðB:38Þ
is
QðÞ ¼ jI À Aj ¼ n þ anÀ1nÀ1 þ Á Á Á þ a1 þ a0 ðB:39Þ
When the n Â(n þ1) matrix
 Ab A2b ÁÁÁ Anb à ðB:40Þ
Mc ¼ b
is reduced to HNF, which must be full rank, the coefficients of the character-
istic polynomial appear in the last column, [4] i.e.,
2 Àa0 3
1 0 0 ÁÁÁ 0 0
6646 0 1 0 ÁÁÁ 0 0 Àa1 7775 ðB:41Þ
... ... ... ... ... ... ...
0 0 0 ÁÁÁ 0 1 À anÀ1
This procedure may be simpler than forming the determinant Q() ¼ jI À Aj.
Copyright © 2003 Marcel Dekker, Inc.
690 Appendix B
Example 11. ðB:42Þ
ðB:43Þ
2 1 6 À3 3 213 ðB:44Þ
A ¼ 64 À1 À1 1 57 b ¼ 64 1 57
À2 2 0 1
2 1 4 À2 10 3
Mc ¼ 46 1 À1 À3 À5 57
1 0 À10 À2
Reducing Mc to HNF yields
23
1 0 0 À2 Àa0
4 0 1 0 3 5 Àa1
001 0 Àa2
The characteristic polynomial is therefore
QðÞ ¼ 3 þ a22 þ a1 þ a0 ¼ 3 À 3 þ 2
B.16 LINEAR INDEPENDENCE
A set of vectors v1óv2ó . . . óvkó . . . óvn is linearly independent provided there is no
set of scalars ai(i ¼1, 2, . . . , n), not all zero, that satisfies
a1v1 þ Á Á Á þ akvk þ Á Á Á þ anvn ¼ 0 ðB:45Þ
If this equation is satisfied with the ai not all zero, then the vectors
are linearly dependent. Linear independence can be checked by forming the
matrix
2 vT1 3
64666 57777
vT2 ðB:46Þ
...
vTn
If this matrix has rank n, the vectors are linearly independent; otherwise they
are linearly dependent.The rank of this matrix can be determined by reducing
it to Hermite normal form.
REFERENCES
1. Gantmacher, F.R.: Applications of the Theory of Matrices, Wiley-Interscience,
New York, 1959.
Copyright © 2003 Marcel Dekker, Inc.
Matrix Linear Algebra 691
2. Strang, G.: Linear Algebra and Its Applications, 3rd ed., Harcourt, Brace,
Jovanovich, San Diego, CA, 1988.
3. Webster, J.G., ed., Encyclopedia of Electrical and Electronics Engineering, JohnWiley
& Sons, New York, 1999.
4. Reid, J.G.: Unpublished notes, Air Force Institute of Technology, Wright-
Patterson Air Force Base, Ohio, 1979.
Copyright © 2003 Marcel Dekker, Inc.
Appendix C
Introduction to MATLAB and Simulink
C.1 INTRODUCTION
MATLABÕ is a technical computing environment (program) designed for
numerical computation and visualization. Over the years it has become a
standard tool in many universities and research organizations for performing
mathematical calculations. Originally written to provide access to matrix
manipulation software, MATLAB has developed into a powerful tool to
simplify mathematical analysis.
In order to use MATLAB successfully, the student should under-
stand how to enter and manipulate variables, how to model control
systems in MATLAB, and how to produce plots and graphs depicting
the performance of control systems. This appendix is intended to guide
the student through the MATLAB functions which are useful in under-
standing and accomplishing these tasks. Students are encouraged to use
the documentation provided with MATLAB to explore more advanced
problems.
The commands shown here are valid for MATLAB version 6.1, Release
12.1, for Windows 98. There may be variations in other versions, or releases
for other platforms. Many of the commands shown here are in the Control
Systems Toolbox, which is available as an add-on to the basic MATLAB
program.
Copyright © 2003 Marcel Dekker, Inc.
694 Appendix C
C.2 BASICS
MATLAB is a window-based workspace environment in which variables are
entered and manipulated. The MATLAB program is started by double click-
ing the MATLAB icon in the Windows desktop. This opens a window similar
to that shown in Fig. C.1. Commands are entered in the command window,
which is the inner window as shown on the right side of Fig. C.1. Two right
arrows (>>) is the command prompt, indicating that the program is ready
for the next command. Variables are created as they are entered, and are
stored in the workspace. Variable names must begin with a letter. A variable
to represent = 1.7 may be entered as follows:
alpha = 1.7;
Placing the variable name‘‘alpha’’to the left of the equal sign defines alpha as
whatever is on the right side of the equal sign.
MATLAB displays the variable upon entry unless a semicolon is placed
at the end of the line, that is,
beta = alpha*3.7 %Optional comment
beta =
6.2900
FIGURE C.1 MATLAB window.
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 695
A percent sign provides a mean to include a comment. Everything to the right
of a percent sign is ignored by MATLAB.
In MATLAB version 6, a workspace window lists the variables that are
defined. The ‘‘who’’ command also allows the user to see what variables are
defined in the workspace.
Who
Your variables are:
alpha beta
C.2.1 Matrices
Matrices are entered a row at a time as follows:
A = [11 12 13
21 22 23
31 32 33]
The carriage return is implied at the end of each line and is not
explicitly shown in this text. MATLAB displays the variables upon entry
unless a semicolon is placed at the end of the line. Semicolons are also used
to simplify and conserve space. The same 3 Â 3 matrix may be entered as
follows:
A = [11 12 13; 21 22 23; 31 32 33]; % Optional Comment
Matrices are indexed in (row, column) format. For example, a single element
of a matrix can be referenced as follows:
A(2,3)
This gives the result
ans =
23
C.2.2 Matrix Transpose
Matrices are transposed using a prime notation.
B = A’
produces
B=
11 21 31
12 22 32
13 23 33
Copyright © 2003 Marcel Dekker, Inc.
696 Appendix C
C.2.3 Range of Values
A colon is used to denote a range of values, e.g., A(1:2,:) is a
matrix consisting of the first two rows of A. A colon notation also can
be used to generate a vector of equally spaced elements. The format for
defining a vector x whose elements range from an initial value to a final
value is
x = ½0 : 2*pi; %½Initial value : Final valueaf
The step size is assumed to be 1 unless an optional step size is specified
between the initial and final values. A vector, used to plot data, may be
defined as follows:
x = ½0 : :25 : 2*pi %½Initial value : Step size : Final value
MATLAB generates the vector:
x=
Columns 1 through 7
0 0:2500 0:5000 0:7500 1:0000 1:2500 1:5000
Columns 8 through 14
1:7500 2:0000 2:2500 2:5000 2:7500 3:0000 3:2500
Columns 15 through 21
3:5000 3:7500 4:0000 4:2500 4:5000 4:7500 5:0000
Columns 22 through 26
5:2500 5:5000 5:7500 6:0000 6:2500
Numerous common mathematical functions are available, such as
y = sin(x)
which generate a vector corresponding to the sine of each element of the
vector x. Some other trigonometric functions available in MATLAB are
listed in Table C.1.
The data are plotted with the command
plot (x, y)
This command opens a plot window as shown in Fig. C.2. The window has
menu buttons across the top which allows the user to rescale, annotate, edit,
save, and print the plot.
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 697
TABLE C.1 MATLAB Trigonometric Functions
sin Sine. sec Secant.
sinh Hyperbolic sine. sech Hyperbolic secant.
asin Inverse sine. asec Inverse secant.
asinh Inverse hyperbolic sine. asech Inverse hyperbolic secant.
cos Cosine. csc Cosecant.
cosh Hyperbolic cosine. csch Hyperbolic cosecant.
acos Inverse cosine. acsc Inverse cosecant.
acosh Inverse hyperbolic cosine. acsch Inverse hyperbolic cosecant.
tan Tangent. cot Cotangent.
tanh Hyperbolic tangent. coth Hyperbolic cotangent.
atan Inverse tangent. acot Inverse cotangent.
atan2 Four quadrant inverse tangent. acoth Inverse hyperbolic cotangent.
atanh Inverse hyperbolic tangent.
FIGURE C.2 MATLAB plot window.
Copyright © 2003 Marcel Dekker, Inc.
698 Appendix C
Multiple traces can be shown on one plot as illustrated by the following
commands:
z = cos(x); % Plot 2 rows 1 column and
subplot (2, 1, 1), plot (x, y) % select the first subplot
% Set title above first plot
title (‘Multiple Plots’) % Turn grid on in first plot
grid % Set Y axis label in first plot
ylabel (‘sin(x)’) % Select second subplot
subplot (2, 1, 2), plot (x, z) % Turn grid on in second plot
grid % Set X axis label in second
xlabel (‘x’) % plot
% Set Y axis label in
ylabel (‘cos (x)’) % second plot
These commands generate the plot shown in Fig. C.3.
FIGURE C.3 Multiple plots in one window: sine plot (top figure); cosine plot
(bottom figure).
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 699
Note that the titles and labels can be set from the command line or within
the plot window using the buttons across the top of the window. A number of
line styles and colors may be specified as described by the command:
help plot options
Typing ‘‘help’’ at the prompt will provide an outline of the help available in
the command window. More extensive help features are accessed through the
help menu button near the top of the MATLAB window.
C.2.4 m-Files and MAT-Files
MATLAB allows the user to define scripts containing several commands in
m-Files. m-Files are stored in the current directory as ‘‘filename.m’’ and
are executed from the command line by typing the file name without the
.m extension. m-Files may be created and edited from the MATLAB window
by using the ‘‘New m-File’’ button on the toolbar.
Workspace variables also may be saved for latter use by typing ‘‘save
filename’’. This creates a MAT-File in the current directory named
‘‘filename.mat’’. The variables are loaded back into the workspace by typing
‘‘load filename’’.
C.3 DEFINING SYSTEMS
Polynomials are represented by a vector of coefficients. For example, the
polynomial s3 + 2s2 + 5 is represented by the vector [1 2 0 5]. All coeffi-
cients including the zero must be included in the vector. Polynomials are
multiplied by convolving the representative vectors; hence the transfer
function
poly ¼ sðs þ 3Þðs þ 10Þ ¼ s3 þ 13s2 þ 30s ðC:1Þ
is formed as follows:
poly = conv([1 0], conv([1 3], [1 10]))
poly =
1 13 30 0
The roots of the polynomial are calculated using the ‘‘roots’’command.
roots(poly)
ans =
0
- 10
-3
Copyright © 2003 Marcel Dekker, Inc.
700 Appendix C
C.3.1 Transfer Function Model
A transfer function is a ratio of polynomials in s; hence the transfer function
num ¼ sðs þ sþ5 10Þ ¼ s3 þ sþ5 30s ðC:2Þ
den 3Þðs þ 13s2 þ
is formed as follows:
num = [1 5];
den = conv([1 0], conv([1 3], [1 10]))
den =
1 13 30 0
The ‘‘TF’’ command is used to generate a linear time-variant (LTI) transfer
function system model object, ‘‘sys’’ from the numerator and denominator
polynomials. This transfer function system model object is subsequently used
for analysis as shown in Sec. C.4.
sys = tf(num, den)
Transfer function:
sþ5
-----------
s^3 + 13 s^2 + 30 s
C.3.2 State Space Model
State space models are entered as matrices. In Sec. 2.13, a DC servomotor is
modeled by Eq. (2.135). Augmenting the system with y_m ¼ o yields the
third-order state space equation:
2 3 20 1 0 3 3 2 0 3
64 75 2 7775 46666 57777ea
x_ ¼ Ax þ Bu ¼ y_ m ¼ 6664666 0 ÀBm Kt ym þ 0
0 Jm Jm 77775774666 om 1
o_ m _im Lm
_im ÀKb ÀRm
Lm Lm
ðC:3Þ
23 ðC:4Þ
ym
y ¼ Cx þ Du ¼ ym ¼ ½ 1 0 0 64 om 75 þ ½0ea
i_m
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 701
A very small 12 volt DC servomotor has the characteristics provided
below, which are converted to SI units to develop the A and B matrices. The
units of the variables are: y is in radians, o is in rad/s, i is in amperes, and e is
in volts.
Bm ¼ 0:013 oz:-in: Kt ¼ 1:223 oz-in:
A
Lm ¼ 0:75 mH Kb ¼ 0:905 mV
rpm
J ¼ 0:085 Â 10À4 oz:-in:-s2 Rm ¼ 24
2 1 3 ðC:5Þ
0 À1530 0 ðC:6Þ
À11:5 144000 5
A ¼ 40
À32000
0
23
0
B¼4 0 5
1330
The following commands are used to enter the state space model, to
generate a linear time-invariant system model object, ‘‘sys2.’’ This state
space model object may be used for analysis like the transfer function system
model object. These commands have been saved in an m-file named ‘‘dcser-
vo.m’’ which is on the accompanying CDROM and can be executed by typing
‘‘dcservo’’at the command prompt.
A = [0 1 0 % Define the plant matrix
0 -1530 144000
0 -11.5 -32000];
B = [0; 0; 1330]; % Define the input matrix
C = [1 0 0]; % Define the output matrix
D = [0]; % Define the direct
% feedthrough matrix
sys2 = ss(A,B,C,D) % Generates a state space
% model object
which produces the state and output equations:
a=
x1 x2 x3
x1 0 1 0
x2 0 À1530 1:44eþ005
x3 0 À11:5 À32000
Copyright © 2003 Marcel Dekker, Inc.
702 Appendix C
b=
u1
x1 0
x2 0
x3 1330
c=
x1 x2 x3
y1 1 0 0
d=
u1
y1 0
continuous-time model.
C.4 ANALYSIS
C.4.1 Root Locus
The LTI system model object is used for analysis. The root locus for a unity
feedback system is presented in Chap. 7. The root locus is plotted in
MATLAB using the ‘‘rlocus’’command.
rlocus(sys) % Plots a root locus for sys
or
rlocus(sys, K) % Plots a root locus with
% user-specified vector
% of gains K
A more advanced interface for root locus analysis and design is the
‘‘SISOTOOL’’ interface. The ‘‘SISOTOOL’’ is a graphical user interface that
facilitates compensator design and is started with the command:
sisotool(’rlocus’,sys) % Startroot locus design tool
This command opens a new window, plots the root locus as shown in Fig. C.4,
and allows the user to specify a gain or add compensator components by
placing poles and zeros on the plot. Design constraints such as desired damp-
ing ratio or peak overshoot can be set within the tool and appear as bounds on
the plot.
A root-locus plot for a digital control system (see Chap. 15) is shown
in Fig. C.5.
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 703
FIGURE C.4 Root locus SISOTOOL window.
C.4.2 Frequency Response
Frequency response is presented in Chaps. 8 and 9. Frequency response plots
are generated for LTI system models using the command
bode(SYS)
which generates a Bode diagram as shown in Fig. C.6 for Eq. (C.2). Another
example is shown in Sec. 9.9. Nichols and Nyquist plots are generated with the
commands:
nichols(SYS)
or
nyquist(SYS)
The ‘‘SISOTOOL’’ described above also provides options for designing on a
Bode or Nichols chart. The command
sisotool(‘bode’,sys) % Start bode plot design tool
Copyright © 2003 Marcel Dekker, Inc.
704 Appendix C
FIGURE C.5 Digital root locus SISOTOOL window.
opens the‘‘SISOTOOL’’ with the Bode plots as shown in Fig.C.7.The command
sisotool(‘nichols’,sys) % Start nichols chart
design tool
opens the ‘‘SISOTOOL’’ with the Nichols chart as shown in Fig. C.8. With
either view, the user can adjust gain or add compensator poles and zeros and
immediately see the resulting loop characteristics.
Another ‘‘SISOTOOL’’ example is the Nichols chart shown in Fig. C.9
that depicts the plot of Lm G vs fG being tangent to an M-contour.
C.5 SIMULATION
Control systems are commonly evaluated by simulating the response to a step
and an impulse inputs.The‘‘step’’and ‘‘impulse’’commands generate plots
of the step and impulse response respectively.When invoked with arguments
to the left of the equal sign as shown,
[y, t] = step(sys)
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 705
FIGURE C.6 Bode diagram of an example transfer function.
or
[y, t] = impulse(sys)
the output vector ‘‘y’’and time vector ‘‘t’’ that are generated automatically for
the plot, are defined in the workspace.These vectors are available then for use
elsewhere.
It is often desirable to specify the input as a function of time to generate
simulations that are more complex than the step and impulse inputs. This is
done by defining an input vector ‘‘u’’ and the corresponding time vector ‘‘t’’.
These vectors are used as inputs to the ‘‘lsim’’ command that simulates the
response of a linear system as follows:
t = [0:.1:10]; % Define a simulation time
% vector
u = [ones(1,51) zeros(1,50)]; % Define vector representing
% a pulse input
[y, t] = lsim(sys,u,t); % Simulate the response
plot(t, [y, u]) % Plot the response
Copyright © 2003 Marcel Dekker, Inc.
706 Appendix C
FIGURE C.7 Bode diagram SISOTOOL window.
This example also illustrates the ones and zeros commands. A vector
or matrix whose elements are all ones or zeros is defined with these
commands, using arguments which are the size of the vector or matrix
desired. A related function is ‘‘eye (rows, columns)’’ which defines an
identity matrix or a nonsquare matrix with ones on the principal diagonal
and zeros elsewhere.
eye(3)
ans=
100
010
001
eye(3,5)
ans=
10000
01000
00100
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 707
FIGURE C.8 Nichols chart SISOTOOL window.
C.5.1 Simulink
For simulations of more advanced system models, including nonlinear
models, it is useful to run Simulink. Simulink is a graphical simulation tool
which is started from the MATLAB command window by typing ‘‘simu-
link’’ at the prompt. This opens a window with the Simulink block library
and provides an option for creating a new Simulink model. Blocks are selected
and placed on the model workspace to create a system block diagram as shown
in Fig. C.10.
C.6 IMPLEMENTATION OF RESULTS
Compensators are typically designed as continuous time transfer functions.
They may be implemented with analog components, but it is more common
to implement them in a digital control system. MATLAB provides commands
for transforming analog designs into the discrete domain. To implement the
Copyright © 2003 Marcel Dekker, Inc.
708 Appendix C
FIGURE C.9 Nichols chart diagram SISOTOOL window with grid and bounds.
FIGURE C.10 Simulink block diagram.
Copyright © 2003 Marcel Dekker, Inc.
Introduction to MATLAB and Simulink 709
lead filter Gc ¼ ðs þ 3Þ=ðs þ 30Þ in a digital system with a sampling rate of
40 Hz, the ‘‘c2d’’ function is used.
num = [1 3];
den = [1 30];
ts = 1/40;
sys = tf(num,den)
Transfer function:
sþ3
----
s þ 30
sysd = c2d(sys,ts,’zoh’)
Transfer function:
z À 0.9472
------
z À 0.4724
Sampling time: 0.025
The discrete transfer function is used as described in Chap. 15. The ‘‘c2d’’
function provides several transformation methods including the zero order
hold method shown here and the Tustin transformation. See the MATLAB
documentation for more information.
Copyright © 2003 Marcel Dekker, Inc.
Appendix D
TOTAL-PC CAD Package
D.1 INTRODUCTION
TOTAL-PC is ideally suited as an educational tool while others are
more suited for the practicing engineer. In general, most packages are
command-driven interactive programs through the keyboard or a file
designation. Some software products include extensive system building
capabilities, very high-order plant modeling, nonlinear system construc-
tion, and a multitude of data displays as the MIMO QFT CAD package
of Ref. 5. Some of these packages require extensive knowledge to use
their full capabilities, whereas others are not comprehensive in their
capabilities.
The computer programs called TOTAL-PC is discussed in this
appendix as a specific example of a CAD package. This CAD package along
with the MATLABÕ and the MIMO QFT CAD packages are the ones
employed in the text examples. The disk attached to this text contains
the TOTAL-PC CAD packages and its associated USERS Manual. This
CAD package can also be used by students for their basic control theory
courses. Questions in the use of this package should be addressed to
Dr. Robert Ewing whose e-mail address is: Robert.ewing@wpafb.af.mil
Users of this CAD package should periodically check with Dr. Ewing for
updated versions.
Copyright © 2003 Marcel Dekker, Inc.
712 Appendix D
D.2 OVERVIEW OF TOTAL-PC
TOTAL [1, 2] is an option-number package that reflects a hand calculator or
line-terminal environment for interface speed and agility. This FORTRAN
package was originally developed at the Air Force Institute of Technology
(AFIT) in the late 1970s; provides an extensive set of control system analysis
and design CAD capabilities. During the early 1990s the improved version of
TOTAL-PC enhanced the analysis and design of control systems. This CAD
package contains over 150 commands (see Table D.1), which are divided
according to general functional categories. It divides each of its options
(commands) into various groups. It contains the conventional analog and
discrete control system analysis and design options and the QFT design
options.
TABLE D.1 Some TOTAL-PC Options
Transfer-function input options
0 List options
1 Recover all data from file memory
2 Polynomial form—GTF (forward transfer function)
3 Polynomial form—HTF (feedback transfer function)
4 Polynomial form—OLTF (open-loop transfer function)
5 Polynomial form—CLTF (closed-loop transfer function)
6 Factored form—GTF
7 Factored form—HTF
8 Factored form—OLTF
9 Factored form—CLTF
Matrix input options for state equations
10 List options
11 AMAT—Continuous plant matrix
12 BMAT—Continuous input matrix
13 CMAT—Output matrix
14 DMAT—Direct transmission matrix
15 KMAT—State variable feedback matrix
16 FMAT—Discrete plant matrix
17 GMAT—Discrete input matrix
18 Set up stage-space model of system
19 Explain use of above matrices
(continued)
Copyright © 2003 Marcel Dekker, Inc.
TOTAL-PC CAD Package 713
TABLE D.1 Continued
Block diagram manipulation and state-space options
20 List options
21 Form OLTF¼GTF*HTF (in cascade)
22 Form CLTF¼(GAIN*GTF)/(1þGAIN*GTF*HTF)
23 Form CLTF¼(GAIN*OLTF)/(1þGAIN*OLTF)
24 Form CLTF¼GTFþHTF (in parallel)
25 GTF(s) and HTF(s) from continuous state-space model
26 GTF(z) and HTF(z) from discrete state-space model
27 Write adjoint (*sI-AMAT) to file answer
28 Find HTF from CLTF and GTF for CLTF¼GTF*HTF/(1þGTF*HTF)
29 Find HTF from CLTF and GTF for CLTF¼GTF/(1þGTF*HTF)
Time-response options, continuous F(t) and discrete F(kT )
30 List options
31 Tabular listing of F(t) or F(kT )
32 Plot F(t) or F(kT ) at user’s terminal
33 Printer plot (written to file answer)
34 Calcomp plot (written to file plot)
35 Print time or difference equation [F(t) or F(kT )]
36 Partial fraction expansion of CLTF (or OLTF)
37 LIST T-PEAK, T-RISE, T-SETTLING, T-DUP, M-PEAK, final value
38 Quick sketch at user’s terminal
39 Select input: step, ramp, pulse, impulse, sin oT
Root-locus options
40 List options
41 General root locus
42 Root locus with a gain of interest
43 Root locus with a zeta (damping ratio) of interest
44 List n points on a branch of interest
45 List all points on a branch of interest
46 List locus roots at a gain of interest
47 List locus roots at a zeta of interest
48 Plot root locus at user’s terminal
49 List current values of all root locus variables
Frequency-response options
50 List options
51 Tabular listing
52 Two-cycle scan of magnitude (or dB)
53 Two-cycle scan of phase (degrees or radians)
(continued)
Copyright © 2003 Marcel Dekker, Inc.
714 Appendix D
(continued)
TABLE D.1 Continued
Frequency-response options
54 Plot F( jo) at user’s terminal
55 Create GNUPlot-Frequency plot
56 Create GNUPlot-Root locus plot
57 Tabulate points of interest: peaks, breaks, etc.
58 Create GNUPLOT-Nichols Log magnitude/angle plot
59 Chalk Pitch Axis HQ Criterion Analysis
Polynomial operations
60 List options
61 Factor polynomial (POLYA)
62 Add polynomials (POLYC¼POLYAþPOLYB)
63 Subtract polynomials (POLYC¼POLYA-POLYB)
64 Multiply polys (POLYC¼POLYA*POLYB)
65 Divide polys (POLYCþREM¼POLYA/POLYB)
66 Store Polynomial (POLY ) into POLYD
67 Expand roots into a polynomial
68 (s þ a)n expansion into a polynomial
69 Activate polynomial calculator
Matrix operations
70 List options
71 ROOTA¼eigenvalues of AMAT
72 CMAT¼AMATþBMAT
73 CMAT¼AMAT-BMAT
74 CMAT¼AMAT*BMAT
75 CMAT¼AMAT inverse
76 CMAT¼AMAT transposed
77 CMAT¼identity matrix I
78 DMAT¼zero matrix 0
79 Copy one matrix to another
Digitization options
80 List options
82 CLTF(s) to CLTF(z) by first difference approximation
83 CLTF(s) to CLTF(z) by Tustin transformation
84 CLTF(z) TO CLTF(s) by impulse invariance
85 CLTF(z) TO CLTF(s) by inverse first difference
86 CLTF(z) TO CLTF(s) by inverse Tustin
87 Find FMAT and GMAT from AMAT and BMAT
89 CLTF(X) to CLTF(Y) by X¼ALPHA*(YþA)/(YþB)
Copyright © 2003 Marcel Dekker, Inc.
TOTAL-PC CAD Package 715
TABLE D.1 Continued
Miscellaneous options
90 LIST OPTIONS
91 Rewind and update Memory file with current data
93 List current switch settings (ECHO, ANSWER, etc.)
96 List special commands allowed in option mode
97 List variable name directory
98 List main options of total
99 Print new features bulletin
119 Augment AMAT:[AMAT]¼[AMAT] GAIN*[BMAT]*[KMAT]
121 Form OLTF¼CLK*CLNPOLY/[CLDPOLY-CLK*CLNPOLY](G-EQUIVALENT)
129 (Integral of (CLTF SQUARED))/2PI¼
Double-precision discrete transform options*
140 LIST OPTIONS
141 CLTF(s) TO CLTF(z) (IMPULSE VARIANCE)
142 CLTF(s) TO CLTF(w) W ¼ (Z - 1)/(Z þ 1)
143 CLTF(s) TO CLTF(w 0 ) W 0 ¼ (2/T )(Z - 1)/(Z þ 1)
144 HI-RATE CLTF(z) TO LO-RATE CLTF(z)
145 HI-RATE CLTF(w) TO LO-RATE CLTF(w)
146 HI-RATE CLTF(w 0) TO LO-RATE CLTF(w 0)
147 OPTION 144 (AVOIDING INTERNAL FACTORING)
148 OPTION 144 (ALL CALCULATIONS IN Z PLANE)
Quantitative feedback technique (QFT)
150 Define-Plant
151 List options
152 Define-TLTF: (Lower Tracking Ratio)
153 Define-TUTF: (Upper Tracking Ratio)
154 Define-TDTF: (Disturbance)
155 Select-Nominal plant: (1–10)
156 Define-FTF: (Pre-filter function)
157 Define-LOTF: (Nominal loop function)
158 Display Plant, TLTF, TUTF, TDTF, FTF, LOTF
159 QFT design/report macro
*Option 37 is not available for the discrete domain.
D.3 QFT CAD PACKAGE
Up to about 1986 there were essentially no Quantitative Feedback Theory
(QFT) CAD packages designed specifically to assist in doing a complete
Copyright © 2003 Marcel Dekker, Inc.
716 Appendix D
FIGURE D.1 CAD flowchart for MISO analog QFT design.
Copyright © 2003 Marcel Dekker, Inc.
TOTAL-PC CAD Package 717
QFT design for a control system. The TOTAL QFT CAD package [3] for
MISO systems was designed as an educational tool as illustrated in Fig. D.1.
In 1992 the MIMO QFT CAD package [4] developed at AFIT accelerated
the utilization of the QFT technique for the design of robust multivariable
control systems.
REFERENCES
1. Larimer, S.J.: ‘‘An Interactive Computer-Aided Design Program for Digital and
Continuous System Analysis and Synthesis (TOTAL),’’ MS thesis, GE/GGC/EE/
78-2, School of Engineering, Air Force Institute of Technology, Wright-Patterson
AFB, OH, 1978.
2. Ewing, R.: ‘‘TOTAL/PC,’’ School of Engineering, Air Force Institute of Technol-
ogy, P Street,Wright-Patterson AFB, OH 45433-7765, 1992.
3. Lamont, G.B.: ‘‘ICECAP/QFT,’’ School of Engineering, Air Force Institute of
Technology, P Street,Wright-Patterson AFB, OH 45433-7765, 1986.
4. Sating, R.R.: ‘‘Development of an Analog MIMO Quantitative Feedback Theory
(QFT) CAD Package,’’ MS Thesis, AFIT/GE/ENG/92J-04, Graduate School of
Engineering, Air Force Institute of Technology, Wright-Patterson AFB, OH,
June 1992.
5. Houpis, C.H., and Rasmussen, S.J.: Quantitative Feedback Theory, Fundamentals
and Applications, Marcel Dekker, New York, 1999.
Copyright © 2003 Marcel Dekker, Inc.
Problems
CHAPTER 2
2.1. Write the (a) loop, (b) node, and (c) state equations for the circuit shown
after the switch is closed. Let u ¼ e, y1 ¼vC, and y2 ¼ vR2: (d ) Determine
the transfer function y1/e and y2/u ¼ G2.
2.2. Write the (a) loop, (b) node, and (c) state equations for the circuit shown
after the switch S is closed.
Copyright © 2003 Marcel Dekker, Inc.
720 Linear Control System Analysis and Design
2.3. The circuits shown are in the steady state with the switch S closed. At
time t ¼ 0, S is opened. (a) Write the necessary differential equations
for determining i1(t). (b) Write the state equations.
2.4. Write all the necessary equations to determine v0. (a) Use nodal equa-
tions. (b) Use loop equations. (c) Write the state and output equations.
2.5. Derive the state equations. Note that there are only two independent
state variables.
2.6. (a) Derive the differential equation relating the position y(t) and the
force f (t). (b) Draw the mechanical network. (c) Determine the transfer
function G(D) ¼ y/f. (d ) Identify a suitable set of independent state
variables.Write the state equation in matrix form.
Copyright © 2003 Marcel Dekker, Inc.
Problems 721
2.7. (a) Draw the mechanical network for the mechanical system shown.
(b) Write the differential equations of performance. (c) Draw the ana-
logous electric circuit in which force is analogous to current. (d ) Write
the state equations.
2.8. (a) Write the differential equations describing the motion of the
following system, assuming small displacements. (b) Write the state
equations.
2.9. A simplified model for the vertical suspension of an automobile is
shown in the figure. (a) Draw the mechanical network; (b) write the
differential equations of performance; (c) derive the state equations;
(d ) determine the transfer function x1=u^ 2, where u^ 2 ¼ ðB2D þ K2Þu2
is the force exerted by the road.
2.10. An electromagnetic actuator contains a solenoid, which produces a
magnetic force proportional to the current in the coil, f ¼ Kii. The coil
Copyright © 2003 Marcel Dekker, Inc.
722 Linear Control System Analysis and Design
has resistance and inductance. (a) Write the differential equations of
performance. (b) Write the state equations.
2.11. A warehouse transportation system has a motor drive moving a trolley
on a rail. Write the equation of motion.
2.12. For the system shown, the torque T is transmitted through a noncom-
pliant shaft and a hydraulic clutch to a pulley #1,which has a moment
of inertial J1. The clutch is modeled by the damping coefficient B1 (it is
assumed to be massless). A bearing between the clutch and the pulley
#1 has a damping coefficient B2. Pulley #1 is connected to pulley #2
with a slipless belt drive. Pulley #2,which has a moment of inertial J2,
is firmly connected to a wall with a compliant shaft that has a spring
constant K. The desired outputs are: y1 ¼ yb, the angular position of
the J1, and y2 ¼ y_a, the angular velocity of the input shaft, before the
clutch. (a) Draw the mechanical network; (b) write the differential
equations of performance; (c) write the state equations; (d ) determine
the transfer function y1/u and y2/u.
Copyright © 2003 Marcel Dekker, Inc.
Problems 723
2.13. (a) Write the equations of motion for this system. (b) Using the physical
energy variables,write the matrix state equation.
2.14. The figure represents a cylinder of intertia J1 inside a sleeve of intertia
J2. There is viscous damping B1 between the cylinder and the sleeve.
The springs K1 and K2 are fastened to the inner cylinder. (a) Draw
the mechanical network. (b) Write the system equations. (c) Draw
the analogous circuit. (d ) Write the state and output equations. The
outputs are y1 and y2. (e) Determine the transfer function G ¼ y2/T.
2.15. The two gear trains have an identical net reduction, have identical
inertias at each stage, and are driven by the same motor. The number
of teeth on each gear is indicated on the figures. At the instant of start-
ing, the motor develops a torque T. Which system has the higher initial
load acceleration? (a) Let J1 ¼J2 ¼ J3; (b) let J1 ¼40J2 ¼ 4J3.
2.16. In the mechanical system shown, r1 is the radius of the drum. (a) Write
the necessary differential equations of performance of this system.
(b) Obtain a differential equation expressing the relationship of the
output x2 in terms of the input T(t) and the corresponding transfer
function. (c) Write the state equations with T(t) as the input.
Copyright © 2003 Marcel Dekker, Inc.
724 Linear Control System Analysis and Design
2.17. Write the state and system output equations for the rotational mechan-
2.18. ical system of Fig. 2.16. (a) With T as the input, use x1 ¼ y3, x2 ¼ Dy3,
x3 ¼ Dy2 and (b) with y1 as the input, use x1 ¼ y3, x2 ¼ Dy3, x3 ¼ y2,
x4 ¼ Dy2.
For the hydraulic preamplifier shown, write the differential equations
of performance relating x1 to y1. (a) Neglect the load reaction. (b) Do
not neglect load reaction. There is only one fixed pivot, as shown in
figure.
2.19. The mechanical load on the hydraulic translational actuator is Sec. 2.9,
Fig. 2.22, is changed to that in the accompanying figure. Determine the
new state equations and compare with Eq. (2.114).
2.20. The sewage system leading to a treatment plant is shown.The variables
qA and qB are input flow rates into tanks 1 and 2, respectively. Pipes 1, 2,
and 3 have resistances as shown. Derive the state equations.
2.21. Most control systems require some type of motive power. One of the
most commonly used units is the electric motor.Write the differential
equations for the angular displacement of a moment of inertia, with
Copyright © 2003 Marcel Dekker, Inc.
Problems 725
damping, connected directly to a dc motor shaft when a voltage is
suddenly applied to the armature terminals with the field separately
energized.
2.22. The damped simple pendulum shown in the figure is suspended in a
uniform gravitational field g. There is a horizontal force f and a rota-
tional viscous friction B. (a) Determine the equation of motion (note:
J ¼ M ‘2). (b) Linearize the equation of part (a) by assuming cos y %1
and sin y % y for small values of y. (c) Write the state and output
equations of the system using x1 ¼ y, x2 ¼ y_, and y ¼ x1.
2.23. Given the mechanical system shown, the load J2 is coupled to the rotor
J1 of a motor through a reduction gear and springs K1 and K2. The
gear-to-teeth ratio is 1: N. The torque T is the mechanical torque
generated by the motor. B1 and B2 are damping coefficients, and y1, y2,
y3,and y4 are angular displacements. (a) Draw a mechanical network for
this system. (b) Write the necessary differential equations in order to
solve for y4.
Copyright © 2003 Marcel Dekker, Inc.
726 Linear Control System Analysis and Design
2.24. In some applications the motor shaft of Prob. 2.21 is of sufficient
length so that its elastance K must be taken into account. Consider
that v2(t) is constant and that the velocity om(t) ¼ Dym(t) is being
controlled. (a) Write the necessary differential equation for determin-
ing the velocity of the load oJ = Dyj. (b) Determine the transfer
function oJ(t)/v1(t).
CHAPTER 3
3.1. (a) With vc(0À) ¼ 0,what are the initial values of current in all elements
when the switch is closed? (b) Write the state equations. (c) Solve for
the voltage across C as a function of time from the state equations.
(d ) Find Mp, tp, and ts.
R1 ¼ R2 ¼ 2 k O C ¼ 50 mF L ¼ 1 H E ¼ 100 V
3.2. In Prob. 2.12, the parameters have the following values:
J1 ¼ 1:0 lb Á ft Á s2 B1 ¼ 0:5 lb Á ft=ðrad=sÞ K ¼ 0:5 lb Á ft=rad
J1 ¼ 1:0 slug Á ft2 B2 ¼ 3:35 oz Á ln=ðdeg=sÞ
Solve for yb(t) if T(t) ¼ tuÀ1(t).
3.3. In Prob. 2.10, the parameters have the following values:
M1 ¼ M2 ¼ 0:05 slug L ¼ 1 H l1 ¼ 10 in: K1 ¼ K2 ¼ 1:2 lb=in:
R ¼ 10 O l2 ¼ 20 in: B1 ¼ B2 ¼ 15 oz=ðin:=sÞ Ki ¼ 24 oz=A
With e(t) ¼ uÀ1(t) and the system initially at rest, solve for xb(t).
3.4. In part (a) of Prob. 2.18, the parameter have the following values:
a ¼ b ¼ 12 in: C1 ¼ 9:0 ðin:=sÞ=in: c ¼ 10 in: d ¼ 2 in:
Solve for y1(t) with x1(t) ¼ 0.1uÀ1(t) in. and zero initial conditions.
3.5. (a) r(t) ¼ (D3 þ 6D2 þ11D þ 6)c(t). With r(t) ¼ sin t and zero initial
conditions, determine c(t). (b) r(t) ¼ [(D þ 1)(D2 þ 4D þ 5)]c(t). With
r(t) ¼ tuÀ1(t) and all initial conditions zero, determine the complete
solution with all constants evaluated. (c) D3c þ10D2c þ 32Dc þ 32c ¼
10r. Find c(t) for r(t) ¼ uÀ1(t), D2c(0) ¼ Dc(0) ¼ 0, and c(0) ¼ À2. One of
the eigenvalues is ¼ À2. (d ) For each equation determine C( jo)/
R( jo) and c(t)ss for r(t) ¼ 10 sin 5t.
Copyright © 2003 Marcel Dekker, Inc.
Problems 727
3.6. The system shown is initially at rest. At time t ¼ 0 the string connecting
M toW is severed at X. Measure x(t) from the initial position. Find x(t).
3.7. Switch S1 is open, and there is no energy stored in the circuit. (a) Write
the state equations. (b) Find vo(t) after switch S1 is closed. (c) After the
circuit reaches steady state, the switch S1 is open. Find vo(t).
3.8. Solve the following differential equations. Assume zero initial condi-
tions. Sketch the solutions.
ðaÞ D2x þ 16x ¼ 1 ðbÞ D2x þ 4Dx þ 3x ¼ 9
ðcÞ D2x þ Dx þ 4:25x ¼ t þ 1 ðdÞ D3x þ 3D2x þ 4Dx þ 2x ¼ 10sin 10t
3.9. For Prob. 2.2, solve for i2(t),where
E ¼ 10 V L ¼ 1 H C1 ¼ C2 ¼ 0:001 F R1 ¼ 10 O R2 ¼ 15 O
3.10. For the circuit of Prob. 2.2: (a) obtain the differential equation relating
3.11. i2(t) to the input E; (b) write the state equations using the physical
3.12. energy variables; (c) solve the state and output equations and compare
with the solution of Prob. 3.9; (d ) write the state and output equations
using the phase variables, starting with the differential equation from
part (a).
In Prob. 2.3, the parameters have the values R1 ¼R2 ¼ R3 ¼10 O,
C1 ¼C2 ¼1mF, and L1 ¼L2 ¼ 50 H. If E ¼ 100 V, (a) find i1(t); (b) sketch
i1(t) and compute Mo, tp, and ts; (c) determine the value of Ts (Æ 2
percent of i(0)); (d ) solve for i1(t) from the state equation.
For L ¼ 0.4, C ¼ 0.5, and (1) R ¼ 1, (2) R ¼ 0.5; (a) show that the
differential equation is (RCD2 þ D þ R/L)va ¼ De; (b) find va(t)ss for
e(t) ¼ uÀ1(t); (c) find the roots m1 and m2; (d ) find va(0þ); (e) find
Copyright © 2003 Marcel Dekker, Inc.
728 Linear Control System Analysis and Design
Dva(0þ) [use ic(0þ)]; ( f ) determine the complete solution va(t);
(g) sketch and dimension the plot of va(t).
3.13. Solve the following equations. Show explicitly FðtÞ, x(t), and y(t).
3.14. À6 4 ! 0!
x_ ¼ x þ u y ¼ ½ 1 0 x
À2 0 1
x1ð0Þ ¼ 2 x2ð0Þ ¼ 0 uðtÞ ¼ uÀ1ðtÞ
A single-degree-of-freedom representation of the rolling dynamics of
an aircraft, together with a first-order representation of the aileron
servomotor, is given by
pðtÞ ¼ f_ ðtÞ Jxp_ðtÞ ¼ LdA dAðtÞ þ LppðtÞ
T d_ AðAÞ ¼ ðdAÞcommðtÞ À dAðtÞ
(a) Derive a state-variable representation of the aircraft and draw a
block diagram of the control system with
ðdAÞcommðtÞ ¼ AVref À PxðtÞ
where
x(t) ¼ state vector of the aircraft system ¼ [f p dA]T
P ¼ matrix of correct dimensions and with constant nonzero
elements pij.
A ¼ scalar gain
Vref ¼ the reference input
(dA)comm ¼ the input to the servo
3.15. (b) Determine the aircraft state equation in response to the reference
input Vref.
Use the Sylvester expansion of Sec. 3.14 to obtain A10 for
23
0 10
A ¼ 4 0 0 15
À6 À11 À6
3.16. For the mechanical system of Fig. 2.11a the state equation for Example
2, Sec. 2.6, is given in phase-variable form. With the input as u ¼ xa,
Copyright © 2003 Marcel Dekker, Inc.
Problems 729
3.17. the state variables are x1 ¼xb and x2 ¼ x_b. Use M ¼ 5, K ¼ 10, and
B ¼ 15. The initial conditions are xb(0) ¼ 1 and x_bð0Þ ¼ À2. (a) Find
the homogeneous solution of x(t). (b) Find the complete solution with
u(t) ¼ uÀ1(t).
For the autonomous system
23 y ¼ ½ 1 0 0 x
010
x_ ¼ 4 0 0 1 5x
À5 À7 À3
(a) Find the system eigenvalues. (b) Evaluate the transmission matrix
f(t) by means of Sylvester’s expansion theorem.
CHAPTER 4
4.1. Determine the inverse Laplace transform by use of partial fraction
expansion:
ðaÞ F ðsÞ ¼ ðs þ 1Þ2 9 2s þ 10Þ ðbÞ F ðsÞ ¼ sðs2 þ 4s 90 þ 5Þ
ðs2 þ þ 13Þðs
ðcÞ F ðsÞ ¼ ðs þ 20ðs þ 5Þ þ 5Þ
2Þ2ðs2 þ 4s
4.2. Find x(t) for
ðaÞ X ðsÞ ¼ s3 þ 6s2 4 16s þ 16 ðbÞ X ðsÞ ¼ 10ðs2 þ 4s þ 13Þ
þ sðs þ 2Þðs2 þ 4s þ 5Þ
ðcÞ X ðsÞ ¼ 0:969426ðs2 þ 4:2s þ 13:44Þ
sðs þ 1Þðs2 þ 4s þ 13Þ
ðdÞ Sketch xðtÞ for parts (aÞ and (bÞ:
4.3. Given an ac servomotor with inertia load, find o(t) by (a) the classical
method; (b) the Laplace-transform method.
oð0Þ ¼ 5 Â 103 rad=s Ko ¼ À6 Â 10À3 oz Á in:=ðrad=sÞ
Kc ¼ 1:4 oz Á in:=V
eðtÞ ¼ 5uÀ1ðtÞV J ¼ 15:456 oz Á in:2
Copyright © 2003 Marcel Dekker, Inc.
730 Linear Control System Analysis and Design
4.4. Repeat the following problems using the Laplace transform:
ðaÞ Prob. 3.1 ðbÞ Prob: 3:3 ðcÞ Prob: 3:5
ðdÞ Prob: 3:6 ðeÞ Prob: 3:10 ð f Þ Prob: 3:11ðdÞ
ðgÞ Prob: 3:13 ðgÞ Prob: 3:14
4.5. Find the partial-fraction expansions of the following:
ðaÞ F ðsÞ ¼ ðs þ 6 þ 6Þ ðbÞ F ðsÞ ¼ sðs þ 10 þ 5Þ
2Þðs 2Þðs
26 ðdÞ F ðsÞ ¼ 0:5ðs þ 6Þ 3Þ
ðcÞ F ðsÞ ¼ sðs2 þ 6s þ 13Þ s2ðs þ 1Þðs þ
10ðs þ 4Þ 4ðs þ 5Þ
ðeÞ F ðsÞ ¼ s2ðs2 þ 4s þ 20Þ ð f Þ F ðsÞ ¼ ðs þ 1Þðs2 þ 4s þ 20Þ
20 15ðs þ 2Þ
ðgÞ F ðsÞ ¼ s2ðs þ 10Þðs2 þ 8s þ 20Þ ðhÞ F ðsÞ ¼ sðs þ 3Þðs2 þ 6s þ 10Þ
ðiÞ F ðsÞ ¼ sðs 13ðs þ 1:01Þ 13Þ ð jÞ F ðsÞ ¼ 0:9366ðs2 þ 6:2s þ 19:22Þ
þ 1Þðs2 þ 4s þ sðs þ 1Þðs2 þ 6s þ 18Þ
Note: For parts (g) through ( j) use a CAD program.
4.6. Solve the differential equations of Prob. 3.8 by means of the Laplace
transform.
4.7. Write the Laplace transforms of the following equations and solve for
x(t); the initial conditions are given to the right.
ðaÞ Dx þ 4x ¼ 0 xð0Þ ¼ 5
ðbÞ D2x þ 2:8Dx þ 4x ¼ 10 xð0Þ ¼ 2; Dxð0Þ ¼ 3
ðcÞ D2x þ 4Dx þ 13x ¼ t xð0Þ ¼ 0; Dxð0Þ ¼ À4
ðdÞ D3x þ 4D2x þ 9Dx þ 10x ¼ sin 5t
xð0Þ ¼ À4; Dxð0Þ ¼ 1; D2xð0Þ ¼ 0
4.8. Determine the finial value for:
4.9. (a) Prob. 4.1 (b) Prob. 4.2 (c) Prob. 4.5
Determine the initial value for:
4.10.
4.11. (a) Prob. 4.1 (b) Prob. 4.2 (c) Prob. 4.5
For the functions of Prob. 4.5, plot M vs. o and a vs. o.
Find the complete solution of x(t) with zero initial conditions for
(1) (D2 þ 2D þ 2)(D þ 5)x ¼ (D þ 3) f (t)
(2) (D2 þ 3D þ 2)(D þ 5)x ¼ (D þ 6) f (t)
Copyright © 2003 Marcel Dekker, Inc.
Problems 731
The forcing function f (t) is
(a) u0(t) (b) 10uÀ1(t) (c) tuÀ1(t) (d ) 2t2uÀ1(t)
y ¼ ½ 0 1 x
4.12. A linear system is described by
À5 !!
2 1 0
ð1Þ x_ ¼ À2 xþ 1 u
0 2 !!
À4 À6 1
ð2Þ x_ ¼ xþ 0 u y ¼ ½ 1 1 x
where u(t) ¼ uÀ1(t) and the initial conditions are x1(0) ¼ 1, x2(0) ¼ 1. (a)
Using Laplace transforms, find X(s). Put the elements of this vector
over a common denominator. (b) Find the transfer function G(s).
(c) Find y(t).
4.13. A linear system is represented by
ð1Þ x_ ¼ À3 1! 1! 1 1! u ¼ uÀ1ðtÞ
xþ u y¼ x 1!
À3 À7 1
0 4! 1 1! 01 u ¼ 1 uÀ1ðtÞ
ð2Þ x_ ¼ xþ u 2 0!
À2 À6 0 À1 y¼ x u ¼ uÀ1ðtÞ
À2 ! 1! 11
ð3Þ x_ ¼ 0 xþ u 0 2!
y¼ x
0 À6 1 11
(a) Find the complete solution for y(t ) when x1(0) ¼ 0 and x2(0) ¼ 1.
(b ) Determine the transfer functions. (c) Draw a block diagram
representing the system.
4.14. A system is described by
ð1Þ x_ ¼ À4 À1 ! 0! y ¼ x1
xþ u
30 1
!!
0 1 1
ð2Þ x_ ¼ À6 À5 xþ 1 u y ¼ x1
4.15. (a) Find x(t) with x(0) ¼ 0 and u ¼ uÀ1(t). (b) Determine the transfer
4.16. function G(s) ¼ Y(s)/U(s).
4.17. Repeat Prob. 3.17 using the Laplace transform.
Shown that Eqs. (4.52) and (4.53) are equivalent expressions.
Given
Y ðsÞ ¼ Kðs þ a1Þ Á Á Á ðs þ awÞ
sðs þ z1on1 Æ jod1 Þðs þ z3on3 Æ jod3 Þðs þ b5Þ Á Á Á ðs þ bnÞ
Copyright © 2003 Marcel Dekker, Inc.
732 Linear Control System Analysis and Design
all the ai’s and bk’s are positive and real and z1on1 ¼ z3on3 with
on3 > on1: Determine the effect on the Heaviside partial-fraction
coefficients associated with the pole p3 ¼ Àz3on3 þ jod3 when on3 is
allowed to approach infinity. Hint: Analyze
lim A3 ¼ lim ½ðs À pk ÞY ðsÞs¼p3¼Àz3on3 þjod3
o!1 o!1
K has the value required for y(t)ss ¼1 for a unit step input. Consider the
cases (1) n ¼ w, (2) n > w.
4.18. Repeat Prob. 4.17 with a1 ¼0,w ¼ 2, n ¼ 6, and K is a fixed value.
4.19. For the linearized system of Prob. 2.22 determine (a) the transfer
4.20. function and (b) the value of B that makes this system critically
damped.
Determine the transfer function and draw a block diagram.
!! !
À3 0 2 0 2 0
x_ ¼ 4 À2 xþ 1 1 u y¼ 0 1 x
CHAPTER 5
5.1. For the temperature-control system of Fig. 5.1, some of the pertinent
equations are b ¼ Kby, fs ¼ Ksis, q ¼ Kq x, y ¼ Kcq/(D þ a). The solenoid
coil has resistance R and inductance L. The solenoid armature and
valve have mass M, damping B, and a restraining spring K. (a)
Determine the transfer function of each block in Fig. 5.1b. (b)
Determine the forward transfer function G(s). (c) Write the state and
output equations in matrix form. Use x1 ¼ y, x2 ¼ x, x3 ¼ x_, x4 ¼ is.
5.2. Find an example of a practical closed-loop control system not covered
in this book. Briefly describe the system and show a block diagram.
5.3. A satellite-tracking system is shown in the accompanying schematic
diagram. The transfer function of the tracking receiver is
V1 ¼ 6
Âcomm À ÂL 1 þ s=42
The following parameters apply:
Ka ¼ gain of servoamplifier ¼ 60
Kt ¼ tachometer constant ¼ 0.05 V Ás
KT ¼ motor torque constant ¼ 0.6 N Á m/A
Kb ¼ motor back-emf constant ¼ 0.75 V Ás
JL ¼ antenna inerita ¼ 3,000 kg Á m2
Jm ¼ motor inertia ¼ 8 Â10À3 kg Á m2
1: N ¼ gearbox stepdown ratio ¼1:12,200
Copyright © 2003 Marcel Dekker, Inc.
Problems 733
(a) Draw a detailed block diagram showing all the variables. (b) Derive
the transfer function ÂL(s)/Âcomm(s).
5.4. A photographic control system is shown in simplified form in the
diagram. The aperture slide moves to admit the light from the high-
intensity lamp to the sensitive plate, the illumination of which is a
linear function of the exposed area of the aperture. The maximum area
of the aperture is 4 m2. The plate is illuminated by 1 candela (cd) for
every square meter of aperture area. This luminosity is detected by the
photocell,which provides an output voltage of 1 V/cd. The motor torque
constant is 2 N Á m/A, the motor inertia is 0.25 kg Á m2, and the motor
back-emf constant is 1.2 V Ás. The viscous friction is 0.25 N Á mÁs, and
the amplifier gain is 50 V/V. (a) Draw the block diagram of the system
with the appropriate transfer function inserted in each block. (b) Derive
the overall transfer function.
5.5. The longitudinal motion of an aircraft is represented by the vector
differential equation
2 À0:02 3 23
À0:09 1 0
À0:06
x_ ¼ 4 À8:0 À6:0 5x þ 4 0 5dE
0 À0
À10 10
Copyright © 2003 Marcel Dekker, Inc.
734 Linear Control System Analysis and Design
where
x1 ¼ angle of attack
x2 ¼ rate of change of pitch angle
x3 ¼ incremental elevator angle
dE ¼ control input into the elevator actuator
Derive the transfer function relating the system output, rate of change
of pitch angle, to the control input into the elevator actuator, x2/dE.
5.6. (a) Use the hydraulic valve and power piston in a closed-loop position
control system, and derive the transfer function of the system. (b)
Draw a diagram of a control system for the elevators on an airplane.
Use a hydraulic actuator.
5.7. In the diagram [qc] represents compressibility flow, and the pressure
p is the same in both cylinders. Assume there is no leakage flow around
the pistons. Draw a block diagram that relates the output Y(s) to the
input X(s).
5.8. The dynamic equations that describe an aircraft in the landing
configuration are as follows:
h_ ðtÞ ¼ b33hðtÞ þ b32yðtÞ
y€ ðtÞ ¼ b11y_ ðtÞ þ b12yðtÞ þ b13hðtÞ þ c11deðtÞ
where the coefficients are defined as follows:
b11 ¼ 1 À 2zos b13 ¼ 1 À 2zos þ os2 b33 ¼ À1
Ts VTs2 VTs V Ts
b12 ¼ 2zos À o2s À 1 V c11 ¼ os2KsTs
Ts Ts2 b32 ¼ Ts
Copyright © 2003 Marcel Dekker, Inc.