Go to Post "Mentors Only Work When Being Calibrated". - Calvin Hartley [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #1   Spotlight this post!  
Unread 24-01-2005, 17:19
Don Reid Don Reid is offline
Registered User
#0997
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2002
Location: Corvallis, Oregon
Posts: 45
Don Reid will become famous soon enough
Question PID code questions

In the pid code from First's "Navigation" sample, there is something I don't understand.

The integral error is combined with "pid_time", which is unfamiliar to me, I thought the integrated error (sum) should just used as is.

motor_info[motor].pwm = (KP_P * motor_info[motor].pos_error) +
((KI_P * motor_info[motor].pos_error_i)/pid_time) +
(KD_P * motor_info[motor].pos_error_d);

This pid_time variable is reset when the target position (or velocity) is changed,
but the integral value is not also cleared. Won't that cause problems?
__________________
Don Reid
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Example gyro code released. Kevin Watson Programming 60 17-03-2005 18:32
Kevin Watson's Kick-off Demo Code! Mr. Lim Programming 27 22-01-2005 03:38
Sourceforge for Code Repository and other stuff SilverStar Programming 9 15-01-2005 21:16
**FIRST EMAIL**/Autodesk Inventor Training and Technical Questions Information Rich Wong FIRST E-Mail Blast Archive 0 07-12-2004 17:22
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 15:36.

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