DSPRelated.com
Forums

IIR not fully causal?

Started by Carlos Moreno May 7, 2005
Andor wrote:
> The OP did say that he saw this trick for the first time in a CD > player. That's where he got his vocabulary from. > > The worst definnition of "oversampling" I have seen is in the > webopedia: > > http://www.webopedia.com/TERM/o/oversampling.html > > Talk about popular usage that doesn't make sense ... :( > > Regards, > Andor >
Hey Webopedia: Both oversampling and antialiasing fall under digital signal processing. They are no more the same thing than are gasoline mufflers. Fix your definition or delete it. It's plain wrong. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Jerry Avins" <jya@ieee.org> wrote in message news:4280D419.508@ieee.org...
> Andor wrote: > > The OP did say that he saw this trick for the first time in a CD > > player. That's where he got his vocabulary from. > > > > The worst definnition of "oversampling" I have seen is in the > > webopedia: > > > > http://www.webopedia.com/TERM/o/oversampling.html > > > > Talk about popular usage that doesn't make sense ... :( > > > > Regards, > > Andor > > > > Hey Webopedia: > > Both oversampling and antialiasing fall under digital signal processing. > They are no more the same thing than are gasoline mufflers. Fix your > definition or delete it. It's plain wrong.
If anyone wants to take on the cause, you can report an error here: http://www.webopedia.com/FORMS/report_an_error.asp
glen herrmannsfeldt wrote:

> [...] > > It might be the first time I heard the term oversampling was in the > design of CD players using digital filters. In the early days when > 16 bit DACs were expensive there was a system to use 14bit DACs at > 4x the sampling rate. What should have been, as you say, upsampling > was called oversampling, maybe by the marketing department. > > I don't know if the usage has stuck or not. I do agree that upsampling > makes more sense, but popular usage doesn't always make sense.
I do think that oversampling totally makes sense. As someone explained, a signal is oversampled if it has samples more frequently than the minimum necessary -- e.g., a signal with bandwidth limited to below 20kHz sampled at 100kHz. So, why is the term oversampling incorrect? Oversample, as a verb, as an action done to a digitized signal, should mean "turn the signal into an oversampled one" -- that's exactly what' happening. So, why is it incorrect? Upsampling would be ok, except for the fact that how do you make the distinction between that process and the process of just putting one sample with N-1 zeros interleaved? Carlos --
Andor wrote:

> The OP did say that he saw this trick for the first time in a CD > player. That's where he got his vocabulary from. > > The worst definnition of "oversampling" I have seen is in the > webopedia: > > http://www.webopedia.com/TERM/o/oversampling.html > > Talk about popular usage that doesn't make sense ... :(
Actually, when you see their definition of antialiasing, you realize that they're talking about a completely different thing that happens to have the same name. So, no, I would say their definition is not incorrect; it's just recklessly ignoring the definition of another thing also called oversampling. Actually, we could accuse it of being incomplete as well, but then, an accurate description of antialiasing in the context of image resizing would be too complex for a web-o-pedia, I guess... Carlos --
Carlos Moreno wrote:

(snip)

>> http://www.webopedia.com/TERM/o/oversampling.html
> Actually, when you see their definition of antialiasing, you > realize that they're talking about a completely different > thing that happens to have the same name.
It's not really that different, but it is a small subset of the antialiasing cases. It comes from the pixel sampling of an image relative to that required to make a given diagonal line.
> So, no, I would say their definition is not incorrect; it's > just recklessly ignoring the definition of another thing also > called oversampling.
Well, a special case, and a special solution for a general problem.
> Actually, we could accuse it of being incomplete as well, but > then, an accurate description of antialiasing in the context > of image resizing would be too complex for a web-o-pedia, I > guess...
I won't comment on this one. -- glen
Carlos Moreno wrote:
> So, why is the term oversampling incorrect? Oversample, as a > verb, as an action done to a digitized signal, should mean > "turn the signal into an oversampled one" -- that's exactly > what's happening. So, why is it incorrect?
The result of upsampling is not necessarily an oversampled signal. If the original signal was undersampled (high-freq components previously filtered or not), then the result is not the same as if the analogue signal had been oversampled.
Jerry Avins wrote:
> Andor wrote: > >> The OP did say that he saw this trick for the first time in a CD >> player. That's where he got his vocabulary from. >> >> The worst definnition of "oversampling" I have seen is in the >> webopedia: >> >> http://www.webopedia.com/TERM/o/oversampling.html >> >> Talk about popular usage that doesn't make sense ... :( >> >> Regards, >> Andor >> > > Hey Webopedia: > > Both oversampling and antialiasing fall under digital signal processing. > They are no more the same thing than are gasoline and mufflers. Fix your > definition or delete it. It's plain wrong. > > Jerry
The following message to <feedback@webopedia.com> was undeliverable. The reason for the problem: 5.1.0 - Unknown address error 550-'5.2.1 <feedback@webopedia.com>... Mailbox disabled for this recipient' Final-Recipient: rfc822;feedback@webopedia.com Action: failed Status: 5.0.0 (permanent failure) Diagnostic-Code: smtp; 5.1.0 - Unknown address error 550-'5.2.1 <feedback@webopedia.com>... Mailbox disabled for this recipient' (delivery attempts: 0) Reporting-MTA: dns; smtp05.mrf.mail.rcn.net Subject: Re: IIR not fully causal? From: Jerry Avins <jya@ieee.org> Date: Tue, 10 May 2005 11:32:41 -0400 To: feedback@webopedia.com Newsgroups: comp.dsp Message-ID: <4280D419.508@ieee.org> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.dsp References: <Co4fe.60629$pe1.955226@wagner.videotron.net> <d5n7ac$f5v$1@blue.rahul.net> <1115629484.850031.156140@o13g2000cwo.googlegroups.com> <1115634209.082585.202820@g14g2000cwa.googlegroups.com> <CcSdnZF5db_0uR3fRVn-jg@rcn.net> <Y_mdnRpr2siN-x3fRVn-rQ@comcast.com> <1115711437.802373.38650@o13g2000cwo.googlegroups.com> In-Reply-To: <1115711437.802373.38650@o13g2000cwo.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Andor wrote: > The OP did say that he saw this trick for the first time in a CD > player. That's where he got his vocabulary from. > > The worst definnition of "oversampling" I have seen is in the > webopedia: > > http://www.webopedia.com/TERM/o/oversampling.html > > Talk about popular usage that doesn't make sense ... :( > > Regards, > Andor > Hey Webopedia: Both oversampling and antialiasing fall under digital signal processing. They are no more the same thing than are gasoline mufflers. Fix your definition or delete it. It's plain wrong. 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;
Carlos Moreno wrote:

> I've been thinking about this crazy idea that I assume has > to be something that someone did already.
It's not that crazy. To my opinion, it's what comes to your mind if you think of it while you have your goal in mind, but neither filter solves the task. It's like a wanderer in the desert who starts "seeing" water in the distance...
> ... > Let's say that we have a situation where non-linear phase > is also out of the question (i.e., we must reconstruct the > signal such that it is very close to the "true" signal *in > the time domain* -- i.e., quasi-zero-phase is a requirement). > ... > I'm thinking, what if we do an IIR in which the output of > the filter is the previous sample (or N samples before, in > general).
"Helping" the filter by introducing additional knowledge is legal, and may improve the filter's quality, even with respect to delay time. It only depends, if the manner how this knowledge is introduced in the filter algorithm, is adequate...
> > The idea is that, intuitively, a casual IIR has a hard time > reconstructing with quasi-zero-phase because it can not know > where the signal is going. But then, if we allow it to > know one sample in the future (or, in general, N samples in > the future, where N is much smaller than the N we would need > for a linear phase FIR), it could do a much better job.
To my opinion an IIR filter will give you no advantage except that it is more effective with respect to calculation/processing time. You'll see a delay effect of the same size as in a FIR filter. If you use a low pass filter, this is not so obvious, since you get an output value "immediately", while the FIR filter provides it only after N samples. But that's wrong! Indeed, the FIR provides an output immediately, as soon as the first sample goes in! But it needs some time until the transient part fades away (the initial condition loses its effect). This is the same with an IIR filter. You can watch this if you apply a step function to a high pass filter: There's a terrific error in the beginning which needs time to decline. Since both filters need enough time to be "loaded" with correct samples, they'll be a bad choice if you need a precise result without the expense of that loading time. Investing one additional sample will help exactly that much! I'd start from a pure mathematical platform, since a digital filter isn't much more than applying mathematical algorithms. If you know that the signal is a sine wave, and you know the frequency, amplitude and a certain phase information/starting point, it's quite easy to predict the next output value of your filter. But your filter would certainly not be an IIR-filter. Instead you'd apply the sine function and calculate the next point. (That's trivial, isn't it?) Usually, you know more about your signal than you realize in the beginning: How is the signal generated? Is it monotonic? Is it repetitive? Try to find a mathematical approach of the curve or of one of the derivatives. If you're successful, you can apply this knowledge to create a filter which does what you require (or at least which gives a better approach than a "dumb" low pass filter. This would lead to some sort of prediction, which is as good as your estimation of the mathematical/physical background of your signal. I tried another approach, when I had to solve an alike task. I looked at the signal at a certain point, and then I calculated the acceptable aperture (imagine the next point a little bit too high and a little bit too low). If you try this with your signal, and if you can predict the signal's next sample with enough precision, then you have additional information. Find out, where this information is hidden. I guess that you'll find a better result by replacing your FIR or IIR filter by a sort of prediciting filter which uses this knowledge. How can you solve this in practise? Take a spread-sheet program like Excel. List a number of samples. Draw a diagram and look at it. Does it give you any hint? Calculate a numerical derivative as (sample2-sample1)/(sample time) Draw a digram and look at it. Does this give you any hint? No? Go on with deriving the derivative. Now try to calculate the next sample by only using the previous ones. If it helps, use the derivatives, but only those which are produced by samples older than the one which must be currently calculated. If you get lost without results, try your idea of investing one additional sample. If this helps/works in your Excel sheet, it will hold,too, in a practical application. The required algorithms are found in your Excel sheet... This approach helped me sometimes, after I've got lost dealing with IIR filters... Bernhard
Bernhard wrote:

> Now try to calculate the next sample by only using the > previous ones. If it helps, use the derivatives, but only > those which are produced by samples older than the one > which must be currently calculated. > > If you get lost without results, try your idea of > investing one additional sample. If this helps/works in > your Excel sheet, it will hold,too, in a practical > application. The required algorithms are found in your Excel > sheet.
Bernhard, I'm not really sure why you include the differences -- the difference sequence is just a linear-phase high-passed version of the input sequence (the order of the highpass depends on how many differencing steps you go through). I don't think it will give you information which is not already present in the original input sequence. One way to try and predict a signal is by fitting (for example with least squares) an IIR oscillator of high order (you can imagine a series of 2nd order oscillators) to the known part of the sequence. The prediction process then simply consists of initializing the oscillators with the given sequence and letting them "ring" to produce new output samples. You can add an FIR filter in series to the oscillators to model attenuation. For harmonic signals (vocals or single instruments) this can give quite good results (technical term is "ARMA modeling"). This process is also desribed in another thread about pre-whitening. Regards, Andor
Andor wrote:


> Bernhard, > > I'm not really sure why you include the differences -- the difference > sequence is just a linear-phase high-passed version of the input > sequence (the order of the highpass depends on how many differencing > steps you go through). I don't think it will give you information which > is not already present in the original input sequence.
That's correct. Derivation doesn't introduce additional information. However, to preserve the original function after integration, you'll have to differentiate it before. We're used to apply "dumb" filters to do that at the cost of additional delay. However, if that delay is inacceptable, we'd better stick to the underlying maths x = int((dx/dt)dt)+C. That's the background of my idea. In the end this may lead to a tracking algorithm (sliding average), since we usually don't know dx/dt exactly.
> > One way to try and predict a signal is by fitting (for example with > least squares) an IIR oscillator of high order (you can imagine a > series of 2nd order oscillators) to the known part of the sequence. The > prediction process then > simply consists of initializing the oscillators
I tried this once, but there was that quantum phenomenon:-( it became more complicated, the closer I got to my goal. (In the end, I abandonned that approach) If that can really be done "simply", can you provide a reference for it? Maybe I could benefit from that, soon. Regards Bernhard