|
function | contraction_equilibrium (in Lce) |
| Function to get contraction equilibrium.
|
|
function | doTest_derivativetest_SimuAccGyro (in testCase, in iCom) |
| Function with test content to test Model.simuAccGyro()
|
|
function | generateRandType (in testCase, in type, in isState) |
| Function to generate a vector with random numbers of a specific type (e.g.
|
|
function | grf_equilibrium (in xcontact) |
| Helperfunction to test grf.
|
|
function | halfstim (in testCase, in t) |
| Helperfunction for muscle stimulation function for 50% muscle stimulation.
|
|
function | isokinetic_curves (in testCase, in joint, in range) |
| Function to plot isokinetic moment-angular velocity curves.
|
|
function | isometric_curves (in testCase, in joint1, in range1, in joint2, in range2) |
| Function to plot isometric curves.
|
|
function | labels () |
| Adds labels to plot.
|
|
function | labels () |
| Adds labels to plot.
|
|
function | matcompare (in testCase, in value, in valueRef, in kind, in namesDim1, in namesDim2) |
| Function to verify the derivative outcomes.
|
|
function | maxmoment (in testCase, in joint, in angles, in angvel, in sign) |
| Function to simulate maximum moment.
|
|
function | nostim (in testCase, in t) |
| Helperfunction for muscle stimulation function for passive simulation.
|
|
function | setup_Test_Random (in testCase, in iCom) |
| Function to setup the data.
|
|
function | solvegrf (in testCase, in y, in vy, in xx, in vx, in vxc) |
| Function to solves grf by search for static equilibrium in contact variables.
|
|
function | step (in testCase, in stimfun, in x0, in trange, in nsteps, in options) |
| Function to solve implicit differential equation for simulaton.
|
|
function | stepgrf (in testCase, in xskeleton, in xinit, in times, in options) |
| Function to solve implicit differential equation for simulaton for contact points.
|
|
Test class to test the class Gait2dc.
Run single test selected by name:
res = run(testCase, 'derivativetest_Dynamics');
The class describes the Gait2dc model.
Definition: Gait2dc.m:20
Test class to test the class Gait2dc.
Definition: Gait2dcTest.m:44
Property model
Model object.
Definition: ModelTest.m:38
Overview:
Testname/Tag | Derivative | Freefall | Isometric | Memory | Speed | Neutral | getDynamics | getGRF | getJointmoments | simuAccGyro | showStick |
derivativetest_Dynamics | x | | | | | | x | | | | |
derivativetest_SimuAccGyro_Acc | x | | | | | | | | | x | |
derivativetest_SimuAccGyro_Gyro | x | | | | | | | | | x | |
derivativetest_Moments | x | | | | | | | | x | | |
derivativetest_GRF | x | | | | | | | x | | | |
test_simulateFreefall | | x | | | | | x | | | | |
test_showStickNeutral | | | | | | x | | | | | x |
test_dynamics | | | | | | | x | x | x | | |
test_memory | | | | x | | | x | | | | |
test_speedOfSimuAccGyro | | | | | x | | | | | x | |
test_speedOfMex | | | | | x | | x | | | | |
test_s_hip_flexion_gyro | | | | | | | | | | x | |
test_s_static_upright_acc | | | | | | x | | | | x | |
test_s_static_upright_gyro | | | | | | x | | | | x | |
test_dynamicGRF | | | | | | | | x | | | |
test_isokineticMuscles | | | | | | x | x | | x | | |
test_isometricMuscles | | | x | | | | x | | x | | |
test_grf | | | | | | | | x | | | |
Function for testing the correctness of the dynamic model.
Free fall dynamics test: This test shows the correctness of the dynamic model f = f(x,xdot,u,M) = 0. Therefore, the model is put in a freefall acceleration state, so residuals should be zero when acceleration is -g for DOF 5 and zero elsewhere. Moreover, the joint moments of the model in its neutral position are computed and should be zero.
Gait2dc
Dynamics violations:
Joint moments:
GRFs:
Gait3d
Dynamics violations:
Joint moments:
GRFs:
Function for testing the ground reaction force model.
This test evaluates the contact model. To test the vertical force, the model is put in a series of positions with different hip height. The vertical ground reaction force at the heel is plotted as a function of hip height. The result (left side of Figure) shows the total force-deformation relationship of the contact model, i.e. deformation of the contact point relative to the foot, and the interaction between the foot and ground. To test the horizontal force, the model is put in three of these hip positions, and the horizontal velocity is varied. The resulting horizontal force is simulated and shown on the right side of the Figure.
- Todo:
- Add error checking
function test_isokineticMuscles |
( |
in |
testCase | ) |
|
Function for testing the muscles strength.
For the isokinetic test, the model is placed in the neutral position (hips and ankles at zero degrees, knees at 5 degrees flexion). At each joint, angular velocity is then varied from -1000 to +1000 deg/s. At each angular velocity, the state of the system is found that produces steady state muscle forces (dF/dt = 0). The muscle forces are then converted to joint moments and plotted. This is done separately for the flexors and extensors. (See "2D Model with Contact (gait2dc) Reference Manual for Version 1.0")
- Todo:
- Add error checking
function test_isometricMuscles |
( |
in |
testCase | ) |
|
Function for testing the muscles strength.
This puts the model into various joint angle combinations and activates the muscle set three times for each joint. First, activating the muscles that contribute to positive moment. Second, activating the muscles that contribute to a negative moment. Third, no activation, to obtain the passive moment. (See "2D Model with Contact (gait2dc) Reference Manual for Version 1.0")
- Todo:
- Add error checking
function test_simulateFreefall |
( |
in |
testCase | ) |
|
|
inherited |
Function to simulate freefall.
The model is placed in a neutral position. We drop the model on the ground. This is done twice, once with passive muscles and once with muscles that are 50% activated. It uses the implicit midpoint Euler method (van den Bogert et al., 2011) with a step size of 10 ms.
The second simulation (with activated muscles) is then repeated with a step size of 1 ms. The results are compared with the 10 ms stepsize.
Gait2dc
Example outpu:
Running test_simulateFreefall:
1. Running passive freefall simulation...
Number of time steps: 400
Number of function evaluations: 2572
2. Running active freefall simulation...
Number of time steps: 400
Number of function evaluations: 2285
3. Running active freefall simulation with smaller steps...
Number of time steps: 4000
Number of function evaluations: 16259
Gait3d
Example output:
Running test_simulateFreefall:
1. Running passive freefall simulation...
Number of time steps: 400
Number of function evaluations: 3120
2. Running active freefall simulation...
Number of time steps: 1
Number of function evaluations: 1129
3. Running active freefall simulation with smaller steps...
Number of time steps: 4000
Number of function evaluations: 17836
- Todo:
- The second simulation is not solving for 3D. And switching from Windows to Linux caused that also the first simulation is not solving. A difference in the compilers maybe caused this...
function test_speedOfSimuAccGyro |
( |
in |
testCase | ) |
|
|
inherited |
Function for testing the speed of Model.simuAccGyro().
This tests the execution time of Model.simuAccGyro(), without and with derivatives. The simuAccGyro() is executed 1000 times with random inputs, and the resulting time is divided by 1000.
Gait2dc
Example output for 3 (acc x, acc y, acc z) times 7 (trunk, legs, feet) IMU signals:
Speed test of SimuAccGyro()
Evaluation of dynamics function without Jacobians: 1.714 ms
Evaluation of dynamics function with Jacobians: 3.047 ms
Gait3d
Example output for 6 (all acc and gyro) times 7 (trunk, legs, feet) IMU signals::
Speed test of simuAccGyro()
Evaluation of dynamics function without Jacobians: 4.066 ms
Evaluation of dynamics function with Jacobians: 26.996 ms
- Todo:
- Add error checking