jack kilby wrote:
> Hello all,
> Thanks for all of your responses.Kindly look in to the coeefficients
> and help me cross the river.a of now i work like this
> datain = 15 bits
> 1 input to multiplier (from the data)= 15 bits
> 2 input to multiplier (from coeff) = 10 bits (i multiply by 2 power
> 10)
> output of multiplier = 25 bits
> input to accumulato =25 bits
> i finally take the last 16 bits out....
Hi Jack,
If the coefficients are only 10 bits long, then multiplying the
real coefficients below by 1024 (2^10) will overflow the largest
one:
round(0.538 * 1024) = 551.
The largest value you can represent with a signed, two's complement
10-bit number is 511.
Perhaps this is your problem?
--Randy
>
>
>
> input ----> multiplier ----> accumulator ----- > output
>
> -5.190235e-004
> 7.013896e-004
> 4.266952e-004
> -1.029301e-003
> -2.968241e-004
> 1.574129e-003
> -2.264815e-005
> -2.327546e-003
> 7.114860e-004
> 3.198614e-003
> -1.948620e-003
> -4.004581e-003
> 3.880218e-003
> 4.471644e-003
> -6.589314e-003
> -4.243290e-003
> 1.007195e-002
> 2.889538e-003
> -1.422408e-002
> 9.683918e-005
> 1.884194e-002
> -5.346749e-003
> -2.363674e-002
> 1.377756e-002
> 2.826236e-002
> -2.710135e-002
> -3.235257e-002
> 4.962334e-002
> 3.556310e-002
> -9.729160e-002
> -3.761264e-002
> 3.153014e-001
> 5.383093e-001
> 3.153014e-001
> -3.761264e-002
> -9.729160e-002
> 3.556310e-002
> 4.962334e-002
> -3.235257e-002
> -2.710135e-002
> 2.826236e-002
> 1.377756e-002
> -2.363674e-002
> -5.346749e-003
> 1.884194e-002
> 9.683918e-005
> -1.422408e-002
> 2.889538e-003
> 1.007195e-002
> -4.243290e-003
> -6.589314e-003
> 4.471644e-003
> 3.880218e-003
> -4.004581e-003
> -1.948620e-003
> 3.198614e-003
> 7.114860e-004
> -2.327546e-003
> -2.264815e-005
> 1.574129e-003
> -2.968241e-004
> -1.029301e-003
> 4.266952e-004
> 7.013896e-004
> -5.190235e-004
>
>
> thanks
> jack
>
>
>
[email protected] (Randy Yates) wrote in message news:<
[email protected]>...
>
>>Jim Thomas <
[email protected]> wrote in message news:<
[email protected]>...
>>
>>>Randy Yates wrote:
>>>
>>>>For these particular coefficients, Q15 isn't
>>>>very appropriate. Even the largest coefficient
>>>>would only be the integer value 89 - a very
>>>>high coefficient quantization error.
>>>>
>>>>Try Q23, i.e., multiply all real coefficients by
>>>>2^23 to get the integer-valued coefficients.
>>>
>>>Randy,
>>>
>>>I'm not sure the OP listed all the coefficients. In the original post,
>>>the list of coefs was followed by something akin to an ellipsis:
>>>
>>> > -0.000467744403
>>> > 0.000802870932
>>> > -0.000000000000
>>> > -0.001041888331
>>> > 0.000768540238
>>> > 0.000930750510
>>> > -0.001834127637
>>> > 0.000000000000
>>> > 0.002708566451.......
>>>
>>>Those coefs struck me as oddly small too, which is what led me to look
>>>for symmetry - instead of symmetry, I saw the dots. Presumably, he has
>>>more coefs, and they get larger.
>>
>>Hey Jim,
>>
>>Good point - I hadn't noticed the dots or the "values like" phrase.
>>
>>Hey Jack, can you give us all your coefficients?
>>
>>Actually, we need to know your machine architecture (especially
>>the accumulator length) as well if you want to avoid overflow
>>while accumulating. Or, better yet, read my paper on the subject
>>and you can learn how to do it yourself.
>>
>>http://home.earthlink.net/~yatescr/fir.pdf
>>
>>--Randy
--
% Randy Yates % "...the answer lies within your soul
%% Fuquay-Varina, NC % 'cause no one knows which side
%%% 919-577-9882 % the coin will fall."
%%%% <
[email protected]> % 'Big Wheels', *Out of the Blue*, ELO
http://home.earthlink.net/~yatescr