I have RSSI calculated as vector magnitude.
$$ RSSI = \sqrt{I^{2}+Q^{2}} $$
I and Q are 12bit values from ADC. Is there a way to convert RSSI to dBFs and how it is done?
Answer
Sure, take 10 * log of the ratio between the measured power, and the full scale power.
Since power goes as the square of voltage, you can remove the square root operation.
That gives you:
$$ dBFs = 10 \log({(I^{2}+Q^{2}) / (2^{11}-1)^2 }) $$
You can of course pull the denominator out of the expression, take its log, and convert it to a constant value to subtract from the log of the numerator.
Defining the maximum range of the inputs can get tricky; the range in two's complement form would be from -2048 to +2047 (though other representations are possible). Considering +/- 2047 the maximum is tempting, though some might say +/- 2047.5. And there's even a school of thought which offsets zero by .5. Rounding errors can have some very interesting effects after multiple DSP operations.
Also, it is tempting to think of the maximum as I=2047 Q=2047, however this is a vector which can only occur at the 45-degree phases - you could see it in an impulse, but not in an undistorted signal. Normally, you would want to adjust your gain to stay within the maximimum vector rotatable to any phase, ie, I or Q = 2047 and the other zero, or their combined magnitude = 2047, so that is what should be considered full scale.
No comments:
Post a Comment