MATLAB Basic Functions and Commands For Feedback & Control Systems
MATLAB Basic Functions and Commands For Feedback & Control Systems
Laboratory Activity #1
MATLAB Basic Functions and Commands for Feedback & Control Systems
I. Learning Objectives:
1. Review MATLAB basic commands and functions
2. Use MATLAB in solving for the Laplace transform of a time – domain function and
the inverse Laplace transform of s – domain function
3. Implement partial – fraction expansion with MATLAB
RONEL V. VIDAL 1
Answer: = 28495
= 5.9279
= −0.3131
= 0.9055
= −0.2205
RONEL V. VIDAL 2
Answer: 4
( )+ ( )= − 24 3 +3 2 22 − 7 − 1
( )− ( )= −4 −2 −5 −9
3
( ) ∗ ( ) = −3 + 6 − 20
( )
3
( )=∞−3 + 6 − 1.25
Answer: 4 3 2
Roots of ℎ( ) = 4 −3 −7 +2 +4
= 1.3730
= 1.0000
= −0.8115 ± 0.2642
3 2
Roots of ( ) = 2 +3 −2 +5
= −2.3681
= 0.4340 ± 0.9313
RONEL V. VIDAL 3
4. Use MATLAB and the Symbolic Math Toolbox to find the Laplace transform of the
following time functions:
3 2
a) ( ) =−3 2
b) ( ) = 10 cosh(5 )
−3
c) ( )=9 ( )+5
2
d) ( )=8 cos(4 + 45°)
−2
e) ( )=3 sin(4 + 60°)
b)
c)
RONEL V. VIDAL 4
d)
e)
Answer: 3 2
(a) The Laplace transform of ( ) = 2 is
12
( − 2)4
−3
(b) The Laplace transform of ( ) = 10 cosh(5 ) is
10( + 3)
( + 8)( − 2)
−3
(c) The Laplace transform of ( ) = 9 ( ) + 5 is
14 + 27
( + 3)
RONEL V. VIDAL 5
2
(d) The Laplace transform of ( ) = 8 cos(4 + 45°) is
3 2
8√2( − 12 − 48 + 64)
( 2 + 16)3
−2
(e) The Laplace transform of ( ) = 3 sin(4 + 60°) is
3(8 + 16 + 2√3 + 4 √3 − 12√3)
2
2( + 4 + 20)2
5. Obtain the partial fraction expansion and then use the result to find the inverse Laplace
transform for the following s – domain functions using MATLAB and the Symbolic Math
Toolbox.
). ( ) =
10
( + 2)( + 3) 2
3 +1
). ( ) =
2+2 +9
). ( ) =
( + 3)( + 6)
). ( )=
8( + 1)( + 3)
( + 2)( + 4)( + 6)2
5( + 2)
). ( )=
( 2 + 8 + 15)
RONEL V. VIDAL 6
MATLAB Commands and Computer Response:
a)
RONEL V. VIDAL 7
b)
RONEL V. VIDAL 8
c)
RONEL V. VIDAL 9
d)
RONEL V. VIDAL 10
e)
Answer: 10
+ − +
+3 +3 +2
RONEL V. VIDAL 11
3 +1
(b) The Partial Fraction Expansion of ( ) = 2 +2 +9 is
+
+ 1 − 2.8284 + 1 + 2.8284
−3.3333 13.3333
+
+6 +3
−6 −3
−3.3333 + 13.3333
8( +1)( +3)
3.25 15 3 0.25
− −
+6 + +6 +4 +2
−6 −4 −2
18.25 −3 − 0.25
5( +2)
RONEL V. VIDAL 12
6. Express as factors in the numerator divided by factors in the denominator the given transfer function, ( ) below.
4 3 2
+ 17 + 99 + 223 + 140
( )=
5 4 3 2
+ 32 + 363 + 2092 + 5052 + 4320
Answer: 4 3 2
+17 +99 +223 +140
RONEL V. VIDAL 13
7. Use MATLAB to generate the partial fraction expansion of the following function: 104( + 5)( + 70)
( )= 2 2
( + 45)( + 55)( + 7 + 110)( + 6 + 95)
Answer: 4
10 ( +5)( +70)
The Partial Fraction Expansion of ( ) = is
( +45)( +55)( 2+7 +110)( 2+6 +95)
−0.0018 0.0066 0.9513+ 0.0896 0.9513 − 0.0896 −1.0213 − 1349 −1.0213 + 1349 0.1353
RONEL V. VIDAL 14