/* u_dc_bus_s = ADCGainF16 (dc bus voltage measured - ADC noise) */
u_dc_bus_s = sub((Frac16) ioctl(ADC_B, ADC_READ_SAMPLE, 3), temperature_dif_ADCs[3] );
u_dc_bus_filtF32 += L_mult(sub ( u_dc_bus_s, u_dc_bus_filt ), coefUFilt);
u_dc_bus_filt = extract_h(u_dc_bus_filtF32);
注释:其中coefUFilt=FRAC16(1 / NU_SAMP_U_FILT);
#define SENSING_FREQ PWM_FREQ/* analog signals sensing frequency */
#define PER_U_DC_BUS_FILT_US 2000.0 /* period of DCbus voltage filtration 2000us */
#define NU_SAMP_U_FILT (PER_U_DC_BUS_FILT_US * SENSING_FREQ / 1000000)
上面是飞思卡尔官网提供的电机驱动程序中的母线电压采样滤波过程,看不太懂,有谁能提供点帮助么?或者推荐一点什么样的帖子或书籍关于数字滤波的。 |