Digital filter application

Thread Starter

benedip

Joined Jan 14, 2021
3
Dear all,
I designed a digital FIR filter using the frequency sampling method and I got the filter coefficients.
Now, I'm working on a real-time (time-domain) application (a numerical simulation) where the time step is varying (depending on the case). In this application the motion of a device (let's call it X(t) ) is function of time and has to be filtered with the filter designed. The problem is that the motion of this device has to be defined at each variable time step but the filtering procedure (convolution with filter coefficients) has to be applied ONLY at some specific time steps (related to the frequency sampling of my filter).
Does anyone know how to solve it?
best regards,
Benedetto
 

Papabravo

Joined Feb 24, 2006
16,107
I don't think the digital filter cares about the nature of the input. The output will be well defined regardless of the nature of the input. The only condition is that the input must go through an ANALOG anti-aliasing filter before being presented to the digital filter. I think this requirement is fundamental to using digital filters.
 

Thread Starter

benedip

Joined Jan 14, 2021
3
Thank you very much for your reply.

I am not sure I got your suggestion. Why should I use an ANALOG anti-aliasing filter? Do you mean analog to digital conversion for my input? My input is already a digital signal

best regards
 

dom11990

Joined Jan 12, 2013
5
I've actually not encountered a variable rate sampling issue before. This seems quite undesirable if you want your filter to function as designed. Perhaps you can resample your input data first to a constant rate and then push it through the filter?
 

Thread Starter

benedip

Joined Jan 14, 2021
3
Thank you dom11990

However I can't resample my input. The time step is something is variable because of the application (numerical simulation) and it can't be changed or imposed for stability issues. So far, what I did is to apply the convolution only when the time step of the simulation correspond to the time step of the filter (related to the sampling frequency). For the other time steps I applied and extrapolation of the previous output (convolution as above). I know that it would never be correct as the filter coefficients are defined at equal time intervals (in other words Gain and phase at equal frequency intervals) but they may deviate in between these intervals.
I think that what I could need is something like the "Convolution with variable time stepping".
I found the following reference but I am still understanding it

Generalized convolution quadrature with variable time stepping. PartII: Algorithm and numerical results
Maria Lopez-Fernandeza, Stefan Sauter

Could you suggest me something?

kind regards
 

Papabravo

Joined Feb 24, 2006
16,107
Thank you very much for your reply.

I am not sure I got your suggestion. Why should I use an ANALOG anti-aliasing filter? Do you mean analog to digital conversion for my input? My input is already a digital signal

best regards
A good question. A digital low pass filter will actually pass high frequencies above the sample rate back into the passband. In order to eliminate that possibility, an ANALOG filter is required to limit the high frequency content of the incoming signal. Any purely digital filter can be faked out by high frequency signals that show up in the passband as low frequency components that are just not there. Those illusory low frequency components are the aliases of the high frequency content that was not attenuated by the front end anti-aliasing ANALOG filter. See the following article for additional information and references.

https://en.wikipedia.org/wiki/Anti-aliasing_filter#:~:text=An anti-aliasing filter (AAF,over the band of interest.

An arbitrary digital signal can still have high frequency content when passed to another digital process that will cause aliasing.
 

andrewmm

Joined Feb 25, 2011
1,464
Im confused, you say at one point simulation and at the other real time

If its simulation, each sample is at a set step from the previous,
even if they pop out in "gulps"

If its real time,
Again, each sample is at a fixed time interval after the last,
so you can just filter,

The filter does not care about the timing of the data , on each new data in it does the next step in the filter,


Can you present a diagram of what your doing please so we can be clear.
 
Top