Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

Index:

• Example – 1 block diagram reduction


• Example – 2 laplace transform
• Example – 3 partial fraction
• Example – 4 time domain specifications (transient response analysis)
• Example – 5 bode plot
• Example – 6 root locus plot
• Example – 7 nyquist plot
• Example – 8 nicholas plot
• Example – 9 types of signal responses
Example - 1
Block diagram reduction:
clc
clear all

num1=[1 2];
den1=[3 1 0];
G1=tf(num1,den1);
G2=tf([2],[1 7]);
G3=tf([1 5],[1 6 3]);
G4=tf([1],[1 0]);

T1=parallel(G1,G2);
T2=series(T1,G3);
T=feedback(T2,G4,-1)
Example - 2 - Laplace Transforms
clc
clear all

syms t n a b;

%% example-1
disp('(a) laplace of t is:');
laplace(t)

%% example-2
disp('(b) laplace of t^2 is:');
laplace(t^2)
%% example-3
disp('(c) laplace of t^3 is:');
laplace(t^3)

%% example-4
disp('(d) laplace of t^n is:');
laplace(t^n)

%% example-5
disp('(e) laplace of exp(a*t) is:');
laplace(exp(a*t))

%% example-6
disp('(f) laplace of t*exp(a*t) is:');
laplace(t*exp(a*t))
%% example-7
disp('(g) laplace of t^2*exp(a*t) is:');
laplace(t^2*exp(a*t))

%% example-8
disp('(h) laplace of t^n*exp(a*t) is:');
laplace(t^n*exp(a*t))

%% example-9
disp('(i) laplace of cos(a*t) is:');
laplace(cos(a*t))

%% example-10
disp('(j) laplace of sin(a*t) is:');
laplace(sin(a*t))
%% example-11
disp('(k) laplace of t*cos(a*t) is:');
laplace(t*cos(a*t))

%% example-12
disp('(l) laplace of t*sin(a*t) is:');
laplace(t*sin(a*t))

%% example-13
disp('(m) laplace of t^2*cos(a*t) is:');
laplace(t^2*cos(a*t))

%% example-14
disp('(n) laplace of t^2*sin(a*t) is:');
laplace(t^2*sin(a*t))
%% example-15
disp('(o) laplace of exp(a*t)*cos(b*t) is:');
laplace(exp(a*t)*cos(b*t))

%% example-16
disp('(p) laplace of exp(a*t)*sin(b*t) is:');
laplace(exp(a*t)*cos(b*t))

%% example-17
disp('(q) laplace of cosh(a*t) is:');
laplace(cosh(a*t))

%% example-18
disp('(r) laplace of sinh(a*t) is:');
laplace(sinh(a*t))
%% example-19
disp('(s) laplace of t*cosh(a*t) is:');
laplace(t*cosh(a*t))

%% example-20
disp('(t) laplace of t*sinh(a*t) is:');
laplace(t*sinh(a*t))

NOTE:
Use ‘ilaplace’ keyword to take inverse laplace transform

NOTE:
n!=Γ(n+1)
Example – 3

clc
clear all

num=conv([8 8],[1 3]);


den=conv([1 6 8],[1 12 36]);
[r,p,k]=residue(num,den)
Result:
r =
3.2500
15.0000
-3.0000
-0.2500

p =
-6.0000
-6.0000
-4.0000
-2.0000

k =
[]
From the MATLAB result, the output expression can be written as,
Example – 4 – Time Domain Specifications

1) Peak time
2) Peak overshoot
3) Rise time
4) Settling time
>> num=130;
>> den=[1 15 130];
>> T=tf(num,den)

T =

130
----------------
s^2 + 15 s + 130

Continuous-time transfer function.


>> omega_n=sqrt(den(3))

omega_n =
11.4018

>> zeta=den(2)/(2*omega_n)

zeta =
0.6578

>> ts=4/(zeta*omega_n)

ts =
0.5333
>> tp=pi/(omega_n*sqrt(1-zeta^2))

tp =
0.3658

>> tr=(1.76*zeta^3-0.417*zeta^2+1.039*zeta+1)
/omega_n

tr =
0.1758
>> mp=100*exp(-zeta*pi/sqrt(1-zeta^2))

mp =
6.4335

>> step(T)
Method-2
>> sys = tf([130],[1 15 130]);
>> % default 2% settling time
>> % default 10% to 90% rise time
>> s = stepinfo(sys)

s =
RiseTime: 0.1758
SettlingTime: 0.5272
SettlingMin: 0.9037
SettlingMax: 1.0643
Overshoot: 6.4307
Undershoot: 0
Peak: 1.0643
PeakTime: 0.3684
Example – 5 – Bode Plot
Create bode plot of the dynamic system.

>> h=tf([0 0.1 7.5],[1 0.12 9 0 0])


h =
0.1 s + 7.5
----------------------
s^4 + 0.12 s^3 + 9 s^2
Continuous-time transfer function.

>> bode(h)
Example – 6 – Root locus plot
Create root locus plot of the dynamic system.

>> h=tf([0 0.1 7.5],[1 0.12 9 0 0])


h =
0.1 s + 7.5
----------------------
s^4 + 0.12 s^3 + 9 s^2
Continuous-time transfer function.

>> rlocus(h)
Example – 7 – Nyquist plot
Create nyquist plot of the dynamic system.

>> h=tf([0 0.1 7.5],[1 0.12 9 0 0])


h =
0.1 s + 7.5
----------------------
s^4 + 0.12 s^3 + 9 s^2
Continuous-time transfer function.

>> nyquist(h)
Example – 8 – Nicholas plot
Create nicholas plot of the dynamic system.

>> h=tf([0 0.1 7.5],[1 0.12 9 0 0])


h =
0.1 s + 7.5
----------------------
s^4 + 0.12 s^3 + 9 s^2
Continuous-time transfer function.

>> nichols(h)
Example – 9 – Types of signal responses
i) Step response

>> h=tf([0 0.1 7.5],[1 0.12 9 0 0])


h =
0.1 s + 7.5
----------------------
s^4 + 0.12 s^3 + 9 s^2
Continuous-time transfer function.

>> step(h)
i) Impulse response

>> h=tf([0 0.1 7.5],[1 0.12 9 0 0])


h =
0.1 s + 7.5
----------------------
s^4 + 0.12 s^3 + 9 s^2
Continuous-time transfer function.

>> impulse(h)

You might also like