1
$\begingroup$

When using pwelch algorithm in MATLAB for a signal with $N$ samples,

  • Is there a good rule of thumb for determining the length $L$ of the sections (second variable for the function)?

  • And assuming my input is a voltage signal , what are the measure units I get for $10\log_{10}(P_{xx})$ where $P_{xx}$ is the output signal?

$\endgroup$
0
$\begingroup$

Regarding your questions:

Is there a good rule of thumb for determining the length $L$ of the sections (second variable for the function)?

$L$ (or window argument) specifies a window function to apply, prior to FFT computation of the signal. If $L$ is a vector, that vector is considered as window coefficients and is applied on (multiplied to) signal, for example:

Pxx=pwelch(x,[0 0 1 2 3 3 2 1 0 ]); % Means compute spectrum of x.*[0 0 1 2 3 3 2 1 0]

if it is an integer, then a Ham. or Han. window with length of $L$ is generated and then this Hamming window is applied to the signal:

Pxx=pwelch(x,10); % Means Means compute spectrum of x.*(10 point hamming window)

pwelch is based on FFT, and since the spectrum (DFT) of segmented signals shows frequency leakage, I think it would depend on how much resolution you you want and how much frequency leakage, you can tolerate, but generally The more longer the window for frequency static signals is the more leakage is reduced. See this great tutorial for more detail:

http://www.fhnw.ch/technik/ime/publikationen/2012/how-to-use-the-fft-and-matlab2019s-pwelch-function-for-signal-and-noise-simulations-and-measurements

A side note for example codes above is that if the length of your signal x is greater than specified length for the window, then your signal is segmented to vectors with length of $L$

assuming my input is a voltage signal , what are the measure units I get in the output?

Since your signal is pure voltage (unknown impedance and hence no current (A) is associated), it is not actual "power" or "energy", however you might use $\mathrm{V}^2/\mathrm{H}z$ for PSD. This link might shed more light on it: https://en.wikipedia.org/wiki/Spectral_density#Electrical_engineering In case of logarithmic PSD, you've mentioned it is generally regarded as $\mathrm{dB}/\mathrm{Hz}$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.