CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: PID in a PIC

Posted by Jon Elson
on 2000-08-14 12:46:04 UTC
Alan Marconett KM6VV wrote:

> Thanks Dave,
>
> I like the idea of a "rolling" sum for the integral. And your point
> of
> not needing to divide by dt because of the constant interval will save
>
> time.

Right. You have to do this. The concept of keeping a sum from time
zero is
an academic exercise, not a real world technique, as there is always
some
new perturbation showing up to disturb the stability of the system. In
a motion
control system, of course, the goal of the system is constantly
changing, as
new moves are started. Since the task may be to move left and then move

right, the sign of previous errors may actually be different from the
most
recent errors, thereby causing any correction based on old errors to
make
the situation worse! Many systems recognize a new environment, perhaps
by noticing a change in velocity of the desired trajectory, and turn off
the
I term for a while, until meaningful history under the new regime has
accumulated.
Smoothly turning the I term off and back on, without causing sharp
fluctuations
is a trick in itself.

> Now to get it all into the PIC. How fast have you been able to
> get the algorithm to run? My first thought was to include the PWM for
>
> the R/C servo motor in the same routine, but it is so S L O W (do a
> .5
> to 2.5 ms pulse every 20ms), that I may just put it in another PIC.
> Another PIC is slated to do PWM at 5-10 Khz for the drive motors.
> Idea
> is to slow down the drive motors as the turning error comes up.

Most people who do motion control this way end up using DSP chips
for their speed and math ability.

Jon

Discussion Thread

William Scalione 2000-08-11 06:33:38 UTC Re: [CAD_CAM_EDM_DRO] Re: PID in a PIC Alan Marconett KM6VV 2000-08-11 15:48:10 UTC Re: [CAD_CAM_EDM_DRO] Re: PID in a PIC Jon Elson 2000-08-14 12:46:04 UTC Re: [CAD_CAM_EDM_DRO] Re: PID in a PIC