Просмотр исходного кода

更新hall速度滤波

Signed-off-by: kevin <huhui@sharkgulf.com>
kevin 2 лет назад
Родитель
Сommit
6a9e89d4a6

+ 1 - 0
Applications/app/app.c

@@ -203,6 +203,7 @@ static u32 app_plot_task(void * args) {
 		can_plot2(plot_arg1, plot_arg2);
 	}else if (plot_type == 2) {
 		can_plot2(mot_contrl_get_final_torque(&motor.controller), mot_contrl()->target_torque);
+		//plot_hall_angle();
 	}else if (plot_type == 3) {
 		plot_smo_angle();
 	}else if (plot_type == 4) {

+ 2 - 2
Applications/bsp/gd32/board_mc100_v1.h

@@ -25,14 +25,14 @@
 #define CONFIG_LADRC_OBSERVER 1
 //#define CONFIG_SPEED_LADRC  1
 #define CONFIG_SENSORLESS_TS FOC_CTRL_US
-
+#define CONFIG_FORCE_HIGH_VOL_MODE
 
 #define SCHED_TIMER TIMER5
 #define SCHED_TIMER_RCU RCU_TIMER5
 #define SCHED_TIMER_IRQ TIMER5_IRQn
 #define SCHED_TIMER_IRQHandler TIMER5_IRQHandler
 
-#define PWM_DEAD_TIME_NS 400u
+#define PWM_DEAD_TIME_NS 600u
 #define PWM_TOFF_DELAY_MAX 240u
 #define PWM_TON_DELAY_MIN 200u
 #define HW_DEAD_TIME_NS  210u

+ 1 - 1
Applications/foc/foc_config.h

@@ -52,7 +52,7 @@
 #define CONFIG_CURRENT_LOOP_DECOUPE    //电流环解耦
 #define CONFIG_SENSORLESS_MAX_IDC 30
 #define CONFIG_SENSORLESS_MAX_TORQUE 100
-#define CONFIG_SENSORLESS_MAX_SPEED 4000
+#define CONFIG_SENSORLESS_MAX_SPEED 1200
 
 #define CONFIG_PHASE_UNBALANCE_PEAK_CNT 3 //计算经过的电周期内的最大值(peak 峰值)
 #define CONFIG_PHASE_UNBALANCE_THROLD 4.0F

+ 1 - 1
Applications/foc/motor/hall.c

@@ -273,7 +273,7 @@ static __INLINE void hall_calc_mot_velocity(u32 delta_cnt) {
 	hall_put_sample(delta_cnt);
 	g_hall.elec_angle_vel = hall_elec_angle_vel();
 	float velocity_raw = g_hall.elec_angle_vel/PHASE_360_DEGREE/g_hall.mot_poles * 60.0f * g_hall.dir;
-	LowPass_Filter(g_hall.velocity_filted, velocity_raw, 0.9F);
+	LowPass_Filter(g_hall.velocity_filted, velocity_raw, 0.5F);
 }