Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
teoman
Posts:
6
Registered:
11/19/12
|
|
pid controller error
Posted:
Mar 11, 2013 10:23 AM
|
|
hi everyone. i have a problem for pid controller. i want to make a heading controller with geographic map. i can control heading. but when i choose desired heading 0 degree its not working efficiently. for example sensor is 40 and desired is 0. its decreasing first. and after a while it catches 0 degree and pass 359 ( at geographical map 360 degree one turn and north is 0 degree) when it pass 359 or 359.9999 ( that is actually an over shoot) error is going big. the real error is 1 degree when sensor is 359 degree but mathematical the error is 359. how can i solve this problem?
example ; error = sensor - desired
1. second >> sensor = 1 desired = 0 error = 1 2. second >> sensor = 0 desired = 0 error = 0 3.second >> sensor = 359 desired= 0 error = 359 (overshoot) (real error -1 degree)
|
|
|
|