110 likes | 132 Views
動態系統建模分析與控制. Lecture4 Transfer-function Approach to Modeling Dynamic Systems. Instructor: Chen-Hsiung Yang. Dynamic System Modeling Analysis and Control. Outline. 4-1 Introduction 4-2 Block Diagrams 4-3 Partial-Fraction Expansion with MATLAB 4-4 Transient-Response Analysis with MATLAB.
E N D
動態系統建模分析與控制 Lecture4Transfer-function Approach to Modeling Dynamic Systems Instructor: Chen-Hsiung Yang Dynamic System Modeling Analysis and Control
Outline 4-1 Introduction 4-2 Block Diagrams 4-3 Partial-Fraction Expansion with MATLAB 4-4 Transient-Response Analysis with MATLAB
4-3 Partial-Fraction Expansion with MATLAB • If • MATLAB Command • 1. T.F. → 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 → 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
4-3 Partial-Fraction Expansion with MATLAB(Cont.) sol: By MATLAB we obtain
4-3 Partial-Fraction Expansion with MATLAB(Cont.) sol: By MATLAB we obtain
4-4 Transient-Response Analysis with MATLAB • Basic Command: • Transfer function:>>sys=tf(num,den) • Time interval:>>t=0: Δt: T • MATLAB Command • 1. Forstep 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. Forimpulse 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)
4-4 Transient-Response Analysis with MATLAB(Cont.) • Basic Command: • Transfer function:>>sys=tf(num,den) • Time interval:>>t=0: Δt: T • MATLAB Command • 3. Forarbitary 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. 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)
4-4 Transient-Response Analysis with MATLAB(Cont.) sol: By MATLAB