How to build a bilinear model in simulink, using in the simscape model
3 次查看(过去 30 天)
显示 更早的评论
The attachment is my Hydralic actuator system model, I want to change the specimen to the bilinear model.
I have already have the bilinear model in matlab.m file.
2 个评论
Benjamin Thompson
2022-2-15
If the matlab.m file represents the model you want to use, can you post this file? Have you tried using this file in a MATLAB Function block in your Simulink model?
回答(1 个)
sai charan sampara
2024-2-28
Hello HUANG,
I understand that you want to connect the output of a MATLAB function to a Simscape block. It can be done as follows:
- From the Library Browser under Simulink -> User-Defined Functions select the MATLAB function block and add it to your model.
- Double click the MATLAB function block to open the MATLAB function and place the code of your choice in it. In this case place the bilinear model code and configure the input parameters (“disp”) and output parameters (“F”).
- Then from the Library Browser under Simscape -> Utilities choose the “Simulink-PS Converter” block. Connect the output of the function block to this block.
- From Library Browser under Simscape -> Foundation Library -> Mechanical -> Mechanical Sources select the “Ideal Force Source” block and place it in the model.
- The output of “Simulink-PS Converter” can be connected to the “S-port” of the “Ideal Force Source” block. The “Ideal Force Source” block represents an ideal source of force that generates force proportional to the input physical signal. Block connections R and C are mechanical translational conserving ports. Port S is the physical signal port, through which control signal that drives the source is applied. Positive signal at port S generates force acting from C to R.
- The output of this block can be connected to “Double-Acting Hydraulic Cylinder” as per requirement.
It can be done like the image below:
You can also use the “Connection port” block under Simscape -> Utilities to transfer a signal across systems. You can refer to this link for more information:
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!