Trying to create a controller to maintain a certain speed
3 次查看(过去 30 天)
显示 更早的评论
Hi guys, I've created a model to emulate a BMW R1200gs motorbike and my end goal is to run a simulation where the motorbike drives at full power to untl it reaches a speed of 60mph and then stays at 60mph over a period of 60 seconds. The acceleration is all working perfectly but I can't figure out how to make a controller that will keep the motorbike at 60mph once it reaches this target. I don't want to use a saturation limiter that just caps the speed I want to make it something that is controlled. I've inserted some images of the model so far bellow. Any suggestions would be much appreciated. :)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/569729/image.png)
Overall model
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/569734/image.png)
MPH vs Time
0 个评论
采纳的回答
Jonas
2021-4-1
Use a PI-controller which receives 60MPH as setpoint and receives the actual speed, which controls the engine torque.
3 个评论
Jonas
2021-4-1
The 60MPH setpoint is coming from a Constant block.
When tuning the PI controller, start with gain of the integator of zero, and find a suitable value for the proportional gain. When the proportional controller can regulate the speed despite a steady-state offset, start adding integrator gain.
Please search online for basics on PI controllers.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Automotive Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!