Go to Post Blasphemy! This is FRC we must over analyze everything! - Ginger Power [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 12-03-2004, 10:07
kevinw kevinw is offline
Registered User
#0065
 
Join Date: May 2001
Location: Farmington Hills
Posts: 132
kevinw is a name known to allkevinw is a name known to allkevinw is a name known to allkevinw is a name known to allkevinw is a name known to allkevinw is a name known to all
Re: PID control loops - feedback is our friend!!!

Quote:
Originally Posted by mightywombat

pid = request;

error = request - actual; //find the difference of the two values

pid = pid + (error/PID_PROP); //add the proportional part of the error

pid = pid + ((actual - lastactual)/PID_DER); // add the derivative part of the error

pid = pid + (sumerror/PID_INT); //integral part of the pid

pid = pid + 127;

return(pid);
}
What is the reason for adding the requested position to the PID control output? Is there a need for a feed-forward term in the control loop? Are you scaling the output after pid is returned?

Also, you might want to add overflow checking, just in case.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:19.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi