pub struct Phases {
pub x: [f64; 4],
pub u: [f64; 2],
pub integral: [f64; 2],
pub angle: f64,
pub speed: f64,
pub command: f64,
pub origin: f64,
pub offset: f64,
pub electrical: f64,
pub load_angle: f64,
pub frame_speed: f64,
pub estimate: f64,
}Expand description
The state of a stepper’s or an induction motor’s windings and drive beside the servo’s (Motor); unused for the servo.
Fields§
§x: [f64; 4]The electrical states (stepper: i_a, i_b; induction: stator and rotor flux in d and q), as integrated.
u: [f64; 2]The voltages held over the base step (stepper: phases a and b; induction: d and q).
integral: [f64; 2]The current controllers’ integrators (induction, field-oriented).
angle: f64The rotor at the end of the last step: its angle and speed at the motor, rad and rad/s.
speed: f64§command: f64Stepper: the angle the step generator commands, rad at the motor; the angle the windings count from (where the drive was enabled, on a full step); the electrical angle of the current vector, in whole microsteps; and the load angle, that less the rotor’s electrical angle (beyond the pull-out angle the rotor falls out of step).
origin: f64§offset: f64Stepper: how far the drive’s own count stands from the controller’s setpoint (rad at the motor), left by an
enable that pulled the rotor to the nearest full step of the grid (Stepper::re_enabled); 0 otherwise.
electrical: f64§load_angle: f64§frame_speed: f64Induction: the electrical speed of the frame the voltages are set in, rad/s, and the drive’s estimate of the rotor flux (field-oriented) or its estimate of the torque (V/f, for the slip compensation).
estimate: f64