I'm copying here questions that Alan and Ryan sent about precision and implementation.
In order to better estimate FPGA resources, which will likely impact latency, it would be useful to know how many bits are the a and b coefficients (in the direct form I).
Can you say the expected resolution of the a and b coefficients?
Also, can we assume the filter is 2nd order? Or if not, what values are needed for M and N?
I am thinking we can assume x is 16b and y is 16bits for this first analysis?
Ryan has produced a Verilog model of a digital filter based on the depiction of a direct form I implementation as illustrated in the link you provided.
There are a couple of possibilities to consider. One is that a digital filter model of the controller in a feedback arrangement is to be generated. For example, in the block diagram below:
The controller could be represented by the block labeled as C(z) intended to reflect the Z transform representation of the controller. The “plant” (represented by P(z)) is the entity that it is desired to control. F(z) represents the feedback mechanism (which may have dynamical behavior of its own) and it is assumed that the implementation is designed to provide negative feedback.
As you can see from the system transfer function, H(z), there can be poles of the system (zeros of the denominator of the system transfer function) that must be considered to be sure that the system is stable under the presence of all inputs, x(n).
Question: Is the direct form I model that we are developing the entire H(z) model or just the C(z) (controller model)?
If the difference equation (from which the direct form I model is derived) is representative of the entire system then knowledge of the coefficients a(1), a(2), …, a(M) is all that is needed to investigate the poles and their locations relative to the unit circle (from which the stability can immediately be determined, ignoring for a moment the effects of finite-precision arithmetic).
If, on the other hand, the full model is not represented by Ryan’s code, we will need to have more details (say the transfer functions P(z) and F(z) or their time domain representation equivalents) to be able to capture the behavior of the entire loop.