I am looking for robust estimation method of low and up envelope of the signal consisting from smooth trend component, constant steps between few fixed levels and additive noise (+ outliers of course). This question raised during my current research work on real life signal processing.

Typical example of signal is produced by following MATLAB script:

  %% signal definition
  % number of samples
  Ns = 10000;
  % sampling period [secs]
  Ts = 1;
  time = (1:Ns)*Ts;
  % trend component
  a = 2;
  b = 0;
  T = 1e4;
  slope = time/Ts * 0.0005;
  trend = a * sin(2*pi*time/T) + b + slope;
  % steps component (4 constant levels)
  step = [zeros(1,1000),linspace(0,1,6),1*ones(1,500),linspace(1,0,6),zeros(1,500),linspace(0,-2,10), -2*ones(1,1200),linspace(-2,1,15),1*ones(1,3000),linspace(1,0,6), zeros(1,3000),linspace(0,-1,6), -1*ones(1,751)];
  % noise component (normal noise)
  noise = 0.2*randn(1,Ns);
  % noise = 0.5*(rand(1,Ns)-0.5);
  %% show signals component
  close all
  hold on
  plot(time,trend - 2, 'b--')
  plot(time,trend + 1, 'k--')
  legend('trend','trend+steps','lowenvelope', 'upenvelope','trend+steps+noise')
  title('smooth trend signal with constant steps between 4 levels and noise')
  xlabel('time [sec]')
  ylabel('value [-]')
  hold off

See the following image

enter image description here

The separate signal components are unknown! Steps are always constant and between small number of fixed levels (typically < 4 or 5), so the estimated envelopes should be parallel to the trend signal. Noise is approximated by normal distribution with sigma ~0.1

Any idea how to solve this surprisingly difficult problem? Any relevant references or matlab code links?

Add notes:

  1. In principle I am looking for any robust estimation of trend signal component which is nearly parallel to real trend signal.
  • $\begingroup$ Good to have provided such a detailed example. $\endgroup$ – Laurent Duval Sep 19 '18 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.