Thanks Tim. (with some time delay circuit, you could have all sorts of pre-ringing, even in analog-land.)
I'd have to do the programming to understand it.
George H.
Thanks Tim. (with some time delay circuit, you could have all sorts of pre-ringing, even in analog-land.)
I'd have to do the programming to understand it.
George H.
Question: The sinc is the FFT of one piece of the input data (with the window defining the width). In theory you redo the fft with each new data point. yes?
George H.
You don't have to recompute the FFT for each data point--it depends on what you're doing, but I usually wind up shifting an N-point FFT by about N/4, so it's only 4 times the work and not N times. Google for "scallop loss".
Cheers
Phil Hobbs
I'm not sure I understand IIR, but an FIR that just "looks ahead" by X, and "get's ready" for the step function, makes total sense.
(It's nice someone has worked out all the messy details.) George H.
Once you look at, and understand, a bit of the math, DSP is just a bit fat "DUH!" It clicks instantly (or... it should?).
Whereas an analog filter has a particular class of responses* to a continuous-time, real-valued function (i.e., the voltage or current or power you'd measure in circuit), a DSP does precisely the same thing but in discrete time steps.
*Namely, for a passive network: causality and reciprocity must be conserved. Which leads to a few obvious things (like power gain, or rather, the necessary lack thereof), and a few less obvious. "Minimum phase" cannot be zero phase; there's no limit on maximum phase though, so you can still have a flat phase response despite rising or falling amplitude response, as long as you've delayed the signal enough at all frequencies to allow it.For the IIR filter, you're doing explicitly what the analog filter is doing: capacitors and inductors are integrators (from current to voltage, or vice versa), so you replace volts and amps with counts in registers, and accumulate the register values, each time step, with the increment proportional to the integrator's input value. Apply feedback and voila, you have a single pole response! Chain two and loop, and you get a double pole response, the poles of which can be real valued (cf. RCRC filter), or complex (peaked LC), or unstable (right half plane**).
Higher order IIR filters are not usually used, because since you can synthesize any complex conjugate pair of poles you like with one two-pole stage, you simply chain those to get a desired response. Same as you'd do with Sallen-Key (or other) filters of higher order.
**Outside the unit circle, actually. The region of stability, for discrete (Z domain) systems, is, in a sense, "smaller" than the RHP restriction of continuous-time functions. That means the characteristic polynomials come out different, but the two are still similar enough that there exists a transformation function (it's just a simple ratio of sums and differences, actually) so you can literally convert an analog circuit into an IIR filter. In any case, almost no one actually solves the polynomials, but uses values from a table, so this is as academic as the usual case. :)FIR filters are, perhaps ironically, the more bizarre ones. The closest, easiest analog-ogy would be a transmission line with variable gain taps along its length; the sum over all the taps being the new output. The impulse response, that is, the output you get from a very short pulse propagating down the line, is simply the sequence of weights. But you'd never*** build a filter that way, because it sucks.
***To be fair, planar filters are about as close to this as you'll get; people have machined transmission lines for a particular wave shape before.In any case, that's what happens digitally; as the inputs cascade down a shift register, weights are applied and a new sum is calculated for each time step. The frequency response is hard to control (achieving precise frequency means needing a large number of FIR taps and a long shift buffer), but perhaps not as hard as the other case (where you need to solve polynomials instead!).
Tim
ise
),
Complicated FIR filters can be implemented by multiplying DFTs. (Properly s peaking the FFT is a class of algorithms for computing the DFT.)
Of course doing that requires lots more delay. (I don't usually
...care too much about that.)
Long FIRs tend to be narrowband, so you don't have to sample the filter output at the full input sampling rate. That's why you don't have to do an FFT per point.
Cheers
Phil Hobbs
(whose fingers are too fat for his phone)
Thanks Tim, Yeah it's not all that hard to understand from a distant perspective. The details of how it all gets implemented (quickly) would take some study time.
George H.
Yup, just lots of delay. The easiest case, of course, being a sliding average (boxcar) filter, for which you only need to sample the start and end, and 'integrate' (each cycle, add the new sample to the output, and subtract the oldest one).
Tim
Also, that's bizarre. The first one is quoted-printable, which munges the "> " quotes and I have to put them in manually. Google's news is just so awful...
Tim
SAW filters are exactly that.
How so? Each tap requires a buffer, because it's nonreciprocal. Or so much insertion loss as to not be very useful.
I'd... link some photos, but it seems there is a tremendous dearth of them out there! This is the only good one I can find(!):
I assume the center bondwire is ground, and the two on the left, and the two on the right, are the ports (balanced and isolated, I suppose).
They don't look very interdigitated in this example, but I have no idea if there is structure that doesn't resolve on this scale, or what kind of frequency response to expect from it. I can't imagine a shorted-out filter would be very useful, because that's what it looks like...
It's also not an FIR filter, for the simple fact that it's not baseband. Of course that's a silly niggle, but it's certainly not "exact"..
Tim
That's the first time I've heard a claim that "not baseband" implies an impulse response that doesn't have a finite length. Can you elaborate?
Allan
Sure. That's a time-domain implementation, though. For a general M-tap filter, the work goes like M**2 in the time domain, rather than k M log(M) in the frequency domain. The best case is when the transform length is about 2 M, I think.
Sometimes you can factor a long filter into shorter ones. In my Footprints work long ago, I was using a PIC17 micro with a vast and capacious 904 bytes of RAM. The data were coming from slow pyroelectric pixels with a charge-dispensing readout, so I was getting the first finite difference of a slow 1-pole response. Fixing that was going to require a lot of taps in the filter, so I factored it into a 9-sample FIR lowpass differentiator, followed by a running sum.
Of course pyros are inherently AC devices, so there's no signal at DC. Applying effectively infinite gain at a frequency where the SNR is zero is not a growth strategy--in my case it led to a random checkerboard pattern that diverged with time.
The solution was sort of interesting. The application was looking down from the ceiling at people shopping, and people are reliably warmer than floors (at least in places comfortable enough to shop in). Thus I could apply a positivity constraint to the integrated output: I put in a very slow negative-going drift, and zeroed out all negative values.
That made the random checkerboard go away, and gave nice high-SNR unipolar blobs corresponding to people.
Cheers
Phil Hobbs
Transversal filters used to be used a lot in radar. A guy in my group at grad school built a SAW-FET convolver, with a lithium niobate SAW delay line positioned microns above a row of MOSFETs with no gate connections. The E field from the surface wave in the piezo material modulated the conductance of the FETs, which were wired in parallel to form the output.
Worked great till a bored professor decided to tighten up the loose screws--right through both substrates. :(
Cheers
Phil Hobbs
You can make a FIR filter with any frequency response you like. Just digitize the impulse response and multiply by some convenient window function. (There are more exact methods too, of course.)
The first finite difference is a FIR filter with no DC response.
Cheers
Phil Hobbs
Yeah, the boxcar is a special case because its work goes as O(1) for any length N. :) It has a rather sloppy response (indeed, maximally sloppy, in the sense of TD-FD duality), though.
It would be fun to have "stepped pyramid" filters, where the steps are whole, easily-computed numbers (integer multiples or fractions, so they can be calculated easily with just a few shifts and adds/subtracts), but I kind of doubt there are any more useful than the boxcar and 1-3-3-1. (Of course, any cross section of Pascal's triangle will have those properties, but none of them require as few calculation steps relative to the period.)
In general, a "stepped pyramid" exhibits miniature sinc lobes, a set for each step. Still, a "better than boxcar to -xx dB" might be worth playing with, hmm.
I never played with it much, so there may be interesting things yet to figure out in that space.
Anyway, as for O(M^2) vs. O(M lg M), that's just our old Fourier friend at work; numerical multiplication is merely discrete convolution, and since FFT exists*, we can improve the asymptote by this amount.
*Proof by laziness: as long as Cooley and Tukey did their work, I don't have to. :^)(Say, the same tradeoff appears for sorting algorithms! Are those a case of a similar problem class? The commonality would seem to be the ability to recursively divide and conquer.)
Heh, cool. :)
They're doing much the same gimmickry today, what with the processor on the FLIR Lepton and related devices, but without the aid of mammals in their imagery, not necessarily.
Speaking of things that are warm blooded, I suppose such a thing wouldn't work so well on lizard people. So either the conspiracy theorists are wrong after all ...or you just didn't test the thing in Washington DC, say.
:^)
Tim
Hmmm, afraid I can't. Can't remember what I was thinking, and it looks wrong, so it's probably best that I've forgotten it anyway. :^)
Tim
Gauss invented it first (in 1805) and Lanczos and Danielson re-invented it in 1942. Cooley and Tukey invented it again in 1965, after computers had become available enough to make the - considerable - computational effort involved practicable.
Lizards are warm-blooded, just not as predictably and consistently warm as mammals. Mammals can hibernate, dropping their core body temperature close to ambient, but they wouldn't do it in the middle of a shopping mall, any more than lizard-people would.
Since FPUs are common even in $2 MCUs, it doesn't seem worth the trouble at this late date. I usually just use a windowed sinc function, meself.
Well, it was in a Target store in northeastern New Jersey, so that's close. ;)
Cheers
Phil Hobbs
Have something to add? Share your thoughts — no account required.
Ask the community — no account required