Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

How to estimate signal power from IQ samples?

Marcinstein

Newbie level 6
Joined
Dec 2, 2019
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
Hi,
I am struggling with the problem on how to calculate power with given IQ samples. Everyone says different ways of doing it. I need just a value not, the PSD. My algorithm goes as follows:
1) Calculate the sum of absolute values of IQ samples: A = sum(abs(samples)) , where samples is the vector w N complex samples
2) Average and RMS calculation so: B = A/(N*sqrt(2)) , where N - amount of complex samples
3) B is Vrms so using P = (Vrms)^2/R formula, I am calculating the power: P = (B)^2/R

I am working as a programmer and during writing code I found different ways of calculating a power. Please help me to figure out proper way.
Thanks in advance
Marcin
 

albbg

Advanced Member level 4
Joined
Nov 7, 2009
Messages
1,200
Helped
406
Reputation
812
Reaction score
377
Trophy points
1,363
Location
Italy
Activity points
9,150
if samples(i) = I(i)+jQ(i) then you method is correct.

You calculate the mean rms voltage over a given number of samples and from it the power.
You could also calculate before the power "P(i)" of the i-th sample then calculate the average of the vector P(i).

The first one should be less sensitive to isolated peaks over the I/Q samples.
 

Marcinstein

Newbie level 6
Joined
Dec 2, 2019
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
if samples(i) = I(i)+jQ(i) then you method is correct.

You calculate the mean rms voltage over a given number of samples and from it the power.
You could also calculate before the power "P(i)" of the i-th sample then calculate the average of the vector P(i).

The first one should be less sensitive to isolated peaks over the I/Q samples.
Hi,
Thank you for your reply. But your second suggestion will give different result. I've tried this on 100 random samples in MATLAB. I believe that I understood you correctly, you suggested to calculate power for each sample and then sum all result and divide by N ? Kinda averaging but based on instantaneous sample power?
Regards
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,791
Helped
13,893
Reputation
28,034
Reaction score
12,524
Trophy points
1,393
Location
Bochum, Germany
Activity points
273,052
Averaging instantaneous signal magnitude as described under 1) would work if the magnitude is constant (CW or FM signal). It doesn't work for a modulated signal where you need to average instantaneous signal power.
 

Marcinstein

Newbie level 6
Joined
Dec 2, 2019
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
Averaging instantaneous signal magnitude as described under 1) would work if the magnitude is constant (CW or FM signal). It doesn't work for a modulated signal where you need to average instantaneous signal power.
Thank you for reply,
Indeed I want to calculate the power of modulated signal. This is wideband OFDM modulation. So are you suggesting to calculate instantaneous power for each sample, and then sum
and average it?
(∑(I²+Q²)/100)/N, were N is the number of complex samples in one slot
I assumed that R = 50Ω
I am right now?
 

albbg

Advanced Member level 4
Joined
Nov 7, 2009
Messages
1,200
Helped
406
Reputation
812
Reaction score
377
Trophy points
1,363
Location
Italy
Activity points
9,150
Yes, FvM is right.

I wrongly presumed your signal was a constant envelope one. In that case the two methods lead to the same result, but using the first one the average over the voltages tends to filter out any spikes.
However it's not correct to use it with modulated signals.
 

Marcinstein

Newbie level 6
Joined
Dec 2, 2019
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
104
Indeed envelope is not constant so final equation for average power should be (R = 50Ω) :
Pavg = Σ (√I² + Q²)²/(2*R*N) = Σ(abs(z))² /(2*R*N) = Σ((I² + Q²)/100)
I am right?
 

kaz1

Newbie level 5
Joined
Aug 15, 2019
Messages
8
Helped
2
Reputation
4
Reaction score
1
Trophy points
3
Activity points
37
Indeed envelope is not constant so final equation for average power should be (R = 50Ω) :
Pavg = Σ (√I² + Q²)²/(2*R*N) = Σ(abs(z))² /(2*R*N) = Σ((I² + Q²)/100)
I am right?

For any digital signalL mean Amp^2 = mean(I^2+Q^2) i.e. sum of (I^2+Q^2)/number of samples.

This is passed through 1 Ohm becomes mean power since P = A^2 *R (Ohms law)

- - - Updated - - -

edit: For any digital signal mean Amp^2 = mean(I^2+Q^2) i.e. sum of (I^2+Q^2)/number of samples.

This if passed through 1 Ohm becomes mean power since P = Amp^2 *R (Ohms law)
 

Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top