![]() |
BLDC control on ATAVRMC303 with ATxMega128A1
|

Go to the source code of this file.
Functions | |
| U8 | mc_control_current (U8 cur_cmd) |
| use to control current , current regulation loop need parameter : Kp_cur, Ki_cur ,Kd_cur and K_cur_scal in config_motor.h need to call in Te ms More... | |
| U8 | mc_control_speed (U8 speed_cmd) |
| use to control speed , speed regulation loop need parameter : Kp_speed, Ki_speed ,Kd_speed and K_speed_scal in config_motor.h need to call in Te ms More... | |
| U8 | mc_get_Duty_Cycle () |
| set type of regulation More... | |
| void | mc_regulation_loop () |
| launch speed control or no regulation More... | |
| void | mc_set_Current_Loop () |
| set type of regulation More... | |
| void | mc_set_Open_Loop () |
| set type of regulation More... | |
| void | mc_set_Speed_Loop () |
| set type of regulation More... | |
| U8 mc_control_current | ( | U8 | cur_cmd | ) |
use to control current , current regulation loop need parameter : Kp_cur, Ki_cur ,Kd_cur and K_cur_scal in config_motor.h need to call in Te ms
Definition at line 103 of file mc_control.c.
References cur_error, cur_integ, cur_integral, cur_proportional, K_cur_scal, Ki_cur, Kp_cur, and mci_get_measured_current().
Referenced by mc_regulation_loop().

| U8 mc_control_speed | ( | U8 | speed_cmd | ) |
use to control speed , speed regulation loop need parameter : Kp_speed, Ki_speed ,Kd_speed and K_speed_scal in config_motor.h need to call in Te ms
Definition at line 48 of file mc_control.c.
References K_speed_scal, Ki_speed, Kp_speed, mci_get_measured_speed(), speed_error, speed_integ, speed_integral, and speed_proportional.
Referenced by mc_regulation_loop().

| U8 mc_get_Duty_Cycle | ( | ) |
set type of regulation
Definition at line 197 of file mc_control.c.
References duty_cycle.
Referenced by mc_switch_commutation(), mci_retry_run(), and mci_run().
| void mc_regulation_loop | ( | ) |
launch speed control or no regulation
Definition at line 159 of file mc_control.c.
References CURRENT_LOOP, duty_cycle, mc_control_current(), mc_control_speed(), mc_get_motor_speed(), mc_get_potentiometer_value(), OPEN_LOOP, regulation_type, and SPEED_LOOP.
Referenced by main(), mci_retry_run(), and mci_run().

| void mc_set_Current_Loop | ( | ) |
set type of regulation
Definition at line 189 of file mc_control.c.
References CURRENT_LOOP, and regulation_type.
| void mc_set_Open_Loop | ( | ) |
set type of regulation
Definition at line 175 of file mc_control.c.
References OPEN_LOOP, and regulation_type.
| void mc_set_Speed_Loop | ( | ) |
set type of regulation
Definition at line 182 of file mc_control.c.
References regulation_type, and SPEED_LOOP.