JAJU802A January 2022 – October 2022
The sliding mode current observer consists of a model based current observer and a bang-bang control generator driven by error between estimated motor currents and actual motor currents. The F and G parameters are calculated based on the motor parameters Rs, and Ls as described in Section 2.4.2.2.1.2. The observer gain k for bang-bang control, the cutoff frequency for LPF, and the Kp and Ki for PLL angle tracker must be tuned according to the testing state, and try to get the optimal parameters. The user can run the FAST estimator and eSMO in parallel to validate the angle from the eSMO for tuning its parameters. The initial parameters are defined in the user-mtr1/2.h files.
// Only for eSMO
#define USER_MOTOR1_KSLIDE_MAX (1.50f)
#define USER_MOTOR1_KSLIDE_MIN (0.75f)
#define USER_MOTOR1_PLL_KP_MAX (10.0f)
#define USER_MOTOR1_PLL_KP_MIN (2.0f)
#define USER_MOTOR1_PLL_KP_SF (5.0f)
#define USER_MOTOR1_BEMF_THRESHOLD (0.5f)
#define USER_MOTOR1_BEMF_KSLF_FC_Hz (2.0f)
#define USER_MOTOR1_THETA_OFFSET_SF (1.0f)
#define USER_MOTOR1_SPEED_LPF_FC_Hz (200.0f)
The speed and current PI regulators gains are calculated according to the motor parameters, the user can tune these gains online to optimize the control performance of the system.