- Create a specification for the operating point using opSpec = operspec(plantModel);
- adjust your opSpec to select known/non-steady state variables. more info here.
- Find the operating point using [opPoint, opReport] = findop(plantModel, opSpec)
- Perofrm lineraization [sys, ~, info] = linearize(plantModel, opPoint)
How to design controller for models in Simscape multibody?
9 次查看(过去 30 天)
显示 更早的评论
I'm currently working on designing a controller for stabilizing a self balancing bicycle that uses Control Moment Gyroscope for balancing. A simmechanics model of the self balancing bicycle was developed using Simscape Multibody. I'm trying to develop a MPC controller using the MPC toolbox. The MPC cannot linearize the simmechanics model. So, I collected precession torque as Input and Roll angle as output to make a SISO State space model. This is then fed into the system identification app to get a State Space with Identified Parameters. The idss correlation with collected data is 99.5% with one step prediction focus. Now, when I'm implementing the idss on simulink using idmodel block, the output of idmodel is not as expected. I'm planning to use the idss to tune my MPC controller. If the idss roll angle output doesn't match with the roll angle data of the model, then my controller cannot be tuned properly. I tried the transfer function as well. It doesn't work.So I require help in designing a controller using a simscape model.
The Simmechanics model is attached below. Thank you very much and I'm looking forward to hearing from you.
0 个评论
回答(1 个)
J Chen
2021-8-3
You can use MATLAB 'linearize' command to lineraize Simscape plant models, [sys, ~, info] = linearize(plantModel, opPoint). The complete sequence is:
The linerized model then can be used in the MPC block. The angle state variables are tricky since Simscape MB use quaterion.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Plant Specification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!