0% found this document useful (0 votes)
108 views5 pages

Lab Report#2 - CS

This lab report summarizes tasks completed in Lab #2 on using MATLAB's Symbolic Math Toolbox. The tasks involved generating symbolic representations of various time-domain and Laplace-domain functions, taking Laplace transforms, and generating transfer functions. Specifically, it generated symbolic expressions for a time-domain function f(t), its Laplace transform F(s), took the inverse Laplace transform, and generated an LTI transfer function from the symbolic expressions. The last task of solving for loop currents in a circuit diagram is listed but no code or output is shown.

Uploaded by

Fahad Siddiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
108 views5 pages

Lab Report#2 - CS

This lab report summarizes tasks completed in Lab #2 on using MATLAB's Symbolic Math Toolbox. The tasks involved generating symbolic representations of various time-domain and Laplace-domain functions, taking Laplace transforms, and generating transfer functions. Specifically, it generated symbolic expressions for a time-domain function f(t), its Laplace transform F(s), took the inverse Laplace transform, and generated an LTI transfer function from the symbolic expressions. The last task of solving for loop currents in a circuit diagram is listed but no code or output is shown.

Uploaded by

Fahad Siddiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Lab Report# II

Course: Control Systems


Instructor: Sir. Hussain Asif
Submitted by: Muhammad Fahad Siddiq
ID:150271
Dated:6th October.2020

Department of Electrical Engineering


Faculty of Engineering
Air University, Islamabad

7|Page
Lab#02
Introduction to the Symbolic Math Toolbox

Lab Tasks
 Using MATLAB and Symbolic Math Toolbox to do following
task

Task#1: Generate symbolically the time function f(t).


f(t)=0.0075-0.00034e^-2.5tcos(22t) + 0.087e^-2.5t sin(22t)-0.0072e^-8t

Code Output
%Task 1
clear all
close all
clc

syms t ;
f= 0.0075-
[0.00034*exp(-
2.5*t)*cos(22*t)] +
[0.0087*exp(-
2.5*t)*sin(22*t)]-
0.0072*exp(-8*t)
pretty(f)

8|Page
Task#2: Generate symbolically F(s) in both factored and polynomial
form, F(s)=2(s+3) (s+3) (s+7)/s(s+8) (s^2+10s+100)
Code Output
%Task 2
clear all
close all
clc
syms s ;
num=(2)*(s+3)*(s+5)*(s+7);
pretty(num);
den=s*(s+8)*(s.^(2)+10*s+100);
pretty(den);
F=num/den
pretty(F)
c=collect(F,s)
pretty(c)

Task#3: Find Laplace Transform of f(t) where,


f(t)=0.0075-0.00034e^-2.5tcos(22t) + 0.087e^-2.5t sin(22t)-0.0072e^-8t
Code Output
%Task 3
clear all
close all
clc
t=sym ('t') ;
f= 0.0075-
(0.00034*exp(-
2.5*t)*cos(22*t))
+ (0.0087*exp(-
2.5*t)*sin(22*t))-
0.0072*exp(-8*t);
pretty(f)
lap=laplace(f)
pretty (lap)

9|Page
Task#4: Find Inverse Laplace transform of F(s) where,

F(s)=2(s+3) (s+3) (s+7)/s(s+8) (s^2+10s+100).


Code Output
%Task 4
clear all
close all
clc

syms s ;
num=(2)*(s+3)*(s+5)*(s+7);
den=s*(s+8)*(s.^(2)+10*s+100;
F=num/den
pretty(F)
ilap=ilaplace(F)
pretty(ilap)

Task#5: Generate an LTI transfer function for your symbolic


representation of F(s).
Code Output
%Task 5
clear all
close all
clc

syms s ;
num=(2)*(s+3)*(s+5)*
(s+7);
den=s*(s+8)*(s.^(2)
+10*s+100);
x=collect (num)
y=collect(den)

num1=sym2poly(x)
den1=sym2poly (y)
F=tf(num1,den1)

z=zpk(F)

10 | P a g e
Task#6: Solve for loop Currents in figure below.

Code Output

________________________

11 | P a g e

You might also like