Forum Discussion
Altera_Forum
Honored Contributor
17 years agoHi,
A recap: A tool(or equation) produces coeffs as fractions of 1. In hardware there are 3 approaches for scaling(assuming result is wide to accomodate all values): 1) scale coeffs maximally e.g max coeff to be 32767 for 16 bits signed. This approach makes most of bits for coeffs but you can't get unitary gain easily. h = h * 32767/max(h); 2) scale sum of coeffs maximally e.g sum to equal 32768 for 16 bits signed. This method allows for unitary gain readily by chopping off 15 LSB bits from result . h = h * 32768/sum(h); 3) scale coeffs as you like, useful to fine control power level. In all cases of truncation(= division) you may round up the result. For a LPF the maximm convolution result value = sum of coeffs x maximum signal value. So you know how many MSBs can be discarded. If you choose to discard an occasionally used MSB then you need to clip the signal though this is undesirable. There is not much point in having coeff bits more than signal itself. You can use Matlab to study the effect of bit resolution on filter response.