Datasheet
TMC4671 Datasheet • IC Version V1.3 | Document Revision V2.00 • 2020-Apr-17
58 / 142
4.8 Filtering and Feed-Forward Control
The TMC4671 uses different filters for certain target and actual values. When using standard velocity
meter, a standard velocity filter is used which is optimized for velocity signals from Hall sensors. Additional
Biquad filters can be used to suppress measurement noise or damp resonances.
4.8.1 Biquad Filters
The TMC4671 uses standard biquad filters (standard IIR filter of second order, Wikipedia Article) in the
following structure.
Y(n) = X(n) · b_0 + X(n-1) · b_1 + X(n-2) · b_2 + Y(n-1) · a_1 + Y(n-2) · a_2 (33)
In this equation X(n) is the actual input sample, while Y(n-1) is the filter output of the last cycle. All
coefficients are S32 values and are normalized to a Q3.29 format. Users must take care of correct
parametrization of the filter. There is no built-in plausibility or stability check. All filters can be disabled or
enabled via register access. Biquad state variables are reset when parameters are changed. The TRINAMIC
IDE supports parametrization with wizards.
A standard biquad filter has the following transfer function in the Laplace-Domain:
G(s) =
b_2_cont · s
2
+ b_1_cont · s + b_0_cont
a_2_cont · s
2
+ a_1_cont · s + a_0_cont
(34)
The transfer function needs to be transformed to time discrete domain by Z-Transformation and coeffi-
cients need to be normalized. This is done by the following equations.
b_2_z = (b_0_cont · T
2
+ 2 · b_1_cont · T + 4 · b_2_cont)/(T
2
− 2 · a_1_cont · T + 4 · a_2_cont) (35)
b_1_z = (2 · b_0_cont · T
2
− 8 · b_2_cont)/(T
2
− 2 · a_1_cont · T + 4 · a_2_cont) (36)
b_0_z = (b_0_cont · T
2
− 2 · b_1_cont · T + 4 · b_2_cont)/(T
2
− 2 · a_1_cont · T + 4 · a_2_cont) (37)
a_2_z = (T
2
+ 2 · a_1_cont · T + 4 · a_2_cont)/(T
2
− 2 · a_1_cont · T + 4 · a_2_cont) (38)
a_1_z = (2 · T
2
− 8 · a_2_cont)/(T
2
− 2 · a_1_cont · T + 4 · a_2_cont) (39)
b_0 = round(b_0_z · 2
29
) (40)
b_1 = round(b_1_z · 2
29
) (41)
b_2 = round(b_2_z · 2
29
) (42)
a_1 = round(−a_1_z · 2
29
) (43)
a_2 = round(−a_2_z · 2
29
) (44)
while T is the sampling time according to PWM_MAX_COUNT
·
10 ns and variables with index z are auxiliary
variables.
A standard second order lowpass filter with given cutoff frequency
ω
c
and damping factor D has the
following transfer function in the Laplace-Domain:
G
LP
(s) =
1
1
ω
2
c
· s
2
+
2 D
ω
c
· s + 1
(45)
Users can determine filter coefficients with the upper equations by comparing coefficients of both transfer
functions. The TMCL-IDE also provides a dimensioning tool.
There are four biquad filters in the control structure. Figure 35 illustrates their placement in the control
structure.
©2020 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com