Instructor: Chen-Hsiung Yang
Dynamic System Modeling Analysis and Control
動態系統建模分析與控制
Lecture4
Transfer-function Approach to
Modeling Dynamic Systems
Outline
4-1 Introduction
4-2 Block Diagrams
4-3 Partial-Fraction Expansion with MATLAB 4-4 Transient-Response Analysis with
MATLAB
3
4-1 Introduction
4
4-2 Block Diagrams
4-3 Partial-Fraction Expansion with MATLAB
If
MATLAB Command
1. T.F. T.F. → → Partial-Fraction Partial-Fraction
Type:
>>num=[1,8,16,9,6];
>>den=[1,6,11,6];
>>[r, p, k]=residue(num, den)
Display:
r=-6 -4 3
p=-3 -2 -1
k=1 2
2. Partial-Fraction Partial-Fraction → → T.F. T.F.
Type:
>>r=-6,-4,3
>>p=-3,-2,-1
>>k=1,2
>>[num, den]=residue(r, p, k)
Display:
num=1 8 16 9 6
den=1 6 11 6
5
Partialfraction
p(n) s
r(n) p(2)
s r(2) p(1)
s .K(s) r(1) 2
a(h) T.F.
a(2)s a(1)s
b(h) b(2)s
b(1)s den
.num 1
1 s
3 2 s
4 3 s 2 6 6 s
11s 6s
s
6 9s 16s 8s
s A(s) B(s)
1 n n
1 h h
2 3
2 3
4
4-3 Partial-Fraction Expansion with MATLAB(Cont.)
sol:
By MATLAB
we obtain
6
4-3 Partial-Fraction Expansion with MATLAB(Cont.)
sol:
By MATLAB
we obtain
7
4-4 Transient-Response Analysis with MATLAB
Basic Command:
Transfer function Transfer function :
>>sys=tf(num,den)
Time interval Time interval : >>t=0: Δt: T
MATLAB Command
1. 1. For For step response step response
Type:
>>num=[1,8,16,9,6];
>>den=[1,6,11,6];
>>sys=tf(num,den)
>>step(sys) or step(num,den)
>>y=step(sys) or [y,t]=step(sys,t)
2. 2. For For impulse response impulse response
Type:
>>num=[1,8,16,9,6];
>>den=[1,6,11,6];
>>sys=tf(num,den)
>>step(sys) or step(num,den)
>>y=step(sys) or [y,t]=step(sys,t)
8
4-4 Transient-Response
Analysis with MATLAB(Cont.)
Basic Command:
Transfer function Transfer function : >>sys=tf(num,den)
Time interval Time interval : >>t=0: Δt: T
MATLAB Command
3. For 3. For arbitary input arbitary input
Type:
>>num=[1,8,16,9,6];
>>den=[1,6,11,6];
>>sys=tf(num,den)
>>t=0:0.01:4;
>>u=t
>>lsim(sys,u,t)
<Note>: lsim(sys1,sys2,…,u,t)
4. 4. ramp response ramp response
Type:
>>num=[1,8,16,9,6];
>>den=[1,6,11,6];
>> sys=tf(num,den);
>> t=0:0.01:4;
>>u=t
>>lsim(sys, u, t)
9
10
4-4 Transient-Response
Analysis with MATLAB(Cont.)