(Control Engineering) : State Variables and State-Space Representation"

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

1 Control Engineering Lab Report

Hamdard Institute of Information Technology


Hamdard University
[CONTROL ENGINEERING]

Report
On State variables and
state-space representation
Fall-2012
Student name & ID:
Nasir Ali Shah
BECS/H/F10/0104
Lab Instructor name:
SYEDA NOOR-UL-AIN
2 Control Engineering Lab Report

Index Page
Part A:
1
State-Space Representation
2
State
3
State Variable
4
Analysis of Feedback System using state variable

Part B:
1
Obtaining the State-Space Equations

2 Obtaining Equation from Differential


Equation
3 Obtaining Equation from Transfer
Function
4
Matlab Representation
5
References
3 Control Engineering Lab Report

Part A
IntroductIon and defInItIon

State-Space Representation:
In control engineering, a state space representation is a
mathematical model of a physical system as a set of input, output and
state variables related by first-order differential equations. To abstract
from the number of inputs, outputs and states, the variables are
expressed as vectors. Additionally, if the dynamical system is linear and
time invariant, the differential and algebraic equations may be written
in matrix form. The state space representation (also known as the
"time-domain approach") provides a convenient and compact way to
model and analyze systems with multiple inputs and outputs.
With inputs and outputs, we would otherwise have to write
down Laplace transforms to encode all the information about a
system. Unlike the frequency domain approach, the use of the state
space representation is not limited to systems with linear components
and zero initial conditions. "State space" refers to the space whose axes
are the state variables. The state of the system can be represented as a
vector within that space.

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.
4 Control Engineering Lab Report

Because the state-space must be finite, a system can only be described


by state-space equations if the system is lumped.
This report 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:
5 Control Engineering Lab Report

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:

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

Where x' is the rate of change of the state variables.


6 Control Engineering Lab Report

Block diagram representation of the state space equations

The internal state variables are the smallest possible subset of


system variables that can represent the entire state of the system at any
given time. The minimum number of state variables required to
represent a given system, , is usually equal to the order of the system's
defining differential equation. If the system is represented in transfer
function form, the minimum number of state variables is equal to the
order of the transfer function's denominator after it has been reduced to a
proper fraction. It is important to understand that converting a state
space realization to a transfer function form may lose some internal
information about the system, and may provide a description of a system
which is stable, when the state-space realization is unstable at certain
points. In electric circuits, the number of state variables is often, though
not always, the same as the number of energy storage elements in the
circuit such as capacitors and inductors. The state variables defined must
be linearly independent; no state variable can be written as a linear
combination of the other state variables or the system will not be able to
be solved.

The most general state-space representation of a linear system


with inputs, outputs and state variables is written in the following
form:

where:
7 Control Engineering Lab Report

is called the "state vector", ;


is called the "output vector", ;
is called the "input (or control) vector", ;
is the "state (or system) matrix", ,
is the "input matrix", ,
is the "output matrix", ,
is the "feed through (or feed forward) matrix" (in cases where
the system model does not have a direct feedthrough, is the
zero matrix), ,

In this general formulation, all matrices are allowed to be time-variant


(i.e. their elements can depend on time); however, in the
common LTI case, matrices will be time invariant. The time
variable can be continuous (e.g. ) or discrete (e.g. ). In the
latter case, the time variable is usually used instead of . Hybrid
systems allow for time domains that have both continuous and discrete
parts. Depending on the assumptions taken, the state-space model
representation can assume the following forms:

System type State-space model


Continuous time-invariant

Continuous time-variant

Explicit discrete time-invariant

Explicit discrete time-variant

Laplace domain of
continuous time-invariant
8 Control Engineering Lab Report

Z-domain of
discrete time-invariant

Analysis of Feedback System using State variables:

Typical state space model with feedback

A common method for feedback is to multiply the output by a


matrix K and setting this as the input to the system: . Since
the values of K are unrestricted the values can easily be negated
for negative feedback. The presence of a negative sign (the common
notation) is merely a notational one and its absence has no impact on the
end results.

becomes

solving the output equation for and substituting in the state equation
results in
9 Control Engineering Lab Report

The advantage of this is that the eigenvalues of A can be controlled by


setting K appropriately through eigendecomposition of

This assumes that the closed-loop system is controllable or that


the unstable eigenvalues of A can be made stable through appropriate
choice of K.

Example:

For a strictly proper system D equals zero. Another fairly common


situation is when all states are outputs, i.e. y = x, which yields C = I,
the Identity matrix. This would then result in the simpler equations

This reduces the necessary eigendecomposition to just .

Part B
10 Control Engineering Lab Report

Obtaining the State-Space Equations


From Differential Equations:

Let's we have a general 3rd order differential equation in terms of


input u(t) and output y(t):

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

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

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:

And with that, we can assemble the state-space equations for the system:
11 Control Engineering Lab Report

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. In general, let we have a transfer function of
the form:

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


12 Control Engineering Lab Report

This form of the equations is known as the controllable canonical


form of the system matrices

MATLAB Representation:

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);
13 Control Engineering Lab Report

References

en.wikipedia.org
www.mathworks.com
Linear Control System Analysis and Design by John J. D. Azzo
Automatic Control System by Benjamin C. Kuo and Farid
Golnaraghi
www.about.com

You might also like