chenged to 2 motor velocity-closed-loop; before testing
This commit is contained in:
35
3rd/dfoc.h
35
3rd/dfoc.h
@@ -1,20 +1,35 @@
|
||||
#ifndef __DFOC_H
|
||||
#define __DFOC_H
|
||||
|
||||
struct Motor_ {
|
||||
int Mot_num;
|
||||
float Ua;
|
||||
float Ub;
|
||||
float Uc;
|
||||
float Ubeta;
|
||||
float Ualpha;
|
||||
float dc_a;
|
||||
float dc_b;
|
||||
float dc_c;
|
||||
};
|
||||
|
||||
void Motor_en(void);
|
||||
float constrain(float amt, float low, float high);
|
||||
void SetPwm(float Ua, float Ub, float Uc);
|
||||
void SetPwm(int Mot_num, float Ua, float Ub, float Uc);
|
||||
float normalizeAngle(float angle);
|
||||
void SetPhaseVoltage(float Uq, float Ud, float angle_el);
|
||||
void SetPhaseVoltage(struct Motor_ *Motor, float Uq, float angle_el);
|
||||
float cal_Iq_Id(float current_a, float current_b, float angle_el);
|
||||
void Check_Sensor(void);
|
||||
void FOC_Init(float power);
|
||||
float electricAngle(void);
|
||||
float GetCommand(void);
|
||||
void Set_Angle(float Target);
|
||||
void FOC_Init(void);
|
||||
float M0_electricAngle(void);
|
||||
float M1_electricAngle(void);
|
||||
void M0_Set_Angle(float Target);
|
||||
void M0_Set_Velocity(float Target);
|
||||
void M0_Set_CurTorque(float Target);
|
||||
void M1_Set_Angle(float Target);
|
||||
void M1_Set_Velocity(float Target);
|
||||
void M1_Set_CurTorque(float Target);
|
||||
float velocityopenloop(float target);
|
||||
|
||||
|
||||
void Print_Velocity(int Motor_Velocity);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user