1.
State variable model for a dynamic system
This type of model consists of a set of simultaneous first-order differential equations, called the State equation:
![]()
and the output equation (relating o(t) to the state vector x):
.
Here we define:
x as the state vector,
A as the system matrix (square, N x N for N states),
B as the input matrix (N rows x 1 column for a single-input, single output (SISO) system,
C as the output matrix (one row x N columns for a SISO system),
D as the feedforward matrix (1 x 1 for a SISO system).
As shown in the Topic Overview for the course, you can obtain transfer functions in either the s- or the z- domain for a system from the state-variable model. For a SISO system, these transfer functions take the forms:
, and
.
where I is the identity matrix (remember that the elements of A,B, C, and D will not be the same for the continuous and the sampled models, and that in the sampled model they will depend on sampling frequency)
2.
Obtaining a state variable model
You can get a state variable model for a system in two ways: from detailed knowledge of the internal dynamics of the system, and from a transfer function (which might have been obtained by system identification or by other means not requiring knowledge of the internal dynamics).
2a. from the internal dynamics of the system: an example
Suppose we use an electromagnet coil to position permanent bar magnet of mass M attached to a wall through a spring of spring constant K. The coil has negligible inductance and a wire resistance of R. We drive this coil with an input voltage, v(t), as shown here:

Frictional forces in this system are represented by an effective coefficient of friction, W. The force on the bar magnet is proportional to the current in the coil with a constant of proportionality, a. Equating this magnetic force to the sum of inertial, frictional, and spring forces gives an equation of motion (in the s-domain) ,
![]()
and a transfer function from applied voltage to position ,
,
and a second-order differential equation,
.
For a second-order system, two states are required to model it. Choosing a set of states:

the system differential equation becomes
.
This equation, and another obvious one,
,
provide enough information to write the state equation,
,
and an output equation,
.
Important general property: the poles of the transfer function are the eigenvalues of the system matrix, A. Setting the denominator of the transfer function to zero gives
.
Finding the eigenvalues of A using the standard matrix method of setting
![]()
yields
,
the same result. This property can be shown to be true for all linear systems with state-variable models.
2b. From the transfer function of the system:
another example
Suppose you know the transfer function for a system (second-order in this example). This means you know the coefficients a and b in
.
This transfer function must be realistic for the following approach to work: you will see at the end of this discussion that you can derive a state and output equation that correspond to the correct transfer function from the following diagram:

The round nodes in this diagram have the simple function of adding all the inputs coming into them, and providing the resulting sum along all paths leaving them. The boxes with a transfer function 1/s are integrators. The output of each integrator corresponds to one state. The time-derivative of each state is the input to each integrator. From the diagram you get the state equation:
,
and the output equation,
.
It is left as a problem to show that the transfer function, calculated using the matrices from the state variable model using
![]()
is the same as the one at the beginning of this example. The extension to plants of order higher than 2 is straightforward.
3.
Pole placement using state feedback
Suppose you can measure all the states of a plant with sensors that provide signals corresponding to each. Such a sensor is called an observer. In the automatic control scheme called full state feedback, a weighted linear combination of all the states is fed back and subtracted from the command signal, r(t), as shown here:

To see how this controller works, just substitute the new input,
,
into the state equation. The result is a new state equation for the closed-loop system with the state feedback controller:
.
Clearly, the new state matrix for the closed-loop system is [A-BK], and its poles (eigenvalues) can be adjusted at will by the designer. The analytic method for this pole placement is called Ackermann’s Formula, and a computer implementation is available in the GSim Design from SS.vi. Unfortunately, just placing poles where you want them is usually insufficient to insure that the closed-loop system’s time- and frequency-domain responses are as you wish. Nevertheless, a state-variable analysis of a proposed controller is still a powerful alternative design tool.