Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Almost balancing Scooter (http://www.chiefdelphi.com/forums/showthread.php?t=68645)

Nathan 01-08-2008 21:29

Re: Almost balancing Scooter
 
Yes, a Kalman filter.

http://www.cs.unc.edu/~welch/kalman/

Can't help you out with it though, still haven't figured it out for myself.

Salik Syed 11-08-2008 16:00

Re: Almost balancing Scooter
 
Quote:

Originally Posted by Alan Anderson (Post 759426)
Maybe you could do a "delay" in the other direction. Do a simple prediction of what the angle is likely be the next time through the loop, and use that as your feedback value instead of the current angle.

I didn't look closely enough at your code to be certain, but are you sure you have the right sign on your Kd term? It should act to reduce motor speed, but you describe it as causing more current to be drawn.

Also, are you using Victor speed controllers? They have a dead band around the neutral point that makes them a bit unsuited for applications requiring the motors to hold a given position. If you're very careful, you can account for the dead band in software, but you have to make sure everything is appropriately calibrated.

I think the strategy of modelling the response may not work since the time step is so small... and if you were to model it for too many timesteps you get problems with response.

maybe you can introduce a decay coefficient which basically says if the error hasn't changed significantly in the previous N iterations (where N is large enough to account for oscillation type behaviour), and the error is below some constant decay the output by a growing coefficient.


All times are GMT -5. The time now is 13:00.

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