Death_AngeL
Banned
- Katılım
- 27 Haz 2005
- Mesajlar
- 602
- Reaction score
- 0
- Puanları
- 0
% MATLAB Implementations
% A. Partial Expansion
% ex: F(s)= (6*s + 3) /(s * s)
num = [0 6 3];
den = [1 0 0];
num
% num =
%
% 0 6 3
den
%den =
%
% 1 0 0
[r p k] = residue(num, den);
% r will be r= [6 3 ]'
% p will be p= [0 0 ]'
% k= []
% that means we have, F(s) = (6 / s) + ( 3 / s^2) + 0
% note that repetition of poles increases the degree by one
% Note that the inverse is f(t) = 6*u(t) + 3 * t, for t >= 0
% Now check this with following matlab function of taking inverse.
% B. LAPLACE and INVERSE LAPLACE TRANSFORMS:
syms s t;
F = ((6 / s) + ( 3 / s^2));
f = ilaplace(F)
% will return
% f =
%
% 6+3*t
% Now take the laplace to check the partial expansion..
laplace(f)
% returns :
% ans =
%
% 6/s+3/s^2
% C: TRANSIENT RESPONSE
% We will investigate transient analysis
% a. impulse respone
% given function H(s) = (1/ (s^2 + 0.2 * s + 1))
% find its impulse response
num= [0 0 1]
den = [1 0.2 1]
impulse(num, den)
[y, x, t ] = impulse(num, den)
T = [0:0.5:30]
figure ;
% Check Figure 1.
% a. impulse respone
[y, x, t ] = step(num, den, T)
% Check Figure 2.
% Try impulse and step response of
% H(s) = 25 / s^2 + 4*s + 25 and observe the difference analytically.
% A. Partial Expansion
% ex: F(s)= (6*s + 3) /(s * s)
num = [0 6 3];
den = [1 0 0];
num
% num =
%
% 0 6 3
den
%den =
%
% 1 0 0
[r p k] = residue(num, den);
% r will be r= [6 3 ]'
% p will be p= [0 0 ]'
% k= []
% that means we have, F(s) = (6 / s) + ( 3 / s^2) + 0
% note that repetition of poles increases the degree by one
% Note that the inverse is f(t) = 6*u(t) + 3 * t, for t >= 0
% Now check this with following matlab function of taking inverse.
% B. LAPLACE and INVERSE LAPLACE TRANSFORMS:
syms s t;
F = ((6 / s) + ( 3 / s^2));
f = ilaplace(F)
% will return
% f =
%
% 6+3*t
% Now take the laplace to check the partial expansion..
laplace(f)
% returns :
% ans =
%
% 6/s+3/s^2
% C: TRANSIENT RESPONSE
% We will investigate transient analysis
% a. impulse respone
% given function H(s) = (1/ (s^2 + 0.2 * s + 1))
% find its impulse response
num= [0 0 1]
den = [1 0.2 1]
impulse(num, den)
[y, x, t ] = impulse(num, den)
T = [0:0.5:30]
figure ;
% Check Figure 1.
% a. impulse respone
[y, x, t ] = step(num, den, T)
% Check Figure 2.
% Try impulse and step response of
% H(s) = 25 / s^2 + 4*s + 25 and observe the difference analytically.