MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today
Asked by SUDHANSHU on 18 Jun 2013

Hello sir, I am working on data (Subject1_1D)available on website. On that,I want to apply autoregressive method by yule-walker algorithm which is applied to estimate the PSD.Now, it is required to divide the spectrum into frequency subbands and then calculate the relative spectral power(RSP). I don't understand how to get the subbands of the spectrum. Plz guide me.

*No products are associated with this question.*

Answer by Wayne King on 18 Jun 2013

Edited by Wayne King on 18 Jun 2013

If I understand your methodology, you are obtaining an AR spectral estimate using the Yule-Walker method and then you want to split that AR PSD estimate into subbands.

In MATLAB, I'll assume you are using pyulear()

If you input the sampling frequency into pyulear(), then you can obtain a frequency vector in cycles/unit time. I'll assume that is cycles\second here (Hz).

You can then easily use that frequency vector to partition the PSD estimate into the desired subbands in Hz.

For example, I'll create a signal and assume it's sampled at 1 kHz. To extract the 100-200 Hz band of the AR PSD estimate:

x = randn(1000,1); y = filter(1,[1 1/2 1/3 1/4 1/5],x); %AR(4) model [pxx,f] = pyulear(x,4,length(y),1000); df = f(2)-f(1); beginidx = floor(100/df)+1; endidx = floor(200/df)+1; subband_100_200 = pxx(beginidx:endidx);

## 0 Comments