MATLAB script PID compensator not reciprocating result in simulink model
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I am have built a PID compensator for a ball-beam system in a MATLAB live script as per this website tutorial: http://ctms.engin.umich.edu/CTMS/index.php?example=BallBeam§ion=ControlPID . I have used the "pidTuner" app in the matlab script to meet the design requirements ( < 3s settling time, < 5% overshoot). This PID has then been changed to a discrete function, and called in a simulink model, using a LTI system block. However, the issue is that even though the MATLAB script gives the desired result, when running the simulation in simulink the result is nowhere near the same. I have no idea why this isn't working. Both the script, and the simulink model are attatched.
Important note: I have tried to use a discrete PID block instead of the LTI system block, but it gives out this error: https://i.imgur.com/mY5Abhr.png
Many thanks in advance.
0 个评论
回答(1 个)
Siddharth Jawahar
2020-10-13
编辑:Siddharth Jawahar
2020-10-13
Hi Flnnian,
I looked at your model of the ball and the beam system in Simulink. It looks like you have implemented the non-linear system and are using the PID controller tuned for the linear system which is why you are seeing bad results. Changing the lagrangian to represent the linear system as described in the link below, I am seeing the same results as the live script.
HTH,
Sid
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PID Controller Tuning 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!