diff --git a/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c b/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c index 248acee..67b2e30 100644 --- a/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c +++ b/vd960Loop/utilities/at32f421_freertos_demo/src/TaskLoop.c @@ -452,12 +452,12 @@ void vd1_task_per_channel(Loop154_Unit *unit) unit->loop_CAPVD = get_flt_value(clamped_value, unit->loop_CAPVD); } - /*--- 2. 稳定期:绕过 IIR 和斜率限幅 ---*/ + /*--- 2. 稳定期:绕过 IIR 和斜率限幅,小窗口快速收敛 ---*/ if (!unit->loop_stable) { unit->loop_CAPVD = unit->loop_Value; update_moving_average(&unit->loop_ORG_SUM, &unit->loop_ORG_CNT, - &unit->loop_Origin, unit->loop_CAPVD, WINDOW_ORIGIN); + &unit->loop_Origin, unit->loop_CAPVD, 100); unit->stable_cnt++; if (unit->stable_cnt >= STABLE_SAMPLES) { unit->loop_stable = 1;