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

Cod 3

The document describes the implementation of impulse invariance in digital signal processing, including the calculation of the digital impulse response and its visualization. It also presents a pole-zero map in the z-plane and demonstrates discrete convolution with two sampled input signals. Finally, the results are visualized through subplots comparing the original and convolved signals.

Uploaded by

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

Cod 3

The document describes the implementation of impulse invariance in digital signal processing, including the calculation of the digital impulse response and its visualization. It also presents a pole-zero map in the z-plane and demonstrates discrete convolution with two sampled input signals. Finally, the results are visualized through subplots comparing the original and convolved signals.

Uploaded by

habtshtilahun23
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

%% Impulse invariance

alpha = exp(-1000 * T);

h_n = 1000 * (alpha.^n);

% Plotting Digital Impulse Response

figure

stem(n, h_n, 'filled')

xlabel('n')

ylabel('h[n]')

title('Digital Impulse Response')

%% Pole-Zero Map (z-plane)

figure

plot(alpha, 0, 'x', 'MarkerSize', 10, 'LineWidth', 2)

xlabel('Re\{z\}')

ylabel('Im\{z\}')

title('Digital Pole-Zero Map')

grid on

%% Sampled inputs

x1n = cos(2*pi*100*td) + cos(2*pi*500*td);

x2n = 2 * exp(-2*td);

%% Discrete convolution

y1n = conv(x1n, h_n, 'same');

y2n = conv(x2n, h_n, 'same');

%% Visualization of Results
figure

% Subplot 1: Periodic Signal

subplot(2,1,1)

stem(n, x1n, 'filled'); hold on

stem(n, y1n, 'r', 'filled')

legend('x_1[n]', 'y_1[n]')

title('Discrete Periodic Signal')

% Subplot 2: Exponential Signal

subplot(2,1,2)

stem(n, x2n, 'filled'); hold on

stem(n, y2n, 'r', 'filled')

legend('x_2[n]', 'y_2[n]')

title('Discrete Exponential Signal')

You might also like