## How to measure channel power

Discussions related to modulation techniques, filtering, error correction and detection, wireless link layer implementations, etc

Moderator: robert.ghilduta

ykhaled
Posts: 8
Joined: Sat Jun 11, 2016 8:38 pm

### How to measure channel power

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.

bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

### Re: How to measure channel power

DSP is not my strong suit either, but I will try to take a stab at this.
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
All that looks good to me.
ykhaled wrote:To get relative power for N samples; power (dB) = 10*log10(SUM(I*I + Q*Q)/N) - 69.23
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.
ykhaled wrote: I have few questions:
1- How can I get the actual power measured (dBm). I'm not asking for perfect calibrated level
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: 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.
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.
Electrical Engineer
Nuand, LLC.

ykhaled
Posts: 8
Joined: Sat Jun 11, 2016 8:38 pm

### 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.

bglod
Posts: 201
Joined: Thu Jun 18, 2015 6:10 pm

### 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!
Electrical Engineer
Nuand, LLC.