![Drawing2.jpg](data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAB/AyADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAK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UUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABiiiigAoxRRQAYooooAMUUUUAGKKKKAEwPQUYHoKWigAoxRRQAYpMD0FLRQAYooooAMUUUUANxXIX1hdSfErS7xLeRraO2ZXlC/KpxJwT6/MPzrsKTAzScbl06jg211TX3htHXAz9KU9DS0UyDj/h9p91p+hXEV5bSQSNcswSRcEjaoz9Mg11wUDgDApeBS1MY8qsXUm5ycn1DFFFFUQFN2r1IGR3xTqKACm7VznAz64p1FABikIBGCMilooATGBgUuKKKAGlQRgjIoCgDAAH0p1FABiiiigAxTSqt1UH6inUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQB//9k=)
by Ljiljana Milic
Suplemental material for Chapter IX:
9. Multirate Techniques in Filter Design and Implementation
9.1 Multistage Narrowband Filters
The method is convenient for the lowpass, highpass abd bandpass filters having the bandwidth lower than one fourth of the sampling rate.
Multistage Filtering with the Halfband Decimation and interpolation Filters
Multistage filter for M = 2: Decimator, kernel filter, and interpolator.
Example 9.1
This example demonstrates the contribution of subfilters of the three-stage structure to the overall filter magnitude response and also to the aliasing characteristic.
Filter specifications
F0 = 2000; % Sampling frequency [Hz]
Fp = 230; % Passband edge frequency [Hz]
Fs = 300; % Stopband edge frequency [Hz]
delta = 0.001; % Peak stopband ripple
Filter design
Nord_k = 50; % Setting the kernel filter order
Designing the kernel filter ![](data:image/png;base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QpQXfy5Yy06/mcKFjAYIMXLjzj0NrVpMJ4vGBq1WRiuEnFtW3vpFavGsBBVuz6PK1dS9ScNsuazRCq6YlVGWE+N0C+LtBrwMLBoVMgK9bcNCJgZBVK2+bPacRXwcvgRp3ltSkU6fUa5sLhePDLpnwXs8ZUEkAXxSFJp0qC+jOhbXqgd2gfLibpitk+aTziYhXTusq9P1a/O2SmoLaGaAOrDiKqZrKVq5TRTfHsyss0uYT6SLpxcaBRLM1YdqWSyLHIdI0V1E0B9GJGbSfs9tYarsrIU3zaKp6fVz0fyVB90lDbO6ZOxqgCl73wCnFZXVNcB1Le8yM1kVzHrAvP4bdpmm2TLjnZJ34xVBUimqq0e0pN19KoDyDrIvq+0ddQ6zHjmAs1we8fvFpi2R39pEcjEuPkAr6P9mLqxdHQsbUco4NVhxtIIngO8FKWJPqyP/ngIm0b3obZnlQO0QLxoBhHZNHSptizujXrMv6f2qtlovexdDeUjgE7a7FRn8hLjTKm2MpqMoGs7BFgi3HB+DVPGsu+Ut4LzssLDMxOa6jWMVdPqAdlvui4rp0ZOoasWayHC4EeKosXlCQWdQvVFnbKYfCX7opszLdvK9R1bp7J4fuAw4FJgmbgJTpOpH1VWbPayzJChjY5/3AAlUbSxr5inQrgNbTOMTPPqjrQjsolLhdAqCW768bj+1mGnVhKB8nFGXFEFunGMG6CUvn8LU/dxAQ9do1d5ReDymoyXh/BdjeImgCyTdS9W5sgyRdnuxFtd3x83QKl86VvMuk7F1ARie3RoESw4Crsm9e0ucHw+ToDy8uWAaOyX1Er5PhYJcJp64l17ll2C29YhmC7GuACydLFdkuovM6LCa7dwRv87pwukXs/HBVCvRf2XXp4A1HEaE4AmAE3twk4Y1IHfP3Y5QTYvQ4NqAAAAAElFTkSuQmCC)
hi = hd; % Interpolation filter
Frequency responses
[Hk,F] = freqz(upsample(hk,2),1,1024,F0);
[Hd,F] = freqz(hd,1,1024,F0);
plot(F,20*log10(abs(Hk)),'k')
plot(F,20*log10(abs(Hd)),'b')
The overall filter H(z)
plot(F,20*log10(abs(H)),'k')
xlabel('Frequency [Hz]'),ylabel('Gain [dB]')
Computing aliasing
[Hd_al,F]=freqz(hd,1,2048,F0,'whole');
plot(F(1:1024),20*log10(abs(Hd_al(1025:2048))),'r')
title('H_K(z^2)-black, H_D(z),H_I(z)-blue, H_D(-z)-red' )
plot(F(1:1024),20*log10(abs(Alias)),'r')
title('Gain responses of multirate filter')
legend('H(z)','Aliasing')
disp('END OF EXAMPLE 9.1')
Example 9.2
In this example, we use two identical IIR halfband filters for decimation and interpolation filters
and
, and an eliptic mimimal Q-factors (EMQF) filter for the kernel filter
. Filter specifications
F0 = 2000; % Sampling frequency [Hz]
Fp = 250; % Passband edge frequency [Hz]
Fs = 300; % Stopband edge frequency [Hz]
delta = 0.001; % Peak stopband filter
Designing the kernel filter ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAAmCAYAAABqDa0qAAAF/ElEQVRoQ+2ZdcguRRTGf1fFRMTGQjEwMBBRDEwwwe5EUFEMrH8UG7ExMbG7FQMMbFEUsREVRVBEEQsVE4ufnIFl787u7N73/S4X34GPD96dOTPzzDPnPOfMNCZtEALTBo2aDGIC3EASTID7HwM3D7Ax8ALw2wAc5gY2AV4Efi0dP6szblHgZOBq4P3STTf0Wx3YHzgP+K7EzqwM3OLA6cBlMwhawmlV4MBS8NqA8wrsDWwA7AnMXzmJd4EHgBuBT+P3ZYF9gZ2AdSt9PcGbghUflZxmQR/XJjteAe4E/ikYU9JlL2B54Hzgz7YBJYybF7gUODgMPQQcCnyVMbw2cDewEvAlsB/wTMmqe/Rxg5sBxwM/9xjX1dUDuQh4HHCf2TYEuF2DbTmj6wNPBkMfBA4Cvu9acY/vSwDXBisMCKNu6wGnAofEwTfaLwFuSeD2OGGv6B7ABy2rlY06a9s5wCnAXyPcnQexKXAE8NMI7SZTuqQrgOeB63P2S4DbCHgsGHRfXNkfMgal+sVxle2yI/DwCDe3AHAd8BRwzQjt1k15+Fu33ZYS4KoMk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PfZbuZbY+16ZEEuhUofYW+Vt1/GLhCvRvrT50qoFL1ZOz44XK63RJXI2sP2kAVGli9cWmzMhVmN2fbyBKCkGVRR9HaiiI5rPJRSS2+jbrgba6jqkErlo98Tr4HuEJ+35glpJ+KyWeQewY4NVI5Ns2Olvkr5sDc4XPVvJYWrKJg25ntWBcVT82rmcqgdNvJn3nc2OqDOtPLFl5NXIZRw5MwZNFyp8nuliSMSIGakqDoQGhE7SEdOkJz2g/GWXZ2zTKh5ZUiNTZ+yiyc1w/r25phHVNsmk54LMemUF1LzLQ8WrQxMDOvU4F41yYztxoZ35qZcKoZn7qNwOGTt5rZFT2m4/d6aG7cxMzo8NUADcz9jX2OSfADYR4AtwEuIEIDBw2YdxA4P4FM/RmNm7w9DgAAAAASUVORK5CYII=)
Filter order N = 9
[B,A,beta,Ap,As,Fp,F3db]=emqf_igi(9,1/16+1/32+1/256,0.3);
EMQF design
===============================
N = 9
alpha = 0.097656250
F_s = 0.300000000
F_p = 0.230390776
F_3dB = 0.265567286
A_p = 3.83229065e-06
A_s = 60.543260629
alpha1 = 0.048945099
beta =
0.1022
0.3399
0.6092
0.8660
Designing the decimation filter ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAAmCAYAAABqDa0qAAAF9ElEQVRoQ+2Zd8i3UxjHPy8iJAnZGREvUYiMrD8Uypa9d2TvkJWZnZnttffKyhaR7IQo2dkrM6uPrlPH/dzj3L/39zx58zt/PT2/c677Ot/re80zidEaCIFJA50aHWIE3IAkGAH3PwZuZmAN4CnglwFwmA5YB3gZ+Lr0/LTOuLmBY4BLgDdLL12zbwHgEOA84P0SOdMycPMAxwPnTyVoCSflHVEKXhtwusA2wKrAVsBsmSVeB+4ArsostDCwHbAJsFK2V/pfHax4p8SaBXvU7XTgOeBG4K+CMyVbVge2Bo4Efmw7UMK4WcIKu4egu4G9gM8aBC8P3AwsAXwKbA88VqJ1jz1ebu1wr9YL9pDp1umBw4GfgsmNBhkEuM2DbU06rQI8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7O1+4BfO7wg/ZyMk5JUrXFyVzXdpybaAjItreto6NZggP9PY3Kzoy9MaTkfU0k7B0faY7IRkBiqTAH/vOZCyVWfb4iBgqH8VC4lEWZQH13sM/OVt1cazOQjMI7+q7PClaOxtx/+uAnsrl610EjF2/I27pS4QDXTzRSM2T8mvXYg1dZIL5BxsjufLi8EWLg/HaN7zxpzXfbQAp0m1HqR/8vPG0YcUhgmHCs1rokGLm/jdDmDf3UtE+y2hNgJuKsmllkmWJu5vGjThNn7+QbiaEhQDfYWs7aGgmg/m1wxlS7u98mx1bUnGjjjpwnEx5C65llX062s38y4/p0yahVg2XEgoDvbyLe9dPnobPjx4VlGyzYfoB0tpWWJpDF1886R/EQDZ7a6Liyu9b/PFPdyjnAuijjpG+eHHUFA8JRj+fPQVDwTCpoJ6cwS0NRpIoHLY9ehwLmZi9mqGa92iYceH5nrEksdjgK+CGAxXdoZ5HJ0+8XifGnmnTDgbOEMxIJjRk6P1A4jl4544gTm/ugph/XAXJy1+m6cSMb11e0/vX8E3IDmGQE3Am5ABAY8NmLcgMD9DYanbza8qp1AAAAAAElFTkSuQmCC)
Filter order N = 5
[bd,ad,z,p,k] = halfbandiir(5,2*F3db*1000/F0);
Frequency responses
[Hk,F] = freqz(upsample(B,2)/2,upsample(A,2),1024,F0);
[Hd,F] = freqz(bd,ad,1024,F0);
plot(F,20*log10(abs(Hk)),'k',F,20*log10(abs(Hd)),'b')
The overall filter H(z)
plot(F,20*log10(abs(H)),'k'),ylabel('Gain [dB]')
Computing aliasing
[Hd_al,F]=freqz(bd,ad,2048,F0,'whole');
plot(F(1:1024),20*log10(abs(Hd_al(1025:2048))),'r')
title('H_K(z^2)-black, H_D(z),H_I(z)-blue, H_D(-z)-red' )
plot(F(1:1024),20*log10(abs(Alias)),'r')
title('Gain responses of multirate filter')
disp('END OF EXAMPLE 9.2')
9.2 Estimation of the Conversion Factor
The optimal conversion factor M is determined as the integer part of the real root of of the equation:
Example 9.3
Specifications for FIR lowpass filter:
B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6aw3IRbl+PGzxFZk6m9GyiXtQ0S5+9cvQ3ZCYZxPMPZU9I/c/GosMt/s1wIdoXC0HJ8ssTTu6IF4F2bexxBUPmGOV2w4UyvAddFgI+jwXy3EFRCMgaeW9Hz8bvMsOEe70IFYYYW9mysyLTgwWt7eyZdlpXBzYNthZADkte2+wyk+GsE5A6gqHMJDpRYC/VRK/vb+7v0gNljr1VffS4M0PV+U7M9Q0YJmYpe59IA4befTgxT6gDDLMCFwEehulGgZwY547bRPoNBs9LWoJ6GMYM1xLLE8XW7uN+Imrc1rayvf0GQ2UDmhtGxwMNGEZnLYZuSQOGoS/B6BjQgGF01mLoljRgGPoSjI4B/wCH1I026ocGOgAAAABJRU5ErkJggg==)
Minimal stopband attenuation 60 dB (
) F0 = 2000; Fp = 50; Fs = 100;
Estimating the optimal conversion factor
D = [Fs^2-Fp^2,-(Fs+Fp)^2,2*F0*(Fs+Fp),-F0^2];
disp('Roots of the polynomial D')
Roots of the polynomial D
disp(D_roots')
-1.3135 - 9.6466i -1.3135 + 9.6466i 5.6270 + 0.0000i
disp('Optimal conversion factor')
Optimal conversion factor
disp([sprintf(' M = %15.9f', M)])
Kernel filter design
fk = [0,50/200,100/200,1]; mk=[1,1,0,0]; % Setting the design parameters
w = [1,3.333]; % Passband/stopband weighting coefficients
hk = firpm(24,fk,mk,w); % Computation of filter coefficients
[Hk,fk]=freqz(hk,1,512,400);
Decimation/ interpolation filter design
f0 = [0,50/1000,350/1000,450/1000,750/1000,850/1000]; % Design parameters
m0 = [1,1,0,0,0,0]; % Design parameters
w0 = [w,w(2)]; % Passband/stopband weighting coefficients
hd = firpm(18,f0,m0,w0); % Computation of filter coefficients
[Hd,f]=freqz(hd,1,512,2000); % Decimation/interpolation filter
Interpolated kernel filter
hkm=zeros(size(1:M*length(hk)));
hkm([1:5:length(hkm)])=hk;
[Hkm,f]=freqz(hkm,1,512,2000);
Multirate filter frequency response
Displaying the results
plot(fk,20*log10(abs(Hk)));
xlabel('Frequency [Hz]'),ylabel('Gain [dB]')
title('Kernel filter H_K(z)')
axis([0,200,-80,5]), grid
plot(f,20*log10(abs(Hd)),'r');
xlabel('Frequency [Hz]'),ylabel('Gain [dB]')
title('Decimation and interpolation filter')
axis([0,1000,-80,5]), grid
plot(f,20*log10(abs(H)));
xlabel('Frequency [Hz]'),ylabel('Gain [dB]')
title(' Multistage filter, H(z)')
axis([0,1000,-90,5]), grid
Interpolation filter
h=hd; % Impulse response of interpolation filter
Fx=2000; % Input sampling frequency
Fy=Fx/M; % Ooutput sampling frequency
H(r)=sum(h.*W); % FIR filter frequency response
Computing and displaying aliasing
Computation of aliasing in the frequency band of the low-rate signal
For k =0 program computes unalised component
For k = 1, 2, 3, 4 program computes the aliased components
W2=exp(-i*n*(omega-2*k*pi)/M);
plot(FF,20*log10(abs(Hal)))
xlabel('Frequency [Hz]'),ylabel('Gain [dB]')
title('Aliasing characteristics')
legend('Location','south'), legend('Aliasing')
axis([0,50,-90,5]), grid on
disp('END OF EXAMPLE 9.3')
9.3 Highpass Multirate Filter
Example 9.4
In this example, we show how the lowpass filter of Example 9.1 is modified into a highpass multirate filter.
Filter specifications
FP_h = 1000-Fp; % HP filter
FS_h = 1000-Fs; % HP filter
Kernel filter design
hk = firgr(50,[0,2*Fp/(F0/2),2*Fs/(F0/2),1],[1,1,0,0]);
Design of highpass halfband decimation filter
hd = firhalfband('minorder',(2*Fs+Fp)/(3*F0/2),delta);
Frequency responses
[Hk,F] = freqz(upsample(hk,2),1,1024,F0);
[Hd,F] = freqz(hd,1,1024,F0);
plot(F,20*log10(abs(Hk)),F,20*log10(abs(Hd)),'g')
Highpass interpolation filter
Multirate filter frequency response
plot(F,20*log10(abs(H))),ylabel('Gain [dB]')
Computing aliasing and displaying results
[Hd_al,F]=freqz(hd,1,2048,F0,'whole');
plot(F(1:1024),20*log10(abs(Hd_al(1025:2048))),'r')
legend('location','best')
legend('H_K(z^2)','H_D(z),H_I(z)','H_D(-z)')
plot(F(1:1024),20*log10(abs(Alias)),'r'),grid
title('Multirate filter')
legend('Location','best')
legend('H(z)','aliasing')
disp('END OF EXAMPLE 9.4')
9.4 Structures Based on Complementary Filters and Multirate Techniques
The following examples show the application of multirate approach to design broadband filters. This is achieved by subtracting output of the narrow-band filter from the delayed version of the input signal.
Example 9.5, and Example 9.6
Example 9.5
In this example, we demonstrate the application of the multirate complementary structure, shown bellow, to construct a wideband lowpass filter. The multirate structure consists of the kernel filter
, decimation filter
, interpolation filter
, and delay element
. Wideband filter specifications:
Sanpling frwquency:
Passband edge frequency ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAmCAYAAABDJpDoAAAHgElEQVR4Xu2bZ6g2xRXHf3ZFxRaxfRAlNsQkKIhoVOyaWLAbY1RQVOwdxQaKBStqFOsXu2I3VuzYEMWuiB8sWCLWxC42fjLzMq67O/vcffbe53nvDtwPl93ZOXPmP6f8z3lmoR+9BqZQA7NM4dr90r0G6AHYg2BKNdADcErV3y/eA7DHwJRqoAfglKq/X7wHYI+BKdVADoB/BLYBNgfWHlDSfYCLB5wziq+vDtwKLNFAuCeAnYG3C+/OGvT3L+BTYB5gQeBm4C7gu5pvt5kbPzsfsBuwIbABMH+ynrIqw53hz0dzAtsCmwF/BxZO3ld+370buAn4voFeKl/JATBOXAt4LPzzBbAjcA/wc/JlhV4ROAr4B7Au8Ggb4UZg7mzACcBxDWU5DziyACgP7yRgNWA/4NnwreWBi4B3gcOAj0rWaDO3TGTPe0/gkvDwNWAn4MWa/QlCAerw7LcD7muoj+xrTQG4DvBI+JrA8yZ/XPF1Lca5wO7A61kJRvuFZYCrgNuBq4FvKsTdAbgwWA2tWhxautOB/YG9gMsKl3Zj4EbgygDcr4Y0t06rqTG5F/gn8EnNhBWA64E/Ay8E4zO0c20KwL3DbVXOU4NF+LFCaAU+FjgQ+Gy08ZWVbg9AF1gETjpRkJ0DrFFyOFsFcL0avMKbhRUXAi4HtgZ2CSCPr7SZO1MBMCpYEDpUjBahaiwOrAn8p218kIVHty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Mw+r2UPKd4ZWMW0qmzTjiwv2ASkHZ1DILtHleI4asoiSHJk+dGKNiqsAsYtZUGi1q+Ipggj8t3gStvrqU5bqtzw0pkegNE5xXMadc76P68LbBeBfMNuRkUzaQZJCrfjcWGkvZtkn9+8NnA8cEV0fb8G4ZV8pk1AtaaWJ8Dihb5v5TjkZJZz01B7VEQFqxnerJ5WvzKEPnZuF6VCp2VDmxzyDL8pHVFwUaiUS6SNo0Ow2bGWbVCWtsDKzR5Y0dB3Ymtblu2RPNFnKrTrESS2hh9l0Uxs2TSpkYpPnrXwMEu+Gv5PALQ7V3Le1iG1mwF/jyxokB6rEptighnjNJibckr6M8SqVPd4bxCn0uR/+tkDSy5e/acI54oXrKqknip7K8CndqWm4/FFQVA3bMMfChCZsSoBXLd3UzdR2XUVRdOh6Cym5sG8r3mmxx4YCpCYCtVaTGfWxtLTTj3+7mb6DjwwFCBx+sRtPINR1TF0YGZzay890E2QyPL97wRK1I4k3ZfpLb385mbuDj3QTZCosciWd40e39NTlhz3A4odQYdmNrf30gPdBIngsEVTBJKJq0a6xyOLHnACu5cf3czdmQe6CZLOZm7u7hsPNCDpm1D1ztAGJL3zfd/M3ICkb0LVO0MbkPTO930z8z8aRQ1Fzi6bkAAAAABJRU5ErkJggg==)
The design procedure consists of two steps:
(1) Design the narrowband multirate highpass filter using the procedure of Example 9.4.
(2) Determine the the desired wideband filter as delay-complementary filter to the highpass narrowband filter.
(1) Designing the multirate highpass filter from Example 9.4
Kernel filter design
hk = firgr(62,[0,2*Fp/(F0/2),2*Fs/(F0/2),1],[1,1,0,0]);
Decimation/interpolation filter
hd = firhalfband('minorder',(2*Fs+Fp)/(3*F0/2),delta);
Frequency responses
[Hk,F] = freqz(upsample(hk,2),1,1024,F0);
[Hd,F] = freqz(hd,1,1024,F0);
Multirate highpass filter
Computing aliasing
[Hd_al,F1]=freqz(hd,1,2048,F0,'whole');
Displaying highpass filter characteristics
plot(F,20*log10(abs(H))),ylabel('Gain [dB]')
plot(F1(1:1024),20*log10(abs(Alias)),'--b'),grid
title('Multirate highpass filter')
legend('Location','best')
legend('H(z)','aliasing')
(2) Designing the wideband filter
D=length(hk)+length(hd)-2; % Computing delay D (samples)
Computing the wideband filter frequency response
HH=ones(size(1:length(H))).*exp(-i*2*pi*F*D/F0)'-H';
plot(F,20*log10(abs(HH)),F1(1:1024),20*log10(abs(Alias)),'--b')
ylabel('Gain [dB]'),xlabel('Frequency [Hz]')
title('Multirate wideband filter')
legend('Location','northwest')
legend('Filter','aliasing')
axis([0,1000,-120,5]),grid
g(1)=axes('Position',[0.25 0.50 0.45 0.1]);
plot(F(1:750),(abs(HH(1:750)))), axis([0,730,0.9998,1.0002]),grid
disp('END OF EXAMPLE 9.5')
Example 9.6
This example demonstrates the application of the two-stage complementary structure, shown in the Figure bellow, to construct a sharp lowpass filter with the design parameters:
Sampling frequency:
Passband edge frequency ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAmCAYAAABDJpDoAAAHgElEQVR4Xu2bZ6g2xRXHf3ZFxRaxfRAlNsQkKIhoVOyaWLAbY1RQVOwdxQaKBStqFOsXu2I3VuzYEMWuiB8sWCLWxC42fjLzMq67O/vcffbe53nvDtwPl93ZOXPmP6f8z3lmoR+9BqZQA7NM4dr90r0G6AHYg2BKNdADcErV3y/eA7DHwJRqoAfglKq/X7wHYI+BKdVADoB/BLYBNgfWHlDSfYCLB5wziq+vDtwKLNFAuCeAnYG3C+/OGvT3L+BTYB5gQeBm4C7gu5pvt5kbPzsfsBuwIbABMH+ynrIqw53hz0dzAtsCmwF/BxZO3ld+370buAn4voFeKl/JATBOXAt4LPzzBbAjcA/wc/JlhV4ROAr4B7Au8Ggb4UZg7mzACcBxDWU5DziyACgP7yRgNWA/4NnwreWBi4B3gcOAj0rWaDO3TGTPe0/gkvDwNWAn4MWa/QlCAerw7LcD7muoj+xrTQG4DvBI+JrA8yZ/XPF1Lca5wO7A61kJRvuFZYCrgNuBq4FvKsTdAbgwWA2tWhxaut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Q7dcqnL/kx/JVpdeybJ33/oY8o+5uiUFzfTsSOYICV5ETtgkSZQ6PI4yno1TOqMskOXGS4AkQgWAW0SFOqJikKPMXIJ2YChiPnSW+3pjywEgZ2t5/pI7lQi/QPjeKAc2HWVU9wd1d7PbSVQG5SvGUN4FIyV8NxoagaahgGziFSo/wzT5PZQ/Zevu5YlpVtulFlhdsAvKomLvy5LsIkhxZvrTqo5dVBIxHyoJErV8RTaeJfA+4lK4dzmed1qkeeNk6ewFG56jWjtSRXxySawh8xSY1CrUR218FJ7u64iGez24EHAecH12fmUgpQfKZDgHtWmpvgGU+NGOdGTqG66mwqohqixnerJ52v1xKH7u2m9K23rKhTQ55hheo0hUF7RKAEmnj6BBsZe82LqjFwCk3e2FFQ18IiVqW7ZU80WcqtFYKkt8Br2UTpNptmtRI74J6YOZllnw3jFSwpCuIHvtPD6iZKDYZgDtKylD+HnOHfO+hnBeQ5orsKsBeGsCtNPmffvbCkptX/ynCuePN4oLWW2XPBfjUrjw+8cxJEDQN23DfSRCZsSoB3HR207RQ2efp2L0sNQ9kvu6ZYfbAYIAkP+uwNpbedhrm9+6W78MDgwESl0/cxq6gTnvow9Tuq8PlgTZBIsv371KU6h1Jui/TW4brfbt1B+CBNkFi6yhb9s6FPb5/gyKD9jzg+QHY1j0yQjzQJkgEhy2aAJGJq0Z6xiOLnpi/Nxkhrpp0zWgTJJOuF0f5m3cgGeUBbuP1OpC04cVRPkcHklEe4DZerwNJG14c5XN8CxxPDkVgRIinAAAAAElFTkSuQmCC)
Solution
For the first step, we exploit the filters from the second stage of Example 9.5. Here, this filter has a role of the equivalent kernel filter. In the second step, we design decimation and interpolation filters
and
. Computing the impulse response of the equivalent kernel filter:
LP multirate filter of the first stage
hy=conv(downsample(hd,2),hk);
hy=conv(upsample(hy,2),2*hi);
hdel=zeros(size(1:length(hy)));
hh=hdel-hy; % Impulse response of the equivalent kernel filter
[HH,F]=freqz(hh,1,1024,F0); % Frequency response
plot(F,20*log10(abs(HH)),F1(1:1024),20*log10(abs(Alias)),'--b')
title('LP multirate filter from the first stage')
ylabel('Gain [dB]'),xlabel('Frequency [Hz]')
g(2)=axes('Position',[0.25 0.70 0.45 0.1]);
plot(F(1:750),(abs(HH(1:750))))
axis([0,730,0.9998,1.0002]),grid
Decimation/interpolation filter
hd1 = firhalfband('minorder',(2*Fs+2.2*Fp)/(3*F0/2),delta);
F0=4000; % Sampling frequency of the overall multirate filter
Computing the impulse response of the overall multirate filter
hy1=conv(downsample(hd1,2),hh);
hy1=conv(upsample(hy1,2),2*hi1); % The output sequence
hdel1=zeros(size(1:length(hy1)));
hh1=hdel1-hy1; % Overall impulse response
Frequency responses
[Hd1,F1]=freqz(hd1,1,1024,4000);
[Hd1_a,F1]=freqz(hd1_a,1,1024,4000); % Aliasing
[HHu,F]=freqz(upsample(hh,2),1,1024,4000); % Upsampled eq. kernel filter
[HH1,F]=freqz(hh1,1,1024,F0);
Alias_1=(Hd1_a.*HHu).*Hd1;
Displaying the gain responses of the two-stage wideband multirate filter
plot(F,20*log10(abs(HH1)));
plot(F,20*log10(abs(Alias_1)),'--b');
plot(F,20*log10(abs(Alias_1a)),'--b')
ylabel('Gain [dB]'),xlabel('Frequency [Hz]')
title('Two-stage multirate LP filter')
legend('Location','best')
legend('LP filter','Aliasing')
g(3)=axes('Position',[0.52 0.65 0.37 0.1]);
plot(F(1:450),(abs(HH1(1:450)))), axis([0,730,0.999,1.001]),grid
disp('END OF EXAMPLE 9.6')
disp(' END OF CHAPTER IX')