61  Discrete-time systems and signal processing

Sampling, filtering, and recurrence

A sensor does not hand you a continuous function. It hands you numbers at intervals. A microphone gives a stream of samples. A controller updates once per cycle. Once time is sampled, the mathematics changes shape: derivatives become recurrences, spectra pick up aliasing, and filters become algorithms.

That shift matters because upper-year engineering is full of systems that are modelled in continuous time but built in discrete time. A motor may obey a differential equation. The controller that stabilises it still runs on a clock. A seismic wave may be continuous in the ground. The data still arrives as a sampled trace.

This chapter is about that translation. The goal is not to memorise signal processing vocabulary. It is to see the structural move: sampling turns a continuous object into a sequence, and once you have a sequence, the natural questions become delay, recurrence, convolution, spectrum, and stability.


61.1 The discrete-time view

A continuous-time signal is written \(x(t)\). A discrete-time signal is written \(x[n]\), read “x of n.” The variable \(n\) is not time itself. It is an index. The physical time attached to sample \(n\) is

\[t_n = nT_s\]

where \(T_s\) is the sampling period. The sampling frequency is

\[f_s = \frac{1}{T_s}\]

The same physical system can therefore be described in two ways:

  • continuous-time: what the signal is doing between samples
  • discrete-time: what the sampled sequence records at the clock instants

This sounds like a harmless change of notation. It is not. Once the signal is a sequence, operations that looked infinitesimal in continuous time become difference equations and delay operators.

If a discrete-time system takes an input sequence \(x[n]\) and produces an output sequence \(y[n]\), the simplest and most important class is the linear time-invariant discrete system. For those systems, present output depends on present and past samples in a fixed way.

One common form is a finite impulse response (FIR) filter:

\[y[n] = \sum_{k=0}^{M} b_k x[n-k]\]

“Finite” here means the output depends on only a bounded window of \(M+1\) past inputs, so the filter’s memory is bounded. This is a weighted moving combination of current and previous input samples. In plain language: the output at time step \(n\) is built from a short memory of the input. Filters that also feed back past outputs are called infinite impulse response (IIR) and have unbounded memory; they arise in the z-transform and state-space frameworks later in the chapter.

61.2 Why sampling can lie to you

Suppose the continuous signal is

\[x(t) = \sin(2\pi f t)\]

and you sample it every \(T_s\) seconds. Then the discrete sequence is

\[x[n] = \sin(2\pi f nT_s) = \sin\left(2\pi \frac{f}{f_s} n\right)\]

The discrete sequence only sees the ratio \(f/f_s\). This is the beginning of the aliasing problem.

If the sampling frequency is too low, two different continuous frequencies can produce sampled sequences that are indistinguishable. The samples no longer carry enough information to tell you which continuous oscillation was actually present.

The safe rule is the Nyquist idea:

  • to represent frequency content up to \(f_{\max}\), sample faster than \(2f_{\max}\)

That does not solve every practical problem, but it tells you where obvious failure begins. Sampling below that rate invites aliasing: high-frequency content reappears as a false lower-frequency pattern in the data.

This is one of the reasons discrete-time systems need their own mathematics. The sampled sequence is not a transparent window into the continuous signal. It is a transformed object with its own constraints.

61.3 Difference equations and recurrence

Continuous-time linear systems are often described by differential equations. Discrete-time linear systems are naturally described by difference equations.

A first-order example is

\[y[n+1] = ay[n] + bu[n]\]

This says: the next output is built from the current output and the current input. The constant \(a\) carries memory. The constant \(b\) tells you how strongly the input influences the update.

The stability rule for the homogeneous system

\[y[n+1] = ay[n]\]

is very simple:

  • if \(|a| < 1\), the sequence decays to zero
  • if \(|a| > 1\), the sequence grows in magnitude
  • if \(|a| = 1\), the sequence neither decays nor grows and small modelling changes can matter a great deal

This is the discrete-time analogue of looking at pole location in continuous time. In one case you care about left-half-plane location. In the other you care about whether the relevant quantity sits inside the unit circle.

NoteWhy This Works

In continuous time, a mode behaves like \(e^{st}\), so the sign of \(\Re(s)\) decides whether it decays or grows. In discrete time, a mode behaves like \(a^n\), so the magnitude of \(a\) decides whether repeated updates shrink or blow up.

That is the structural translation. Exponentials become powers. Left-half-plane stability becomes unit-circle stability.

61.4 The core method

A first pass through a discrete-time systems problem usually goes like this:

  1. Identify the sampling period \(T_s\) and therefore the sampling frequency \(f_s\).
  2. Decide whether the data is a sampled version of a continuous signal, a genuinely discrete process, or a digital controller state.
  3. Write the update rule or filter equation.
  4. Interpret every term as memory, delay, or input contribution.
  5. Check the relevant stability test: pole inside the unit circle, or coefficient magnitude less than 1 in the simple first-order case.
  6. Connect the algebra back to behaviour: smoothing, lag, oscillation, alias, or amplification.

The habit to build is the same one from the control chapter: do not leave the recurrence as pure symbol manipulation. Ask what it means for the sequence the machine is actually computing.

61.5 Worked example 1: a moving-average sensor filter

A noisy sensor signal \(x[n]\) is filtered by

\[y[n] = \frac{1}{3}\bigl(x[n] + x[n-1] + x[n-2]\bigr)\]

This is a three-point moving average.

What does it do? It smooths out rapid sample-to-sample variation by replacing the present sample with the average of the present and previous two samples. If one sample spikes upward because of noise, the output spike is diluted by the neighbouring samples.

The price is delay. A filter that averages over time cannot react instantly to a real rapid change. This is the first recurring engineering tradeoff in discrete-time signal processing:

  • more smoothing usually means more lag
  • less lag usually means less smoothing

In embedded control, that tradeoff matters because a laggy filter can make an otherwise good controller feel slow or even unstable.

61.6 Worked example 2: discrete-time stability of a sampled update

Consider the update rule

\[y[n+1] = 0.6\,y[n] + u[n]\]

If the input is zero, then

\[y[n+1] = 0.6\,y[n]\]

Starting from \(y[0]\), repeated substitution gives

\[y[n] = 0.6^n y[0]\]

Because \(|0.6| < 1\), the homogeneous response decays to zero. So the system’s memory fades over time.

Now compare with

\[y[n+1] = 1.1\,y[n] + u[n]\]

With zero input, the response is

\[y[n] = 1.1^n y[0]\]

and because \(|1.1| > 1\), the sequence grows. A digital implementation with this update law is unstable.

That is a cleaner rule than many students expect. In first-order discrete-time systems, the entire stability story is often carried by one number.

61.7 Worked example 3: aliasing in a seismic record

A geophysicist samples ground motion at \(f_s = 100\) Hz. A strong sinusoidal component is present at \(f = 70\) Hz.

This is above the Nyquist limit of

\[\frac{f_s}{2} = 50 \text{ Hz}\]

so the signal will alias. The discrete record cannot faithfully represent a 70 Hz oscillation at that sampling rate. It will appear as a false lower frequency in the sampled data.

The engineering lesson is not “compute a formula and move on.” It is that data collection itself is part of the mathematics. Sampling choices determine what questions the later analysis can answer honestly.

This is why signal processing belongs naturally beside estimation and inverse problems in Volume 8. If the measurement process already lost information, no later inference method can magically restore it.

61.8 Where this goes

The most direct continuation is Estimation, inverse problems, and filtering. Once a system is sampled, state estimation, filtering, and inference are usually carried out in discrete time. Kalman filtering, recursive estimation, and streaming data assimilation all inherit the language of recurrences, sampling, and noise that this chapter sets up.

This chapter also sits beside control rather than after it by accident. Upper-year engineers constantly move between the continuous-time model of the plant and the discrete-time implementation of the controller. If Chapter 1 was about shaping behaviour, this chapter is about what happens when that shaping must be done on a clock.

TipApplications
  • digital filters for noisy sensors
  • sampled-data control in motors and robotics
  • audio and vibration signal analysis
  • seismic and geophysical trace processing
  • preprocessing streaming time-series data
  • telemetry, embedded systems, and real-time monitoring

61.9 Exercises

These are project-style exercises. Explain the behaviour as well as the calculation.

61.9.1 Exercise 1

A sensor is sampled every \(0.01\) s.

  1. Find the sampling frequency.
  2. Find the Nyquist frequency.
  3. Decide whether a 30 Hz sinusoid can be represented without aliasing.
  4. Decide whether a 70 Hz sinusoid can be represented without aliasing.

61.9.2 Exercise 2

Consider the discrete-time system

\[y[n+1] = 0.8\,y[n] + 2u[n]\]

  1. Determine whether the homogeneous system is stable.
  2. Starting from \(y[0] = 5\) with \(u[n] = 0\), compute \(y[1]\), \(y[2]\), and \(y[3]\).
  3. Explain what the sequence is doing physically.

61.9.3 Exercise 3

A noisy accelerometer is filtered using

\[y[n] = \frac{1}{4}\bigl(x[n] + x[n-1] + x[n-2] + x[n-3]\bigr)\]

Write a short engineering memo answering:

  1. What kind of behaviour this filter is trying to suppress
  2. Why it introduces lag
  3. Why that lag could matter in a feedback controller

61.9.4 Exercise 4

Choose one sampled-data setting from your field: a microphone, IMU, stock-price stream, satellite time series, or power-system sensor.

Prepare a one-page systems sketch naming:

  1. the physical quantity being sampled
  2. a plausible sampling frequency
  3. one source of aliasing or information loss
  4. one filter or recurrence you might apply
  5. one reason filtering helps
  6. one reason filtering can distort what you care about