Robotics & Control Systems

Chapter 2
Mathematical Modeling of Dynamic Systems

Bachelors Program in Mechnical Engineering
Robotics & Control Systems   •   Bachelor

Mathematical Modeling of Dynamic Systems

Introduction

Robots and automated machines are dynamic systems: their variables change with time, and their behavior depends on stored energy, dissipated energy, applied inputs, and internal interactions. A robot joint accelerates because torque produces angular momentum; a motor current changes because voltage acts against resistance, inductance, and back electromotive force; a hydraulic actuator moves because pressure differences create force. Mathematical modeling converts these physical relationships into equations that can be analyzed, simulated, and used for control design.

A model is not the physical system itself. It is a purposeful approximation developed for a defined operating range and objective. A model for selecting a motor may emphasize torque, speed, and thermal limits, whereas a model for controller design may emphasize poles, zeros, bandwidth, and disturbance rejection. Good modeling therefore requires both physical knowledge and engineering judgment.

Learning Objectives

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

  1. Identify states, inputs, outputs, parameters, and disturbances in a dynamic system.
  2. Formulate mechanical, electrical, hydraulic, and electromechanical differential equations.
  3. Use Newton’s laws, Kirchhoff’s laws, force–voltage analogies, and energy methods.
  4. Linearize nonlinear equations about an equilibrium point.
  5. Derive transfer functions and state-space models.
  6. Construct and interpret block diagrams.
  7. Select simulation methods and assess model limitations.
  8. Apply modeling principles to a robotic actuator.

1. Dynamic-System Concepts

A dynamic system contains energy-storage elements, so its present behavior depends on its history. In mechanical systems, mass and inertia store kinetic energy, while springs store potential energy. In electrical systems, inductors and capacitors store magnetic and electric energy. In hydraulic systems, fluid compressibility and accumulators store energy.

Important terms are:

  • Input: an externally imposed quantity, such as motor voltage or applied force.
  • Output: a measured or controlled quantity, such as position or speed.
  • State: the minimum set of variables that, together with future inputs, determines future behavior.
  • Parameter: a physical property assumed constant over the analysis, such as mass, resistance, or damping.
  • Disturbance: an unwanted input, such as friction variation or external load torque.
  • Equilibrium: a condition in which state variables remain constant when inputs are constant.

For a continuous-time state model,

ẋ(t) = f(x(t), u(t), p, t)
y(t) = g(x(t), u(t), p, t)

Here, x is the state vector, u is the input vector, y is the output vector, p is the parameter vector, and f and g are possibly nonlinear functions. The dot denotes differentiation with respect to time. For a linear time-invariant (LTI) system,

ẋ = Ax + Bu
y = Cx + Du

A, B, C, and D are constant matrices of compatible dimensions. This representation is especially useful for systems with multiple inputs and outputs.

Order and initial conditions

The order of a differential equation is the highest derivative appearing in it. A second-order model generally requires two independent initial conditions. Physically, these often correspond to two energy-storage variables, such as position and velocity or capacitor voltage and inductor current.

2. Mechanical Modeling

Translational systems

Newton’s second law states that the algebraic sum of forces equals mass times acceleration:

∑F = mẍ

where F is force in newtons (N), m is mass in kilograms (kg), x is displacement in metres (m), and ẍ is acceleration in m/s². Consider a mass connected to a viscous damper and spring, with external force F(t):

mẍ + bẋ + kx = F(t)

The parameters are mass m (kg), damping coefficient b (N·s/m), and stiffness k (N/m). The model assumes small displacement if the spring is linear, viscous damping proportional to velocity, a rigid mass, and one-dimensional motion.

The corresponding energy terms are kinetic energy Tk = 1/2 mẋ2 and spring potential energy V = 1/2 kx2. The damper dissipates power Pb = bẋ2 and does not store energy.

Rotational systems

The rotational counterpart is

Jθ̈ + bθ̇ + kθ = τ(t)

where J is rotational inertia (kg·m²), b is rotational damping (N·m·s/rad), k is torsional stiffness (N·m/rad), θ is angular displacement (rad), and τ is applied torque (N·m). Newton’s rotational law follows from angular momentum balance: the net torque equals Jθ̈.

For a rigid body rotating about a fixed axis,

J = ∑mᵢrᵢ²

or, in continuous form, J = ∫ r2 dm. The parallel-axis theorem gives JO = JG + md2, where J_G is inertia about a parallel axis through the centre of mass and d is the axis separation.

Free-body diagrams and sign conventions

A reliable mechanical model begins with a free-body diagram. Define positive displacement and rotation, draw every external force or torque, and express spring and damper forces relative to that direction. In a multi-body robot, joint torques must be balanced consistently; an incorrect sign can produce an apparently plausible but physically unstable model.

3. Electrical Modeling

Kirchhoff’s voltage law states that the algebraic sum of voltages around a closed loop is zero. For a series RLC circuit driven by voltage v(t),

Lq̈ + Rq̇ + (1/C)q = v(t)

where q is charge (C), current is i = q̇ (A), inductance L is in henries (H), resistance R is in ohms (Ω), and capacitance C is in farads (F). Equivalently, in terms of current,

Ldi/dt + Ri + (1/C)∫i dt = v(t)

The inductor stores magnetic energy WL = 1/2 Li2, and the capacitor stores electric energy WC = 1/2 Cv2. The resistor dissipates power PR = Ri2. These equations assume ideal lumped components and operation within their approximately linear ranges.

For a first-order RC circuit with output capacitor voltage,

RC dvC/dt + vC = vin(t)

The time constant is τ = RC seconds. After a step input, the response approaches its final value exponentially; one time constant corresponds to approximately 63.2% of the total change.

4. Hydraulic Modeling

Hydraulic systems transform pressure and flow into force and velocity. For an ideal cylinder,

F = Ap

where F is actuator force (N), A is piston area (m²), and p is gauge pressure (Pa). Flow continuity gives

Q = Aẋ

where Q is volumetric flow rate (m³/s) and ẋ is piston velocity (m/s), assuming negligible leakage and a single effective piston area.

Fluid compressibility introduces compliance. A simplified chamber relation is

Q = Aẋ + (V/βₑ)ṗ

where V is effective fluid volume (m³), βₑ is effective bulk modulus (Pa), and ṗ is pressure rate (Pa/s). Leakage, hose elasticity, trapped air, valve dynamics, and nonlinear orifice flow can significantly modify this model.

For an orifice, a common approximation is

Q = Cd Ao √(2∆p/ρ)

where C_d is discharge coefficient, A_o is orifice area, ∆p is pressure drop, and ρ is fluid density. This expression applies to turbulent incompressible flow through an orifice and is nonlinear because flow varies with the square root of pressure difference.

5. Electromechanical Models

An electromechanical actuator couples electrical and mechanical domains. For a permanent-magnet DC motor, the armature equation is

va = La di/dt + Rai + Keω

and the torque equation is

Jdω/dt + bω = Kti − τL

where v_a is armature voltage (V), i is current (A), L_a is armature inductance (H), R_a is armature resistance (Ω), ω is angular speed (rad/s), K_e is back-emf constant (V·s/rad), K_t is torque constant (N·m/A), τ_L is load torque (N·m), J is total reflected inertia (kg·m²), and b is viscous friction (N·m·s/rad). In coherent SI units, K_e and K_t have numerically equal values for an ideal motor, although their units differ.

The motor converts electrical power into mechanical power with losses. The electromagnetic torque is proportional to current, while back emf is proportional to speed. Gearboxes alter variables according to their ratio. For an ideal gear train with speed ratio n = ω_m/ω_L,

Jreflected = JL/n²

where J_L is load inertia reflected to the motor shaft. This relation assumes an ideal, rigid, lossless gearbox; efficiency and compliance must be included in a realistic model.

Worked Example: DC motor speed model

Neglect armature inductance and load torque. With R_a = 2 Ω, K_t = K_e = 0.1 in SI-compatible units, J = 0.02 kg·m², b = 0.01 N·m·s/rad, the equations become

va = 2i + 0.1ω
0.02ω̇ + 0.01ω = 0.1i

From the first equation, i = (va − 0.1ω)/2. Substitution gives

0.02ω̇ + 0.01ω = 0.05va − 0.005ω

Therefore,

0.02ω̇ + 0.015ω = 0.05va

The time constant is τ = J/(b + KtKe/Ra) = 0.02/0.015 ≈ 1.33 s, and the steady-state speed gain is ω/va = 0.05/0.015 ≈ 3.33 (rad/s)/V. A 6 V step therefore produces an ideal steady-state speed of approximately 20 rad/s, subject to the assumptions and motor limits.

6. Energy-Based Modeling

Energy methods are often more systematic than force-by-force modeling, particularly for coupled mechanisms. The Lagrangian is

ℒ(q,q̇,t) = T(q,q̇,t) − V(q,t)

where T is kinetic energy, V is potential energy, and q is a generalized coordinate. Lagrange’s equation is

d/dt(∂ℒ/∂q̇ᵢ) − ∂ℒ/∂qᵢ = Qᵢ

where Qᵢ is the generalized nonconservative force or torque associated with qᵢ. For multiple coordinates, the equation is applied to each coordinate.

For a simple pendulum of length l and point mass m, with angle θ measured from the downward vertical,

T = 1/2 ml²θ̇²
V = mgl(1 − cos θ)

With no damping or external torque, the result is

ml²θ̈ + mgl sin θ = 0

This nonlinear equation is valid for arbitrary angular displacement under the ideal pendulum assumptions. Energy methods expose coupling and conservation properties, but friction, actuator saturation, backlash, and contact forces must be added separately.

7. Linearization

Many robotic systems are nonlinear. Linearization provides a local approximation around an equilibrium and is the basis of many classical controllers.

Let the nonlinear model be ẋ = f(x,u). Suppose (x₀,u₀) is an equilibrium satisfying f(x₀,u₀)=0. Define perturbations δx = x − x₀ and δu = u − u₀. A first-order Taylor expansion gives

δẋ ≈ Aδx + Bδu

where

A = ∂f/∂x |_(x₀,u₀), B = ∂f/∂u |_(x₀,u₀)

Higher-order terms are neglected. The approximation is appropriate for sufficiently small deviations and smooth functions near the operating point.

For the pendulum, sin θ ≈ θ when θ is expressed in radians and is small. The equation becomes ml²θ̈ + mglθ = 0, a linear model. Around the upright position, using a different angular coordinate, the sign of the gravity term changes; this correctly indicates instability rather than a mere change in notation.

Linearization is local. A controller designed from one operating point may perform poorly at large angles, high speeds, changing payloads, or near actuator saturation.

8. Transfer Functions

For an LTI system with zero initial conditions, the transfer function is the ratio of the Laplace transform of output to input:

G(s) = Y(s)/U(s)

The Laplace variable s has units of inverse seconds. Consider

mẍ + bẋ + kx = F(t)

Taking the Laplace transform under zero initial conditions gives

(ms² + bs + k)X(s) = F(s)

Thus,

X(s)/F(s) = 1/(ms² + bs + k)

The denominator determines poles and natural dynamics. Transfer functions are convenient for SISO analysis, frequency response, and block-diagram reduction, but they do not directly show internal states and are less convenient for nonlinear or strongly coupled systems.

For a second-order normalized form,

G(s) = Kωn²/(s² + 2ζωns + ωn²)

where K is static gain, ω_n is undamped natural frequency (rad/s), and ζ is damping ratio. This form applies when the denominator is a real second-order polynomial with positive coefficients under the conventional stable oscillator interpretation.

9. Block Diagrams and Feedback

A block represents an input–output relationship. In a negative-feedback loop with forward transfer function G(s) and feedback H(s), the closed-loop transfer function is

T(s) = G(s)/(1 + G(s)H(s))

For unity feedback, H(s) = 1. The error is the reference minus the measured output. Feedback can reduce sensitivity to parameter variations and disturbances, but it can also cause oscillation or instability if phase lag and gain are excessive.

A block diagram should preserve signal direction, units, summing signs, and physical meaning. Algebraic reduction is valid only when blocks are connected according to the stated signal relationships; moving a pickoff or summing point requires compensating transformations.

Negative feedback control loop Controller Plant G(s) Σ+− H(s)r(t)y(t)
Negative feedback control loop
Figure: Negative feedback control loop

Figure: Standard negative-feedback structure. The summing junction forms the error between reference and measured output.

10. Simulation and Verification

Simulation predicts behavior before hardware is built. A practical workflow is:

  1. Define the modeling purpose and required fidelity.
  2. Draw the physical system and identify assumptions.
  3. Select coordinates, signs, inputs, outputs, and states.
  4. Derive equations and check dimensions.
  5. Estimate parameters from data sheets, experiments, or identification.
  6. Implement the model in a tool such as MATLAB/Simulink, Python, Modelica, or another validated environment.
  7. Test limiting cases, initial conditions, step responses, and disturbances.
  8. Compare predictions with measurements and revise parameters or structure.

Numerical solvers approximate differential equations. Explicit methods such as forward Euler use

xk+1 = xk + ∆t f(xk,uk,tk)

where ∆t is the time step. Euler integration is simple but can be inaccurate or unstable for stiff systems. Higher-order Runge–Kutta methods improve accuracy, while variable-step solvers adjust the step size according to estimated error. Discontinuities, contact, saturation, and friction require particular care.

Model validation should use data not employed for parameter fitting where possible. Agreement in one step response does not prove that a model is valid for all speeds, loads, temperatures, or trajectories. Units, sampling rates, sensor delays, quantization, and actuator limits must be represented when they affect the control outcome.

Applied Case: Position Control of a Robot Joint

Background

Consider an illustrative single-joint robotic arm driven by a geared DC motor. The objective is accurate angular positioning despite inertia, viscous friction, and a changing payload.

Problem

The motor voltage is the control input, while joint angle is the output. The payload changes the reflected inertia, and an external load torque acts as a disturbance. A controller based only on a static motor gain would ignore transient motion and may produce overshoot.

Analysis

The electrical and mechanical equations are

va = Lai̇ + Rai + Keωm
Jeqω̇m + beqωm = Kti − τL

and joint angle is related to motor speed by θ̇j = ωm/n, where n is the motor-to-joint speed ratio. The equivalent inertia includes motor, gearbox, and reflected load inertia. If gearbox elasticity is important, a two-inertia model with a torsional spring must replace the rigid model.

For initial controller design, the equations may be linearized about a chosen operating point and expressed in state form with states x = [i, ω_m, θ_j]ᵀ. A feedback controller compares commanded angle with encoder measurement. Simulations should include voltage saturation, encoder sampling, computational delay, Coulomb friction, and representative payload values.

Approach and outcome

A reasonable engineering procedure is to identify electrical resistance and motor constants from manufacturer data, measure joint inertia experimentally, simulate step and trajectory responses, and tune the controller using the worst credible payload. Validation is then performed on the actual joint at low speed before full-load operation. The expected outcome is reduced position error and predictable transient response, but performance claims are valid only within the tested operating envelope.

Learning points

The case demonstrates that electromechanical models must connect electrical, mechanical, and sensing domains. It also shows why model purpose matters: a rigid, linear model may be adequate for preliminary tuning but inadequate for impact, backlash, flexible links, or large-angle motion.

Limitations, Safety, and Professional Practice

Models can fail through incorrect structure, uncertain parameters, neglected nonlinearities, or invalid assumptions. Friction may be velocity-dependent; bearings may introduce hysteresis; hydraulic valves may saturate; motors may heat and change resistance. Robust design therefore uses parameter ranges and disturbance tests rather than a single optimistic model.

In robotics, incorrect models can create unsafe motion. Simulation is not a substitute for guarded experiments, emergency stops, torque limits, risk assessment, and staged commissioning. Data used for system identification should be documented, traceable, and protected when it contains proprietary or personal information. AI-based parameter estimation can accelerate modeling, but its results require physical validation, uncertainty reporting, and human oversight. A model that fits data but violates conservation laws or extrapolates beyond its training range should not be accepted without investigation.

Best-Practice Checklist

  • State assumptions before deriving equations.
  • Use a consistent sign convention and SI units.
  • Draw free-body, circuit, or hydraulic diagrams.
  • Check energy storage, dissipation, and causality.
  • Verify dimensions and limiting cases.
  • Separate nonlinear plant equations from local linear approximations.
  • Include actuator, sensor, delay, saturation, and disturbance effects when relevant.
  • Validate with independent experimental data.
  • Report parameter uncertainty and operating range.
  • Use simulation to inform safe experiments, not to eliminate them.

Chapter Summary

Dynamic-system modeling represents physical behavior with differential or algebraic equations. Mechanical models follow force and torque balances; electrical models follow Kirchhoff’s laws; hydraulic models use pressure–force and flow–continuity relationships; electromechanical models couple these domains through torque and back emf. Energy methods provide a systematic route for coupled mechanisms.

State-space models describe internal variables and are suitable for multivariable and nonlinear systems. Transfer functions describe LTI input–output behavior under zero initial conditions and support pole, zero, and frequency analysis. Linearization gives a local approximation near an equilibrium, while block diagrams clarify feedback relationships. Simulation is useful only when assumptions, numerical methods, parameters, and validation are treated carefully. Professional modeling combines mathematical accuracy with physical judgment, uncertainty awareness, and safety controls.

Key Terms

Dynamic system: A system whose variables evolve with time and depend on stored energy or history.

State: A minimum variable set that determines future behavior with known inputs.

Input: An externally applied system quantity.

Output: A measured or controlled system quantity.

Parameter: A property treated as constant in a model.

Disturbance: An unwanted input affecting system behavior.

Equilibrium: A condition in which state derivatives are zero for specified inputs.

LTI system: A linear time-invariant system with superposition and constant parameters.

Transfer function: The zero-initial-condition ratio of output to input in the Laplace domain.

State-space model: A first-order vector representation of system dynamics.

Linearization: A first-order local approximation of a nonlinear model.

Inertia: Resistance to angular acceleration, measured in kg·m².

Damping: Energy dissipation associated with relative motion.

Compliance: Deformation or storage of energy under force or pressure.

Back emf: Motor voltage induced by rotational motion.

Reflected inertia: Load inertia represented at another shaft through a transmission.

Pole: A value of the Laplace variable that makes a transfer-function denominator zero.

Feedback: Use of measured output to influence system input.

Model validation: Comparison of model predictions with independent physical evidence.

Review Questions

Short Answer Questions

  1. What distinguishes a dynamic system from a purely static system?
  2. Define state, input, output, parameter, and disturbance.
  3. State the translational mass–spring–damper equation and define its parameters.
  4. Why is linearization considered a local approximation?
  5. What is the physical meaning of back emf in a DC motor?

Long Answer Questions

  1. Derive the transfer function from force to displacement for a mass–spring–damper system, stating the initial-condition assumptions.
  2. Explain how Kirchhoff’s laws lead to an RLC differential equation and identify the energy-storage elements.
  3. Compare transfer-function and state-space representations for robotic systems.
  4. Explain the use of Lagrange’s equation in modeling a multi-joint mechanism.
  5. Describe a disciplined workflow for developing and validating a simulation model.

Analytical / Application Questions

  1. A robotic joint is modeled by Jθ̈ + bθ̇ = τ. Explain how doubling J changes transient response and what additional information is needed to predict steady-state speed under constant torque.
  2. For a DC motor with neglected inductance, derive a first-order speed model from the armature and torque equations and identify its time constant.
  3. A linear model accurately predicts small motions but fails during large-angle operation. Diagnose at least three likely causes and propose a validation procedure.

Multiple Choice Questions with Answers

Question 1

Which quantity is normally a state variable of a mass–spring–damper system?

A. Applied force only

B. Displacement and velocity

C. Spring stiffness only

D. Damping coefficient only

Correct Answer: B. Displacement and velocity

Question 2

For a translational mass–spring–damper system, which equation is correct?

A. mẍ + bẋ + kx = F(t)

B. mẋ + bx + kẍ = F(t)

C. mẍ + bx + kẋ = F(t)

D. m x + bẍ + kẋ = F(t)

Correct Answer: A. mẍ + bẋ + kx = F(t)

Question 3

What energy does an ideal inductor store?

A. 1/2 Cv²

B. Ri²

C. 1/2 Li²

D. mgh

Correct Answer: C. 1/2 Li²

Question 4

The hydraulic relation F = Ap assumes that:

A. Force is independent of pressure

B. Pressure acts over an effective piston area

C. Flow is proportional to piston acceleration

D. The fluid has zero density

Correct Answer: B. Pressure acts over an effective piston area

Question 5

In a permanent-magnet DC motor, back emf is primarily proportional to:

A. Angular speed

B. Armature resistance

C. Load inertia

D. Gearbox stiffness

Correct Answer: A. Angular speed

Question 6

The transfer function is conventionally defined using:

A. Nonzero random initial conditions

B. Zero initial conditions

C. Only nonlinear equations

D. Only static systems

Correct Answer: B. Zero initial conditions

Question 7

For negative feedback with forward transfer function G(s) and feedback H(s), the closed-loop transfer function is:

A. G(s)H(s)

B. G(s) − H(s)

C. G(s)/(1 + G(s)H(s))

D. H(s)/(1 − G(s))

Correct Answer: C. G(s)/(1 + G(s)H(s))

Question 8

Linearization of ẋ = f(x,u) about an equilibrium uses which matrices?

A. Only the determinant of f

B. Partial derivatives of f with respect to x and u

C. The integral of f over time

D. Only measured output values

Correct Answer: B. Partial derivatives of f with respect to x and u

Question 9

If a gear ratio is defined as n = ω_m/ω_L, the ideal load inertia reflected to the motor shaft is:

A. n²J_L

B. J_L/n²

C. nJ_L

D. J_L/n

Correct Answer: B. J_L/n²

Question 10

Which practice most directly improves model credibility?

A. Removing all disturbances from the test

B. Using a model outside its stated operating range

C. Validating predictions against independent experimental data

D. Increasing numerical step size without checking error

Correct Answer: C. Validating predictions against independent experimental data

Robotics & Control Systems
Chapter 2 of 15