Forums

Multirate filters, MATLAB

Started by Unknown October 13, 2004
Hello,

Working on the design of decimation filter for multistage, sample rate
conversion.

I have designed a filter which represents G(z). With freqz(b,1,1024) I can
plot the frequency response of the filter (the coefficients are in "b").
However, its output will be downsampled by, say M = 10. How to plot the
frequency response of G(z^10)?

The kind of plot like Figure 4.4-7 (c), in P.P. Vaidyanathan, "Multirate
Systems and Filter Banks", Prentice Hall, 1993, page 142.

TIA

--
Jaime Andr�s Aranguren Cardona
jaac@nospam.sanjaac.com
SanJaaC Electronics
Soluciones en DSP
www.sanjaac.com

(Remove "nospam" from e-mail address)


Hi Jaime
Downsampling would produce G(z^(1/10)). To get G(z^10), use upsampling
by 10. This is how the figure you refer to is obtained.

Upsampling by 10 would mean inserting 9 zeroes after each coefficient
in b. A freqz after this operation should yield the desired result.

Regards
Biswaroop

"Jaime Andr&#2013265929;s Aranguren Cardona" <jaac@nospam.sanjaac.com> wrote in message news:<1097691804.V820vnzzwb5wpYACB8+Tjw@teranews>...
> Hello, > > Working on the design of decimation filter for multistage, sample rate > conversion. > > I have designed a filter which represents G(z). With freqz(b,1,1024) I can > plot the frequency response of the filter (the coefficients are in "b"). > However, its output will be downsampled by, say M = 10. How to plot the > frequency response of G(z^10)? > > The kind of plot like Figure 4.4-7 (c), in P.P. Vaidyanathan, "Multirate > Systems and Filter Banks", Prentice Hall, 1993, page 142. > > TIA
b_palit@rediffmail.com (Biswaroop Palit) wrote in message news:<49fc39b9.0410132135.71356bb9@posting.google.com>...
> Hi Jaime > Downsampling would produce G(z^(1/10)). To get G(z^10), use upsampling > by 10. This is how the figure you refer to is obtained. > > Upsampling by 10 would mean inserting 9 zeroes after each coefficient > in b. A freqz after this operation should yield the desired result.
You're right. Thanks for correctng me. Regards, JaaC
> > Regards > Biswaroop > > "Jaime Andr&#2013265929;s Aranguren Cardona" <jaac@nospam.sanjaac.com> wrote in message news:<1097691804.V820vnzzwb5wpYACB8+Tjw@teranews>... > > Hello, > > > > Working on the design of decimation filter for multistage, sample rate > > conversion.
Hi,

Here's an example using the Signal Processing Toolbox that plots the
response of a filter running at two different rates.   Assuming a decimation
factor of 10.

h = dfilt.dffir(fir1(100,.25))
fvtool(h,h,'Fs',[1 1/10])

If you have the MathWorks' Filter Design Toolbox you can also define
multirate multistage filters and view their responses with FVTool.  Type
"help mfilt/firdecim" for details.

By the way, the kind of plot you see in the reference you mentioned is
achieved using an Interpolator FIR (IFIR) filter.  You can use the IFIR
function in the Filter Design Toolbox to achieve those results.  Type "help
ifir" in MATLAB for details.  Here's an example usage of the IFIR function:

% Design periodic filter H(z) and image-suppressor G(z) filter.
Fs = 8e3;
[h,g] = ifir(40,'low',[70 80]/(Fs/2),[.1 .01]);
H = dfilt.dffir(h);
G = dfilt.dffir(g);

% View individual filter responses.
hfv = fvtool(H,G);
legend(hfv,'Periodic Filter','Image Suppressor Filter');

% Cascade H(z) and G(z) and view overall response.
Hcas = cascade(H,G);
hfv2 = fvtool(Hcas);
legend(hfv2,'Overall Filter');

HTH
-Paul
----

"Biswaroop Palit" <b_palit@rediffmail.com> wrote in message
news:49fc39b9.0410132135.71356bb9@posting.google.com...
> Hi Jaime > Downsampling would produce G(z^(1/10)). To get G(z^10), use upsampling > by 10. This is how the figure you refer to is obtained. > > Upsampling by 10 would mean inserting 9 zeroes after each coefficient > in b. A freqz after this operation should yield the desired result. > > Regards > Biswaroop > > "Jaime Andr&#2013265929;s Aranguren Cardona" <jaac@nospam.sanjaac.com> wrote in
message news:<1097691804.V820vnzzwb5wpYACB8+Tjw@teranews>...
> > Hello, > > > > Working on the design of decimation filter for multistage, sample rate > > conversion. > > > > I have designed a filter which represents G(z). With freqz(b,1,1024) I
can
> > plot the frequency response of the filter (the coefficients are in "b"). > > However, its output will be downsampled by, say M = 10. How to plot the > > frequency response of G(z^10)? > > > > The kind of plot like Figure 4.4-7 (c), in P.P. Vaidyanathan, "Multirate > > Systems and Filter Banks", Prentice Hall, 1993, page 142. > > > > TIA