Lab 2
Lab 2
(Lab)
Course Code: ME-317L
Lab # 2
Class: Fall-2019
MATLAB Help
Type doc ‘command’ or help ‘command’ for MATLAB
help.
Examples:
1- doc sqrt
2- help sqrt
Why Transfer Function..?
Physical systems are described with ordinary and partial differential
equations.
In addition to the differential equation, the transfer function is another
way of mathematically modeling a system.
Though transfer function can be used only for linear systems, it yields
more intuitive information than the differential equation. We will be able
to change system parameters and rapidly sense the effect of these changes
on the system response. The transfer function is also useful in modeling
the interconnection of subsystems by forming a block diagram but with a
mathematical function inside each block
Still another model is the state-space representation. One advantage of
state-space methods is that they can also be used for systems that cannot
be described by linear differential equations
Polynomial representation
Equation:
MATLAB Code:
P=[3 5 7 8]
‘Check’
Q=1
T=tf(P,Q)
Polynomial representation
Factored form can also be transformed into polynomial
form by using command ‘poly’.
Equation:
MATLAB Code:
P=poly([-5 -2 -6])
‘Check’
Q=1
T=tf(P,Q)
Roots of a Polynomial
Equation:
Code:
P=[1 3 2]
D=roots(P)
Equation:
Code:
P=[5 7 9 3 2]
D=roots(P)
Polynomial Multiplication
Equation:
P1=s3+7s2+10s+9
P2= s4-3s3+6s2+2s+1
Code:
P1=[1 7 10 9]
P2=[1 -3 6 2 1]
P3=conv(P1,P2)
Polynomial Multiplication
Equation:
(s+2)(s+4)(s2+2s+1)
Code:
P1=poly([-2 -4])
P2=[1 2 1]
T=conv(P1,P2)
T1=tf(T,1)
Transfer Function Method
Conversion of ODE to polynomial equation using Laplace Transform.
Partial Fraction
Equation:
Taking Laplace
transform
Cross
Multiplication
Partial Factors
Partial Fraction
Values of K
Final Form
Partial Fraction (MATLAB)
Using this equation
Assignment
Equations: