0% found this document useful (0 votes)
58 views

DSP Lab Expt 3 EECE GITAM-19-23

The document describes the frequency domain representation of linear time-invariant (LTI) systems. It explains that the response of an LTI system to a complex exponential input is the input multiplied by the system's frequency response at that frequency. This allows representing LTI systems using their frequency response function H(e^jw). The magnitude and phase responses are also introduced. Examples are provided to calculate frequency responses and plot magnitude and phase responses for different systems.

Uploaded by

gowri thumbur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views

DSP Lab Expt 3 EECE GITAM-19-23

The document describes the frequency domain representation of linear time-invariant (LTI) systems. It explains that the response of an LTI system to a complex exponential input is the input multiplied by the system's frequency response at that frequency. This allows representing LTI systems using their frequency response function H(e^jw). The magnitude and phase responses are also introduced. Examples are provided to calculate frequency responses and plot magnitude and phase responses for different systems.

Uploaded by

gowri thumbur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

19

Exp.No:3 The frequency domain representation of LTI systems.


Aim: To investigate the frequency response of a Linear Time
Invariant system.
Software: MATLAB.

i) Response to a complex exponential 𝑒 𝑗𝜔0 𝑛


Let 𝑥(𝑛) = 𝑒𝑗𝜔0𝑛 be the input to an LTI system characterized
by the impulse response ℎ(𝑛)

Then

Then from the above, we can represent the system by

Hence the output sequence is the input exponential sequence


modified by the response of the system at frequency 𝜔0 .
This justifies the definition of 𝐻(𝑒 𝑗𝜔 ) as a frequency
response because it is what the complex exponential is
multiplied by to obtain the output 𝑦(𝑛). This powerful
result can be extended to a linear combination of complex
exponentials using the linearity of LTI systems.

In general, the frequency response 𝐻(𝑒 𝑗𝜔 ) is a complex


function of 𝜔.
The magnitude |𝐻(𝑒 𝑗𝜔 )| of 𝐻(𝑒 𝑗𝜔 ) is called the magnitude (or
gain) response function, and the angle ∠𝐻(𝑒 𝑗𝜔 ) is called
the phase response function.
20

Response to sinusoidal sequences:

Response to arbitrary sequences:


An LTI system can be represented in the frequency domain
by

The output y(n) is then computed from 𝑌(𝑒 𝑗𝜔 ) using the


inverse discrete-time Fourier transform.

As an example, determine the frequency response 𝐻(𝑒 𝑗𝜔 ) of a


system characterized by ℎ(𝑛) = 0.9𝑛 𝑢(𝑛). Plot the magnitude
and the phase responses.

w = [0:1:500]*pi/500; % [0, pi] axis divided into 501


points.
H = exp(j*w) ./ (exp(j*w) - 0.9*ones(1,501));
magH = abs(H); angH = angle(H);
subplot(2,1,1); plot(w/pi,magH); grid on;
xlabel('frequency in \pi units'); ylabel('|H|');
title('Magnitude Response');
subplot(2,1,2); plot(w/pi,angH/pi); grid
xlabel('frequency in \pi units');
ylabel('Phase in \pi Radians');
title('Phase Respons');
21

Observation:

Ex2: An LTI system is specified by the difference equation

𝒚(𝒏) = 𝟎. 𝟖𝒚(𝒏 − 𝟏) + 𝒙(𝒏)


a) Determine 𝐻(𝑒 𝑗𝜔 ).
b) Calculate and plot the steady-state response 𝑦𝑠𝑠 (𝑛) to 𝑥(𝑛) =
cos(0.05𝜋𝑛) 𝑢(𝑛).

clearvars
close all
subplot(1,1,1)
b = 1; a = [1,-0.8];
n=[0:100];x = cos(0.05*pi*n);
y = filter(b,a,x);
subplot(2,1,1); stem(n,x);
xlabel('n'); ylabel('x(n)');
title('Input sequence')
subplot(2,1,2); stem(n,y,'Color','red');
xlabel('n'); ylabel('y(n)'); title('Output sequence');
22

Observation:

From the plots in Figure, we note that the amplitude of


𝑦𝑠𝑠 (𝑛) is approximately 4. To determine the shift in the
output sinusoid, we can compare zero crossings of the input
and the output. This is shown in Figure, from which the
shift is approximately 3.4 samples.

Ex 3: A 3rd-order lowpass filter is described by the


difference equation
y(n) = 0.0181x(n)+0.0543x(n−1)+0.0543x(n−2)+0.0181x(n − 3)
+1.76y(n−1)−1.1829y(n−2)+0.2781y(n−3).
Plot the magnitude and the phase response of this filter,
and verify that it is a low pass filter.

clearvars
close all
b = [0.0181, 0.0543, 0.0543, 0.0181]; % filter
coefficient array b
a = [1.0000, -1.7600, 1.1829, -0.2781]; % filter
coefficient array a
m = 0:length(b)-1; l = 0:length(a)-1; % index arrays m
and l
23

K = 500; k = 0:1:K; % index array k for frequencies


w = pi*k/K; % [0, pi] axis divided into 501 points.
num = b * exp(-j*m'*w); % Numerator calculations
den = a * exp(-j*l'*w); % Denominator calculations
H = num ./ den; % Frequency response
magH = abs(H); angH = angle(H); % mag and phase responses

subplot(2,1,1); plot(w/pi,magH,'LineWidth',2); grid;


axis([0,1,0,1])
xlabel('frequency in \pi units'); ylabel('|H|');
title('Magnitude Response');
subplot(2,1,2);
plot(w/pi,angH/pi,'LineWidth',2,'Color','red'); grid
xlabel('frequency in \pi units');
ylabel('Phase in \pi Radians');
title('Phase Response');

Observation:

Conclusion:

You might also like