DSPRelated.com
Forums

First Order Hold

Started by Unknown May 27, 2014
Is there really such a thing as a First Order Hold as you see in some textbooks?

I have looked many times at DAC outputs and all I see are staircase type waveforms ie Zero-Order Holds.

Also, with a high sampling rate the effect of the ZOH more or less vanishes - do we need to still analyse it? There is a phase shift of course which is important (-90 degrees at half sampling but this gets smaller too the faster you sample).
On 5/27/14 12:12 AM, gyansorova@gmail.com wrote:
> Is there really such a thing as a First Order Hold as you see in some textbooks?
i've never seen one.
> > I have looked many times at DAC outputs and all I see are staircase type waveforms ie Zero-Order Holds.
but you could make a circuit that would put an analog integrator (or a simple RC LPF with very low pole frequency) on the output of the DAC and, inside the DSP, put in a digital differentiator on the data going out to the DAC. that would get you a first-order hold.
> Also, with a high sampling rate the effect of the ZOH more or less vanishes - do we need to still analyze it?
not for sigma delta. but if you were doing a control system with digital control and an analog plant, and with conventional DACs (i dunno why you would, i remember an audio board with sigma-deltas and it was good all the way down to DC), then you might need to model it, if the sample rate was low.
> There is a phase shift of course which is important (-90 degrees at half sampling but this gets smaller too the faster you sample).
oversampling covers many, many digital sins. perhaps all of them. with enough oversampling, you get virtual analog. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Mon, 26 May 2014 21:12:48 -0700 (PDT), gyansorova@gmail.com wrote:

>Is there really such a thing as a First Order Hold as you see in some textbooks? > >I have looked many times at DAC outputs and all I see are staircase type waveforms ie Zero-Order Holds. > >Also, with a high sampling rate the effect of the ZOH more or less vanishes - do we need to still analyse it? There is a phase shift of course which is important (-90 degrees at half sampling but this gets smaller too the faster you sample).
What ZOH effect are you worried about? The sinx/x response? That depends on what you're doing with the output signal, etc., etc. Eric Jacobsen Anchor Hill Communications http://www.anchorhill.com
gyansorova@gmail.com wrote:

> Is there really such a thing as a First Order Hold as you see > in some textbooks?
> I have looked many times at DAC outputs and all I see are > staircase type waveforms ie Zero-Order Holds.
> Also, with a high sampling rate the effect of the ZOH more or > less vanishes - do we need to still analyse it? > There is a phase shift of course which is important > (-90 degrees at half sampling but this gets smaller too the > faster you sample).
Reminds me of complaints about early CD playes which used one DAC, multiplexed between two channels. The result is a half sample delay between the two. Seems better to consider it as a delay instead of a frequency dependent phase shift. Unless you are very careful where you put your head, you won't notice a half sample delay. -- glen -- glen
On 5/27/14 12:12 AM, gyansorova@gmail.com wrote:
> Is there really such a thing as a First Order Hold as you see in some textbooks? >
i did a quick Google and found these: http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770004750.pdf ‎ http://www.ece.pdx.edu/~tymerski/ece452/Chapter3.pdf ‎ http://en.wikipedia.org/wiki/First-order_hold the first-order hold i described was the "interpolating first-order hold" in the NASA doc. there is another first-order hold definition that tries to extrapolate to the next expected sample. seems awful weird to me. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 5/27/14 1:19 AM, glen herrmannsfeldt wrote:
> > Reminds me of complaints about early CD playes which used one DAC, > multiplexed between two channels. The result is a half sample delay > between the two.
some engineer(s) should have been lined up against a wall and shot for doing that. even back before the sigma delta days (or before they were in widespread use) we knew better. usually (using the Analogic parts) the left channel was put on a separate S/H and held for the half-sample while the right channel was getting updated. then both would go to the DAC deglitchers simultaneously. my very first published paper in 1988 was a little bit about that. but i thought that the early CD players had 2 DACs, both with latches.
> Seems better to consider it as a delay instead of > a frequency dependent phase shift.
i was, sorta advocating that (although too late for the red-book CD standard), that they *standardize* the digital stereo data format to stagger the times of left and right (and also to compensate for the sin(x)/x, or what the deglitchers did to the frequency response) in the digitally recorded data to start with. dumb idea now, but i thought at the time it was a good idea. probably it was still a dumb idea.
> Unless you are very careful where you put your head, you won't notice > a half sample delay.
you should notice something even when you sit in the sweet spot. delaying the right channel in playback when it was not recorded as such is just wrong. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Tuesday, May 27, 2014 5:12:30 PM UTC+12, robert bristow-johnson wrote:
> On 5/27/14 12:12 AM, gyansorova@gmail.com wrote: > > > Is there really such a thing as a First Order Hold as you see in some textbooks? > > > > i've never seen one. > > > > > > > > I have looked many times at DAC outputs and all I see are staircase type waveforms ie Zero-Order Holds. > > > > but you could make a circuit that would put an analog integrator (or a > > simple RC LPF with very low pole frequency) on the output of the DAC > > and, inside the DSP, put in a digital differentiator on the data going > > out to the DAC. that would get you a first-order hold. > > > > > Also, with a high sampling rate the effect of the ZOH more or less vanishes - do we need to still analyze it? > > > > not for sigma delta. but if you were doing a control system with > > digital control and an analog plant, and with conventional DACs (i dunno > > why you would, i remember an audio board with sigma-deltas and it was > > good all the way down to DC), then you might need to model it, if the > > sample rate was low. > > > > > There is a phase shift of course which is important (-90 degrees at half sampling but this gets smaller too the faster you sample). > > > > oversampling covers many, many digital sins. perhaps all of them. with > > enough oversampling, you get virtual analog. > >
Yes that was my impression. I agree. If you look in some control books they talk of the "choice of sampling interval"! Surely you sample as fast as you can get away with since as you point out we get back to analogue. I seem to remember them saying that if you sample too fast the poles can drift outside the unit circle. That sound like rubbish to me unless the original system is open-loop unstable in the first place.
On 5/27/14 2:03 AM, gyansorova@gmail.com wrote:
> On Tuesday, May 27, 2014 5:12:30 PM UTC+12, robert bristow-johnson wrote: >>
...
>> >> oversampling covers many, many digital sins. perhaps all of them. with >> enough oversampling, you get virtual analog. >> > Yes that was my impression. I agree. If you look in some control books they talk of the "choice of sampling interval"! Surely you sample as fast as you can get away with since as you point out we get back to analogue. I seem to remember them saying that if you sample too fast the poles can drift outside the unit circle. That sound like rubbish to me unless the original system is open-loop unstable in the first place.
there *are* issues if the sample rate is so big that when you compute anything like cos(w0) = cos(2*pi*f0/Fs) it gets so damn close to 1 that you cannot differentiate it from 1 in your numerical scheme. when that is the case, i have found that if i replace cos(w0) = 1 - 2*(sin(w0/2))^2 in all of the design equations that lead to the main difference equation that we implement, i can dance as close as i want to the unit circle and not slip and fall off the cliff. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Mon, 26 May 2014 23:03:53 -0700, gyansorova wrote:

> On Tuesday, May 27, 2014 5:12:30 PM UTC+12, robert bristow-johnson > wrote: >> On 5/27/14 12:12 AM, gyansorova@gmail.com wrote: >> >> > Is there really such a thing as a First Order Hold as you see in some >> > textbooks? >> >> >> >> i've never seen one. >> >> >> >> >> > >> > I have looked many times at DAC outputs and all I see are staircase >> > type waveforms ie Zero-Order Holds. >> >> >> >> but you could make a circuit that would put an analog integrator (or a >> >> simple RC LPF with very low pole frequency) on the output of the DAC >> >> and, inside the DSP, put in a digital differentiator on the data going >> >> out to the DAC. that would get you a first-order hold. >> >> >> >> > Also, with a high sampling rate the effect of the ZOH more or less >> > vanishes - do we need to still analyze it? >> >> >> >> not for sigma delta. but if you were doing a control system with >> >> digital control and an analog plant, and with conventional DACs (i >> dunno >> >> why you would, i remember an audio board with sigma-deltas and it was >> >> good all the way down to DC), then you might need to model it, if the >> >> sample rate was low. >> >> >> >> > There is a phase shift of course which is important (-90 degrees at >> > half sampling but this gets smaller too the faster you sample). >> >> >> >> oversampling covers many, many digital sins. perhaps all of them. >> with >> >> enough oversampling, you get virtual analog. >> >> > Yes that was my impression. I agree. If you look in some control books > they talk of the "choice of sampling interval"! Surely you sample as > fast as you can get away with since as you point out we get back to > analogue. I seem to remember them saying that if you sample too fast the > poles can drift outside the unit circle. That sound like rubbish to me > unless the original system is open-loop unstable in the first place.
Even today, you still have to be mindful of the cost of high-rate sampling, and some sensors (or drivers, if you're using PWM) choose the sampling interval for you. So choosing a sampling interval, while not as critical a tradeoff between cost (or straight feasibility) and performance as it used to be, is still a task that must be undertaken. As RBJ mentioned, the higher your sampling rate, the closer all the poles get to 1, and the more precision you need to distinguish them from 1. That means that as your sampling rate goes up so does your required word width. You can play tricks to alleviate the problem, but in the end you still often need to go to wider data paths. The poles drifting outside the unit circle stuff doesn't sound right -- a stable plant is a stable plant, and the z-domain poles of a linear time- invariant plant as seen by the controller always has poles that map straight from the plant's s-domain pole positions. I suspect the author was referring to some specific circumstance, but he may have been just plain incorrect. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Tue, 27 May 2014 12:20:44 -0500
Tim Wescott <tim@seemywebsite.really> wrote:

> As RBJ mentioned, the higher your sampling rate, the closer all the poles > get to 1, and the more precision you need to distinguish them from 1. > That means that as your sampling rate goes up so does your required word > width. You can play tricks to alleviate the problem, but in the end you > still often need to go to wider data paths. > > The poles drifting outside the unit circle stuff doesn't sound right -- a > stable plant is a stable plant, and the z-domain poles of a linear time- > invariant plant as seen by the controller always has poles that map > straight from the plant's s-domain pole positions. I suspect the author > was referring to some specific circumstance, but he may have been just > plain incorrect. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com >
I think that might be the thing you're saying. It's not that the poles of the transformed plant model sneak outside the unit circle, it's that the poles of the controller do because your numerical precision is insufficient to keep them in. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix.