HPM SDK
HPMicro Software Development Kit
hpm_foc.h File Reference
#include "hpm_motor_math.h"

Go to the source code of this file.

Functions

void hpm_mcl_bldc_foc_al_speed (BLDC_CONTRL_SPD_PARA *par)
 Calculation of speed by angular difference of sampling. More...
 
void hpm_mcl_bldc_foc_pwmset (BLDC_CONTROL_PWMOUT_PARA *par)
 Update output pwm according to duty cycle, provided by the user. More...
 
void hpm_mcl_bldc_foc_current_cal (BLDC_CONTROL_CURRENT_PARA *par)
 Reconfiguring three-phase currents. More...
 
void hpm_mcl_bldc_foc_pi_contrl (BLDC_CONTRL_PID_PARA *par)
 pi control function More...
 
void hpm_mcl_bldc_foc_clarke (HPM_MOTOR_MATH_TYPE currentu, HPM_MOTOR_MATH_TYPE currentv, HPM_MOTOR_MATH_TYPE currentw, HPM_MOTOR_MATH_TYPE *currentalpha, HPM_MOTOR_MATH_TYPE *currentbeta)
 Clark Transformation. More...
 
void hpm_mcl_bldc_foc_park (HPM_MOTOR_MATH_TYPE currentalpha, HPM_MOTOR_MATH_TYPE currentbeta, HPM_MOTOR_MATH_TYPE *currentd, HPM_MOTOR_MATH_TYPE *currentq, HPM_MOTOR_MATH_TYPE sin_angle, HPM_MOTOR_MATH_TYPE cos_angle)
 transform More...
 
void hpm_mcl_bldc_foc_inv_park (HPM_MOTOR_MATH_TYPE ud, HPM_MOTOR_MATH_TYPE uq, HPM_MOTOR_MATH_TYPE *ualpha, HPM_MOTOR_MATH_TYPE *ubeta, HPM_MOTOR_MATH_TYPE sin_angle, HPM_MOTOR_MATH_TYPE cos_angle)
 Motor rotor angle, electrical angle. More...
 
void hpm_mcl_bldc_foc_svpwm (BLDC_CONTROL_PWM_PARA *par)
 svpwm function More...
 
void hpm_mcl_bldc_foc_speed_ctrl (float *memory, float targetspeed, float curspeed, float kp, float ki, int16_t max, int16_t *output)
 Speed Control PI Loop. More...
 
void hpm_mcl_bldc_foc_position_ctrl (float targetpos, float curpos, float kp, float max, float *output)
 Position Control P Loop. More...
 
void hpm_mcl_bldc_foc_ctrl_dq_to_pwm (BLDC_CONTROL_FOC_PARA *par)
 dq-axis voltage conversion to pwm output More...