power of a signal

116 views (last 30 days)
Tina
Tina on 8 Apr 2013
Commented: Yazan on 30 Jun 2021
Hello;
How can I measure the power of a signal in MATLAB or simulink?
  1 Comment
Yazan
Yazan on 30 Jun 2021
I am assuming that you have a sampled time-domain signal. The power then can be estimated through:
% example: sinusoidal signal
fs = 1; % sampling frequency
t = 0:1/fs:127; % time instants at which the signal is measured
x = cos(2*pi*0.1*t);
pwrx1 = rms(x)^2;
The power can be estimated through the spectrum.
pwrx2 = bandpower(x, fs, [0 fs/2])
See some details here.

Sign in to comment.

Answers (2)

Image Analyst
Image Analyst on 8 Apr 2013
What are the units of your signal? What definition of power are you using? It all depends on what you're starting with and what your definition is. For example with images, the gray level is a unit of energy so to get power you'd have to divide by the exposure time, but then you have to ask if you want the total power integrated over the whole image, or the power on just individual pixels.
  4 Comments
Image Analyst
Image Analyst on 9 Apr 2013
If the units area already watts, then you already have power. You have a power for each and every element. So then what does "power of the signal" mean in that case? The individual elemental power summed or averaged over all elements???

Sign in to comment.


Youssef  Khmou
Youssef Khmou on 8 Apr 2013
hi,
1)Go to Mathw(c) workspace and type :
>>dpslib
2)then go and click on "Estimation" block ,
3) click on "Power Spectrum Estimation" .
4) You have six components : "Periodogram" , "Magnitude FFT","Yule-Walker Method" ," Covariance Method" ,"Burg Method" , and " modified covariance method", choose one of them and link it in your model with a scope to visualize the frequency and the Power .
Note : the Power of AWGN is its STD ( Standard deviation)
  3 Comments
Youssef  Khmou
Youssef Khmou on 8 Apr 2013
1)dsplib.
2) Statistics .
3) Standard Deviation .

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by