How to make real-time simulation in simMechanics?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hello, I'm doing a simulink project that I think is somewhat related to real-time simulation, but I have some troubles recently.
I have imported a scara robot model from Solidworks to simMechanics and the simulation works pretty well. The following picture is the model in the simMechanics.
The realization of the model by simMechanics blocks is as follows.
The scara robot has two revolute joints and a prismatic joint. The motions of these joints are all determined by the 'timeseries variables' in the workspace. In the first cycle of motion, the robot works as it should. But in the second cycle, the 'timeseries variables' will be changed to generate different motions. Then my question is how to make the real-time simulation of the robot. I would be appreciated if anyone know how to solve this problem.
댓글 수: 0
답변 (1개)
Sebastian Castro
2015년 3월 30일
편집: Sebastian Castro
2015년 3월 30일
To go to real-time simulations, you have to do a couple things.
1. Change your model to use a fixed-step solver and your Simscape portion to use the Local Solver option. The key here is to use a time-step that makes your fixed-step simulation accurate enough.
2. Use Simulink Real-Time to generate code from the model and download it to a real-time operating system.
- Sebastian
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Model Preparation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!