Professional Documents
Culture Documents
Lecture – 7 Objectives
0
t
Then the discrete signals are processed by DSP, and the processed
signals are converted into analog signals using a reconstruction
operation (called DAC).
X a xa t e jt
dt X a F xa t e j 2Ft dt
xa t X a e d jt
xa t X a F e j 2Ft
dF
xn xa nTs
xn X a e xn X a f e j 2fn df
1 1
j n
d
2 2
Fs 2F0
x(n)
MATLAB
Examples
xG m xa mt
X Wx (6)
% Discrete-time signal
Fs = 5000; Ts = 1/Fs; n = -25:25;
x = exp(-1000*abs(n*Ts));
% Plotting
Subplot(2,1,1);
plot(t*1000, xa);
xlabel('time in ms','fontsize',15);
ylabel('x1(n)','fontsize', 15);
title('Discrete-time signal','fontsize', 15);
hold on
stem(n*Ts*1000,x);
gtext('Ts = 0.2 ms','fontsize',12);
hold off
Subplot(2,1,2);
plot(w/pi,X);
xlabel('Frequency in pi units','fontsize', 15);
ylabel('X1(w)','fontsize', 15);
title('Discrete-time Fourier transform','fontsize', 15);
% Plotting
subplot(2,1,1)
plot(t*1000, xa);
ylabel('x(n)','fontsize', 15);
title('Discrete-time signal','fontsize', 15);
hold on
stem(nTs*1000,xn);
hold off
subplot(2,1,2)
plot(t*1000, ya,'r');
xlabel('time in ms','fontsize',15);
ylabel('x_a(t) and y_a(t)','fontsize', 15);
title('Original & reconstructed signal','fontsize', 15);
hold on
plot(t*1000,xa);
% Plotting
subplot(2,1,1)
plot(t, xa);
ylabel('x(n)','fontsize', 15);
title('Discrete-time signal','fontsize', 15);
axis([-0.2 0.2 -1.5 1.5]);
hold on
stem(nTs,xn);
grid
hold off
subplot(2,1,2)
plot(t, ya,'r');
xlabel('time in ms','fontsize',15);
ylabel('x_a(t) and y_a(t)','fontsize', 15);
title('Original & reconstructed signal','fontsize', 15);
hold on
plot(t,xa);
grid
IUB Dr. Abdur Razzak 21
MATLAB problem prob3p22 (contd..) ECR305_L7
Dr. Abdur Razzak
DFT
&
FFT
IUB Dr. Abdur Razzak 24