|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: Manual Velocity PID, anyone successful?
Quote:
control /= 4; with: control >> 2; But that's about it - otherwise it works. |
|
#2
|
||||
|
||||
|
Re: Manual Velocity PID, anyone successful?
Also, here is a great article that explains the implementation of a full PID control as well as the behavior of each stage.
PID without a PhD |
|
#3
|
|||
|
|||
|
Re: Manual Velocity PID, anyone successful?
For anyone who has utilized a differential term in their control loop, did you use the timing of the default routine or set up an timed interrupt driven differential calculation?
I know the default code loops at ~26ms, but is its rate of repitition constant enough to house the differential term calculation? |
|
#4
|
|||||
|
|||||
|
Re: Manual Velocity PID, anyone successful?
I find that the default 39Hz main loop is fast enough for any feedback applications in FIRST, and it is fairly well timed as long as you don't go overboard on the interrupts.
Besides, the closer together your differential term calculations are, the less resolution you have in them (i.e. you couldget 5-10 "ticks" difference on a 100Hz loop but the same rate would produce 12-25 on 39Hz). |
|
#5
|
||||
|
||||
|
Re: Manual Velocity PID, anyone successful?
Quote:
For example, int control = -16; control = control >> 2; After that snippet, you'd expect control to be -4, but in actuality its 16380. Quite different. |
|
#6
|
||||
|
||||
|
Re: Manual Velocity PID, anyone successful?
Quote:
|
|
#7
|
|||||
|
|||||
|
Re: Manual Velocity PID, anyone successful?
Quote:
I guess I should have RTFM. ![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What Makes a FIRST Team Successful? | Dr.Bot | General Forum | 17 | 23-12-2005 08:45 |
| PID cmd_drive can't drive straight? | gnormhurst | Programming | 4 | 18-02-2005 01:54 |
| 2005 Autonomous Scripting Manual | Anthony Kesich | Programming | 31 | 17-02-2005 17:30 |
| **FIRST EMAIL**/Important 2005 Competition Manual Information | Sscamatt | FIRST E-Mail Blast Archive | 1 | 06-01-2005 18:50 |