![]() |
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? |
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). |
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. |
Re: Manual Velocity PID, anyone successful?
Quote:
|
Re: Manual Velocity PID, anyone successful?
Quote:
I guess I should have RTFM. ;) |
Re: Manual Velocity PID, anyone successful?
Quote:
And it's pretty easy. Code:
error = current - target |
| All times are GMT -5. The time now is 15:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi