This example shows some subtleties of the Q15.16 data type in a
QFIRE CTR-101
.A classical second order transfer function can suffer the problems of the quantization due to the data type used. Aiming to show this situation, this example was created. The second order function used was:
The real world diagram is represented in Figure 1. All gain values were chosen to avoid quantization problems if they were used inside the
QFIRE CTR-101
.
Figure 1 - Real World diagram
The first line has the input signal of 1, the second one has an input of 128, the third has an input of 1024, the fourth has an input of 0.25 and the last one has an input of 31744.
As can be seen the output signals of the transfer function are scaled before go to the scope, i.e., despite of the different inputs, all the signals should have the same behavior.
As result, it was plotted the following graphic:

Figure 2 - Real World step response
Inside
QFIRE CTR-101
the diagram from Figure 1 has some differences. The new diagram is represented in Figure 3.
Figure 3 - QFIRE diagram
As result of the simulation, it was generated the following signal:

Figure 4 - QFIRE signal
As can be seen in Figure 4, the signal from step of 0.25 has problem of low numeric resolution.
The 31744 step signal was hide due to it has overflow problem. In Figure 5, it is possible to see the comparation between this signal and the step 1 amplitude response.

Figure 5 - Overflow problem
Looking all the graphics, it is evident the quantization problems. Aiming to avoid it, it is recommended to rescale the signal before and after dynamic blocks trying to use bits efficiently.
About MWF
MWF is a traditional Brazilian company that provides a wide range of electronic and mechatronic products for industry sectors such as automotive, agricultural machinery and aerospace.
Contact Us
Rua Doutor Siqueira, 139 / Sala 804 Campos dos Goytacazes - RJ, Brasil
contact@mwf-technologies.com
© 2018-2026 MWF. All rights reserved.