Why can 'e' not be positive in levinson function?

I know that, theoretically, the error prediction comping out from the levinson algorithm should be positive and less than 1.
Why levinson() can not produce such an output matching to the theory?
Should I make some normalization or so?
Also, I would like to contact the technical support of MATLAB to ask about the algorithm itself. So can anyone tell me how I can find the technical support.

댓글 수: 2

John D'Errico
John D'Errico 2017년 8월 6일
편집: John D'Errico 2017년 8월 6일
If you want to contact technical support, why not just click on the "contact us" button, on the top right of your browser page here? Answers is not technical support. At least, not official tech support.
Thank you.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2017년 8월 6일

0 개 추천

Finding the technical support is easy. Do you see the "Contact Us" link on the top right of this page?
What are your inputs? Which output do you get for e? Which Matlab version are you using? Do you use the same definition of e as Matlab's function?

댓글 수: 3

Thank you.
The inputs are two parameters; a normalized autocorrelation vector and the order.
The output is scalar and negative: -0.5483
I'm using MATLAB R2016a.
Yes, same definition:
[a,e] = levinson(r,n)
Sorry, can you please post the original values of the inputs you use? I did not meant the definition of the function, but the mathematical definition. Note that all, the documentation explains is:
[a,e] = levinson(r,n) returns the prediction error, e, of order n.
So perhaps this e is not what you exactly expect as "error prediction". As soon as even the value does not match your definition, this seems to be sure.
  1. Provide the input data, such that the forum can confirm the problem. Perhaps it is a damaged Matlab function on your computer only.
  2. Provide the definition which let you assume, that e should by inside [0,1].
This is my test code:
%%Test Data
fs = 200;
fo = 1;
phi = 0;
ts = 1/fs;
T = 4;
t = -T/2:ts:T/2-ts;
xt = .7*(1 + cos(2*pi*fo*t - phi));
%%Auto-correlation
order = 2;
[R,lags] = xcorr(xt,order); % restrict the autocorr to be from -2 to 2
R = ts/T * R;
[a,e] = levinson(R,order); % e = -0.0056
The definition of e is:
e_n = e_{n-1} * (1 - | Q |^2)
where Q is a reflection coefficient and it is less than or equal 1 and e is recursively computed and when n-1 = 0 e was equal the average power of the zero mean of the sample which is less than 1.

댓글을 달려면 로그인하십시오.

카테고리

질문:

2017년 8월 6일

편집:

2017년 8월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by