From: Nils on
I think I have trouble estimating an ARX model for time series data in the frequencydomain or I'm just having trouble with the bode command. I'm trying to obtain a (overly?) simple model for powerline noise and hence the model is focusing on the surrounding of the two main peaks at 60Hz and 180Hz.
This is the code I'm using

%----------------------------------------------------------------------

DATF = fft(DAT);
dw_peak1 = 10;
dw_peak2 =10;
% Focus on the peaks at 60Hz and 180Hz.
filt1 = 2*pi*[60-dw_peak1 60+dw_peak1;180-dw_peak2 180+dw_peak2];
DATFf = idfilt(DATF,filt1);
w = DATFf.freq;
pwrl_pspec = spafdr(DATFf,'max',w); % Just to ensure I get the power spectrum for plotting.

NoiseModel = arx(pwrl_pspec,4);
bode(NoiseModel,w,pwrl_pspec,w);

%----------------------------------------------------------------------

I then have three questions:
1. I just want to make sure... does the bode command plot the power spectral density for the arx model or does it plot something else?
2. I have decided the fit is bad because I can simply multiply the arx spectrum by about a factor 10^4 and get a substantially better fit in the intervals. Is there some kind of normalization I'm missing. Having estimated this arx model, do I still have to estimate the variance of the driving white noise? I thought the arx model was estimated with respect to white noise of amplitude 1.

Any suggestions are more than welcome!