How to run a SimMechanics robot model iteratively using Matlab code?

조회 수: 1 (최근 30일)
Does anyone know how to run a SimMechanics robot model iteratively using Matlab code? Specifically, I first established a robot model using SimMechanics. After that, I constructed a neural network based controller using Matlab code, which can output signals to actuate the robot joints. The weights for the neural network are randomly generated. To optimize the weights of the neural network, I employed an evolutionary algorithm. To generate initial populations for the evolutionary algorithm, I used the following pseudo codes.
for 1:popsize
Run Neural Network;
Run SimMechanics Model;
Generate Population Individuals;
end
Can someone tell me how to achieve it? Many thanks!

채택된 답변

Sebastian Castro
Sebastian Castro 2015년 7월 24일
To run any Simulink model programmatically, you can use the sim command.
The following video is a good introduction to some things you can do. It talks about parallel computing also, but you can ignore it if you want.
- Sebastian
  댓글 수: 1
Weibing Li
Weibing Li 2015년 8월 20일
Actually, I achieved it by using input the generated data into the SimMechanics model. In the model configuration dialogue, I can set the input data. Thank you for your help.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by