Control strategies for functional electrical stimulation (FES) cycling Public Forum
-
- Site Admin
- Posts: 336
- Joined: Tue Mar 15, 2011 12:32 pm
Control strategies for functional electrical stimulation (FES) cycling Public Forum
Welcome to the Control strategies for functional electrical stimulation (FES) cycling public forum. Feel free to browse or search the topics for helpful information, or post a topic of your own.
- Sam Kazemi
- Posts: 1
- Joined: Thu Apr 04, 2019 4:36 am
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
To whom it may concern
I am writing to inquire about getting help, because I am new in Opensim, and without your help, I could not solve my university project. With respect to you and your great file, could you please help me to change the situation of sitting and duration of FES pulse? I look forward to hearing from you
Sincerely
I am writing to inquire about getting help, because I am new in Opensim, and without your help, I could not solve my university project. With respect to you and your great file, could you please help me to change the situation of sitting and duration of FES pulse? I look forward to hearing from you
Sincerely
- Ana de Sousa
- Posts: 67
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hello Sam,
I did not understand what you mean by "sitting".
About the durantion of the pulse, this is a simulation in which we approximate the FES stimulation as the excitation of the muscle. In OpenSim this excitation goes from 0 to 1 (1 being the maximum force that the muscle generates). Therefore, we do not specifically change pulse width.
We change the excitation in cycling_control.m:
We look the for muscle and add the control signal related to that muscle.
I did not understand what you mean by "sitting".
About the durantion of the pulse, this is a simulation in which we approximate the FES stimulation as the excitation of the muscle. In OpenSim this excitation goes from 0 to 1 (1 being the maximum force that the muscle generates). Therefore, we do not specifically change pulse width.
We change the excitation in cycling_control.m:
Code: Select all
% assing excitation to muscles
for i = 1:length(musclesNames)
if strcmp(musclesNames{i},'rect_fem_r')
thisExcitation = Vector(1, quadRight);
elseif strcmp(musclesNames{i},'vas_int_r')
thisExcitation = Vector(1, quadRight);
elseif strcmp(musclesNames{i},'rect_fem_l')
thisExcitation = Vector(1, quadLeft);
elseif strcmp(musclesNames{i},'vas_int_l')
thisExcitation = Vector(1, quadLeft);
elseif strcmp(musclesNames{i},'hamstrings_l')
thisExcitation = Vector(1, hamsLeft);
elseif strcmp(musclesNames{i},'hamstrings_r')
thisExcitation = Vector(1, hamsRight);
elseif strcmp(musclesNames{i},'glut_max_r')
thisExcitation = Vector(1, glutRight);
elseif strcmp(musclesNames{i},'glut_max_l')
thisExcitation = Vector(1, glutLeft);
else
thisExcitation = Vector(1, ZERO);
end
% update modelControls with the new values
if thisExcitation ~= ZERO
osimModel.updActuators().get(musclesNames{i}).addInControls(thisExcitation, modelControls);
end
end
- TARUN KARAK
- Posts: 2
- Joined: Mon Dec 10, 2018 2:54 am
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Dear sir/mam,
can you please guide me in step by step how to use or run this model as I am very new in OpenSim.
Thank Regards
Tarun Karak
can you please guide me in step by step how to use or run this model as I am very new in OpenSim.
Thank Regards
Tarun Karak
- Ana de Sousa
- Posts: 67
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hello Tarun Karak, the first step is to follow the instructions to script with Matlab available at https://simtk-confluence.stanford.edu:8 ... ith+Matlab.
And after downloading our package, you should follow the steps in README.txt.
In case you have any specific problems, we could look for solutions.
And after downloading our package, you should follow the steps in README.txt.
In case you have any specific problems, we could look for solutions.
- Yasniary Morales
- Posts: 4
- Joined: Mon Jan 06, 2020 7:10 am
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hello,
When I open the FES Cycling Model on OpenSim, many parts of the model don't appear and I am receiving messages that say "Couldn 't find file 'femur.vtp'", "Couldn't find file 'l_tibia'",etc. . How do I resolve this?
Kind Regards,
Yasniary Morales
When I open the FES Cycling Model on OpenSim, many parts of the model don't appear and I am receiving messages that say "Couldn 't find file 'femur.vtp'", "Couldn't find file 'l_tibia'",etc. . How do I resolve this?
Kind Regards,
Yasniary Morales
- Ana de Sousa
- Posts: 67
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hello, Yasniary,
I don't receive notifications about this forum, that is why I did not answer prior.
Those are parts of the model that usually get installed with OpenSim 3.3. I have tested with OpenSim 4.1, but they don't seem to be in the usual place. What I did to open the model, was to copy and paste these parts to the same location of the osim model.
However, I don't think that all functions will work with OpenSim 4.1, there are some differences. So, I suggest using 3.3.
I don't receive notifications about this forum, that is why I did not answer prior.
Those are parts of the model that usually get installed with OpenSim 3.3. I have tested with OpenSim 4.1, but they don't seem to be in the usual place. What I did to open the model, was to copy and paste these parts to the same location of the osim model.
However, I don't think that all functions will work with OpenSim 4.1, there are some differences. So, I suggest using 3.3.
- Yuya Miyazaki
- Posts: 16
- Joined: Tue May 11, 2021 8:45 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hello, I am university student.
I using this model(FEScycling), thank you.
However, there is something I don't understand.
How do you control the load on the pedals?
For example, if you increase the load on the pedals, it will be harder to cycle.
I use a translator for this.
kind regards.
I using this model(FEScycling), thank you.
However, there is something I don't understand.
How do you control the load on the pedals?
For example, if you increase the load on the pedals, it will be harder to cycle.
I use a translator for this.
kind regards.
- Ana de Sousa
- Posts: 67
- Joined: Thu Apr 07, 2016 4:21 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Hi, Yuya Miyazaki!
I'm glad you are using the model.
Your question: "How do you control the load on the pedals?"
1. In CyclingLibrary/cycling_control_v2.m, I first calculate the load in line 150:
2. I update a vector with this new calculated thisLoad in line 261 (this is an optional step, I only do that for saving all values calculated for later plots):
3. The line of code that actually updates the crank actuator is in 307:
It gets the gear_load part from the model and adds to the control the values from Vector.
controlIteration is the current iteration value. You can substitute controlActionLoad(controlIteration)) for thisLoad, if you decide to skip step 2.
Cheers!
Ana
I'm glad you are using the model.
Your question: "How do you control the load on the pedals?"
1. In CyclingLibrary/cycling_control_v2.m, I first calculate the load in line 150:
Code: Select all
[thisLoad] = gear_load_v2(thisVel,flagLoad,flagMotor,thisTime);
Code: Select all
controlActionLoad(controlIteration) = thisLoad;
Code: Select all
osimModel.updActuators().get('gear_load').addInControls(Vector(1, controlActionLoad(controlIteration)), modelControls);
controlIteration is the current iteration value. You can substitute controlActionLoad(controlIteration)) for thisLoad, if you decide to skip step 2.
Cheers!
Ana
- Yuya Miyazaki
- Posts: 16
- Joined: Tue May 11, 2021 8:45 pm
Re: Control strategies for functional electrical stimulation (FES) cycling Public Forum
Thank you for reply ana.
Does it mean that I can change the value of "gear_load" in the actuator field to control the resistance of the pedal?
I use a translator.
kind regards.
Does it mean that I can change the value of "gear_load" in the actuator field to control the resistance of the pedal?
I use a translator.
kind regards.