Sampling, Again -- Updates

Mathematically ideal, perhaps, but hard to find in practice. Taking the sinc frequency characteristic* into account when one designs one's analog filters is absolutely necessary, of course.

  • Which is only an error if you don't want it, or can't easily work around it.
--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott
Loading thread data ...

The ZOH sinc response can be corrected either digitally prior to the DAC or in the reconstruction filter, whichever provides the best implementation tradeoff. I don't know of any practical way to implement an ideal impulse generator.

Eric Jacobsen Minister of Algorithms Abineau Communications

formatting link

Reply to
Eric Jacobsen

Ahhh. Right. Dangit.

--
http://www.wescottdesign.com
Reply to
Tim Wescott

Tim, Using a single sample to decide the values existing at later instants (up to 1/fs later in this case) is extrapolation. It is interpolation only when you use two or more samples to decide the values existing between samples. Regards, John

Reply to
John Monro

Eric, A crude way to minimise the sinc response is to drive the D/A output low for say half or three-quarters of each sample period. The catch is that the analog output drops by half or three quarters, which may not be convenient.

To do the process properly you insert zeros betwen signal samples and then pass the signal through a LP filter before going to the D/A. This process is of course sample-rate up-conversion.

Regards, John

Reply to
John Monro

Tim,

I have your book, and have recommended it to others. One thing I don't think you cover is Phelan's pseudo-derivative feedback (PDF) loops. have the nice feature of allowing essentially perfect rejection of load disturbances, at least if the system is really polynomial (as opposed to one containing time delays or thermal conduction, say).

Phelan's approach is basically to take whatever the controlled variable is and turn it into a one-pole rolloff using a proportional or proportional-derivative loop, and then wrap an integrating loop around that. That way the inner loop controls the load disturbance rejection and the outer one keeps the setpoint stable.

Phelan had an exceptionally well-developed ego, which isn't always helpful in getting one's ideas adopted widely, but it does seem as though his approach should be better known.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

e
t

t- Hide quoted text -

"> I have your book, and have recommended it to others."

Excellent, I was looking for an excuse to buy Tim's book.

George H.

Reply to
George Herold

Hi Jeroen, From the paper "The Origins of the Sampling Theorem" by Hans Dieter Lüke:

"Lastly, it should be mentioned that the sampling theorem is also treated in 1949 in the Japanese book Hakei Denso (Signal Transmission) by I. Someya. Hence, the term ?Someya?s Theorem? may be found in some Japanese literature."

See Ya', [-Rick-]

Reply to
Rick Lyons

Depends on where you put you time origin. If it's in the middle of the sample, a ZOH is an interpolator.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

Phil, Not he way I look at it, which is as follows:

If a process uses known samples to determine signal values at times OUTSIDE the interval covered by the known samples then the process is extrapolation. The prefix 'extra,' meaning 'outside,' indicates this.

If the process uses known samples to determine the signal values INSIDE the interval covered by the known values then the process is interpolation. Again, note the prefix.

The Zero Hold circuit uses the last known sample to determine that the signal will have this sample value at any later time, potentially for all of eternity, but in practice up until the instant that the next sample arrives.

As far as I can see, none of this depends on my choice of a t=0 point. If we choose t=0 to be half-way between samples as you suggest then extrapolation starts at t = -T/2 and continues up to t = +T/2. (T being the sampling interval.) For all of this time the Zero Hold circuit is producing values which are outside the interval covered by the known values, and so extrapolation is taking pleace.

Regards, John

Reply to
John Monro

Put it at the end and it's a predictor!

John

Reply to
John Larkin

Interpolation vs extrapolation depends on whether you are or are not outside the range of your actual data points. Estimating the data values before your first sample or after your last one is extrapolation, otherwise it's interpolation. Given that the samples are taken after the antialiasing filter, the value of each sample depends to some degree on the value of the input function at 'future' times--you can't very well make an antialiasing filter without at least one sample's worth of group delay!

Zero-order interpolation is all over the place, e.g. in the rectangle rule for integration, which is accurate up to terms of second order as long as the rectangles are centred on the data points.

It's not something I'm prepared to die defending, however.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

I wouldn't want to defend a claim that realisable anti-alias filters can be non-causal.

Regards, John

Reply to
John Monro

Neither would I. My claim was exactly the opposite--that due to the delay of the antialiasing filter, the signal for sample N+1 must already exist by the time we're processing sample N at the output. What's acausal about that?

And most DSP applications aren't real-time anyway.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

On re-reading your post I see that you were referring to the input anti-alias filter. As the disussion was all about what occurs at the system output I assumed that you were referring to the output reconstruction filter, and to samples that had not yet arrived at this filter.

I don't think the history of the system's input samples is relevant to the issue of whether the Zero-Hold circuit performs extrapolation or interpolation. By it's nature the Zero-Hold cicuit 'remembers' only the last sample presented to it and performs the simplest possible extrapolation of this value. As it uses only one input value it can not possibly be regarded as an interpolator.

Regards, John

Reply to
John Monro

Okay, we agree that sample N+1 already exists at time N, then.

You seem to be arguing that the fact that the value of sample N+1 doesn't appear in the mathematical form of the ZOH means that it's not an interpolator, but that isn't so. An Nth order interpolator needs data from at least N+1 sample points to determine all its coefficients, and since the ZOH is a zero-order interpolator, it only needs one data point.

The issue of interpolation vs eztrapolation is not the functional form of the interpolator, but whether or not you're doing it between samples (which we are, since we've both now decided that sample N+1 already exists at time N). This isn't semantics, it's a question of the reliability of the procedure.

Both interpolation and extrapolation introduce errors, and by making assumptions e.g. about the boundedness of some derivative of the function, you can put a bound on those errors.(*) The bound is commonly expressed in terms of some power of h (the time step) times the corresponding derivative bound, times a constant. This limit grows without bound as you get further and further from the last sample.

The operational distinction between extrapolation and interpolation is whether the errors are bounded, because you get another sample at time N+1 (interpolation), or whether they keep growing because you keep getting further from the last data point (extrapolation). That's a really important difference, one that goes a long way beyond sample numbering.

Cheers

Phil Hobbs

(*) In the special case of sinc interpolation of a genuinely band-limited function, the error is zero, but band-limiting requires infinite temporal extension, so we're never really in the zero-error case.

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

Sample N+! may exist, but since the Zero Order Hold Circuit does not have access to it, its existence is irrelevant to any discussion of the operation of the ZOH circuit.

Your argument is logically flawed because it assumes from the start that interpolation is possible with only one data point.

Interestingly, if we substitute 'extrapolator' where you have used 'interpolator' in your argument, we get the following statement which, while it is still not valid as an argument, it is at least a correct statement of fact: "An Nth order EXTRApolator needs data from at least N+1 sample points to determine all its coefficients, and since the ZOH is a zero-order EXTRApolator, it only needs one data point."

Your overall argument, that the ZOK is an interpolator, relies on your establishing that extrapolation is a special case of interpolation. I have never seen this view either in textbooks or in general useage, and I am sure it is not widely held.

Even if you think that extrapolation is a special case of interpolation I can not think of any good reason for you to query my use of the term 'extrapolation' in describing the action of the ZOH.

Regards, John

Reply to
John Monro

You haven't read what I've written, at least not very carefully.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

You're using a private vocabulary. The fact that it's being done between adjacent samples makes it interpolation, not extrapolation. See for example the following Google Books searches for "zero order interpolation" and "zeroth order interpolation":

formatting link
formatting link

One or two of them use nearest neighbour averaging as the zero-order interpolator, but most just use the nearest-neighbour value.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

I did, very carefully, before coming to the conclusion that while interesting, none of it is relevant to the issue of whether a ZOH performs extrapolation.

You might care to consider this: if the ZOH is NOT performing extrapolation, what would be the effect of putting an extrapolating circuit there instead?

Regards, John

Reply to
John Monro

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.