Import data from Matlab to SimMechanics

1 view (last 30 days)
Arslan Kurmashev
Arslan Kurmashev on 27 Jul 2019
I've got four vectors calculated in matlab: 1)N×1 time vector "t", 2)N×1 angle vector "theta", 3)N×1 angular velocity vector "omega", 4)N×1 angular acceleration vector "a".
Now my task is to establish the motor (actuator) in the SimMechanics using the previously obtained four vectors: during the first time noment t(1,1) the parameters of the motor should be 1) angle = theta(1,1), 2) angular velocity = omega(1,1), 3) angular acceleration = a(1,1).
Then in each next " i "-th step the parameters of the motor should change: during the " i "-th time noment t(i,1) the parameters of the motor should be 1) angle = theta(i,1), 2) angular velocity = omega(i,1), 3) angular acceleration = a(i,1). And so on ...
How to import those four vectors from the matlab to the SimMechanics and establish the motor with time dependent changing parameters as mentioned above?

Answers (1)

Hari Krishna Ravuri
Hari Krishna Ravuri on 30 Jul 2019
I understand that you want to change the block parameters in Simulink during the execution. The process of changing a block parameter during the simulation is called tuning and the parameter which you can change during the execution is called tuning parameter. There are some parameters which you cannot tune. Please refer https://www.mathworks.com/help/simulink/ug/using-tunable-parameters.html for more information.

Community Treasure Hunt

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

Start Hunting!