#### Marcinstein

##### Newbie level 6

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

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