Go to Post We are just here to give back to a program that gave us so much as students. - Alex Cormier [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 01-26-2005, 07:36 PM
jdong jdong is offline
Linux Nerd
AKA: John D
#0245 (Adam-Bots)
Team Role: Programmer
 
Join Date: Apr 2004
Location: Rochester, MI
Posts: 98
jdong will become famous soon enoughjdong will become famous soon enough
All-Time PID Drive with Hall-effects: Coming along very nicely

Hello, everyone.

For the past few weeks, I've been working feverishly to get PID drive (Joystick-commanded velocity) to work with our given hall-effect sensors. I'm proud to say that we've got our first working prototype.


It required a complete rewrite of the algorithm... I expanded the generic PID algorithm, and got an expression for delta-output based on the current error and the last error (Proportional+Integral only). I did get another equation for the derivative band, but it required too many multiplications -- saturating processor time for no good reason.

I also got rid of the whole structure's / OOP'ness of the NASA code (sorry guys!)... At one point, I seemed to get a bit of memory corruption (printf started spitting out RANDOM garbage, then code error). As a result, the code is much lighter now!

To stabilize the system, I added PWM sloping protection. This forces the controller to only change the PWM output from cycle-to-cycle by +/- 1. Sort of like a dampener, but with much less calculation. The hall-effect sensors that we mounted could only get ~ 35 ticks/loop, so the resolution was quite low, causing major overshooting/undershooting from loop to loop. The PWM sloping seemed to have corrected this.


Problems:
1. Still need to test. Haven't tested under all conditions yet.
2. Direction. Assuming direction based on commanded PWM direction seems quite effective, but I'm still seeing if there's a weakness.



After I send this through some internal testing, I plan to GPL and release our Default_Routine() function.
__________________
John Dong
Co-Captain, Webmaster / Programmer
Team 245 -- Rochester Adams Robotics
 


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
PID control loops - closed loop feedback KenWittlief Technical Discussion 56 04-26-2004 09:27 PM
Actual execution time measurement Dan Technical Discussion 5 03-24-2003 11:36 AM
Solution to Timing Loops Steven Carmain Programming 39 02-10-2003 01:33 PM
How long should production time be??? archiver 1999 4 06-23-2002 11:16 PM


All times are GMT -5. The time now is 05:45 PM.

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