Signals and Systems

Chapter 5
Differential, Difference, and State-Space Models

Bachelors Program in Electronics and Communication
Signals and Systems   •   Post Graduate

Differential, Difference, and State-Space Models

Introduction and context

Signals and systems can be described in several mathematically equivalent ways. A time-domain input–output relation may be written as a differential equation for a continuous-time system, a difference equation for a discrete-time system, or a set of first-order state equations known as a state-space model. These descriptions are central to filter design, control, communication systems, estimation, embedded implementation, and system identification.

The choice of model depends on the signal representation, available measurements, computational platform, and purpose of analysis. Differential equations are natural for physical systems such as RLC networks and mechanical structures. Difference equations are natural for sampled-data systems and digital filters. State-space models provide a systematic representation of internal dynamics, multiple inputs and outputs, initial conditions, controllability, observability, and modern estimation and control methods.

A model is not the physical system itself. It is an abstraction based on assumptions about linearity, time invariance, causality, parameter constancy, and the frequency range of interest. A technically useful model must therefore be mathematically correct and appropriate for its intended application.

Learning objectives

After studying this chapter, the reader should be able to:

  1. Formulate and interpret linear differential and difference equations.
  2. Solve zero-input and zero-state responses using characteristic roots and transforms.
  3. Distinguish continuous-time, discrete-time, and sampled-data models.
  4. Convert higher-order equations into state-space form.
  5. Analyze stability, controllability, observability, and transfer functions from state models.
  6. Select an appropriate model for simulation, implementation, identification, or control.
  7. Recognize modeling assumptions, numerical limitations, and practical measurement issues.

1. Differential-equation models

1.1 General form

A continuous-time linear time-invariant (LTI) system can often be represented by

an dn y(t)/dtn + an-1 dn-1y(t)/dtn-1 + … + a0 y(t)
= bm dm x(t)/dtm + bm-1 dm-1x(t)/dtm-1 + … + b0 x(t)

Here, x(t) is the input, y(t) is the output, ak and bk are constant parameters, and generally n ≥ m for a proper physical system. The model assumes linearity and time invariance. Its coefficients must have compatible units; coefficients multiplying derivatives of different orders generally do not have identical units.

For zero initial conditions, the transfer function is

H(s) = Y(s)/X(s) = (bm sm + bm-1sm-1 + … + b0)/(an sn + an-1sn-1 + … + a0)

where s has units of inverse seconds. The transfer-function description does not by itself include stored energy due to nonzero initial conditions.

A differential equation may also be nonlinear or time varying, for example ẋ = f(x,u,t). Such models cannot generally be represented by a single transfer function. Around an operating point, a nonlinear model can often be linearized using a first-order Taylor expansion.

1.2 Physical interpretation

Consider a series RLC circuit with input voltage vi(t) and capacitor voltage vo(t). Kirchhoff’s voltage law gives

vi(t) = L di(t)/dt + R i(t) + vo(t), i(t) = C dvo(t)/dt

Substitution yields

LC d²vo(t)/dt² + RC dvo(t)/dt + vo(t) = vi(t)

Thus the transfer function, under zero initial conditions, is

H(s) = Vo(s)/Vi(s) = 1/(LCs² + RCs + 1)

The terms L di/dt, Ri, and vo all have voltage units. This dimensional check is essential when deriving physical models.

1.3 Natural and forced response

For a system written as

a2 y''(t) + a1 y'(t) + a0 y(t) = f(t)

the total response is

y(t) = yn(t) + yf(t)

where yn(t) is the natural or zero-input response and yf(t) is the forced or zero-state response. The natural response is determined by the characteristic equation

a2 r² + a1 r + a0 = 0

If the roots are distinct, r1 and r2, then yn(t) = C1 er1t + C2 er2t. For a repeated root r, yn(t) = (C1 + C2t)ert. For complex roots α ± jβ, the real form is

yn(t) = eαt[C1 cos(βt) + C2 sin(βt)]

The constants are fixed by initial conditions. Stability requires every natural-response mode to decay. For an LTI continuous-time system, asymptotic stability requires all characteristic roots to have strictly negative real parts. Roots on the imaginary axis require special examination and do not satisfy asymptotic stability.

Worked example 1: second-order response

Consider

y''(t) + 5y'(t) + 6y(t) = 0,
y(0) = 2,
y'(0) = −1

The characteristic polynomial is r² + 5r + 6 = (r+2)(r+3), so

y(t) = C1e−2t + C2e−3t

Using the initial conditions,

C1 + C2 = 2
−2C1 − 3C2 = −1

The solution is C1 = 5 and C2 = −3. Therefore,

y(t) = 5e−2t − 3e−3t

Both modes decay, so the zero-input response is asymptotically stable.

2. Difference-equation models

2.1 General form

A discrete-time LTI system is commonly described by

a0 y[n] + a1 y[n−1] + … + aN y[n−N]
= b0 x[n] + b1 x[n−1] + … + bM x[n−M]

where n is an integer sample index. Solving for the current output gives a recursive implementation when at least one delayed output is present:

y[n] = −∑k=1N(ak/a0)y[n−k] + ∑k=0M(bk/a0)x[n−k]

This equation requires initial past values and is causal when the output depends only on the present and past input and output samples.

The z-transform, with zero initial conditions, gives

H(z) = Y(z)/X(z) = (b0 + b1z−1 + … + bMz−M)/(a0 + a1z−1 + … + aNz−N)

The variable z is dimensionless. The delay operator z−1 represents one sampling period.

2.2 Stability and poles

For a causal rational discrete-time LTI system, BIBO stability requires all poles to lie strictly inside the unit circle:

|pk| < 1 for every pole pk

A pole outside the unit circle produces a growing mode. A pole on the unit circle generally prevents BIBO stability, although pole-zero cancellation and special non-generic cases require careful interpretation.

The discrete-time natural response has terms such as Cpn. If p = rejθ, its magnitude varies as rn. Thus r < 1 implies decay, r > 1 implies growth, and r = 1 implies persistent oscillation.

2.3 Difference equations and digital filters

A finite impulse response (FIR) filter has no feedback:

y[n] = ∑k=0M bk x[n−k]

An infinite impulse response (IIR) filter includes feedback and is represented by a denominator in H(z). FIR filters are inherently bounded-input bounded-output stable for finite coefficients, while IIR filters require pole analysis.

Quantization changes the implemented coefficients and stored states. Consequently, a mathematically stable filter may exhibit sensitivity, limit cycles, overflow, or degraded frequency response in finite-precision hardware. Scaling, saturation analysis, suitable realization structures, and coefficient verification are part of professional implementation.

Worked example 2: recursive sequence

Let

y[n] − 0.6y[n−1] = x[n], y[−1] = 0

For the unit impulse input x[n] = δ[n], the first samples are

y[0] = 1,
y[1] = 0.6,
y[2] = 0.36

In general, y[n] = 0.6n u[n]. The pole is z = 0.6, which lies inside the unit circle; hence the system is stable. The recurrence is causal because y[n] uses only y[n−1] and the current input.

3. From continuous time to discrete time

Sampling with period T gives x[n] = xc(nT), where xc(t) is a continuous-time signal. The sampling frequency is fs = 1/T. To avoid aliasing for a strictly band-limited signal with highest frequency B, ideal uniform sampling requires fs > 2B. Practical systems also require an anti-aliasing low-pass filter because real signals are not perfectly band limited.

A continuous-time state model

ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)

has the exact zero-order-hold discretization

x[n+1] = Ad x[n] + Bd u[n]
y[n] = Cd x[n] + Dd u[n]

where

Ad = eAT,
Bd = ∫₀ᵀ eAτB dτ,
Cd = C,
Dd = D

The input is assumed constant over each interval [nT,(n+1)T). If A is nonsingular, Bd = A−1(Ad−I)B, but the integral form is general and should be used when A is singular. Approximate methods such as forward Euler use Ad ≈ I+AT and Bd ≈ BT, but their stability and accuracy depend on the sampling period.

4. State-space models

4.1 Meaning of a state

The state is the smallest set of variables whose present values, together with future input, determine future system behavior. In physical systems, states often correspond to independent energy-storage variables: capacitor voltages, inductor currents, positions, or velocities. State variables are not unique; different coordinate choices can describe the same input–output behavior.

For a continuous-time LTI system with state vector x(t) ∈ ℝn, input u(t) ∈ ℝm, and output y(t) ∈ ℝp,

ẋ(t) = Ax(t) + Bu(t)
y(t) = Cx(t) + Du(t)

The dimensions are A ∈ ℝn×n, B ∈ ℝn×m, C ∈ ℝp×n, and D ∈ ℝp×m. The direct-feedthrough matrix D maps the current input directly to the output.

The solution is

x(t) = eAtx(0) + ∫₀ᵗ eA(t−τ)Bu(τ)dτ

and therefore

y(t) = CeAtx(0) + C∫₀ᵗeA(t−τ)Bu(τ)dτ + Du(t)

The matrix exponential eAt is the state-transition matrix. It describes autonomous evolution, while the convolution-like integral describes the accumulated effect of the input.

4.2 Constructing a companion form

For the scalar differential equation

y(n) + an−1y(n−1) + … + a1y' + a0y = bu

choose

x1 = y,
x2 = ẏ,
…,
xn = y(n−1)

Then

ẋ = Ax + Bu,
y = Cx

with

A = [0 1 0 … 0; 0 0 1 … 0; …; −a0 −a1 … −an−1],
B = [0; 0; …; b],
C = [1 0 … 0],
D = 0

This is one convenient realization, not the only one. Physical and numerically balanced realizations may be preferable to companion form.

4.3 Transfer function from state space

Taking Laplace transforms under zero initial conditions gives

H(s) = C(sI − A)−1B + D

where I is the identity matrix. This expression is valid wherever sI−A is invertible. The poles associated with the state matrix are eigenvalues of A, although pole-zero cancellations can make some internal modes invisible in the transfer function. Such hidden modes remain important for internal stability.

For discrete-time state equations,

x[n+1] = Ad x[n] + Bd u[n]
y[n] = Cd x[n] + Dd u[n]

and the transfer function is

H(z) = Cd(zI − Ad)−1Bd + Dd

4.4 Controllability and observability

The pair (A,B) is controllable if every state can be reached from the origin in finite time using an admissible input. For an n-state continuous-time LTI system, the controllability matrix is

𝒞 = [B AB A²B … An−1B]

The system is controllable if rank(𝒞) = n. For discrete-time systems, the same rank criterion applies.

The pair (A,C) is observable if the initial state can be uniquely inferred from input and output observations over a finite interval. The observability matrix is

𝒪 = [C; CA; CA²; …; CAn−1]

Observability requires rank(𝒪) = n. These are structural properties of a model; practical controllability and observability also depend on actuator limits, sensor noise, conditioning, and energy requirements.

4.5 Stability in state space

A continuous-time LTI state model is asymptotically stable if every eigenvalue of A has negative real part. A discrete-time model is asymptotically stable if every eigenvalue of Ad has magnitude less than one. For continuous-time systems, Lyapunov stability can be tested by finding a positive-definite matrix P satisfying

AᵀP + PA = −Q

for any chosen positive-definite Q. If such a positive-definite P exists, the origin is asymptotically stable. The quadratic function V(x)=xᵀPx acts as a Lyapunov function.

5. Worked state-space example

Consider

y'' + 3y' + 2y = u

Choose x1=y and x2=ẏ. Then

ẋ1 = x2
ẋ2 = −2x1 − 3x2 + u

Thus,

A = [0 1; −2 −3],
B = [0; 1],
C = [1 0],
D = 0

The characteristic polynomial of A is λ²+3λ+2=(λ+1)(λ+2), so the model is asymptotically stable. Its controllability matrix is

𝒞 = [B AB] = [0 1; 1 −3]

whose determinant is −1, so its rank is 2 and the system is controllable. The observability matrix is

𝒪 = [C; CA] = [1 0; 0 1]

which also has rank 2; the system is observable. Finally,

H(s) = C(sI−A)−1B = 1/(s²+3s+2)

as expected from the original differential equation.

6. Model selection and realization issues

The following distinctions are important in engineering practice:

ModelNatural domainMain strengthTypical limitation
Differential equationContinuous timeDirect physical interpretationHigher-order derivatives and initial-condition handling can be inconvenient
Difference equationDiscrete timeDirect digital implementationQuantization and numerical effects
Transfer functionTransform domainFrequency response and interconnection analysisUsually assumes zero initial conditions and hides internal structure
State spaceTime domain, continuous or discreteInitial conditions, MIMO systems, internal states, control and estimationMore variables and matrix computations

Equivalent realizations can differ in numerical robustness. Similarity transformation z = Tx, with nonsingular T, produces

Anew = TAT−1,
Bnew = TB,
Cnew = CT−1,
Dnew = D

and preserves input–output behavior and eigenvalues. It may, however, improve scaling or expose poorly conditioned states. Balanced realizations seek a compromise between controllability and observability and are useful in model reduction.

Model reduction is justified when modes have negligible influence over the operating range. Removing a mode can reduce computational cost but may alter transient response, stability margins, or performance outside the validation conditions. Reduced models should be compared with the full model using error measures relevant to the application.

7. Applied case: digital temperature-control loop

Background

Consider an illustrative laboratory thermal chamber. A heater is driven by a digital controller, a temperature sensor is sampled every 1 s, and the objective is to regulate temperature despite disturbances such as opening the chamber door.

Problem

A continuous approximation of the chamber is

τ dθ(t)/dt + θ(t) = K u(t) + d(t)

where θ is temperature deviation in °C, u is normalized heater command, d is a disturbance expressed as an equivalent temperature input, τ is the thermal time constant in seconds, and K is the steady-state gain in °C per unit command. Assume τ=20 s, K=4 °C/unit, and zero-order-held input with T=1 s.

Analysis and approach

Writing the model as ẋ=−x/τ +(K/τ)u +(1/τ)d, exact discretization gives

θ[n+1] = e−T/τθ[n] + K(1−e−T/τ)u[n] + (1−e−T/τ)d[n]

Since e−1/20 ≈ 0.9512, the discrete model is approximately

θ[n+1] = 0.9512θ[n] + 0.1952u[n] + 0.0488d[n]

The state is the temperature deviation, the input is the heater command, and the output is measured temperature. A sensor model and measurement noise can be added as y[n]=θ[n]+v[n]. A feedback controller can then use the measured output, while an observer or Kalman filter can estimate temperature when sensor readings are noisy or delayed.

Outcome and learning points

The discrete model predicts slow thermal evolution and makes the sampling assumption explicit. It supports simulation, controller tuning, disturbance rejection analysis, and implementation on a microcontroller. Before deployment, the model must be validated against measured heating and cooling data. Saturation, sensor bias, actuator delay, ambient-temperature variation, and safety limits may dominate performance even when the nominal equations are accurate.

8. Identification, computation, and contemporary practice

In many systems, physical parameters are incomplete or uncertain. System identification estimates a model from measured input–output data. A difference model may be fitted using least squares, while state and noise parameters may be estimated with maximum-likelihood methods or subspace identification. Data should be sufficiently exciting, sampled consistently, and collected within safe operating limits. Training and validation data must be separated to detect overfitting.

State estimation is particularly important in modern communication and sensing systems. The Kalman filter uses a linear state model with process and measurement noise and recursively combines prediction with measurement. For nonlinear models, extended or unscented Kalman filters and particle filters may be used, but their assumptions and computational costs differ.

Machine-learning models can approximate nonlinear dynamics, yet physical constraints, stability, extrapolation, interpretability, and safety remain concerns. Hybrid physics-informed models can combine differential equations with data-driven correction terms. Such models should be evaluated on unseen operating conditions and not merely on training error.

Reliable implementation requires:

  • explicit units, sign conventions, and sampling assumptions;
  • independent verification of matrix dimensions and initial conditions;
  • pole/eigenvalue and conditioning checks;
  • anti-aliasing and sensor calibration;
  • finite-precision, overflow, saturation, and timing analysis;
  • validation against measured data and documented uncertainty;
  • fail-safe behavior when sensors, actuators, or computation fail.

There are also governance obligations. A model used in safety-critical control should be traceable, version controlled, independently reviewed, and tested against worst-case conditions. Privacy and cybersecurity become relevant when state estimation uses networked or personal sensor data. A model should never be treated as evidence of system safety without physical testing and hazard analysis.

Challenges and limitations

  1. Model uncertainty: Parameters vary with temperature, frequency, aging, and operating point.
  2. Unmodeled dynamics: Delays, parasitic elements, nonlinear saturation, hysteresis, and friction may affect performance.
  3. Sampling limitations: Aliasing and inadequate sampling can invalidate a discrete model.
  4. Numerical conditioning: Poorly scaled states and nearly dependent modes can make computations sensitive to round-off.
  5. Hidden instability: A transfer function may conceal unstable internal modes removed by pole-zero cancellation.
  6. Initial conditions: Transfer functions alone do not represent arbitrary stored energy.
  7. Identification bias: Noise, insufficient excitation, and feedback during data collection can distort estimated parameters.
  8. Implementation mismatch: The simulated algorithm may differ from the compiled, quantized, delayed, or saturated implementation.

Chapter Summary

Differential equations describe continuous-time dynamics, difference equations describe discrete-time recursions, and state-space models represent internal first-order dynamics with explicit inputs, outputs, and initial conditions. Differential-equation solutions separate natural and forced responses; characteristic roots determine continuous-time stability. Difference-equation poles determine discrete-time stability, with causal rational systems stable when poles lie inside the unit circle.

State-space models use ẋ=Ax+Bu and y=Cx+Du in continuous time, with analogous discrete equations. Their matrix exponential gives state evolution, and their transfer function is H(s)=C(sI−A)−1B+D. Controllability concerns the ability to move states through inputs, while observability concerns reconstructing states from outputs. Exact discretization, sampling assumptions, numerical conditioning, model validation, and finite-precision implementation are essential in professional practice. Modern identification, filtering, and hybrid physics–data models extend these foundations but do not remove the need for physical validation and safety governance.

Key Terms

Differential equation: An equation involving a continuous-time signal and one or more of its derivatives.

Difference equation: A recurrence relating discrete-time samples of input and output signals.

State: The minimum information required, together with future input, to determine future behavior.

State vector: A column vector containing the state variables.

Transfer function: The zero-initial-condition ratio of output transform to input transform.

Natural response: The response produced by stored initial energy with input set to zero.

Forced response: The response produced by an external input with initial conditions set to zero.

Characteristic polynomial: The polynomial whose roots determine natural modes.

Pole: A value of the transform variable at which a transfer function or resolvent becomes unbounded.

Eigenvalue: A scalar satisfying Av=λv for a nonzero vector v.

BIBO stability: Bounded-input, bounded-output stability.

Controllability: The ability to drive the state to desired values using the input.

Observability: The ability to infer the state from input and output measurements.

State transition matrix: The matrix eAt describing autonomous state evolution.

Zero-order hold: An input sampler/reconstructor that holds each sample constant over one sampling interval.

Aliasing: Irreversible spectral overlap caused by inadequate sampling.

Realization: A particular state-space representation of an input–output system.

Model reduction: Approximation of a higher-order model by a lower-order model.

System identification: Estimation of a system model from measured data.

Lyapunov function: A scalar function used to assess stability through its sign and rate of change.

Review Questions

Short Answer Questions

  1. What is the difference between a zero-input response and a zero-state response?
  2. State the pole-based stability condition for a causal rational discrete-time LTI system.
  3. What physical quantities commonly serve as states in an RLC circuit?
  4. Define controllability and observability.
  5. Why does a transfer function generally not describe arbitrary nonzero initial conditions?

Long Answer Questions

  1. Derive the transfer function of a series RLC circuit whose output is the capacitor voltage, and explain the role of each circuit parameter.
  2. Explain how a higher-order differential equation is converted into companion-form state space.
  3. Derive the continuous-to-discrete zero-order-hold model and discuss the assumptions behind it.
  4. Compare differential-equation, difference-equation, transfer-function, and state-space models for engineering design.
  5. Explain how finite precision, coefficient quantization, and state scaling affect digital IIR filter implementation.

Analytical / Application Questions

  1. For y''+4y'+3y=u with y(0)=1 and y'(0)=0, construct a state-space model and determine whether its autonomous dynamics are asymptotically stable.
  2. A discrete model has poles at 0.8, −0.4, and 1.02. Determine whether it is BIBO stable and explain the dominant problem.
  3. A sensor samples a signal whose highest significant frequency is 3 kHz. Determine a theoretical minimum sampling frequency and explain why a practical design normally samples above that value and uses anti-aliasing filtering.

Multiple Choice Questions with Answers

Question 1

For a causal rational discrete-time LTI system, which pole condition guarantees BIBO stability?

A. Every pole has positive real part

B. Every pole lies strictly inside the unit circle

C. Every pole lies on the unit circle

D. At least one pole lies outside the unit circle

Correct Answer: B. Every pole lies strictly inside the unit circle

Question 2

For the system y'' + 5y' + 6y = 0, what are the natural-response roots?

A. 1 and 6

B. −1 and −6

C. −2 and −3

D. 2 and 3

Correct Answer: C. −2 and −3

Question 3

In the state model ẋ = Ax + Bu, what does B represent?

A. The mapping from state to output

B. The mapping from input to state derivative

C. The direct output feedthrough matrix only

D. The characteristic polynomial

Correct Answer: B. The mapping from input to state derivative

Question 4

Which rank condition establishes controllability for an n-state single-input model?

A. rank([C; CA; …; CAⁿ⁻¹]) = n

B. rank(A) = 1

C. rank([B AB … Aⁿ⁻¹B]) = n

D. rank(D) = n

Correct Answer: C. rank([B AB … Aⁿ⁻¹B]) = n

Question 5

For a continuous-time LTI system, asymptotic stability requires all eigenvalues of A to have:

A. Positive real parts

B. Zero magnitudes

C. Negative real parts

D. Magnitude greater than one

Correct Answer: C. Negative real parts

Question 6

What is the exact zero-order-hold discrete state matrix for a sampling period T?

A. A_d = I + AT only

B. A_d = e^{AT}

C. A_d = A/T

D. A_d = T−A

Correct Answer: B. A_d = e^{AT}

Question 7

For the recurrence y[n] − 0.6y[n−1] = δ[n] with zero initial history, what is y[2]?

A. 0.06

B. 0.36

C. 0.60

D. 1.60

Correct Answer: B. 0.36

Question 8

Which expression gives the continuous-time transfer function from a state-space model?

A. H(s) = A(sI−C)⁻¹B

B. H(s) = C(sI−A)⁻¹B + D

C. H(s) = B(sI−D)⁻¹C

D. H(s) = (sI−A)C + D

Correct Answer: B. H(s) = C(sI−A)⁻¹B + D

Question 9

A sampling frequency of 8 kHz is theoretically sufficient for a strictly band-limited signal with highest frequency:

A. 8 kHz

B. 6 kHz

C. 4 kHz

D. 16 kHz

Correct Answer: C. 4 kHz

Question 10

What does observability primarily concern?

A. Driving every state using the input

B. Inferring internal states from measured inputs and outputs

C. Reducing the sampling frequency

D. Eliminating all system poles

Correct Answer: B. Inferring internal states from measured inputs and outputs

Signals and Systems
Chapter 5 of 5