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

Namespaces

namespace  backends

Classes

struct  ShaftState
 The state of the output shaft of a motor, as a simulator sees it. More...
struct  BLDCMotorParameters
 The parameters of a brushless DC motor. R and L are measured between two terminals, which is what a datasheet gives. The defaults are a small motor of the size used in robot joints. More...
struct  DCEquivalentState
 The state of the DC-equivalent model: current [A] and speed [rad/s]. More...
struct  PhasePair
 The two phases that carry the current in a sector: it goes in through high and out through low. The third phase is disconnected. Phases a, b, c are 0, 1, 2. More...
class  BLDCMotor
 The electrical model of a three-phase brushless motor with six-step commutation from three Hall sensors. More...
struct  BLDCRotor
 A rotor with inertia and viscous friction, for a BLDCMotor without a physics engine: \(J \dot\omega = T_{motor} - b \omega - T_{load}\). More...
class  DCMotor
 A DC motor with an encoder, run in speed control. The application sets the target speed of the output shaft and reads back its angle and speed. The backend decides what the motor is: More...

Functions

DCEquivalentState dc_equivalent_step (const BLDCMotorParameters &m, const DCEquivalentState &s, real_t V, real_t T_load, real_t dt)
 One explicit Euler step of dt [s] of the DC-equivalent model: the motor seen from its supply with the commutation averaged out, which is the model of a brushed DC motor:

Function Documentation

◆ dc_equivalent_step()

DCEquivalentState bitsim::actuators::dc_equivalent_step ( const BLDCMotorParameters & m,
const DCEquivalentState & s,
real_t V,
real_t T_load,
real_t dt )

One explicit Euler step of dt [s] of the DC-equivalent model: the motor seen from its supply with the commutation averaged out, which is the model of a brushed DC motor:

\[L \frac{di}{dt} = V - R i - K_e \omega, \qquad J \frac{d\omega}{dt} = K_t i - b \omega - T_{load} \]