Mathematical Representation of Linear Physical Systems Overview

This document is a compilation of all of the pages regarding translating mechanical systems that is useful for printing.


Mathematical Representation of Linear Physical Systems

Introduction

 This page describes different ways in which physical systems can be represented mathematically.  Generally system equations are derived as a set of differential equations.  For example consider the system shown below (along with free body diagrams and system differential equations).

 

System:

Free Body Diagrams:  

Equations:  Free Body 1 (at x1)      Free Body 2 (at x2)
   
 
 

This representation completely represents the system, but is cumbersome to use.  It requires two equations with multiple symbols and subscripts.  It doesn't generalize well to a wide variety of systems.  In this document we first review the representation of systems with differential equations, then we develop several systems that are generally easier to work with. 

Keep in mind that this document describes how the various forms (e.g., transfer function, state space...) but does not discuss their solution.  That discussion is elsewhere, and separated by discipline:

Equivalency of Representations

This document introduces several system representations (transfer function, state space, ...) for the same system.  The prefered representation depends on the task at hand, but in the end they must all represent the same system.  Procedures for transforming from one representation to another are given in the document accessed by the "Transformations" tab at the top of this page.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Representing Linear Physical Systems with Differential Equations

Contents

Coupled Differential Equations

When analyzing a physical system, the first task is generally to develop a mathematical description of the system in the form of differential equations.  Typically a complex system will have several differential equations.  The equations are said to be "coupled" if output variables (e.g., position or voltage) appear in more than one equation.

Two examples follow, one of a mechanical system, and one of an electrical system.

Example 1: Coupled differential equations: Mechanical System
System
Free Body Diagrams    
Coupled Differential Equations





The system is thus represented by two differential equations:


The equations are said to be coupled because x1 appears in both equation (as does x2).

Example 2: Coupled differential equations: Electrical System
System  
Sum currents at nodes            
Coupled Differential Equations

The system is thus represented by two differential equations:


The equations are said to be coupled because e1 appears in both equation (as does e2).

Developing a set of coupled differential equations is typically only the first step in solving a problem with linear systems.  The next step

A Single Input-Output Differential Equation

A more useful form for describing a system is that of a single input-output differential equation.  In such a description terms with the output and its derivatives goes on the left side of the equation, terms with the input and its derivatives goes on the right.  

Example 3: Deriving a single nth order differential equation; a straightforward example

As an example consider the two coupled equations from the mechanical system above.


If we wish to solve for x1, we can simply solve the first equation for x2

 

and put this expression into the second equation

Simplifying, we get

By convention the differential equation is written

Although this last expression is still very complicated, it is a single third order differential equation relating the output (x1) to the input (Fe).  Using standard techniques, this equation can be solved in a straightforward manner.

Note: as expected all terms in front of x1 and its derivatives have the same sign.  This is a general rule for passive (i.e., no motors, amplifiers...) systems.

It is often the case that a simple substitution, such as the one done above is impossible.  The next example demonstrates this.

Example 4: Deriving a single nth order differential equation; more complex example

For example consider the case:

 

where the x1 and x2 are system variables, yin is an input and the an are all constants.  In this case, if we want a single differential equation with s1 as output and yin as input, it is not clear how to proceed since we cannot easily solve for x2 (as we did in the previous example).  What we can do in cases like this is to replace each derivative by a multiplication by a variable "s" (you'll see why this works when you study Laplace Transforms; for now, accept it without proof.  We can solve the resulting algebraic equation, put it in terms of positive powers of "s."  Each "s" in the final result is replaced by a derivative.

Let's apply the technique to this example.  First replace derivatives by "s"

Now we can solve the first equation for x2 and put this into the second equation

Multiply by a2s+a3 to get positive powers of s (no "s" terms in denominator).

Now we collect like powers of s, and write the differential equation in descending order of derivative, with the output on the left and the input on the right.

Transformations to other forms

Since the differential equation is equivalent to the other mathematical representations of systems, there must be a way to transform from one representation to another.  These methods are discussed here.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Transfer Function Representations of Linear Physical Systems

This section requires knowledge of the Laplace Transform

 

Contents

Introduction

One of the most common and useful methods of representing a system is by its transfer function.   The transfer function is easily determined once the system has been described as a single differential equation (here we discuss systems with a single input and single output (SISO), but the transfer function is easily extended to systems with multiple inputs and/or multiple outputs).  Consider the differential equation with x(t) as input and y(t) as output.

To find the transfer function, first take the Laplace Transform of the differential equation (with zero initial conditions)

The transfer function is then the ratio of output to input and is often called H(s).

Note: This notation takes increasing subscripts for the an and bn coefficients as the power of s (or order of derivative decreases) while some references use decreasing subscripts with decreasing power.  This notation was chosen here in part because it is consistent with MatLab's use.

The polynomial that forms the denominator of the transfer function is called the characteristic equation.  We will see later that it largely determines the nature of the behavior of the system (e.g., slow or fast, oscillatory or heavily damped...).   In general we will write the transfer function such that the coefficient a0 ttis equal to 1.

For the general case of an nth order differential equation with m derivatives of the input (superscripted numbers in parentheses indicate the order of the derivative):

This can be written in even more compact notation:

Example: Transfer function of Physical System

Find the transfer function of the system shown.

We have shown that the system is described by the differential equation:

Therefore the transfer function is:

Key Concept: Defining the Transfer Function

The transfer function is the ratio of the Laplace transform of the output to that of the input, both taken with zero initial conditions.  It is formed by taking the polynomial formed by taking the coefficients of the output differential equation (with an ith order derivative replaced by multiplication by si) and dividing by a polynomial formed in the same way from the coefficients of the input differential equation.

To reiterate: the transfer function is a "zero state" (i.e., all initial conditions are zero) representation of the system.

Solution of Transfer Function Problems

As stated previously, the transfer function is a common and extremely powerful method of representing a system mathematically.   While the applications are not discussed here, some are enumerated below with links to other web pages that do discuss the applications.

Transformations to other forms

Since the transfer function is equivalent to the other representations, there must be a way to transform from one representation to another.  These methods are discussed here.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

State Space Representations of Linear Physical Systems

Contents

Introduction

As systems become more complex, representing them with differential equations or transfer functions becomes cumbersome.  This is even more true if the system has multiple inputs and outputs.  This document introduces the state space method which largely alleviates this problem.  The state space representation of a system replaces an nth order differential equation with a single first order matrix differential equation.  The state space representation of a system is given by two equations :

Note: Bold face characters denote a vector or matrix.The variable x is more commonly used in textbooks and other references than is the variable q when state variables are discussed.  The variable q will be used here since we will often use x to represent position.

 

 

The first equation is called the state equation, the second equation is called the output equation.  For an nth order system (i.e., it can be represented by an nth order differential equation) with r inputs and m outputs the size of each of the matrices is as follows:

Note several features:

For systems with a single input and single output (i.e., most of the systems we will consider) these variables become (with r=1 and m=1):

where

Advantages of this representation include:

A Simple Example

Consider an 4th order system represented by a single 4th order differential equation with input x and output y.

We can define 4 new variables, q1 through q4.

but

We can now rewrite the 4th order differential equation as 4 first order equations

This is compactly written in state space format as

with

For this problem a state space representation was easy to find.  In many cases (e.g., if there are derivatives on the right side of the differential equation) this problem can be much more difficult.  Such cases are explained in the discussion of transformations between system representations.

The state space representation is not unique

Case 1:

Another important point is that the state space representation is not unique.  As a simple example we could simply reorder the variables from the example above (the new state variables are labeled qnew).  This results in a new state space representation

Case 2

In the previous case careful examination of the original and modified state space system reveals that they represent the same system.  However we can make entirely new state variables by forming linear combination of the original state variables in which this equality is not obvious.  Consider the state variable qnew defined as follows:

In this case the new state space variables are given by (the details of how these matrices are determined are not important for this discussion.  They are given here if you are interested):

This new state space system is quite different from the original one, and it is not at all obvious that they represent the same system.  (It can be shown that the systems are identical by transforming the state space representation to a transfer function.   Techniques for doing so are discussed elsewhere.)

Key Concept: Defining a State Space Representation

A nth order linear physical system can be represented using a state space approach as a single first order matrix differential equation:

The first equation is called the state equation and it has a first order derivative of the state variable(s) on the left, and the state variable(s) and input(s), multiplied by matrices, on the right.  The second equation is called the output equation and it has teh output on the left and the state variable(s) and input(s), multiplied by matrices, on the right.   No other terms are allowed in the equation.  In these equations: 

For a single input, single output system (the case that interests us the most):

The state space representation is not unique; many (actually an infinite number) of state space systems can be used to represent any linear physical system.

Developing a state space model from a system diagram (Mechanical Translating)

Another, powerful, way to develop a state space model is directly from the free body diagrams.  If you choose as your state variables those quantities that determine the energy in the system, a state space system is often easy to derive.  For example, in a mechanical system you would choose extension of springs (potential energy, ½kx2) and the velocity of masses (kinetic energy, ½mv2); for electrical systems choose voltage across capacitors, ½Ce2 (e=voltage)) and current through inductors (½Li2).  This is best illustrated by several examples, two rotating and one electrical.

Example: Direct Derivation of State Space Model (Mechanical Translating)

Derive a state space model for the system shown.  The input is fa and the output is y.

We can write free body equations for the system at x and at y.

Freebody Diagram Equation

There are three energy storage elements, so we expect three state equations.  The energy storage elements are the spring, k2, the mass, m, and the spring, k1.  Therefore we choose as our state variables x (the energy in spring k2 is ½k2x2), the velocity at x (the energy in the mass m is ½mv2, where v is the first derivative of x), and y (the energy in spring k1 is ½k1x2).  Our state variable equations become:

Now we want equations for their derivatives.  The equations of motion from the free body diagrams yield

or

with the input u=fa.

This technique does not always easily yield a set of state equations (read about some examples here).  In some cases it is easier to develop a transfer function model and convert this to a state space model.  Transfer functions are discussed elsewhere.

Developing state space model from system diagram (Mechanical Rotating)

The energy variables for rotating systems are potential energy stored in springs (½Krθ2) and kinetic energy stored in inertial elements (½Jω2).

Example: Direct Derivation of State Space Model (Mechanical Rotating)

Derive a state space model for the system shown.  The input is τa and the output is θ1.

We can write free body equations for the system at θ1 and θ2

Freebody Diagram Equation
 

There are three energy storage elements, so we expect three state equations.  Energy is stored as potential energy in the spring (½Krθ12) and kinetic energy in the two flywheels (½J1α12, ½J2α22).   Our state variable equations become:

Now we want equations for their derivatives.  The equations of motion from the free body diagrams yield

or

with the input u=τa, and the output y=θ1.

Developing State space model from system diagram (Electrical)

To develop a state space system for an electrical system, they choosing the voltage across capacitors,  and current through inductors as state variables.  Recall that

so if we can write equations for the voltage across an inductor, it becomes a state equation when we divide by the inductance (i.e., if we have an equation for einductor and divide by L, it becomes an equation for diinductor/dt which is one of our state variable).  Likewise if we can write an equation for the current through the capacitor and divide by the capacitance it becomes a state equation for ecapacitor.  This is best illustrated by an example.

Example: Direct Derivation of State Space Model (Electrical)

Derive a state space model for the system shown.  The input is ia and the output is e2.

There are three energy storage elements, so we expect three state equations.  Try choosing i1, i2 and e1 as state variables.  Now we want equations for their derivatives.  The voltage across the inductor L2 is e1 (which is one of our state variables)

so our first state variable equation is

If we sum currents into the node labeled n1 we get

This equation has our input (ia) and two state variable (iL2 and iL1) and the current through the capacitor.  So from this we can get our second state equation

Our third, and final, state equation we get by writing an equation for the voltage across L1 (which is e2) in terms of our other state variables

We also need an output equation:

So our state space representation becomes

 

This technique does not always easily yield a set of state equations.  In some cases it is easier to develop a transfer function model and convert this to a state space model.  Transfer functions are discussed elsewhere.

Problems when developing a state space model from a system diagram

There are several cases when it is not so straightforward to develop a state space model from a system diagram.  Some of these are discussed here.

Solution of State Space Problems

The state space representation of a system is a common and extremely powerful method of representing a system mathematically.   This page only discusses how to develop the state space representation, the solution of state space problems are discussed elsewhere.

Transformations to other forms

Since state space is equivalent to the other representations, there must be a way to transform from one representation to another.  These methods are discussed here.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Pole-Zero Representations of Linear Physical Systems

This section requires knowledge of Transfer Functions

A system is often defined in terms of the poles and zeros of its transfer function.  You will see later that the location of the poles and zeros gives a wealth of information about the behavior of a system.  This document is only concerned with the creation of a pole-zero representation, and not its interpretation.

A system can be defined by its transfer function, which is a ratio of polynomials in the Laplace variable "s."  For example consider the transfer function:

Rewrite this in a standard form such that the highest order term of the numerator and denominator are unity (the reason for this is explained below).

This is just a constant term (b0/a0) multiplied by a ratio of polynomials which can be factored.

In this equation the constant k=b0/a0.  The zi terms are the zeros of the transfer function; as s→zi the numerator polynomial goes to zero, so the transfer function also goes to zero.  The pi terms are the poles of the transfer function; as s→pi the denominator polynomial is zero, so the transfer function goes to infinity.

In the general case of a transfer function with an mth order numerator and an nth order denominator, the transfer function can be represented as:

The pole-zero representation consists of the poles (pi), the zeros (zi) and the gain term (k). 

Note: now the step of pulling out the constant term becomes obvious.  With the constant term out of the polynomials they can be written as a product of simple terms of the form (s-zi).  This would not be possible if the highest order term of the polynomials was not equal to one.

Often the gain term is not given as part of the representation.  The nature of the behavior of the system is given by the poles and zeros (e.g., does it oscillate? decay quickly? ...), the gain term only determines the magnitude of the response.  In many cases a plot is made of the s-plane that shows the locations of the poles and zeros, and the gain term (k) is not shown.  See the example below.

Example: Pole-Zero representation of a system

Find the pole-zero representation of the system with the transfer function:

First rewrite in our standard form (note: the polynomials were factored with a computer).

So the pole-zero representation consists of:

Often the response is given in terms of a pole-zero plot.  The plot below shows the poles (marked as "x") and the zeros (marked as "o") of the response.  The gain, k, is not shown.


To demonstrate why these are called poles and zeros, the plot below shows the magnitude of H(s) as s is varied.  Note that it goes to zero at s=-1 and s=-2; these are the zeros of the function.  Also, it goes to infinity at s=-1±1 and s=-3, but is clipped at |H(s)|=5 in the drawing; these are the poles of the function.  It is as if there is a "pole" holding the surface of the function up at those locations.

The locations of the poles and zeros are shown on the s plane for reference.

Key concept: Pole-Zero Representation of a System

A transfer function (i.e., a ratio of polynomials in "s") given by

can be expressed in terms of a gain term (k=b0/a0), the poles (pi) and the zeros (zi)

Often the gain term is not given as part of the representation.  System behavior is determined by the poles and zeros (e.g., does it oscillate? decay quickly? ...), the gain term only determines the magnitude of the response.


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

Graphical Representations of Linear Physical Systems

This page is not complete.

It is possible to represent systems as signal flow graphs or block diagrams.


← Back ←                 → Transformations Between System Representations →


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College

← Back ←                 → Elements of Translating Mechanical Systems →


References

© Copyright 2005-2013 Erik Cheever    This page may be freely used for educational purposes.

Erik Cheever       Department of Engineering         Swarthmore College