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... | |
| void hpm_mcl_bldc_foc_al_speed | ( | BLDC_CONTRL_SPD_PARA * | par | ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Calculation of speed by angular difference of sampling.
| [in,out] | par | Speed parameters BLDC_CONTRL_SPD_PARA |
| 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 | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Clark Transformation.
| [in] | currentu | U-phase current |
| [in] | currentv | V-phase current |
| [in] | currentw | W-phase current |
| [out] | currentalpha | alpha-axis current |
| [out] | currentbeta | beta-axis current |
| void hpm_mcl_bldc_foc_ctrl_dq_to_pwm | ( | BLDC_CONTROL_FOC_PARA * | par | ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
dq-axis voltage conversion to pwm output
| par | BLDC_CONTROL_FOC_PARA |
| void hpm_mcl_bldc_foc_current_cal | ( | BLDC_CONTROL_CURRENT_PARA * | par | ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Reconfiguring three-phase currents.
| [in,out] | par | BLDC_CONTROL_CURRENT_PARA |
| 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 | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Motor rotor angle, electrical angle.
| [in] | ud | d-axis voltage |
| [in] | uq | q-axis voltage |
| [out] | ualpha | u-alpha-axis voltage |
| [out] | ubeta | u-beta-axis voltage |
| [in] | sin_angle | sin(theta) |
| [in] | cos_angle | cos(theta) |
| 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 | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
transform
Park transform
| [in] | currentalpha | alpha-axis current |
| [in] | currentbeta | beta-axis current |
| [out] | currentd | d-axis current |
| [out] | currentq | q-axis current |
| [in] | sin_angle | sin(theta) |
| [in] | cos_angle | cos(theta) |
| void hpm_mcl_bldc_foc_pi_contrl | ( | BLDC_CONTRL_PID_PARA * | par | ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
pi control function
| [in,out] | par | BLDC_CONTRL_PID_PARA |
| void hpm_mcl_bldc_foc_position_ctrl | ( | float | targetpos, |
| float | curpos, | ||
| float | kp, | ||
| float | max, | ||
| float * | output | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Position Control P Loop.
| targetpos | Target position |
| curpos | current position |
| kp | Scale factor |
| max | Output maximum |
| output | Output after p control |
| void hpm_mcl_bldc_foc_pwmset | ( | BLDC_CONTROL_PWMOUT_PARA * | par | ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Update output pwm according to duty cycle, provided by the user.
| [in,out] | par | BLDC_CONTROL_PWMOUT_PARA |
| void hpm_mcl_bldc_foc_speed_ctrl | ( | float * | memory, |
| float | targetspeed, | ||
| float | curspeed, | ||
| float | kp, | ||
| float | ki, | ||
| int16_t | max, | ||
| int16_t * | output | ||
| ) |
#include <middleware/hpm_mcl/inc/hpm_foc.h>
Speed Control PI Loop.
| [in] | memory | Internal Data |
| [in] | targetspeed | target speed |
| [in] | curspeed | Current speed |
| [in] | kp | Scale factor |
| [in] | ki | Integral factor |
| [in] | max | Output maximum and integration maximum |
| [out] | output | Output after pi control |
| void hpm_mcl_bldc_foc_svpwm | ( | BLDC_CONTROL_PWM_PARA * | par | ) |