DSPRelated.com
Forums

minor confusion

Started by ma740988 November 30, 2003
I going around in circles and as such thought I'd inquire within.  So
now, consider:

y(n) = x(n) + 0.9y(n-1)

the claim is that the impulse response is a sampled exponential decay
(1, 0.9, 0.81, 0.73 ... )

In essence h(n) = (0.9)^n for n > 0 and 0 for n < 0.

I'm not following how h(n) = (0.9)^n for n > 0 and 0 for n < 0?


<<<<<<<<<<<<<<              2                >>>>>>>>>>>>>>>>>>

1.3 Why is the impulse response "finite"?
The impulse response is "finite" because there is no feedback in the
filter; if you put in an impulse (that is, a single "1" sample
followed by many "0" samples), zeroes will eventually come out after
the "1" sample has made its way in the delay line past all the
coefficients.

Now, in an FIR design the basic premise (sort of ) is to remove the
'zeros' as the signal moves through the filter?  If the output is not
predicated on the
'zeros' why bother with the zeros?

What exactly is the 'delay line' referred to above?

<<<<<<<<<<<<<<              3                >>>>>>>>>>>>>>>>>>

Tap - A FIR "tap" is simply a coefficient/delay pair. The number of
FIR taps, (often designated as "N") is an indication of 1) the amount
of memory required to implement the filter, 2) the number of
calculations required, and 3) the amount of "filtering" the filter can
do; in effect, more taps means more stopband attenuation, less ripple,
narrower filters, etc.)

'delay'??  How do you implement a 'delay'


Trying to ensure i understand the fundamentals before i proceed.
ma740988 wrote:

> I going around in circles and as such thought I'd inquire within. So > now, consider: > > y(n) = x(n) + 0.9y(n-1)
What a monster! given a steady input, the output blows up. You probably saw y(n) = 0.1x(n) + 0.9y(n-1) and left something out.
> > the claim is that the impulse response is a sampled exponential decay > (1, 0.9, 0.81, 0.73 ... )
Test that claim with what I wrote. ... I'm lost here about who said what. Please start over. 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;
Responses interspersed below:

"ma740988" <ma740988@pegasus.cc.ucf.edu> wrote in message
news:a5ae824.0311301514.1f2798df@posting.google.com...
> I going around in circles and as such thought I'd inquire within. So > now, consider: > > y(n) = x(n) + 0.9y(n-1) > > the claim is that the impulse response is a sampled exponential decay > (1, 0.9, 0.81, 0.73 ... ) > > In essence h(n) = (0.9)^n for n > 0 and 0 for n < 0. > > I'm not following how h(n) = (0.9)^n for n > 0 and 0 for n < 0?
h(n)=y(n) for the special case where x is a unit sample; where x(0)=1 and x(<>0)=0 This results in: h(n)=x(n) + 0.9*h(n-1) where x(0)=1 and x(<>0)=0 So, h(0)=x(0)=1 h(1)= 0 + 0.9*1=0.9 h(2)=0 + 0.9*0.9=0.81 .>
> > <<<<<<<<<<<<<< 2 >>>>>>>>>>>>>>>>>> > > 1.3 Why is the impulse response "finite"? > The impulse response is "finite" because there is no feedback in the > filter; if you put in an impulse (that is, a single "1" sample > followed by many "0" samples), zeroes will eventually come out after > the "1" sample has made its way in the delay line past all the > coefficients.
The impulse response (of h(n) above) isn't finite, it's infinite. There *is* feedback because each new output is a function of the prior outputs. You must be referring to something else that you've not explained.
> Now, in an FIR design the basic premise (sort of ) is to remove the > 'zeros' as the signal moves through the filter? If the output is not > predicated on the > 'zeros' why bother with the zeros?
????It isn't at all clear what you're talking about here....... Maybe you're talking about zero-stuffed sequences in an interpolation process? Then it would make some sense. Google on "polyphase filters" and "interpolation".
> > What exactly is the 'delay line' referred to above?
All digital filters are based on combining samples that have temporal indices (time values) associated with them that are different. Combining multiple samples together at one time implies that samples have been "delayed" in order to compute the sumes. The perspective is that time series "occur" contiguously in time. Delays are either used physically to allow combination of samples that occurred at different times or schematically to show time relationships among samples. If you're dealing with functions whose samples are calculated on the fly or stored in memory then the notion of delays is a bit further removed from what you're actually doing - but the mathematics will be the same and the notion of delays or time differences is important. You are dealing with difference equations....
> > <<<<<<<<<<<<<< 3 >>>>>>>>>>>>>>>>>> > > Tap - A FIR "tap" is simply a coefficient/delay pair. The number of > FIR taps, (often designated as "N") is an indication of 1) the amount > of memory required to implement the filter, 2) the number of > calculations required, and 3) the amount of "filtering" the filter can > do; in effect, more taps means more stopband attenuation, less ripple, > narrower filters, etc.)
Not exactly...... the coefficients and the delays don't pair up if there's a coefficient at each end of the delay sequence. There can be 1 more coefficient than there are delays. If there are N coefficients, the memory requirement is N-1. If there are N coefficients (and they aren't symmetrical) then there are N multiplies and N adds to get an output sample.
> > 'delay'?? How do you implement a 'delay'
A number of ways I can think of: 1) In the olden days one might launch a signal of interest down a physical delay line and then plan to observe the signal coming out of the delay line at a later time, thus delayed. It doesn't matter if the signal is analog or digital in some form as long as the coding method makes sense. If you use a series of such delay lines, you can observe the signal of interest at a variety of delays (ages) where one delay line/element output connects to the input of the next.. Example: Signal x(t) into a series of unit delays shown at time=0 x(t) >---------+---- x(0) | | +--+--+ | 1 | |delay| +--+--+ | +---- x(-1) | +--+--+ | 1 | |delay| +--+--+ | +---- x(-2) | +--+--+ | 1 | |delay| +--+--+ | +---- x(-3) 2) As soon as digital memories became available, the need for physical delay lines in signal processing reduced. Delays are achieved using memory like this: 2a) Sample a signal of interest and save the result in memory location M+count 2b) Increment count by 1 2c) Repeat at 2a at the next defined point in time. Each sample thus saved in memory is delayed from the time it was sampled and saved to the time it is observed later. Example: Signal x(t) sampled into a series of memory locations shown at time=0 x(t) The sampled signal +--+--+ +--+--+ +--+--+ +--+--+ | | | | | | | | Memory locations | M+0 | | M+1 | | M+2 | | M+3 | at M+count +--+--+ +--+--+ +--+--+ +--+--+ x(-3) x(-2) x(-1) x(0) 3) If the processing is being done in a simulation loop where time in incremented in steps or if calculating of samples is "Instantaneous" (or in parallel) compute samples of a signal of interest represented at a number of points in time. (This assumes you have an a priori method for computing the signal at any defined point in time). If you define "now" as the time for the latest sample thus generated, all of the other samples are delayed by your choice of "points in time". Iterate by updating the points in time before each new calculation. Note that the points of time at each iteration may overlap considerably perhaps by introducing only one new point each time and dropping off the oldest point each time the calculation is made. .....>relative time +--+--+ +--+--+ +--+--+ +--+--+ | | | | | | | | |x(0) | |x(1) | |x(2) | |x(3) | 0 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ ^ | | | | | | | | . |x(-1)| |x(0) | |x(1) | |x(2) | 1 . +--+--+ +--+--+ +--+--+ +--+--+ . +--+--+ +--+--+ +--+--+ +--+--+ . | | | | | | | | delay/memory location |x(-2)| |x(-1)| |x(0) | |x(1) | 2 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ | | | | | | | | |x(-3)| |x(-2)| |x(-1)| |x(0) | 3 +--+--+ +--+--+ +--+--+ +--+--+ 0 1 2 3 .....>relative time 1,2,3 1,2,3 1,2,3 1,2,3 relative delays So, it's pretty clear that the last one is wasteful in compute time because you'd be recomputing nearly all the same sample values at each time step. So, this is just to make the point that if you have a formula for a function then you can compute the samples (including time-delayed or time-advanced ones) any old time you want. You still need memory locations to store the results - so it's not too much of a stretch to compare with the 2nd example. Then all you need to to is to combine the right ones as if they came out of a delay line. This gives rise to the notion of a circular buffer (which you can look up). Then example number 3 would look like this using circular buffering/storage: .....>relative time +--+--+ +--+--+ +--+--+ +--+--+ | | | | | | | | |x(0) | |x(0) | |x(0) | |x(0) | 0 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ ^ | | | | | | | | . |x(-1)| |x(-1)| |x(-1)| |x(3) | 1 . +--+--+ +--+--+ +--+--+ +--+--+ . +--+--+ +--+--+ +--+--+ +--+--+ memory location | | | | | | | | |x(-2)| |x(-2)| |x(2) | |x(2) | 2 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ | | | | | | | | |x(-3)| |x(1) | |x(1))| |x(1))| 3 +--+--+ +--+--+ +--+--+ +--+--+ 0 1 2 3 .....>relative time 1,2,3 1,2,3 1,2,3 1,2,3 relative delays Here, the same sample values are stored but their locations in memory aren't moved - they are overwritten when the time comes. The addresses for the beginning and the end of the sequence moves circularly through the memory addresses. In the example, the newest sample is at locations: 0,3,2,1 respectively as time increases. Fred
Jerry Avins wrote:
> ma740988 wrote: > >> I going around in circles and as such thought I'd inquire within. So >> now, consider: >> >> y(n) = x(n) + 0.9y(n-1) > > > What a monster! given a steady input, the output blows up.
Isn't that what an integrator does? -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:

> Jerry Avins wrote: > >> ma740988 wrote: >> >>> I going around in circles and as such thought I'd inquire within. So >>> now, consider: >>> >>> y(n) = x(n) + 0.9y(n-1) >> >> >> >> What a monster! given a steady input, the output blows up. > > > Isn't that what an integrator does?
Yeah, but an integrator doesn't display exponential decay. He wrote, "the claim is that the impulse response is a sampled exponential decay (1, 0.9, 0.81, 0.73 ... )" 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;
Jerry Avins wrote:
> Randy Yates wrote: > >> Jerry Avins wrote: >> >>> ma740988 wrote: >>> >>>> I going around in circles and as such thought I'd inquire within. So >>>> now, consider: >>>> >>>> y(n) = x(n) + 0.9y(n-1) >>> >>> >>> >>> >>> What a monster! given a steady input, the output blows up. >> >> >> >> Isn't that what an integrator does? > > > Yeah, but an integrator doesn't display exponential decay. He wrote, > "the claim is that the impulse response is a sampled exponential decay > (1, 0.9, 0.81, 0.73 ... )"
Maybe a leaky one does? -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Randy Yates wrote:
> Jerry Avins wrote: > >> Randy Yates wrote: >> >>> Jerry Avins wrote: >>> >>>> ma740988 wrote: >>>> >>>>> I going around in circles and as such thought I'd inquire within. So >>>>> now, consider: >>>>> >>>>> y(n) = x(n) + 0.9y(n-1) >>>> >>>> >>>> >>>> >>>> >>>> What a monster! given a steady input, the output blows up. >>> >>> >>> >>> >>> Isn't that what an integrator does? >> >> >> >> Yeah, but an integrator doesn't display exponential decay. He wrote, >> "the claim is that the impulse response is a sampled exponential decay >> (1, 0.9, 0.81, 0.73 ... )" > > > Maybe a leaky one does?
That could be it. The rest of his message was confused enough -- e.g., surprised that an IIR doesn't exhibit a finite impulse response -- that I figures it best to start over. At least if he and I are to have a mutually intelligible conversation. Maybe you can see deeper than I on some of his issues. If so, please interrupt me! 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;
On Sun, 30 Nov 2003 19:59:09 -0500, Jerry Avins wrote:
> ma740988 wrote: > >> I going around in circles and as such thought I'd inquire within. So >> now, consider: >> >> y(n) = x(n) + 0.9y(n-1) > > What a monster! given a steady input, the output blows up. You probably > saw y(n) = 0.1x(n) + 0.9y(n-1) and left something out.
That's strictly a scaling of the output, relative to the input. It doesn't change the shape of the impulse response. Note that the discrete impulse response will be exactly as the OP stated, with the equation as it was. Yes, it'll blow up for a step input, but that wasn't the question.
>> the claim is that the impulse response is a sampled exponential decay >> (1, 0.9, 0.81, 0.73 ... )
I think that the OP, a student somewhere, given the mail address, is probably conflating several sequential but unrelated questions... Cheers, -- Andrew
Randy Yates wrote:
> Jerry Avins wrote: >> Randy Yates wrote:
(snip)
>>> Isn't that what an integrator does?
>> Yeah, but an integrator doesn't display exponential decay. He wrote, >> "the claim is that the impulse response is a sampled exponential decay >> (1, 0.9, 0.81, 0.73 ... )"
> Maybe a leaky one does?
I was once building a slow sweep generator (for electrochemistry experiments) which has an integrator and two comparators to switch the input to the integrator at the appropriate point. First get the lowest leakage capacitor I could find. Then use the offset null inputs on the op-amp. With the offset null and a 10 turn trimmer pot I could get it to work pretty well. I suppose now it would be done all digital, with a D/A at the output, but that was long enough ago that analog was the way to do things. -- glen
Andrew Reilly <andrew@gurney.reilly.home> writes:

> On Sun, 30 Nov 2003 19:59:09 -0500, Jerry Avins wrote: > > ma740988 wrote: > > > >> I going around in circles and as such thought I'd inquire within. So > >> now, consider: > >> > >> y(n) = x(n) + 0.9y(n-1) > > > > What a monster! given a steady input, the output blows up. You probably > > saw y(n) = 0.1x(n) + 0.9y(n-1) and left something out. > > That's strictly a scaling of the output, relative to the input. > It doesn't change the shape of the impulse response. Note that > the discrete impulse response will be exactly as the OP stated, > with the equation as it was. Yes, it'll blow up for a step > input, but that wasn't the question.
Um, why do people think it will blow up? Perhaps if we re-wrote it like this: y(n) = 0.9y(n-1) + x(n) (I've just swapped the order of the right hand side of the equation from the way the original poster had it). Sure, a step input will (eventually) give an output of 10 rather than, but it doesn't have a pole at DC as far as I can tell. ?? Ciao, Peter K. -- Peter J. Kootsookos "I will ignore all ideas for new works [..], the invention of which has reached its limits and for whose improvement I see no further hope." - Julius Frontinus, c. AD 84