How do i convert a signal which is int type(minimum value -154454, max value -90102), into a fract16 format?
when i try to fit the signal in the range 0 - 32768, ir doesn't work. Please help, i need to find a solution
You can normalize it by scaling methods. By using fract16 and with signed representation you have only 15 bits for data. Your physical data range is less, so if you map it by normalizing only highest data to [–1…), you actually lose precision. One way is to use more bits to represent data, so you need 32-bit, but you would rather use 16-bit in Blackfin. So you could scale it via min-max range techniques such as described here:
The 1.15 format for signed fractional representation can represent data from –1 to 0.999969, so by increasing the range you can save precision. A value 0.000031 would be lowest you can get from above method.
For any 1.15 signed fractional representation, you would multiply fraction by 2^15 to get the value in processor.
Further, 2's compliment would be the representation for negative numbers (invert + 1).
Retrieving data ...