How to connect a Simsacpe multibody to simulink control system?

조회 수: 2 (최근 30일)
Karem Abuowda
Karem Abuowda 2017년 9월 1일
댓글: Karem Abuowda 2017년 9월 6일
This simspcae model was imported from Solidworks and modified. The control system in simulink is a bit complicated with many subsystems and hardware communications. I want to add the simscape model as a subsystem, and the output of the control system implemented on this subsystem. I tried to implement it by adding the simscape model with attached files into the folder of the control systems and add the model into the system in simulink. The system is very slow and doesn't work. Could you please advice me how to save the simscape model as a model can be added directly to any control system such as block??? and How can I increase my system speed?

답변 (1개)

Julia Antoniou
Julia Antoniou 2017년 9월 6일
Hi Karem,
Based on my understanding of your question, you have a Simscape model you would like to incorporate into a control system simulation. If you create this control system using Simulink blocks, you could then interface with your Simscape blocks using the "Simulink-PS" and "PS-Simulink" converter blocks. These conversion blocks allow for communication between Simscape elements and Simulink elements within a model. See the documentation page linked below for more information about these conversion blocks. https://www.mathworks.com/help/physmod/simscape/ref/simulinkpsconverter.html
Linked below is an example of incorporating a Simscape model into a Simulink control system. https://www.mathworks.com/help/physmod/simscape/examples/mass-spring-damper-with-controller.html
The Simscape portion of the model shown in this example above can easily be converted into a subsystem by selecting all Simscape elements, right-clicking, and selecting "Create Subsystem from Selection".
In reference to question about increasing your simulation speed - there are a number of different ways to do this, and most of them are specific to how your individual model is set up. See the MATLAB Answers post linked below for a list of ways to increase simulation speed. https://www.mathworks.com/matlabcentral/answers/94052-how-can-i-speed-up-simulation-of-my-simulink-model
  댓글 수: 1
Karem Abuowda
Karem Abuowda 2017년 9월 6일
Dear, Thanks for your answer, I have a previous knowledge of these solution. What I have discovered that Simscape mulitbody isn't supported with acceleration mode which makes my systems very slow as overall. Do you have any suggestion

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Composite Components에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by