Real time DSP. Professors: Eng. Julian Bruno Eng. Mariano Llamedo Soria. DSP fundamentals. Number representation and word-length effects. Recommended bibliography. RG Lyons, Understanding Digital Signal Processing. Prentice Hall 1997. Ch9: Digital Data Formats and their effects.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Eng. Julian Bruno
Eng. Mariano Llamedo Soria
Number representation and word-length effects.
Sign bit 011= 3
Range -2N-1 to (2N-1-1)
for N data bits
DRdB = 20log(lv/sm)
DRdB: Dynamic Range in dB
lv: Largest possible value
sv: Smaller possible value
DRdB= 6.02dB . (N-1)
Fractional representation is equivalent to integer representation.
Fractional dot could be placed arbitrarily anywhere.
Most widely used formats are Q15 and Q31.
Dynamic range is exactly the same than their integer counterparts “short” and “int” C language types.
Q15 means 15 bits for fractional part (aka 1.15)
Q31 means 31 bits for fractional part (aka 1.31)
Q12 means 12 bits for fraction 3 bits for integer
/2N: moves dot N places left
x2N: moves dot N places right
Decimal equivalency for 1.X formats
DRQ15 = 6.02*15 = 90.3 dB
DRQ31 = 6.02*31 = 186.62 dB
Range -1 to 1-(2-N)
for N fractional bits
Fractional Format Q3
For non integer Q formats, multiplying large sequence of numbers cause loss of precision, but never overflow.
For non integer Q formats, summing large sequence of numbers could cause overflow.
Dynamic range is closely related with the two previous statements.
The greater dynamic range, the smaller probability that overflow or loss of precision could happen.
Remember that most DSP algorithms multiply and sum very often, so special care must be taken to prevent overflow or loss of precision.
Effect of β in SNR
For example adopting β=0.5 implies a 6.02 dB decrease of SNR. This is equivalent that dividing by 2, rotating 1 time to the right, or losing 1 bit of resolution.
More relaxed scaling
Without saturation arithmetic
With saturation arithmetic
We have the following output
For a system defined by:
and an input:
being the overflow rule:
having a 4 bit word length, and no saturation arithmetic
Complex conjugated two poles band pass
And its difference equation
Normalized numbers ( 1,f 2e-127)
Gap = 1.4e-45
Gap = 2.8e-45
Min. Positive Normalized
0 00000001 00000000000000000000000
( 0,f 2-126)
Gap = 1.4e-45
Min. Positive Denormalized
0 00000000 00000000000000000000001Normalized & Denormalized numbers (32-bit format )
¿X = 0?
¿Y = 0?
¿X = 0?
¿Y = 0?