Following a past question, I'd like to extrapolate a signal like the one below: (red is signal, blue is the the extrapolated )

t1 = 0:0.1:30;
t2 = 0:0.1:40;
s = @(t) sin(0.2*t)+sin(0.5*t+0.05*t.^2); 
plot(t2,s(t2)); hold on

enter image description here

Linear predictive coding, or AR Burg's method are not successful here. How can you extrapolate that?

  • 2
    $\begingroup$ Only commenting as I only have my guess as to what I might do (which I am sure is not optimum). I would low pass filter to estimate and fit the low frequency sinusoidal component, and high pass filter to estimate the high frequency sinusoidal component including it's chirp rate. From this I would then extrapolate the result based on those estimates. $\endgroup$ Sep 13, 2018 at 1:19
  • $\begingroup$ Think of what Burg is doing: it’s an autoregressive method, so it’s assuming that there is a linear phase relationship between samples. If you have an LFM that you’re trying to approximate, what you have is actually quadratic phase information; therefore, Burg isn’t really the right tool here (no auto regressive method is for that matter). Have you looked at any other methods that aren’t AR based? Singular spectrum analysis extrapolation comes to mind $\endgroup$ Sep 13, 2018 at 1:55
  • $\begingroup$ yes I'm aware that LPC or Burg's are not appropriate. Can you give more details on the option you mentioned? $\endgroup$
    – bla
    Sep 13, 2018 at 7:52
  • $\begingroup$ I’ve worked with SSA quite a lot but never for extrapolation, though I’m aware economists use it there (I’ve never had a need). There’s a nice write up on Wikipedia you could/should check out if you’re interested. $\endgroup$ Sep 15, 2018 at 0:16

1 Answer 1


Here's the approach I took:

  1. Estimate\find the chirp rate in the data.
  2. stretch (actually compress) the data to "unchirp" it so it becomes periodic.
  3. Use AR Burg.
  4. Undo the stretch based on the chirp rate estimate found in (1)

EDIT: here's some sample code that implements the idea:

t = 0:dt:30; % the time vector sampled
t2 = 0:dt:40; % the full time vector to compare the extrap.
s = @(t) sin(0.5*t)+sin(t+0.05*t.^2); % fake data from the question

% 1. find "chirp rate" by finding peaks and fitting a chirp model
[pks locs]=findpeaks(s(t),t);

ModelEqn = 'a*sqrt(x)+b'; % model to fit linear chirp
init_params = [locs(1) 0]'; % for a,b,c of model
f = fit([1:numel(locs)]',locs(:),ModelEqn,'Start', init_params);

% 2.  unchirp (compress) the data to have uniform spaced peaks 

% 3. extrapolate compressed data via AR Burg
ti2=ti(1):dti:(ti(1)+2*numel(t)*dti); % unchirped time to extrap.

N= round(0.75*numel(t)); 
a = arburg(s_unchirped, N);
s_extrap = zeros(1, numel(ti2));
s_extrap(1:N) = s_unchirped(1:N); % fill in the known part of the time series
for n=(N+1):numel(ti2)      
    s_extrap(n) = -sum(a(2:end) .* s_extrap((n-1):-1:(n-N)));
% 4. undo compression on s_extrap to transfom back  
% plot
legend('Signal ground truth ','Signal to be used for extrap','Location','northoutside')

plot(ti, s_unchirped); hold on ; plot(ti2,s_extrap,'r:');
legend('Signal unchirped','Signal unchirped extrap','Location','northoutside')
plot(t2,s(t2));hold on; plot(t2,s_extrap_unchirped)
legend('Signal','Signal extrap.','Location','northoutside')

enter image description here

Some thoughts:

  • instead of the linear chirp model used, one can try a more general nonlinear model, for example, a*x.^b+c, and inverse the transform accordingly.

  • AR burg has its limitations here, not sure that is the best way to go with extrapolation of the periodic (unchirped) data, as it needs to sample "enough".

  • $\begingroup$ Would you care to share some more information? The steps are quite clear but there are no results visible. Have you quantified the error (if any), do you have any intuition as to whether this is applicable to other signals too, have you experienced any difficulties and/or caveats while working on it, is there anything else interesting that is worth noting? $\endgroup$
    – ZaellixA
    Mar 7 at 18:35
  • 1
    $\begingroup$ sure... I'll edit the answer with some code based on the minimal example in the question... $\endgroup$
    – bla
    Mar 7 at 19:22
  • $\begingroup$ @ZaellixA, enjoy the edited answer... $\endgroup$
    – bla
    Mar 7 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.