Reply by May 2, 20052005-05-02
Fred,

I do understand that you cannot tie a sampling frequency to a filter
when you are designing it. Essentially, the filter is normalized as in
the sampling frequency corresponds to PI radians (or 1, in some cases).
Depending on the sampling frequency you then use, the filter (I mean
the cutoff frequency and other singularities) is scaled accordingly.
Thanks for making the point clear.

I was just trying to make sense of something I came across and have now
realized that it did not need that complicated level of analysis. Here
I let the matter rest.

Thanks for the inputs people.

T.



Fred Marshall wrote:
> <tanmay.zargar@gmail.com> wrote in message > news:1114794057.803896.226250@l41g2000cwc.googlegroups.com... > > Phew, those were some really loaded replies. > > > > Anyways, I seek to make matters simpler and state my issues more > > plainly, simply because, since then, I have gained some insight
into
> > them, thanks mainly to the replies on this post. > > > > Here is what I have done - > > > > I have a filter > > > > H1(z) = 1 + b1*z^-1 + b2*z^-2 > > --------------------- > > 1 + a1*z^-1 + a2*z^-2 > > > > (This filter has been designed for a sampling frequency of "Fs" Hz) > > > > I plotted the magnitude response of this filter. > > > > Now, I went ahead and created a second filter H2(z) which is
H1(z^2)
> > > > H2(z) = 1 + b1*z^-2 + b2*z^-4 > > --------------------- > > 1 + a1*z^-2 + a2*z^-4 > > > > Now when I went ahead the plotted the magnitude response of this > > filter, I found that its sampling frequency had halved. > > > > I am trying to figure out the mathematical relation that will
explain
> > this since it was not intuitive to me. So plainly stated, this is
my
> > question. I agree it is very different from what I had originally
asked
> > and I apologize for the confusion. > > > > However, this now makes me think that if I have to simulate a
decimator
> > (say decimation factor is 2) between two filter blocks, say H1(z)
and
> > H2(z), here is what I can do - > > > >> Design both filters at the same sampling frequency, say Fs. > >> Then go ahead and replace H2(z) by H2(z^2) (2 can be replaced by
the
> > decimation factor). This effectively halves the sampling frequency
for
> > the 2nd filter. > > > > In other words, if I have designed a filter at a particular
sampling
> > frequency, I can easily extend it to a filter at a different > > integer-decimated frequency using the method above. No
recalculations
> > needed. > > > > Inputs, anyone? > > > > T. > > Tanmay, > > What I tried to say and perhaps failed: > > It is best to think that digital filters are not designed with a
sampling
> frequency stated. They are designed assuming a unit delay or unit
sampling
> frequency - i.e. they are normalized to time and frequency. Such a
design
> might have a sample interval of 1 and a sample frequency of 1 or 2*pi
> radians per second. Then fs/2=0.5 > "design" means: "determine the coefficients" and perhaps "determine
the
> topology". > > A lowpass filter might be so "designed" with a cutoff frequency of
0.15fs.
> > So, you see?, the cutoff frequency is *not* specified (yet) as
something
> like 1200Hz. > It is only when the sample frequency is 8kHz, that the cutoff might
be
> 1200Hz. > If the sample frequency is 16kHz, then the same filter's cutoff is
2400Hz.
> > This is a fundamental difference in how one may look at digital
filters. It
> is mostly implementation independent. If you look at it only the
other way
> then there is bound to be confusion. > > It is only in implementation that a filter would be tied to a
particular
> sample rate. > Software implementations may not be sample rate "aware" at all! Just
chunk
> through the samples as they are presented..... > > It is good that you made the second filter a function of z^-2 in some
> respects. > Your statement "I found that its sampling frequency had halved" is
really
> not "correct". > What you have is a filter with sampling frequency related directly
related
> to z which is the same for both filters. > What you have is a filter that has a frequency response that
*repeats* in
> the context of the z you have chosen. > Either this is what you want or it isn't. > > I suspect you want a filter that doesn't repeat but, rather, one that
> filters the same frequencies the same way in *absolute* frequnecy
terms as
> if the sample rate were halved. > > To do this you might want to redesign the lower-rate filter so that
the
> frequency response is what you want at the rate of the higher-rate
filter.
> > >> Design both filters at the same sampling frequency, say Fs. > >> Then go ahead and replace H2(z) by H2(z^2) (2 can be replaced by
the
> > decimation factor). This effectively halves the sampling frequency
for
> > the 2nd filter. > > I don't understand what you're doing here. If you design both
filters at
> the same frequency then isn't the problem solved? > I don't understand the motivation to "then go ahead and replace H2(z)
by
> H2(z2)" > > Or, is your motivation to filter at a lower rate in one stage?
That's not
> clear at all. > > > > > In other words, if I have designed a filter at a particular
sampling
> > frequency, I can easily extend it to a filter at a different > > integer-decimated frequency using the method above. No
recalculations
> > needed. > > No and yes. If you have designed a filter assuming a particular
sampling
> frequency (which you need not do if things are normalized) then you
can
> easily apply it to an application at a different sampling frequency -
*as
> long as* you are willing to accept the same fractional band edge
values like
> 0.15fs, 0.24fs, etc. > So, if you design a lowpass filter for 0.15fs cutoff for *any* sample
rate
> then when you use *any* sample rate the cutoff will remain 0.15fs. > However, if you design a lowpass filter for 1200Hz cutoff at 8kHz
sample
> rate then you can't "easily extend it" to a lowpass filter for 1200Hz
cutoff
> at 16kHz sample rate. > > There is an exception to this that is done all the time in order to
achieve
> decimation: > Design *one* lowpass filter to cutoff at 0.2fs. > Apply samples at some fs1 to this filter. > Decimate the output by 2. Because the energy from 0.25fs1 to 0.75fs1
is
> close to zero, there will be no significant aliasing in doing this. > The output is at sample rate fs2=fs1/2. > Now, apply the decimated output to the *same* filter (at the new
sample rate
> of fs2). > Since the filter doesn't have a "sample rate", the new cutoff
frequency is
> now 0.2fs2=0.1fs1. > > I hope this is clear. > > I don't comprehend a "method" in what you describe above. I don't > comprehend what you're doing overall. I see decimation mentioned one
place.
> I see replacing z by z^2 another..... It's very confusing and I have
the
> sense that it's confusing you as well. > > Maybe *you* make a block diagram and we'll understand better. Keep
asking
> and we'll get there! > > Fred
Reply by Fred Marshall April 29, 20052005-04-29
<tanmay.zargar@gmail.com> wrote in message 
news:1114794057.803896.226250@l41g2000cwc.googlegroups.com...
> Phew, those were some really loaded replies. > > Anyways, I seek to make matters simpler and state my issues more > plainly, simply because, since then, I have gained some insight into > them, thanks mainly to the replies on this post. > > Here is what I have done - > > I have a filter > > H1(z) = 1 + b1*z^-1 + b2*z^-2 > --------------------- > 1 + a1*z^-1 + a2*z^-2 > > (This filter has been designed for a sampling frequency of "Fs" Hz) > > I plotted the magnitude response of this filter. > > Now, I went ahead and created a second filter H2(z) which is H1(z^2) > > H2(z) = 1 + b1*z^-2 + b2*z^-4 > --------------------- > 1 + a1*z^-2 + a2*z^-4 > > Now when I went ahead the plotted the magnitude response of this > filter, I found that its sampling frequency had halved. > > I am trying to figure out the mathematical relation that will explain > this since it was not intuitive to me. So plainly stated, this is my > question. I agree it is very different from what I had originally asked > and I apologize for the confusion. > > However, this now makes me think that if I have to simulate a decimator > (say decimation factor is 2) between two filter blocks, say H1(z) and > H2(z), here is what I can do - > >> Design both filters at the same sampling frequency, say Fs. >> Then go ahead and replace H2(z) by H2(z^2) (2 can be replaced by the > decimation factor). This effectively halves the sampling frequency for > the 2nd filter. > > In other words, if I have designed a filter at a particular sampling > frequency, I can easily extend it to a filter at a different > integer-decimated frequency using the method above. No recalculations > needed. > > Inputs, anyone? > > T.
Tanmay, What I tried to say and perhaps failed: It is best to think that digital filters are not designed with a sampling frequency stated. They are designed assuming a unit delay or unit sampling frequency - i.e. they are normalized to time and frequency. Such a design might have a sample interval of 1 and a sample frequency of 1 or 2*pi radians per second. Then fs/2=0.5 "design" means: "determine the coefficients" and perhaps "determine the topology". A lowpass filter might be so "designed" with a cutoff frequency of 0.15fs. So, you see?, the cutoff frequency is *not* specified (yet) as something like 1200Hz. It is only when the sample frequency is 8kHz, that the cutoff might be 1200Hz. If the sample frequency is 16kHz, then the same filter's cutoff is 2400Hz. This is a fundamental difference in how one may look at digital filters. It is mostly implementation independent. If you look at it only the other way then there is bound to be confusion. It is only in implementation that a filter would be tied to a particular sample rate. Software implementations may not be sample rate "aware" at all! Just chunk through the samples as they are presented..... It is good that you made the second filter a function of z^-2 in some respects. Your statement "I found that its sampling frequency had halved" is really not "correct". What you have is a filter with sampling frequency related directly related to z which is the same for both filters. What you have is a filter that has a frequency response that *repeats* in the context of the z you have chosen. Either this is what you want or it isn't. I suspect you want a filter that doesn't repeat but, rather, one that filters the same frequencies the same way in *absolute* frequnecy terms as if the sample rate were halved. To do this you might want to redesign the lower-rate filter so that the frequency response is what you want at the rate of the higher-rate filter.
>> Design both filters at the same sampling frequency, say Fs. >> Then go ahead and replace H2(z) by H2(z^2) (2 can be replaced by the > decimation factor). This effectively halves the sampling frequency for > the 2nd filter.
I don't understand what you're doing here. If you design both filters at the same frequency then isn't the problem solved? I don't understand the motivation to "then go ahead and replace H2(z) by H2(z2)" Or, is your motivation to filter at a lower rate in one stage? That's not clear at all.
> > In other words, if I have designed a filter at a particular sampling > frequency, I can easily extend it to a filter at a different > integer-decimated frequency using the method above. No recalculations > needed.
No and yes. If you have designed a filter assuming a particular sampling frequency (which you need not do if things are normalized) then you can easily apply it to an application at a different sampling frequency - *as long as* you are willing to accept the same fractional band edge values like 0.15fs, 0.24fs, etc. So, if you design a lowpass filter for 0.15fs cutoff for *any* sample rate then when you use *any* sample rate the cutoff will remain 0.15fs. However, if you design a lowpass filter for 1200Hz cutoff at 8kHz sample rate then you can't "easily extend it" to a lowpass filter for 1200Hz cutoff at 16kHz sample rate. There is an exception to this that is done all the time in order to achieve decimation: Design *one* lowpass filter to cutoff at 0.2fs. Apply samples at some fs1 to this filter. Decimate the output by 2. Because the energy from 0.25fs1 to 0.75fs1 is close to zero, there will be no significant aliasing in doing this. The output is at sample rate fs2=fs1/2. Now, apply the decimated output to the *same* filter (at the new sample rate of fs2). Since the filter doesn't have a "sample rate", the new cutoff frequency is now 0.2fs2=0.1fs1. I hope this is clear. I don't comprehend a "method" in what you describe above. I don't comprehend what you're doing overall. I see decimation mentioned one place. I see replacing z by z^2 another..... It's very confusing and I have the sense that it's confusing you as well. Maybe *you* make a block diagram and we'll understand better. Keep asking and we'll get there! Fred
Reply by April 29, 20052005-04-29
Phew, those were some really loaded replies.

Anyways, I seek to make matters simpler and state my issues more
plainly, simply because, since then, I have gained some insight into
them, thanks mainly to the replies on this post.

Here is what I have done -

I have a filter

 H1(z) = 1 + b1*z^-1 + b2*z^-2
         ---------------------
         1 + a1*z^-1 + a2*z^-2

(This filter has been designed for a sampling frequency of "Fs" Hz)

I plotted the magnitude response of this filter.

Now, I went ahead and created a second filter H2(z) which is H1(z^2)

 H2(z) = 1 + b1*z^-2 + b2*z^-4
         ---------------------
         1 + a1*z^-2 + a2*z^-4

Now when I went ahead the plotted the magnitude response of this
filter, I found that its sampling frequency had halved.

I am trying to figure out the mathematical relation that will explain
this since it was not intuitive to me. So plainly stated, this is my
question. I agree it is very different from what I had originally asked
and I apologize for the confusion.

However, this now makes me think that if I have to simulate a decimator
(say decimation factor is 2) between two filter blocks, say H1(z) and
H2(z), here is what I can do -

> Design both filters at the same sampling frequency, say Fs. > Then go ahead and replace H2(z) by H2(z^2) (2 can be replaced by the
decimation factor). This effectively halves the sampling frequency for the 2nd filter. In other words, if I have designed a filter at a particular sampling frequency, I can easily extend it to a filter at a different integer-decimated frequency using the method above. No recalculations needed. Inputs, anyone? T. Fred Marshall wrote:
> "Michael" <michael.numminen@comhem.se> wrote in message > news:3T8ce.135797$dP1.479004@newsc.telia.net... > > Dear all! > > > > I have following the discussion below. Assume that we want cascade
two
> > filters n1(n) and h2(n) together where the last one operates on a
higher
> > sampling frequency, i.e h2(n) = h1(2n). Shouldn't it be possible
transform
> > these two two filter into frequency domain by N-points DFT > > > > H2(w) = DFT{h2(n)} > > > > and > > > > H1(w) = DFT{h1(n)} > > > > and then perfom a block-wise processing including IDFT (add and
save or
> > some else) for the following > > > > y(n) = IDFT{H1(w)H2(w)X(w)}. > > > > In my mind we don't need to have different sampling frequencies
becaus of
> > the periodicity properities for the h2(n) in the frequency domain. > > > > Is that correct? > > > > Thanks all and all the best, > > Michael N. > > Michael, > > I think you have the right idea but the expression leaves out a few, > possibly important, details. > > You say: h1(n)=h2(2n) which implies that the filter coefficients or
unit
> sample responses are identical. I'm not sure that's what you meant
to say
> because it seems curious. But, if that's what you meant, OK. > > When you say: > > H2(w) = DFT{h2(n)} > > > > and > > > > H1(w) = DFT{h1(n)} > > > > and then perfom a block-wise processing including IDFT (add and
save or
> > some else) for the following > > > > y(n) = IDFT{H1(w)H2(w)X(w)}. > > > > > You should somehow account for the difference in sampling rate - and
these
> expressions don't do that. The "w" for H1 and the "w" for H2 are on > different scales as originally presented. > > But then you say: > > In my mind we don't need to have different sampling frequencies
becaus of
> > the periodicity properities for the h2(n) in the frequency domain. > > So, it seems that you understand that H2, if plotted on the same w
scale as
> H1 will repeat (i.e. "the periodicity properties for the h2(n) in the
> frequency domain"). > > But, how to express that? You start out by saying that the sampling > frequencies are different and then conclude that "we don't need to
have
> different sampling frequencies". It seems you contradict yourself. > > It's much better to express the situation this way: > > I have filter h1 with unit sample response h1(m); m=0,1,2,3,4, .....
M
> I have filter h2 with unit sample response h2(n); n= 0,1,2,3,4, .....
N
> And, for reasons important to my situation (the way the filters were > designed or the way they are implemented or for purposes of classroom
> study), the sample interval for which h1 was designed and/or
implemented is
> 1/2 the sample interval for which h2 was designed and/or implemented. > > Perhaps that could be expressed by saying > h1(n)=h1(2m)| m=0,1,2,3,4, ..... M > and > h1(n)=0;n=1,3,5.... > h2(n); > for all: n= 0,1,2,3,4, ..... N > > Now you have two sequences that are on the same time scale and can be
> transformed to be dealt with on the same frequency scale. > > Or, as you suggest, one might say: > H1(w) has a period of w=0 > K which we will call H(W) > H2(w) has a period of w=0>K/2 > So, the two can be dealt with over the largest of the two intervals
which is
> w=0>K > Accordingly H2(w) is constructed with: > H2(W) for W=0>K/2 = H2(w) w=0>K/2 > and > H2(W) for W=K/2>K = H2(w) W=0>K/2 > or, more concisely if the notation is understood, H2 is "doubled": > H2(W)=[H2(w),H2(w)] > > But, I think this isn't the normal way to discuss these things and
makes it
> harder to understand. > > Fred
Reply by Fred Marshall April 28, 20052005-04-28
"Michael" <michael.numminen@comhem.se> wrote in message 
news:3T8ce.135797$dP1.479004@newsc.telia.net...
> Dear all! > > I have following the discussion below. Assume that we want cascade two > filters n1(n) and h2(n) together where the last one operates on a higher > sampling frequency, i.e h2(n) = h1(2n). Shouldn't it be possible transform > these two two filter into frequency domain by N-points DFT > > H2(w) = DFT{h2(n)} > > and > > H1(w) = DFT{h1(n)} > > and then perfom a block-wise processing including IDFT (add and save or > some else) for the following > > y(n) = IDFT{H1(w)H2(w)X(w)}. > > In my mind we don't need to have different sampling frequencies becaus of > the periodicity properities for the h2(n) in the frequency domain. > > Is that correct? > > Thanks all and all the best, > Michael N.
Michael, I think you have the right idea but the expression leaves out a few, possibly important, details. You say: h1(n)=h2(2n) which implies that the filter coefficients or unit sample responses are identical. I'm not sure that's what you meant to say because it seems curious. But, if that's what you meant, OK. When you say:
> H2(w) = DFT{h2(n)} > > and > > H1(w) = DFT{h1(n)} > > and then perfom a block-wise processing including IDFT (add and save or > some else) for the following > > y(n) = IDFT{H1(w)H2(w)X(w)}. >
You should somehow account for the difference in sampling rate - and these expressions don't do that. The "w" for H1 and the "w" for H2 are on different scales as originally presented. But then you say:
> In my mind we don't need to have different sampling frequencies becaus of > the periodicity properities for the h2(n) in the frequency domain.
So, it seems that you understand that H2, if plotted on the same w scale as H1 will repeat (i.e. "the periodicity properties for the h2(n) in the frequency domain"). But, how to express that? You start out by saying that the sampling frequencies are different and then conclude that "we don't need to have different sampling frequencies". It seems you contradict yourself. It's much better to express the situation this way: I have filter h1 with unit sample response h1(m); m=0,1,2,3,4, ..... M I have filter h2 with unit sample response h2(n); n= 0,1,2,3,4, ..... N And, for reasons important to my situation (the way the filters were designed or the way they are implemented or for purposes of classroom study), the sample interval for which h1 was designed and/or implemented is 1/2 the sample interval for which h2 was designed and/or implemented. Perhaps that could be expressed by saying h1(n)=h1(2m)| m=0,1,2,3,4, ..... M and h1(n)=0;n=1,3,5.... h2(n); for all: n= 0,1,2,3,4, ..... N Now you have two sequences that are on the same time scale and can be transformed to be dealt with on the same frequency scale. Or, as you suggest, one might say: H1(w) has a period of w=0 > K which we will call H(W) H2(w) has a period of w=0>K/2 So, the two can be dealt with over the largest of the two intervals which is w=0>K Accordingly H2(w) is constructed with: H2(W) for W=0>K/2 = H2(w) w=0>K/2 and H2(W) for W=K/2>K = H2(w) W=0>K/2 or, more concisely if the notation is understood, H2 is "doubled": H2(W)=[H2(w),H2(w)] But, I think this isn't the normal way to discuss these things and makes it harder to understand. Fred
Reply by Jerry Avins April 28, 20052005-04-28
Rune Allnor wrote:
> tanmay.zargar@gmail.com wrote: > >>Hello, >> >>I have two filters, one designed for a sampling frequency of 16kHz > > and > >>the other for a sampling frequency of 8kHz. The type and kind of >>filters (FIR/IIR, HP/LP/Notch) is irrelevant. I need to plot the >>overall transfer function of this cascaded pair. What changes do I > > have > >>to make (in the 8kHz filter, I am assuming), if any at all, in order > > to > >>cascade the two filters? > > > Hmmmm.... I don't like this question at all. You don't mention > whether the filters are interrelated in any way, so I must assume > they are not. > > In time domain: The 16 kHz filter is sampled twice as fast as the > 8 kHz filter. How do you convolve the impulse responses? > I don't know. > > In frequency domain: The sampling and nyquist frequencies are > different. Unless explicitly stated that this can not happen, > the below combination of frequency responses are troublesome > [use fixed-width font]: > > ^ > | > | ______________ H2 ______________ > | | | | | > | | | | | > | __|_ H1 _|_ __|_ _|_ > | / | \ / | \ / | \ / | \ > |/ | \ / | \|/ | \ / | \ > +-----------------------+-----------------------+-----> > 8 kHz 16 kHz > > wher H1 is the spectrum magnitude response of the 8 kHz filter > and H2 is the spectrum magnitude response of the 16 kHz filter. > I am not very happy with this rather peculiar interaction > between the baseband of the 16 kHz filetr and the repeated, > mirrored band of the 8 kHz filter. > > In short, I think the question is ill posed. > > >>Pointers to any literature that deals with such issues will be > > greatly > >>appreciated. > > > You have to specify some relation between the filters, like a > multirate filter bank or subband filters, or something like that. > As the question is posed, I don't like it. > > Rune
It's a homework problem with a red herring: two filters, one designed for one sampling frequency, another for twice that sampling frequency, are cascaded as designed, with no modification. What is the overall response? Cascading is the red herring. The pith of the question is "a filter designed to have a response f1(z) at one sampling frequency is fed a signal sampled at half that. What will the response f2(z) be for the same z? It's intuitive that f2(z) = f1(z^2). Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Reply by Michael April 28, 20052005-04-28
Dear all!

I have following the discussion below. Assume that we want cascade two 
filters n1(n) and h2(n) together where the last one operates on a higher 
sampling frequency, i.e h2(n) = h1(2n). Shouldn't it be possible transform 
these two two filter into frequency domain by N-points DFT

    H2(w) = DFT{h2(n)}

and

    H1(w) = DFT{h1(n)}

and then perfom a block-wise processing including IDFT (add and save or some 
else) for the following

    y(n) = IDFT{H1(w)H2(w)X(w)}.

In my mind we don't need to have different sampling frequencies becaus of 
the periodicity properities for the h2(n) in the frequency domain.

Is that correct?

Thanks all and all the best,
Michael N.

>>>Thanks for the reply Jerry. However, I am not looking to combine the >>>two filters. >> >> Hi, >> >> I wonder what the word "combine" means. >> I'll bet you mean "cascade". >> >> This sure sounds like a homework problem, but it's >> such an interesting problem. >> I don't have a quick answer for you, but here >> are my "two cents." >> >>>I came across some DSP stuff relating to my earlier question that I >>>wanted to bounce off this group. Well here is what I saw - >>> >>>Filter F1 has sampling frequency Fs. Frequency response is H1(z). >>>Filter F2 has sampling frequency Fs/2. Frequency response is H2(z). >> >> Remember now, H1(z) and H2(z) are equations, >> polynomials, and the independent variable (z) is >> a continuous variable. >> So those equations are continuous functions. >> (At least I "think" it's OK to call them "functions.) >> >> Can't you just multiply the H1 polynomial and >> the H2 polynomial to get some "longer" polynomial >> that is the product of H1 and H2? That new polynomial >> describes the cascaded filters. >> >> I'm not sure what it means for two filters to >> "have two different sampling frequencies." >> I have a feeling that this "two different >> sampling frequencies" description is a professor's >> way of turning a simple problem into a more >> difficult problem. (I could be wrong though.) >> >>>Overall Frequency Response of the cascade configuration is >>>HI(z)*H2(z^2) (* denotes multiplication and not convolution). Also note >>>the the Frequency Response of the filter F2 in the overall response. So >>>I want to know how this relation of the overall frequency response is >>>established. >> >> I noticed that you wrote "H2(z^2)". What I've >> always thought "H2(z^2)" meant is >> every other (alternate) term in some >> H(z) z-transform polynomial. I've seen that "H2(z^2)" >> notation used to describe polyphase filters used in >> multirate systems. >> >> Tanmay, is your "problem" related to sample rate >> change (interpolation or decimation)? >> >> See ya', & Good Luck, >> [-Rick-] > > Good morning Rick! :-) > > Perhaps you are being rhetorical. But I couldn't resist: > > If the sampling rates, thus intervals, are different this means: > > There must be something that makes the "sample rates" of the filters > different. Because, if the filters are simply defined as sets of > coefficients, then they are sample interval / unit delay independent > aren't they? The delay blocks could have any delay value - the samples > being operated on could have been sampled at any arbitrary rate. > > H(z) normally implies a unit delay of 1 second corresponding to z^-1. > So, if there's a filter where the unit delay is normalized to 1 second and > another filter where the unit delay is, relatively, 2 seconds - how does > one handle a cascade of them? > One can't talk about cascading: > an H1(z) saying the sample rate is 16kHz and another > "H2(z)" saying the sample rate is 8kHz! > That's because "z" isn't the same in the two. > > I think the simplest way is to treat the filter with 2-second unit delays > as have 2 1-second delays per delay block. I think the OP stated that > relationship appropriately and so did you with H(z^2) .... H(z^2) > > H[z^-(1*2)] > > Oh shucks I'm *not* going to figger out whether we want to be using z or > z^-1 here.... I think that z^-1 is the appropriate variable. > > Anyway, once that's done, then the issues of particular spectra, etc. come > into play. > But, the OP did say that he didn't care about that right now - simply: > "what is the transfer function". In order to get the transfer function > one has to express one filter as H(z) and the other as H(z^2) and I think > that's all there is to it. That way the unit circles are of the same > diameter if you want to look at it that way. Or, that way the sample > rates of the filters are the "same". > > Fred >
Reply by Fred Marshall April 28, 20052005-04-28
"Rick Lyons" <R.Lyons@_BOGUS_ieee.org> wrote in message 
news:4270b71a.574691484@news.sf.sbcglobal.net...
> On 27 Apr 2005 09:30:40 -0700, tanmay.zargar@gmail.com wrote: > >>Thanks for the reply Jerry. However, I am not looking to combine the >>two filters. > > Hi, > > I wonder what the word "combine" means. > I'll bet you mean "cascade". > > This sure sounds like a homework problem, but it's > such an interesting problem. > I don't have a quick answer for you, but here > are my "two cents." > >>I came across some DSP stuff relating to my earlier question that I >>wanted to bounce off this group. Well here is what I saw - >> >>Filter F1 has sampling frequency Fs. Frequency response is H1(z). >>Filter F2 has sampling frequency Fs/2. Frequency response is H2(z). > > Remember now, H1(z) and H2(z) are equations, > polynomials, and the independent variable (z) is > a continuous variable. > So those equations are continuous functions. > (At least I "think" it's OK to call them "functions.) > > Can't you just multiply the H1 polynomial and > the H2 polynomial to get some "longer" polynomial > that is the product of H1 and H2? That new polynomial > describes the cascaded filters. > > I'm not sure what it means for two filters to > "have two different sampling frequencies." > I have a feeling that this "two different > sampling frequencies" description is a professor's > way of turning a simple problem into a more > difficult problem. (I could be wrong though.) > >>Overall Frequency Response of the cascade configuration is >>HI(z)*H2(z^2) (* denotes multiplication and not convolution). Also note >>the the Frequency Response of the filter F2 in the overall response. So >>I want to know how this relation of the overall frequency response is >>established. > > I noticed that you wrote "H2(z^2)". What I've > always thought "H2(z^2)" meant is > every other (alternate) term in some > H(z) z-transform polynomial. I've seen that "H2(z^2)" > notation used to describe polyphase filters used in > multirate systems. > > Tanmay, is your "problem" related to sample rate > change (interpolation or decimation)? > > See ya', & Good Luck, > [-Rick-]
Good morning Rick! :-) Perhaps you are being rhetorical. But I couldn't resist: If the sampling rates, thus intervals, are different this means: There must be something that makes the "sample rates" of the filters different. Because, if the filters are simply defined as sets of coefficients, then they are sample interval / unit delay independent aren't they? The delay blocks could have any delay value - the samples being operated on could have been sampled at any arbitrary rate. H(z) normally implies a unit delay of 1 second corresponding to z^-1. So, if there's a filter where the unit delay is normalized to 1 second and another filter where the unit delay is, relatively, 2 seconds - how does one handle a cascade of them? One can't talk about cascading: an H1(z) saying the sample rate is 16kHz and another "H2(z)" saying the sample rate is 8kHz! That's because "z" isn't the same in the two. I think the simplest way is to treat the filter with 2-second unit delays as have 2 1-second delays per delay block. I think the OP stated that relationship appropriately and so did you with H(z^2) .... H(z^2) > H[z^-(1*2)] Oh shucks I'm *not* going to figger out whether we want to be using z or z^-1 here.... I think that z^-1 is the appropriate variable. Anyway, once that's done, then the issues of particular spectra, etc. come into play. But, the OP did say that he didn't care about that right now - simply: "what is the transfer function". In order to get the transfer function one has to express one filter as H(z) and the other as H(z^2) and I think that's all there is to it. That way the unit circles are of the same diameter if you want to look at it that way. Or, that way the sample rates of the filters are the "same". Fred
Reply by Rune Allnor April 28, 20052005-04-28
tanmay.zargar@gmail.com wrote:
> Hello, > > I have two filters, one designed for a sampling frequency of 16kHz
and
> the other for a sampling frequency of 8kHz. The type and kind of > filters (FIR/IIR, HP/LP/Notch) is irrelevant. I need to plot the > overall transfer function of this cascaded pair. What changes do I
have
> to make (in the 8kHz filter, I am assuming), if any at all, in order
to
> cascade the two filters?
Hmmmm.... I don't like this question at all. You don't mention whether the filters are interrelated in any way, so I must assume they are not. In time domain: The 16 kHz filter is sampled twice as fast as the 8 kHz filter. How do you convolve the impulse responses? I don't know. In frequency domain: The sampling and nyquist frequencies are different. Unless explicitly stated that this can not happen, the below combination of frequency responses are troublesome [use fixed-width font]: ^ | | ______________ H2 ______________ | | | | | | | | | | | __|_ H1 _|_ __|_ _|_ | / | \ / | \ / | \ / | \ |/ | \ / | \|/ | \ / | \ +-----------------------+-----------------------+-----> 8 kHz 16 kHz wher H1 is the spectrum magnitude response of the 8 kHz filter and H2 is the spectrum magnitude response of the 16 kHz filter. I am not very happy with this rather peculiar interaction between the baseband of the 16 kHz filetr and the repeated, mirrored band of the 8 kHz filter. In short, I think the question is ill posed.
> Pointers to any literature that deals with such issues will be
greatly
> appreciated.
You have to specify some relation between the filters, like a multirate filter bank or subband filters, or something like that. As the question is posed, I don't like it. Rune
Reply by Rick Lyons April 28, 20052005-04-28
On 27 Apr 2005 09:30:40 -0700, tanmay.zargar@gmail.com wrote:

>Thanks for the reply Jerry. However, I am not looking to combine the >two filters.
Hi, I wonder what the word "combine" means. I'll bet you mean "cascade". This sure sounds like a homework problem, but it's such an interesting problem. I don't have a quick answer for you, but here are my "two cents."
>I came across some DSP stuff relating to my earlier question that I >wanted to bounce off this group. Well here is what I saw - > >Filter F1 has sampling frequency Fs. Frequency response is H1(z). >Filter F2 has sampling frequency Fs/2. Frequency response is H2(z).
Remember now, H1(z) and H2(z) are equations, polynomials, and the independent variable (z) is a continuous variable. So those equations are continuous functions. (At least I "think" it's OK to call them "functions.) Can't you just multiply the H1 polynomial and the H2 polynomial to get some "longer" polynomial that is the product of H1 and H2? That new polynomial describes the cascaded filters. I'm not sure what it means for two filters to "have two different sampling frequencies." I have a feeling that this "two different sampling frequencies" description is a professor's way of turning a simple problem into a more difficult problem. (I could be wrong though.)
>Overall Frequency Response of the cascade configuration is >HI(z)*H2(z^2) (* denotes multiplication and not convolution). Also note >the the Frequency Response of the filter F2 in the overall response. So >I want to know how this relation of the overall frequency response is >established.
I noticed that you wrote "H2(z^2)". What I've always thought "H2(z^2)" meant is every other (alternate) term in some H(z) z-transform polynomial. I've seen that "H2(z^2)" notation used to describe polyphase filters used in multirate systems. Tanmay, is your "problem" related to sample rate change (interpolation or decimation)? See ya', & Good Luck, [-Rick-]
Reply by Matt Timmermans April 27, 20052005-04-27
<tanmay.zargar@gmail.com> wrote in message 
news:1114619440.941888.99810@g14g2000cwa.googlegroups.com...
> Thanks for the reply Jerry. However, I am not looking to combine the > two filters. > > I came across some DSP stuff relating to my earlier question that I > wanted to bounce off this group. Well here is what I saw - > > Filter F1 has sampling frequency Fs. Frequency response is H1(z). > Filter F2 has sampling frequency Fs/2. Frequency response is H2(z). > > Overall Frequency Response of the cascade configuration is > HI(z)*H2(z^2) (* denotes multiplication and not convolution). Also note > the the Frequency Response of the filter F2 in the overall response. So > I want to know how this relation of the overall frequency response is > established.
The formula you give for the cascaded response indicates that F2 was converted to the Fs sampling rate by simply stuffing zeros between the coefficients, to give it the H2(z^2) response. Note the aliasing this causes -- H2(z^2) = H2((-z)^2. -- Matt