RA Flexible Software Package Documentation
Release v5.5.0
|
|
Interface for motor angle and speed calculation functions.
The Motor angle interface calculates the rotor angle and rotational speed from other data.
Data Structures | |
struct | motor_angle_cfg_t |
struct | motor_angle_current_t |
struct | motor_angle_voltage_reference_t |
struct | motor_angle_ad_data_t |
struct | motor_angle_encoder_info_t |
struct | motor_angle_api_t |
struct | motor_angle_instance_t |
Typedefs | |
typedef void | motor_angle_ctrl_t |
Enumerations | |
enum | motor_sense_encoder_angle_adjust_t |
enum | motor_angle_open_loop_t |
enum | motor_angle_error_t |
struct motor_angle_cfg_t |
Configuration parameters.
struct motor_angle_current_t |
struct motor_angle_voltage_reference_t |
struct motor_angle_ad_data_t |
struct motor_angle_encoder_info_t |
Motor angle encoder adjustment info
Data Fields | ||
---|---|---|
motor_sense_encoder_angle_adjust_t | e_adjust_status | Encoder Adjustment Status. |
uint8_t | u1_adjust_count_full | Adjustment count became full. |
motor_angle_open_loop_t | e_open_loop_status | Openloop status. |
float | f_openloop_speed | Openloop speed. |
float | f_openloop_id_ref | Openloop d-axis current. |
struct motor_angle_api_t |
Functions implemented as application interface will follow these APIs.
fsp_err_t(* motor_angle_api_t::open) (motor_angle_ctrl_t *const p_ctrl, motor_angle_cfg_t const *const p_cfg) |
Initialize the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure. |
fsp_err_t(* motor_angle_api_t::close) (motor_angle_ctrl_t *const p_ctrl) |
Close (Finish) the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_angle_api_t::reset) (motor_angle_ctrl_t *const p_ctrl) |
Reset the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_angle_api_t::currentSet) (motor_angle_ctrl_t *const p_ctrl, motor_angle_current_t *const p_st_current, motor_angle_voltage_reference_t *const p_st_voltage) |
Set (Input) Current & Voltage Reference data into the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_st_current | Pointer to current structure |
[in] | p_st_voltage | Pointer to voltage Reference structure |
fsp_err_t(* motor_angle_api_t::speedSet) (motor_angle_ctrl_t *const p_ctrl, float const speed_ctrl, float const damp_speed) |
Set (Input) Speed Information into the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[in] | speed_ctrl | Control reference of rotational speed [rad/s] |
[in] | damp_speed | Damping rotational speed [rad/s] |
fsp_err_t(* motor_angle_api_t::flagPiCtrlSet) (motor_angle_ctrl_t *const p_ctrl, uint32_t const flag_pi) |
Set the flag of PI Control runs.
[in] | p_ctrl | Pointer to control structure. |
[in] | flag_pi | The flag of PI control runs |
fsp_err_t(* motor_angle_api_t::internalCalculate) (motor_angle_ctrl_t *const p_ctrl) |
Calculate internal parameters of encoder process.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_angle_api_t::angleSpeedGet) (motor_angle_ctrl_t *const p_ctrl, float *const p_angle, float *const p_speed, float *const p_phase_err) |
Get rotor angle and rotational speed from the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_angl | Memory address to get rotor angle data |
[out] | p_speed | Memory address to get rotational speed data |
[out] | p_phase_err | Memory address to get phase(angle) error data |
fsp_err_t(* motor_angle_api_t::angleAdjust) (motor_angle_ctrl_t *const p_ctrl) |
Angle Adjustment Process.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_angle_api_t::encoderCyclic) (motor_angle_ctrl_t *const p_ctrl) |
DEPRECATED Encoder Cyclic Process.
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_angle_api_t::cyclicProcess) (motor_angle_ctrl_t *const p_ctrl) |
Cyclic Process. please
[in] | p_ctrl | Pointer to control structure. |
fsp_err_t(* motor_angle_api_t::sensorDataSet) (motor_angle_ctrl_t *const p_ctrl, motor_angle_ad_data_t *const p_ad_data) |
Set sensor A/D data into the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_ad_data | Pointer to A/D conversion data |
fsp_err_t(* motor_angle_api_t::estimatedComponentGet) (motor_angle_ctrl_t *const p_ctrl, float *const p_ed, float *const p_eq) |
Get estimated d/q-axis component from the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_ed | Memory address to get estimated d-axis component |
[out] | p_eq | Memory address to get estimated q-axis component |
fsp_err_t(* motor_angle_api_t::infoGet) (motor_angle_ctrl_t *const p_ctrl, motor_angle_encoder_info_t *const p_info) |
Get Encoder Calculate Information.
[in] | p_ctrl | Pointer to control structure. |
[out] | p_info | Memory address to get angle internal information |
fsp_err_t(* motor_angle_api_t::parameterUpdate) (motor_angle_ctrl_t *const p_ctrl, motor_angle_cfg_t const *p_cfg) |
Update Parameters for the calculation in the Motor_Angle.
[in] | p_ctrl | Pointer to control structure. |
[in] | p_cfg | Pointer to configuration structure include update parameters. |
struct motor_angle_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
Data Fields | ||
---|---|---|
motor_angle_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
motor_angle_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
motor_angle_api_t const * | p_api | Pointer to the API structure for this instance. |
typedef void motor_angle_ctrl_t |
Motor Angle Control block. Allocate an instance specific control block to pass into the API calls.
enum motor_angle_error_t |