Adding probes and actuators in Matlab.
- RAHUL GHARATE
- Posts: 84
- Joined: Thu Jun 13, 2019 11:43 pm
Adding probes and actuators in Matlab.
I want to provide exosuit to the model.I have done RRA -process. I need to provide actuators and probes to the model. I have referred developer guide. But which specific program I should select. I have tried to put these programs in a scripting shell window but it shows errors. Please give me a specific program or suggest another method to provide actuator and probes to the model.
Tags:
Re: Adding probes and actuators in Matlab.
You can read the Wiki description for probes here, and the API documentation for Probe is here, if you expand the inheritance diagram at the top of the API documentation page you will be able to see all the different types of probes you can use. If you want to add a probe in Matlab, you can do something like what is written below. You will have to update all the parameters of the probe to your choosing by using the API documentation to find all the methods you can adjust for a class, the below example uses the Umberger2010MuscleMetabolicsProbe()
You can refer to the Simulation-Based Design to Reduce Metabolic Cost example to see how to use probes in your research. I would suggest opening the model in that example in a text editor and seeing how the probes are stored in the model. Even if you have difficulty adding components through Matlab or Python, you can always edit the model files directly-- copy, pasting, and editing models in a text editor.
The API documentation for actuators is here. Again, you can expand the inheritance diagram at the top of the page to see the list of actuator types that you could use in your model. In the below example, we instantiate a Coordinate Actuator and add it to the model.
I also suggest thouroughly going through the scripting section of the wiki documentation and having a look at the example Matlab and Python scripts in your OpenSim distribution.
Goodluck,
-j
Code: Select all
import org.opensim.modeling.*
model = Model('gait2354_simbody.osim');
% Instantiate a Metabolics Probe
metabolicsProbe = Umberger2010MuscleMetabolicsProbe();
% Update the probes parameters
metabolicsProbe.upd_activation_maintenance_rate_on(1)
% Add the probe to the model
model.addProbe(metabolicsProbe)
The API documentation for actuators is here. Again, you can expand the inheritance diagram at the top of the page to see the list of actuator types that you could use in your model. In the below example, we instantiate a Coordinate Actuator and add it to the model.
Code: Select all
import org.opensim.modeling.*
model = Model('gait2354_simbody.osim');
coordinateName = model.getCoordinateSet().get('ankle_angle_r').getName();
actuator = CoordinateActuator();
% Update the probes parameters
actuator.set_coordinate(coordinateName);
actuator.setOptimalForce(1);
% Add the probe to the model
model.addForce(actuator)
Goodluck,
-j
- RAHUL GHARATE
- Posts: 84
- Joined: Thu Jun 13, 2019 11:43 pm
Re: Adding probes and actuators in Matlab.
If we add actuator to the model.If actuator acts along the femur and foot segment.But actuator perform it's function on which phase of the gait cycle.
Re: Adding probes and actuators in Matlab.
You can either do an inverse analysis where controls are estimated or you can provide controls to the actuator by specifying the control signal. You will have to figure out when the actuator is used and decide what you want to do about that. No one can tell you because it is completely up to your particular model, actuator, motion, controller.
- RAHUL GHARATE
- Posts: 84
- Joined: Thu Jun 13, 2019 11:43 pm
Re: Adding probes and actuators in Matlab.
HOW TO DO INVERSE ANALYSIS?
HOW TO SPECIFY CONTROL SIGNAL TO THE ACTUATOR?
THERE ARE THREE MUSCLES ON RIGHT LEGS - soleur-r, Gastroc-r, Tibia posterior -r .
If I provide an actuator to the soleus -r muscle then how I confirm it gives me the good result as compared to the other 2 muscles of legs. it is by calculating and comparing metabolic rate or another method.
Please tell me I need it for hemiparetic gait design.
HOW TO SPECIFY CONTROL SIGNAL TO THE ACTUATOR?
THERE ARE THREE MUSCLES ON RIGHT LEGS - soleur-r, Gastroc-r, Tibia posterior -r .
If I provide an actuator to the soleus -r muscle then how I confirm it gives me the good result as compared to the other 2 muscles of legs. it is by calculating and comparing metabolic rate or another method.
Please tell me I need it for hemiparetic gait design.
- RAHUL GHARATE
- Posts: 84
- Joined: Thu Jun 13, 2019 11:43 pm
Re: Adding probes and actuators in Matlab.
How to do inverse analysis?
How to provide controllers to the control signals?
How to provide controllers to the control signals?
Re: Adding probes and actuators in Matlab.
See the users guide. Particularly Inverse Dynamics, Static Optimization, and CMC.How to do inverse analysis?
In this example you create and use an active orthotic.How to provide controllers to the control signals?