#include <sot/torque_control/current-controller.hh>
Public Member Functions | |
CurrentController (const std::string &name) | |
DECLARE_SIGNAL_IN (bemf_factor, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (dead_zone_offsets, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (dq, dynamicgraph::Vector) | |
gain from input to output control values More... | |
DECLARE_SIGNAL_IN (i_des, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (i_max, dynamicgraph::Vector) | |
proportional current feedback gain More... | |
DECLARE_SIGNAL_IN (i_max_dead_zone_compensation, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (i_measured, dynamicgraph::Vector) | |
desired motor currents More... | |
DECLARE_SIGNAL_IN (i_sens_gains, dynamicgraph::Vector) | |
motor currents More... | |
DECLARE_SIGNAL_IN (i_sensor_offsets_low_level, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (i_sensor_offsets_real_in, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (in_out_gain, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (ki_current, dynamicgraph::Vector) | |
proportional current feedback gain More... | |
DECLARE_SIGNAL_IN (kp_current, dynamicgraph::Vector) | |
gains of current sensors More... | |
DECLARE_SIGNAL_IN (percentage_bemf_compensation, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (percentage_dead_zone_compensation, dynamicgraph::Vector) | |
current control dead zone offsets More... | |
DECLARE_SIGNAL_IN (u_max, dynamicgraph::Vector) | |
DECLARE_SIGNAL_IN (u_saturation, dynamicgraph::Vector) | |
DECLARE_SIGNAL_OUT (dead_zone_compensation, dynamicgraph::Vector) | |
real offset of the current sensors More... | |
DECLARE_SIGNAL_OUT (i_errors, dynamicgraph::Vector) | |
DECLARE_SIGNAL_OUT (i_errors_ll_wo_bemf, dynamicgraph::Vector) | |
current tracking error More... | |
DECLARE_SIGNAL_OUT (i_low_level, dynamicgraph::Vector) | |
DECLARE_SIGNAL_OUT (i_real, dynamicgraph::Vector) | |
same as u when everything is fine, 0 otherwise More... | |
DECLARE_SIGNAL_OUT (i_sensor_offsets_real_out, dynamicgraph::Vector) | |
current measurements as seen by low-level ctrl More... | |
DECLARE_SIGNAL_OUT (u, dynamicgraph::Vector) | |
real offset of the current sensors More... | |
DECLARE_SIGNAL_OUT (u_safe, dynamicgraph::Vector) | |
virtual void | display (std::ostream &os) const |
void | init (const double &dt, const std::string &robotRef, const unsigned int ¤tOffsetIters) |
void | reset_integral () |
current tracking error without BEMF effect More... | |
void | sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const char *="", int=0) |
Protected Attributes | |
dynamicgraph::Vector | m_avg_i_err_neg |
dynamicgraph::Vector | m_avg_i_err_pos |
unsigned int | m_currentOffsetIters |
double | m_dt |
dynamicgraph::Vector | m_dz_coeff |
bool | m_emergency_stop_triggered |
true if the entity has been successfully initialized More... | |
dynamicgraph::Vector | m_i_err_integr |
dynamicgraph::Vector | m_i_offsets_real |
bool | m_initSucceeded |
bool | m_is_first_iter |
control loop time period More... | |
int | m_iter |
true at the first iteration, false otherwise More... | |
RobotUtilShrPtr | m_robot_util |
double | m_sleep_time |
Definition at line 51 of file current-controller.hh.
CurrentController | ( | const std::string & | name | ) |
Definition at line 48 of file current-controller.cpp.
DECLARE_SIGNAL_IN | ( | bemf_factor | , |
dynamicgraph::Vector | |||
) |
Joint velocities; used to compensate for BEMF effect on low level current loop
DECLARE_SIGNAL_IN | ( | dead_zone_offsets | , |
dynamicgraph::Vector | |||
) |
percentage in [0;1] of the motor back-EMF that we should compensate 0 is none, 1 is all of it
DECLARE_SIGNAL_IN | ( | dq | , |
dynamicgraph::Vector | |||
) |
gain from input to output control values
DECLARE_SIGNAL_IN | ( | i_des | , |
dynamicgraph::Vector | |||
) |
DECLARE_SIGNAL_IN | ( | i_max | , |
dynamicgraph::Vector | |||
) |
proportional current feedback gain
DECLARE_SIGNAL_IN | ( | i_max_dead_zone_compensation | , |
dynamicgraph::Vector | |||
) |
percentage in [0;1] of the motor driver dead zone that we should compensate 0 is none, 1 is all of it
DECLARE_SIGNAL_IN | ( | i_measured | , |
dynamicgraph::Vector | |||
) |
desired motor currents
DECLARE_SIGNAL_IN | ( | i_sens_gains | , |
dynamicgraph::Vector | |||
) |
motor currents
DECLARE_SIGNAL_IN | ( | i_sensor_offsets_low_level | , |
dynamicgraph::Vector | |||
) |
value of current tracking error at which deadzone is completely compensated
DECLARE_SIGNAL_IN | ( | i_sensor_offsets_real_in | , |
dynamicgraph::Vector | |||
) |
offset of the current sensors seen by the low level
DECLARE_SIGNAL_IN | ( | in_out_gain | , |
dynamicgraph::Vector | |||
) |
values at which to saturate the control (in bits)
DECLARE_SIGNAL_IN | ( | ki_current | , |
dynamicgraph::Vector | |||
) |
proportional current feedback gain
DECLARE_SIGNAL_IN | ( | kp_current | , |
dynamicgraph::Vector | |||
) |
gains of current sensors
DECLARE_SIGNAL_IN | ( | percentage_bemf_compensation | , |
dynamicgraph::Vector | |||
) |
Link between velocity and current; to compensate for BEMF effect on low level current loop (in A/rad.s-1)
DECLARE_SIGNAL_IN | ( | percentage_dead_zone_compensation | , |
dynamicgraph::Vector | |||
) |
current control dead zone offsets
DECLARE_SIGNAL_IN | ( | u_max | , |
dynamicgraph::Vector | |||
) |
max current allowed before stopping the controller (in Ampers)
DECLARE_SIGNAL_IN | ( | u_saturation | , |
dynamicgraph::Vector | |||
) |
max desired current allowed before stopping the controller (in Ampers)
DECLARE_SIGNAL_OUT | ( | dead_zone_compensation | , |
dynamicgraph::Vector | |||
) |
real offset of the current sensors
DECLARE_SIGNAL_OUT | ( | i_errors | , |
dynamicgraph::Vector | |||
) |
dead-zone compensation current applied by the controller
DECLARE_SIGNAL_OUT | ( | i_errors_ll_wo_bemf | , |
dynamicgraph::Vector | |||
) |
current tracking error
DECLARE_SIGNAL_OUT | ( | i_low_level | , |
dynamicgraph::Vector | |||
) |
current measurements after gain and offset compensation
DECLARE_SIGNAL_OUT | ( | i_real | , |
dynamicgraph::Vector | |||
) |
same as u when everything is fine, 0 otherwise
DECLARE_SIGNAL_OUT | ( | i_sensor_offsets_real_out | , |
dynamicgraph::Vector | |||
) |
current measurements as seen by low-level ctrl
DECLARE_SIGNAL_OUT | ( | u | , |
dynamicgraph::Vector | |||
) |
real offset of the current sensors
DECLARE_SIGNAL_OUT | ( | u_safe | , |
dynamicgraph::Vector | |||
) |
|
virtual |
Definition at line 382 of file current-controller.cpp.
void init | ( | const double & | dt, |
const std::string & | robotRef, | ||
const unsigned int & | currentOffsetIters | ||
) |
Initialize
dt | control interval |
currentOffsetIters | number of iterations while control is disabled to calibrate current sensors. The recommended way is to use the signal max_current. |
Definition at line 111 of file current-controller.cpp.
void reset_integral | ( | ) |
current tracking error without BEMF effect
Definition at line 376 of file current-controller.cpp.
|
inline |
Definition at line 152 of file current-controller.hh.
|
protected |
Definition at line 175 of file current-controller.hh.
|
protected |
Definition at line 174 of file current-controller.hh.
|
protected |
time to sleep at every iteration (to slow down simulation)
Definition at line 168 of file current-controller.hh.
|
protected |
Definition at line 162 of file current-controller.hh.
|
protected |
Definition at line 172 of file current-controller.hh.
|
protected |
true if the entity has been successfully initialized
Definition at line 161 of file current-controller.hh.
|
protected |
Definition at line 170 of file current-controller.hh.
|
protected |
Definition at line 169 of file current-controller.hh.
|
protected |
Definition at line 160 of file current-controller.hh.
|
protected |
control loop time period
Definition at line 163 of file current-controller.hh.
|
protected |
true at the first iteration, false otherwise
Definition at line 164 of file current-controller.hh.
|
protected |
Definition at line 158 of file current-controller.hh.
|
protected |
Definition at line 165 of file current-controller.hh.