0% found this document useful (0 votes)
2 views2 pages

Week5

The document outlines methods for finding the Zero-State Response (ZSR) of differential equations using MATLAB, including direct solving with 'ode23' and using impulse response through convolution. It provides specific examples and exercises for computing responses to given differential equations with various inputs. Additionally, it emphasizes the importance of manual calculations before using MATLAB for a comprehensive understanding of the concepts.

Uploaded by

toshith.241ee159
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)
2 views2 pages

Week5

The document outlines methods for finding the Zero-State Response (ZSR) of differential equations using MATLAB, including direct solving with 'ode23' and using impulse response through convolution. It provides specific examples and exercises for computing responses to given differential equations with various inputs. Additionally, it emphasizes the importance of manual calculations before using MATLAB for a comprehensive understanding of the concepts.

Uploaded by

toshith.241ee159
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

Week-5 (Time Domain Analysis) –ZSR

Finding Zero – State Response:


• METHOD 1: Use the “ode23” function in MATLAB to directly solve the Differential Equation
(DE), obtaining the solution in array form.
Here, only the forcing function x(t) is considered by setting the initial conditions to zero and the
procedure is carried out as explained for the Zero-Input Response (ZIR).
For the given example differential equation, (D2+4D+3) y(t) = (3D+5) x(t) and the input x(t) = 2t+3,
manually compute Q(D) x(t) as: (3D+5) {x(t)} = 3D{(0.2t+0.2)} + 5 {(0.2t+0.2)} = t+1.6.
Then, include these terms in the set of differential equation (1) and (2a) (See-Week 4-ZIR) as:
Dy1(t) = y2(t) ---- (1) and Dy2(t) = ̶ 4y2(t) – 3y1(t) +t+1.6---- (2)
• METHOD 2 : Using Impulse Response in symbolic form of the differential equation – by
convolution method. (i.e. using Graphical Convolution Method)
Manually compute the impulse response for the DE, and use it as convolution of two signals:
Convolve the two signals h(t) = (e-3t + e-t)u(t) and x(t) = (0.2t+0.2)u(t)
MATLAB code:
x=inline('(0.2*t+0.2).*(t>=0)','t')
h=inline('(exp(-t)+2*exp(-3*t)).*(t>=0)','t')
tvec = –0.25:.01:5; %defines time range for the output presentation (lower and upper value depend
on width property of convolution, accounting the causality of both the signals)
dtau = 0.05; %defines an incremental value for the convolution
tau= –3.5:dtau:5; %defines the integrating ranges for the convolution (tau axis, lower value selected
for better visibility)
%maximum allowed lower limit value of tau is depend on the causality of x(t) OR may be same as tvec
%minimum allowed upper limit value of tau is depend on the causality of h(t) OR everlasting nature.
%If the signal h(t) has the non-zero value for t ≥ –m, then the minimum value chosen depends on the
value chosen for the upper value of tvec. That is at least tvec+m.
ti= 0; %initialising the index counter, i.e. pointer to the solution to DE for y(t)
y=NaN*zeros(1,length(tvec)); %NAN is not a number (no value is defined as o/p)
for t = tvec, % Start of loop for convolution, here t is scalar value varies in loop
ti=ti+1; % incrementing the counter pointer for the solution to DE in y
xh= x(tau).* h(t–tau); % Multiplication of two signals
y(ti) = sum(xh.*dtau); % Integration part, i.e. computes output y(t) and stores in an index “ti”
figure; subplot(2,1,1), plot(tau,x(tau),'r_',tau,h(t-tau),'m-',t,0,'ro');
% This window is for the display of the overlap ranges of two signals in “tau” axis.
%axis([tau(1) tau(end) –0.2 5.1]); % optional axis range for “tau” axis
subplot(2,1,2), plot(tvec,y,'b_',tvec(ti),y(ti),'ro'); % This window is for the display of output in tvec axis
%axis([tvec(1) tvec(end) –0.2 5.1]); % optional axis range for “tvec” axis
drawnow; pause;
end
figure; plot(tvec,y) % output is sketched in new window

1|Page
Finding Total Response:
Here, consider the given boundary conditions (initial conditions) along with input x(t) by manually
computing Q(D) x(t) and solve using “ode23” to get the total response in array form.
Exercises

1. Following are the Differential Equations (DE) of the LTIC system,


a) D(D+1)y(t) = (D+2)x(t) and the input x(t) = u(t) OR x(t) = e-2tu(t).
b) (D2+9)y(t) = (3D+2)x(t) and the input x(t) = u(t) OR sin(3t)u(t) and sin(2.9t)u(t), .
c) (D2+D+13)y(t) = 4(D+2)x(t) and the input x(t) = e-0.5t sin(3.5707t)u(t)
-0.5t
OR e sin(3.5t)u(t)
d) D2+1.5D+0.5625)y(t) = 4(D+2)x(t) and the input x(t) = e-0.75tu(t) OR e-tu(t)
i. Find manually the zero state response {ys(t)}.
ii. Using “ODE23” function in MATLAB get ys(t) in array form and sketch the same.
iii. Using “graphical convolution procedure”, in MATLAB, get ys(t) in array form and sketch the
same.
iv. Identify the, characteristic modes in the total response of the system.
v. Give comments on which class of signal model the output response belongs to.
vi. Find the steady state values.
vii. Find the approximate time taken by the output response to reach steady value.
viii. Find the period of oscillation of output response (if applicable).
2. Find manually the total response of a systems specified by the DEs, of exercise 1) given initial
conditions: y(0–) = 2, (0–) = ̶ 3. Use “ODE23” function in MATLAB to solve the unit impulse
response for these DEs.
3. Try using “dsolve” function to solve the Differential Equations in symbolic form.
NOTE: Solve all of the above Differential Equations manually (i.e. hand calculation) before
entering the lab. Weightage is mainly based on the how well you prepare and come.

2|Page

You might also like