# Control Systems/Modern Controls/Print version

The Wikibook of automatic

Control Systems

And Control Systems Engineering
With
Classical and Modern Techniques
And

Introduction to Control Systems

What are control systems? Why do we study them? How do we identify them? The chapters in this section should answer these questions and more.

# Introduction

## This Wikibook

This book was written at Wikibooks, a free online community where people write open-content textbooks. Any person with internet access is welcome to participate in the creation and improvement of this book. Because this book is continuously evolving, there are no finite "versions" or "editions" of this book. Permanent links to known good versions of the pages may be provided.

## What are Control Systems?

The study and design of automatic Control Systems, a field known as control engineering, has become important in modern technical society. From devices as simple as a toaster or a toilet, to complex machines like space shuttles and power steering, control engineering is a part of our everyday life. This book introduces the field of control engineering and explores some of the more advanced topics in the field. Note, however, that control engineering is a very large field, and this book serves as a foundation of control engineering and introduction to selected advanced topics in the field. Topics in this book are added at the discretion of the authors, and represent the available expertise of our contributors.

Control systems are components that are added to other components, to increase functionality, or to meet a set of design criteria. For example:

We have a particular electric motor that is supposed to turn at a rate of 40 RPM. To achieve this speed, we must supply 10 Volts to the motor terminals. However, with 10 volts supplied to the motor at rest, it takes 30 seconds for our motor to get up to speed. This is valuable time lost.

This simple example, however can be complex to both users and designers of the motor system. It may seem obvious that the motor should start at a higher voltage, so that it accelerates faster. Then we can reduce the supply back down to 10 volts once it reaches ideal speed.

This is clearly a simplistic example, but it illustrates an important point: we can add special "Controller units" to preexisting systems, to improve performance and meet new system specifications.

Here are some formal definitions of terms used throughout this book:

Control System
A Control System is a device, or a collection of devices that manage the behavior of other devices. Some devices are not controllable. A control system is an interconnection of components connected or related in such a manner as to command, direct, or regulate itself or another system.
Control System is a conceptual framework for designing systems with capabilities of regulation and/or tracking to give a desired performance. For this there must be a set of signals measurable to know the performance, another set of signals measurable to influence the evolution of the system in time and a third set which is not measurable but disturb the evolution.
Controller
A controller is a control system that manages the behavior of another device or system.
Compensator
A Compensator is a control system that regulates another system, usually by conditioning the input or the output to that system. Compensators are typically employed to correct a single design flaw, with the intention of affecting other aspects of the design in a minimal manner.

There are essentially two methods to approach the problem of designing a new control system: the Classical Approach, and the Modern Approach.

## Classical and Modern

Classical and Modern control methodologies are named in a misleading way, because the group of techniques called "Classical" were actually developed later than the techniques labeled "Modern". However, in terms of developing control systems, Modern methods have been used to great effect more recently, while the Classical methods have been gradually falling out of favor. Most recently, it has been shown that Classical and Modern methods can be combined to highlight their respective strengths and weaknesses.

Classical Methods, which this book will consider first, are methods involving the Laplace Transform domain. Physical systems are modeled in the so-called "time domain", where the response of a given system is a function of the various inputs, the previous system values, and time. As time progresses, the state of the system and its response change. However, time-domain models for systems are frequently modeled using high-order differential equations which can become impossibly difficult for humans to solve and some of which can even become impossible for modern computer systems to solve efficiently. To counteract this problem, integral transforms, such as the Laplace Transform and the Fourier Transform, can be employed to change an Ordinary Differential Equation (ODE) in the time domain into a regular algebraic polynomial in the transform domain. Once a given system has been converted into the transform domain it can be manipulated with greater ease and analyzed quickly by humans and computers alike.

Modern Control Methods, instead of changing domains to avoid the complexities of time-domain ODE mathematics, converts the differential equations into a system of lower-order time domain equations called State Equations, which can then be manipulated using techniques from linear algebra. This book will consider Modern Methods second.

A third distinction that is frequently made in the realm of control systems is to divide analog methods (classical and modern, described above) from digital methods. Digital Control Methods were designed to try and incorporate the emerging power of computer systems into previous control methodologies. A special transform, known as the Z-Transform, was developed that can adequately describe digital systems, but at the same time can be converted (with some effort) into the Laplace domain. Once in the Laplace domain, the digital system can be manipulated and analyzed in a very similar manner to Classical analog systems. For this reason, this book will not make a hard and fast distinction between Analog and Digital systems, and instead will attempt to study both paradigms in parallel.

## Who is This Book For?

This book is intended to accompany a course of study in under-graduate and graduate engineering. As has been mentioned previously, this book is not focused on any particular discipline within engineering, however any person who wants to make use of this material should have some basic background in the Laplace transform (if not other transforms), calculus, etc. The material in this book may be used to accompany several semesters of study, depending on the program of your particular college or university. The study of control systems is generally a topic that is reserved for students in their 3rd or 4th year of a 4 year undergraduate program, because it requires so much previous information. Some of the more advanced topics may not be covered until later in a graduate program.

Many colleges and universities only offer one or two classes specifically about control systems at the undergraduate level. Some universities, however, do offer more than that, depending on how the material is broken up, and how much depth that is to be covered. Also, many institutions will offer a handful of graduate-level courses on the subject. This book will attempt to cover the topic of control systems from both a graduate and undergraduate level, with the advanced topics built on the basic topics in a way that is intuitive. As such, students should be able to begin reading this book in any place that seems an appropriate starting point, and should be able to finish reading where further information is no longer needed.

## What are the Prerequisites?

Understanding of the material in this book will require a solid mathematical foundation. This book does not currently explain, nor will it ever try to fully explain most of the necessary mathematical tools used in this text. For that reason, the reader is expected to have read the following wikibooks, or have background knowledge comparable to them:

Algebra
Calculus
The reader should have a good understanding of differentiation and integration. Partial differentiation, multiple integration, and functions of multiple variables will be used occasionally, but the students are not necessarily required to know those subjects well. These advanced calculus topics could better be treated as a co-requisite instead of a pre-requisite.
Linear Algebra
State-space system representation draws heavily on linear algebra techniques. Students should know how to operate on matrices. Students should understand basic matrix operations (addition, multiplication, determinant, inverse, transpose). Students would also benefit from a prior understanding of Eigenvalues and Eigenvectors, but those subjects are covered in this text.
Ordinary Differential Equations
All linear systems can be described by a linear ordinary differential equation. It is beneficial, therefore, for students to understand these equations. Much of this book describes methods to analyze these equations. Students should know what a differential equation is, and they should also know how to find the general solutions of first and second order ODEs.
Engineering Analysis
This book reinforces many of the advanced mathematical concepts used in the Engineering Analysis book, and we will refer to the relevant sections in the aforementioned text for further information on some subjects. This is essentially a math book, but with a focus on various engineering applications. It relies on a previous knowledge of the other math books in this list.
Signals and Systems
The Signals and Systems book will provide a basis in the field of systems theory, of which control systems is a subset. Readers who have not read the Signals and Systems book will be at a severe disadvantage when reading this book.

## How is this Book Organized?

This book will be organized following a particular progression. First this book will discuss the basics of system theory, and it will offer a brief refresher on integral transforms. Section 2 will contain a brief primer on digital information, for students who are not necessarily familiar with them. This is done so that digital and analog signals can be considered in parallel throughout the rest of the book. Next, this book will introduce the state-space method of system description and control. After section 3, topics in the book will use state-space and transform methods interchangeably (and occasionally simultaneously). It is important, therefore, that these three chapters be well read and understood before venturing into the later parts of the book.

After the "basic" sections of the book, we will delve into specific methods of analyzing and designing control systems. First we will discuss Laplace-domain stability analysis techniques (Routh-Hurwitz, root-locus), and then frequency methods (Nyquist Criteria, Bode Plots). After the classical methods are discussed, this book will then discuss Modern methods of stability analysis. Finally, a number of advanced topics will be touched upon, depending on the knowledge level of the various contributors.

As the subject matter of this book expands, so too will the prerequisites. For instance, when this book is expanded to cover nonlinear systems, a basic background knowledge of nonlinear mathematics will be required.

### Versions

This wikibook has been expanded to include multiple versions of its text, differentiated by the material covered, and the order in which the material is presented. Each different version is composed of the chapters of this book, included in a different order. This book covers a wide range of information, so if you don't need all the information that this book has to offer, perhaps one of the other versions would be right for you and your educational needs.

Each separate version has a table of contents outlining the different chapters that are included in that version. Also, each separate version comes complete with a printable version, and some even come with PDF versions as well.

Take a look at the All Versions Listing Page to find the version of the book that is right for you and your needs.

## Differential Equations Review

Implicit in the study of control systems is the underlying use of differential equations. Even if they aren't visible on the surface, all of the continuous-time systems that we will be looking at are described in the time domain by ordinary differential equations (ODE), some of which are relatively high-order.

Let's review some differential equation basics. Consider the topic of interest from a bank. The amount of interest accrued on a given principal balance (the amount of money you put into the bank) P, is given by:

${\displaystyle {\frac {dP}{dt}}=rP}$

Where ${\displaystyle {\frac {dP}{dt}}}$ is the interest (rate of change of the principal), and r is the interest rate. Notice in this case that P is a function of time (t), and can be rewritten to reflect that:

${\displaystyle {\frac {dP(t)}{dt}}=rP(t)}$

To solve this basic, first-order equation, we can use a technique called "separation of variables", where we move all instances of the letter P to one side, and all instances of t to the other:

${\displaystyle {\frac {dP(t)}{P(t)}}=r\ dt}$

And integrating both sides gives us:

${\displaystyle \ln |P(t)|=rt+C}$

This is all fine and good, but generally, we like to get rid of the logarithm, by raising both sides to a power of e:

${\displaystyle P(t)=e^{rt+C}}$

Where we can separate out the constant as such:

${\displaystyle D=e^{C}}$
${\displaystyle P(t)=De^{rt}}$

D is a constant that represents the initial conditions of the system, in this case the starting principal.

Differential equations are particularly difficult to manipulate, especially once we get to higher-orders of equations. Luckily, several methods of abstraction have been created that allow us to work with ODEs, but at the same time, not have to worry about the complexities of them. The classical method, as described above, uses the Laplace, Fourier, and Z Transforms to convert ODEs in the time domain into polynomials in a complex domain. These complex polynomials are significantly easier to solve than the ODE counterparts. The Modern method instead breaks differential equations into systems of low-order equations, and expresses this system in terms of matrices. It is a common precept in ODE theory that an ODE of order N can be broken down into N equations of order 1.

Readers who are unfamiliar with differential equations might be able to read and understand the material in this book reasonably well. However, all readers are encouraged to read the related sections in Calculus.

## History

The field of control systems started essentially in the ancient world. Early civilizations, notably the Greeks and the Arabs were heavily preoccupied with the accurate measurement of time, the result of which were several "water clocks" that were designed and implemented.

However, there was very little in the way of actual progress made in the field of engineering until the beginning of the renaissance in Europe. Leonhard Euler (for whom Euler's Formula is named) discovered a powerful integral transform, but Pierre-Simon Laplace used the transform (later called the Laplace Transform) to solve complex problems in probability theory.

Joseph Fourier was a court mathematician in France under Napoleon I. He created a special function decomposition called the Fourier Series, that was later generalized into an integral transform, and named in his honor (the Fourier Transform).

 Pierre-Simon Laplace 1749-1827 Joseph Fourier 1768-1840

The "golden age" of control engineering occurred between 1910-1945, where mass communication methods were being created and two world wars were being fought. During this period, some of the most famous names in controls engineering were doing their work: Nyquist and Bode.

Hendrik Wade Bode and Harry Nyquist, especially in the 1930's while working with Bell Laboratories, created the bulk of what we now call "Classical Control Methods". These methods were based off the results of the Laplace and Fourier Transforms, which had been previously known, but were made popular by Oliver Heaviside around the turn of the century. Previous to Heaviside, the transforms were not widely used, nor respected mathematical tools.

Bode is credited with the "discovery" of the closed-loop feedback system, and the logarithmic plotting technique that still bears his name (bode plots). Harry Nyquist did extensive research in the field of system stability and information theory. He created a powerful stability criteria that has been named for him (The Nyquist Criteria).

Modern control methods were introduced in the early 1950's, as a way to bypass some of the shortcomings of the classical methods. Rudolf Kalman is famous for his work in modern control theory, and an adaptive controller called the Kalman Filter was named in his honor. Modern control methods became increasingly popular after 1957 with the invention of the computer, and the start of the space program. Computers created the need for digital control methodologies, and the space program required the creation of some "advanced" control techniques, such as "optimal control", "robust control", and "nonlinear control". These last subjects, and several more, are still active areas of study among research engineers.

## Branches of Control Engineering

Here we are going to give a brief listing of the various different methodologies within the sphere of control engineering. Oftentimes, the lines between these methodologies are blurred, or even erased completely.

Classical Controls
Control methodologies where the ODEs that describe a system are transformed using the Laplace, Fourier, or Z Transforms, and manipulated in the transform domain.
Modern Controls
Methods where high-order differential equations are broken into a system of first-order equations. The input, output, and internal states of the system are described by vectors called "state variables".
Robust Control
Control methodologies where arbitrary outside noise/disturbances are accounted for, as well as internal inaccuracies caused by the heat of the system itself, and the environment.
Optimal Control
In a system, performance metrics are identified, and arranged into a "cost function". The cost function is minimized to create an operational system with the lowest cost.
In adaptive control, the control changes its response characteristics over time to better control the system.
Nonlinear Control
The youngest branch of control engineering, nonlinear control encompasses systems that cannot be described by linear equations or ODEs, and for which there is often very little supporting theory available.
Game Theory
Game Theory is a close relative of control theory, and especially robust control and optimal control theories. In game theory, the external disturbances are not considered to be random noise processes, but instead are considered to be "opponents". Each player has a cost function that they attempt to minimize, and that their opponents attempt to maximize.

This book will definitely cover the first two branches, and will hopefully be expanded to cover some of the later branches, if time allows.

## MATLAB

Information about using MATLAB for control systems can be found in
the Appendix

MATLAB ® is a programming tool that is commonly used in the field of control engineering. We will discuss MATLAB in specific sections of this book devoted to that purpose. MATLAB will not appear in discussions outside these specific sections, although MATLAB may be used in some example problems. An overview of the use of MATLAB in control engineering can be found in the appendix at: Control Systems/MATLAB.

Resources

Nearly all textbooks on the subject of control systems, linear systems, and system analysis will use MATLAB as an integral part of the text. Students who are learning this subject at an accredited university will certainly have seen this material in their textbooks, and are likely to have had MATLAB work as part of their classes. It is from this perspective that the MATLAB appendix is written.

In the future, this book may be expanded to include information on Simulink ®, as well as MATLAB.

There are a number of other software tools that are useful in the analysis and design of control systems. Additional information can be added in the appendix of this book, depending on the experience and prior knowledge of contributors.

This book will use some simple conventions throughout.

### Mathematical Conventions

Mathematical equations will be labeled with the {{eqn}} template, to give them names. Equations that are labeled in such a manner are important, and should be taken special note of. For instance, notice the label to the right of this equation:

[Inverse Laplace Transform]

${\displaystyle f(t)={\mathcal {L}}^{-1}\left\{F(s)\right\}={1 \over {2\pi i}}\int _{c-i\infty }^{c+i\infty }e^{st}F(s)\,ds}$

Equations that are named in this manner will also be copied into the List of Equations Glossary in the end of the book, for an easy reference.

Italics will be used for English variables, functions, and equations that appear in the main text. For example e, j, f(t) and X(s) are all italicized. Wikibooks contains a LaTeX mathematics formatting engine, although an attempt will be made not to employ formatted mathematical equations inline with other text because of the difference in size and font. Greek letters, and other non-English characters will not be italicized in the text unless they appear in the midst of multiple variables which are italicized (as a convenience to the editor).

Scalar time-domain functions and variables will be denoted with lower-case letters, along with a t in parenthesis, such as: x(t), y(t), and h(t). Discrete-time functions will be written in a similar manner, except with an [n] instead of a (t).

Fourier, Laplace, Z, and Star transformed functions will be denoted with capital letters followed by the appropriate variable in parenthesis. For example: F(s), X(jω), Y(z), and F*(s).

Matrices will be denoted with capital letters. Matrices which are functions of time will be denoted with a capital letter followed by a t in parenthesis. For example: A(t) is a matrix, a(t) is a scalar function of time.

Transforms of time-variant matrices will be displayed in uppercase bold letters, such as H(s).

Math equations rendered using LaTeX will appear on separate lines, and will be indented from the rest of the text.

### Text Conventions

Information which is tangent or auxiliary to the main text will be placed in these "sidebox" templates.

Examples will appear in TextBox templates, which show up as large grey boxes filled with text and equations.

Important Definitions
Will appear in TextBox templates as well, except we will use this formatting to show that it is a definition.

# System Identification

## Systems

Systems, in one sense, are devices that take input and produce an output. A system can be thought to operate on the input to produce the output. The output is related to the input by a certain relationship known as the system response. The system response usually can be modeled with a mathematical relationship between the system input and the system output.

## System Properties

Physical systems can be divided up into a number of different categories, depending on particular properties that the system exhibits. Some of these system classifications are very easy to work with and have a large theory base for analysis. Some system classifications are very complex and have still not been investigated with any degree of success. By properly identifying the properties of a system, certain analysis and design tools can be selected for use with the system.

The early sections of this book will focus primarily on linear time-invariant (LTI) systems. LTI systems are the easiest class of system to work with, and have a number of properties that make them ideal to study. This chapter discusses some properties of systems.

Later chapters in this book will look at time variant systems and nonlinear systems. Both time variant and nonlinear systems are very complex areas of current research, and both can be difficult to analyze properly. Unfortunately, most physical real-world systems are time-variant, nonlinear, or both.

An introduction to system identification and least squares techniques can be found here. An introduction to parameter identification techniques can be found here.

## Initial Time

The initial time of a system is the time before which there is no input. Typically, the initial time of a system is defined to be zero, which will simplify the analysis significantly. Some techniques, such as the Laplace Transform require that the initial time of the system be zero. The initial time of a system is typically denoted by t0.

The value of any variable at the initial time t0 will be denoted with a 0 subscript. For instance, the value of variable x at time t0 is given by:

${\displaystyle x(t_{0})=x_{0}}$

Likewise, any time t with a positive subscript are points in time after t0, in ascending order:

${\displaystyle t_{0}\leq t_{1}\leq t_{2}\leq \cdots \leq t_{n}}$

So t1 occurs after t0, and t2 occurs after both points. In a similar fashion above, a variable with a positive subscript (unless specifying an index into a vector) also occurs at that point in time:

${\displaystyle x(t_{1})=x_{1}}$
${\displaystyle x(t_{2})=x_{2}}$

This is valid for all points in time t.

A system satisfies the property of additivity if a sum of inputs results in a sum of outputs. By definition: an input of ${\displaystyle x_{3}(t)=x_{1}(t)+x_{2}(t)}$ results in an output of ${\displaystyle y_{3}(t)=y_{1}(t)+y_{2}(t)}$. To determine whether a system is additive, use the following test:

Given a system f that takes an input x and outputs a value y, assume two inputs (x1 and x2) produce two outputs:

${\displaystyle y_{1}=f(x_{1})}$
${\displaystyle y_{2}=f(x_{2})}$

Now, create a composite input that is the sum of the previous inputs:

${\displaystyle x_{3}=x_{1}+x_{2}}$

Then the system is additive if the following equation is true:

${\displaystyle y_{3}=f(x_{3})=f(x_{1}+x_{2})=f(x_{1})+f(x_{2})=y_{1}+y_{2}}$

Systems that satisfy this property are called additive. Additive systems are useful because a sum of simple inputs can be used to analyze the system response to a more complex input.

### Example: Sinusoids

Given the following equation:

${\displaystyle y(t)=\sin(3x(t))}$

Create a sum of inputs as:

${\displaystyle x(t)=x_{1}(t)+x_{2}(t)}$

and construct the expected sum of outputs:

${\displaystyle y(t)=y_{1}(t)+y_{2}(t)}$

Now, substituting these values into our equation, test for equality:

${\displaystyle y_{1}(t)+y_{2}(t)=\sin(3[x_{1}(t)+x_{2}(t)])}$

The equality is not satisfied, and therefore the sine operation is not additive.

## Homogeneity

A system satisfies the condition of homogeneity if an input scaled by a certain factor produces an output scaled by that same factor. By definition: an input of ${\displaystyle ax_{1}}$ results in an output of ${\displaystyle ay_{1}}$. In other words, to see if function f() is homogeneous, perform the following test:

Stimulate the system f with an arbitrary input x to produce an output y:

${\displaystyle y=f(x)}$

Now, create a second input x1, scale it by a multiplicative factor C (C is an arbitrary constant value), and produce a corresponding output y1:

${\displaystyle y_{1}=f(Cx_{1})}$

Now, assign x to be equal to x1:

${\displaystyle x_{1}=x}$

Then, for the system to be homogeneous, the following equation must be true:

${\displaystyle y_{1}=f(Cx)=Cf(x)=Cy}$

Systems that are homogeneous are useful in many applications, especially applications with gain or amplification.

### Example: Straight-Line

Given the equation for a straight line:

${\displaystyle y=f(x)=2x+3}$
${\displaystyle y_{1}=f(Cx_{1})=2(Cx_{1})+3=C2x_{1}+3}$
${\displaystyle x_{1}=x}$

Comparing the two results, it is easy to see they are not equal:

${\displaystyle y_{1}=C2x+3\neq Cy=C(2x+3)=C2x+C3}$

Therefore, the equation is not homogeneous.

Exercise:

Prove that additivity implies homogeneity, but that homogeneity does not imply additivity.

## Linearity

A system is considered linear if it satisfies the conditions of Additivity and Homogeneity. In short, a system is linear if the following is true:

Take two arbitrary inputs, and produce two arbitrary outputs:

${\displaystyle y_{1}=f(x_{1})}$
${\displaystyle y_{2}=f(x_{2})}$

Now, a linear combination of the inputs should produce a linear combination of the outputs:

${\displaystyle f(Ax_{1}+Bx_{2})=f(Ax_{1})+f(Bx_{2})=Af(x_{1})+Bf(x_{2})=Ay_{1}+By_{2}}$

This condition of additivity and homogeneity is called superposition. A system is linear if it satisfies the condition of superposition.

### Example: Linear Differential Equations

Is the following equation linear:

${\displaystyle {\frac {dy(t)}{dt}}+y(t)=x(t)}$

To determine whether this system is linear, construct a new composite input:

${\displaystyle x(t)=Ax_{1}(t)+Bx_{2}(t)}$

Now, create the expected composite output:

${\displaystyle y(t)=Ay_{1}(t)+By_{2}(t)}$

Substituting the two into our original equation:

${\displaystyle {\frac {d[Ay_{1}(t)+By_{2}(t)]}{dt}}+[Ay_{1}(t)+By_{2}(t)]=Ax_{1}(t)+Bx_{2}(t)}$

Factor out the derivative operator, as such:

${\displaystyle {\frac {d}{dt}}[Ay_{1}(t)+By_{2}(t)]+[Ay_{1}(t)+By_{2}(t)]=Ax_{1}(t)+Bx_{2}(t)}$

Finally, convert the various composite terms into the respective variables, to prove that this system is linear:

${\displaystyle {\frac {dy(t)}{dt}}+y(t)=x(t)}$

For the record, derivatives and integrals are linear operators, and ordinary differential equations typically are linear equations.

## Memory

A system is said to have memory if the output from the system is dependent on past inputs (or future inputs!) to the system. A system is called memoryless if the output is only dependent on the current input. Memoryless systems are easier to work with, but systems with memory are more common in digital signal processing applications.

Systems that have memory are called dynamic systems, and systems that do not have memory are static systems.

## Causality

Causality is a property that is very similar to memory. A system is called causal if it is only dependent on past and/or current inputs. A system is called anti-causal if the output of the system is dependent only on future inputs. A system is called non-causal if the output depends on past and/or current and future inputs.

## Time-Invariance

A system is called time-invariant if the system relationship between the input and output signals is not dependent on the passage of time. If the input signal ${\displaystyle x(t)}$ produces an output ${\displaystyle y(t)}$ then any time shifted input, ${\displaystyle x(t+\delta )}$, results in a time-shifted output ${\displaystyle y(t+\delta )}$ This property can be satisfied if the transfer function of the system is not a function of time except expressed by the input and output. If a system is time-invariant then the system block is commutative with an arbitrary delay. This facet of time-invariant systems will be discussed later.

To determine if a system f is time-invariant, perform the following test:

Apply an arbitrary input x to a system and produce an arbitrary output y:

${\displaystyle y(t)=f(x(t))}$

Apply a second input x1 to the system, and produce a second output:

${\displaystyle y_{1}(t)=f(x_{1}(t))}$

Now, assign x1 to be equal to the first input x, time-shifted by a given constant value δ:

${\displaystyle x_{1}(t)=x(t-\delta )}$

Finally, a system is time-invariant if y1 is equal to y shifted by the same value δ:

${\displaystyle y_{1}(t)=y(t-\delta )}$

## LTI Systems

A system is considered to be a Linear Time-Invariant (LTI) system if it satisfies the requirements of time-invariance and linearity. LTI systems are one of the most important types of systems, and they will be considered almost exclusively in the beginning chapters of this book.

Systems which are not LTI are more common in practice, but are much more difficult to analyze.

## Lumpedness

A system is said to be lumped if one of the two following conditions are satisfied:

1. There are a finite number of states that the system can be in.
2. There are a finite number of state variables.

The concept of "states" and "state variables" are relatively advanced, and they will be discussed in more detail in the discussion about modern controls.

Systems which are not lumped are called distributed. A simple example of a distributed system is a system with delay, that is, ${\displaystyle A(s)y(t)=B(s)u(t-\tau )}$, which has an infinite number of state variables (Here we use ${\displaystyle s}$ to denote the Laplace variable). However, although distributed systems are quite common, they are very difficult to analyze in practice, and there are few tools available to work with such systems. Fortunately, in most cases, a delay can be sufficiently modeled with the Pade approximation. This book will not discuss distributed systems much.

## Relaxed

A system is said to be relaxed if the system is causal, and at the initial time t0 the output of the system is zero, i.e., there is no stored energy in the system.

${\displaystyle y(t_{0})=f(x(t_{0}))=0}$

In terms of differential equations, a relaxed system is said to have "zero initial state". Systems without an initial state are easier to work with, but systems that are not relaxed can frequently be modified to approximate relaxed systems.

## Stability

Control Systems engineers will frequently say that an unstable system has "exploded". Some physical systems actually can rupture or explode when they go unstable.

Stability is a very important concept in systems, but it is also one of the hardest function properties to prove. There are several different criteria for system stability, but the most common requirement is that the system must produce a finite output when subjected to a finite input. For instance, if 5 volts is applied to the input terminals of a given circuit, it would be best if the circuit output didn't approach infinity, and the circuit itself didn't melt or explode. This type of stability is often known as "Bounded Input, Bounded Output" stability, or BIBO.

There are a number of other types of stability, most of which are based off the concept of BIBO stability. Because stability is such an important and complicated topic, an entire section of this text is devoted to its study.

## Inputs and Outputs

Systems can also be categorized by the number of inputs and the number of outputs the system has. Consider a television as a system, for instance. The system has two inputs: the power wire and the signal cable. It has one output: the video display. A system with one input and one output is called single-input, single output, or SISO. a system with multiple inputs and multiple outputs is called multi-input, multi-output, or MIMO.

These systems will be discussed in more detail later.

Exercise:

Based on the definitions of SISO and MIMO, above, determine what the acronyms SIMO and MISO mean.

# Digital and Analog

## Digital and Analog

There is a significant distinction between an analog system and a digital system, in the same way that there is a significant difference between analog and digital data. This book is going to consider both analog and digital topics, so it is worth taking some time to discuss the differences, and to display the different notations that will be used with each.

### Continuous Time

This operation can be performed using this MATLAB command:
isct

A signal is called continuous-time if it is defined at every time t.

A system is a continuous-time system if it takes a continuous-time input signal, and outputs a continuous-time output signal. Here is an example of an analog waveform:

### Discrete Time

This operation can be performed using this MATLAB command:
isdt

A signal is called discrete-time if it is only defined for particular points in time. A discrete-time system takes discrete-time input signals, and produces discrete-time output signals. The following image shows the difference between an analog waveform and the sampled discrete time equivalent:

### Quantized

A signal is called Quantized if it can only be certain values, and cannot be other values. This concept is best illustrated with examples:

1. Students with a strong background in physics will recognize this concept as being the root word in "Quantum Mechanics". In quantum mechanics, it is known that energy comes only in discrete packets. An electron bound to an atom, for example, may occupy one of several discrete energy levels, but not intermediate levels.
2. Another common example is population statistics. For instance, a common statistic is that a household in a particular country may have an average of "3.5 children", or some other fractional number. Actual households may have 3 children, or they may have 4 children, but no household has 3.5 children.
3. People with a computer science background will recognize that integer variables are quantized because they can only hold certain integer values, not fractions or decimal points.

The last example concerning computers is the most relevant, because quantized systems are frequently computer-based. Systems that are implemented with computer software and hardware will typically be quantized.

Here is an example waveform of a quantized signal. Notice how the magnitude of the wave can only take certain values, and that creates a step-like appearance. This image is discrete in magnitude, but is continuous in time:

## Analog

By definition:

Analog
A signal is considered analog if it is defined for all points in time and if it can take any real magnitude value within its range.

An analog system is a system that represents data using a direct conversion from one form to another. In other words, an analog system is a system that is continuous in both time and magnitude.

### Example: Motor

If we have a given motor, we can show that the output of the motor (rotation in units of radians per second, for instance) is a function of the voltage that is input to the motor. We can show the relationship as such:

${\displaystyle \Theta (v)=f(v)}$

Where ${\displaystyle \Theta }$ is the output in terms of Rad/sec, and f(v) is the motor's conversion function between the input voltage (v) and the output. For any value of v we can calculate out specifically what the rotational speed of the motor should be.

### Example: Analog Clock

Consider a standard analog clock, which represents the passage of time though the angular position of the clock hands. We can denote the angular position of the hands of the clock with the system of equations:

${\displaystyle \phi _{h}=f_{h}(t)}$
${\displaystyle \phi _{m}=f_{m}(t)}$
${\displaystyle \phi _{s}=f_{s}(t)}$

Where φh is the angular position of the hour hand, φm is the angular position of the minute hand, and φs is the angular position of the second hand. The positions of all the different hands of the clock are dependent on functions of time.

Different positions on a clock face correspond directly to different times of the day.

## Digital

Digital data is represented by discrete number values. By definition:

Digital
A signal or system is considered digital if it is both discrete-time and quantized.

Digital data always have a certain granularity, and therefore there will almost always be an error associated with using such data, especially if we want to account for all real numbers. The tradeoff, of course, to using a digital system is that our powerful computers with our powerful, Moore's law microprocessor units, can be instructed to operate on digital data only. This benefit more than makes up for the shortcomings of a digital representation system.

Discrete systems will be denoted inside square brackets, as is a common notation in texts that deal with discrete values. For instance, we can denote a discrete data set of ascending numbers, starting at 1, with the following notation:

x[n] = [1 2 3 4 5 6 ...]

n, or other letters from the central area of the alphabet (m, i, j, k, l, for instance) are commonly used to denote discrete time values. Analog, or "non-discrete" values are denoted in regular expression syntax, using parenthesis. Here is an example of an analog waveform and the digital equivalent. Notice that the digital waveform is discrete in both time and magnitude:

 Analog Waveform Digital Waveform

### Example: Digital Clock

As a common example, let's consider a digital clock: The digital clock represents time with binary electrical data signals of 1 and 0. The 1's are usually represented by a positive voltage, and a 0 is generally represented by zero voltage. Counting in binary, we can show that any given time can be represented by a base-2 numbering system:

Minute Binary Representation
1 1
10 1010
30 11110
59 111011

But what happens if we want to display a fraction of a minute, or a fraction of a second? A typical digital clock has a certain amount of precision, and it cannot express fractional values smaller than that precision.

## Hybrid Systems

Hybrid Systems are systems that have both analog and digital components. Devices called samplers are used to convert analog signals into digital signals, and Devices called reconstructors are used to convert digital signals into analog signals. Because of the use of samplers, hybrid systems are frequently called sampled-data systems.

### Example: Automobile Computer

Most modern automobiles today have integrated computer systems that monitor certain aspects of the car, and actually help to control the performance of the car. The speed of the car, and the rotational speed of the transmission are analog values, but a sampler converts them into digital values so the car computer can monitor them. The digital computer will then output control signals to other parts of the car, to alter analog systems such as the engine timing, the suspension, the brakes, and other parts. Because the car has both digital and analog components, it is a hybrid system.

## Continuous and Discrete

Note:
We are not using the word "continuous" here in the sense of continuously differentiable, as is common in math texts.

A system is considered continuous-time if the signal exists for all time. Frequently, the terms "analog" and "continuous" will be used interchangeably, although they are not strictly the same.

Discrete systems can come in three flavors:

1. Discrete time (sampled)
2. Discrete magnitude (quantized)
3. Discrete time and magnitude (digital)

Discrete magnitude systems are systems where the signal value can only have certain values.Discrete time systems are systems where signals are only available (or valid) at particular times. Computer systems are discrete in the sense of (3), in that data is only read at specific discrete time intervals, and the data can have only a limited number of discrete values.

A discrete-time system has a sampling time value associated with it, such that each discrete value occurs at multiples of the given sampling time. We will denote the sampling time of a system as T. We can equate the square-brackets notation of a system with the continuous definition of the system as follows:

${\displaystyle x[n]=x(nT)}$

Notice that the two notations show the same thing, but the first one is typically easier to write, and it shows that the system in question is a discrete system. This book will use the square brackets to denote discrete systems by the sample number n, and parenthesis to denote continuous time functions.

## Sampling and Reconstruction

The process of converting analog information into digital data is called "Sampling". The process of converting digital data into an analog signal is called "Reconstruction". We will talk about both processes in a later chapter. For more information on the topic than is available in this book, see the Analog and Digital Conversion wikibook. Here is an example of a reconstructed waveform. Notice that the reconstructed waveform here is quantized because it is constructed from a digital signal:

# System Metrics

## System Metrics

When a system is being designed and analyzed, it doesn't make any sense to test the system with all manner of strange input functions, or to measure all sorts of arbitrary performance metrics. Instead, it is in everybody's best interest to test the system with a set of standard, simple reference functions. Once the system is tested with the reference functions, there are a number of different metrics that we can use to determine the system performance.

It is worth noting that the metrics presented in this chapter represent only a small number of possible metrics that can be used to evaluate a given system. This wikibook will present other useful metrics along the way, as their need becomes apparent.

## Standard Inputs

Note:
All of the standard inputs are zero before time zero. All the standard inputs are causal.

There are a number of standard inputs that are considered simple enough and universal enough that they are considered when designing a system. These inputs are known as a unit step, a ramp, and a parabolic input.

Unit Step
A unit step function is defined piecewise as such:

[Unit Step Function]

${\displaystyle u(t)=\left\{{\begin{matrix}0,&t<0\\1,&t\geq 0\end{matrix}}\right.}$
The unit step function is a highly important function, not only in control systems engineering, but also in signal processing, systems analysis, and all branches of engineering. If the unit step function is input to a system, the output of the system is known as the step response. The step response of a system is an important tool, and we will study step responses in detail in later chapters.
Ramp
A unit ramp is defined in terms of the unit step function, as such:

[Unit Ramp Function]

${\displaystyle r(t)=tu(t)}$
It is important to note that the unit step function is simply the differential of the unit ramp function:
${\displaystyle r(t)=\int u(t)dt=tu(t)}$
This definition will come in handy when we learn about the Laplace Transform.
Parabolic
A unit parabolic input is similar to a ramp input:

[Unit Parabolic Function]

${\displaystyle p(t)={\frac {1}{2}}t^{2}u(t)}$
Notice also that the unit parabolic input is equal to the integral of the ramp function:
${\displaystyle p(t)=\int r(t)dt=\int tu(t)dt={\frac {1}{2}}t^{2}u(t)={\frac {1}{2}}tr(t)}$
Again, this result will become important when we learn about the Laplace Transform.

Also, sinusoidal and exponential functions are considered basic, but they are too difficult to use in initial analysis of a system.

Note:
To be more precise, we should have taken the limit as t approaches infinity. However, as a shorthand notation, we will typically say "t equals infinity", and assume the reader understands the shortcut that is being used.

When a unit-step function is input to a system, the steady-state value of that system is the output value at time ${\displaystyle t=\infty }$. Since it is impractical (if not completely impossible) to wait till infinity to observe the system, approximations and mathematical calculations are used to determine the steady-state value of the system. Most system responses are asymptotic, that is that the response approaches a particular value. Systems that are asymptotic are typically obvious from viewing the graph of that response.

### Step Response

The step response of a system is most frequently used to analyze systems, and there is a large amount of terminology involved with step responses. When exposed to the step input, the system will initially have an undesirable output period known as the transient response. The transient response occurs because a system is approaching its final output value. The steady-state response of the system is the response after the transient response has ended.

The amount of time it takes for the system output to reach the desired value (before the transient response has ended, typically) is known as the rise time. The amount of time it takes for the transient response to end and the steady-state response to begin is known as the settling time.

It is common for a systems engineer to try and improve the step response of a system. In general, it is desired for the transient response to be reduced, the rise and settling times to be shorter, and the steady-state to approach a particular desired "reference" output.

## Target Value

The target output value is the value that our system attempts to obtain for a given input. This is not the same as the steady-state value, which is the actual value that the target does obtain. The target value is frequently referred to as the reference value, or the "reference function" of the system. In essence, this is the value that we want the system to produce. When we input a "5" into an elevator, we want the output (the final position of the elevator) to be the fifth floor. Pressing the "5" button is the reference input, and is the expected value that we want to obtain. If we press the "5" button, and the elevator goes to the third floor, then our elevator is poorly designed.

## Rise Time

Rise time is the amount of time that it takes for the system response to reach the target value from an initial state of zero. Many texts on the subject define the rise time as being the time it takes to rise between the initial position and 80% of the target value. This is because some systems never rise to 100% of the expected, target value, and therefore they would have an infinite rise-time. This book will specify which convention to use for each individual problem. Rise time is typically denoted tr, or trise.

## Percent Overshoot

Underdamped systems frequently overshoot their target value initially. This initial surge is known as the "overshoot value". The ratio of the amount of overshoot to the target steady-state value of the system is known as the percent overshoot. Percent overshoot represents an overcompensation of the system, and can output dangerously large output signals that can damage a system. Percent overshoot is typically denoted with the term PO.

Example: Refrigerator

Consider an ordinary household refrigerator. The refrigerator has cycles where it is on and when it is off. When the refrigerator is on, the coolant pump is running, and the temperature inside the refrigerator decreases. The temperature decreases to a much lower level than is required, and then the pump turns off.

When the pump is off, the temperature slowly increases again as heat is absorbed into the refrigerator. When the temperature gets high enough, the pump turns back on. Because the pump cools down the refrigerator more than it needs to initially, we can say that it "overshoots" the target value by a certain specified amount.

Example: Refrigerator

Another example concerning a refrigerator concerns the electrical demand of the heat pump when it first turns on. The pump is an inductive mechanical motor, and when the motor first activates, a special counter-acting force known as "back EMF" resists the motion of the motor, and causes the pump to draw more electricity until the motor reaches its final speed. During the startup time for the pump, lights on the same electrical circuit as the refrigerator may dim slightly, as electricity is drawn away from the lamps, and into the pump. This initial draw of electricity is a good example of overshoot.

Usually, the letter e or E will be used to denote error values.

Sometimes a system might never achieve the desired steady-state value, but instead will settle on an output value that is not desired. The difference between the steady-state output value to the reference input value at steady state is called the steady-state error of the system. We will use the variable ess to denote the steady-state error of the system.

## Settling Time

After the initial rise time of the system, some systems will oscillate and vibrate for an amount of time before the system output settles on the final value. The amount of time it takes to reach steady state after the initial rise time is known as the settling time. Notice that damped oscillating systems may never settle completely, so we will define settling time as being the amount of time for the system to reach, and stay in, a certain acceptable range. The acceptable range for settling time is typically determined on a per-problem basis, although common values are 20%, 10%, or 5% of the target value. The settling time will be denoted as ts.

## System Order

The order of the system is defined by the number of independent energy storage elements in the system, and intuitively by the highest order of the linear differential equation that describes the system. In a transfer function representation, the order is the highest exponent in the transfer function. In a proper system, the system order is defined as the degree of the denominator polynomial. In a state-space equation, the system order is the number of state-variables used in the system. The order of a system will frequently be denoted with an n or N, although these variables are also used for other purposes. This book will make clear distinction on the use of these variables.

### Proper Systems

A proper system is a system where the degree of the denominator is larger than or equal to the degree of the numerator polynomial. A strictly proper system is a system where the degree of the denominator polynomial is larger than (but never equal to) the degree of the numerator polynomial. A biproper system is a system where the degree of the denominator polynomial equals the degree of the numerator polynomial.

It is important to note that only proper systems can be physically realized. In other words, a system that is not proper cannot be built. It makes no sense to spend a lot of time designing and analyzing imaginary systems.

### Example: System Order

Find the order of this system:

${\displaystyle G(s)={\frac {1+s}{1+s+s^{2}}}}$

The highest exponent in the denominator is s2, so the system is order 2. Also, since the denominator is a higher degree than the numerator, this system is strictly proper.

In the above example, G(s) is a second-order transfer function because in the denominator one of the s variables has an exponent of 2. Second-order functions are the easiest to work with.

## System Type

Let's say that we have a process transfer function (or combination of functions, such as a controller feeding in to a process), all in the forward branch of a unity feedback loop. Say that the overall forward branch transfer function is in the following generalized form (known as pole-zero form):

[Pole-Zero Form]

${\displaystyle G(s)={\frac {K\prod _{i}(s-s_{i})}{s^{M}\prod _{j}(s-s_{j})}}}$
Poles at the origin are called integrators, because they have the effect of performing integration on the input signal.

we call the parameter M the system type. Note that increased system type number correspond to larger numbers of poles at s = 0. More poles at the origin generally have a beneficial effect on the system, but they increase the order of the system, and make it increasingly difficult to implement physically. System type will generally be denoted with a letter like N, M, or m. Because these variables are typically reused for other purposes, this book will make clear distinction when they are employed.

Now, we will define a few terms that are commonly used when discussing system type. These new terms are Position Error, Velocity Error, and Acceleration Error. These names are throwbacks to physics terms where acceleration is the derivative of velocity, and velocity is the derivative of position. Note that none of these terms are meant to deal with movement, however.

Position Error
The position error, denoted by the position error constant ${\displaystyle K_{p}}$. This is the amount of steady-state error of the system when stimulated by a unit step input. We define the position error constant as follows:

[Position Error Constant]

${\displaystyle K_{p}=\lim _{s\to 0}G(s)}$
Where G(s) is the transfer function of our system.
Velocity Error
The velocity error is the amount of steady-state error when the system is stimulated with a ramp input. We define the velocity error constant as such:

[Velocity Error Constant]

${\displaystyle K_{v}=\lim _{s\to 0}sG(s)}$
Acceleration Error
The acceleration error is the amount of steady-state error when the system is stimulated with a parabolic input. We define the acceleration error constant to be:

[Acceleration Error Constant]

${\displaystyle K_{a}=\lim _{s\to 0}s^{2}G(s)}$

Now, this table will show briefly the relationship between the system type, the kind of input (step, ramp, parabolic), and the steady-state error of the system:

Unit System Input
Type, M Au(t) Ar(t) Ap(t)
0 ${\displaystyle e_{ss}={\frac {A}{1+K_{p}}}}$ ${\displaystyle e_{ss}=\infty }$ ${\displaystyle e_{ss}=\infty }$
1 ${\displaystyle e_{ss}=0}$ ${\displaystyle e_{ss}={\frac {A}{K_{v}}}}$ ${\displaystyle e_{ss}=\infty }$
2 ${\displaystyle e_{ss}=0}$ ${\displaystyle e_{ss}=0}$ ${\displaystyle e_{ss}={\frac {A}{K_{a}}}}$
> 2 ${\displaystyle e_{ss}=0}$ ${\displaystyle e_{ss}=0}$ ${\displaystyle e_{ss}=0}$

### Z-Domain Type

Likewise, we can show that the system order can be found from the following generalized transfer function in the Z domain:

${\displaystyle G(z)={\frac {K\prod _{i}(z-z_{i})}{(z-1)^{M}\prod _{j}(z-z_{j})}}}$

Where the constant M is the type of the digital system. Now, we will show how to find the various error constants in the Z-Domain:

[Z-Domain Error Constants]

Error Constant Equation
Kp ${\displaystyle K_{p}=\lim _{z\to 1}G(z)}$
Kv ${\displaystyle K_{v}=\lim _{z\to 1}(z-1)G(z)}$
Ka ${\displaystyle K_{a}=\lim _{z\to 1}(z-1)^{2}G(z)}$

## Visually

Here is an image of the various system metrics, acting on a system in response to a step input:

The target value is the value of the input step response. The rise time is the time at which the waveform first reaches the target value. The overshoot is the amount by which the waveform exceeds the target value. The settling time is the time it takes for the system to settle into a particular bounded region. This bounded region is denoted with two short dotted lines above and below the target value.

# System Modeling

## The Control Process

It is the job of a control engineer to analyze existing systems, and to design new systems to meet specific needs. Sometimes new systems need to be designed, but more frequently a controller unit needs to be designed to improve the performance of existing systems. When designing a system, or implementing a controller to augment an existing system, we need to follow some basic steps:

1. Model the system mathematically
2. Analyze the mathematical model
3. Design system/controller
4. Implement system/controller and test

The vast majority of this book is going to be focused on (2), the analysis of the mathematical systems. This chapter alone will be devoted to a discussion of the mathematical modeling of the systems.

## External Description

An external description of a system relates the system input to the system output without explicitly taking into account the internal workings of the system. The external description of a system is sometimes also referred to as the Input-Output Description of the system, because it only deals with the inputs and the outputs to the system.

If the system can be represented by a mathematical function h(t, r), where t is the time that the output is observed, and r is the time that the input is applied. We can relate the system function h(t, r) to the input x and the output y through the use of an integral:

[General System Description]

${\displaystyle y(t)=\int _{-\infty }^{\infty }h(t,r)x(r)dr}$

This integral form holds for all linear systems, and every linear system can be described by such an equation.

If a system is causal (i.e. an input at t=r affects system behaviour only for ${\displaystyle t\geq r}$) and there is no input of the system before t=0, we can change the limits of the integration:

${\displaystyle y(t)=\int _{0}^{t}h(t,r)x(r)dr}$

### Time-Invariant Systems

If furthermore a system is time-invariant, we can rewrite the system description equation as follows:

${\displaystyle y(t)=\int _{0}^{t}h(t-r)x(r)dr}$

This equation is known as the convolution integral, and we will discuss it more in the next chapter.

Every Linear Time-Invariant (LTI) system can be used with the Laplace Transform, a powerful tool that allows us to convert an equation from the time domain into the S-Domain, where many calculations are easier. Time-variant systems cannot be used with the Laplace Transform.

## Internal Description

If a system is linear and lumped, it can also be described using a system of equations known as state-space equations. In state-space equations, we use the variable x to represent the internal state of the system. We then use u as the system input, and we continue to use y as the system output. We can write the state-space equations as such:

${\displaystyle x'(t)=A(t)x(t)+B(t)u(t)}$
${\displaystyle y(t)=C(t)x(t)+D(t)u(t)}$

We will discuss the state-space equations more when we get to the section on modern controls.

## Complex Descriptions

Systems which are LTI and Lumped can also be described using a combination of the state-space equations, and the Laplace Transform. If we take the Laplace Transform of the state equations that we listed above, we can get a set of functions known as the Transfer Matrix Functions. We will discuss these functions in a later chapter.

## Representations

To recap, we will prepare a table with the various system properties, and the available methods for describing the system:

Properties State-Space
Equations
Laplace
Transform
Transfer
Matrix
Linear, Time-Variant, Distributed no no no
Linear, Time-Variant, Lumped yes no no
Linear, Time-Invariant, Distributed no yes no
Linear, Time-Invariant, Lumped yes yes yes

We will discuss all these different types of system representation later in the book.

## Analysis

Once a system is modeled using one of the representations listed above, the system needs to be analyzed. We can determine the system metrics and then we can compare those metrics to our specification. If our system meets the specifications we are finished with the design process. However if the system does not meet the specifications (as is typically the case), then suitable controllers and compensators need to be designed and added to the system.

Once the controllers and compensators have been designed, the job isn't finished: we need to analyze the new composite system to ensure that the controllers work properly. Also, we need to ensure that the systems are stable: unstable systems can be dangerous.

### Frequency Domain

For proposals, early stage designs, and quick turn around analyses a frequency domain model is often superior to a time domain model. Frequency domain models take disturbance PSDs (Power Spectral Densities) directly, use transfer functions directly, and produce output or residual PSDs directly. The answer is a steady-state response. Oftentimes the controller is shooting for 0 so the steady-state response is also the residual error that will be the analysis output or metric for report.

Table 1: Frequency Domain Model Inputs and Outputs
Input Model Output
PSD Transfer Function PSD

#### Brief Overview of the Math

Frequency domain modeling is a matter of determining the impulse response of a system to a random process.

Figure 1: Frequency Domain System
${\displaystyle S_{YY}\left(\omega \right)=G^{*}\left(\omega \right)G\left(\omega \right)S_{XX}=\left|G\left(\omega \right)\right\vert S_{XX}}$[1]

where

${\displaystyle S_{XX}\left(\omega \right)}$ is the one-sided input PSD in ${\displaystyle {\frac {magnitude^{2}}{Hz}}}$
${\displaystyle G\left(\omega \right)}$ is the frequency response function of the system and
${\displaystyle S_{YY}\left(\omega \right)}$ is the one-sided output PSD or auto power spectral density function.

The frequency response function, ${\displaystyle G\left(\omega \right)}$, is related to the impulse response function (transfer function) by

${\displaystyle g\left(\tau \right)={\frac {1}{2\pi }}\int _{-\infty }^{\infty }e^{i\omega t}H\left(\omega \right)\,d\omega }$

Note some texts will state that this is only valid for random processes which are stationary. Other texts suggest stationary and ergodic while still others state weakly stationary processes. Some texts do not distinguish between strictly stationary and weakly stationary. From practice, the rule of thumb is if the PSD of the input process is the same from hour to hour and day to day then the input PSD can be used and the above equation is valid.

#### Notes

1. Sun, Jian-Qiao (2006). Stochastic Dynamics and Control, Volume 4. Amsterdam: Elsevier Science. ISBN 0444522301.

See a full explanation with example at ControlTheoryPro.com

## Modeling Examples

Modeling in Control Systems is oftentimes a matter of judgement. This judgement is developed by creating models and learning from other people's models. ControlTheoryPro.com is a site with a lot of examples. Here are links to a few of them

## Manufacture

Once the system has been properly designed we can prototype our system and test it. Assuming our analysis was correct and our design is good, the prototype should work as expected. Now we can move on to manufacture and distribute our completed systems.

Modern Controls

The modern method of controls uses systems of special state-space equations to model and manipulate systems. The state variable model is broad enough to be useful in describing a wide range of systems, including systems that cannot be adequately described using the Laplace Transform. These chapters will require the reader to have a solid background in linear algebra, and multi-variable calculus.

# State-Space Equations

## Time-Domain Approach

The "Classical" method of controls (what we have been studying so far) has been based mostly in the transform domain. When we want to control the system in general we use the Laplace transform (Z-Transform for digital systems) to represent the system, and when we want to examine the frequency characteristics of a system, we use the Fourier Transform. The question arises, why do we do this?

Let's look at a basic second-order Laplace Transform transfer function:

${\displaystyle {\frac {Y(s)}{X(s)}}=G(s)={\frac {1+s}{1+2s+5s^{2}}}}$

And we can decompose this equation in terms of the system inputs and outputs:

${\displaystyle (1+2s+5s^{2})Y(s)=(1+s)X(s)}$

Now, when we take the inverse Laplace transform of our equation, we can see that:

${\displaystyle y(t)+2{\frac {dy(t)}{dt}}+5{\frac {d^{2}y(t)}{dt^{2}}}=x(t)+{\frac {dx(t)}{dt}}}$

The Laplace transform is transforming the fact that we are dealing with second-order differential equations. The Laplace transform moves a system out of the time-domain into the complex frequency domain, to study and manipulate our systems as algebraic polynomials instead of linear ODEs. Given the complexity of differential equations, why would we ever want to work in the time domain?

It turns out that to decompose our higher-order differential equations into multiple first-order equations, one can find a new method for easily manipulating the system without having to use integral transforms. The solution to this problem is state variables . By taking our multiple first-order differential equations, and analyzing them in vector form, we can not only do the same things we were doing in the time domain using simple matrix algebra, but now we can easily account for systems with multiple inputs and multiple outputs, without adding much unnecessary complexity. This demonstrates why the "modern" state-space approach to controls has become popular.

## State-Space

In a state space system, the internal state of the system is explicitly accounted for by an equation known as the state equation. The system output is given in terms of a combination of the current system state, and the current system input, through the output equation. These two equations form a system of equations known collectively as state-space equations. The state-space is the vector space that consists of all the possible internal states of the system.

For a system to be modeled using the state-space method, the system must meet this requirement:

1. The system must be "lumped"

"Lumped" in this context, means that we can find a finite-dimensional state-space vector which fully characterises all such internal states of the system.

This text mostly considers linear state space systems, where the state and output equations satisfy the superposition principle and the state space is linear. However, the state-space approach is equally valid for nonlinear systems although some specific methods are not applicable to nonlinear systems.

#### State

Central to the state-space notation is the idea of a state. A state of a system is the current value of internal elements of the system, that change separately (but not completely unrelated) to the output of the system. In essence, the state of a system is an explicit account of the values of the internal system components. Here are some examples:

Consider an electric circuit with both an input and an output terminal. This circuit may contain any number of inductors and capacitors. The state variables may represent the magnetic and electric fields of the inductors and capacitors, respectively.

Consider a spring-mass-dashpot system. The state variables may represent the compression of the spring, or the acceleration at the dashpot.

Consider a chemical reaction where certain reagents are poured into a mixing container, and the output is the amount of the chemical product produced over time. The state variables may represent the amounts of un-reacted chemicals in the container, or other properties such as the quantity of thermal energy in the container (that can serve to facilitate the reaction).

## State Variables

When modeling a system using a state-space equation, we first need to define three vectors:

Input variables
A SISO (Single Input Single Output) system will only have a single input value, but a MIMO system may have multiple inputs. We need to define all the inputs to the system, and we need to arrange them into a vector.
Output variables
This is the system output value, and in the case of MIMO systems, we may have several. Output variables should be independent of one another, and only dependent on a linear combination of the input vector and the state vector.
State Variables
The state variables represent values from inside the system, that can change over time. In an electric circuit, for instance, the node voltages or the mesh currents can be state variables. In a mechanical system, the forces applied by springs, gravity, and dashpots can be state variables.

We denote the input variables with u, the output variables with y, and the state variables with x. In essence, we have the following relationship:

${\displaystyle y=f(x,u)}$

Where f(x, u) is our system. Also, the state variables can change with respect to the current state and the system input:

${\displaystyle x'=g(x,u)}$

Where x' is the rate of change of the state variables. We will define f(u, x) and g(u, x) in the next chapter.

## Multi-Input, Multi-Output

In the Laplace domain, if we want to account for systems with multiple inputs and multiple outputs, we are going to need to rely on the principle of superposition to create a system of simultaneous Laplace equations for each output and each input. For such systems, the classical approach not only doesn't simplify the situation, but because the systems of equations need to be transformed into the frequency domain first, manipulated, and then transformed back into the time domain, they can actually be more difficult to work with. However, the Laplace domain technique can be combined with the State-Space techniques discussed in the next few chapters to bring out the best features of both techniques. We will discuss MIMO systems in the MIMO Systems Chapter.

## State-Space Equations

In a state-space system representation, we have a system of two equations: an equation for determining the state of the system, and another equation for determining the output of the system. We will use the variable y(t) as the output of the system, x(t) as the state of the system, and u(t) as the input of the system. We use the notation x'(t) (note the prime) for the first derivative of the state vector of the system, as dependent on the current state of the system and the current input. Symbolically, we say that there are transforms g and h, that display this relationship:

${\displaystyle x'(t)=g[t_{0},t,x(t),x(0),u(t)]}$
${\displaystyle y(t)=h[t,x(t),u(t)]}$
Note:
If x'(t) and y(t) are not linear combinations of x(t) and u(t), the system is said to be nonlinear. We will attempt to discuss non-linear systems in a later chapter.

The first equation shows that the system state change is dependent on the previous system state, the initial state of the system, the time, and the system inputs. The second equation shows that the system output is dependent on the current system state, the system input, and the current time.

If the system state change x'(t) and the system output y(t) are linear combinations of the system state and input vectors, then we can say the systems are linear systems, and we can rewrite them in matrix form:

[State Equation]

${\displaystyle x'=A(t)x(t)+B(t)u(t)}$

[Output Equation]

${\displaystyle y(t)=C(t)x(t)+D(t)u(t)}$

If the systems themselves are time-invariant, we can re-write this as follows:

${\displaystyle x'=Ax(t)+Bu(t)}$
${\displaystyle y(t)=Cx(t)+Du(t)}$

The State Equation shows the relationship between the system's current state and its input, and the future state of the system. The Output Equation shows the relationship between the system state and its input, and the output. These equations show that in a given system, the current output is dependent on the current input and the current state. The future state is also dependent on the current state and the current input.

It is important to note at this point that the state space equations of a particular system are not unique, and there are an infinite number of ways to represent these equations by manipulating the A, B, C and D matrices using row operations. There are a number of "standard forms" for these matrices, however, that make certain computations easier. Converting between these forms will require knowledge of linear algebra.

State-Space Basis Theorem
Any system that can be described by a finite number of nth order differential equations or nth order difference equations, or any system that can be approximated by them, can be described using state-space equations. The general solutions to the state-space equations, therefore, are solutions to all such sets of equations.

### Matrices: A B C D

Our system has the form:

${\displaystyle {\mathbf {x} }'(t)={\mathbf {g} }[t_{0},t,{\mathbf {x} }(t),x(0),{\mathbf {u} }(t)]}$
${\displaystyle {\mathbf {y} }(t)={\mathbf {h} }[t,{\mathbf {x} }(t),{\mathbf {u} }(t)]}$

We've bolded several quantities to try and reinforce the fact that they can be vectors, not just scalar quantities. If these systems are time-invariant, we can simplify them by removing the time variables:

${\displaystyle {\mathbf {x} }'(t)={\mathbf {g} }[{\mathbf {x} }(t),x(0),{\mathbf {u} }(t)]}$
${\displaystyle {\mathbf {y} }(t)={\mathbf {h} }[{\mathbf {x} }(t),{\mathbf {u} }(t)]}$

Now, if we take the partial derivatives of these functions with respect to the input and the state vector at time t0, we get our system matrices:

${\displaystyle A={\mathbf {g} }_{x}[x(0),x(0),u(0)]}$
${\displaystyle B={\mathbf {g} }_{u}[x(0),x(0),u(0)]}$
${\displaystyle C={\mathbf {h} }_{x}[x(0),u(0)]}$
${\displaystyle D={\mathbf {h} }_{u}[x(0),u(0)]}$

In our time-invariant state space equations, we write these matrices and their relationships as:

${\displaystyle x'(t)=Ax(t)+Bu(t)}$
${\displaystyle y(t)=Cx(t)+Du(t)}$

We have four constant matrices: A, B, C, and D. We will explain these matrices below:

Matrix A
Matrix A is the system matrix, and relates how the current state affects the state change x' . If the state change is not dependent on the current state, A will be the zero matrix. The exponential of the state matrix, eAt is called the state transition matrix, and is an important function that we will describe below.
Matrix B
Matrix B is the control matrix, and determines how the system input affects the state change. If the state change is not dependent on the system input, then B will be the zero matrix.
Matrix C
Matrix C is the output matrix, and determines the relationship between the system state and the system output.
Matrix D
Matrix D is the feed-forward matrix, and allows for the system input to affect the system output directly. A basic feedback system like those we have previously considered do not have a feed-forward element, and therefore for most of the systems we have already considered, the D matrix is the zero matrix.

### Matrix Dimensions

Because we are adding and multiplying multiple matrices and vectors together, we need to be absolutely certain that the matrices have compatible dimensions, or else the equations will be undefined. For integer values p, q, and r, the dimensions of the system matrices and vectors are defined as follows:

Vectors Matrices
• ${\displaystyle x:p\times 1}$
• ${\displaystyle x':p\times 1}$
• ${\displaystyle u:q\times 1}$
• ${\displaystyle y:r\times 1}$
• ${\displaystyle A:p\times p}$
• ${\displaystyle B:p\times q}$
• ${\displaystyle C:r\times p}$
• ${\displaystyle D:r\times q}$

Matrix Dimensions:
A: p × p
B: p × q
C: r × p
D: r × q

If the matrix and vector dimensions do not agree with one another, the equations are invalid and the results will be meaningless. Matrices and vectors must have compatible dimensions or they cannot be combined using matrix operations.

For the rest of the book, we will be using the small template on the right as a reminder about the matrix dimensions, so that we can keep a constant notation throughout the book.

### Notational Shorthand

The state equations and the output equations of systems can be expressed in terms of matrices A, B, C, and D. Because the form of these equations is always the same, we can use an ordered quadruplet to denote a system. We can use the shorthand (A, B, C, D) to denote a complete state-space representation. Also, because the state equation is very important for our later analyis, we can write an ordered pair (A, B) to refer to the state equation:

${\displaystyle (A,B)\to x'=Ax+Bu}$
${\displaystyle (A,B,C,D)\to \left\{{\begin{matrix}x'=Ax+Bu\\y=Cx+Du\end{matrix}}\right.}$

## Obtaining the State-Space Equations

The beauty of state equations, is that they can be used to transparently describe systems that are both continuous and discrete in nature. Some texts will differentiate notation between discrete and continuous cases, but this text will not make such a distinction. Instead we will opt to use the generic coefficient matrices A, B, C and D for both continuous and discrete systems. Occasionally this book may employ the subscript C to denote a continuous-time version of the matrix, and the subscript D to denote the discrete-time version of the same matrix. Other texts may use the letters F, H, and G for continuous systems and Γ, and Θ for use in discrete systems. However, if we keep track of our time-domain system, we don't need to worry about such notations.

### From Differential Equations

Let's say that we have a general 3rd order differential equation in terms of input u(t) and output y(t):

${\displaystyle {\frac {d^{3}y(t)}{dt^{3}}}+a_{2}{\frac {d^{2}y(t)}{dt^{2}}}+a_{1}{\frac {dy(t)}{dt}}+a_{0}y(t)=u(t)}$

We can create the state variable vector x in the following manner:

${\displaystyle x_{1}=y(t)}$
${\displaystyle x_{2}={\frac {dy(t)}{dt}}}$
${\displaystyle x_{3}={\frac {d^{2}y(t)}{dt^{2}}}}$

Which now leaves us with the following 3 first-order equations:

${\displaystyle x_{1}'=x_{2}}$
${\displaystyle x_{2}'=x_{3}}$
${\displaystyle x_{3}'={\frac {d^{3}y(t)}{dt^{3}}}}$

Now, we can define the state vector x in terms of the individual x components, and we can create the future state vector as well:

${\displaystyle x={\begin{bmatrix}x_{1}\\x_{2}\\x_{3}\end{bmatrix}}}$, ${\displaystyle x'={\begin{bmatrix}x_{1}'\\x_{2}'\\x_{3}'\end{bmatrix}}}$

And with that, we can assemble the state-space equations for the system:

${\displaystyle x'={\begin{bmatrix}0&1&0\\0&0&1\\-a_{0}&-a_{1}&-a_{2}\end{bmatrix}}x(t)+{\begin{bmatrix}0\\0\\1\end{bmatrix}}u(t)}$
${\displaystyle y(t)={\begin{bmatrix}1&0&0\end{bmatrix}}x(t)}$

Granted, this is only a simple example, but the method should become apparent to most readers.

### From Transfer Functions

The method of obtaining the state-space equations from the Laplace domain transfer functions are very similar to the method of obtaining them from the time-domain differential equations. We call the process of converting a system description from the Laplace domain to the state-space domain realization. We will discuss realization in more detail in a later chapter. In general, let's say that we have a transfer function of the form:

${\displaystyle T(s)={\frac {s^{m}+a_{m-1}s^{m-1}+\cdots +a_{0}}{s^{n}+b_{n-1}s^{n-1}+\cdots +b_{0}}}}$

We can write our A, B, C, and D matrices as follows:

 ${\displaystyle A={\begin{bmatrix}0&1&0&\cdots &0\\0&0&1&\cdots &0\\\vdots &\vdots &\vdots &\ddots &\vdots \\0&0&0&\cdots &1\\-b_{0}&-b_{1}&-b_{2}&\cdots &-b_{n-1}\end{bmatrix}}}$ ${\displaystyle B={\begin{bmatrix}0\\0\\\vdots \\1\end{bmatrix}}}$ ${\displaystyle C={\begin{bmatrix}a_{0}&a_{1}&\cdots &a_{m-1}\end{bmatrix}}}$ ${\displaystyle D=0}$

This form of the equations is known as the controllable canonical form of the system matrices, and we will discuss this later.

Notice that to perform this method, the denominator and numerator polynomials must be monic, the coefficients of the highest-order term must be 1. If the coefficient of the highest order term is not 1, you must divide your equation by that coefficient to make it 1.

## State-Space Representation

As an important note, remember that the state variables x are user-defined and therefore are arbitrary. There are any number of ways to define x for a particular problem, each of which are going to lead to different state space equations.

Note: There are an infinite number of equivalent ways to represent a system using state-space equations. Some ways are better than others. Once these state-space equations are obtained, they can be manipulated to take a particular form if needed.

Consider the previous continuous-time example. We can rewrite the equation in the form

${\displaystyle {\frac {d}{dt}}\left[{\frac {d^{2}y(t)}{dt^{2}}}+a_{2}{\frac {dy(t)}{dt}}+a_{1}y(t)\right]+a_{0}y(t)=u(t)}$.

We now define the state variables

${\displaystyle x_{1}=y(t)}$
${\displaystyle x_{2}={\frac {dy(t)}{dt}}}$
${\displaystyle x_{3}={\frac {d^{2}y(t)}{dt^{2}}}+a_{2}{\frac {dy(t)}{dt}}+a_{1}y(t)}$

with first-order derivatives

${\displaystyle x_{1}'={\frac {dy(t)}{dt}}=x_{2}}$
${\displaystyle x_{2}'={\frac {d^{2}y(t)}{dt^{2}}}=-a_{1}x_{1}-a_{2}x_{2}+x_{3}}$
${\displaystyle x_{3}'=-a_{0}y(t)+u(t)}$

The state-space equations for the system will then be given by

${\displaystyle x'={\begin{bmatrix}0&1&0\\-a_{1}&-a_{2}&1\\-a_{0}&0&0\end{bmatrix}}x(t)+{\begin{bmatrix}0\\0\\1\end{bmatrix}}u(t)}$
${\displaystyle y(t)={\begin{bmatrix}1&0&0\end{bmatrix}}x(t)}$

x may also be used in any number of variable transformations, as a matter of mathematical convenience. However, the variables y and u correspond to physical signals, and may not be arbitrarily selected, redefined, or transformed as x can be.

### Example: Dummy Variables

The altitude control of a particular manned aircraft can be given by:

${\displaystyle \theta ''(t)=\alpha +\delta }$

Where α is the direction the aircraft is traveling in, θ is the direction the aircraft is facing (the attitude), and δ is the angle of the ailerons (the control input from the pilot). This equation is not in a proper format, so we need to produce some dummy-variables:

${\displaystyle \theta _{1}=\theta }$
${\displaystyle \theta _{1}'=\theta _{2}}$
${\displaystyle \theta _{2}'=\alpha +\delta }$

This in turn will provide us with our state equation:

${\displaystyle {\begin{bmatrix}\theta _{1}\\\theta _{2}\end{bmatrix}}'={\begin{bmatrix}0&1\\0&0\end{bmatrix}}{\begin{bmatrix}\theta _{1}\\\theta _{2}\end{bmatrix}}+{\begin{bmatrix}0&0\\1&1\end{bmatrix}}{\begin{bmatrix}\alpha \\\delta \end{bmatrix}}}$

As we can see from this equation, even though we have a valid state-equation, the variables θ1 and θ2 don't necessarily correspond to any measurable physical event, but are instead dummy variables constructed by the user to help define the system. Note, however, that the variables α and δ do correspond to physical values, and cannot be changed.

## Discretization

If we have a system (A, B, C, D) that is defined in continuous time, we can discretize the system so that an equivalent process can be performed using a digital computer. We can use the definition of the derivative, as such:

${\displaystyle x'(t)=\lim _{T\to 0}{\frac {x(t+T)-x(t)}{T}}}$

And substituting this into the state equation with some approximation (and ignoring the limit for now) gives us:

${\displaystyle \lim _{T\to 0}{\frac {x(t+T)-x(t)}{T}}=Ax(t)+Bu(t)}$
${\displaystyle x(t+T)=x(t)+Ax(t)T+Bu(t)T}$
${\displaystyle x(t+T)=(1+AT)x(t)+(BT)u(t)}$

We are able to remove that limit because in a discrete system, the time interval between samples is positive and non-negligible. By definition, a discrete system is only defined at certain time points, and not at all time points as the limit would have indicated. In a discrete system, we are interested only in the value of the system at discrete points. If those points are evenly spaced by every T seconds (the sampling time), then the samples of the system occur at t = kT, where k is an integer. Substituting kT for t into our equation above gives us:

${\displaystyle x(kT+T)=(1+AT)x(kT)+TBu(kT)}$

Or, using the square-bracket shorthand that we've developed earlier, we can write:

${\displaystyle x[k+1]=(1+AT)x[k]+TBu[k]}$

In this form, the state-space system can be implemented quite easily into a digital computer system using software, not complicated analog hardware. We will discuss this relationship and digital systems more specifically in a later chapter.

We will write out the discrete-time state-space equations as:

${\displaystyle x[n+1]=A_{d}x[n]+B_{d}u[n]}$
${\displaystyle y[n]=C_{d}x[n]+D_{d}u[n]}$

## Note on Notations

The variable T is a common variable in control systems, especially when talking about the beginning and end points of a continuous-time system, or when discussing the sampling time of a digital system. However, another common use of the letter T is to signify the transpose operation on a matrix. To alleviate this ambiguity, we will denote the transpose of a matrix with a prime:

${\displaystyle A^{T}\to A'}$

Where A' is the transpose of matrix A.

The prime notation is also frequently used to denote the time-derivative. Most of the matrices that we will be talking about are time-invariant; there is no ambiguity because we will never take the time derivative of a time-invariant matrix. However, for a time-variant matrix we will use the following notations to distinguish between the time-derivative and the transpose:

${\displaystyle A(t)'}$ the transpose.
${\displaystyle A'(t)}$ the time-derivative.

Note that certain variables which are time-variant are not written with the (t) postscript, such as the variables x, y, and u. For these variables, the default behavior of the prime is the time-derivative, such as in the state equation. If the transpose needs to be taken of one of these vectors, the (t)' postfix will be added explicitly to correspond to our notation above.

For instances where we need to use the Hermitian transpose, we will use the notation:

${\displaystyle A^{H}}$

This notation is common in other literature, and raises no obvious ambiguities here.

## MATLAB Representation

This operation can be performed using this MATLAB command:
ss

State-space systems can be represented in MATLAB using the 4 system matrices, A, B, C, and D. We can create a system data structure using the ss function:

sys = ss(A, B, C, D);


Systems created in this way can be manipulated in the same way that the transfer function descriptions (described earlier) can be manipulated. To convert a transfer function to a state-space representation, we can use the tf2ss function:

[A, B, C, D] = tf2ss(num, den);


And to perform the opposite operation, we can use the ss2tf function:

[num, den] = ss2tf(A, B, C, D);


# Solutions for Linear Systems

## State Equation Solutions

The solutions in this chapter are heavily rooted in prior knowledge of Ordinary Differential Equations. Readers should have a prior knowledge of that subject before reading this chapter.

The state equation is a first-order linear differential equation, or (more precisely) a system of linear differential equations. Because this is a first-order equation, we can use results from Ordinary Differential Equations to find a general solution to the equation in terms of the state-variable x. Once the state equation has been solved for x, that solution can be plugged into the output equation. The resulting equation will show the direct relationship between the system input and the system output, without the need to account explicitly for the internal state of the system. The sections in this chapter will discuss the solutions to the state-space equations, starting with the easiest case (Time-invariant, no input), and ending with the most difficult case (Time-variant systems).

## Solving for x(t) With Zero Input

Looking again at the state equation:

${\displaystyle x'=Ax(t)+Bu(t)}$

We can see that this equation is a first-order differential equation, except that the variables are vectors, and the coefficients are matrices. However, because of the rules of matrix calculus, these distinctions don't matter. We can ignore the input term (for now), and rewrite this equation in the following form:

${\displaystyle {\frac {dx(t)}{dt}}=Ax(t)}$

And we can separate out the variables as such:

${\displaystyle {\frac {dx(t)}{x(t)}}=Adt}$

Integrating both sides, and raising both sides to a power of e, we obtain the result:

${\displaystyle x(t)=e^{At+C}}$

Where C is a constant. We can assign D = eC to make the equation easier, but we also know that D will then be the initial conditions of the system. This becomes obvious if we plug the value zero into the variable t. The final solution to this equation then is given as:

${\displaystyle x(t)=e^{A(t-t_{0})}x(t_{0})}$

We call the matrix exponential eAt the state-transition matrix, and calculating it, while difficult at times, is crucial to analyzing and manipulating systems. We will talk more about calculating the matrix exponential below.

## Solving for x(t) With Non-Zero Input

If, however, our input is non-zero (as is generally the case with any interesting system), our solution is a little bit more complicated. Notice that now that we have our input term in the equation, we will no longer be able to separate the variables and integrate both sides easily.

${\displaystyle x'(t)=Ax(t)+Bu(t)}$

We subtract to get the ${\displaystyle Ax(t)}$ on the left side, and then we do something curious; we premultiply both sides by the inverse state transition matrix:

${\displaystyle e^{-At}x'(t)-e^{-At}Ax(t)=e^{-At}Bu(t)}$

The rationale for this last step may seem fuzzy at best, so we will illustrate the point with an example:

### Example

Take the derivative of the following with respect to time:

${\displaystyle e^{-At}x(t)}$

The product rule from differentiation reminds us that if we have two functions multiplied together:

${\displaystyle f(t)g(t)}$

and we differentiate with respect to t, then the result is:

${\displaystyle f(t)g'(t)+f'(t)g(t)}$

If we set our functions accordingly:

${\displaystyle f(t)=e^{-At}\qquad f'(t)=-Ae^{-At}}$
${\displaystyle g(t)=x(t)\qquad g'(t)=x'(t)}$

Then the output result is:

${\displaystyle e^{-At}x'(t)-e^{-At}Ax(t)}$

If we look at this result, it is the same as from our equation above.

Using the result from our example, we can condense the left side of our equation into a derivative:

${\displaystyle {\frac {d(e^{-At}x(t))}{dt}}=e^{-At}Bu(t)}$

Now we can integrate both sides, from the initial time (t0) to the current time (t), using a dummy variable τ, we will get closer to our result. Finally, if we premultiply by eAt, we get our final result:

[General State Equation Solution]

${\displaystyle x(t)=e^{A(t-t_{0})}x(t_{0})+\int _{t_{0}}^{t}e^{A(t-\tau )}Bu(\tau )d\tau }$

If we plug this solution into the output equation, we get:

[General Output Equation Solution]

${\displaystyle y(t)=Ce^{A(t-t_{0})}x(t_{0})+C\int _{t_{0}}^{t}e^{A(t-\tau )}Bu(\tau )d\tau +Du(t)}$

This is the general Time-Invariant solution to the state space equations, with non-zero input. These equations are important results, and students who are interested in a further study of control systems would do well to memorize these equations.

## State-Transition Matrix

Engineering Analysis

The state transition matrix, eAt, is an important part of the general state-space solutions for the time-invariant cases listed above. Calculating this matrix exponential function is one of the very first things that should be done when analyzing a new system, and the results of that calculation will tell important information about the system in question.

The matrix exponential can be calculated directly by using a Taylor-Series expansion:

${\displaystyle e^{At}=\sum _{n=0}^{\infty }{\frac {(At)^{n}}{n!}}}$
Engineering Analysis

Also, we can attempt to diagonalize the matrix A into a diagonal matrix or a Jordan Canonical matrix. The exponential of a diagonal matrix is simply the diagonal elements individually raised to that exponential. The exponential of a Jordan canonical matrix is slightly more complicated, but there is a useful pattern that can be exploited to find the solution quickly. Interested readers should read the relevant passages in Engineering Analysis.

The state transition matrix, and matrix exponentials in general are very important tools in control engineering.

### Diagonal Matrices

If a matrix is diagonal, the state transition matrix can be calculated by raising each diagonal entry of the matrix raised as a power of e.

### Jordan Canonical Form

If the A matrix is in the Jordan Canonical form, then the matrix exponential can be generated quickly using the following formula:

${\displaystyle e^{Jt}=e^{\lambda t}{\begin{bmatrix}1&t&{\frac {1}{2!}}t^{2}&\cdots &{\frac {1}{n!}}t^{n}\\0&1&t&\cdots &{\frac {1}{(n-1)!}}t^{n-1}\\\vdots &\vdots &\vdots &\ddots &\vdots \\0&0&0&\cdots &1\end{bmatrix}}}$

Where λ is the eigenvalue (the value on the diagonal) of the jordan-canonical matrix.

### Inverse Laplace Method

We can calculate the state-transition matrix (or any matrix exponential function) by taking the following inverse Laplace transform:

${\displaystyle e^{At}={\mathcal {L}}^{-1}[(sI-A)^{-1}]}$

If A is a high-order matrix, this inverse can be difficult to solve.

If the A matrix is in the Jordan Canonical form, then the matrix exponential can be generated quickly using the following formula:

   ${\displaystyle e^{Jt}=e^{\lambda t}{\begin{bmatrix}1&t&{\frac {1}{2!}}t^{2}&\cdots &{\frac {1}{n!}}t^{n}\\0&1&t&\cdots &{\frac {1}{(n-1)!}}t^{n-1}\\\vdots &\vdots &\vdots &\ddots &\vdots \\0&0&0&\cdots &1\end{bmatrix}}}$


Where λ is the eigenvalue (the value on the diagonal) of the jordan-canonical matrix.

### Spectral Decomposition

If we know all the eigenvalues of A, we can create our transition matrix T, and our inverse transition matrix T-1 These matrices will be the matrices of the right and left eigenvectors, respectively. If we have both the left and the right eigenvectors, we can calculate the state-transition matrix as:

[Spectral Decomposition]

${\displaystyle e^{At}=\sum _{i=1}^{n}e^{\lambda _{i}t}v_{i}w_{i}'}$

Note that wi' is the transpose of the ith left-eigenvector, not the derivative of it. We will discuss the concepts of "eigenvalues", "eigenvectors", and the technique of spectral decomposition in more detail in a later chapter.

### Cayley-Hamilton Theorem

Engineering Analysis

The Cayley-Hamilton Theorem can also be used to find a solution for a matrix exponential. For any eigenvalue of the system matrix A, λ, we can show that the two equations are equivalent:

${\displaystyle e^{\lambda t}=a_{0}+a_{1}\lambda t+a_{2}\lambda ^{2}t^{2}+\cdots +a_{n-1}\lambda ^{n-1}t^{n-1}}$

Once we solve for the coefficients of the equation, a, we can then plug those coefficients into the following equation:

${\displaystyle e^{At}=a_{0}I+a_{1}At+a_{2}A^{2}t^{2}+\cdots +a_{n-1}A^{n-1}t^{n-1}}$

### Example: Off-Diagonal Matrix

Given the following matrix A, find the state-transition matrix:

${\displaystyle A={\begin{bmatrix}0&1\\-1&0\end{bmatrix}}}$

We can find the eigenvalues of this matrix as λ = i, -i. If we plug these values into our eigenvector equation, we get:

${\displaystyle {\begin{vmatrix}i&-1\\1&i\end{vmatrix}}v_{1}=0}$
${\displaystyle {\begin{vmatrix}-i&-1\\1&-i\end{vmatrix}}v_{2}=0}$

And we can solve for our eigenvectors:

${\displaystyle v_{1}={\begin{bmatrix}1\\i\end{bmatrix}}}$
${\displaystyle v_{2}={\begin{bmatrix}1\\-i\end{bmatrix}}}$

With our eigenvectors, we can solve for our left-eigenvectors:

${\displaystyle w_{1}={\begin{bmatrix}1\\-i\end{bmatrix}}}$
${\displaystyle w_{2}={\begin{bmatrix}1\\i\end{bmatrix}}}$

Now, using spectral decomposition, we can construct the state-transition matrix:

${\displaystyle e^{At}=e^{it}{\begin{bmatrix}1\\i\end{bmatrix}}{\begin{bmatrix}1&-i\end{bmatrix}}+e^{-it}{\begin{bmatrix}1\\-i\end{bmatrix}}{\begin{bmatrix}1&i\end{bmatrix}}}$

If we remember Euler's Identity, we can decompose the complex exponentials into sinusoids. Performing the vector multiplications, all the imaginary terms cancel out, and we are left with our result:

${\displaystyle e^{At}={\begin{bmatrix}\cos t&\sin t\\-\sin t&\cos t\end{bmatrix}}}$

The reader is encouraged to perform the multiplications, and attempt to derive this result.

### Example: Sympy Calculation

With the freely available python library 'sympy' we can very easily calculate the state-transition matrix automatically:

>>> from sympy import *
>>> t = symbols('t', positive = true)
>>> A = Matrix([[0,1],[-1,0]])
>>> exp(A*t).expand(complex=True)

⎡cos(t)   sin(t)⎤
⎢               ⎥
⎣-sin(t)  cos(t)⎦


You can also try it out yourself on this website:

sympy live

### Example: MATLAB Calculation

Using the symbolic toolbox in MATLAB, we can write MATLAB code to automatically generate the state-transition matrix for a given input matrix A. Here is an example of MATLAB code that can perform this task:

function [phi] = statetrans(A)
t = sym('t');
phi = expm(A * t);
end


Use this MATLAB function to find the state-transition matrix for the following matrices (warning, calculation may take some time):

1. ${\displaystyle A_{1}={\begin{bmatrix}2&0\\0&2\end{bmatrix}}}$
2. ${\displaystyle A_{2}={\begin{bmatrix}0&1\\-1&0\end{bmatrix}}}$
3. ${\displaystyle A_{3}={\begin{bmatrix}2&1\\0&2\end{bmatrix}}}$

Matrix 1 is a diagonal matrix, Matrix 2 has complex eigenvalues, and Matrix 3 is Jordan canonical form. These three matrices should be representative of some of the common forms of system matrices. The following code snippets are the input commands into MATLAB to produce these matrices, and the output results:

Matrix A1
>> A1 = [2 0 ; 0 2];
>> statetrans(A1)

ans =

[ exp(2*t),        0]
[        0, exp(2*t)]

Matrix A2
>> A2 = [0 1 ; -1 0];
>> statetrans(A1)

ans =

[  cos(t),  sin(t)]
[ -sin(t),  cos(t)]

Matrix A3
>> A1 = [2 1 ; 0 2];
>> statetrans(A1)

ans =

[   exp(2*t), t*exp(2*t)]
[          0,   exp(2*t)]


### Example: Multiple Methods in MATLAB

There are multiple methods in MATLAB to compute the state transtion matrix, from a scalar (time-invariant) matrix A. The following methods are all going to rely on the Symbolic Toolbox to perform the equation manipulations. At the end of each code snippet, the variable eAt contains the state-transition matrix of matrix A.

Direct Method
t = sym('t');
eAt = expm(A * t);

Laplace Transform Method
s = sym('s');
[n,n] = size(A);
in = inv(s*eye(n) - A);
eAt = ilaplace(in);

Spectral Decomposition
t = sym('t');
[n,n] = size(A);
[V, e] = eig(A);
W = inv(V);
sum = [0 0;0 0];
for I = 1:n
sum = sum + expm(e(I,I)*t)*V(:,I)*W(I,:);
end;
eAt = sum;


All three of these methods should produce the same answers. The student is encouraged to verify this.

# Time-Variant System Solutions

## General Time Variant Solution

The state-space equations can be solved for time-variant systems, but the solution is significantly more complicated than the time-invariant case. Our time-variant state equation is given as follows:

${\displaystyle x'(t)=A(t)x(t)+B(t)u(t)}$

We can say that the general solution to time-variant state-equation is defined as:

[Time-Variant General Solution]

${\displaystyle x(t)=\phi (t,t_{0})x(t_{0})+\int _{t_{0}}^{t}\phi (t,\tau )B(\tau )u(\tau )d\tau }$

Matrix Dimensions:
A: p × p
B: p × q
C: r × p
D: r × q

The function ${\displaystyle \phi }$ is called the state-transition matrix, because it (like the matrix exponential from the time-invariant case) controls the change for states in the state equation. However, unlike the time-invariant case, we cannot define this as a simple exponential. In fact, ${\displaystyle \phi }$ can't be defined in general, because it will actually be a different function for every system. However, the state-transition matrix does follow some basic properties that we can use to determine the state-transition matrix.

In a time-variant system, the general solution is obtained when the state-transition matrix is determined. For that reason, the first thing (and the most important thing) that we need to do here is find that matrix. We will discuss the solution to that matrix below.

### State Transition Matrix

Note:
The state transition matrix ${\displaystyle \phi }$ is a matrix function of two variables (we will say t and τ). Once the form of the matrix is solved, we will plug in the initial time, t0 in place of the variable τ. Because of the nature of this matrix, and the properties that it must satisfy, this matrix typically is composed of exponential or sinusoidal functions. The exact form of the state-transition matrix is dependent on the system itself, and the form of the system's differential equation. There is no single "template solution" for this matrix.

The state transition matrix ${\displaystyle \phi }$ is not completely unknown, it must always satisfy the following relationships:

${\displaystyle {\frac {\partial \phi (t,t_{0})}{\partial t}}=A(t)\phi (t,t_{0})}$
${\displaystyle \phi (\tau ,\tau )=I}$

And ${\displaystyle \phi }$ also must have the following properties:

 1 ${\displaystyle \phi (t_{2},t_{1})\phi (t_{1},t_{0})=\phi (t_{2},t_{0})}$ 2 ${\displaystyle \phi ^{-1}(t,\tau )=\phi (\tau ,t)}$ 3 ${\displaystyle \phi ^{-1}(t,\tau )\phi (t,\tau )=I}$ 4 ${\displaystyle {\frac {d\phi (t_{0},t_{0})}{dt}}=A(t)}$

If the system is time-invariant, we can define ${\displaystyle \phi }$ as:

${\displaystyle \phi (t,t_{0})=e^{A(t-t_{0})}}$

The reader can verify that this solution for a time-invariant system satisfies all the properties listed above. However, in the time-variant case, there are many different functions that may satisfy these requirements, and the solution is dependent on the structure of the system. The state-transition matrix must be determined before analysis on the time-varying solution can continue. We will discuss some of the methods for determining this matrix below.

## Time-Variant, Zero Input

As the most basic case, we will consider the case of a system with zero input. If the system has no input, then the state equation is given as:

${\displaystyle x'(t)=A(t)x(t)}$

And we are interested in the response of this system in the time interval T = (a, b). The first thing we want to do in this case is find a fundamental matrix of the above equation. The fundamental matrix is related

### Fundamental Matrix

Here, x is an n × 1 vector, and A is an n × n matrix.

Given the equation:

${\displaystyle x'(t)=A(t)x(t)}$

The solutions to this equation form an n-dimensional vector space in the interval T = (a, b). Any set of n linearly-independent solutions {x1, x2, ..., xn} to the equation above is called a fundamental set of solutions.

Readers who have a background in Linear Algebra may recognize that the fundamental set is a basis set for the solution space. Any basis set that spans the entire solution space is a valid fundamental set.

A fundamental matrix FM is formed by creating a matrix out of the n fundamental vectors. We will denote the fundamental matrix with a script capital X:

${\displaystyle {\mathcal {X}}={\begin{bmatrix}x_{1}&x_{2}&\cdots &x_{n}\end{bmatrix}}}$

The fundamental matrix will satisfy the state equation:

${\displaystyle {\mathcal {X}}'(t)=A(t){\mathcal {X}}(t)}$

Also, any matrix that solves this equation can be a fundamental matrix if and only if the determinant of the matrix is non-zero for all time t in the interval T. The determinant must be non-zero, because we are going to use the inverse of the fundamental matrix to solve for the state-transition matrix.

### State Transition Matrix

Once we have the fundamental matrix of a system, we can use it to find the state transition matrix of the system:

${\displaystyle \phi (t,t_{0})={\mathcal {X}}(t){\mathcal {X}}^{-1}(t_{0})}$

The inverse of the fundamental matrix exists, because we specify in the definition above that it must have a non-zero determinant, and therefore must be non-singular. The reader should note that this is only one possible method for determining the state transition matrix, and we will discuss other methods below.

### Example: 2-Dimensional System

Given the following fundamental matrix, Find the state-transition matrix.

${\displaystyle {\mathcal {X}}(t)={\begin{bmatrix}e^{-t}&{\frac {1}{2}}e^{t}\\0&e^{-t}\end{bmatrix}}}$

the first task is to find the inverse of the fundamental matrix. Because the fundamental matrix is a 2 × 2 matrix, the inverse can be given easily through a common formula:

${\displaystyle {\mathcal {X}}^{-1}(t)={\frac {\begin{bmatrix}e^{-t}&-{\frac {1}{2}}e^{t}\\0&e^{-t}\end{bmatrix}}{e^{-2t}}}}$${\displaystyle ={\begin{bmatrix}{e}^{t}&-{\frac {1}{2}}\,{e}^{3t}\\0&{e}^{t}\end{bmatrix}}}$

The state-transition matrix is given by:

${\displaystyle \phi (t,t_{0})={\mathcal {X}}(t){\mathcal {X}}^{-1}(t_{0})={\begin{bmatrix}e^{-t}&-{\frac {1}{2}}e^{t}\\0&e^{-t}\end{bmatrix}}{\begin{bmatrix}{e}^{t_{0}}&{\frac {1}{2}}\,{e}^{3t_{0}}\\0&{e}^{t_{0}}\end{bmatrix}}}$
${\displaystyle \phi (t,t_{0})={\begin{bmatrix}e^{-t+t_{0}}&{\frac {1}{2}}(e^{t+t_{0}}-e^{-t+3t_{0}})\\0&e^{-t+t_{0}}\end{bmatrix}}}$

### Other Methods

There are other methods for finding the state transition matrix besides having to find the fundamental matrix.

Method 1
If A(t) is triangular (upper or lower triangular), the state transition matrix can be determined by sequentially integrating the individual rows of the state equation.
Method 2
If for every τ and t, the state matrix commutes as follows:
${\displaystyle A(t)\left[\int _{\tau }^{t}A(\zeta )d\zeta \right]=\left[\int _{\tau }^{t}A(\zeta )d\zeta \right]A(t)}$
Then the state-transition matrix can be given as:
${\displaystyle \phi (t,\tau )=e^{\int _{\tau }^{t}A(\zeta )d\zeta }}$
The state transition matrix will commute as described above if any of the following conditions are true:
1. A is a constant matrix (time-invariant)
2. A is a diagonal matrix
3. If ${\displaystyle A={\bar {A}}f(t)}$, where ${\displaystyle {\bar {A}}}$ is a constant matrix, and f(t) is a scalar-valued function (not a matrix).
If none of the above conditions are true, then you must use method 3.
Method 3
If A(t) can be decomposed as the following sum:
${\displaystyle A(t)=\sum _{i=1}^{n}M_{i}f_{i}(t)}$
Where Mi is a constant matrix such that MiMj = MjMi, and fi is a scalar-valued function. If A(t) can be decomposed in this way, then the state-transition matrix can be given as:
${\displaystyle \phi (t,\tau )=\prod _{i=1}^{n}e^{M_{i}\int _{\tau }^{t}f_{i}(\theta )d\theta }}$

It will be left as an exercise for the reader to prove that if A(t) is time-invariant, that the equation in method 2 above will reduce to the state-transition matrix ${\displaystyle e^{A(t-\tau )}}$.

### Example: Using Method 3

Use method 3, above, to compute the state-transition matrix for the system if the system matrix A is given by:

${\displaystyle A={\begin{bmatrix}t&1\\-1&t\end{bmatrix}}}$

We can decompose this matrix as follows:

${\displaystyle A={\begin{bmatrix}1&0\\0&1\end{bmatrix}}t+{\begin{bmatrix}0&1\\-1&0\end{bmatrix}}}$

Where f1(t) = t, and f2(t) = 1. Using the formula described above gives us:

${\displaystyle \phi (t,\tau )=e^{M_{1}\int _{\tau }^{t}\theta d\theta }e^{M_{2}\int _{\tau }^{t}d\theta }}$

Solving the two integrations gives us:

${\displaystyle \phi (t,\tau )=e^{{\frac {1}{2}}{\begin{bmatrix}(t^{2}-\tau ^{2})&0\\0&(t^{2}-\tau ^{2})\end{bmatrix}}}e^{\begin{bmatrix}0&t-\tau \\-t+\tau &0\end{bmatrix}}}$

The first term is a diagonal matrix, and the solution to that matrix function is all the individual elements of the matrix raised as an exponent of e. The second term can be decomposed as:

${\displaystyle e^{\begin{bmatrix}0&t-\tau \\-t+\tau &0\end{bmatrix}}=e^{{\begin{bmatrix}0&1\\-1&0\end{bmatrix}}(t-\tau )}={\begin{bmatrix}\cos(t-\tau )&\sin(t-\tau )\\-\sin(t-\tau )&\cos(t-\tau )\end{bmatrix}}}$

The final solution is given as:

${\displaystyle \phi (t,\tau )=}$${\displaystyle {\begin{bmatrix}e^{{\frac {1}{2}}(t^{2}-\tau ^{2})}&0\\0&e^{{\frac {1}{2}}(t^{2}-\tau ^{2})}\end{bmatrix}}{\begin{bmatrix}\cos(t-\tau )&\sin(t-\tau )\\-\sin(t-\tau )&\cos(t-\tau )\end{bmatrix}}}$${\displaystyle ={\begin{bmatrix}e^{{\frac {1}{2}}(t^{2}-\tau ^{2})}\cos(t-\tau )&e^{{\frac {1}{2}}(t^{2}-\tau ^{2})}\sin(t-\tau )\\-e^{{\frac {1}{2}}(t^{2}-\tau ^{2})}\sin(t-\tau )&e^{{\frac {1}{2}}(t^{2}-\tau ^{2})}\cos(t-\tau )\end{bmatrix}}}$

## Time-Variant, Non-zero Input

If the input to the system is not zero, it turns out that all the analysis that we performed above still holds. We can still construct the fundamental matrix, and we can still represent the system solution in terms of the state transition matrix ${\displaystyle \phi }$.

We can show that the general solution to the state-space equations is actually the solution:

${\displaystyle x(t)=\phi (t,t_{0})x(t_{0})+\int _{t_{0}}^{t}\phi (t,\tau )B(\tau )u(\tau )d\tau }$

# Eigenvalues and Eigenvectors

## Eigenvalues and Eigenvectors

Eigenvalues and Eigenvectors cannot be calculated from time-variant matrices. If the system is time-variant, the methods described in this chapter will not produce valid results.

The eigenvalues and eigenvectors of the system matrix play a key role in determining the response of the system. It is important to note that only square matrices have eigenvalues and eigenvectors associated with them. Non-square matrices cannot be analyzed using the methods below.

The word "eigen" is from the Dutch for "characteristic", and so this chapter could also be called "Characteristic values and characteristic vectors". The terms "Eigenvalues" and "Eigenvectors" are most commonly used. Eigenvalues and Eigenvectors have a number of properties that make them valuable tools in analysis, and they also have a number of valuable relationships with the matrix from which they are derived. Computing the eigenvalues and the eigenvectors of the system matrix is one of the most important things that should be done when beginning to analyze a system matrix, second only to calculating the matrix exponential of the system matrix.

The eigenvalues and eigenvectors of the system determine the relationship between the individual system state variables (the members of the x vector), the response of the system to inputs, and the stability of the system. Also, the eigenvalues and eigenvectors can be used to calculate the matrix exponential of the system matrix (through spectral decomposition). The remainder of this chapter will discuss eigenvalues and eigenvectors, and the ways that they affect their respective systems.

## Characteristic Equation

The characteristic equation of the system matrix A is given as:

[Matrix Characteristic Equation]

${\displaystyle Av=\lambda v}$

Where λ are scalar values called the eigenvalues, and v are the corresponding eigenvectors. To solve for the eigenvalues of a matrix, we can take the following determinant:

${\displaystyle |A-\lambda I|=0}$

To solve for the eigenvectors, we can then add an additional term, and solve for v:

${\displaystyle (A-\lambda I)v=0}$

Another value worth finding are the left eigenvectors of a system, defined as w in the modified characteristic equation:

[Left-Eigenvector Equation]

${\displaystyle wA=\lambda w}$

### Diagonalization

Note:
The transition matrix T should not be confused with the sampling time of a discrete system. If needed, we will use subscripts to differentiate between the two.

If the matrix A has a complete set of distinct eigenvalues, the matrix can be diagonalized. A diagonal matrix is a matrix that only has entries on the diagonal, and all the rest of the entries in the matrix are zero. We can define a transformation matrix, T, that satisfies the diagonalization transformation:

${\displaystyle A=TDT^{-1}}$

Which in turn will satisfy the relationship:

${\displaystyle e^{At}=Te^{Dt}T^{-1}}$

The right-hand side of the equation may look more complicated, but because D is a diagonal matrix here (not to be confused with the feed-forward matrix from the output equation), the calculations are much easier.

We can define the transition matrix, and the inverse transition matrix in terms of the eigenvectors and the left eigenvectors:

${\displaystyle T={\begin{bmatrix}v_{1}&v_{2}&v_{3}&\cdots &v_{n}\end{bmatrix}}}$
${\displaystyle T^{-1}={\begin{bmatrix}w_{1}'\\w_{2}'\\w_{3}'\\\vdots \\w_{n}'\end{bmatrix}}}$

We will further discuss the concept of diagonalization later in this chapter.

## Exponential Matrix Decomposition

Spectral Decomposition

A matrix exponential can be decomposed into a sum of the eigenvectors, eigenvalues, and left eigenvectors, as follows:

${\displaystyle e^{At}=\sum _{i=1}^{n}e^{\lambda _{i}t}v_{i}w_{i}'}$

Notice that this equation only holds in this form if the matrix A has a complete set of n distinct eigenvalues. Since w'i is a row vector, and x(0) is a column vector of the initial system states, we can combine those two into a scalar coefficient α:

${\displaystyle e^{At}x(t_{0})=\sum _{i=1}^{n}\alpha _{i}e^{\lambda _{i}t}v_{i}}$

Since the state transition matrix determines how the system responds to an input, we can see that the system eigenvalues and eigenvectors are a key part of the system response. Let us plug this decomposition into the general solution to the state equation:

[State Equation Spectral Decomposition]

${\displaystyle x(t)=\sum _{i=1}^{n}\alpha _{i}e^{\lambda _{i}t}v_{i}+\sum _{i=1}^{n}\int _{0}^{t}e^{\lambda _{i}(t-\tau )}v_{i}w_{i}'Bu(\tau )d\tau }$

### State Relationship

As we can see from the above equation, the individual elements of the state vector x(t) cannot take arbitrary values, but they are instead related by weighted sums of multiples of the systems right-eigenvectors.

### Decoupling

For people who are familiar with linear algebra, the left-eigenvector of the matrix A must be in the null space of the matrix B to decouple the system.

If a system can be designed such that the following relationship holds true:

${\displaystyle w_{i}'B=0}$

then the system response from that particular eigenvalue will not be affected by the system input u, and we say that the system has been decoupled. Such a thing is difficult to do in practice.

### Condition Number

With every matrix there is associated a particular number called the condition number of that matrix. The condition number tells a number of things about a matrix, and it is worth calculating. The condition number, k, is defined as:

[Condition Number]

${\displaystyle k={\frac {\|w_{i}\|\|v_{i}\|}{|w_{i}'v_{i}|}}}$

Systems with smaller condition numbers are better, for a number of reasons:

1. Large condition numbers lead to a large transient response of the system
2. Large condition numbers make the system eigenvalues more sensitive to changes in the system.

We will discuss the issue of eigenvalue sensitivity more in a later section.

### Stability

We will talk about stability at length in later chapters, but is a good time to point out a simple fact concerning the eigenvalues of the system. Notice that if the eigenvalues of the system matrix A are positive, or (if they are complex) that they have positive real parts, that the system state (and therefore the system output, scaled by the C matrix) will approach infinity as time t approaches infinity. In essence, if the eigenvalues are positive, the system will not satisfy the condition of BIBO stability, and will therefore become unstable.

Another factor that is worth mentioning is that a manufactured system never exactly matches the system model, and there will always been inaccuracies in the specifications of the component parts used, within a certain tolerance. As such, the system matrix will be slightly different from the mathematical model of the system (although good systems will not be severely different), and therefore the eigenvalues and eigenvectors of the system will not be the same values as those derived from the model. These facts give rise to several results:

1. Systems with high condition numbers may have eigenvalues that differ by a large amount from those derived from the mathematical model. This means that the system response of the physical system may be very different from the intended response of the model.
2. Systems with high condition numbers may become unstable simply as a result of inaccuracies in the component parts used in the manufacturing process.

For those reasons, the system eigenvalues and the condition number of the system matrix are highly important variables to consider when analyzing and designing a system. We will discuss the topic of stability in more detail in later chapters.

## Non-Unique Eigenvalues

The decomposition above only works if the matrix A has a full set of n distinct eigenvalues (and corresponding eigenvectors). If A does not have n distinct eigenvectors, then a set of generalized eigenvectors need to be determined. The generalized eigenvectors will produce a similar matrix that is in Jordan canonical form, not the diagonal form we were using earlier.

### Generalized Eigenvectors

Generalized eigenvectors can be generated using the following equation:

[Generalized Eigenvector Generating Equation]

${\displaystyle (A-\lambda I)v_{n+1}=v_{n}}$

if d is the number of times that a given eigenvalue is repeated, and p is the number of unique eigenvectors derived from those eigenvalues, then there will be q = d - p generalized eigenvectors. Generalized eigenvectors are developed by plugging in the regular eigenvectors into the equation above (vn). Some regular eigenvectors might not produce any non-trivial generalized eigenvectors. Generalized eigenvectors may also be plugged into the equation above to produce additional generalized eigenvectors. It is important to note that the generalized eigenvectors form an ordered series, and they must be kept in order during analysis or the results will not be correct.

### Example: One Repeated Set

We have a 5 × 5 matrix A with eigenvalues ${\displaystyle \lambda =1,1,1,2,2}$. For ${\displaystyle \lambda =1}$, there is 1 distinct eigenvector a. For ${\displaystyle \lambda =2}$ there is 1 distinct eigenvector b. From a, we generate the generalized eigenvector c, and from c we can generate vector d. From the eigevector b, we generate the generalized eigevector e. In order our eigenvectors are listed as:

[a c d b e]

Notice how c and d are listed in order after the eigenvector that they are generated from, a. Also, we could reorder this as:

[b e a c d]

because the generalized eigenvectors are listed in order after the regular eigenvector that they are generated from. Regular eigenvectors can be listed in any order.

### Example: Two Repeated Sets

We have a 4 × 4 matrix A with eigenvalues ${\displaystyle \lambda =1,1,1,2}$. For ${\displaystyle \lambda =1}$ we have two eigevectors, a and b. For ${\displaystyle \lambda =2}$ we have an eigenvector c.

We need to generate a fourth eigenvector, d. The only eigenvalue that needs another eigenvector is ${\displaystyle \lambda =1}$, however there are already two eigevectors associated with that eigenvalue, and only one of them will generate a non-trivial generalized eigenvector. To figure out which one works, we need to plug both vectors into the generating equation:

${\displaystyle (A-\lambda I){\big |}_{\lambda =1}d=a}$
${\displaystyle (A-\lambda I){\big |}_{\lambda =1}d=b}$

If a generates the correct vector d, we will order our eigenvectors as:

[a d b c]

but if b generates the correct vector, we can order it as:

[a b d c]

### Jordan Canonical Form

Matrix Forms

If a matrix has a complete set of distinct eigenvectors, the transition matrix T can be defined as the matrix of those eigenvectors, and the resultant transformed matrix will be a diagonal matrix. However, if the eigenvectors are not unique, and there are a number of generalized eigenvectors associated with the matrix, the transition matrix T will consist of the ordered set of the regular eigenvectors and generalized eigenvectors. The regular eigenvectors that did not produce any generalized eigenvectors (if any) should be first in the order, followed by the eigenvectors that did produce generalized eigenvectors, and the generalized eigenvectors that they produced (in appropriate sequence).

Once the T matrix has been produced, the matrix can be transformed by it and it's inverse:

${\displaystyle A=T^{-1}JT}$

The J matrix will be a Jordan block matrix. The format of the Jordan block matrix will be as follows:

${\displaystyle J={\begin{bmatrix}D&0&\cdots &0\\0&J_{1}&\cdots &0\\\vdots &\vdots &\ddots &\vdots \\0&0&\cdots &J_{n}\end{bmatrix}}}$

Where D is the diagonal block produced by the regular eigenvectors that are not associated with generalized eigenvectors (if any). The Jn blocks are standard Jordan blocks with a size corresponding to the number of eigenvectors/generalized eigenvectors in each sequence. In each Jn block, the eigenvalue associated with the regular eigenvector of the sequence is on the main diagonal, and there are 1's in the sub-diagonal.

## Equivalence Transformations

If we have a non-singular n × n matrix P, we can define a transformed vector "x bar" as:

${\displaystyle {\bar {x}}=Px}$

We can transform the entire state-space equation set as follows:

${\displaystyle {\bar {x}}'(t)={\bar {A}}{\bar {x}}(t)+{\bar {B}}u(t)}$
${\displaystyle {\bar {y}}(t)={\bar {C}}{\bar {x}}(t)+{\bar {D}}u(t)}$

Where:

 ${\displaystyle {\bar {A}}=PAP^{-1}}$ ${\displaystyle {\bar {B}}=PB}$ ${\displaystyle {\bar {C}}=CP^{-1}}$ ${\displaystyle {\bar {D}}=D}$

We call the matrix P the equivalence transformation between the two sets of equations.

It is important to note that the eigenvalues of the matrix A (which are of primary importance to the system) do not change under the equivalence transformation. The eigenvectors of A, and the eigenvectors of ${\displaystyle {\bar {A}}}$ are related by the matrix P.

### Lyapunov Transformations

The transformation matrix P is called a Lyapunov Transformation if the following conditions hold:

• P(t) is nonsingular.
• P(t) and P'(t) are continuous
• P(t) and the inverse transformation matrix P-1(t) are finite for all t.

If a system is time-variant, it can frequently be useful to use a Lyapunov transformation to convert the system to an equivalent system with a constant A matrix. This is not always possible in general, however it is possible if the A(t) matrix is periodic.

### System Diagonalization

If the A matrix is time-invariant, we can construct the matrix V from the eigenvectors of A. The V matrix can be used to transform the A matrix to a diagonal matrix. Our new system becomes:

${\displaystyle Vx'(t)=VAV^{-1}Vx(t)+VBu(t)}$
${\displaystyle y(t)=CV^{-1}Vx(t)+Du(t)}$

Since our system matrix is now diagonal (or Jordan canonical), the calculation of the state-transition matrix is simplified:

${\displaystyle e^{VAV^{-1}}=\Lambda }$

Where Λ is a diagonal matrix.

### MATLAB Transformations

The MATLAB function ss2ss can be used to apply an equivalence transformation to a system. If we have a set of matrices A, B, C and D, we can create equivalent matrices as such:

[Ap, Bp, Cp, Dp] = ss2ss(A, B, C, D, p);


Where p is the equivalence transformation matrix.

# MIMO Systems

## Multi-Input, Multi-Output

Systems with more than one input and/or more than one output are known as Multi-Input Multi-Output systems, or they are frequently known by the abbreviation MIMO. This is in contrast to systems that have only a single input and a single output (SISO), like we have been discussing previously.

## State-Space Representation

See the Formatting Section in the introduction if the notation in this page is confusing.

MIMO systems that are lumped and linear can be described easily with state-space equations. To represent multiple inputs we expand the input u(t) into a vector U(t) with the desired number of inputs. Likewise, to represent a system with multiple outputs, we expand y(t) into Y(t), which is a vector of all the outputs. For this method to work, the outputs must be linearly dependent on the input vector and the state vector.

${\displaystyle X'(t)=AX(t)+BU(t)}$
${\displaystyle Y(t)=CX(t)+DU(t)}$

### Example: Two Inputs and Two Outputs

Let's say that we have two outputs, y1 and y2, and two inputs, u1 and u2. These are related in our system through the following system of differential equations:

${\displaystyle y_{1}''+a_{1}y_{1}'+a_{0}(y_{1}+y_{2})=u_{1}(t)}$
${\displaystyle y_{2}'+a_{2}(y_{2}-y_{1})=u_{2}(t)}$

now, we can assign our state variables as such, and produce our first-order differential equations:

${\displaystyle x_{1}=y_{1}}$
${\displaystyle x_{4}=y_{2}}$
${\displaystyle x_{1}'=y_{1}'=x_{2}}$
${\displaystyle x_{2}'=-a_{1}x_{2}-a_{0}(x_{1}+x_{4})+u_{1}(t)}$
${\displaystyle x_{4}'=-a_{2}(x_{4}-x_{1})+u_{2}(t)}$

And finally we can assemble our state space equations:

${\displaystyle x'={\begin{bmatrix}0&1&0&0\\-a_{0}&-a_{1}&0&-a_{0}\\0&0&0&1\\a_{2}&0&0&-a_{2}\end{bmatrix}}x+{\begin{bmatrix}0&0\\1&0\\0&0\\0&1\end{bmatrix}}{\begin{bmatrix}u_{1}\\u_{2}\end{bmatrix}}}$
${\displaystyle {\begin{bmatrix}y_{1}\\y_{2}\end{bmatrix}}={\begin{bmatrix}1&0&0&0\\0&0&0&1\end{bmatrix}}x(t)}$

## Transfer Function Matrix

If the system is LTI and Lumped, we can take the Laplace Transform of the state-space equations, as follows:

${\displaystyle {\mathcal {L}}[X'(t)]={\mathcal {L}}[AX(t)]+{\mathcal {L}}[BU(t)]}$
${\displaystyle {\mathcal {L}}[Y(t)]={\mathcal {L}}[CX(t)]+{\mathcal {L}}[DU(t)]}$

Which gives us the result:

${\displaystyle s{\mathbf {X} }(s)-X(0)=A{\mathbf {X} }(s)+B{\mathbf {U} }(s)}$
${\displaystyle {\mathbf {Y} }(s)=C{\mathbf {X} }(s)+D{\mathbf {U} }(s)}$

Where X(0) is the initial conditions of the system state vector in the time domain. If the system is relaxed, we can ignore this term, but for completeness we will continue the derivation with it.

We can separate out the variables in the state equation as follows:

${\displaystyle s{\mathbf {X} }(s)-A{\mathbf {X} }(s)=X(0)+B{\mathbf {U} }(s)}$

Then factor out an X(s):

${\displaystyle {\mathbf {[} }sI-A]{X}(s)=X(0)+B{\mathbf {U} }(s)}$

And then we can multiply both sides by the inverse of [sI - A] to give us our state equation:

${\displaystyle {\mathbf {X} }(s)=[sI-A]^{-1}X(0)+[sI-A]^{-1}B{\mathbf {U} }(s)}$

Now, if we plug in this value for X(s) into our output equation, above, we get a more complicated equation:

${\displaystyle {\mathbf {Y} }(s)=C([sI-A]^{-1}X(0)+[sI-A]^{-1}B{\mathbf {U} }(s))+D{\mathbf {U} }(s)}$

And we can distribute the matrix C to give us our answer:

${\displaystyle {\mathbf {Y} }(s)=C[sI-A]^{-1}X(0)+C[sI-A]^{-1}B{\mathbf {U} }(s)+D{\mathbf {U} }(s)}$

Now, if the system is relaxed, and therefore X(0) is 0, the first term of this equation becomes 0. In this case, we can factor out a U(s) from the remaining two terms:

${\displaystyle {\mathbf {Y} }(s)=(C[sI-A]^{-1}B+D){\mathbf {U} }(s)}$

We can make the following substitution to obtain the Transfer Function Matrix, or more simply, the Transfer Matrix, H(s):

[Transfer Matrix]

${\displaystyle C[sI-A]^{-1}B+D={\mathbf {H} }(s)}$

And rewrite our output equation in terms of the transfer matrix as follows:

[Transfer Matrix Description]

${\displaystyle {\mathbf {Y} }(s)={\mathbf {H} }(s){\mathbf {U} }(s)}$

If Y(s) and X(s) are 1 × 1 vectors (a SISO system), then we have our external description:

${\displaystyle Y(s)=H(s)X(s)}$

Now, since X(s) = X(s), and Y(s) = Y(s), then H(s) must be equal to H(s). These are simply two different ways to describe the same exact equation, the same exact system.

### Dimensions

If our system has q inputs, and r outputs, our transfer function matrix will be an r × q matrix.

### Relation to Transfer Function

For SISO systems, the Transfer Function matrix will reduce to the transfer function as would be obtained by taking the Laplace transform of the system response equation.

For MIMO systems, with n inputs and m outputs, the transfer function matrix will contain n × m transfer functions, where each entry is the transfer function relationship between each individual input, and each individual output.

Through this derivation of the transfer function matrix, we have shown the equivalency between the Laplace methods and the State-Space method for representing systems. Also, we have shown how the Laplace method can be generalized to account for MIMO systems. Through the rest of this explanation, we will use the Laplace and State Space methods interchangeably, opting to use one or the other where appropriate.

### Zero-State and Zero-Input

If we have our complete system response equation from above:

${\displaystyle {\mathbf {Y} }(s)=C[sI-A]^{-1}{\mathbf {x} }(0)+(C[sI-A]^{-1}B+D){\mathbf {U} }(s)}$

We can separate this into two separate parts:

• ${\displaystyle C[sI-A]^{-1}X(0)}$ The Zero-Input Response.
• ${\displaystyle (C[sI-A]^{-1}B+D){\mathbf {U} }(s)}$ The Zero-State Response.

These are named because if there is no input to the system (zero-input), then the output is the response of the system to the initial system state. If there is no state to the system, then the output is the response of the system to the system input. The complete response is the sum of the system with no input, and the input with no state.

## Discrete MIMO Systems

In the discrete case, we end up with similar equations, except that the X(0) initial conditions term is preceeded by an additional z variable:

${\displaystyle {\mathbf {X} }(z)=[zI-A]^{-1}zX(0)+[zI-A]^{-1}B{\mathbf {U} }(z)}$
${\displaystyle {\mathbf {Y} }(z)=C[zI-A]^{-1}zX(0)+C[zI-A]^{-1}B{\mathbf {U} }(z)+D{\mathbf {U} }(z)}$

If X(0) is zero, that term drops out, and we can derive a Transfer Function Matrix in the Z domain as well:

${\displaystyle {\mathbf {Y} }(z)=(C[zI-A]^{-1}B+D){\mathbf {U} }(z)}$

[Transfer Matrix]

${\displaystyle C[zI-A]^{-1}B+D={\mathbf {H} }(z)}$

[Transfer Matrix Description]

${\displaystyle {\mathbf {Y} }(z)={\mathbf {H} }(z){\mathbf {U} }(z)}$

### Example: Pulse Response

For digital systems, it is frequently a good idea to write the pulse response equation, from the state-space equations:

${\displaystyle x[k+1]=Ax[k]+Bu[k]}$
${\displaystyle y[k]=Cx[k]+Du[k]}$

We can combine these two equations into a single difference equation using the coefficient matrices A, B, C, and D. To do this, we find the ratio of the system output vector, Y[n], to the system input vector, U[n]:

${\displaystyle {\frac {Y(z)}{U(z)}}=H(z)=C(zI-A)^{-1}B+D}$

So the system response to a digital system can be derived from the pulse response equation by:

${\displaystyle Y(z)=H(z)U(z)}$

And we can set U(z) to a step input through the following Z transform:

${\displaystyle u(t)\Leftrightarrow U(z)={\frac {z}{z-1}}}$

Plugging this into our pulse response we get our step response:

${\displaystyle Y(z)=(C(zI-A)^{-1}B+D)\left({\frac {z}{z-1}}\right)}$
${\displaystyle {\mathbf {Y} }(z)={\mathbf {H} }(z)\left({\frac {z}{z-1}}\right)}$

# System Realization

## Realization

Realization is the process of taking a mathematical model of a system (either in the Laplace domain or the State-Space domain), and creating a physical system. Some systems are not realizable.

An important point to keep in mind is that the Laplace domain representation, and the state-space representations are equivalent, and both representations describe the same physical systems. We want, therefore, a way to convert between the two representations, because each one is well suited for particular methods of analysis.

The state-space representation, for instance, is preferable when it comes time to move the system design from the drawing board to a constructed physical device. For that reason, we call the process of converting a system from the Laplace representation to the state-space representation "realization".

## Realization Conditions

Note:
Discrete systems G(z) are also realizable if these conditions are satisfied.
• A transfer function G(s) is realizable if and only if the system can be described by a finite-dimensional state-space equation.
• (A B C D), an ordered set of the four system matrices, is called a realization of the system G(s). If the system can be expressed as such an ordered quadruple, the system is realizable.
• A system G is realizable if and only if the transfer matrix G(s) is a proper rational matrix. In other words, every entry in the matrix G(s) (only 1 for SISO systems) is a rational polynomial, and if the degree of the denominator is higher or equal to the degree of the numerator.

We've already covered the method for realizing a SISO system, the remainder of this chapter will talk about the general method of realizing a MIMO system.

## Realizing the Transfer Matrix

We can decompose a transfer matrix G(s) into a strictly proper transfer matrix:

${\displaystyle {\mathbf {G} }(s)={\mathbf {G} }(\infty )+{\mathbf {G} }_{sp}(s)}$

Where Gsp(s) is a strictly proper transfer matrix. Also, we can use this to find the value of our D matrix:

${\displaystyle D={\mathbf {G} }(\infty )}$

We can define d(s) to be the lowest common denominator polynomial of all the entries in G(s):

Remember, q is the number of inputs, p is the number of internal system states, and r is the number of outputs.
${\displaystyle d(s)=s^{r}+a_{1}s^{r-1}+\cdots +a_{r-1}s+a_{r}}$

Then we can define Gsp as:

${\displaystyle {\mathbf {G} }_{sp}(s)={\frac {1}{d(s)}}N(s)}$

Where

${\displaystyle N(s)=N_{1}s^{r-1}+\cdots +N_{r-1}s+N_{r}}$

And the Ni are p × q constant matrices.

If we remember our method for converting a transfer function to a state-space equation, we can follow the same general method, except that the new matrix A will be a block matrix, where each block is the size of the transfer matrix:

${\displaystyle A={\begin{bmatrix}-a_{1}I_{p}&-a_{2}I_{p}&\cdots &-a_{r-1}I_{p}&-a_{r}I_{p}\\I_{p}&0&\cdots &0&0\\0&I_{p}&\cdots &0&0\\\vdots &\vdots &\ddots &\vdots &\vdots \\0&0&\cdots &I_{p}&0\end{bmatrix}}}$
${\displaystyle B={\begin{bmatrix}I_{p}\\0\\0\\\vdots \\0\end{bmatrix}}}$
${\displaystyle C={\begin{bmatrix}I_{p}&0&0&\cdots &0\end{bmatrix}}}$

System Representation

Systems can be represented graphically in a number of ways. Block diagrams and signal-flow diagrams are powerful tools that can be used to manipulate systems, and convert them easily into transfer functions or state-space equations. The chapters in this section will discuss how systems can be described visually, and will also discuss how systems can be interconnected with each other.

# Gain

## What is Gain?

Gain is a proportional value that shows the relationship between the magnitude of the input to the magnitude of the output signal at steady state. Many systems contain a method by which the gain can be altered, providing more or less "power" to the system. However, increasing gain or decreasing gain beyond a particular safety zone can cause the system to become unstable.

Consider the given second-order system:

${\displaystyle T(s)={\frac {1}{s^{2}+2s+1}}}$

We can include an arbitrary gain term, K in this system that will represent an amplification, or a power increase:

${\displaystyle T(s)=K{\frac {1}{s^{2}+2s+1}}}$

In a state-space system, the gain term k can be inserted as follows:

${\displaystyle x'(t)=Ax(t)+kBu(t)}$
${\displaystyle y(t)=Cx(t)+kDu(t)}$

The gain term can also be inserted into other places in the system, and in those cases the equations will be slightly different.

### Example: Gain

Here are some good examples of arbitrary gain values being used in physical systems:

Volume Knob
On your stereo there is a volume knob that controls the gain of your amplifier circuit. Higher levels of volume (turning the volume "up") corresponds to higher amplification of the sound signal.
Gas Pedal
The gas pedal in your car is an example of gain. Pressing harder on the gas pedal causes the engine to receive more gas, and causes the engine to output higher RPMs.
Brightness Buttons
Most computer monitors come with brightness buttons that control how bright the screen image is. More brightness causes more power to be outputed to the screen.

## Responses to Gain

As the gain to a system increases, generally the rise-time decreases, the percent overshoot increases, and the settling time increases. However, these relationships are not always the same. A critically damped system, for example, may decrease in rise time while not experiencing any effects of percent overshoot or settling time.

## Gain and Stability

If the gain increases to a high enough extent, some systems can become unstable. We will examine this effect in the chapter on Root Locus. But it will decrease the steady state error.

### Conditional Stability

Systems that are stable for some gain values, and unstable for other values are called conditionally stable systems. The stability is conditional upon the value of the gain, and often the threshold where the system becomes unstable is important to find.

# Block Diagrams

When designing or analyzing a system, often it is useful to model the system graphically. Block Diagrams are a useful and simple method for analyzing a system graphically. A "block" looks on paper exactly what it means:

## Systems in Series

When two or more systems are in series, they can be combined into a single representative system, with a transfer function that is the product of the individual systems.

If we have two systems, f(t) and g(t), we can put them in series with one another so that the output of system f(t) is the input to system g(t). Now, we can analyze them depending on whether we are using our classical or modern methods.

If we define the output of the first system as h(t), we can define h(t) as:

${\displaystyle h(t)=x(t)*f(t)}$

Now, we can define the system output y(t) in terms of h(t) as:

${\displaystyle y(t)=h(t)*g(t)}$

We can expand h(t):

${\displaystyle y(t)=[x(t)*f(t)]*g(t)}$

But, since convolution is associative, we can re-write this as:

${\displaystyle y(t)=x(t)*[f(t)*g(t)]}$

Our system can be simplified therefore as such:

### Series Transfer Functions

If two or more systems are in series with one another, the total transfer function of the series is the product of all the individual system transfer functions.

In the time-domain we know that:

${\displaystyle y(t)=x(t)*[f(t)*g(t)]}$

But, in the frequency domain we know that convolution becomes multiplication, so we can re-write this as:

${\displaystyle Y(s)=X(s)[F(s)G(s)]}$

We can represent our system in the frequency domain as:

### Series State Space

If we have two systems in series (say system F and system G), where the output of F is the input to system G, we can write out the state-space equations for each individual system.

System 1:

${\displaystyle x_{F}'=A_{F}x_{F}+B_{F}u}$
${\displaystyle y_{F}=C_{F}x_{F}+D_{F}u}$

System 2:

${\displaystyle x_{G}'=A_{G}x_{G}+B_{G}y_{F}}$
${\displaystyle y_{G}=C_{G}x_{G}+D_{G}y_{F}}$

And we can write substitute these equations together form the complete response of system H, that has input u, and output yG:

[Series state equation]

${\displaystyle {\begin{bmatrix}x_{G}'\\x_{F}'\end{bmatrix}}={\begin{bmatrix}A_{G}&B_{G}C_{F}\\0&A_{F}\end{bmatrix}}{\begin{bmatrix}x_{G}\\x_{F}\end{bmatrix}}+{\begin{bmatrix}B_{G}D_{F}\\B_{F}\end{bmatrix}}u}$

[Series output equation]

${\displaystyle {\begin{bmatrix}y_{G}\\y_{F}\end{bmatrix}}={\begin{bmatrix}C_{G}&D_{G}C_{F}\\0&C_{F}\end{bmatrix}}{\begin{bmatrix}x_{G}\\x_{F}\end{bmatrix}}+{\begin{bmatrix}D_{G}D_{F}\\D_{F}\end{bmatrix}}u}$

## Systems in Parallel

Blocks may not be placed in parallel without the use of an adder. Blocks connected by an adder as shown above have a total transfer function of:

${\displaystyle Y(s)=X(s)[F(s)+G(s)]}$

Since the Laplace transform is linear, we can easily transfer this to the time domain by converting the multiplication to convolution:

${\displaystyle y(t)=x(t)*[f(t)+g(t)]}$

## State Space Model

The state-space equations, with non-zero A, B, C, and D matrices conceptually model the following system:

In this image, the strange-looking block in the center is either an integrator or an ideal delay, and can be represented in the transfer domain as:

${\displaystyle {\frac {1}{s}}}$ or ${\displaystyle {\frac {1}{z}}}$

Depending on the time characteristics of the system. If we only consider continuous-time systems, we can replace the funny block in the center with an integrator:

### In the Laplace Domain

The state space model of the above system, if A, B, C, and D are transfer functions A(s), B(s), C(s) and D(s) of the individual subsystems, and if U(s) and Y(s) represent a single input and output, can be written as follows:

${\displaystyle {\frac {Y(s)}{U(s)}}=C(s)\left({\frac {1}{s-A(s)}}\right)B(s)+D(s)}$

We will explain how we got this result, and how we deal with feedforward and feedback loop structures in the next chapter.

Some systems may have dedicated summation or multiplication devices, that automatically add or multiply the transfer functions of multiple systems together

## Simplifying Block Diagrams

Block diagrams can be systematically simplified. Note that this table is from Schaum's Outline: Feedback and Controls Systems by DiStefano et al

Transformation Equation Block Diagram Equivalent Block Diagram
1 Cascaded Blocks ${\displaystyle Y=\left(P_{1}P_{2}\right)X}$
2 Combining Blocks in Parallel ${\displaystyle Y=P_{1}X\pm P_{2}X}$
3 Removing a Block from a Forward Loop ${\displaystyle Y=P_{1}X\pm P_{2}X}$
4 Eliminating a Feedback Loop ${\displaystyle Y=P_{1}\left(X\mp P_{2}Y\right)}$
5 Removing a Block from a Feedback Loop ${\displaystyle Y=P_{1}\left(X\mp P_{2}Y\right)}$
6 Rearranging Summing Junctions ${\displaystyle Z=W\pm X\pm Y}$
7 Moving a Summing Junction in front of a Block ${\displaystyle Z=PX\pm Y}$
8 Moving a Summing Junction beyond a Block ${\displaystyle Z=P\left(X\pm Y\right)}$
9 Moving a Takeoff Point in front of a Block ${\displaystyle Y=PX\,}$
10 Moving a Takeoff Point beyond a Block ${\displaystyle Y=PX\,}$
11 Moving a Takeoff Point in front of a Summing Junction ${\displaystyle Z=W\pm X}$
12 Moving a Takeoff Point beyond a Summing Junction ${\displaystyle Z=X\pm Y}$