Download presentation
Presentation is loading. Please wait.
1
Speech Signal Processing
Problem 1 Speech Signal Processing
2
Solution Filter length estimation: from transition band width
β π 1 = π π π‘ππ β π πππ π π π πππ π= 3.3 βπ We select N = 25 for the number of filter coefficients and using the Hamming window method. we next obtain from the transition band central frequency π π = π πππ π +π π‘ππ 2 The normalized lower and upper cutoff frequencies are calculated as: and π=2 π+1=25 π=12
3
Design using MATLAB
5
w : Window coefficients
h: filter transfer function coefficients b: filter coefficients
7
Filter Coefficients
9
Original speech and processed speech using the band-pass filter.
The band-pass frequency components contain a small portion of speech energy
10
Spectral comparison of the original speech and processed speech using the ban-dpass filter.
low and high frequencies are removed by the band-pass filter. Low scale amplitude
11
Problem 2 1. Calculate the filter coefficients for a 5-tap FIR band-pass filter with a lower cutoff frequency of 1,000 Hz and an upper cutoff frequency of 1,500 Hz and a sampling rate of 5,000 Hz. 2. Determine the transfer function and plot the frequency responses with MATLAB. 3. apply the hamming window function to obtain windowed coefficients; 4. plot the impulse response β(π).and windowed impulse response β π€ (π). Hamming window
12
Solution Calculating the normalized cutoff frequencies leads to
Ξ© πΏ = 2π π πΏ π π = 2π =0.4 π πππππππ Ξ© π» = 2π π π» π π = 2π =0.6 π πππππππ Since 2M +1= 5 in this case, using the equation in Table β π = Ξ© π» β Ξ© πΏ π π=0 sinβ‘(Ξ© π» π) ππ β sinβ‘(Ξ© πΏ π) ππ πβ 0 πππβ2β€πβ€2 Calculations for non-causal FIR coefficients are listed as β 0 = Ξ© π» β Ξ© πΏ π = 0.6πβ0.4π π =0.2 β 1 = sinβ‘(Ξ© π» π) ππ β sinβ‘(Ξ© πΏ π) ππ = sin 0.6π Γ1 1Γπ β sin 0.4π Γ1 1Γπ =0.0035 β 2 = sinβ‘(Ξ© π» π) ππ β sinβ‘(Ξ© πΏ π) ππ = sin 0.6π Γ2 2Γπ β sin 0.4π Γ2 2Γπ =0.0035
15
Problem 3 Let us design a first-order digital low-pass filter with a 3-dB cutoff frequency of π π =0.25 π by applying the bilinear transformation to the analog Butterworth filter: π» ππ (π )= 1 1+ π Ξ© π
16
1. Frequency Warping (mapping digital frequency to analog frequency)
Solution 1. Frequency Warping (mapping digital frequency to analog frequency) Because the 3-dB cutoff frequency of the Butterworth filter is Ξ© π for a cutoff frequency π π =0.25 π in the digital filter, we must have: Ξ© π = 2 π π π‘ππ 0.25π 2 = π π 2. Prototype Transformation (From Prototype analog LPF to desired analog filter) Therefore, the system function of the analog filter is (we use directly the given analog Butterworth filter ): π» π π = 1 1+ π Ξ© π = π π π 3. Bilinear Transformation (From analog filter transfer function to digital filter Transfer Function) Applying the bilinear transformation to the analog filter gives π» π π§ = π» π π π = 2 π π 1β π§ β1 1+ π§ β1 = β π§ β1 1+ π§ β1 = π§ β1 1β π§ β1 Note that the parameter π π , does not enter into the design.
17
Matlab %- freqz returns the frequency response based on the current filter coefficients b=[ ]; a=[ ]; [hz,f]=freqz(b,a); % 512 nb of data plot %- angle(hz)returns the phase angles in radians, phi = 180*unwrap(angle(hz))/pi; %- unwrap Correct phase angles to produce smoother phase plots subplot(2,1,1), plot(f, abs(hz)),grid; %axis([0 fs/2 0 1]); %xlabel('Frequency (Hz)'); ylabel('Magnitude Response') subplot(2,1,2), plot(f, phi); grid; %axis([0 fs/ ]); %xlabel('Frequency (Hz)'); ylabel('Phase (degrees)')
18
Problem 4 Illustrating the simple pole-zero method of calculating filter coefficients a band-pass digital filter is required to meet the following specifications: Assuming a sampling frequency of 500 Hz, obtain 1. The transfer function of the filter by suitably placing z-plane poles and zeros. 2. its difference equations. 3. Block diagram representation of filter.
19
Solution Since a complete rejection is required at zero and 250Hz we need to: place zeros at the corresponding points on the z-plane. These are at angles of 0Β° and 360Γ250/500=180Β° on the unit circle. place zeros at : π= π π π Β° = Β° = 0 Β° and π= Β° = 18 0 Β° π§ 1 =1 πππ π§ 2 =β1 To have the pass-band centered at 125Hz requires us to place poles at Β±360Γ125/500=Β±90Β°. place poles at : π 1 =π π π π 2 πππ π 2 =π π βπ π 2 To ensure that the coefficients are real , it is necessary to have complex conjugate pole pair. The radius of the poles is determined by the desired bandwidth. An approximate relationship between r, for r > 0.9 , and bandwidth bw is: π~1β =0.937 for our specifications bw =10Hz and Fs = 500Hz . This leads to an r value of r = 0.937 The difference equation is
20
π π /2 Pole-zero dΔ±agram Block diagram representation of filter
21
Matlab f0 = 125 ; bw = 10; fs= 500; r=1-(bw/fs)*pi; % magnitude of the pole theta=(f0/fs)*360; % angle of the pole k=((1-r)*sqrt(1-2*r*cos(2*theta*(pi/180))+r^2))/(2*abs(sin(theta*(pi/180)))); % the filter transfer function b=[k 0 -k];a=[1 -2*r*cos(theta*(pi/180)) r^2]; %- freqz returns the frequency response based on the current filter coefficients [hz,f]=freqz(b,a,512,fs); % 512 nb of data plot %- angle(hz)returns the phase angles in radians, phi = 180*unwrap(angle(hz))/pi; %- unwrap Correct phase angles to produce smoother phase plots subplot(2,1,1), plot(f, abs(hz)),grid; axis([0 fs/ ]); xlabel('Frequency (Hz)'); ylabel('Magnitude Response') subplot(2,1,2), plot(f, phi); grid; axis([0 fs/ ]); xlabel('Frequency (Hz)'); ylabel('Phase (degrees)')
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.