State Space Model

State space models are a type of mathematical model that is used to describe the behavior of dynamic systems. These models are used in many fields, including engineering, economics, and physics. State space models are based on the concept of a state vector, which is a set of variables that represent the internal state of a system. In a state space model, the state vector is used to describe how the system evolves over time. This is done using a set of differential equations, known as the state equations, which describe how the state vector changes as a function of time.

In addition to the state equations, a state space model also includes an output equation, which describes how the state vector is related to the output of the system. This allows the model to be used to predict the output of the system for a given set of inputs. Overall, state space models are a useful tool for modeling and analyzing dynamic systems. They provide a compact and flexible way to describe the behavior of a system, and can be used to design control systems.

State space models can be in either discrete or continuous time. Putting a model into state space form is the basis for many methods in theory and application. Below is the continuous time form of a model in state space form.

˙x=Ax+Bu˙x=Ax+Bu

y=Cx+Duy=Cx+Du

with states xRnxRn and state derivatives .x=dxdtRn.x=dxdtRn. The notation RnRn means that xx and .x.x are in the set of real-numbered vectors of length nn. The other elements are the outputs yRpyRp, the inputs uRmuRm, the state transition matrix AA, the input matrix BB, and the output matrix CC. The remaining matrix DD is typically zeros because the inputs do not typically affect the outputs directly. The dimensions of each matrix are shown below with mm inputs, nn states, and pp outputs.

ARnxnARnxn BRnxmBRnxm CRpxnCRpxn DRpxmDRpxm

First Order System in State Space

The state space form can be difficult to grasp at first so consider an example to transform a first order linear system into state space form.

dydt=y+2udydt=y+2u

Add the output relationship x=yx=y and .x=.y.x=.y to give the following in state space form.

˙x=[1]x+[2]u˙x=[1]x+[2]u

y=[1]x+[0]uy=[1]x+[0]u

Second Order System in State Space

A second order linear system has xR2xR2, yR1yR1, uR1uR1, AR2x2AR2x2, BR2x1BR2x1, CR1x2 and DR1x1. A second order overdamped system can be expressed as two first order linear systems in series.

dx1dt=x1+2u

dx2dt=x2+x1

y=x2

This gives the following in state space form.

[˙x1˙x2]=[1011][x1x2]+[20]u

y=[01][x1x2]+[0]u

Exercise

Put the following equations into state space form by determining matrices A, B, C, and D.

˙x=Ax+Bu y=Cx+Du

Simulate a step response for each model.

1. First order differential equation

3dxdt+12x=6u y=x

2. Second order differential equations

2dx1dt+6x1=8u 3dx2dt+6x1+9x2=0 y=x1+x22

3. Second order differential equation

4d2ydt2+2dydt+y=3u

Sure, I'll start by posing two questions based on the content provided and will then shuffle the responses for correctness using the template.


✅ Knowledge Check

1. Which of the following statements about state space models is true?

A. State space models are used to describe the behavior of static systems.
B. The state vector in a state space model is used to describe how the system evolves over time.
C. The output equation describes how the state vector changes as a function of time.
D. State space models cannot be used in engineering applications.

2. Consider the state space representation of the second order overdamped system. What can be said about the matrix D?

A. It represents the direct relationship between inputs and outputs.
B. It's a 2x2 matrix.
C. Matrix D is always non-zero for any state space model.
D. It is the output matrix.
Streaming Chatbot
💬