This document contains a homework assignment for a 4th year biomedical engineering systems engineering course. It involves solving several problems related to modeling and analyzing dynamic systems using MATLAB. Students are asked to write individual reports for each problem and not copy solutions from classmates. The problems cover topics like determining states of linear systems, showing equivalence of different representations, analyzing controllability and observability, designing state feedback gains, and developing an integral control system. MATLAB functions for obtaining state feedback and integral gains are also to be implemented.
4th Year Biomedical Eng. Systems Engineering Homework
1. 4th Year Biomedical Eng. Systems Engineering 2020 Homework Assignment
Solve the following problems:
You are asked to write an individual report for your solution and each of you is
encouraged to use the computational facility of MATLAB in solving these
problems. Please do not copy the solution of your classmates as it will degrade
your marks.
1- a) Consider the system described by
),(
110
011
)(),(
1
1
1
)(
121
010
100
)1( kxkykukxkx
Determine x(0), given that u(0) = 1, u(1) = 0, u(2) = 0 and
.
6
4
)2(,
4
1
)1(,
1
3
)0(
yyy
b) Show that the following two systems constitute two different representations for the same
system:
),(520)(),(
0
0
1
)(
210
321
1553
)1( kxkykukxkx
),(120)(),(
0
0
1
)(
010
001
243
)1( kxkykukxkx
2- Consider the system described by
𝑥( 𝑘 + 1) = [
−0.4 1.8 3.6 − 2 𝛼
0 −0.8 𝛼 − 0.8
0 0 0.6
] x(k) + [
1
0
1
] 𝑢(𝑘)
a) Under what conditions on α is this system state controllable?
b) Given two control sequences U1 = [ u1(0) u1(1) u1(2) ……. u1(n-1) ] and U2 = [ u2(0)
u2(1) u2(2) ……. u2(n-1) ] that transfer this system from an initial condition x(0) to the
same final condition x(n) = xf . Show that any control sequence Uλ = λ U1 + ( 1 – λ ) U2
will also transfer this system from x(0) to xf.
c) For α = 1 , it was found that the following control sequences were able to transfer the
system of part a) from x(0) = [ 1 0 0]T to xf = [ 2.2496 0.232 1.408]T,
U1 = [ -2 -1 2 1] and U2 = [ 1 0.8 0.8 0.424 ]. Find a control sequence with
minimum energy that can accomplish this transfer. [Hint: Use part b) ]
3- a) Derive the Ackermann’s formula for the state feedback gain matrix K for a single-input
system
2. K = [ 0 0 0 . . . . 0 1] CON-1 Φ(G)
Where CON denote the controllability matrix and Φ(z) denote the closed loop
characteristic equation.
Hint : start with K = [∝ 𝑛− 𝑎 𝑛 ∝ 𝑛−1− 𝑎 𝑛−1 ∝1− 𝑎1] 𝑃−1
𝑃−1
=
[
𝑓𝑛
𝑓𝑛 𝐺
𝑓𝑛 𝐺2
𝑓𝑛 𝐺 𝑛−1
]
b) Given the system described by
𝑥( 𝑘 + 1) = [
0 0 2
2 1 −2
1 0 1
] x(k) + [
0
1
0.5
] 𝑢( 𝑘), 𝑦( 𝑘) = [1 − 1 2]
i- Check the controllability and observability of this system
ii- Knowing that the open loop characteristic equation of this system is
z3 – 2 z2 – z + 2, and the transformation matrix P and its inverse that transforms
this system to the standard controllable form are
𝑃−1
= [
−1 −1 2
0 −1 2
0 −1 4
] and P = [
−1 1 0
0 −2 1
0 −0.5 0.5
]
Find the state feedback gain matrix K so as to locate the closed loop poles at
𝑧1,2 = 0.4 ± 0.6 𝑗 𝑎𝑛𝑑 𝑧3 = −0.2
iii- Use your results of part b) to determine the closed loop pulse transfer function as
well as the steady state output response of the closed loop to a unit step input.
Note that the numerators of the, pulse transfer functions of the open and closed
loop; are the same.
4- Consider the system
x(k + 1) = G x(k) + H u(k)
y(k) = C x(k)
where
1321
48811
2434
1245
G ,
0
1
1
0
H ,
1223
0011
C
3. a) Design a full deadbeat observer for this system (observer poles are all located at the
origin) and find the response of the error between the state of the system x(k) and the
state of the observer x(k) with k, given that the initial states of both systems are
x(0) = [ 2 -3 4 1]', and x(0) = [1 2 -1 4]'. Note, this is a multi-outputs system and you
need to transform the pair of (GT, CT) to the generalized standard controllable form;5 4 2
5- Consider the digital control of a plant by use of state feedback and integral control. The
pulse transfer function of the plant is
321
21
072.0216.052.01
8.0
)(
)(
zzz
zz
zU
zY
Determine an integral gain constant K1 and a state feedback gain matrix K2 such that the
closed loop poles of the servo system are located at z1,2 = 0.4+0.3j and z3 = 0.2, z4= 0.
b) Compute the unit step response of the output to a unit step input. Assuming that the
sampling period is 0.1 sec, use the result of the unit step response to evaluate the
maximum overshoot and the rise time of the designed servo system.
6- The state equation of the plant is given by
)(
23
12
)(),(
10
01
)(
2.132.
10
)1( kxkykukxkx
a) Determine the integral gain matrix K1 and the state feedback gain matrix K2 so as to
locate the closed loop poles of the system at 0.5 + 0.5 j, 0.1 and 0.
b) Determine the steady state values of x(k) and u(k) corresponding to unit step inputs.
c) What would be the matrix K2 if the state feedback was made from y(k) instead of x(k).
7- Write a MATLAB function that can be used to obtain the state feedback gain matrix K2
and the integral gain matrix K1 corresponding to the pulse transfer function of a single-
input single-output system. The input to the function will be the numerator coefficients
NUM, the denominator coefficients DEN as well as the order of the system N and the
required closed loop poles CLPoles of order N+1. This function will return the standard
controllable representation matrices G, H, C, D. Furthermore, it will compute and return
the matrices K2 and K1as well as the augmented state and output matrices Ga, Ha, Ca.
Check your code using the example given in the last lecture. Note: you can use the
Ackermann function of MATLAB to find the state feedback gain matrix, denoted by K,
of a single-input system K = acker(G,H,CLPoles).