simple_pendulum.controllers.pid

Proportional-Integral-Derivative (PID) Control

Submodules

simple_pendulum.controllers.pid.pid

PID Controller

class simple_pendulum.controllers.pid.pid.PIDController(data_dict, Kp, Ki, Kd, use_feed_forward=True)

Bases: AbstractController

Controller acts on a predefined trajectory and adds PID control gains.

get_control_output(meas_pos=None, meas_vel=None, meas_tau=None, meas_time=None)

The function to read and send the entries of the loaded trajectory as control input to the simulator/real pendulum.

Parameters:
meas_posfloat, deault=None

the position of the pendulum [rad]

meas_velfloat, deault=None

the velocity of the pendulum [rad/s]

meas_taufloat, deault=None

the meastured torque of the pendulum [Nm]

meas_timefloat, deault=None

the collapsed time [s]

Returns:
des_posfloat

the desired position of the pendulum [rad]

des_velfloat

the desired velocity of the pendulum [rad/s]

des_taufloat

the torque supposed to be applied by the actuator [Nm]

init(x0)

Initialize the controller. May not be necessary.

Parameters:
``x0``: ``array like``

The start state of the pendulum

set_goal(x)

Set the desired state for the controller. May not be necessary.

Parameters:
``x``: ``array like``

The desired goal state of the controller