HPM SDK
HPMicro Software Development Kit
hpm_mcl_control.c File Reference
#include "hpm_mcl_control.h"
#include "hpm_mcl_math.h"

Functions

float hpm_mcl_control_sin (float x)
 
float hpm_mcl_control_cos (float x)
 
float hpm_mcl_control_arctan (float y, float x)
 
hpm_mcl_stat_t hpm_mcl_control_clarke (float ia, float ib, float ic, float *alpha, float *beta)
 
hpm_mcl_stat_t hpm_mcl_control_park (float alpha, float beta, float sin_x, float cos_x, float *d, float *q)
 
hpm_mcl_stat_t hpm_mcl_control_pi (float ref, float sens, mcl_control_pid_t *pid_x, float *output)
 
hpm_mcl_stat_t hpm_mcl_control_inv_park (float d, float q, float sin_x, float cos_x, float *alpha, float *beta)
 
hpm_mcl_stat_t hpm_mcl_control_svpwm (float alpha, float beta, float vbus, mcl_control_svpwm_duty_t *duty)
 
hpm_mcl_stat_t hpm_mcl_control_step_svpwm (float alpha, float beta, float vbus, mcl_control_svpwm_duty_t *duty)
 
hpm_mcl_stat_t hpm_mcl_control_get_block_sector (hall_phase_t hall, uint8_t u, uint8_t v, uint8_t w, uint8_t *sector)
 
float hpm_mcl_control_lowpass_filter (float input, float *mem, float k)
 
hpm_mcl_stat_t hpm_mcl_control_dead_area_polarity_detection (mcl_control_dead_area_compensation_t *dead_area, float id, float iq, float theta, float deadtime, float ts, mcl_control_dead_area_pwm_offset_t *pwm_out)
 
void hpm_mcl_control_smc_init (mcl_control_smc_t *smc_cfg)
 
void hpm_mcl_control_smc_process (mcl_control_smc_t *smc_cfg, float ualpha, float ubeta, float ialpha, float ibeta)
 
hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_rs (mcl_control_offline_param_detection_t *detection, float ialpha, float ibeta, float *ud, float *uq)
 
hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_ld (mcl_control_offline_param_detection_t *detection, float ialpha, float ibeta, float *ud, float *uq)
 
hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_lq (mcl_control_offline_param_detection_t *detection, float ialpha, float ibeta, float *ud, float *uq)
 
hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_ls (mcl_control_offline_param_detection_t *detection)
 
hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_flux (mcl_control_offline_param_detection_t *detection, float ialpha, float ibeta, float ualpha, float ubeta, float *ref_d, float *ref_q)
 
hpm_mcl_stat_t hpm_mcl_control_detection_init (mcl_control_offline_param_detection_t *detection)
 
hpm_mcl_stat_t hpm_mcl_control_init (mcl_control_t *control, mcl_control_cfg_t *cfg)
 Initialise the operating data for the control function. More...
 

Function Documentation

◆ hpm_mcl_control_arctan()

float hpm_mcl_control_arctan ( float  y,
float  x 
)

◆ hpm_mcl_control_clarke()

hpm_mcl_stat_t hpm_mcl_control_clarke ( float  ia,
float  ib,
float  ic,
float *  alpha,
float *  beta 
)

◆ hpm_mcl_control_cos()

float hpm_mcl_control_cos ( float  x)

◆ hpm_mcl_control_dead_area_polarity_detection()

hpm_mcl_stat_t hpm_mcl_control_dead_area_polarity_detection ( mcl_control_dead_area_compensation_t dead_area,
float  id,
float  iq,
float  theta,
float  deadtime,
float  ts,
mcl_control_dead_area_pwm_offset_t pwm_out 
)

◆ hpm_mcl_control_detection_init()

hpm_mcl_stat_t hpm_mcl_control_detection_init ( mcl_control_offline_param_detection_t detection)

◆ hpm_mcl_control_get_block_sector()

hpm_mcl_stat_t hpm_mcl_control_get_block_sector ( hall_phase_t  hall,
uint8_t  u,
uint8_t  v,
uint8_t  w,
uint8_t *  sector 
)

◆ hpm_mcl_control_init()

hpm_mcl_stat_t hpm_mcl_control_init ( mcl_control_t control,
mcl_control_cfg_t cfg 
)

Initialise the operating data for the control function.

Parameters
controlmcl_control_t
cfgmcl_control_cfg_t
Returns
hpm_mcl_stat_t

Data initialisation

function initialisation

◆ hpm_mcl_control_inv_park()

hpm_mcl_stat_t hpm_mcl_control_inv_park ( float  d,
float  q,
float  sin_x,
float  cos_x,
float *  alpha,
float *  beta 
)

◆ hpm_mcl_control_lowpass_filter()

float hpm_mcl_control_lowpass_filter ( float  input,
float *  mem,
float  k 
)

◆ hpm_mcl_control_offline_param_detection_flux()

hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_flux ( mcl_control_offline_param_detection_t detection,
float  ialpha,
float  ibeta,
float  ualpha,
float  ubeta,
float *  ref_d,
float *  ref_q 
)

◆ hpm_mcl_control_offline_param_detection_ld()

hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_ld ( mcl_control_offline_param_detection_t detection,
float  ialpha,
float  ibeta,
float *  ud,
float *  uq 
)

◆ hpm_mcl_control_offline_param_detection_lq()

hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_lq ( mcl_control_offline_param_detection_t detection,
float  ialpha,
float  ibeta,
float *  ud,
float *  uq 
)

◆ hpm_mcl_control_offline_param_detection_ls()

hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_ls ( mcl_control_offline_param_detection_t detection)

◆ hpm_mcl_control_offline_param_detection_rs()

hpm_mcl_stat_t hpm_mcl_control_offline_param_detection_rs ( mcl_control_offline_param_detection_t detection,
float  ialpha,
float  ibeta,
float *  ud,
float *  uq 
)

◆ hpm_mcl_control_park()

hpm_mcl_stat_t hpm_mcl_control_park ( float  alpha,
float  beta,
float  sin_x,
float  cos_x,
float *  d,
float *  q 
)

◆ hpm_mcl_control_pi()

hpm_mcl_stat_t hpm_mcl_control_pi ( float  ref,
float  sens,
mcl_control_pid_t pid_x,
float *  output 
)

◆ hpm_mcl_control_sin()

float hpm_mcl_control_sin ( float  x)

◆ hpm_mcl_control_smc_init()

void hpm_mcl_control_smc_init ( mcl_control_smc_t smc_cfg)

◆ hpm_mcl_control_smc_process()

void hpm_mcl_control_smc_process ( mcl_control_smc_t smc_cfg,
float  ualpha,
float  ubeta,
float  ialpha,
float  ibeta 
)

◆ hpm_mcl_control_step_svpwm()

hpm_mcl_stat_t hpm_mcl_control_step_svpwm ( float  alpha,
float  beta,
float  vbus,
mcl_control_svpwm_duty_t duty 
)

◆ hpm_mcl_control_svpwm()

hpm_mcl_stat_t hpm_mcl_control_svpwm ( float  alpha,
float  beta,
float  vbus,
mcl_control_svpwm_duty_t duty 
)