My ultimate goal is to measure channel power and be able to plot a power distribution percentage.

The API is working - I can stream I/Q. As I understood the sample either I or Q is a number in the range [-2048, 2047]. So signal ith sample is (Ith + Qthj).

To get the power - I can simply calculate "I*I + Q*Q"

The maximum power that can be measured is basically 2048*2048*2

To get relative power for N samples; power (dB) = 10*log10(SUM(I*I + Q*Q)/N) - 69.23

I have few questions:

1- How can I get the actual power measured (dBm). I'm not asking for perfect calibrated level

2- Do I need to deduct the gains/losses in the reception chain? when I increase the vga1, vga2 and lna. If someone has a formula that accommodate for all parameters would be great.

Many thanks in advance

## How to measure channel power

**Moderator:** robert.ghilduta

### Re: How to measure channel power

DSP is not my strong suit either, but I will try to take a stab at this.

~~Can you explain where the 69.23 comes from? I'm not sure I follow that part.~~ The rest of it looks correct.

Edit: I realized you're subtracting off the full scale maximum, so your maximum dbFS is 0.

All that looks good to me.ykhaled wrote:My ultimate goal is to measure channel power and be able to plot a power distribution percentage.

The API is working - I can stream I/Q. As I understood the sample either I or Q is a number in the range [-2048, 2047]. So signal ith sample is (Ith + Qthj).

To get the power - I can simply calculate "I*I + Q*Q"

The maximum power that can be measured is basically 2048*2048*2

ykhaled wrote:To get relative power for N samples; power (dB) = 10*log10(SUM(I*I + Q*Q)/N) - 69.23

Edit: I realized you're subtracting off the full scale maximum, so your maximum dbFS is 0.

This requires you to have a known input signal level so you can get an idea for all the losses in the chain leading up to (and including) the LMS6. To complicate things, these losses depend on frequency. Remember that the I/Q samples are just unitless numbers, and that dBm is relative to 1 milliwatt. If you don't supply a known input to see what numbers the LMS6 spits out, you can't get even a ballpark dBm conversion.ykhaled wrote: I have few questions:

1- How can I get the actual power measured (dBm). I'm not asking for perfect calibrated level

Yes, you will need to take all gain stages into account, inside and outside the LMS6. If they're in dB, you can just add/subtract.ykhaled wrote: 2- Do I need to deduct the gains/losses in the reception chain? when I increase the vga1, vga2 and lna. If someone has a formula that accommodate for all parameters would be great.

Electrical Engineer

Nuand, LLC.

Nuand, LLC.

### Re: How to measure channel power

Thanks bglod for your advice that definitely clears out very important aspects. As for the average power - you are right - I'm scaling to 0 dB (relative power) 69.23dB being 10log10(2048*2048*2)

Unfortunately I don't have a signal generator to run some basic calibration. Do you think that RF Loop back can be used in anyway to generate a reference signal? I guess the transmission chain has its own limitation as well.

Unfortunately I don't have a signal generator to run some basic calibration. Do you think that RF Loop back can be used in anyway to generate a reference signal? I guess the transmission chain has its own limitation as well.

### Re: How to measure channel power

Yeah, you'd have the same problem if you were to loop it back. The LMS6 transmit is an uncalibrated output and you don't know the losses in the TX path. Sure, you could do it, but you have no way of knowing how close you are to the actual dBm reading. It makes the number meaningless.

I should also note that while the VGA gains in the LMS are linear and occur in steps, the LNA gain is not flat across the frequency range -- it changes quite a bit actually!

I should also note that while the VGA gains in the LMS are linear and occur in steps, the LNA gain is not flat across the frequency range -- it changes quite a bit actually!

Electrical Engineer

Nuand, LLC.

Nuand, LLC.