test_hingedRigidBodyMotor

test_hingedRigidBodyMotor.hingedRigidBodyMotorTestFunction(show_plots, K, P, sensedTheta, sensedThetaDot, refTheta, refThetaDot, accuracy)[source]

Test method

test_hingedRigidBodyMotor.test_hingedRigidBodyMotor(show_plots, K, P, sensedTheta, sensedThetaDot, refTheta, refThetaDot, accuracy)[source]

Validation Test Description

This test checks if the output motor torque matches what is expected from the PD control law for the given reference and sensed hinged rigid body state.

Test Parameters

Parameters
  • K (double) – Proportional gain value.

  • P (double) – Derivative gain value.

  • sensedTheta (double) – sensed theta value.

  • sensedThetaDot (double) – sensed thetaDot value.

  • refTheta (double) – reference theta value.

  • refThetaDot (double) – reference thetaDot value.

  • accuracy (double) – unit text accuracy

Description of Variables Being Tested

K and P are varied (note both must be set to positive values). The sensed hinged rigid body state is held constant while the reference is also varied to check positive and negative deltas.