Why does the function ploterrcorr display a graph with the values of autocorrelation that are much more than 1?

2 visualizaciones (últimos 30 días)
It is quite strange that the values of autocorrelation of each delay displayed in the graph are much greater than 1, and I don't know the reason and I wonder if there is someone that has ever found this case. I'm Chinese and my expression may be not quite clear and approriate, hope you could forgive me.
  7 comentarios
志顺 常
志顺 常 el 14 de Jul. de 2022
Editada: 志顺 常 el 14 de Jul. de 2022
@dpb Sorry,I misunderstood your meaning. And I found that the code is quite difficult to understand, and I only found this part of the code which mentions the item 'Output Index':
function info = get_info
info = nnfcnPlot(mfilename,getString(message('nnet:nnplots:PlotErrCorrName')),7.0,[...
nnetParamInfo('outputIndex','Output Index','nntype.pos_int_scalar',1,...
'Index of error element to plot.'), ...
]);
end
and it has no comments in the m-file... Additionally, I have tried some integers but it doesn't work.It seems that 1 is the only appropriate input, but the initial problem is still not solved.
dpb
dpb el 14 de Jul. de 2022
I'm guessing it's outputting the raw, unscaled estimator which, remember, is
Rxx(m)=E{x(n+m)x(n)}
Use
R=xcorr(res,20)
plot([-20:20],R)
and see if you don't get same result.
See xcorr doc for scaling options, it is
R=xcorr(res,20,'coeff');
that is the one you're expecting -- you'll also see it's nothing but the raw one divided by the actual R(0) so it's simple-enough to fixup your case by normalizing yourself.

Iniciar sesión para comentar.

Respuesta aceptada

nick
nick el 5 de Oct. de 2023
Hi ,
I understand that you are facing an issue in figuring out the reason for ploterrcorr to display a graph with the values of autocorrelation greater than 1 at no time lag.
The autocorrelation at lag 0 is equal to the mean squared error and is not normalised. There are two common conventions for error autocorrelation plots:
Either the mean correlation is plotted directly, in which case the height at 0 lag will be the mean squared error, or the correlations are normalized by mean squared error so the lag 0 height is 1. The relative heights and relative confidence band, are the same with either convention. In ploterrcorr it is showing the former, as it shows the additional information of MSE. This is also a common convention for signal processing and control systems.
Kindly refer to “help ploterrcorr in MATLAB command window to know more about “ploterrcorr”.
Hope it helps.
Regards,
Neelanshu.
  1 comentario
志顺 常
志顺 常 el 8 de Oct. de 2023
Hi Neelanshu,
I really appretiate your detailed reply to my answer, it has been a long time since I posed this question so that I almost forget the definitions of these concepts. But just now, I took some time to try to improve my code again and I found that it did work as long as I added one line of code that performs normalization by mean squared error! The image is posted below:
just as you mentioned, I drew the figures without normalizing the data by mean squared error. By now, I think this question is completely resolved. At last, thank for your help again!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by