Engineering Mathematics III

Chapter 3
Systems of Differential Equations and State-Space Methods

Bachelor Program in Mechatronics Engineering
Engineering Mathematics III   •   Bachelor

Systems of Differential Equations and State-Space Methods

Introduction and Context

Many mechatronic systems contain interacting mechanical, electrical, thermal, and control components. The motion of one component influences others, so the governing equations are usually coupled differential equations rather than a single equation. Examples include a motor driving a flexible load, a vehicle suspension, a robotic manipulator, and an electromechanical actuator.

A systematic representation of such systems is the state-space model. It expresses the system as a first-order vector differential equation and provides a direct route to simulation, stability analysis, modal interpretation, and control-system design.

For a linear time-invariant (LTI) system, the standard continuous-time form is

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

Here, x(t) ∈ ℝⁿ is the state vector, u(t) ∈ ℝᵐ is the input vector, y(t) ∈ ℝᵖ is the output vector, A is the n × n system matrix, B is the n × m input matrix, C is the p × n output matrix, and D is the p × m direct-transmission matrix. The model assumes linearity and time-invariant parameters over the operating region.

Learning Objectives

By the end of this chapter, you should be able to:

  • formulate coupled first-order and higher-order differential equations in matrix form;
  • construct state-space models from physical equations and transfer functions;
  • solve homogeneous systems using eigenvalues and eigenvectors;
  • calculate and interpret the matrix exponential;
  • classify equilibrium points using phase-plane methods;
  • explain modal behavior and the relationship between eigenstructure and stability;
  • formulate the controllability matrix and interpret its engineering meaning;
  • apply state-space methods to a mechatronic system and recognize model limitations.

1. Coupled Differential Equations in Matrix Form

Consider two coupled variables x₁(t) and x₂(t):

ẋ₁ = a₁₁x₁ + a₁₂x₂ + b₁u
ẋ₂ = a₂₁x₁ + a₂₂x₂ + b₂u

Define

x = [x₁ x₂]ᵀ, A = [a₁₁ a₁₂; a₂₁ a₂₂], B = [b₁; b₂]

Then

ẋ = Ax + Bu

The off-diagonal elements of A describe coupling. For example, a₁₂ measures the influence of x₂ on the rate of change of x₁. If both off-diagonal entries are zero, the two state equations are dynamically independent in these coordinates.

Higher-order equations

A second-order scalar equation can be converted into two first-order equations. For

mẍ + cẋ + kx = f(t)

where m is mass in kilograms, c is viscous damping in N·s/m, k is stiffness in N/m, and f is force in newtons, choose

x₁ = x, x₂ = ẋ

Then

ẋ₁ = x₂
ẋ₂ = −(k/m)x₁ − (c/m)x₂ + (1/m)f(t)

Thus

ẋ = [0 1; −k/m −c/m]x + [0; 1/m]f(t)

The state variables must be sufficient to determine future behavior when the present state and future input are known. They need not be physically independent, but they must form a complete description of system memory.

2. From Physical Models to State Space

State-space construction normally follows four steps:

  1. Identify energy-storage variables, such as position, velocity, capacitor voltage, and inductor current.
  2. Write independent physical laws, such as Newton’s law, Kirchhoff’s laws, or conservation of energy.
  3. Select a state vector and solve the equations for first derivatives.
  4. Arrange coefficients into A, B, C, and D matrices.

Electromechanical example

For a DC motor with armature current i and angular speed ω, a simplified model is

L di/dt = −Ri − Kₑω + v
J dω/dt = Kₜi − bω − τL

where L is inductance, R is resistance, Kₑ is back-emf constant, Kₜ is torque constant, J is rotational inertia, b is viscous friction, v is applied voltage, and τ_L is load torque. In SI units, Kₑ and Kₜ have numerically compatible values when the motor is consistently modeled.

Let x = [i, ω]ᵀ and take v as the input, temporarily neglecting τ_L. Then

ẋ = [−R/L −Kₑ/L; Kₜ/J −b/J]x + [1/L; 0]v

If angular speed is measured, y = ω, then

y = [0 1]x

A load torque can be included as a second input with input vector [0, −1/J]ᵀ. This illustrates that a physical disturbance and a commanded input may enter through different columns of B.

3. Solutions of Linear Systems

For the homogeneous system

ẋ(t) = Ax(t), x(0) = x₀

the solution is

x(t) = eAtx₀

where e^{At} is the matrix exponential. It is defined by the convergent power series

eAt = I + At + (At)²/2! + (At)³/3! + ⋯

I is the identity matrix of the same dimension as A. The series is valid for every finite square matrix A, although direct summation is rarely the most efficient numerical method.

For the forced system

ẋ = Ax + Bu

with initial condition x(0) = x₀, the variation-of-constants formula is

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

The first term is the zero-input response and the integral is the zero-state response. If u is constant, u(t) = u₀, and A is nonsingular, the equilibrium is xₑ = −A⁻¹Bu₀. The solution may also be written

x(t) = eAt(x₀ − xₑ) + xₑ

provided the equilibrium exists.

4. Eigenvalues, Eigenvectors, and Modal Behavior

An eigenvalue λ and corresponding nonzero eigenvector v satisfy

Av = λv

Eigenvalues are roots of the characteristic equation

det(λI − A) = 0

If A has n linearly independent eigenvectors, form the modal matrix V from those eigenvectors. Then

A = VΛV⁻¹

where Λ is diagonal and contains the eigenvalues. Consequently,

eAt = VeΛtV⁻¹

and e^{Λt} is obtained by exponentiating each diagonal element:

eΛt = diag(eλ₁t, eλ₂t, …, eλₙt)

The state response is a combination of modes. A real negative eigenvalue produces exponential decay; a positive real eigenvalue produces growth. A complex conjugate pair α ± jβ produces oscillation with envelope e^{αt}, angular frequency |β| rad/s, and damped frequency |β|/(2π) Hz. Stability depends on the real parts of eigenvalues, not merely on whether oscillations occur.

Worked Example 1: Eigenvalue solution

Consider

A = [−2 1; 1 −2]

The characteristic polynomial is

det(λI − A) = (λ + 2)² − 1 = (λ + 1)(λ + 3)

Thus λ₁ = −1 and λ₂ = −3. For λ₁ = −1, an eigenvector is v₁ = [1, 1]ᵀ. For λ₂ = −3, an eigenvector is v₂ = [1, −1]ᵀ. Since both eigenvalues are negative, the origin is asymptotically stable.

For x(0) = [2, 0]ᵀ, write x(0) = c₁v₁ + c₂v₂. Solving gives c₁ = c₂ = 1. Therefore

x(t) = e−t[1; 1] + e−3t[1; −1]

or

x₁(t) = e−t + e−3t, x₂(t) = e−t − e−3t

The fast mode decays with time constant 1/3 s, while the slow mode decays with time constant 1 s. At long times, the slow mode dominates.

Repeated and defective eigenvalues

If an eigenvalue is repeated, there may be fewer independent eigenvectors than its algebraic multiplicity. In that case A is defective and cannot be diagonalized. Generalized eigenvectors or the Jordan form are then required. Terms such as t e^{λt} may appear. This distinction matters in symbolic solutions and numerical conditioning, although a defective matrix with eigenvalues having negative real parts can still be asymptotically stable.

5. Stability and Phase-Plane Analysis

For the autonomous system ẋ = Ax, the equilibrium at the origin is:

  • asymptotically stable if every eigenvalue has negative real part;
  • unstable if at least one eigenvalue has positive real part;
  • marginal in certain non-generic cases when eigenvalues have zero real part and no unstable Jordan behavior occurs.

For a 2 × 2 real matrix, the trace and determinant provide useful preliminary tests. If

p(λ) = λ² − (tr A)λ + det(A)

then a necessary and sufficient condition for both eigenvalues to have negative real parts is

tr(A) < 0 and det(A) > 0

This criterion applies to a real 2 × 2 continuous-time system. It does not replace eigenvalue analysis for higher-order systems.

A phase portrait plots trajectories in the x₁–x₂ plane. The eigenvectors of a real system indicate invariant directions: if the initial state lies along an eigenvector, the trajectory remains on that line. A stable node has two negative real eigenvalues and trajectories approach the origin without sustained rotation. A saddle has eigenvalues of opposite sign and is unstable. A spiral or focus has complex eigenvalues; it is stable when their real part is negative and unstable when positive. A center, associated ideally with purely imaginary eigenvalues, has closed trajectories in the linear model and is not asymptotically stable.

The phase-plane classification is local for nonlinear systems. If a nonlinear model is linearized about an equilibrium, the eigenvalues of the Jacobian describe local behavior when the equilibrium is hyperbolic, meaning no eigenvalue has zero real part.

6. Controllability-Related Structure

A system is controllable if an input can move the state from any initial state to any desired final state in finite time, under the assumed model and admissible inputs.

For the continuous-time LTI pair (A, B), the controllability matrix is

𝒞 = [B AB A²B ⋯ Aⁿ⁻¹B]

The pair is controllable if and only if

rank(𝒞) = n

where n is the number of states. This is the Kalman rank test. For a single-input two-state system, 𝒞 = [B AB], a 2 × 2 matrix.

Controllability does not mean that control is easy, safe, or energy-efficient. A system can be mathematically controllable but poorly conditioned, requiring very large input energy. Physical actuator saturation, rate limits, delays, unmodeled dynamics, and sensor limitations may reduce practical controllability.

The dual concept is observability: whether the internal state can be reconstructed from measured outputs. Its matrix is

𝒪 = [C; CA; CA²; …; CAⁿ⁻¹]

and the pair (A, C) is observable if rank(𝒪) = n. Controllability concerns influence through inputs; observability concerns information through outputs.

7. Transfer Functions and State Space

For zero initial conditions, the transfer function of an LTI state-space model is

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

where s is the complex Laplace variable. This expression requires that the inverse exist for the selected s. The poles of a minimal realization are eigenvalues of A, although pole-zero cancellation can hide internal modes in a nonminimal input-output representation.

State space is generally preferable when there are multiple inputs and outputs, nonzero initial conditions, internal states, or interconnections. Transfer functions remain useful for frequency-response analysis and classical control design.

8. Detailed Applied Case: Flexible Motor–Load Positioning

Background

Consider a motor connected to a load through a flexible shaft. Such systems occur in robot joints, precision stages, and servo drives. The motor angle θₘ and load angle θₗ may differ because the shaft twists.

Problem

A rigid-body model may predict satisfactory performance while ignoring torsional resonance. The engineering task is to construct a state model and identify the modal behavior relevant to vibration suppression.

Modeling approach

Let the shaft stiffness be kₛ and damping be cₛ. With motor inertia Jₘ and load inertia Jₗ, motor torque τ and no external load torque, the equations are

Jₘθ̈ₘ = τ − cₛ(θ̇ₘ − θ̇ₗ) − kₛ(θₘ − θₗ)
Jₗθ̈ₗ = cₛ(θ̇ₘ − θ̇ₗ) + kₛ(θₘ − θₗ)

Choose

x = [θₘ, θ̇ₘ, θₗ, θ̇ₗ]ᵀ

Then

ẋ₁ = x₂
ẋ₂ = (1/Jₘ)[τ − cₛ(x₂ − x₄) − kₛ(x₁ − x₃)]
ẋ₃ = x₄
ẋ₄ = (1/Jₗ)[cₛ(x₂ − x₄) + kₛ(x₁ − x₃)]

These equations define A and B directly. An output such as motor position is y = [1, 0, 0, 0]x; load position is y = [0, 0, 1, 0]x.

Analysis

The eigenvalues of A identify rigid-body and flexible modes. A rigid-body mode may be close to the origin if no external position-restoring mechanism exists, because both inertias can rotate together. The relative coordinates θₘ − θₗ and θ̇ₘ − θ̇ₗ reveal the torsional mode. Increasing shaft stiffness generally raises the flexible-mode frequency, while damping reduces resonance amplitude.

A controller using only motor position may fail to suppress load vibration if the flexible mode is weakly observable or poorly controllable from that measurement and actuator. The controllability matrix tests whether the idealized model permits all modes to be influenced by motor torque. In practice, actuator bandwidth and sensor noise must also be considered.

Outcome and learning points

The state-space model exposes internal variables that a single transfer function may conceal. Eigenvalues provide vibration frequencies and decay rates; eigenvectors describe modal participation; controllability indicates whether torque can affect each state direction. The model also guides sensor selection: measuring load position or shaft torque may improve observability and feedback performance.

This case is illustrative. Real systems require parameter identification, friction modeling, actuator limits, structural nonlinearities, sampling effects, and validation against experimental data.

9. Numerical Implementation and Best Practices

In computation, avoid explicitly forming A⁻¹ when solving linear equations; use a reliable linear solver. For matrix exponentials, use established algorithms such as scaling and squaring with Padé approximation rather than naïve power-series truncation. Check eigenvalue sensitivity when A is nearly defective or poorly conditioned.

For sampled-data control with sampling interval T, the exact zero-order-hold discretization is

x[k+1] = Ad x[k] + Bd u[k]

where

Ad = eAT, Bd = ∫₀ᵀ eAτB dτ

If A is nonsingular, B_d = A⁻¹(A_d − I)B, but the integral or an augmented-matrix method is preferable numerically. Continuous-time stability maps to discrete-time stability when all discrete eigenvalues satisfy |zᵢ| < 1.

Best practice includes:

  • state units should be explicit and consistently scaled;
  • parameters should be identified or justified;
  • equilibrium points should be computed before linearization;
  • eigenvalues should be checked against physical time scales;
  • controllability and observability should be tested;
  • simulations should be compared with conservation laws and experiments;
  • saturation, noise, delays, and neglected modes should be documented.

AI-based tools can assist with symbolic algebra, eigenvalue computation, parameter estimation, and anomaly detection, but results require engineering verification. An incorrect sign in a physical model can produce a plausible-looking but unsafe simulation. Safety-critical decisions must remain traceable to validated equations, measurements, and human review.

Challenges and Limitations

State-space models are powerful abstractions, but they are not automatically complete representations of reality. Linearization is valid only near an operating point when nonlinear effects are sufficiently small. Coulomb friction, backlash, hysteresis, saturation, dead zones, and contact events can produce behavior not captured by an LTI model. Parameter uncertainty can shift eigenvalues and destabilize a design. A mathematically controllable model may be practically uncontrollable because the required input exceeds actuator capacity.

Model governance is therefore part of engineering responsibility. Assumptions, parameter sources, validation data, version history, and operating limits should be recorded. In autonomous mechatronic systems, incorrect state estimation or unstable control can create physical hazards, so verification and fail-safe behavior are essential.

Chapter Summary

Coupled differential equations can be represented compactly as ẋ = Ax + Bu with outputs y = Cx + Du. Higher-order equations become first-order systems by selecting a complete set of state variables. The homogeneous response is x(t) = e^{At}x₀, while forced responses follow the variation-of-constants formula.

Eigenvalues determine exponential growth, decay, and oscillation; eigenvectors identify modal directions. Phase-plane methods classify two-state systems as nodes, saddles, spirals, or centers. For continuous-time LTI systems, negative real parts of all eigenvalues imply asymptotic stability. The controllability matrix tests whether inputs can influence all state directions, while the observability matrix tests whether states can be reconstructed from outputs. State-space methods are especially valuable for multivariable mechatronic systems, but model assumptions, numerical conditioning, physical limits, and validation must always be considered.

Key Terms

State: A variable set that completely describes the system’s future behavior given future inputs.

State vector: Column vector containing the system states.

State-space model: First-order vector representation using A, B, C, and D matrices.

System matrix A: Matrix governing internal state dynamics.

Input matrix B: Matrix describing how inputs enter the state equations.

Output matrix C: Matrix mapping states to measured outputs.

Direct-transmission matrix D: Matrix describing instantaneous input-to-output transmission.

Matrix exponential: Matrix function e^{At} defining the homogeneous LTI solution.

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

Eigenvector: Nonzero direction preserved by a linear transformation, apart from scaling.

Mode: Independent exponential or generalized-exponential component of a response.

Modal matrix: Matrix whose columns are eigenvectors.

Phase portrait: Plot of state trajectories in state coordinates.

Equilibrium: State at which the derivative is zero for a specified constant input.

Asymptotic stability: Convergence to equilibrium from nearby initial conditions.

Controllability: Ability to move the state through input action.

Observability: Ability to reconstruct internal states from outputs.

Linearization: Approximation of a nonlinear model by a linear model near an operating point.

Minimal realization: State-space model with no unnecessary uncontrollable or unobservable states.

Review Questions

Short Answer Questions

  1. What physical meaning is associated with the off-diagonal elements of A?
  2. Why are higher-order differential equations converted into first-order state equations?
  3. State the eigenvalue condition for asymptotic stability of a continuous-time LTI system.
  4. What is the purpose of the controllability matrix?
  5. Distinguish between controllability and observability.

Long Answer Questions

  1. Derive the state-space model of a mass–spring–damper system with force input and position output.
  2. Explain how eigenvalues and eigenvectors determine the modal response of a two-state system.
  3. Derive the variation-of-constants solution for ẋ = Ax + Bu.
  4. Compare transfer-function and state-space representations for a multi-input, multi-output system.
  5. Discuss the assumptions and limitations involved in linearizing a nonlinear mechatronic system.

Analytical / Application Questions

  1. For A = [−4 1; 2 −3], calculate the eigenvalues and classify the origin. Interpret the dominant time scale.
  2. Construct the controllability matrix for A = [0 1; −2 −3] and B = [0; 1]. Determine whether the system is controllable.
  3. A motor-load system exhibits a lightly damped complex eigenvalue pair. Explain which physical measurements and parameter changes could help diagnose and reduce the resulting vibration.

Multiple Choice Questions with Answers

Question 1

For the continuous-time system ẋ = Ax, which condition guarantees asymptotic stability?

A. All eigenvalues of A have positive real parts

B. All eigenvalues of A have negative real parts

C. The trace of A is always positive

D. The determinant of A is zero

Correct Answer: B. All eigenvalues of A have negative real parts

Question 2

For a two-state system, which expression is the controllability matrix for a single input B?

A. [A B]

B. [B A]

C. [B AB]

D. [C CA]

Correct Answer: C. [B AB]

Question 3

What does the matrix exponential e^{At} provide for ẋ = Ax?

A. The equilibrium input

B. The homogeneous state-transition solution

C. The output matrix

D. The characteristic polynomial

Correct Answer: B. The homogeneous state-transition solution

Question 4

A complex eigenvalue pair α ± jβ produces which behavior?

A. Only monotonic growth

B. Only a constant response

C. Oscillation with envelope determined by α

D. A response independent of time

Correct Answer: C. Oscillation with envelope determined by α

Question 5

For a 2 × 2 continuous-time system, which conditions are equivalent to both eigenvalues having negative real parts?

A. tr(A) > 0 and det(A) < 0

B. tr(A) < 0 and det(A) > 0

C. tr(A) = 0 and det(A) = 0

D. tr(A) > 0 and det(A) > 0

Correct Answer: B. tr(A) < 0 and det(A) > 0

Question 6

In a mass–spring–damper state model with x₁ = x and x₂ = ẋ, what is ẋ₁?

A. x₁

B. x₂

C. −kx₁/m

D. −cx₂/m

Correct Answer: B. x₂

Question 7

The transfer function of ẋ = Ax + Bu, y = Cx + Du, under zero initial conditions, is:

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

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

C. (sA − I)B + D

D. C(A − sI)B

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

Question 8

If a two-state system has eigenvalues −1 and −3, which mode dominates at long times?

A. The mode associated with −3

B. The mode associated with −1

C. Both modes grow equally

D. Neither mode exists

Correct Answer: B. The mode associated with −1

Question 9

A system is controllable when the controllability matrix has:

A. Zero rank

B. Rank equal to the number of inputs

C. Rank equal to the number of states

D. A negative determinant only

Correct Answer: C. Rank equal to the number of states

Question 10

For zero-order-hold discretization with sampling interval T, the discrete state matrix is:

A. A_d = A/T

B. A_d = e^{AT}

C. A_d = T + A

D. A_d = A⁻¹T

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

Engineering Mathematics III
Chapter 3 of 15