制御工学ブログ

制御工学の研究者を20年やっている国立大学教員が制御工学の基礎から専門まで広く説明します。記事内では、動画やMATLABコードを交えながらわかりやすく解説する方針です。制御工学チャンネル(YouTube,動画ポータル)を運営しています。

State-Space Model for Control: Mathematical Modeling through State Equations

This article summarizes the state-space realization of system state equations. In control based on state equations, deriving a mathematical model is the first step. A video explaining state equation representation is placed at the bottom. Here, I will explain the formulas related to state equation representation, classify control systems, and discuss methods for deriving state-space representations (modeling and conversion from ordinary differential equations and transfer functions).

The overall picture of state feedback control is summarized in the following article.

Summary of State Feedback Control and Control Based on State Equations

State-Space Realization

Let’s explain the state equation representation of the system. State equation representation is an important model representation format for control objects in control engineering. Here, I will first explain the main symbols of the state equation.

Symbols of State Space Model

In the figure, t represents time and is used on the horizontal axis of the response graph. x is the state vector, u is the control input, and y is the control output.

In state equations, the state vector is used to express the dynamics of the system. n is the order of the system, which corresponds to the number of elements in the state vector. Additionally, A, B, and C are matrices and vectors, with A being an n-order square matrix.

B is an n-order column vector if there is one input, and it becomes a matrix if there are multiple inputs. C is an n-order row vector if there is one output, and it becomes a matrix if there are multiple outputs.

The state equation is expressed with the derivative of the state vector on the left and Ax+Bu on the right as follows:

Continuous-Time State Equation

The figure also shows an example with n = 3. In this case, the state has three elements, A is a 3×3 matrix (here, in controllable canonical form), and B and C are vectors. Since the state vector is a column vector, its derivative is also a column vector. (Below is an example for n = 3)

Derivative of x

While this article explains continuous-time state equations, there are also discrete-time state equations, which are expressed as follows:

Discrete-Time State Equation

Classification of State Equations (Time-Invariant, Time-Variant, Nonlinear)

Next, let’s discuss the classification of control systems in state equation representation.

A linear system is characterized by A, B, and C matrices as shown earlier. A linear time-invariant system refers to when A, B, and C are fixed matrices and vectors. On the other hand, a linear time-variant system refers to when A, B, and C are functions of time.

Generally, when we refer to linear systems, we mean linear time-invariant systems.

Next, a nonlinear system is generally written in the form shown in the lower part of the figure. Although the structure of linear systems is included, it is generally expressed in a different form from the upper system.

Classification of State Equations

There are also classifications within nonlinear systems. The form written as f(x) + g(x)u, which is affine in terms of u, is a form widely used in the field of nonlinear control. Other types include Hammerstein-type nonlinear systems.

Mathematical Modeling

Next, let’s consider modeling the control object using state equation representation. Generally, two methods are used to obtain a control object model. One is deriving a mathematical model based on physical laws. The other is obtaining a mathematical model using a combination of input u and output y data sequences. This is called system identification. These methods determine the matrices and vectors A, B, and C. 

Modeling of Controlled Objects (Plants)

State Equations and Ordinary Differential Equations

Next, I will explain the conversion of second-order ordinary differential equations to state equations.

When given such an ordinary differential equation, if z is defined as one of the states and the derivative of z as the second state, the state equation representation can be obtained in a form called the controllable canonical form, as shown in the figure.

However, if z is used as the output, C = [1 0]. If the derivative of z is desired as the output signal, C = [0 1].

Ordinary Differential Equations and State Equations

State Equations and Transfer Functions

Finally, I would like to introduce the case of converting transfer functions to state equations.
When given a transfer function, one approach is to decompose it into partial fractions and convert it to a state equation representation called diagonal canonical form.
By expanding it into partial fractions, the coefficients of 1/(s + a) and 1/(s + b) are obtained. These values are denoted as γ1 and γ2.

The matrices A, B, and C are obtained as shown in the figure. Here, a second-order example is shown, but it is possible to obtain a model as a state-space representation in the same way for higher dimensions.

Conversion from Transfer Function to State Equation

Details about partial fraction decomposition are explained in the following article.

blog.control-theory.com

Related Article

blog.control-theory.com

Video on State Equation Representation

The following video is related to state equation representation.

youtu.be

In this article, I discussed the state-space representation as one of the mathematical models. I explained the characteristics and classification of state-space representation and the derivation of state equations from ordinary differential equations and transfer functions.