Professional Documents
Culture Documents
Abstract—Different types of mathematical operations like partial 3.PRINTSYS: Print system in pretty format and was used to print
fraction expansion, simplification, pole-zero determination, state space systems with labels to the right and above the system
Laplace transform, inverse Laplace transform, state-space model matrices or to print transfer functions as a ratio of two polynomials.
generation etc are performed in this experiment. PRINTSYS(NUM,DEN,'s') or PRINTSYS(NUM,DEN,'z') prints the
transfer function as a ratio of two polynomials in the transform
Keywords- simplification, determination, laplace transform, inverse variable 's' or 'z'
Laplace transform. .
4.FEEDBACK: Feedback connection of two LTI models.
I. Introduction
SYS = FEEDBACK(SYS1,SYS2) computes an LTI model SYS for
Designers are allowed to perform complicated mathematical the closed-loop feedback system
calculations in fast and efficient manner in MATLAB. Partial
fraction expansion, simplification, pole-zero determination,
Laplace transform, inverse Laplace transform, state-space
model generation are some of the mathematical operation that
can be very easily performed in MATLAB.
Negative feedback is assumed and the resulting system SYS maps u
II. Theory and Methodology to y. To apply positive feedback, use the syntax:
SYS = FEEDBACK(SYS1,SYS2,+1).
1. ROW matrix/ row vector was defined to express Laplace transform
expressions. Variable coefficients were defined in left to right 5.STEP: Step response of LTI models
descending power of ‘s’ format. For example, deng=[500 0 0] [Y,T] = STEP(SYS) returns the output response Y and the time
vector T used for simulation. No plot is drawn on the screen.
2. SERIES: Series is the interconnection of the two Linear Time If SYS has NY outputs and NU inputs, and LT = length(T), Y is an
Invariant models. array of size [LT NY NU] where Y(:,:,j) gives the step response of
the j-th input channel.
[Y,T,X] = STEP(SYS) also returns, for a state-space model SYS, the
state trajectory X, a LT-by-NX-by-NU array if SYS has NX states.
f=
%Transfer functionnum=[1]
2*exp(-t) - 2*exp(-2*t) - 2*t*exp(-2*t)
2 exp(-t) - exp(-2 t) 2 - t exp(-2 t) 2
den=[500 0 0]
Code:6(ii)
tf(num,den) syms s;
F2=3/[s*(s^2+2*s+5)]
pretty(F2)
result: f=ilaplace(F2)
pretty(f)
num = 1 ans:
F2 =
den = 500 0 0 3/(s*(s^2 + 2*s + 5))
3
----------------
ans = 2
s (s + 2 s + 5)
1 f=
3/5 - (3*exp(-t)*(cos(2*t) + sin(2*t)/2))/5
------- / sin(2 t) \
exp(-t) | cos(2 t) + -------- | 3
3\2/
500 s^2
- - --------------------------------- [2] AIUB Lab manual
55
Code:7
%laplace
syms t;
f=2*exp(-t)-2*t*exp(-2*t)-2*exp(-2*t)
pretty(f)
F=laplace(f)
pretty(F)
simplify(F)
ans:
f=
2*exp(-t) - 2*exp(-2*t) - 2*t*exp(-2*t)
2 exp(-t) - exp(-2 t) 2 - t exp(-2 t) 2
F=
2/(s + 1) - 2/(s + 2) - 2/(s + 2)^2
222
----- - ----- - --------
s+1s+22
(s + 2)
ans =
2/((s + 1)*(s + 2)^2)
Code:8
%converting from tf to ss
num=[2 8 6]
den=[1 8 18 6]
[A,B,C,D]=tf2ss(num,den)
ans:
num = 2 8 6
den = 1 8 18 6
A = -8 -18 -6
100
010
B=1
0
0
C=286
D=0
VI. Result
T =0 2 8 6
ans =
From input 1 to output: 0
From input 2 to output:2
From input 3 to output: 8
From input 4 to output:6
Static gain.
VII. Discussion
Matlab syntaxes were used correctly. All Matlab functions were
used correctly and checked.
VIII. Conclusion
All Matlab output data were exactly same as practically obtained
data.
Reference(s)
[1]https://www.mathworks.com/help/matlab/ref/ss2tf.html#buh8h8y-
2Z[Last accessed on Date: 22.10.2017 Time: 12.28 AM]