From 3efac208723dc1cb8a0cc81c728196bdc3fbd424 Mon Sep 17 00:00:00 2001 From: Tero K Date: Wed, 2 Mar 2016 23:44:00 +0200 Subject: Redefined notch filter parameter meaning --- simplemotion_defs.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/simplemotion_defs.h b/simplemotion_defs.h index f4c0dc5..9752e4f 100644 --- a/simplemotion_defs.h +++ b/simplemotion_defs.h @@ -449,13 +449,12 @@ //torque modifiers & effects /*SMP_TORQUE_NOTCH_FILTER contains 3 values in different bit positions: * 0-7 (lowest byte), attenuation in 0.1dB steps and value V=1-255 means attenuation of (-V-255)/10 dB gain. if V set 0, use notch filter instead of peaking with "infinite" attenuation. value 255 disables notch filter. - * 8-15, Q factor in 0.1 steps - * 16-30, center frequency in 0.2Hz steps so range is 0-1638.3 Hz. value 0 disables the filter. + * 8-15, Q factor in 0.1 steps. Minimum is 0.1, below that filter is disabled. + * 16-29, center frequency in 0.1Hz steps, and 1.1Hz is minimum, so range is 1.1-409.5 Hz. value below or equal 1Hz disables the filter. * - *Example, peaking filter with gain -12.5dB, center freq 1000Hz and Q=5.5 value is: 0x01F43782 (0x01f4=1000/2, 0x37=5.5*10, 0x82=255-12.5*10) *Example, peaking filter with gain -11.5dB, center freq 20Hz and Q=3.5 value is: 0x00648c23 = dec 6589475 * - *Notch filter works in all control modes + *Notch filter works in all control modes and is applied to torque controller setpoint */ #define SMP_TORQUE_NOTCH_FILTER 240 //define damping effect gain in torque control mode, torque added to setpoint equals -speed*gain with -- cgit v1.2.3