PDA

View Full Version : PID Objects and Performance



Paul Rowntree
02-11-2007, 04:11 AM
Greetings all;
I am interested in using a Propeller to run a PID feedback loop on one Cog. Does anyone have any experience with the frequency response that would be available using Spin or Assembler in a PID application? I would be needing 10kHz-20kHz capability.

Cheers!

Paul Rowntree

Bill Henning
02-11-2007, 05:16 AM
20khz would give you 1000 instructions worth of time, so an integer PID loop ought to be quite capable of it; however, are you REALLY sure you need a PID loop that fast? Thats a control action every 0.05ms!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com (http://www.mikronauts.com) - a new blog about microcontrollers

Paul Rowntree
02-11-2007, 06:30 AM
Hi Bill;
Yes, speed is important, but 10kHz would be a more typical response time. We work with scanning tunneling microscopes, and the PID is used to track the motion of a sharp tip above a surface with atomic resolution. The PID keeps the tip at a constant height above each atom of the surface; if the PID is too slow, the tip hits the surface and usually damages the tip and or the surface.
We have used analog control loops and DSP based systems; I was wondering if a Cog/Propeller system could do it as well. For the cost of a chip, it would be an easy experiment to try.

Cheers!

Paul Rowntree

Bill Henning
02-11-2007, 06:56 AM
Hi Paul,

Very cool appilcation; wish I had your toys!

Check out http://www.motionsystemdesign.com/Issue/Article/17779/Moving_with_modified_PID_loops.aspx you might find it useful.

A fixed point PID should run more than fast enough in a cog.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com (http://www.mikronauts.com) - a new blog about microcontrollers