Funwork 4 Problem 1: A A I Eq 2 1 2 A
Funwork 4 Problem 1: A A I Eq 2 1 2 A
Problem 1
Consider the following diagram of an armature controlled DC motor, where the system
parameters are: Ra = 1, La ≈ 0H, Kb = 5V /rad/sec, Ki = 5N m/A, and the equivalent
rotational inertia, Ieq = 0.1kgm2 . The gear inertia and friction are negligible. Let x1 =
θ, x2 = θ̇, and u = ea .
1
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
θ(s)
• Putting together equation (5) and (6), and solving for Ea
:
θ̇(s) ki
= 2
(7)
Ea Ra Ieq s + ki kb s
ki
θ̇(s) R I
= 2 a keqi kb s (8)
Ea s + Ra Ieq
θ̇(s) 50
= 2 (9)
Ea s + 250s
• The state space model of the motor:
0 1 0
ẋ = x+ u (10)
0 −250 50
y = 10 x (11)
2. • Let x(0) = [10 1]T . Find a control u that brings the system to x(2) = [0 0]T :
• In order to find the control u, fist W (t0, t1) was calculated using MatLab and the
following formula: Z t1
0
W (t0 , t1 ) = eAt BB 0 eA τ dxτ (12)
t0
• The control u was founded using Matlab and the result from equation (13).
2
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
3
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
Problem 2
Consider a dynamical system modeled by
−1/2 1/2 −1
ẋ = x+ u (16)
−1/2 1/2 1
y= 1 1 x (17)
Determine x(t) over the time interval [0, 10] knowing that u(t) = 1 for t ≥ 0 and y(t) = t2 +2t
for t ≥ 0.
4
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
Where: Z t1
−1 T (t)
V (t0 , t1 ) = eA C T CeAt dt (20)
t0
Using MatLab the equation was solve and the result was as follow:
730 −970
−1 3 3
V (t0 , t1 ) = −970 1330 (21)
3 3
t2 − 2t t2 + 2t
g(t) = 2t − ( )−( ) + t2 (23)
2 2
g(t) = 2t (24)
3. Then, plogging the result from equation (17) and (20) into (15) the result is:
−1
x(t0 ) = (25)
1
4. Finally, using the obtained result in (21) into (14) and with the help of MatLab, the
final result was obtained:
t2 −2t
t2
t+ 2
−1 2
−1
x(t) = t2 +2t = t2 (26)
t+ 2
+1 2
+ 2t + 1
5. The MatLab scrip is in the follow picture, to show the process in the previous equations:
5
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
Problem 3
Transform the system into its controller form:
0 0 1 0 0
0 0 0 1 0
ẋ =
2
x + u (27)
1 0 0 1
1 1 0 0 0
1. In order to calculate the controller form, I first started calculating the controllability
matrix using the following formula and implementing it in Matlab.
0 1 0 −2
0 0 0 1
b Ab A2 b A3 b = (28)
1 0 −2 0
0 0 1 0
2. Extract the last row of the controllability matrix which is equal to q1 and will be used
t calculate the transformation matrix in the following step:
q1 = 0 0 1 0 (29)
3. The transformation matrix was calculated using the results from equation (25) and the
following formula:
q1 0 1 0 0
q1 A 0 0 0 1
T =
q1 A2 = 1 −1 0 0
(30)
q1 A3 0 0 1 −1
6
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
7. The Matlab script used in order to find the solution to this problem:
Problem 4
For the system construct a state variable transformation so that in the new coordinates the
controllable part is separated and distinct from the uncontrollable part.
−1 1 0 1 1 1
1 1 0 0 0 0
ẋ =
0
x + u (34)
0 4 0 0 0
1 1 −1 2 0 1
1. The controllability matrix of the pair (A,B) is found knowing the formula ant applying
the Matlab command ctrb:
CM = U = B AB A2 BA3 B (35)
1 1 −1 0 3 4 −1 4
0 0 1 1 0 1 3 5
U =
0 0 0
(36)
0 0 0 0 0
0 1 1 3 2 7 7 19
2. Then, applying the ”qr” command from MatLab in order to decompose the controlla-
7
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
3. Finally, applying the formulas in order to find the pair (A,B) in its news coordinates:
−1 −1 −1 0
−1 2 1 1
à = T AT −1 = Q−1 AQ =
−1 0
(39)
1 0
0 0 0 4
1 1
0 −1
B̃ = T B = Q−1 B =
0 0 (40)
0 0
4. Including the MatLab script with the used functions and process:
Problem 5
Transform the pairs into their multi-input controller forms.
Pair Number 1:
0 0 1 0 1 0
1 0 2 0
0 0
A1 =
0 and B1 = (41)
1 3 0 0 0
0 0 21 5 0 1
8
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
1. The controllability matrix of the pair (A,B) is found by applying the formula, where
b1 and b2 are the columns of the matrix B:
U = b1 Ab1 A 2 b1 b2 (42)
1 0 0 0
0 1 0 0
U =0 0
(43)
1 0
0 0 0 1
2. Then, choosing the vectors q1 and q2 in order to be able to construct the transformation
matrix T , where q1 and q2 are the last rows of the inverse matrix U.
q1 = 0 0 1 0 (44)
q1 = 0 0 0 1 (45)
3. Calculating the transformation matrix T:
q1 0 0 1 0
q1 A 0 1 3 0
T =
q1 A2 = 1
(46)
3 11 0
q2 0 0 0 1
4. Finally, applying the formulas in order to find the pair (A,B) in its news coordinates:
0 1 0 0
0 0 1 0
à = T AT −1 =
1
(47)
2 3 0
−21 0 0 5
0 0
0 0
B̃ = T B = 1
(48)
0
0 1
5. Including the MatLab script with the used functions and process:
9
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
Pair Number 2:
−1 1 0 1 1 1
1 1 0 0 2 0
A2 =
0
and B2 = (49)
0 4 0 1 0
1 1 −1 2 0 1
1. The controllability matrix of the pair (A,B) is found using the formula in Matlab and
b1 and b2 are the columns of the matrix B:
CM = U = b1 Ab1 b2 Ab2 (50)
1 1 1 0
2 3 0 1
U =1 4
(51)
0 0
0 2 1 3
2. Then, extracting the second and fourth rows of the inverse matrix U which will be the
row vectors q1 and q2 :
q1 = −0.5 −0.15 0.35 0.05 (52)
q2 = −0.25 0.25 −0.25 0.25 (53)
4. Finally, applying the formulas in order to find the pair (A,B) in its news coordinates:
0 1 0 0
−4 5 0 0
à = T AT −1 =
0
(55)
0 0 1
3 −3 4 1
0 0
1 0
B̃ = T B =
0
(56)
0
0 1
10
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
5. Including the MatLab script with the used functions and process:
Problem 6
For the pair use its controller form to find the matrix K:
0 0 1 0 1 0
1 0 2 0 0 0
A= 0 1 3 and B = (57)
0 0 0
0 0 21 5 0 1
1. The controller form of this matrix was found in a previous problem, and it is:
0 1 0 0 0 0
0 0 1 0 0
0
(Ã, B̃) =
1 , (58)
2 3 0 1 0
−21 0 0 5 0 1
3. The realization matrix can be defined as follow, since the characteristic polinomial is
know:
0 1 0 0
0 0 1 0
à − B̃ K̃ =
0
(61)
0 0 1
−80 −108 −54 −12
11
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
0 1 0 0 0 1 0 0
0 0 1 0
− 0 0 1 0
B̃ K̃ =
1
(63)
2 3 0 0 0 0 1
−21 0 0 5 −80 −108 −54 −12
0 0 0 0
0 0 0 0
B̃ K̃ = (64)
1 2 3 −1
59 108 54 17
1 2 3 −1
K̃ = (65)
59 108 54 17
12
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
Problem 7
Transform the pair into its observer form.
0 0 1 0
1 0 2 0
A= and C = 1 0 0 0
0 1 3 0 0 0 0 1
0 0 21 5
1. In order to compute the observer form of the pair (A,C), first the pair has to be
transformed to (AT , C T ), then follow the same process like the controller form
2. Find the controllability matrix of the pair (AT , C T ) using the following formula, and
MatLab:
U = cT1 AT cT1 (AT )2 cT1 cT2 (67)
1 0 0 0
0 0 1 0
U =
0 1 3 0
(68)
0 0 0 1
4. Then, extracting the third and fourth row of the inverse matrix U which will be the
row vectors q1 and q2 :
q1 = 0 1 0 0 (70)
q2 = 0 0 0 1 (71)
13
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
6. Finally, applying the formulas in order to find the pair (A,B) in its news coordinates:
0 0 1 0
1 0 2 0
à = T −T AT T =
0
(73)
1 3 0
0 0 −105 5
T 0 0 1 0
C̃ = CT = (74)
0 0 −21 1
7. Including the MatLab script with the used functions and process:
Problem 8
For the pair use its observer form to find the matrix L:
0 0 1 0
1 0 2 0
A= and C = 1 0 0 0 (75)
0 1 3 0 0 0 0 1
0 0 21 5
1. The observer form of this matrix was found in a previous problem, and it is:
0 0 1 0
1 0 2 0 0 0 1 0
(Ã, C̃) = , (76)
0 1 3 0 0 0 −21 1
0 0 −105 5
14
Karen Reyes ECE 602
FunWork 4 Tuesday, November 05, 2019
15