Formulation
Formulation
Solvin$ for the hi$hest order derivative:
/ 0 / 0 / 0 1 / 0 / 0
2 2 3
/ 3 0
3
/ 0
t u b t y a t y a t y a t y
n
n
n
+ =
3
4loc* dia$ram:
Convertin$ an n
th
order differential equation to a set of n first-order differential
equations: Let x
i
0t/ represent the outputs of the inte$rators" #s a result we can choose
them as the state variales of the system"
x
3
0t/ 5 y0t/
x
6
0t/ 5 y-0t/ 5 x
3
70t/
x
8
0t/ 5 y90t/ 5 x
6
70t/
:
x
n
0t/ 5 y
0n-3/
0t/ 5 x
n-3
70t/
Rewritin$ these equations:
x
3
70t/ 5 x
6
0t/
x
6
70t/ 5 x
8
0t/
:
x
n-3
70t/ 5 x
n
0t/
x
n
70t/ 5 y
0n/
0t/ 5 b
2
u0t/ % a
2
x
3
0t/ % : % a
n-3
x
n
0t/
(atri, formulation:
/ 0
2
"
"
"
2
2
/ 0
/ 0
"
"
"
/ 0
/ 0
" "
3 2 " " 2 2 2
" " " " " " "
" " " " " " "
" " " " " " "
2 2 " " 3 2 2
2 2 " " 2 3 2
/ 0 1
/ 0 1
"
"
"
/ 0 1
/ 0 1
2
3
6
3
3 6 6 3 2
3
6
3
t u
b t x
t x
t x
t x
a a a a a t x
t x
t x
t x
n
n
n n n
n
y0t/
b
2
a
n-3
a
n-6
a
2
y-0t/
y
0n-3/
0t/ y
0n-6/
0t/ y
0n/
0t/
u0t/
;
[ ] / 0 < 2 =
/ 0
/ 0
/ 0
/ 0
2 2 2 3 / 0
3
6
3
t u
t x
t x
t x
t x
t y
n
n
+
>ector notation:
x-0t/ 5 A x0t/ ; B u0t/
y0t/ 5 C x0t/ ; D u0t/
where
o x0t/ is the state vector
o y0t/ is the output
o u0t/ is the input
o A is called the state 0dynamic/ matri,
o B is called the input matri,
o C is called the output 0sensor/ matri,
o D is called the feed throu$h matri,
?ow. an n
th
order differential equation has een converted to a set of n first-order
differential equations"
For a multi-input@multi-output system:
x-0t/ 5 A x0t/ ; B u0t/
y0t/ 5 C x0t/ ; D u0t/
For a system with n state variale. p inputs and q outputs:
A is n n
B is n p
C is q n
D is q p
x0t/ is n 1
y0t/ is q 1
u0t/ is p 1
Ahe transfer function matri,:
Aa*in$ the Laplace transform of the state-variale vector equation we otain:
s X0s/ % x02/ 5 A X0s/ ; B U0s/
X0s/ = 0s I % A/
-3
Bx02/ ; B U0s/C
8
and Y0s/ = C X0s/ + D U0s/
Y0s/ = C 0s I % A/
-3
Bx02/ ; B U0s/C ; D U0s/
Finally. settin$ x02/ 5 2 $ives us the transfer function matri,:
Y0s/ 5 C 0s I % A/
-3
B U0s/ ; D U0s/ 5 BC (s I % A/
-3
B ; DC U0s/
or G0s/ 5 C 0s I % A/
-3
B ; D
D,ample 3:
y0t/ ; y0t/ % 6y0t/ ; 8y0t/ 5 u0t/
[ ] [ ] / 0 2
/ 0
/ 0
/ 0
2 2 3 / 0
/ 0
3
2
2
/ 0
/ 0
/ 0
3 6 8
3 2 2
2 3 2
/ 0 1
/ 0 1
/ 0 1
8
6
3
8
6
3
8
6
3
t u
t x
t x
t x
t y
t u
t x
t x
t x
t x
t x
t x
+
y0t/
x
3
0t/
3
-3
6
-8
y0t/
x
8
0t/
y0t/
u0t/
y0t/
x
6
0t/
K
x
6
70t/ x
6
0t/ x
3
70t/ x
3
0t/ y0t/
u0t/
Step 8: Start with the derivative terms and pass them throu$h the first inte$rator
Step E: Remove the non-derivative terms
Step F: Hass the result throu$h the second inte$rator
Step G: Remove the input term
Step I: Jse the input u0t/ and feedac* from x
3
0t/ and x
6
0t/ to construct x
6
70t/
Step K: Compute the constants
o K6 5 2 since x
6
70t/ has no derivative term"
o K3 5 -8 in order to match the -8y0t/ term in x
6
70t/"
o -8y0t/ ; Gu0t/ 5 -8 =y0t/ % Eu0t/< ; K u0t/ K 5 -G
F
x
6
70t/5 =y90t/ % Eu90t/<
; =6y-0t/ % Fu-0t/<
x
6
0t/ 5 =y-0t/ % Eu-0t/<
; =6y0t/ % Fu0t/<
-=6y0t/ % Fu0t/<
x
3
70t/ 5 y-0t/ % Eu-0t/
x
3
70t/5 y-0t/ % Eu-0t/ x
3
0t/ 5 y0t/ % Eu0t/
x
6
0t/ 5 =y-0t/ % Eu-0t/<
; =6y0t/ % Fu0t/<
x
3
0t/ 5 y0t/ % Eu0t/
Eu0t/
y0t/
x
6
70t/ 5 -8y0t/ ; Gu0t/
K3
x
3
0t/ 5 y0t/ % Eu0t/
K6
x
6
0t/ 5 =y-0t/ % Eu-0t/<
; =6y0t/ % Fu0t/<
u0t/
K
note: this is the feed throu$h term"
note: we will otain
this term in step L"
Step L: Jse u0t/ and feedac* from x
3
0t/ and x
6
0t/to construct ,
3
-0t/ 5 y-0t/ % Eu-0t/
Step 32: Compute the constants
o KE 5 3
o K8 5 -6 in order to match the -6y0t/ term"
o - =6y0t/ % Fu0t/< 5 -6 =y0t/ % Eu0t/< ; KF u0t/ KF 5 -8
Step 33: #dd feedac* path to otain x
6
70t/ 0from step K/
Step 36: #dd feedac*@throu$h paths to otain x
3
70t/ 0from step 32/
Step 38: #dd feed throu$h path to otain y0t/ 0from step G/
G
y-0t/ % Eu-0t/
K8
x
3
0t/ 5 y0t/ % Eu0t/
u0t/
KF
-G
x
6
70t/ x
6
0t/ x
3
70t/ x
3
0t/ y0t/
u0t/
-8
-G
x
6
70t/ x
6
0t/ x
3
70t/ x
3
0t/ y0t/
u0t/
-8
-6
-8
-G
x
6
70t/ x
6
0t/ x
3
70t/ x
3
0t/ y0t/
u0t/
-8
-6
-8
E
KE
x
6
0t/ 5 =y-0t/ % Eu-0t/<
; =6y0t/ % Fu0t/<
Step 3E: Formulate the state-space equations
x
3
70t/ 5 -6 x
3
0t/ ; x
6
0t/ % 8 u0t/
x
6
70t/ 5 -3 x
3
0t/ % G u0t/
y0t/ 5 x
3
0t/ ; E u0t/
[ ] [ ] / 0 E
/ 0
/ 0
2 3 / 0
/ 0
G
8
/ 0
/ 0
2 8
3 6
/ 0 1
/ 0 1
6
3
6
3
6
3
t u
t x
t x
t y
t u
t x
t x
t x
t x
+
4loc* dia$ram:
D,ample E: 0te,t. p" 6G/
)p #mp implementation:
o Inverter:
o #dder:
o Inte$rator:
K
-3@F
x
6
70t/ x
6
0t/ x
3
70t/ x
3
0t/ 5 y0t/
u0t/
3@F
-F
F
-82
o D,ample:
[ ] [ ] u x
u x x
+ =
=
6 32 8
E
6
F 2
E 6
1
y
Rearran$in$ the terms we have:
u x x
u x x x
u x x y
E F 1
6 E 6 1
6 32 8
6 6
6 3 3
6 3
+ =
+ + =
+ =
Constructin$ y:
Constructin$ x3:
Constructin$ x6:
L
Connectin$ the sta$es:
Lineari!ation: ?onlinear systems can e lineari!ed y i$norin$ the hi$her order
terms in the Aaylor series 0Ae,t H" 3K/"
Discrete-time systems
Difference equation:
y0k;n/ ; a
n-3
y0k;n-3/ ; : ; a
3
y0k;3/ ; a
2
y0k/ 5 b
2
u0k/
Solvin$ for the hi$hest order delay:
y0k;n/ 5 -a
n-3
y0k;n-3/ % : % a
2
y0k/; b
2
u0k/
4loc* dia$ram:
;
32
z
-3
y0k/
b
2
an-3
an-6
a
2
y0k;3/
y0k;n-3/ y0k;n-6/
y0k;n/
u0k/ z
-3
!
-3
Convertin$ an n
th
order difference equation to a set of n first-order difference
equations: Let x
i
0k/ represent the outputs of the unit delay" #s a result we can choose
them as the state variales of the system"
x
3
0k/ 5 y0k/
x
6
0k/ 5 y0k;3/ 5 x
3
0k;3/
x
8
0k/ 5 y0k;6/ 5 x
6
0k;3/
:
:
:
x
n-3
0k/ 5 y0k;n-6/ 5 x
n-6
0k;3/
x
n
0k/ 5 y0k;n-3/ 5 x
n-3
0k;3/
Rewritin$ these equations:
x
3
0k;3/ 5 x
6
0k/
x
6
0k;3/ 5 x
8
0k/
:
:
:
x
n-3
0k/ 5 x
n
0k/
x
n
0k/ 5 y0k;n/ 5 b
2
u0k/ % a
2
x
3
0k/ % : % a
n-3
x
n
0k/
(atri, formulation:
/ 0
2
"
"
"
2
2
/ 0
/ 0
"
"
"
/ 0
/ 0
" "
3 2 " " 2 2 2
" " " " " " "
" " " " " " "
" " " " " " "
2 2 " " 3 2 2
2 2 " " 2 3 2
/ 3 0
/ 3 0
"
"
"
/ 3 0
/ 3 0
2
3
6
3
3 6 6 3 2
3
6
3
k u
b k x
k x
k x
k x
a a a a a k x
k x
k x
k x
n
n
n n n
n
+
+
+
+
[ ] / 0 < 2 =
/ 0
/ 0
/ 0
/ 0
2 2 2 3 / 0
3
6
3
k u
k x
k x
k x
k x
k y
n
n
+
33
>ector notation:
x0k;3/ 5 A x0k/ ; B u0k/
y0k/ 5 C x0k/ ; D u0k/
where
o x0k/ is the state vector
o y0k/ is the output
o u0k/ is the input
o A is called the state 0dynamic/ matri,
o B is called the input matri,
o C is called the output 0sensor/ matri,
o D is called the feed throu$h matri,
?ow. an n
th
order difference equation has een converted to a set of n first-order
difference equations"
For a multi-input@multi-output system:
x0k;3/ 5 A x0k/ ; B u0k/
y0k/ 5 C x0k/ ; D u0k/
For a system with n state variale. p inputs and q outputs:
A is n n x0k/ is n 1
B is n p y0k/ is q 1
C is q n u0k/ is p 1
D is q p
Ahe transfer function matri,:
Aa*in$ the !-transform of the state-variale vector equation we otain:
G0z/ 5 C 0z I % A/
-3
B ; D
D,ample:
y0k;6/; 2"F y0k;3/ % 2"8 y0k/ 5 2"E u0k/
36
z
-3
z
-3
2"E
-2"F
2"8
y0k;3/
x
6
0k/
y0k;6/
u0k/
y0k/
x
3
0k/
[ ] [ ] / 0 2
/ 0
/ 0
2 3 / 0
/ 0
E " 2
2
/ 0
/ 0
F " 2 8 " 2
3 2
/ 3 0
/ 3 0
6
3
6
3
6
3
k u
k x
k x
k y
k u
k x
k x
k x
k x
+
+
+
(I() D,ample
For a multi-input@multi-output system:
x-0t/ 5 A x0t/ ; B u0t/
y0t/ 5 C x0t/ ; D u0t/
D,ample:
p--- ; 6 p- ; 8 q % E - 5 F 0t/
p ; K q- ;L q 5 32 0t/ % 33 0t/
p-- % G -- ; I 5 2
Let: x3 5 p x6 5 p- x8 5 p--
xE 5 q xF 5 xG 5 -
u3 5 0t/ u6 5 0t/
Sustitutin$ and rearran$in$ the equations:
x8- 5 -6 x6 %8 xE ; E xG ; F u3
xE- 5 -03@K/ x3 % 0L@K/ xE ; 032@K/ u3 % 033@K/ u6
xG- 5 03@G/ x8 ; 0I@G/ xF
In matri, notation:
38
6
3
G
F
E
8
6
3
6
3
G
F
E
8
6
3
G
F
E
8
6
3
2 2
2 2
2 2
2 3 2 2 2 2
2 2 3 2 2 2
2 2 2 2 2 3
2 2
2 2
K
33
K
32
2 F
2 2
2 2
2
G
I
2
G
3
2 2
3 2 2 2 2 2
2 2
K
L
2 2
K
3
E 2 8 2 6 2
2 2 2 3 2 2
2 2 2 2 3 2
1
1
1
1
1
1
u
u
x
x
x
x
x
x
q
p
u
u
x
x
x
x
x
x
x
x
x
x
x
x
3E