![]() |
Help with state-space controller?
I'm trying to write a full state feedback controller for a DC motor (with a load attached). I derived the same model as 971 with voltage as input, displacement as output and [position, velocity] as the state. I used 971's eigenvalues and model constants because I'm a newbie and neither know how to pick poles myself, nor how to pick weighting factors to do LQR. The simulation I wrote seems to converge fine for a desired position (e.g. [1,0]). However, for a velocity it converges to about 65% of the velocity I want (e.g. a desired state of [x_hat(k), 1] asymptotically approaches [x_hat(k), .65] instead) (and what it converges to depends on the poles, which seems bizarre to me; my intuition tells me <1 eigenvalues should stabilize to 0 not something arbitrary like .35). Anyone know why?
Here's the simulation code I wrote in matlab Code:
Kt = .498192/85;If the code is completely wrong somewhere please tell me :o |
Re: Help with state-space controller?
Quote:
Another trick that 971 has used in the past is, instead of always updating the position goal to be the same as the current position, instead, on each timestep, update the position goal by the velocity goal * dt and make sure that the position goal never runs off too far from the current position. Quote:
Quote:
Quote:
Good luck getting this working; I had a lot of fun learning this stuff in High School. |
| All times are GMT -5. The time now is 16:31. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi