# Chapter seven

State space methods

## Section one: STATE SPACE MODEL DEFINITIONS

This section focuses on an introduction to state space models and basic definitions, origins and equivalences.

### 1. Origins of the model

An introduction to the concept of taking first principles models for systems and converting them into state space form.

It explains the key assumption in a state space model is that one can write an equation for all the key dynamics in terms of their first order derivatives.

There are simple examples from first order engineering systems (mass-damper, resistor-capacitor, tank system).

A talk through video is on YouTube. Read the notes (PDF, 575KB).

### 2. Basic modelling

This section extends the concept of taking first principles models for systems and converting them into state space form.

It uses some second and third order examples (mass-spring-damper, RLC circuit, dc servo and pendulum) to demonstrate the process of constructing a state-space equivalent.

It introduces the concept that state space descriptions for a given system are not unique, as they depend on the selection and ordering of states.

A talk through video is on YouTube. Read the notes (PDF, 661KB).

### 3. Equivalent models for a given ODE

In some cases, a system model is supplied solely as an ODE rather than separate first principles equations. This resource shows how an equivalent state space model can be derived from an ODE.

It is assumed that the results are given in canonical forms. Emphasis is made on the state space matrices not being unique as they depend on the selection and ordering of states.

A talk through video is on YouTube. Read the notes (PDF, 302KB).

### 4. Defining the system output

State space models have numerous states but the user may only be interested in a subset of these. The selected states are denoted as outputs; outputs are only those states you want to measure.

This resource shows how the extraction of outputs from a state space model leads to another matrix definition or set of equations which are therefore part of the state space model.

A talk through video is on YouTube. Read the notes (PDF, 387KB).

### 5. Equivalent transfer functions

It is useful to understand the relationship between state space models and transfer function models. This resource shows how one can form an equivalent transfer function model from a state space model.

Several numerical examples are given but it is emphasised that the process is numerically intensive and in general should be performed on a computer and not by hand. Tools like MATLAB are demonstrated.

It is also noted that the system poles correspond to the eigenvalues of the A matrix.

A talk through video is on YouTube. Read the notes (PDF, 657KB).

### 6. Equivalent models for a given transfer function

This resource shows how one can form a state space model from a transfer function. The process is analogous to that used for ODEs but with the extra subtlety of allowing more complex numerators than a constant.

The resource gives the controllable canonical form only as this can be constructed by inspection from the transfer function parameters.

A talk through video is on YouTube. Read the notes (PDF, 413KB).

### 7. Diagonal canonical form

Canonical forms can be useful for giving insight into behaviours and also for feedback design.

A common canonical form is the diagonal one. This resource shows how such a form can be derived from the partial fraction expansion of a transfer function, or an eigenvalue/vector decomposition of the state transformation matrix. There is a brief discussion of the differences that arise with repeated roots.

There is a typing error at 11 minutes 14 seconds where two residues are back to front.

A talk through video is on YouTube. Read the notes (PDF, 379KB).

### 8. Similarity transformations

State space models are not unique in that one can get models with equivalent input/output behaviour but very different state definitions. This resources introduces the concept of equivalence and shows how one can from state space models with a desirable structure.

Readers are reminded that changing the model structure and changing the states may mean there is no longer a physical interpretation for the model states. The resource also looks at transformation possible using an eigenvalue/vector decomposition, which exposes the underlying behaviours as being linked to the eigenvalues.

A talk through video is on YouTube. Read the notes (PDF, 456KB).

### 9. Use of MATLAB and numerical examples

This resource shows how MATLAB can be used for much of the numerical work associated to state space analysis and manipulation. It is rather tedious on pen and paper. Many useful built in functions are provided by MATLAB.

This resource demonstrates the basic state space object available in MATLAB and how this object can be used in a number of other built in functions for typical analysis such as poles, responses and transformations.

A talk through video is on YouTube. Read the notes (PDF, 1.2MB). MATLAB file with key commands.

### 10. Models form a difference equation

This resource introduces state space models for systems described by difference equations. Conversions from z-transform transfer function to state space and vice versa. It uses analogies with continuous time conversions.

A talk through video is on YouTube. Read the notes (PDF, 641KB).

### 11. Tutorial and worked examples

This resource goes through in real time the solution of questions on creation of state space models from ODEs and transfer functions. It also covers conversions back to transfer function from a state space model and use of a similarity transform.

A talk through video is on YouTube. Read the notes (PDF, 335KB).