|
HF-TMC9660 Driver 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC9660
|
Subsystem for torque and flux current control (FOC inner loop). More...
#include <tmc9660.hpp>
Classes | |
| struct | TorqueFluxConfig |
| Configuration structure for torque/flux control auto-configuration. More... | |
Private Member Functions | |
| TorqueFluxControl (TMC9660 &parent) noexcept | |
Private Attributes | |
| TMC9660 & | driver |
Friends | |
| class | TMC9660 |
Subsystem for torque and flux current control (FOC inner loop).
Controls the motor currents (torque and flux) using hardware PI controllers. Covers TMCL parameters 104–120, 308, 310.
This is the innermost control loop, operating at PWM frequency. Torque control is used for direct current control, while flux control enables field weakening for high-speed operation.
|
inlineexplicitprivatenoexcept |
|
noexcept |
Auto-configure torque/flux control parameters.
Configures PI gains, normalization, field weakening, and offsets based on high-level control characteristics.
| config | Torque/flux control configuration (see TorqueFluxConfig) |
|
noexcept |
Read actual flux current.
| [out] | milliamps | Actual flux in m_a. |
|
noexcept |
Read actual torque.
| [out] | milliamps | Actual torque in m_a. |
|
noexcept |
|
noexcept |
|
noexcept |
Read flux offset.
| [out] | milliamps | Offset in m_a. |
|
noexcept |
Read flux PI error.
| [out] | error | Current flux-PI error. |
|
noexcept |
Read flux-PI integrator state.
| [out] | integrator | Integrator value. |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Read open-loop angle.
| [out] | angle | Electrical angle. |
|
noexcept |
Read open-loop current.
| [out] | milliamps | Current in m_a. |
|
noexcept |
Read open-loop voltage.
| [out] | voltage | Voltage unit. |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Read torque offset.
| [out] | milliamps | Offset in m_a. |
|
noexcept |
Read torque PI error.
| [out] | error | Current torque-PI error. |
|
noexcept |
Read torque-PI integrator state.
| [out] | integrator | Integrator value. |
|
noexcept |
|
noexcept |
Configure current-loop PI gains.
| p | Proportional gain for torque (and flux if not separate). |
| i | Integral gain for torque (and flux if not separate). |
| separate | true to use separate flux gains. |
| flux_p | Proportional gain for flux loop. |
| flux_i | Integral gain for flux loop. |
|
noexcept |
Set normalization for current-PI outputs.
| p_norm | Normalization for P-term. |
| i_norm | Normalization for I-term. |
|
noexcept |
|
noexcept |
|
noexcept |
Set flux offset (feed-forward).
| milliamps | Offset in m_a. |
|
noexcept |
Set open-loop current.
| milliamps | Current in m_a. |
|
noexcept |
Set open-loop voltage.
| voltage | Voltage unit (0…32767). |
|
noexcept |
Set desired flux current.
| milliamps | Target flux in m_a. |
|
noexcept |
Set desired torque.
| milliamps | Target torque in m_a. |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
Select combined or separate torque/flux PI parameters.
| sep | Separation mode. |
|
noexcept |
Set torque offset (feed-forward).
| milliamps | Offset in m_a. |
|
noexcept |
Stop torque/flux control (SYSTEM_OFF).
|
private |