Anti aliasing in the real world?

M

mikem

Jan 1, 1970
0
I am experimenting with a PID controller which will be implemented in
a microcontroller. The inputs come from gyroscopes and navigation
equipment. The rate of change of these signals is instrisically slow,
i. e. milliHz to 1Hz. Even without low pass filtering, these signals
naturally exhibit at least a 20db per decade rolloff above 1Hz.

AFIK, the update rate for the outputs can be as low as 10Hz (10x the
fastest input) without compromising stability. This would dictate that
the inputs should be sampled once per 100ms, fed through the control
law, which then updates the outputs at 10Hz.

If you have a signal with a natural cutoff frequency (-3db) of 1Hz
(above which the signal exhibits a -20db/decade rolloff), and you want
to sample that signal at 10Hz, how much additional anti-alias low-pass
filtering needs to added before a 10bit A/D?

Computationally, the microcontroller probably can sample and update at
100Hz. If I turn up the compute rate to 100Hz, is the natural rolloff
of the input signals sufficient to provide anti-aliasing without
adding additional filtering?

MikeM
 
B

Bill Sloman

Jan 1, 1970
0
mikem said:
I am experimenting with a PID controller which will be implemented in
a microcontroller. The inputs come from gyroscopes and navigation
equipment. The rate of change of these signals is instrisically slow,
i. e. milliHz to 1Hz. Even without low pass filtering, these signals
naturally exhibit at least a 20db per decade rolloff above 1Hz.

AFIK, the update rate for the outputs can be as low as 10Hz (10x the
fastest input) without compromising stability. This would dictate that
the inputs should be sampled once per 100ms, fed through the control
law, which then updates the outputs at 10Hz.

If you have a signal with a natural cutoff frequency (-3db) of 1Hz
(above which the signal exhibits a -20db/decade rolloff), and you want
to sample that signal at 10Hz, how much additional anti-alias low-pass
filtering needs to added before a 10bit A/D?

Computationally, the microcontroller probably can sample and update at
100Hz. If I turn up the compute rate to 100Hz, is the natural rolloff
of the input signals sufficient to provide anti-aliasing without
adding additional filtering?

The more important question is how do your output effectors react to
high frequency quantisation noise on their inputs? If you feed the
input of bipolar op amp more than about 20mV of high frequency noise -
that is noise too fast for the feedback path to track it - the input
tracks the peaks of the signal, not the average. This sort of effect
can be a real problem.
 
C

Chuck Simmons

Jan 1, 1970
0
Bill said:
The more important question is how do your output effectors react to
high frequency quantisation noise on their inputs? If you feed the
input of bipolar op amp more than about 20mV of high frequency noise -
that is noise too fast for the feedback path to track it - the input
tracks the peaks of the signal, not the average. This sort of effect
can be a real problem.

Strangely, anti-alias filters may cause more trouble than they are
worth. I am working on some servos sampled at 50kHz. It is tempting to
roll off the input to the controller at 25kHz. When I do that, the loss
of phase margin is not very nice. It turns out that I have no unmodeled
dynamics at embarrassing frequencies so I have removed my software notch
filters as well as the analog anti-alias filters.

Chuck
 
M

Mac

Jan 1, 1970
0
I am experimenting with a PID controller which will be implemented in
a microcontroller. The inputs come from gyroscopes and navigation
equipment. The rate of change of these signals is instrisically slow,
i. e. milliHz to 1Hz. Even without low pass filtering, these signals
naturally exhibit at least a 20db per decade rolloff above 1Hz.

AFIK, the update rate for the outputs can be as low as 10Hz (10x the
fastest input) without compromising stability. This would dictate that
the inputs should be sampled once per 100ms, fed through the control
law, which then updates the outputs at 10Hz.

If you have a signal with a natural cutoff frequency (-3db) of 1Hz
(above which the signal exhibits a -20db/decade rolloff), and you want
to sample that signal at 10Hz, how much additional anti-alias low-pass
filtering needs to added before a 10bit A/D?

I think this question can be answered only when the power spectral density
of the signal is known. If most of the power is in the alias free range,
and the rest of the power is gaussian or otherwise diffusely distributed,
then I don't see why you'd need a filter. But you better be sure this
holds true under all possible operating conditions.

If there is some way to make the filter optional, then experiment later,
that would be ideal. In any event, I don't see how the filter could hurt.
At least add an extra RC with a -3dB point at 5Hz. This will make the
rolloff that much steeper.
Computationally, the microcontroller probably can sample and update at
100Hz. If I turn up the compute rate to 100Hz, is the natural rolloff
of the input signals sufficient to provide anti-aliasing without
adding additional filtering?

Well, in a sense you'd be getting an extra 20dB of filtering, according to
your 20dB/decade rollof. I don't see how it could hurt, but I don't have a
good understanding of your system, or control systems in general.

;-)
 
S

Sir Charles W. Shults III

Jan 1, 1970
0
Typically, if your feedback is too rapid, you can induce unexpected
oscillations and control issues in a servo system. I would take the samples at
10 hertz, but I would also filter the output to something more in the range of a
hertz. Then you can be pretty close to what you want without getting ringing in
your servo loop.

Cheers!

Chip Shults
My robotics, space and CGI web page - http://home.cfl.rr.com/aichip
 
B

Bill Sloman

Jan 1, 1970
0
Chuck Simmons said:
Strangely, anti-alias filters may cause more trouble than they are
worth. I am working on some servos sampled at 50kHz. It is tempting to
roll off the input to the controller at 25kHz. When I do that, the loss
of phase margin is not very nice. It turns out that I have no unmodeled
dynamics at embarrassing frequencies so I have removed my software notch
filters as well as the analog anti-alias filters.

Designing filters that work inside a feedback loop requires fairly
careful attention to the phase excursions and overall delays in the
filters.

Most electronic engineers don't run into this as a problem until they
have to design a phase-locked loop, and it generally seems to come as
a painful surprise.
 
Top