1)
Если я правильно понял , то с помощью линейного предсказания можно по некоторой совокупности отсчетов : определить значение следующего сигнала.
a=lpc(x)
В matlab есть функция lpc которая рассчитывает коэффициенты фильтра 'a' , подав на который белый шум(?) - на выходе получим наше 'x'
Но в helpe в примере , после расчета набора коэффициентов , фильтр возбуждался самим сигналом x ...
Код
randn('state',0);
noise = randn(50000,1); % Normalized white Gaussian noise
x = filter(1,[1 1/2 1/3 1/4],noise);
x = x(45904:50000);
Compute the predictor coefficients, estimated signal, prediction error, and autocorrelation sequence of the prediction error:
a = lpc(x,3);
est_x = filter([0 -a(2:end)],1,x); % Estimated signal
e = x - est_x; % Prediction error
[acs,lags] = xcorr(e,'coeff'); % ACS of prediction error
The prediction error, e(n), can be viewed as the output of the prediction error filter A(z) shown below, where H(z) is the optimal linear predictor, x(n) is the input signal, and is the predicted signal.
Compare the predicted signal to the original signal:
plot(1:97,x(4001:4097),1:97,est_x(4001:4097),'--');
title('Original Signal vs. LPC Estimate');
xlabel('Sample Number'); ylabel('Amplitude'); grid;
legend('Original Signal','LPC Estimate')
noise = randn(50000,1); % Normalized white Gaussian noise
x = filter(1,[1 1/2 1/3 1/4],noise);
x = x(45904:50000);
Compute the predictor coefficients, estimated signal, prediction error, and autocorrelation sequence of the prediction error:
a = lpc(x,3);
est_x = filter([0 -a(2:end)],1,x); % Estimated signal
e = x - est_x; % Prediction error
[acs,lags] = xcorr(e,'coeff'); % ACS of prediction error
The prediction error, e(n), can be viewed as the output of the prediction error filter A(z) shown below, where H(z) is the optimal linear predictor, x(n) is the input signal, and is the predicted signal.
Compare the predicted signal to the original signal:
plot(1:97,x(4001:4097),1:97,est_x(4001:4097),'--');
title('Original Signal vs. LPC Estimate');
xlabel('Sample Number'); ylabel('Amplitude'); grid;
legend('Original Signal','LPC Estimate')
Но если мы используем x , что бы получить x ;в чем тогда смысл предсказания?
Пробовал подавать на вход фильтра белый шум rand() , но ничего хорошего на выходе не получается.
Проясните пожалуйста ситуацию
2)
А вообще задача вот в чем
Имеется массив y(1:N)
Необходимо имея первые N1 <N отсчетов предсказать последние (N-N1) отсчетов
Возможно ли это ? При каких соотношениях N и N1 ?