# How does real-time signal processing work when the signal we deal with is assumed to be known for all times?

One thing that never sat right with me after my signal processing course is that in order to do signal processing, we must know the entire signal $$x(t)$$.

For instance, I cannot take the Fourier or Z transform of a single data point.

Let's say however I am writing a program for a self-driving car. I need to make a decision as soon as the signals from the sensors come in. I don't have a full signal. At most I have one or two data points.

How can I do signal processing in these real-life, real-time situations?

• This is a limitation of introductory courses. As you study more, you'll find things like signal flowgraphs with stream processing, statistical signal processing, random signals, etc. And Filipe is right -- many real systems operate on signals seen over a short time window. – MBaz Jan 29 '19 at 1:23

You never work with the full signal. Your $$x(t)$$ usually just considers the last N samples. That is why most systems work with a certain delay. Depending on the value of N (and your sample rate) this can be almost instantaneous from a human perspective.

one of the properties of a real-time DSP system is that it is causal. we just cannot look into the future, so in computing output sample $$y[n]$$, none of the input samples in the future, $$x[n+1], x[n+2]...$$ can be used in that computation. This means that only the present and past input samples $$x[n], x[n-1], x[n-2]...$$ and past output samples $$y[n-1], y[n-2]...$$ can be used in that calculation.

if the system is LTI (and causal), that means that the impulse response, $$h[n]$$, must be causal which must be equal to zero for all negative values of $$n$$. the impulse response cannot react before the driving impulse that causes the response.

so even if the limits on the Fourier Integral are $$\pm \infty$$, that does not mean that the quantity being integrated is anything other than zero for all times in the future.

If we have a finite window of real world data, but wish to apply mathematical concepts which seem to require signals that are infinite in length or duration, many other assumptions are often applied. Such as assuming that the data is infinitely periodically repeating outside an FFT aperture, or assuming that the data is zero outside the data aperture, or assuming the data is arbitrary, or Gaussian random, or continuous with some number of finite derivatives, etc., outside the aperture, but that a finite length rectangular (or other) windowing function has already been applied to that longer signal. etc.

Pick the assumptions that seem to best fit your engineering goal(s). (And, hopefully, then test those assumptions to see if your solution fits, or fails, or blows up.)

• "In theory there is no difference between theory and practice. In practice there is." attr. Yogi Berra – hotpaw2 Jan 29 '19 at 1:42