Reply by dbd September 30, 20112011-09-30
On Sep 30, 3:14 am, "J&#4294967295;r&#4294967295;me" <jerome.leclere>
wrote:
> Hi Dale, > > Here the problem does not seem to come from the fact that I don't use > filter after the expander, because I count on the other branch to remove > the aliasing component.
Your description of your processing is inadequate to make "count on the other branch" a meaningful statement.
> > If you consider the system below, you obtain well Y(z) = z^-1 X(z). > > X(z) -> [Decimation by 2] -> [Expander by 2] -> [z^-1] -> V0(z) > X(z) -> [z^-1] -> [Decimation by 2] -> [Expander by 2] -> V1(z) > Y(z) = V0(z)+V1(z) > > The difference with the previous system is that I have interverted the > expander and delay in the channel V0(z), i.e. : > > X(z) -> [Decimation by 2] -> [z^-1/2] -> [Expander by 2] -> V0(z)
After decimation by 2, the samples are at delays of z^-2. Half that delay is z^-1, not z^-1/2.
> > But I don't have the right to do this according to [1], and I don't > understand why.
The initial decimation throws away information that is not recovered by the expander. Dale B. Dalrymple
Reply by Jérôme September 30, 20112011-09-30
Hi Dale,

Here the problem does not seem to come from the fact that I don't use
filter after the expander, because I count on the other branch to remove
the aliasing component.

If you consider the system below, you obtain well Y(z) = z^-1 X(z).

X(z) -> [Decimation by 2] ->  [Expander by 2]  ->     [z^-1]      -> V0(z)
X(z) ->      [z^-1]       -> [Decimation by 2] -> [Expander by 2] -> V1(z)
Y(z) = V0(z)+V1(z)

The difference with the previous system is that I have interverted the
expander and delay in the channel V0(z), i.e. :

X(z) -> [Decimation by 2] ->     [z^-1/2]      -> [Expander by 2] -> V0(z)

But I don't have the right to do this according to [1], and I don't
understand why.

J&eacute;r&ocirc;me

Reply by dbd September 29, 20112011-09-29
On Sep 22, 11:04&#4294967295;am, "J&#4294967295;r&#4294967295;me" <jerome.leclere>
wrote:
> ... > Here is an example that I > don't understand. Imagine the following system : > > X(z) -> [Decimation by 2] -> X0(z) -> &#4294967295; &#4294967295; &#4294967295;[z^-1/2] &#4294967295; &#4294967295; -> V0(z) > X(z) -> &#4294967295; &#4294967295; &#4294967295;[z^-1] &#4294967295; &#4294967295; &#4294967295; -> X1(z) -> [Decimation by 2] -> V1(z) > W(z) = V0(z)+V1(z) -> [Expander by 2] -> Y(z) > > which gives the following equations : > X0(z) = 1/2 [X(z^1/2) + X(-z^1/2)] > V0(z) = z^-1/2 X0(z) = 1/2 z^-1/2 [X(z^1/2) + X(-z^1/2)] > X1(z) = z^-1 X(z) > V1(z) = 1/2 [X1(z^1/2) + X1(-z^1/2)] = 1/2 z^-1/2 [X(z^1/2) - X(-z^1/2)] > W(z) = V0(z) + V1(z) = z^-1/2 X(z^1/2) > Y(z) = W(z^2) = z^-1 X(z) > > We find that y(n) is a delayed version of x(n). But y(n) is the output of > an expander, which means that half of its samples are 0, so it cannot be a > delayed version of x(n) (except the particular case where half of the > sample of x(n) are 0 but no such hypothesis is made). > So I don't understant what is wrong in this system ? Is it the z^-1/2 delay > block that we cannot modelized like this ? >
Your "expander" is not a valid upsampler unless you include an implementation of the antialiasing filter required to prevent the generation of additional images of the original spectral content. As long as you persist in implementing an "expander" instead of a valid sample rate converter, you will get invalid results. Dale B. Dalrymple
Reply by Jérôme September 29, 20112011-09-29
Hi Rick,

I have been surprised by your answer. I separate my answer in three
points.


1. Multirate system and transfer function

For me, a transfer function H(z) is a function linking the output Y(z) of a
system to the input X(z) as follow : Y(z) = H(z) X(z).
If you have an expander for example, you have the following relation
between the output and the input : Y(z) = X(z^2). In this case there is
indeed no way to find a formula as above.

Now if you have the system shown in Fig. 13 of [1], the relation between
the ouput and the input is given by Eq. (27). By choosing adequately the
filters (Eq. (28)), you can remove the alias component and obtain Eq. (29)
from where you obtain a LTI system and a transfer function (Eq. (30)) !

So, in conclusion a multirate system can be a LTI system and have a
transfer function.


2. Use of z-transform with multirate systems

When Tim said "And you can't use the z transform to analyze shift varying
systems", I disagree.

The expander and the decimator are LTV systems and they don't have a
transfer function, but it does not mean that you cannot use z-transform for
the analysis. The articles and books about multirate systems do it, even in
your book "Understanding Digital Signal Processing", you have a section
(10.9) called "z-Transform Analysis of Multirate Systems".

In my case, I don't look for a transfer function, I just look for a system
(a multirate system) that gives me the output wanted.


3. Question on noble identities

But there are still some elements that I don't get. Let's start with the
basis with the noble identities (Fig. 9 of [1]). It is stated that these
identities can be proved provided G(z) is a rational transfer function
(i.e., a ratio of polynomials in z^-1). I don't understand why the
condition that G(z) be rational is necessary, and I didn't find the
explanation anywhere.

Taking a simple example, the two systems below are not equivalent. The
equations for the system 1 are correct, whereas the equations for the
system 2 are not correct (y(n) cannot be a delayed version of x(n) since
half of its samples are zeros), but I don't find the reason. Is it because
the function G(z) = z^-1/2 implies the impulse response g(n) = sinc(n-1/2)
is infinite length and thus that this filter is non causal ?

System 1 :
X(z) -> [Upsampling by 2] -> V(z) ->      [z^-1]       -> Y(z)

V(z) = X(z^2)
Y(z) = z^-1 V(z) = z^-1 X(z^2)

System 2 :
X(z) ->     [z^-1/2]      -> V(z) -> [Upsampling by 2] -> Y(z)

V(z) = z^-1/2 X(z)
Y(z) = V(z^2) = z^-1 X(z^2)


J&eacute;r&ocirc;me

[1] Multirate Digital Filters..., Vaidyanathan.
http://www.systems.caltech.edu/dsp/ppv/papers/ProcIEEEmultirateTUTExtra.pdf
Reply by Rick Lyons September 25, 20112011-09-25
On Tue, 20 Sep 2011 15:36:47 -0500, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Tue, 20 Sep 2011 11:55:26 -0500, J&#4294967295;r&#4294967295;me wrote: > >> Dear all, >> >> I have a question linked to the decimation of a signal. >> >> Let's have a signal x(n), and X(z) its Z-transform. If we decimate this >> signal, i.e. xe(n) = x(2n), we obtain the following Z-transform : Xe(z) >> = 1/2 [X(z^1/2) + X(-z^1/2)] >> >> My question is : is there a way to obtain a signal with X(z^1/2) as >> Z-transform. >> >> I find one theoretical way of doing it, but not exact in practice. If we >> create two signals containing respectively the even and odd samples of >> x(n) (even samples are obtained by decimation by two, odd samples are >> obtained by delaying the signal of one sample and then decimating by >> two), they have the following Z-transform : >> Xe(z) = 1/2 [X(z^1/2) + X(-z^1/2)] Xo(z) = 1/2 z^-1/2 [X(z^1/2) - >> X(-z^1/2)] >> >> Now, we can get the the wanted signal like this : X(z^1/2) = z^-1 Xe(z) >> + z^-1/2 Xo(z) >> >> The problem here is that we need to perform a delay of half a sample >> (z^-1/2), which can be approximated through FIR or IIR filters, but >> cannot be obtained exactly. >> >> I would like to know if anybody has an idea about this problem, or can >> help to show if there is a solution or not with a practical >> implementation (I doubt that there is a solution since to have Y(z) = >> X(z^1/2) through decimation, half of the samples of x(n) should be zero. >> But I didn't arrive to prove it). >> >> Thank you in advance >> >> J&#4294967295;r&#4294967295;me > >I'm not sure what math you believe that you're using to arrive at your Xe >(z), but you're violating one of the ground rules of using the z >transform to analyze systems. > >First, yes, you _are_ analyzing a system. If you had any one particular >signal and you wanted to find the z transform of its decimated version, >you would just find the time-domain version of the signal, decimate it, >and then find the z transform of that. But you want to have a 'magic >box' that you run any arbitrary signal through, and get a decimated >version out -- that magic box is a system. > >But the system that you want to analyze is time (well, shift) varying. >And you can't use the z transform to analyze shift varying systems, any >more than you can use the Laplace transform to analyze time varying ones.
Hi Tim, I agree with you. I have wondered, "Do Multirate Systems Even Have Transfer Functions?" My meager thoughts on this topic are at: http://www.dsprelated.com/showarticle/143.php [-Rick-]
Reply by Jérôme September 22, 20112011-09-22
Hello,

>> Who said anything about decimation?
You said "That's not true." after "I doubt that there is a solution since to have Y(z) = X(z^1/2) through decimation, half of the samples of x(n) should be zero." This is why I said that you didn't talk about decimation.
>> There are no exact realizations of filters of any kind in the real world
since you have all kinds of nasty practical matters to contend with (round-off noise, accuracy, quantized coefficients, etc.)." For the moment, I don't care about the errors due to quantization, I just would like a schematic that gives me the exact solution and that I can realize. For example, 1+z^-1 is a function that I can implement without approximate it, for z^-1/2 is not the case. More I think about the subject, more I am troubled. I have some problem in understanding the meaning of a delay of z^-1/2. Here is an example that I don't understand. Imagine the following system : X(z) -> [Decimation by 2] -> X0(z) -> [z^-1/2] -> V0(z) X(z) -> [z^-1] -> X1(z) -> [Decimation by 2] -> V1(z) W(z) = V0(z)+V1(z) -> [Expander by 2] -> Y(z) which gives the following equations : X0(z) = 1/2 [X(z^1/2) + X(-z^1/2)] V0(z) = z^-1/2 X0(z) = 1/2 z^-1/2 [X(z^1/2) + X(-z^1/2)] X1(z) = z^-1 X(z) V1(z) = 1/2 [X1(z^1/2) + X1(-z^1/2)] = 1/2 z^-1/2 [X(z^1/2) - X(-z^1/2)] W(z) = V0(z) + V1(z) = z^-1/2 X(z^1/2) Y(z) = W(z^2) = z^-1 X(z) We find that y(n) is a delayed version of x(n). But y(n) is the output of an expander, which means that half of its samples are 0, so it cannot be a delayed version of x(n) (except the particular case where half of the sample of x(n) are 0 but no such hypothesis is made). So I don't understant what is wrong in this system ? Is it the z^-1/2 delay block that we cannot modelized like this ? I have implemented this system under Matlab using a FIR (sampling of delayed sinc) and Thiran filter. y(n) and x(n) are indeed correlated but it is not as good as the autocorrelation of x(n) (the peak is wider and lower than the one of the autocorrelation of x(n)).
Reply by mnentwig September 22, 20112011-09-22
>> z^-M/N
Hello, yes, it boils down to ideal lowpass filtering. Conceptually, delaying a signal by any sub-sample length means reconstructing the continuous-time waveform and resampling it. The former needs an ideal lowpass filter. In other words, I convolve every past and future sample with a sinc pulse, as was stated. BTW, this may be of interest (as general background): http://signal.hut.fi/spit/publications/1996j5.pdf
Reply by Randy Yates September 22, 20112011-09-22
On 09/21/2011 08:34 AM, J&#4294967295;r&#4294967295;me wrote:
> [...] > I am not really convinced by your example, you talk about delaying > of 1/2 sample but no decimation.
Who said anything about decimation? You stated: The problem here is that we need to perform a delay of half a sample (z-1/2), which can be approximated through FIR or IIR filters, but cannot be obtained exactly.
> Indeed you can reconstruct value between samples with sinc function, > but we return to the previous problem of the realization. The ideal > fractional delay filter is nonrealizable because its impulse > response is infinite (cf [2]).
Well make up your mind. You seem to be vascillating between "no exact representation" and "no exact realization." There are no exact realizations of filters of any kind in the real world since you have all kinds of nasty practical matters to contend with (round-off noise, accuracy, quantized coefficients, etc.).
Reply by Jérôme September 21, 20112011-09-21
Jerry, I come back on your point.
>> If you can arrange to sample twice as fast (or upsample by 2) then a
one-sample delay at the higher rate is a half-sample delay at the original rate. In fact it's not even cheating, it could not work. We have an input X(z), we decimate it by two and obtain Y(z). Now we want to delay Y(z) by half a sample, so we perform these operations : X(z) -> [Decimation by 2] -> Y(z) -> [z^-1/2] -> V(z) which gives the following equations : Y(z) = 1/2 [X(z^1/2) + X(-z^1/2)] V(z) = z^-1/2 Y(z) = 1/2 z^-1/2 [X(z^1/2) + X(-z^1/2)] Now if we delay by one sample before the decimation, we have this system : X(z) -> [z^-1] -> U(z) -> [Decimation by 2] -> V(z) which gives the following equations : U(z) = z^-1 X(z) V(z) = 1/2 [U(z^1/2) + U(-z^1/2)] = 1/2 [z^-1/2 X(z^1/2) - z^-1/2 X(z^1/2)] = 1/2 z^-1/2 [X(z^1/2) - X(z^1/2)] The results are different. This is because the noble identities may not work if the transfer function of the filter (here H(z) = z^-1/2) after the decimator or before the expander is irrationnal (which is the case here). cf [1] of previous post.
Reply by Jérôme September 21, 20112011-09-21
Thank you all for your answers. I response to each one in the order of
arrival.
I just put two references I use after :
[1] Multirate Digital Filters..., Vaidyanathan.
http://www.systems.caltech.edu/dsp/ppv/papers/ProcIEEEmultirateTUTExtra.pdf
[2] Principles of fractinal delay filters, V&auml;lim&auml;ki.
http://www.acoustics.hut.fi/~vpv/publications/icassp00-fd.pdf

>> Jerry : "If you can arrange to sample twice as fast (or upsample by 2)
then a one-sample delay at the higher rate is a half-sample delay at the original rate.". It's a good idea, but it's cheating. I cannot play on the initial sampling frequency.
>> mnentwig : "It may be that the original question boils down to "there is
no perfect lowpass" (which is required to -suppress- the newly created alias zone at the high rate, and / or to implement delay by half a sample)." In the multirate systems, the "good thing" is that you permit aliasing after the analysis bank because you can further remove it by choosing the corresponding synthesis filters. cf [1] Fig. 13 and Eqs. 27 to 30. "Let me say this in other words: To have exactly the same signal at twice the sampling rate, I insert every second sample zero." This way of telling it conforts me to think that it is not possible.
>> Tim : "I'm not sure what math you believe that you're using to arrive at
your Xe(z), but you're violating one of the ground rules of using the z transform to analyze systems." "you can't use the z transform to analyze shift varying systems" I don't know why you are shocked by such equations, it's not because decimator and expander are LTV systems that you cannot use the z-transform, all papers and books about multirate systems use it. Cf [1] Eqs. 3a and 3b, which give the z transform of the expander output and of the decimator output.
>> Randy : "Why do you say that? I disagree. At least, it can be
approximated to any arbitrary accuracy." I was not saying that this is the delay which is approximated, I wanted to say there is no FIR or IIR filters which the transfer function is z^-1/2 (and in general z^-M/N), but they are filters that can approximate this transfer function, cf [2]. I am not really convinced by your example, you talk about delaying of 1/2 sample but no decimation. Indeed you can reconstruct value between samples with sinc function, but we return to the previous problem of the realization. The ideal fractional delay filter is nonrealizable because its impulse response is infinite (cf [2]).