Prescribed controller during CMC
Posted: Mon Dec 14, 2020 3:13 pm
I am trying to use a prescribed controller in a CMC simulation. To this end, I have added a coordinate actuator as well as its controller (prescribed controller) to my model.
The coordinate actuator is added under <ForceSet> as follows:
<CoordinateActuator name="act_r">
<isDisabled>false</isDisabled>
<min_control>-Inf</min_control>
<max_control>Inf</max_control>
<coordinate>ankle_angle_r</coordinate>
<optimal_force>1</optimal_force>
</CoordinateActuator>
The controller is added under <ControllerSet> as follows:
<PrescribedController name="ctr_r">
<isDisabled>false</isDisabled>
<actuator_list>act_r</actuator_list>
<FunctionSet name="ControlFunctions">
<objects/>
<groups />
</FunctionSet>
<controls_file> C:\control.sto </controls_file>
<interpolation_method>1</interpolation_method>
</PrescribedController>
<controls_file> contains two columns: time and a time series, the latter of which has the heading "act_r".
For <desired_kinematics_file>, I am using an output from RRA. The time window of <controls_file> begins before and ends after that of <desired_kinematics_file>. The sampling frequency of <controls_file> is 1000 Hz, and the sampling frequency of <desired_kinematics_file> is approximately 1000 Hz.
When the model is loaded, <FunctionSet> that is generated from the <controls_file> seems to be correct.
However, when the CMC stimulation is completed, the resultant control of the coordinate actuator looks nothing like the time series in <controls_file>.
Please help.
The coordinate actuator is added under <ForceSet> as follows:
<CoordinateActuator name="act_r">
<isDisabled>false</isDisabled>
<min_control>-Inf</min_control>
<max_control>Inf</max_control>
<coordinate>ankle_angle_r</coordinate>
<optimal_force>1</optimal_force>
</CoordinateActuator>
The controller is added under <ControllerSet> as follows:
<PrescribedController name="ctr_r">
<isDisabled>false</isDisabled>
<actuator_list>act_r</actuator_list>
<FunctionSet name="ControlFunctions">
<objects/>
<groups />
</FunctionSet>
<controls_file> C:\control.sto </controls_file>
<interpolation_method>1</interpolation_method>
</PrescribedController>
<controls_file> contains two columns: time and a time series, the latter of which has the heading "act_r".
For <desired_kinematics_file>, I am using an output from RRA. The time window of <controls_file> begins before and ends after that of <desired_kinematics_file>. The sampling frequency of <controls_file> is 1000 Hz, and the sampling frequency of <desired_kinematics_file> is approximately 1000 Hz.
When the model is loaded, <FunctionSet> that is generated from the <controls_file> seems to be correct.
However, when the CMC stimulation is completed, the resultant control of the coordinate actuator looks nothing like the time series in <controls_file>.
Please help.