44 #define CTRL_MAJOR_RELEASE_NUMBER (2u)
49 #define CTRL_MINOR_RELEASE_NUMBER (0u)
54 #define CTRL_NUM_CONTROLLERS (2)
215 #endif // end of _CTRL_OBJ_H_ definition
float_t speed_outMin_A
the minimum output value for the speed controller, A
Defines the controller (CTRL) version number.
CTRL_ErrorCode_e errorCode
the error code for the controller
float_t speedCtrlPeriod_sec
the period at which the speed controller runs, sec
Contains the public interface to the types definitions.
bool flag_enable
a flag to enable the controller
MATH_vec2 Idq_offset_A
the Idq offset values, A
int_least16_t counter_isr
the isr counter
float_t maxVsMag_V
the maximum stator voltage magnitude value, V
int_least16_t counter_speed
the speed counter
float_t currentCtrlPeriod_sec
the period at which the current controller runs, sec
int_least16_t numCtrlTicksPerCurrentTick
Defines the number of controller clock ticks per current controller clock tick.
Defines the PI controller object.
PI_Handle piHandle_Id
the handle for the Id PI controller
float_t Ui_spd_A
the start integrator value for the speed controller, A
float_t Ki_spd_ApHz
the desired Ki_spd value, A/Hz
Contains the public interface to the math (MATH) module routines.
Defines a two element vector.
the number of controller states
float_t Vd_sf
the Vd scale factor
float_t Ui_Id_V
the start integrator value for the Id controller, V
uint16_t major
the major release number
float_t Kctrl_Wb_p_kgm2
the controller constant, Wb/(kg*m^2)
bool flag_resetInt_Id
a flag to reset the Id integrator
CTRL_ErrorCode_e
Enumeration for the error codes.
float_t ctrlPeriod_sec
Defines the controller period, sec.
Defines the controller (CTRL) object.
bool flag_resetInt_spd
a flag to reset the speed integrator
PI_Obj pi_Id
the Id PI controller object
PI_Handle piHandle_Iq
the handle for the Iq PI controller
CTRL_TargetProc_e
Enumeration for the target processors.
struct _CTRL_Version_ CTRL_Version
Defines the controller (CTRL) version number.
bool flag_resetInt_Iq
a flag to reset the Iq integrator
bool flag_enableCurrentCtrl
a flag to enable the current controllers
struct _CTRL_Obj_ CTRL_Obj
Defines the controller (CTRL) object.
int_least16_t counter_current
the isr counter
float_t speed_out_A
the output value from the speed controller, A
float_t ctrlFreq_Hz
Defines the controller frequency, Hz.
CTRL_State_e state
the current state of the controller
uint16_t rsvd
reserved value
the number of controller error codes
CTRL_State_e prevState
the previous state of the controller
float_t Kp_Id_VpA
the desired Kp_Id value, V/A
float_t BWdelta
the bandwidth scaling to maximize phase margin
int_least16_t numIsrTicksPerCtrlTick
Defines the number of isr clock ticks per controller clock tick.
MATH_vec2 Vdq_offset_V
the Vdq offset values, V
uint_least32_t waitTimes[CTRL_numStates]
an array of wait times for each state, estimator clock counts
CTRL_State_e
Enumeration for the controller states.
float_t speed_outMax_A
the maximum output value for the speed controller, A
MOTOR_Params motorParams
the motor parameters
float_t speed_fb_Hz
the feedback speed value, Hz
CTRL_Version version
the controller version
float_t Ui_Iq_V
the start integrator value for the Iq controller, V
CTRL_Type_e
Enumeration for the controller (CTRL) types.
bool flag_useZeroIq_ref
a flag to force a Iq = 0 reference value
PI_Obj pi_spd
the speed PI controller object
float_t Kp_spd_ApHz
the desired Kp_spd value, A/Hz
float_t speed_ref_Hz
the reference speed value, Hz
float_t Ki_Id
the desired Ki_Id value, unitless
MATH_vec2 Vdq_V
the Vdq values, V
int_least32_t counter_state
the state counter
MATH_vec2 Idq_A
the Idq values, A
float_t BWc_rps
the bandwidth of the current controllers, rad/sec
uint16_t targetProc
the target processor
uint16_t minor
the minor release number
Contains the public interface to the Proportional-Integral (PI) controller module routines...
Defines the motor parameters.
PI_Handle piHandle_spd
the handle for the speed PI controller
PI_Obj pi_Iq
the Iq PI controller object
float_t Kp_Iq_VpA
the desired Kp_Iq value, V/A
struct _CTRL_Obj_ * CTRL_Handle
Defines the CTRL handle.
float_t Ki_Iq
the desired Ki_Iq value, unitless
bool flag_enableSpeedCtrl
a flag to enable the speed controller
float float_t
Defines the portable data type for 32 bit, signed floating-point data.
int_least16_t numCtrlTicksPerSpeedTick
Defines the number of controller clock ticks per speed controller clock tick.
MATH_vec2 Idq_ref_A
the Idq reference values, A