From: Andor on
FatScouser wrote:

> Am afraid I can't give you figures for acceptable passband ripple and
> attenuation. All I can say is that I'm using this DSP package to set a
> highpass filter at 0.2 Hz, and the output shows a significant ripple at the
> same frequency when there is no signal in the input.

This sounds like your filter implementation is broken. Software that
generates a non-zero output from zero input is not an LTI filter. Does
this fact change if you specify any other filter type (lowpass, for
example)?

It might well be that the FFT/Multiply/IFFT part in the filter package
is not correctly coded. Simple as it sounds, the implementation
details are sometimes hairy. Try another DSP package?

Regards,
Andor
From: Tim Wescott on
Andor wrote:
> FatScouser wrote:
>
>> Am afraid I can't give you figures for acceptable passband ripple and
>> attenuation. All I can say is that I'm using this DSP package to set a
>> highpass filter at 0.2 Hz, and the output shows a significant ripple at the
>> same frequency when there is no signal in the input.
>
> This sounds like your filter implementation is broken. Software that
> generates a non-zero output from zero input is not an LTI filter. Does
> this fact change if you specify any other filter type (lowpass, for
> example)?
>
> It might well be that the FFT/Multiply/IFFT part in the filter package
> is not correctly coded. Simple as it sounds, the implementation
> details are sometimes hairy. Try another DSP package?
>

I was assuming a sampling artifact, as if, for example, the data has a
healthy slope to it.

But I'm just guessing -- indeed, if it's getting an altogether zero
input (or an exactly constant input) and it's ringing, then there's
something wrong with the FFT/IFFT implementation.

--
Tim Wescott
Control system and signal processing consulting
www.wescottdesign.com
From: FatScouser on
Hi Tim,

Many thanks for your help.

I'm using a tool called SigView for frequency analysis. This seems tailored
towards audio processing and high-frequency analysis. Our application is
low frequency (<100Hz) motion control, however. Do you - or does anyone
else - know of a spectrum analyzer tool more applicable for low
frequencies?

Thanks again,

John

>FatScouser wrote:
>(top posting fixed)
>> On 12 apr, 10:02, "FatScouser" <john.hague(a)n_o_s_p_a_m.truebit.co.uk>
>>> wrote:
>>>> Hi,
>>>>
>>>> I'm using an off-the-shelf DSP package to apply an FFT-based highpass
>>>> filter to a time-domain signal. This causes 'ringing' in the output,
>> where
>>>> a sine wave appears from nowhere having the same frequency as the
high
>> pass
>>>> cut-off frequency. The DSP package does not provide much information
>> about
>>>> how the filter works, only that it is FFT-based.
>>>>
>>>> Working solely within the time domain, can anyone suggest what sort
of
>>>> filter or filter settings I should be using so I don't see the
rinning
>>>> artifacts?
>>> Ringing is part of the filter response. There is nothing
>>> you can do to prevent it from happening.
>>>
>>> What remains is to control it so that it stays within
>>> acceptable limits. There are several factors that influence
>>> ringing, like the width of stop-bands, notches and transition
>>> bands.
>>>
>>> A lot of amateurs don't understand these things, and write
>>> an FFT-based routine that zeros an arbitrary set of DFT
>>> coefficients. This is a certain way to intropduce these kinds
>>> of artifacts.
>>>
>>> To get a working filter,
>>>
>>> 1) Come up with a specification. Not for what you want (everybody
>>> want all the benefits without all the drawbacks), but for what
>>> you need (the benefit you can't do without and the drawbacks
>>> you can live with).
>>>
>>> 2) Use a filter design package to find the filter that satisfies
>>> the spec from 1).
>>>
>>> Rune
>>>
> > Hi,
> >
> > Thanks a lot for your feedback. Specification details include:
> >
> > 1. High-pass filter with cut-off at 0.5 Hz. Cut-off precision is not
> > critical: a cut-off between 0.2 -> 0.8 Hz is fine.
> >
> > 2. This is a non-realtime calculation, so large computation time is no
> > problem.
> >
> > 3. A typical signal is a 25 second sample comprising 10000 points
sampled
> > at 400 Hz.
> >
> > Any help much appreciated!
>
>My knee-jerk reaction with this specification would be to try a filter
>with a raised-sine cutoff that starts at 0.2Hz and runs 0.8Hz. You'll
>get ringing, but it'll be much attenuated over a filter that just hits a
>brick wall at 0.2Hz.
>
>But without knowing the details of your DSP packages I'm not sure if you
>can specify this.
>
>And without knowing what you really need I'm not sure if this will be
>satisfactory. You can always give it a whirl, and see.
>
>What Rune was trying to point out is that _any_ filter that takes the
>response all the way to zero at any frequency other than DC will suffer
>from ringing to a greater or lesser extent -- you don't get to control
>the existence of ringing, you just get some control over the extent.
>
>If you're filtering distinct chunks of data then windowing the data will
>hold down the spurious high-frequency content and therefore the amount
>of ringing -- but the span over which the windowing function transitions
>from no to full gain will need to be longer than 5 seconds to make much
>difference to a filter that rings at 0.2Hz.
>
>--
>Tim Wescott
>Control system and signal processing consulting
>www.wescottdesign.com
>