Download presentation
1
Correlation and Spectral Analysis
Application 4
2
Review of covariance
3
Autocorrelation (Autocovariance)
4
Noise Power
5
Zero-Mean Gaussian Noise
6
Power Spectrum E{Pn(k)} = s2 = 1.12 = Rn(0)
7
Auto-correlation Rn(0) = s2 = 1.12 >> for j = 1:256,
R(j) = sum(n.*circshift(n',j-1)'); end
8
Window Selection: Hamming
y = filter(Hamming,1,n);
9
Hamming Filtered Power Spectrum
10
White Noise Auto-Covariance vs. Hamming Filtered Noise
11
Filtered Noiseimage = imnoise(I,’gaussian’,0,10); N_autocov = xcorr2(Noiseimage); figure;imagesc(N_autocov/(128*128));colormap(gray);axis('image') Image Noise Field Autocovariance
12
Unfiltered figure;imagesc(fftshift(abs(fft2(N_autocov/(128*128)))));colormap(gray);axis('image') Image Noise Field Power Spectrum
13
Filtered (wc = 0.6; order 20; Hamming Window)
N_autocov = xcorr2(Noiseimage_filtered); figure;imagesc(N_autocov/(128*128));colormap(gray);axis('image') Image Noise Field Autocovariance
14
Filtered (wc = 0.6; order 20; Hamming Window)
N_autocov = xcorr2(Noiseimage_filtered); figure;imagesc(N_autocov/(128*128));colormap(gray);axis('image') Image Noise Field Power Spectrum
15
fMRI Simulation
16
Windowing vs. Filtering
“Window” applied in temporal or spatial domain to reduce spectral leakage and ringing artifact Windows fall into a specialized set of functions generally used for spectral analysis “Filter” applied to reduce noise, i.e. noise matching, or to degrade or improve spatial resolution Some cross-over: one method of filter design is the “window” method which uses window functions for frequency space modulating functions.
17
Windowing vs. Filtering
Mathematically,
18
Filtering MP 574
19
Outline Review of FIR/IIR Filters Power Spectra
Z-transform Difference Equation Filter Design by Windowing Power Spectra Correlation and Convolution Example from Prof. Holden’s Notes Windowing and Spectral Estimation Weiner/Adaptive Filters Deconvolution
20
z-Transform as an Analysis Tool
Sampled version (discrete version) of the Laplace transform: z esT, where T is the sampling period. DFT and z-transform are related: z = eiwT where s eiwT
21
Laplace to z-Transform
Im(z) Non-causal signals iw s unit circle Re(z) ws Discrete FT Continuous FT
22
z-Transform and Linear Systems
Stated more generally: T{f(n)} f(n) g(n) h(n)
23
Difference Equation Implementation
Shift theorem of z-transform:
24
Difference Equation Implementation
Shift theorem of z-transform: FIR
25
FIR Coefficients and Impulse Response
FIR filter:
26
FIR vs. IIR filters Finite impulse response (FIR) implies a linear system that is always stable There are no poles Infinite impulse response (IIR) is only stable if poles are inside the unit circle or pole coincides with a zero.
27
IIR System Im(z) Zeros (o) at: -1, 2 Poles (x) at: 0.5±0.5j, 0.75
unit circle x Re(z) o x o x
28
IIR Stability
29
fvtool(B,A) B = [ ]; A=[ ]
30
fvtool(B,A)
31
fvtool(B,A)
32
Unstable B = [ ]; A=[ ]
33
Unstable B = [ ]; A=[ ]
34
Finite impulse response (FIR)
B = [ ]; A=[1]
35
Definition of Stability
36
FIR filter Design by Windowing
Simply truncate IIR filter Rectangular Window:
37
Matlab: fdatool
44
filter() in Matlab FILTER One-dimensional digital filter.
Y = FILTER(B,A,X) filters the data in vector X with the filter described by vectors A and B to create the filtered data Y. The filter is a "Direct Form II Transposed" implementation of the standard difference equation: a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) b(nb+1)*x(n-nb) - a(2)*y(n-1) a(na+1)*y(n-na)
45
Exporting Filter Coefficients
46
Extension to 2D Radial Transform Parks-McClellan Transformation
H(k)-> (H(k1)2+H(k2)2)1/2=T(k1,k2) See Matlab script on filter design using radial transformation to 2D: Filter Design Parks-McClellan Transformation Step 1: Translate specifications of H(w1,w2) to H(w) Step 2: Design 1D filter H(w) Step 3: Map to 2D frequency space cosw = - ½ + ½ cosw1 + ½ cosw2 + ½ cosw1 cosw2 = T(w1,w2) - Step 4: determine h(n1,n2) by 2D FT.
47
Hamming Window Example
48
Hamming Window Example
>> w1 = -pi:0.01:pi; >> w2 = -pi:0.01:pi; >> [W1,W2] = meshgrid(w1,w2); >> H_2d = *( *cos(W1)+0.5.*cos(W2)+0.5.*cos(W1).*cos(W2)); >>figure;mesh(H_2d) filter2()
49
2D FIR Filter Design, Parks-McClellan
50
“firdemo”
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.