STM32G4-DRV8301-FOC/FOC_Related/PID/pid.h

21 lines
265 B
C
Raw Normal View History

2024-07-22 13:55:29 +08:00
#ifndef __PID_H_
#define __PID_H_
typedef struct
{
float Set;
float Actual;
float err;
float err_last;
float Kp, Ki, Kd;
float voltage;
float integral;
} pid;
void PID_init(void);
extern pid pid_angle;
extern pid pid_speed;
extern pid pid_current;
#endif