This document is a compilation of all of the pages regarding translating mechanical systems that is useful for printing.
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 x_{1}) | Free Body 2 (at x_{2}) | |
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:
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.
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Erik Cheever Department of Engineering Swarthmore CollegeWhen 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.
System | ||
Free Body Diagrams | ||
Coupled Differential Equations |
The system is thus represented by two differential equations:
The equations are said to be coupled because x_{1} appears in both equation (as does x_{2}).
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 e_{1} appears in both equation (as does e_{2}).
Developing a set of coupled differential equations is typically only the first step in solving a problem with linear systems. The next step
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.
As an example consider the two coupled equations from the mechanical system above.
If we wish to solve for x_{1}, we can simply solve the first equation for x_{2}
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 (x_{1}) to the input (F_{e}). 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.
For example consider the case:
where the x_{1} and x_{2} are system variables, y_{in} is an input and the a_{n} 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 a_{2}s+a_{3} 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.
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.
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Erik Cheever Department of Engineering Swarthmore CollegeThis section requires knowledge of the Laplace Transform
Contents
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 a_{n} and b_{n} 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 a_{0 }ttis equal to 1.
For the general case of an n^{th} 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:
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:
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 i^{th} order derivative replaced by multiplication by s^{i}) 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.
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.
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.
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Erik Cheever Department of Engineering Swarthmore CollegeAs 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 n^{th} 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 n^{th} order system (i.e., it can be represented by an n^{th} 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:
Consider an 4^{th} order system represented by a single 4^{th} order differential equation with input x and output y.
We can define 4 new variables, q1 through q4.
but
We can now rewrite the 4^{th} 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.
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 q_{new}). This results in a new state space representation
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 q_{new} 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.)
A n^{th} 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.
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, ½kx^{2}) and the velocity of masses (kinetic energy, ½mv^{2}); for electrical systems choose voltage across capacitors, ½Ce^{2} (e=voltage)) and current through inductors (½Li^{2}). This is best illustrated by several examples, two rotating and one electrical.
Derive a state space model for the system shown. The input is f_{a} 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, k_{2}, the mass, m, and the spring, k_{1}. Therefore we choose as our state variables x (the energy in spring k_{2} is ½k_{2}x^{2}), the velocity at x (the energy in the mass m is ½mv^{2}, where v is the first derivative of x), and y (the energy in spring k_{1} is ½k_{1}x^{2}). 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=f_{a}.
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.
The energy variables for rotating systems are potential energy stored in springs (½K_{r}θ^{2}) and kinetic energy stored in inertial elements (½Jω^{2}).
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 (½K_{r}θ_{1}^{2}) and kinetic energy in the two flywheels (½J_{1}α_{1}^{2}, ½J_{2}α_{2}^{2}). 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}.
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 e_{inductor} and divide by L, it becomes an equation for di_{inductor}/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 e_{capacitor}. This is best illustrated by an example.
Derive a state space model for the system shown. The input is i_{a} and the output is e_{2}.
There are three energy storage elements, so we expect three state equations. Try choosing i_{1}, i_{2} and e_{1} as state variables. Now we want equations for their derivatives. The voltage across the inductor L_{2} is e_{1} (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 L_{1} (which is e_{2}) 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.
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.
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.
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.
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Erik Cheever Department of Engineering Swarthmore CollegeThis 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 (b_{0}/a_{0}) multiplied by a ratio of polynomials which can be factored.
In this equation the constant k=b_{0}/a_{0}. The z_{i} terms are the zeros of the transfer function; as s→z_{i} the numerator polynomial goes to zero, so the transfer function also goes to zero. The p_{i} terms are the poles of the transfer function; as s→p_{i} 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 (p_{i}), the zeros (z_{i}) 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.
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.
A transfer function (i.e., a ratio of polynomials in "s") given by
can be expressed in terms of a gain term (k=b_{0}/a_{0}), the poles (p_{i}) and the zeros (z_{i})
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.
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Erik Cheever Department of Engineering Swarthmore CollegeThis page is not complete.
It is possible to represent systems as signal flow graphs or block diagrams.
← Back ← → Transformations Between System Representations →
© 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 →
© Copyright 2005-2013 Erik Cheever This page may be freely used for educational purposes.
Erik Cheever Department of Engineering Swarthmore College