bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitsim::actuators::backends::DCMotorParameters Struct Reference

The constants of a brushed DC gear motor with an encoder, and of the speed controller that runs it. The defaults are those of a 12 V gear motor with a 30:1 gearbox, about 300 rpm at the output, such as a JGA25-370. More...

#include <sim_dc_motor_backend.h>

Public Member Functions

void read (const nlohmann::json &j)
 Read the parameters that are in the JSON object. The others keep their defaults.
real_t no_load_speed () const
real_t stall_torque () const

Public Attributes

real_t resistance {7.0}
 armature resistance [Ohm]
real_t inductance {2.0e-3}
 armature inductance [H]
real_t emf_constant {0.0127}
 back-EMF and torque constant, at the rotor [V s/rad]
real_t rotor_inertia {1.0e-6}
 [kg m^2]
real_t friction {1.0e-6}
 viscous friction at the rotor [N m s/rad]
real_t gear_ratio {30.0}
 rotor turns per output turn
real_t supply_voltage {12.0}
 [V]
real_t speed_kp {0.03}
 duty cycle per rad/s of error
real_t speed_ki {0.1}
 duty cycle per rad of error
real_t speed_filter {0.02}
 time constant of the speed filter [s]
real_t control_period {0.01}
 [s]
uint_t encoder_counts {660}
 counts per output turn

Detailed Description

The constants of a brushed DC gear motor with an encoder, and of the speed controller that runs it. The defaults are those of a 12 V gear motor with a 30:1 gearbox, about 300 rpm at the output, such as a JGA25-370.

Member Function Documentation

◆ no_load_speed()

real_t bitsim::actuators::backends::DCMotorParameters::no_load_speed ( ) const
inline
Returns
The output speed with the full supply voltage and no load [rad/s]

◆ read()

void bitsim::actuators::backends::DCMotorParameters::read ( const nlohmann::json & j)

Read the parameters that are in the JSON object. The others keep their defaults.

◆ stall_torque()

real_t bitsim::actuators::backends::DCMotorParameters::stall_torque ( ) const
inline
Returns
The output torque with the full supply voltage at stall [N m]

Member Data Documentation

◆ control_period

real_t bitsim::actuators::backends::DCMotorParameters::control_period {0.01}

[s]

◆ emf_constant

real_t bitsim::actuators::backends::DCMotorParameters::emf_constant {0.0127}

back-EMF and torque constant, at the rotor [V s/rad]

◆ encoder_counts

uint_t bitsim::actuators::backends::DCMotorParameters::encoder_counts {660}

counts per output turn

◆ friction

real_t bitsim::actuators::backends::DCMotorParameters::friction {1.0e-6}

viscous friction at the rotor [N m s/rad]

◆ gear_ratio

real_t bitsim::actuators::backends::DCMotorParameters::gear_ratio {30.0}

rotor turns per output turn

◆ inductance

real_t bitsim::actuators::backends::DCMotorParameters::inductance {2.0e-3}

armature inductance [H]

◆ resistance

real_t bitsim::actuators::backends::DCMotorParameters::resistance {7.0}

armature resistance [Ohm]

◆ rotor_inertia

real_t bitsim::actuators::backends::DCMotorParameters::rotor_inertia {1.0e-6}

[kg m^2]

◆ speed_filter

real_t bitsim::actuators::backends::DCMotorParameters::speed_filter {0.02}

time constant of the speed filter [s]

◆ speed_ki

real_t bitsim::actuators::backends::DCMotorParameters::speed_ki {0.1}

duty cycle per rad of error

◆ speed_kp

real_t bitsim::actuators::backends::DCMotorParameters::speed_kp {0.03}

duty cycle per rad/s of error

◆ supply_voltage

real_t bitsim::actuators::backends::DCMotorParameters::supply_voltage {12.0}

[V]


The documentation for this struct was generated from the following files: