anti aliasing filters for digital control loops

John Popelish wrote:


Normally I'm a big fan of all-digital control loops, but if this were necessary I'd give serious consideration to using a current-mode switching conttroller for the inner loop. Why? The loop is very fast compared to the processor speed, it doesn't need precision control, and those chips do almost _everything_.
Don't know which way I'd end up going, though.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

Agreed. The only way I would do this with the micro would be if it had to be there for other, less demanding things and had lots of time and I/O to spare. Which means, it probably wasn't wasn't critically selected, in the first place. I hate to trust power control, moment by moment, to software. The initial debug can be very destructive, till you get it right. POP! Oops, forgot to reset the watchdog.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
John Popelish wrote:

I do power control with microprocessors -- for some odd reason we use hardware current limits, and hardware watchdogs that shut things down if the processor stops diddling a bit.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

The OP stated up front that he knew there were better ways to do this, and he was in it for the educational experience.
FWIW, the PIC 18 series can clock at 40MHz, giving a 10MHz instruction cycle; 5kHz control should not be a real problem (so long as he limited himself to integer math), if that's what he decided to shoot for. That's still probably slower than a switching controller--but if he took that approach, he wouldn't be learning embedded systems.
Scott
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Scott Seidman wrote:

Or you can anti-alias with a simple 1- or 2-stage RC filter, if you push your decimation frequency up high enough.
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Tim Wescott wrote:

Are you referring to division by a power of two by shifting binary values?

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
John Popelish wrote:

yes
--
-------------------------------------------
Tim Wescott
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Steve Minshull wrote:

The problem you are thinking of happens only in systems that are sampled too seldom, to begin with. If the samples are taken often enough that all frequencies of interest to the control system are well represented by the samples, (more than two samples per period) then the delay of a filter that effectively anti-aliases the samples adds an insignificant delay to all those frequencies of interest. Once the signal frequencies get above the unity gain frequency of the control loop, they have little effect on the closed loop response of the system. So the sampling frequency and anti-alias filter design should be based on at least the expected unity gain frequency of the control loop.
Of course, if the anti-alias filter is very poorly designed and removes frequencies of interest that would otherwise make it through the sampling process well represented, and that are below the unity gain frequency, then it will degrade the loop performance.
The best anti-alias filter is usually the one with the highest roll off corner frequency and the lowest order (lowest group delay) that will do the job of sufficiently attenuating frequencies that are too high for the sampling process to faithfully represent without producing significant aliases. This best fit design will also include assumptions about what amplitude aliases are insignificant compared to other disturbances for the loop, and what amplitudes and frequencies may actually be present that must be filtered. An infinite amplitude case would require infinite attenuation and possibly infinite delay of pass band signals. Good design requires reasonable assumptions.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Yes! Not just usual; but essential, since without the anti-aliasing filter high-frequency noise will be aliased down into your control bandwidth.
If the filter lag is significant in your control loop, then it implies that your sampling frequency is too low for the application. After all, the phase-lag of the sample-and-hold at the D/A conversion is going to be of the same order!
Kelvin B. Hales Kelvin Hales Associates Limited Consulting Process Control Engineers Web: www.khace.com
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.