Open pierre-haessig opened 1 month ago
I've notice that a similar discrepency applies to the fi
LowPassFirstOrderFilter
implementation https://github.com/owntech-foundation/control_library/blob/main/src/filters.cpp#L46The doc says that the filter coefficients comes from exp(-Ts/τ). However, the implementation uses the Taylor series truncated to the 2nd order.
Hello,
I've found minor discrepancies between:
First, the filtered derivative is claimed to be implemented by the "exact" (using exp(-Ts/τ)) discretization of the low pass filter of time constant τ=Td/N (and by the way, τ is not documented). However, it is the backward Euler (as said in the doc) which is implemented. Here is a simplified copy of the code:
Second, there is a special case for the integral when the controller output (the command) is saturated, see L109.
Now, I can make a PR to update the docs to reflect most of these things. Only, I'm not familiar with anti-windup schemes for integral feedback. So I would need some textbook/wikipedia reference to document this aspect.