1 DSP
1 DSP
w=[-4*pi:0.01:4*pi];
M=5;
H=1/(M+1) * exp(-j*w*M/2) .* sin(w*(M+1)/2) ./ (sin(w/2)+eps);
subplot(211); plot(w/pi,abs(H));subplot(212); plot(w/pi,angle(H)/pi)
d=1/3;
n=[-50:50];
h=sin(pi*(n-d))./(pi*(n-d));
stem(n,h);
04-z-Transform Page 29
z-Transform Pairs & Properties
Thursday, February 04, 2021 4:34 PM
04-z-Transform Page 30
Transfer Functions
Thursday, February 04, 2021 5:06 PM
04-z-Transform Page 31
Inverting the z-Transform
Thursday, February 04, 2021 5:53 PM
04-z-Transform Page 32
Partial Fraction example
Thursday, February 04, 2021 6:13 PM
04-z-Transform Page 33
Sampling
Saturday, February 13, 2021 12:39 PM
05-Sampling Page 34
Nyquist
Saturday, February 13, 2021 12:39 PM
05-Sampling Page 35
Sampling Theory
Saturday, February 13, 2021 12:39 PM
05-Sampling Page 36
Copies in Frequency
Monday, February 15, 2021 10:10 AM
05-Sampling Page 37
Reconstruction
Monday, February 15, 2021 3:23 PM
05-Sampling Page 38
Interpolation
Monday, February 15, 2021 3:23 PM
05-Sampling Page 39
Resampling
Monday, February 15, 2021 3:23 PM
05-Sampling Page 40
Sample Rate Conversion
Monday, February 15, 2021 3:50 PM
05-Sampling Page 41
Quantization
Friday, February 19, 2021 8:50 AM
05-Sampling Page 42
Quantization Example
Friday, February 19, 2021 9:15 AM
05-Sampling Page 68
Quantization SNR
Friday, February 19, 2021 9:28 AM
05-Sampling Page 44
Linear Phase
Friday, February 19, 2021 10:45 AM
a=0.8*exp(j*pi/3)
A=[1 -a]; B=[-a' 1];
w=0:0.01:pi;
H=freqz(B,A,w);
subplot(211); plot(w/pi,abs(H));grid on;axis([0 1 0 1.1])
subplot(212); plot(w/pi,unwrap(angle(H)));grid on;
xlabel('normalized frequency')
07-DFT Page 63
The DFT as a Basis Expansion
Friday, March 05, 2021 9:47 AM
07-DFT Page 64
DFT Periodicity
Friday, March 05, 2021 10:15 AM
07-DFT Page 65
Sampling the DTFT
Friday, March 05, 2021 10:36 AM
07-DFT Page 66
Zero Padding
Friday, March 05, 2021 11:18 AM
x=[1:4,3:-1:1];
X=fft(x,1024);
X7=fft(x);
figure(1); clf
subplot(211)
stem([0:6],x)
axis([-1 10 -0.2 5])
xlabel('n');
ylabel('x[n]');
subplot(212)
plot([0:1023]/1024,abs(X));hold on;
stem([0:6]/7,abs(X7),'r')
xlabel('\omega/(2\pi)','Interpreter','TeX')
%%
X14=fft(x,14);
figure(2); clf
subplot(211)
stem([0:6],x)
axis([0 14 -0.2 5])
xlabel('n');
ylabel('x[n]');
subplot(212)
plot([0:1023]/1024,abs(X));hold on;
stem([0:13]/14,abs(X14),'r')
xlabel('\omega/(2\pi)','Interpreter','TeX')
07-DFT Page 67
DFT Properties
Friday, March 05, 2021 12:01 PM
07-DFT Page 68
Fast Fourier Transform
Friday, March 05, 2021 12:39 PM
07-DFT Page 69
FFT Butterflies
Friday, March 05, 2021 12:53 PM
07-DFT Page 70
FFT Computation
Friday, March 05, 2021 1:09 PM
07-DFT Page 71
Tracing the FFT Computations
Friday, March 05, 2021 1:28 PM
07-DFT Page 72
FFT-based Convolution
Saturday, March 13, 2021 8:33 AM
x=[1 2 3 4 5 6 7 6 5 4 3 2 1];
h=[1 2 2 2 1];
y=conv(x,h);
N=length(x)+length(h)-1;
ydft=ifft(fft(x,length(x)).*fft(h,length(x)));
ydft2=ifft(fft(x,N).*fft(h,N));
figure(1);clf
subplot(411);
stem(0:length(x)-1,x);
ylabel('x[n]')
axis([-1 length(x) -0.1 max(x)+1])
subplot(412);
stem(0:length(h)-1,h);
ylabel('h[n]')
axis([-1 length(x) -0.1 max(x)+1])
subplot(4,1,[3 4]);
stem(0:length(y)-1,y,'b'); hold on
stem(0:length(ydft)-1,ydft,'r');
stem(0:length(ydft2)-1,ydft2,'k:');
x1=[randn(2,1000)];
A=[10 1;-10 1];
x=A*x1;
xapprox = W*g+m;
figure(1);
plot(x(1,:),x(2,:),'*',xapprox(1,:),xapprox(2,:),'r+')
axis equal
z=A*z;
zm=z-m;
gz = W'*zm;
zapprox = W*gz+m;
figure(2);
plot(z(1,:),z(2,:),'*',zapprox(1,:),zapprox(2,:),'r+')
axis equal