refactor: 去掉快速 IIR,ALFA_CAP1=79 @10ms (同步 DLD154V4B)
This commit is contained in:
@@ -30,8 +30,7 @@
|
||||
* 滤波参数 — M4 优化版 (V2.0+)
|
||||
* tick 提升到 10ms,滤波系数同步调整,保持等效时间常数
|
||||
*===========================================================================*/
|
||||
#define ALFA_CAP1 18 // IIR α = 18/256 ≈ 0.07 (@10ms → τ≈135ms, 等效 50ms 的 79/256)
|
||||
/* 快速 IIR (CAPVD_fast): α=128/256=0.5, τ≈28ms, 用 (old+new)/2 实现,无需宏 */
|
||||
#define ALFA_CAP1 79 // IIR α = 79/256 ≈ 0.31 (@10ms → τ≈32ms)
|
||||
#define MAX_SLOPE_RATE 5 // 斜率限幅: 单次最大变化 5%
|
||||
#define ENTRY_CONFIRM 3 // 进入确认: 连续 N 次低于阈值
|
||||
#define STABLE_SAMPLES 128 // 稳定期样本数
|
||||
@@ -102,11 +101,8 @@ typedef struct {
|
||||
uint16_t loop_dlt_ORG; // 当前灵敏度阈值
|
||||
uint8_t Flt_Reg; // IIR 滤波系数
|
||||
|
||||
/*--- M4 优化 V2.0: 快速 IIR + 进入确认 ---*/
|
||||
uint32_t loop_CAPVD_fast; // 快速 IIR 值 (α=0.5, τ≈28ms)
|
||||
/*--- M4 优化: 进入确认 + 冻结超时 ---*/
|
||||
uint8_t loop_entry_cnt; // 进入确认计数
|
||||
|
||||
/*--- M4 优化 V2.3~2.5: 基线冻结超时 ---*/
|
||||
uint16_t loop_freeze_cnt; // 冻结持续计数
|
||||
uint32_t loop_freeze_ref; // 冻结参考值
|
||||
|
||||
|
||||
Reference in New Issue
Block a user