这是用户在 2024-11-2 12:07 为 https://app.immersivetranslate.com/pdf-pro/5c883c52-4abb-406a-b2f5-5fc6de479474 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?

AERO 401: UAV Modeling and Control Course
AERO 401:无人机建模与控制课程

Tutorial Exercise 教程练习

Dr. Yahya H Zweiri 耶哈亚·H·兹韦里博士Department of Aerospace Engineering-Khalifa University, Center for Autonomous Robotic Systems (KUCARS), Khalifa
航空航天工程系-哈利法大学,自动化机器人系统中心(KUCARS),哈利法
University of Science and Technology
科学技术大学
2024

This exercise composes of three tutorial sessions, and should be run in MATLAB 2019 or later versions. The exercise makes use of the MATLAB Control Toolbox. The exercise must be written-up and uploaded to the Blackboard by designated dates written below. Late reports will not be marked and will receive zero marks. Remember to include your name and the date on your front page. Do not describe method or procedure. Do not reproduce or explain any MATLAB code in your answers, but use theory to support comments and explain results where appropriate. Keep your answers reasonably brief and succinct.
本练习由三个教程环节组成,需在 MATLAB 2019 或更高版本中运行。该练习使用 MATLAB 控制工具箱。练习必须在下面指定的日期之前撰写并上传到 Blackboard。迟交的报告将不予评分,得分为零。请记得在首页上写上你的名字和日期。请勿描述方法或程序。请勿在答案中复制或解释任何 MATLAB 代码,但应使用理论支持评论,并在适当的地方解释结果。请保持答案简洁明了。

Introduction 介绍

The procedure of designing controllers for unmanned aerial systems can be broken down into the following stages:
设计无人机系统控制器的过程可以分为以下几个阶段:

i) Study system to be controlled - choose sensors and actuators
i) 研究要控制的系统 - 选择传感器和执行器

ii) Model resulting system to be controlled
ii) 建模要控制的系统

iii) Linearize model. Simplify model if necessary
iii) 线性化模型。如有必要,简化模型。

iv) Analyze the resulting model, determine its properties
iv) 分析生成的模型,确定其属性

v) Decide on performance specifications, decide on type of controller to be used
v) 决定性能规格,决定使用的控制器类型

vi) Design controller to meet specifications
设计控制器以满足规格要求

vii) Test controllers by simulation with full non-linear model of the plant
通过全非线性模型对测试控制器进行仿真

viii) Design hardware and software and implement controller
设计硬件和软件并实现控制器

ix) Tune controller on-line
在线调节控制器
The objective of the exercise is to use various techniques to analyse and design feedback controllers for a simple system, that is to perform stages (iv) and (vi) of the above procedure.
本次练习的目标是使用各种技术分析和设计简单系统的反馈控制器,即执行上述程序的第(iv)和第(vi)阶段。

You will design controllers for a quadrotor attitude dynamics which is modelled as a 3rd order system, G ( s ) G ( s ) G(s)G(s), of the form
您将为四旋翼姿态动力学设计控制器,该动力学被建模为一个三阶系统, G ( s ) G ( s ) G(s)G(s) ,形式为
G ( s ) = k s ( T 1 s + 1 ) ( T 2 s + 1 ) G ( s ) = k s T 1 s + 1 T 2 s + 1 G(s)=(k)/(s(T_(1)s+1)(T_(2)s+1))G(s)=\frac{k}{s\left(T_{1} s+1\right)\left(T_{2} s+1\right)}
where T 1 T 1 T_(1)T_{1} is the time constant of the propulsion system and T 2 T 2 T_(2)T_{2} is the time constant of the attitude channel caused by body dynamics and aerodynamics effects. The objective of the design is to obtain a feedback controller which achieves the performance specifications on the step response of percent overshoot M p 10 % M p 10 % M_(p) <= 10%M_{p} \leq 10 \% and peak time t p 0.5 t p 0.5 t_(p) <= 0.5t_{p} \leq 0.5 sec, with zero steady state error.
其中 T 1 T 1 T_(1)T_{1} 是推进系统的时间常数, T 2 T 2 T_(2)T_{2} 是由于机体动力学和空气动力学效应引起的姿态通道的时间常数。设计的目标是获得一个反馈控制器,使其在超调百分比 M p 10 % M p 10 % M_(p) <= 10%M_{p} \leq 10 \% 和峰值时间 t p 0.5 t p 0.5 t_(p) <= 0.5t_{p} \leq 0.5 秒的阶跃响应上达到性能规格,并且稳态误差为零。

After system modelling and linearization, the next stage in the control system design procedure is to perform some analysis of the system. In this exercise, the analysis consists of looking at the open loop poles and zeros, the open loop step response and the system Bode plot. By means of the root locus technique, and the Bode plot, some stability analysis on the system is also be performed to find out limiting values of controller gain.
在系统建模和线性化之后,控制系统设计过程的下一阶段是对系统进行一些分析。在这个过程中,分析包括查看开环极点和零点、开环阶跃响应以及系统的波德图。通过根轨迹技术和波德图,还将对系统进行一些稳定性分析,以找出控制器增益的限制值。
For the controller design stage of this exercise, proportional controllers are designed using the root-locus and Bode plots. In addition, both a P+D controller and a pole placement state feedback controller are designed.
在本练习的控制器设计阶段,使用根轨迹和波德图设计比例控制器。此外,还设计了一个 P+D 控制器和一个极点配置状态反馈控制器。

The next stage of the design procedure would be to test the controllers in simulation with the non-linear model of the plant (using, for example SIMULINK). This stage is not covered in this exercise. Additional elements could be incorporated at this stage, such as plant disturbances and sensor noise. Finally, the controller hardware/software would be designed and tested on the real plant.
设计过程的下一阶段是使用植物的非线性模型(例如使用 SIMULINK)在仿真中测试控制器。此阶段在本练习中未涵盖。此阶段还可以加入其他元素,例如植物干扰和传感器噪声。最后,将设计并测试控制器的硬件/软件在真实植物上。

Figure 1: Closed loop system with proportional controller
图 1:带比例控制器的闭环系统

1 Analysis of the plant (Tutorial 2, due date is 4th November)
植物分析(教程 2,截止日期为 11 月 4 日)

NOTE - ALL THE OTHER SECTIONS OF THIS LABORATORY DEPEND UPON THE COMPLETION AND RESULTS OF THIS SECTION.
注意 - 本实验室的所有其他部分都依赖于本部分的完成和结果。
Question 1.1 Using the second order system formulae, calculate the minimum damping ratio of the dominant poles for an overshoot of M p 10 % M p 10 % M_(p) <= 10%M_{p} \leq 10 \%.
问题 1.1 使用二阶系统公式,计算超调为 M p 10 % M p 10 % M_(p) <= 10%M_{p} \leq 10 \% 时主极点的最小阻尼比。
Question 1.2 Using the second order system formulae, calculate the minimum damped frequency, ω d = ω n 1 ζ 2 ω d = ω n 1 ζ 2 omega_(d)=omega_(n)sqrt(1-zeta^(2))\omega_{d}=\omega_{n} \sqrt{1-\zeta^{2}}, of the dominant poles for a peak time t p 0.5 sec t p 0.5 sec t_(p) <= 0.5sect_{p} \leq 0.5 \mathrm{sec}.
问题 1.2 使用二阶系统公式,计算主极点的最小阻尼频率 ω d = ω n 1 ζ 2 ω d = ω n 1 ζ 2 omega_(d)=omega_(n)sqrt(1-zeta^(2))\omega_{d}=\omega_{n} \sqrt{1-\zeta^{2}} ,以达到峰值时间 t p 0.5 sec t p 0.5 sec t_(p) <= 0.5sect_{p} \leq 0.5 \mathrm{sec}
Question 1.3 Sketch the area in the s-plane where the dominant poles must lie in order to meet both the specifications.
问题 1.3 在 s 平面中勾画出主极点必须位于的区域,以满足两个规格。

To obtain the plant you will use in this exercise, type
要获取您在本练习中使用的植物,请输入
[ k , T 1 , T 2 ] = deal ( 0.7904 , 0.0648 , 0.106 ) [ k , T 1 , T 2 ] = deal ( 0.7904 , 0.0648 , 0.106 ) [k,T1,T2]=deal(0.7904,0.0648,0.106)[\mathrm{k}, \mathrm{~T} 1, \mathrm{~T} 2]=\operatorname{deal}(0.7904,0.0648,0.106)
Question 1.4 Record the values of k , T 1 k , T 1 k,T_(1)k, T_{1} and T 2 T 2 T_(2)T_{2}.
问题 1.4 记录 k , T 1 k , T 1 k,T_(1)k, T_{1} T 2 T 2 T_(2)T_{2} 的值。

Define the plant, G ( s ) G ( s ) G(s)G(s), in transfer function form by
定义植物 G ( s ) G ( s ) G(s)G(s) 的传递函数形式为
G = tf ( k , [ T 1 T 2 , T 1 + T 2 , 1 , 0 ] ) G = tf ( k , [ T 1 T 2 , T 1 + T 2 , 1 , 0 ] ) G=tf(k,quad[T1**T2,T1+T2,1,0])\mathrm{G}=\mathrm{tf}(\mathrm{k}, \quad[\mathrm{~T} 1 * \mathrm{~T} 2, \mathrm{~T} 1+\mathrm{T} 2,1,0])
Obtain the open-loop poles of the plant by pole (G)
通过极点 (G) 获取系统的开环极点

Plot the plant poles on the s s ss-plane by pzmap(G);
s s ss 平面上通过 pzmap(G)绘制植物极点;
Question 1.5 Record the transfer function and comment on it. Record and comment on the plant poles.
问题 1.5 记录传递函数并对此进行评论。记录并评论植物极点。

Question 1.6 What will happen if you try to obtain the plant open loop step response? Explain why.
问题 1.6 如果你尝试获取植物的开环阶跃响应,会发生什么?请解释原因。

Obtain the open loop impulse response by
获取开环脉冲响应通过

impulse(G); 冲动(G);
Question 1.7 Explain this response characteristics.
问题 1.7 解释这个响应特性。

2 Proportional controller design by root-locus
2 根轨迹法的比例控制器设计

The root locus displays the locii of the closed loop system poles for a controller
根轨迹显示了控制器闭环系统极点的位置
K ( s ) = k p K ( s ) = k p K(s)=k_(p)K(s)=k_{p}
as the value of k p k p k_(p)k_{p} increases from zero for the system shown in Figure 1.
随着图 1 所示系统中 k p k p k_(p)k_{p} 的值从零增加。

Plot the root locus of the plant by
绘制植物的根轨迹图

rlocus (G)
The command 命令
sgrid
draws in lines of constant damping ratio ζ ζ zeta\zeta and natural frequency ω n ω n omega_(n)\omega_{n}. The damping ratio lines are drawn from ζ = 0 ζ = 0 zeta=0\zeta=0 to 1 in steps of 0.1 .
绘制了恒定阻尼比 ζ ζ zeta\zeta 和自然频率 ω n ω n omega_(n)\omega_{n} 的线。阻尼比线从 ζ = 0 ζ = 0 zeta=0\zeta=0 绘制到 1,步长为 0.1。
Question 2.1 Explain the root locus characteristics.
问题 2.1 解释根轨迹特性。
Question 2.2 From the root locus plot, determine whether both design specifications a re simultaneously possible using proportional feedback alone. Record any calculations and show your workings on the root locus plot (by hand). Determine ω d ω d omega_(d)\omega_{d} and hence t p t p t_(p)t_{p} at the required value of ζ ζ zeta\zeta. Record your calculations.
问题 2.2 从根轨迹图中,确定是否可以仅使用比例反馈同时满足两个设计规范。记录任何计算,并在根轨迹图上展示你的工作(手动)。确定 ω d ω d omega_(d)\omega_{d} ,并因此在所需的 ζ ζ zeta\zeta 值下确定 t p t p t_(p)t_{p} 。记录你的计算。
The plot above shows all possible closed-loop pole locations for a pure proportional controller. Obviously not all of those closed-loop poles will satisfy our design criteria. We can use the function sgrid to plot lines of constant damping ratios and natural frequencies. For the peak time condition, you may need to manually add one more constraint to the plot.
上面的图显示了纯比例控制器所有可能的闭环极点位置。显然,并不是所有这些闭环极点都能满足我们的设计标准。我们可以使用函数 sgrid 来绘制恒定阻尼比和自然频率的线。对于峰值时间条件,您可能需要手动向图中添加一个额外的约束。
MATLAB provides an interactive root locus facility. Type
MATLAB 提供了一个交互式根轨迹功能。输入
[kp,poles_kp]=rlocfind(G)
and use the mouse to determine the required value of k p k p k_(p)k_{p} for an overshoot of 10 % 10 % 10%10 \%. The eigenvalues at this point are also returned by the function rlocfind. Note that this is not a very accurate method.
并使用鼠标确定超调量为 10 % 10 % 10%10 \% 时所需的 k p k p k_(p)k_{p} 值。此时的特征值也由函数 rlocfind 返回。请注意,这不是一种非常准确的方法。
Question 2.3 Record the value of k p k p k_(p)k_{p} and the poles at this point.
问题 2.3 记录 k p k p k_(p)k_{p} 的值以及该点的极点。

The required value of k p k p k_(p)k_{p} is now in the MATLAB workspace as the variable kp . Calculate the closed loop transfer function
所需的 k p k p k_(p)k_{p} 值现在在 MATLAB 工作区中作为变量 kp。计算闭环传递函数。
T ( s ) = k p G ( s ) 1 + k p G ( s ) T ( s ) = k p G ( s ) 1 + k p G ( s ) T(s)=(k_(p)G(s))/(1+k_(p)G(s))T(s)=\frac{k_{p} G(s)}{1+k_{p} G(s)}
by 通过
T = feedback ( k p G , 1 ) T =  feedback  ( k p G , 1 ) T=" feedback "(kp**G,1)T=\text { feedback }(k p * G, 1)
Obtain the closed loop damping ratio, natural frequency and poles by damp (T)
获取闭环阻尼比、自然频率和极点通过 damp (T)

Now display the closed loop system step response by
现在通过显示闭环系统的阶跃响应

step(T); 步(T);
From the plot, measure M p M p M_(p)M_{p} and t p t p t_(p)t_{p}.
从图中测量 M p M p M_(p)M_{p} t p t p t_(p)t_{p}

Question 2.4 Record and comment on the closed loop transfer function. Record the closed loop damping ratio, natural frequency and poles and compare these to the values predicted from the root locus. Record M p M p M_(p)M_{p} and t p t p t_(p)t_{p}. Comment on the response. Does your design meet the specifications? Compare the overshoot and peak time to the values predicted from the root locus.
问题 2.4 记录并评论闭环传递函数。记录闭环阻尼比、自然频率和极点,并将这些与根轨迹预测的值进行比较。记录 M p M p M_(p)M_{p} t p t p t_(p)t_{p} 。对响应进行评论。您的设计是否符合规格?将超调量和峰值时间与根轨迹预测的值进行比较。
Question 2.5 Using the interactive root-locus facility, use the mouse to determine the limiting value of k p k p k_(p)k_{p} for system stability. Calculate the value by hand.
问题 2.5 使用交互式根轨迹工具,使用鼠标确定系统稳定性的极限值 k p k p k_(p)k_{p} 。手动计算该值。

3 Proportional controller design by Bode plot (Tutorial 3, due date is 18th November)
通过波德图设计的比例控制器 (教程 3,截止日期为 11 月 18 日)

In this section, a proportional controller
在本节中,比例控制器
K ( s ) = k p K ( s ) = k p K(s)=k_(p)K(s)=k_{p}
for the system shown in Figure 1 will be designed and the stability analysed using frequency domain techniques.
将设计图 1 所示的系统,并使用频域技术分析其稳定性。

Obtain the plant Bode plot by bode (G);
通过 bode (G) 获取植物 Bode 图;
Question 3.1 Explain the Bode plot characteristics.
问题 3.1 解释波德图的特性。

Question 3.2 Find the limiting value of k p k p k_(p)k_{p} for system stability. Show the workings on the Bode plot.
问题 3.2 找到系统稳定性的极限值 k p k p k_(p)k_{p} 。在波德图上展示计算过程。

Question 3.3 From the Bode plot, determine the value of k p k p k_(p)k_{p} required for M p = 10 % M p = 10 % M_(p)=10%M_{p}=10 \% assuming
问题 3.3 从波德图中确定所需的 k p k p k_(p)k_{p} 值,以便 M p = 10 % M p = 10 % M_(p)=10%M_{p}=10 \% 假设
P M 100 ζ for P M < 70 deg P M 100 ζ  for  P M < 70 deg PM~~100 zetaquad" for "quad PM < 70degP M \approx 100 \zeta \quad \text { for } \quad P M<70 \mathrm{deg}
where PM is the phase margin. Show the workings on the Bode plot.
其中 PM 是相位裕度。请在波特图上展示计算过程。
Input the calculated value of k p k p k_(p)k_{p} into the MATLAB workspace as the variable kp. Now calculate the closed loop transfer function
将计算得出的 k p k p k_(p)k_{p} 的值输入到 MATLAB 工作区,作为变量 kp。现在计算闭环传递函数。
T ( s ) = k p G ( s ) 1 + k p G ( s ) T ( s ) = k p G ( s ) 1 + k p G ( s ) T(s)=(k_(p)G(s))/(1+k_(p)G(s))T(s)=\frac{k_{p} G(s)}{1+k_{p} G(s)}
by 通过
T = feedback ( k p G , 1 ) T =  feedback  ( k p G , 1 ) T=" feedback "(kp**G,1)\mathrm{T}=\text { feedback }(k p * G, 1)
Now display the closed loop system step response by
现在通过显示闭环系统的阶跃响应

step(T); 步(T);
From the plot, measure M p M p M_(p)M_{p} and t p t p t_(p)t_{p}.
从图中测量 M p M p M_(p)M_{p} t p t p t_(p)t_{p}

Question 3.4 Record and comment on the closed loop transfer function. Comment on the response. Record M p M p M_(p)M_{p} and t p t p t_(p)t_{p}. Compare M p M p M_(p)M_{p} to the value predicted from the Bode plot. Does your design meet the specifications?
问题 3.4 记录并评论闭环传递函数。评论响应。记录 M p M p M_(p)M_{p} t p t p t_(p)t_{p} 。将 M p M p M_(p)M_{p} 与从波德图预测的值进行比较。您的设计是否符合规格?
Now obtain the Bode plot of the open loop compensated system L ( s ) = G ( s ) K ( s ) = k p G ( s ) L ( s ) = G ( s ) K ( s ) = k p G ( s ) L(s)=G(s)K(s)=k_(p)G(s)L(s)=G(s) K(s)=k_{p} G(s) by bode (kpG);
现在通过 bode (kpG) 获取开环补偿系统 L ( s ) = G ( s ) K ( s ) = k p G ( s ) L ( s ) = G ( s ) K ( s ) = k p G ( s ) L(s)=G(s)K(s)=k_(p)G(s)L(s)=G(s) K(s)=k_{p} G(s) 的波德图;

Obtain the gain margin G M G M GMG M, phase margin P M P M PMP M, and associated frequencies ω c g ω c g omega_(cg)\omega_{c g} and ω c p ω c p omega_(cp)\omega_{c p} by [GM,PM,Wcg,Wcp] = margin(kp
G)
获得增益裕度 G)

You can convert GM to decibels by
您可以通过以下方式将 GM 转换为分贝:
20 log 10 ( GM ) 20 log 10 ( GM ) 20**log 10(GM)20 * \log 10(\mathrm{GM})
Question 3.5 Record the gain margin, phase margin, and associated frequencies.
问题 3.5 记录增益裕度、相位裕度及相关频率。

Comment on the Bode plot of the open loop compensated system. Show the gain and phase margins on the plot.
对开环补偿系统的波德图进行评论。图中显示增益和相位裕度。

4 PID/P+D controller design
4 PID/P+D 控制器设计

PID controllers are the most commonly used type of industrial control. They are usually designed by trial and error using a few simple rules.
PID 控制器是最常用的工业控制类型。它们通常通过试错法和一些简单规则进行设计。
Question 4.1 What will be the system type if a PID controller is used on this plant? For zero steady state error (to unity step references) for this plant, is an integrator required in the controller?
问题 4.1 如果在这个植物上使用 PID 控制器,系统类型将是什么?为了使该植物在单位阶跃参考下达到零稳态误差,控制器中是否需要一个积分器?
Question 4.2 What are the advantages and disadvantages of not using integral action (i.e., using P + D P + D P+DP+D control)?
问题 4.2 不使用积分作用(即使用 P + D P + D P+DP+D 控制)的优缺点是什么?

Figure 2: Closed loop system with P+D controller
图 2:带有 P+D 控制器的闭环系统
For many mechanical control applications, the derivative of the output is available for measurement using tachometers and other devices. However, for many applications, such a signal is simply not available (e.g. process engineering applications), or prohibitively expensive to obtain. In such cases, the derivative signal y ˙ ( t ) y ˙ ( t ) y^(˙)(t)\dot{y}(t) should be approximated by (high pass filter)
对于许多机械控制应用,输出的导数可以通过转速计和其他设备进行测量。然而,对于许多应用,这样的信号根本不可用(例如过程工程应用),或者获取成本过高。在这种情况下,导数信号 y ˙ ( t ) y ˙ ( t ) y^(˙)(t)\dot{y}(t) 应通过(高通滤波器)进行近似。
Y ˙ ( s ) = s Y ( s ) α s + 1 Y ˙ ( s ) = s Y ( s ) α s + 1 Y^(˙)(s)=(sY(s))/(alpha s+1)\dot{Y}(s)=\frac{s Y(s)}{\alpha s+1}
where 1 / α 1 / α 1//alpha1 / \alpha is greater than the system bandwidth. Making 1 / α 1 / α 1//alpha1 / \alpha too large means that high frequency noise in the measurement signal of y ( t ) y ( t ) y(t)y(t) is amplified.
1 / α 1 / α 1//alpha1 / \alpha 大于系统带宽时。将 1 / α 1 / α 1//alpha1 / \alpha 设置得过大意味着 y ( t ) y ( t ) y(t)y(t) 的测量信号中的高频噪声被放大。
The closed loop system is shown in Figure 2. The controller K ( s ) K ( s ) K(s)K(s) for this exercise is a P + D P + D P+D\mathrm{P}+\mathrm{D} controller
闭环系统如图 2 所示。本次练习的控制器 K ( s ) K ( s ) K(s)K(s) 是一个 P + D P + D P+D\mathrm{P}+\mathrm{D} 控制器。
K ( s ) = k p + s k d α s + 1 = k p + s ( k d + α k p ) α s + 1 K ( s ) = k p + s k d α s + 1 = k p + s k d + α k p α s + 1 K(s)=k_(p)+(sk_(d))/(alpha s+1)=(k_(p)+s(k_(d)+alphak_(p)))/(alpha s+1)K(s)=k_{p}+\frac{s k_{d}}{\alpha s+1}=\frac{k_{p}+s\left(k_{d}+\alpha k_{p}\right)}{\alpha s+1}
Now design the controller. Firstly, define α α alpha\alpha. A suggested value is α = 0.02 α = 0.02 alpha=0.02\alpha=0.02
现在设计控制器。首先,定义 α α alpha\alpha 。建议的值是 α = 0.02 α = 0.02 alpha=0.02\alpha=0.02
alpha=0. 02  alpha=0.  02 " alpha=0. "02\text { alpha=0. } 02
Define a proportional gain term, k p k p k_(p)k_{p}, in the MATLAB workspace in a variable kp. Similarly, define a derivative gain term, k d k d k_(d)k_{d}, in a variable kd . Now define the transfer function, K ( s ) K ( s ) K(s)K(s), of the controller by
在 MATLAB 工作区中定义一个比例增益项 k p k p k_(p)k_{p} ,存储在变量 kp 中。同样,在变量 kd 中定义一个微分增益项 k d k d k_(d)k_{d} 。现在通过以下方式定义控制器的传递函数 K ( s ) K ( s ) K(s)K(s)
K = t f ( [ k d + a l p h a k p , k p ] , [ a l p h a , 1 ] ) K = t f ( [ k d + a l p h a k p , k p ] , [ a l p h a , 1 ] ) K=tf([kd+alpha**kp,kp],[alpha,1])K=t f([k d+a l p h a * k p, k p],[a l p h a, 1])
Obtain the system open loop transfer function L ( s ) = G ( s ) K ( s ) L ( s ) = G ( s ) K ( s ) L(s)=G(s)K(s)L(s)=G(s) K(s) by
获得系统的开环传递函数 L ( s ) = G ( s ) K ( s ) L ( s ) = G ( s ) K ( s ) L(s)=G(s)K(s)L(s)=G(s) K(s) 通过
L = K G L = K G L=K**G\mathrm{L}=\mathrm{K} * \mathrm{G}
Now obtain the system closed loop transfer function
现在获得系统闭环传递函数
T ( s ) = G ( s ) K ( s ) 1 + G ( s ) K ( s ) = L ( s ) 1 + L ( s ) T ( s ) = G ( s ) K ( s ) 1 + G ( s ) K ( s ) = L ( s ) 1 + L ( s ) T(s)=(G(s)K(s))/(1+G(s)K(s))=(L(s))/(1+L(s))T(s)=\frac{G(s) K(s)}{1+G(s) K(s)}=\frac{L(s)}{1+L(s)}
by 通过
T = feedback ( K G , 1 ) T =  feedback  ( K G , 1 ) T=" feedback "(K***G,1)\mathrm{T}=\text { feedback }(\mathrm{K} \star \mathrm{G}, 1)
Now display the closed loop system step response by
现在通过显示闭环系统的阶跃响应

step(T); 步(T);
If the response does not meet the specifications, change kp and kd and repeat the procedure until a satisfactory design is obtained.
如果响应不符合规格,请更改 kp 和 kd,并重复该过程,直到获得满意的设计。
Question 4.3 From the plot, measure M p M p M_(p)M_{p} and t p t p t_(p)t_{p}. Does your design meet the specifications? Record the final values of k p k p k_(p)k_{p} and k d k d k_(d)k_{d}. Record the transfer function K ( s ) K ( s ) K(s)K(s), the system open loop transfer function L ( s ) L ( s ) L(s)L(s) and the closed loop transfer function T ( s ) T ( s ) T(s)T(s).
问题 4.3 从图中测量 M p M p M_(p)M_{p} t p t p t_(p)t_{p} 。您的设计符合规格吗?记录 k p k p k_(p)k_{p} k d k d k_(d)k_{d} 的最终值。记录传递函数 K ( s ) K ( s ) K(s)K(s) 、系统开环传递函数 L ( s ) L ( s ) L(s)L(s) 和闭环传递函数 T ( s ) T ( s ) T(s)T(s)
Obtain the Bode plot of the controller transfer function K ( s ) K ( s ) K(s)K(s) by
获取控制器传递函数 K ( s ) K ( s ) K(s)K(s) 的波德图

bode (K) 博德 (K)
Question 4.4 Explain the Bode plot characteristics.
问题 4.4 解释波德图特性。
Obtain the Bode plot of the system open loop transfer function L ( s ) L ( s ) L(s)L(s) by
获取系统开环传递函数 L ( s ) L ( s ) L(s)L(s) 的波德图

bode (L) 波德 (L)
Obtain the gain margin G M G M GMG M, phase margin Pm, and associated frequencies ω c g ω c g omega_(cg)\omega_{c g} and ω c p ω c p omega_(cp)\omega_{c p} by [GM, PM, Wcg,Wcp] = margin(L)
获取增益裕度 G M G M GMG M 、相位裕度 Pm 和相关频率 ω c g ω c g omega_(cg)\omega_{c g} ω c p ω c p omega_(cp)\omega_{c p} ,通过 [GM, PM, Wcg, Wcp] = margin(L)

You can convert GM to decibels by
您可以通过以下方式将 GM 转换为分贝:
20 log 10 ( GM ) 20 log 10 ( GM ) 20**log 10(GM)20 * \log 10(\mathrm{GM})
Question 4.5 Record the gain margin, phase margin, and associated frequencies. Show the gain margin and phase margin on the Bode plot.
问题 4.5 记录增益裕度、相位裕度及相关频率。在波特图上显示增益裕度和相位裕度。
Obtain the closed loop poles and zeros by
获得闭环极点和零点的方法是

pole(T) 杆(T)
zero(T) 零(T)
Plot the closed loop system poles and zeros on the s s ss-plane by
s s ss 平面上绘制闭环系统的极点和零点
pzmap(T);
Question 4.6 Record and comment on the closed loop poles and zeros.
问题 4.6 记录并评论闭环极点和零点。

5 Pole placement using state feedback (Tutorial 4, due date is 2nd December)
使用状态反馈的五极点配置(教程 4,截止日期为 12 月 2 日)

In this section, a state feedback controller is designed which will place the closed loop eigenvalues at desired locations (background about state feedback controller is given in Appendix A). The assumption is made here that the system states are directly measurable using sensing devices. This, however, is frequently not a practical or cost-effective proposition. In such cases, it is possible to construct state estimators (or observers) which estimate the values of the states.
在本节中,设计了一种状态反馈控制器,该控制器将闭环特征值放置在期望位置(关于状态反馈控制器的背景信息见附录 A)。这里假设系统状态可以通过传感设备直接测量。然而,这在实际操作中往往不是一个可行或具有成本效益的方案。在这种情况下,可以构建状态估计器(或观察器)来估计状态的值。
A state space equivalent representation of the plant is given by
植物的状态空间等效表示为
G ( s ) = C ( s I A ) 1 B + D G ( s ) = C ( s I A ) 1 B + D G(s)=C(sI-A)^(-1)B+DG(s)=C(s I-A)^{-1} B+D
and this can be obtained by
这可以通过获得
Gss=ss(G)
Question 5.1 Record the state space representation produced by MATLAB.
问题 5.1 记录 MATLAB 生成的状态空间表示。

There are an infinite number of equivalent state space representations. If S S SS is any square invertible matrix with dimension equal to the number of states, then equivalent representations of ( A , B , C , D ) ( A , B , C , D ) (A,B,C,D)(A, B, C, D) are given by ( S A S 1 , S B , C S 1 , D ) S A S 1 , S B , C S 1 , D (SAS^(-1),SB,CS^(-1),D)\left(S A S^{-1}, S B, C S^{-1}, D\right).
有无限数量的等效状态空间表示。如果 S S SS 是任何维度等于状态数量的可逆方阵,则 ( A , B , C , D ) ( A , B , C , D ) (A,B,C,D)(A, B, C, D) 的等效表示由 ( S A S 1 , S B , C S 1 , D ) S A S 1 , S B , C S 1 , D (SAS^(-1),SB,CS^(-1),D)\left(S A S^{-1}, S B, C S^{-1}, D\right) 给出。
We can convert the MATLAB state space representation to a simplified representation, by setting S = O S = O S=OS=\mathcal{O}, where O O O\mathcal{O} is a matrix known as the observability matrix (this can be proved by means of the Cayley-Hamilton Theorem, see Appendix B for details). The observability matrix can also provide a test for the observability of the plant. The observability matrix is defined (for a 3rd order system ) as
我们可以通过设置 S = O S = O S=OS=\mathcal{O} 将 MATLAB 状态空间表示转换为简化表示,其中 O O O\mathcal{O} 是一个称为可观测性矩阵的矩阵(这可以通过凯莱-汉密尔顿定理证明,详细信息见附录 B)。可观测性矩阵还可以提供对系统可观测性的测试。可观测性矩阵的定义(对于三阶系统)为
O = [ C C A C A 2 ] O = C C A C A 2 O=[[C],[CA],[CA^(2)]]\mathcal{O}=\left[\begin{array}{c} C \\ C A \\ C A^{2} \end{array}\right]
and can be obtained by
并可以通过获得

S=obsv (Gss.a, Gss.c)
The state space system is transformed into the simplified representation by
状态空间系统通过以下方式转化为简化表示:

Gss=ss2ss (Gss, S)
You can check that this state space representation is equivalent to the original plant by
您可以通过检查该状态空间表示是否等同于原始系统来验证

tf(Gss)
Question 5.2 Record the transformed state space representation and the transformation/observability matrix S. Calculate the state space representation by hand, and compare the results to those given by MATLAB.
问题 5.2 记录变换后的状态空间表示和变换/可观测性矩阵 S。手动计算状态空间表示,并将结果与 MATLAB 给出的结果进行比较。

Figure 3: Closed loop system with state feedback controller
图 3:带状态反馈控制器的闭环系统
Define a MATLAB vector P which contains the desired closed loop pole positions of the closed loop system. Place the two dominant poles at the positions required to meet the design objective (from Section 1), and place the third pole at least a factor of 5 away from the complex pole pair. For example, if the desired pole positions are { 3 ± 2 j , 16 } { 3 ± 2 j , 16 } {-3+-2j,-16}\{-3 \pm 2 j,-16\}, define
定义一个 MATLAB 向量 P,其中包含闭环系统所需的闭环极点位置。将两个主导极点放置在满足设计目标所需的位置(来自第 1 节),并将第三个极点放置在与复极点对至少相距 5 的位置。例如,如果所需的极点位置为 { 3 ± 2 j , 16 } { 3 ± 2 j , 16 } {-3+-2j,-16}\{-3 \pm 2 j,-16\} ,则定义
P = [ 3 + 2 j ; 3 2 j ; 16 ] P = 3 + 2 j ;      3 2 j ;      16 ] P=[[-3+2j;,-3-2j;,-16]]:}P=\left[\begin{array}{lll} -3+2 j ; & -3-2 j ; & -16] \end{array}\right.
Question 5.3 Record and explain how you calculated the desired pole positions
问题 5.3 记录并解释您是如何计算所需的极点位置的

Now obtain the state feedback gain matrix K = [ K 1 , K 2 , K 3 ] K = K 1 , K 2 , K 3 K=[K_(1),K_(2),K_(3)]K=\left[K_{1}, K_{2}, K_{3}\right] such that the control input u ( t ) u ( t ) u(t)u(t) is
现在获得状态反馈增益矩阵 K = [ K 1 , K 2 , K 3 ] K = K 1 , K 2 , K 3 K=[K_(1),K_(2),K_(3)]K=\left[K_{1}, K_{2}, K_{3}\right] ,使得控制输入 u ( t ) u ( t ) u(t)u(t)
u ( t ) = ( K 1 x 1 ( t ) + K 2 x 2 ( t ) + K 3 x 3 ( t ) ) u ( t ) = K 1 x 1 ( t ) + K 2 x 2 ( t ) + K 3 x 3 ( t ) u(t)=-(K_(1)x_(1)(t)+K_(2)x_(2)(t)+K_(3)x_(3)(t))u(t)=-\left(K_{1} x_{1}(t)+K_{2} x_{2}(t)+K_{3} x_{3}(t)\right)
or in matrix form 或以矩阵形式
u = K x u = K x u=-Kxu=-K x
and the closed loop eigenvalues, i.e. the eigenvalues of A B K A B K A-B**KA-B * K are those specified in vector P . This can be done in MATLAB by the command
闭环特征值,即 A B K A B K A-B**KA-B * K 的特征值,是向量 P 中指定的特征值。这可以通过 MATLAB 中的命令完成。
K = place ( Gss.a,Gss.b, P ) K = place (  Gss.a,Gss.b,  P ) K=place(" Gss.a,Gss.b, "P)\mathrm{K}=\mathrm{place}(\text { Gss.a,Gss.b, } \mathrm{P})
Question 5.4 Record the values of K. Calculate the state feedback matrix by hand and verify the MATLAB result.
问题 5.4 记录 K 的值。手动计算状态反馈矩阵并验证 MATLAB 结果。

Check the closed loop eigenvalues by
检查闭环特征值通过

eig(Gss.a-Gss.b*K)
Question 5.5 Record and comment on the closed loop eigenvalues.
问题 5.5 记录并评论闭环特征值。

Obtain the closed loop state space system for state feedback by
通过状态反馈获得闭环状态空间系统

Tss=ss(Gss.a-Gss.bK, Gss.bK(1),Gss.c,Gss.d)
Obtain the closed loop transfer function by
获得闭环传递函数的方法是
T = tf ( Tss ) T = tf ( Tss ) T=tf(Tss)\mathrm{T}=\mathrm{tf}(\mathrm{Tss})
Obtain step response of the closed loop system shown in Figure 3 by
获取图 3 所示闭环系统的阶跃响应

step(Tss) 步骤(Tss)
Question 5.6 Record and comment on the closed loop state space system and transfer function.
问题 5.6 记录并评论闭环状态空间系统和传递函数。

From the closed loop step response plot, measure M p M p M_(p)M_{p} and t p t p t_(p)t_{p}. Does your design meet the specifications? If not, explain why. What is the main disadvantage of state feedback?
从闭环阶跃响应图中,测量 M p M p M_(p)M_{p} t p t p t_(p)t_{p} 。您的设计符合规格吗?如果不符合,请解释原因。状态反馈的主要缺点是什么?

Appendix A - State Space Controllers Design
附录 A - 状态空间控制器设计

The state variable representation provides a complete (internal) description of a system. This may exhibit oscillations, which are masked if we maintain the transfer function input/output formulation. We can use the states to give better control than obtained by simple output feedback.
状态变量表示提供了系统的完整(内部)描述。这可能会表现出振荡,如果我们保持传递函数的输入/输出形式,这些振荡会被掩盖。我们可以利用状态来提供比简单输出反馈获得的更好的控制。

Pole Placement 极点配置

The poles of a system are also the eigenvalues of the system matrix A A A\mathbf{A}, thus we speak of pole assignment or eigenvalue assignment as having the same meaning. The characteristic equation of matrix A A A\mathbf{A} is given by the determinant of
系统的极点也是系统矩阵 A A A\mathbf{A} 的特征值,因此我们将极点配置或特征值配置视为具有相同的含义。矩阵 A A A\mathbf{A} 的特征方程由以下行列式给出:
det ( λ I A ) = 0 det ( λ I A ) = 0 det(lambdaI-A)=0\operatorname{det}(\lambda \mathbf{I}-\mathbf{A})=0
The expansion of equation (1) produces an n n nnth order polynomial, where roots λ 1 , λ 2 , λ n λ 1 , λ 2 , λ n lambda_(1),lambda_(2),cdotslambda_(n)\lambda_{1}, \lambda_{2}, \cdots \lambda_{n} are eigenvalues of A A A\mathbf{A}. The object of state variable feedback is to move these eigenvalues to desired locations.
方程(1)的展开产生一个 n n nn 阶多项式,其中根 λ 1 , λ 2 , λ n λ 1 , λ 2 , λ n lambda_(1),lambda_(2),cdotslambda_(n)\lambda_{1}, \lambda_{2}, \cdots \lambda_{n} A A A\mathbf{A} 的特征值。状态变量反馈的目的是将这些特征值移动到期望的位置。
Example 1 A system is described in the state space form
示例 1 一个系统以状态空间形式描述
x ˙ = A x + B u y = C x + Du x ˙ = A x + B u y = C x + Du {:[x^(˙)=Ax+Bu],[y=Cx+Du]:}\begin{aligned} & \dot{\mathbf{x}}=\mathbf{A x}+\mathbf{B u} \\ & \mathbf{y}=\mathbf{C x}+\mathrm{Du} \end{aligned}
where 哪里
A = [ 0 1 0 0 0 1 1 3 3 ] , B = [ 0 0 1 ] , u = [ u ] C = [ 1 0 0 ] , D = [ 0 ] A = 0 1 0 0 0 1 1 3 3 , B = 0 0 1 , u = [ u ] C = 1 0 0 , D = [ 0 ] {:[A=[[0,1,0],[0,0,1],[-1,-3,-3]]","B=[[0],[0],[1]]","u=[u]],[C=[[1,0,0]]","D=[0]]:}\begin{gathered} \mathbf{A}=\left[\begin{array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ -1 & -3 & -3 \end{array}\right], \mathbf{B}=\left[\begin{array}{l} 0 \\ 0 \\ 1 \end{array}\right], \mathbf{u}=[u] \\ \mathbf{C}=\left[\begin{array}{lll} 1 & 0 & 0 \end{array}\right], \mathbf{D}=[0] \end{gathered}
Consider the state feedback law
考虑状态反馈法则
u = [ k 1 k 2 k 3 ] x u = k 1      k 2      k 3 x u=-[[k_(1),k_(2),k_(3)]]xu=-\left[\begin{array}{lll} k_{1} & k_{2} & k_{3} \end{array}\right] \mathbf{x}
to allocate the eigenvalues to the positions
将特征值分配到位置上
μ 1 = 2 , μ 2 = 1 + j , μ 3 = 1 j μ 1 = 2 , μ 2 = 1 + j , μ 3 = 1 j mu_(1)=-2,quadmu_(2)=-1+j,quadmu_(3)=-1-j\mu_{1}=-2, \quad \mu_{2}=-1+j, \quad \mu_{3}=-1-j
Now the open loop characteristic equation can be found from equation (1)
现在可以从方程(1)中找到开环特性方程
det = s 3 + 3 s 2 + 3 s + 1 = 0 det = s 3 + 3 s 2 + 3 s + 1 = 0 det=s^(3)+3s^(2)+3s+1=0\operatorname{det}=s^{3}+3 s^{2}+3 s+1=0
i.e. 即。
( s + 1 ) 3 = 0 ( s + 1 ) 3 = 0 (s+1)^(3)=0(s+1)^{3}=0
Hence we need a method to determine K = [ k 1 k 2 k 3 ] K = k 1      k 2      k 3 K=[[k_(1),k_(2),k_(3)]]\mathbf{K}=\left[\begin{array}{lll}k_{1} & k_{2} & k_{3}\end{array}\right] to shift three open loop poles at s = 1 s = 1 s=-1s=-1.
因此,我们需要一种方法来确定 K = [ k 1 k 2 k 3 ] K = k 1      k 2      k 3 K=[[k_(1),k_(2),k_(3)]]\mathbf{K}=\left[\begin{array}{lll}k_{1} & k_{2} & k_{3}\end{array}\right] 以在 s = 1 s = 1 s=-1s=-1 处移动三个开环极点。

Consider the closed loop system with state variable feedback in Fig. 4. The block diagram represents the internal structure of the system.
考虑图 4 中的状态变量反馈闭环系统。该框图表示系统的内部结构。

The state representation of the state variable feedback closed loop system is
状态变量反馈闭环系统的状态表示为
x ˙ = ( A B K ) x x ˙ = ( A B K ) x x^(˙)=(A-BK)x\dot{\mathbf{x}}=(\mathbf{A}-\mathbf{B K}) \mathbf{x}
The closed loop characteristic polynomial ρ c ( s ) ρ c ( s ) rho_(c)(s)\rho_{c}(s) is
闭环特征多项式 ρ c ( s ) ρ c ( s ) rho_(c)(s)\rho_{c}(s)
ρ c ( s ) = s n + b 1 s n 1 + + b n 1 s + b n = ( s μ 1 ) ( s μ 2 ) ( s μ n ) ρ c ( s ) = s n + b 1 s n 1 + + b n 1 s + b n = s μ 1 s μ 2 s μ n {:[rho_(c)(s)=s^(n)+b_(1)s^(n-1)+cdots+b_(n-1)s+b_(n)],[=(s-mu_(1))(s-mu_(2))cdots(s-mu_(n))]:}\begin{array}{r} \rho_{c}(s)=s^{n}+b_{1} s^{n-1}+\cdots+b_{n-1} s+b_{n} \\ =\left(s-\mu_{1}\right)\left(s-\mu_{2}\right) \cdots\left(s-\mu_{n}\right) \end{array}
Thus given μ 1 , μ 2 μ 1 , μ 2 mu_(1),mu_(2)cdots\mu_{1}, \mu_{2} \cdots we can find the values of b 1 , b 2 , b 3 , b 1 , b 2 , b 3 , b_(1),b_(2),b_(3),cdotsb_{1}, b_{2}, b_{3}, \cdots.
因此,给定 μ 1 , μ 2 μ 1 , μ 2 mu_(1),mu_(2)cdots\mu_{1}, \mu_{2} \cdots ,我们可以找到 b 1 , b 2 , b 3 , b 1 , b 2 , b 3 , b_(1),b_(2),b_(3),cdotsb_{1}, b_{2}, b_{3}, \cdots 的值。

In general the open loop characteristic polynomial is
一般来说,开环特征多项式是
ρ o = s n + a 1 s n 1 + + a n 1 s + a n ρ o = s n + a 1 s n 1 + + a n 1 s + a n rho_(o)=s^(n)+a_(1)s^(n-1)+cdots+a_(n-1)s+a_(n)\rho_{o}=s^{n}+a_{1} s^{n-1}+\cdots+a_{n-1} s+a_{n}
Figure 4: State variable feedback block diagram
图 4:状态变量反馈框图

Comparing (2) and (3), A has been replaced by A B K A B K A-BK\mathbf{A}-\mathbf{B K} and we can write in comparison form
比较 (2) 和 (3),A 已被 A B K A B K A-BK\mathbf{A}-\mathbf{B K} 替换,我们可以以比较形式写出
A B K = [ 0 1 0 0 0 0 1 0 b n b n 1 b n 2 b 1 ] A B K = 0 1 0 0 0 0 1 0 b n b n 1 b n 2 b 1 A-BK=[[0,1,0,cdots,0],[0,0,1,cdots,0],[vdots,vdots,vdots,vdots,vdots],[-b_(n),-b_(n-1),-b_(n-2),cdots,-b_(1)]]\mathbf{A}-\mathbf{B K}=\left[\begin{array}{ccccc} 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ -b_{n} & -b_{n-1} & -b_{n-2} & \cdots & -b_{1} \end{array}\right]
which also equals 也等于
[ 0 1 0 0 0 0 1 0 a n a n 1 a n 2 a 1 ] [ 0 0 1 ] [ k 1 k 2 k n ] 0 1 0 0 0 0 1 0 a n a n 1 a n 2 a 1 0 0 1 k 1 k 2 k n [[0,1,0,cdots,0],[0,0,1,cdots,0],[vdots,vdots,vdots,vdots,vdots],[-a_(n),-a_(n-1),-a_(n-2),cdots,-a_(1)]]-[[0],[0],[vdots],[1]][[k_(1),k_(2),cdots,k_(n)]]\left[\begin{array}{ccccc} 0 & 1 & 0 & \cdots & 0 \\ 0 & 0 & 1 & \cdots & 0 \\ \vdots & \vdots & \vdots & \vdots & \vdots \\ -a_{n} & -a_{n-1} & -a_{n-2} & \cdots & -a_{1} \end{array}\right]-\left[\begin{array}{c} 0 \\ 0 \\ \vdots \\ 1 \end{array}\right]\left[\begin{array}{cccc} k_{1} & k_{2} & \cdots & k_{n} \end{array}\right]
Hence 因此
b n = a n + k 1 b n 1 = a n 1 + k 2 b 1 = a 1 + k n b n = a n + k 1 b n 1 = a n 1 + k 2 b 1 = a 1 + k n {:[b_(n)=a_(n)+k_(1)],[b_(n-1)=a_(n-1)+k_(2)],[vdots],[b_(1)=a_(1)+k_(n)]:}\begin{aligned} b_{n} & =a_{n}+k_{1} \\ b_{n-1} & =a_{n-1}+k_{2} \\ \vdots & \\ b_{1} & =a_{1}+k_{n} \end{aligned}
Thus knowing a n , a n 1 , , a 1 , b n , b n 1 , , b 1 a n , a n 1 , , a 1 , b n , b n 1 , , b 1 a_(n),a_(n-1),cdots,a_(1),b_(n),b_(n-1),cdots,b_(1)a_{n}, a_{n-1}, \cdots, a_{1}, b_{n}, b_{n-1}, \cdots, b_{1} we can calculate k 1 , k 2 , , k n k 1 , k 2 , , k n k_(1),k_(2),cdots,k_(n)k_{1}, k_{2}, \cdots, k_{n}.
因此知道 a n , a n 1 , , a 1 , b n , b n 1 , , b 1 a n , a n 1 , , a 1 , b n , b n 1 , , b 1 a_(n),a_(n-1),cdots,a_(1),b_(n),b_(n-1),cdots,b_(1)a_{n}, a_{n-1}, \cdots, a_{1}, b_{n}, b_{n-1}, \cdots, b_{1} ,我们可以计算 k 1 , k 2 , , k n k 1 , k 2 , , k n k_(1),k_(2),cdots,k_(n)k_{1}, k_{2}, \cdots, k_{n}

In the present example, from equation (2) and the required pole positions, i.e. poles at 2 , 1 + j , 1 j 2 , 1 + j , 1 j -2,-1+j,-1-j-2,-1+j,-1-j we have
在本例中,从方程(2)和所需的极点位置,即极点在 2 , 1 + j , 1 j 2 , 1 + j , 1 j -2,-1+j,-1-j-2,-1+j,-1-j ,我们得到了
ρ c ( s ) = ( s + 2 ) ( s 2 + 2 s + 2 ) = s 3 + 4 s 2 + 6 s + 4 ρ c ( s ) = ( s + 2 ) s 2 + 2 s + 2 = s 3 + 4 s 2 + 6 s + 4 {:[rho_(c)(s)=(s+2)(s^(2)+2s+2)],[=s^(3)+4s^(2)+6s+4]:}\begin{aligned} \rho_{c}(s)= & (s+2)\left(s^{2}+2 s+2\right) \\ & =s^{3}+4 s^{2}+6 s+4 \end{aligned}
Hence b 1 = 4 , b 2 = 6 , b 3 = 4 b 1 = 4 , b 2 = 6 , b 3 = 4 b_(1)=4,b_(2)=6,b_(3)=4b_{1}=4, b_{2}=6, b_{3}=4, Similarly for the existing pole positions
因此 b 1 = 4 , b 2 = 6 , b 3 = 4 b 1 = 4 , b 2 = 6 , b 3 = 4 b_(1)=4,b_(2)=6,b_(3)=4b_{1}=4, b_{2}=6, b_{3}=4 ,现有的杆位也类似
ρ o ( s ) = ( s + 1 ) 3 = s 3 + 3 s 2 + 3 s + 1 ρ o ( s ) = ( s + 1 ) 3 = s 3 + 3 s 2 + 3 s + 1 rho_(o)(s)=(s+1)^(3)=s^(3)+3s^(2)+3s+1\rho_{o}(s)=(s+1)^{3}=s^{3}+3 s^{2}+3 s+1
Hence a 1 = 3 , a 2 = 3 , a 3 = 1 a 1 = 3 , a 2 = 3 , a 3 = 1 a_(1)=3,a_(2)=3,a_(3)=1a_{1}=3, a_{2}=3, a_{3}=1, Therefore 因此 a 1 = 3 , a 2 = 3 , a 3 = 1 a 1 = 3 , a 2 = 3 , a 3 = 1 a_(1)=3,a_(2)=3,a_(3)=1a_{1}=3, a_{2}=3, a_{3}=1 ,所以
k 1 = b 3 a 3 = 3 k 2 = b 2 a 2 = 3 k 3 = b 1 a 1 = 1 k 1 = b 3 a 3 = 3 k 2 = b 2 a 2 = 3 k 3 = b 1 a 1 = 1 {:[k_(1)=b_(3)-a_(3)=3],[k_(2)=b_(2)-a_(2)=3],[k_(3)=b_(1)-a_(1)=1]:}\begin{aligned} & k_{1}=b_{3}-a_{3}=3 \\ & k_{2}=b_{2}-a_{2}=3 \\ & k_{3}=b_{1}-a_{1}=1 \end{aligned}
The MATLAB command for pole placement is K = p l a c e ( A , B , p ) K = p l a c e ( A , B , p ) K=place(A,B,p)K=p l a c e(A, B, p). Therefore, the MATLAB code to solve the present exercise is:
MATLAB 中用于极点配置的命令是 K = p l a c e ( A , B , p ) K = p l a c e ( A , B , p ) K=place(A,B,p)K=p l a c e(A, B, p) 。因此,解决本练习的 MATLAB 代码是:
A=[0 1 0; 0 0 1; -1 -3 -3]
B=[0;0;1]
p=[-2, -1+j, -1-j]
K=place (A, B, P)
It can be shown that the pole allocation problem is solvable for all choices of closed loop poles if and only if, the open-loop system is completely controllable and measurements of all the state variables are available.
可以证明,极点配置问题在所有闭环极点的选择下是可解的,当且仅当开环系统是完全可控的,并且所有状态变量的测量值都是可用的。

Notes 笔记

(i) One problem which has not been addressed is how to select the required pole locations.
一个尚未解决的问题是如何选择所需的极点位置。

(ii) What happens if all the state variables are not available, this leads to the study of observers?
(ii) 如果所有状态变量都不可用,会发生什么,这就引出了观测器的研究?

Controllability 可控性

A system is controllable if it can be driven to an arbitrary state by an applied input. Consider the example
一个系统是可控的,如果它可以通过施加输入驱动到任意状态。考虑以下例子
[ x ˙ 1 x ˙ 2 ] = [ 0 1 2 3 ] [ x 1 x 2 ] + [ 1 2 ] u x ˙ 1 x ˙ 2 = 0 1 2 3 x 1 x 2 + 1 2 u [[x^(˙)_(1)],[x^(˙)_(2)]]=[[0,1],[-2,-3]][[x_(1)],[x_(2)]]+[[1],[-2]]u\left[\begin{array}{l} \dot{x}_{1} \\ \dot{x}_{2} \end{array}\right]=\left[\begin{array}{cc} 0 & 1 \\ -2 & -3 \end{array}\right]\left[\begin{array}{l} x_{1} \\ x_{2} \end{array}\right]+\left[\begin{array}{c} 1 \\ -2 \end{array}\right] u
Taking Laplace transforms and ignoring initial conditions:
进行拉普拉斯变换并忽略初始条件:
( s I A ) x ( s ) = b u ( s ) ( s I A ) x ( s ) = b u ( s ) (sI-A)x(s)=bu(s)(s \mathbf{I}-\mathbf{A}) \mathbf{x}(s)=\mathbf{b} u(s)
Therefore 因此
x ( s ) = ( s I A ) 1 b u ( s ) x ( s ) = ( s I A ) 1 b u ( s ) x(s)=(sI-A)^(-1)bu(s)\mathbf{x}(s)=(s \mathbf{I}-\mathbf{A})^{-1} \mathbf{b} u(s)
Now 现在
s I A = s [ 1 0 0 1 ] [ 0 1 2 3 ] = [ s 1 2 s + 3 ] s I A = s 1 0 0 1 0 1 2 3 = s 1 2 s + 3 {:[sI-A=s[[1,0],[0,1]]-[[0,1],[-2,-3]]],[=[[s,-1],[2,s+3]]]:}\begin{gathered} s \mathbf{I}-\mathbf{A}=s\left[\begin{array}{ll} 1 & 0 \\ 0 & 1 \end{array}\right]-\left[\begin{array}{cc} 0 & 1 \\ -2 & -3 \end{array}\right] \\ =\left[\begin{array}{cc} s & -1 \\ 2 & s+3 \end{array}\right] \end{gathered}
The inverse is given by
逆矩阵由以下公式给出
( s I A ) 1 = 1 s 2 + 3 s + 2 [ s + 3 1 2 s ] = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 2 s ] ( s I A ) 1 = 1 s 2 + 3 s + 2 s + 3 1 2 s = 1 ( s + 1 ) ( s + 2 ) s + 3 1 2 s {:[(sI-A)^(-1)=(1)/(s^(2)+3s+2)[[s+3,1],[-2,s]]],[=(1)/((s+1)(s+2))[[s+3,1],[-2,s]]]:}\begin{aligned} (s \mathbf{I}-\mathbf{A})^{-1} & =\frac{1}{s^{2}+3 s+2}\left[\begin{array}{cc} s+3 & 1 \\ -2 & s \end{array}\right] \\ & =\frac{1}{(s+1)(s+2)}\left[\begin{array}{cc} s+3 & 1 \\ -2 & s \end{array}\right] \end{aligned}
Hence 因此
x ( s ) = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 2 s ] [ 1 2 ] u ( s ) x ( s ) = 1 ( s + 1 ) ( s + 2 ) s + 3 1 2 s 1 2 u ( s ) x(s)=(1)/((s+1)(s+2))[[s+3,1],[-2,s]][[1],[-2]]u(s)\mathbf{x}(s)=\frac{1}{(s+1)(s+2)}\left[\begin{array}{cc} s+3 & 1 \\ -2 & s \end{array}\right]\left[\begin{array}{c} 1 \\ -2 \end{array}\right] u(s)
Since 由于
[ s + 3 1 2 s ] [ 1 2 ] = [ s + 1 2 ( s + 1 ) ] = ( s + 1 ) [ 1 2 ] s + 3 1 2 s 1 2 = s + 1 2 ( s + 1 ) = ( s + 1 ) 1 2 [[s+3,1],[-2,s]][[1],[-2]]=[[s+1],[-2(s+1)]]=(s+1)[[1],[-2]]\left[\begin{array}{cc} s+3 & 1 \\ -2 & s \end{array}\right]\left[\begin{array}{c} 1 \\ -2 \end{array}\right]=\left[\begin{array}{c} s+1 \\ -2(s+1) \end{array}\right]=(s+1)\left[\begin{array}{c} 1 \\ -2 \end{array}\right]
This gives: 这给出:
x ( s ) = 1 ( s + 2 ) [ 1 2 ] u ( s ) x ( s ) = 1 ( s + 2 ) 1 2 u ( s ) x(s)=(1)/((s+2))[[1],[-2]]u(s)\mathbf{x}(s)=\frac{1}{(s+2)}\left[\begin{array}{c} 1 \\ -2 \end{array}\right] u(s)
Now suppose that 现在假设
y ( s ) = [ 1 0 ] x ( s ) = 1 ( s + 2 ) u ( s ) y ( s ) = 1      0 x ( s ) = 1 ( s + 2 ) u ( s ) y(s)=[[1,0]]x(s)=(1)/((s+2))u(s)\mathbf{y}(s)=\left[\begin{array}{ll} 1 & 0 \end{array}\right] \mathbf{x}(s)=\frac{1}{(s+2)} u(s)
Now the state vector x ( s ) x ( s ) x(s)\mathbf{x}(s) does not contain the pole at s = 1 s = 1 s=-1s=-1. This has been cancelled by the zero generated by the vector b b b\mathbf{b}. Hence the system is uncontrollable from the input u u uu because the natural mode associated with the eigenvalue λ = 1 λ = 1 lambda=-1\lambda=-1 can never be excited.
现在状态向量 x ( s ) x ( s ) x(s)\mathbf{x}(s) 不包含位于 s = 1 s = 1 s=-1s=-1 的极点。这已被向量 b b b\mathbf{b} 生成的零所抵消。因此,系统从输入 u u uu 来看是不可控的,因为与特征值 λ = 1 λ = 1 lambda=-1\lambda=-1 相关的自然模式永远无法被激发。

Now modify this input from
现在将此输入修改为
[ 1 2 ] u ( s ) to [ 1 0 ] u ( s ) 1 2 u ( s )  to  1 0 u ( s ) [[1],[-2]]u(s)" to "[[1],[0]]u(s)\left[\begin{array}{c} 1 \\ -2 \end{array}\right] u(s) \text { to }\left[\begin{array}{l} 1 \\ 0 \end{array}\right] u(s)
Then 然后
x ( s ) = 1 ( s + 1 ) ( s + 2 ) [ s + 3 2 ] u ( s ) x ( s ) = 1 ( s + 1 ) ( s + 2 ) s + 3 2 u ( s ) x(s)=(1)/((s+1)(s+2))[[s+3],[-2]]u(s)\mathbf{x}(s)=\frac{1}{(s+1)(s+2)}\left[\begin{array}{c} s+3 \\ -2 \end{array}\right] u(s)
and 
y ( s ) = [ 1 0 ] x ( s ) = ( s + 3 ) ( s + 1 ) ( s + 2 ) u ( s ) y ( s ) = 1      0 x ( s ) = ( s + 3 ) ( s + 1 ) ( s + 2 ) u ( s ) y(s)=[[1,0]]x(s)=((s+3))/((s+1)(s+2))u(s)\mathbf{y}(s)=\left[\begin{array}{ll} 1 & 0 \end{array}\right] \mathbf{x}(s)=\frac{(s+3)}{(s+1)(s+2)} u(s)
In this case the system is controllable since every mode can be excited by the input.
在这种情况下,系统是可控的,因为每种模式都可以通过输入激发。

In general, the controllability may be assessed from the matrix
一般来说,控制性可以通过矩阵来评估
P = [ b , A b , A 2 b , A n 1 b ] P = b , A b , A 2 b , A n 1 b P=[b,Ab,A^(2)b,cdotsA^(n-1)b]\mathbf{P}=\left[\mathbf{b}, \mathbf{A b}, \mathbf{A}^{2} \mathbf{b}, \cdots \mathbf{A}^{n-1} \mathbf{b}\right]
For the system to be controllable, the controllability matrix P P P\mathbf{P} must be full rank (not shown). Matlab commands to check controllability:
为了使系统可控,可控性矩阵 P P P\mathbf{P} 必须是满秩的(未显示)。检查可控性的 Matlab 命令:
Co=Ctrb(A, B); %returns controllability matrix
Co=Ctrb(A, B); %返回可控性矩阵

UnCo=Length (A) -rank (Co)
UnCo=长度 (A) -秩 (Co)
Example 2 Check the controllability of a systems
示例 2 检查系统的可控性

(i) with the following state space equation
(i)具有以下状态空间方程
[ x ˙ 1 x ˙ 2 ] = [ 0 1 2 3 ] [ x 1 x 2 ] + [ 1 2 ] u x ˙ 1 x ˙ 2 = 0 1 2 3 x 1 x 2 + 1 2 u [[x^(˙)_(1)],[x^(˙)_(2)]]=[[0,1],[-2,-3]][[x_(1)],[x_(2)]]+[[1],[-2]]u\left[\begin{array}{l} \dot{x}_{1} \\ \dot{x}_{2} \end{array}\right]=\left[\begin{array}{cc} 0 & 1 \\ -2 & -3 \end{array}\right]\left[\begin{array}{l} x_{1} \\ x_{2} \end{array}\right]+\left[\begin{array}{c} 1 \\ -2 \end{array}\right] u
Here n = 2 n = 2 n=2n=2 and 这里 n = 2 n = 2 n=2n=2
P = [ 1 2 2 4 ] P = 1 2 2 4 P=[[1,-2],[-2,4]]\mathbf{P}=\left[\begin{array}{cc} 1 & -2 \\ -2 & 4 \end{array}\right]
which is less than full rank so that the system is uncontrollable.
其秩小于满秩,因此该系统是不可控的。

(ii) Now using an alternative input
(ii) 现在使用替代输入
[ x ˙ 1 x ˙ 2 ] = [ 0 1 2 3 ] [ x 1 x 2 ] + [ 0 1 ] u x ˙ 1 x ˙ 2 = 0 1 2 3 x 1 x 2 + 0 1 u [[x^(˙)_(1)],[x^(˙)_(2)]]=[[0,1],[-2,-3]][[x_(1)],[x_(2)]]+[[0],[1]]u\left[\begin{array}{l} \dot{x}_{1} \\ \dot{x}_{2} \end{array}\right]=\left[\begin{array}{cc} 0 & 1 \\ -2 & -3 \end{array}\right]\left[\begin{array}{l} x_{1} \\ x_{2} \end{array}\right]+\left[\begin{array}{l} 0 \\ 1 \end{array}\right] u
Here n = 2 n = 2 n=2n=2 and 这里 n = 2 n = 2 n=2n=2
P = [ 0 1 1 3 ] P = 0      1 1      3 P=[[0,1],[1,3]]\mathbf{P}=\left[\begin{array}{ll} 0 & 1 \\ 1 & 3 \end{array}\right]
which is of full rank so that the system is controllable.
该系统的秩为满秩,因此该系统是可控的。
Note that the controllability depends upon the coefficient matrix A A A\mathbf{A} and the distribution or input matrix b b b\mathbf{b}. Thus by adding inputs we can change the control of a system without changing its structure. A system may be controllable in a mathematical sense but the control action may be weak.
请注意,可控性取决于系数矩阵 A A A\mathbf{A} 和分布或输入矩阵 b b b\mathbf{b} 。因此,通过添加输入,我们可以在不改变系统结构的情况下改变系统的控制。一个系统在数学意义上可能是可控的,但控制作用可能很弱。

Note: Rank of a matrix
注意:矩阵的秩

The rank of a matrix is the maximum number of independent columns (rows) in the matrix. Alternatively, the rank of a matrix is the largest square array in the matrix with a non-vanishing determinant.
矩阵的秩是矩阵中独立列(行)的最大数量。或者,矩阵的秩是矩阵中具有非零行列式的最大方阵。

The computation of determinants for the determination of rank can be very time consuming. Rank can also be assessed by row/column operations.
计算行列式以确定秩可能非常耗时。秩也可以通过行/列操作来评估。
A n × n n × n n xx nn \times n matrix has rank r r rr with r < n r < n r < nr<n only if the matrix is singular.
一个 n × n n × n n xx nn \times n 矩阵的秩为 r r rr 仅当该矩阵是奇异的。

Observability 可观察性

A system is observable if the state of x x x\mathbf{x} can be deduced from the available output y y y\mathbf{y}. Observability implies that any mode that is excited can be detected (observed) in the output y y y\mathbf{y}.
一个系统是可观测的,如果可以从可用的输出 y y y\mathbf{y} 中推导出状态 x x x\mathbf{x} 。可观测性意味着任何被激励的模式都可以在输出 y y y\mathbf{y} 中被检测到(观察到)。
Example 3 Consider the system in Fig. 5
例子 3 考虑图 5 中的系统
[ x ˙ 1 x ˙ 2 ] = [ 0 1 2 3 ] [ x 1 x 2 ] + [ 0 1 ] u x ˙ 1 x ˙ 2 = 0 1 2 3 x 1 x 2 + 0 1 u [[x^(˙)_(1)],[x^(˙)_(2)]]=[[0,1],[-2,-3]][[x_(1)],[x_(2)]]+[[0],[1]]u\left[\begin{array}{l} \dot{x}_{1} \\ \dot{x}_{2} \end{array}\right]=\left[\begin{array}{cc} 0 & 1 \\ -2 & -3 \end{array}\right]\left[\begin{array}{l} x_{1} \\ x_{2} \end{array}\right]+\left[\begin{array}{l} 0 \\ 1 \end{array}\right] u
Now taking Laplace transforms:
现在进行拉普拉斯变换:
( s I A ) x ( s ) = b u ( s ) ( s I A ) x ( s ) = b u ( s ) (sI-A)x(s)=bu(s)(s \mathbf{I}-\mathbf{A}) \mathbf{x}(s)=\mathbf{b} u(s)
Therefore 因此
x ( s ) = ( s I A ) 1 b u ( s ) x ( s ) = ( s I A ) 1 b u ( s ) x(s)=(sI-A)^(-1)bu(s)\mathbf{x}(s)=(s \mathbf{I}-\mathbf{A})^{-1} \mathbf{b} u(s)
From the controllability notes
来自可控性笔记
( s I A ) 1 = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 2 s ] ( s I A ) 1 = 1 ( s + 1 ) ( s + 2 ) s + 3 1 2 s (sI-A)^(-1)=(1)/((s+1)(s+2))[[s+3,1],[-2,s]](s \mathbf{I}-\mathbf{A})^{-1}=\frac{1}{(s+1)(s+2)}\left[\begin{array}{cc} s+3 & 1 \\ -2 & s \end{array}\right]
Hence 因此
x ( s ) = 1 ( s + 1 ) ( s + 2 ) [ s + 3 1 2 s ] [ 0 1 ] u ( s ) = 1 ( s + 1 ) ( s + 2 ) [ 1 s ] u ( s ) x ( s ) = 1 ( s + 1 ) ( s + 2 ) s + 3 1 2 s 0 1 u ( s ) = 1 ( s + 1 ) ( s + 2 ) 1 s u ( s ) {:[x(s)=(1)/((s+1)(s+2))[[s+3,1],[-2,s]][[0],[1]]u(s)],[=(1)/((s+1)(s+2))[[1],[s]]u(s)]:}\begin{gathered} \mathbf{x}(s)=\frac{1}{(s+1)(s+2)}\left[\begin{array}{cc} s+3 & 1 \\ -2 & s \end{array}\right]\left[\begin{array}{l} 0 \\ 1 \end{array}\right] u(s) \\ =\frac{1}{(s+1)(s+2)}\left[\begin{array}{l} 1 \\ s \end{array}\right] u(s) \end{gathered}
Suppose that 假设
y ( s ) = [ 1 1 ] x ( s ) = 1 ( s + 2 ) u ( s ) y ( s ) = 1      1 x ( s ) = 1 ( s + 2 ) u ( s ) y(s)=[[1,1]]x(s)=(1)/((s+2))u(s)\mathbf{y}(s)=\left[\begin{array}{ll} 1 & 1 \end{array}\right] \mathbf{x}(s)=\frac{1}{(s+2)} u(s)
A zero is generated by the output connection. This system is controllable, but not observable.
零是通过输出连接生成的。该系统是可控的,但不可观察。

For a system to be observable the matrix Q Q Q\mathbf{Q}, must be full rank where
为了使系统可观测,矩阵 Q Q Q\mathbf{Q} 必须是满秩的
Q = [ c c A c A 2 c A n 1 ] Q = c c A c A 2 c A n 1 Q=[[c],[cA],[cA^(2)],[vdots],[cA^(n-1)]]\mathbf{Q}=\left[\begin{array}{c} \mathbf{c} \\ \mathbf{c A} \\ \mathbf{c A}^{2} \\ \vdots \\ \mathbf{c A}^{n-1} \end{array}\right]
and y = c x y = c x y=cx\mathbf{y}=\mathbf{c x}.  y = c x y = c x y=cx\mathbf{y}=\mathbf{c x}
Note that Q Q Q\mathbf{Q} depends only on the coefficients in A A A\mathbf{A} and the output or measurement matrix c c c\mathbf{c}.
请注意, Q Q Q\mathbf{Q} 仅依赖于 A A A\mathbf{A} 中的系数和输出或测量矩阵 c c c\mathbf{c}

Figure 5: Block diagram 图 5:框图
The addition of more measurements may satisfy the observability requirement (i.e. modify matrix c c c\mathbf{c} ), and further controls or the inputs may satisfy the controllability matrix.
增加更多的测量可能满足可观测性要求(即修改矩阵 c c c\mathbf{c} ),进一步的控制或输入可能满足可控性矩阵。

This highlights the problem of transfer function testing. The inputs may cause oscillations, which are not observed. Therefore, the transfer function matrix determined by experiment will yield the correct plant model only if the system is observable and controllable.
这突出了传递函数测试的问题。输入可能会导致振荡,而这些振荡并未被观察到。因此,实验确定的传递函数矩阵只有在系统可观测和可控的情况下,才能产生正确的植物模型。

Matlab commands to test observability:
测试可观性的 Matlab 命令:
Ob=Obsv(A,C)
UnObs=Length (A) - rank (Ob)
未观察数 = 长度 (A) - 排名 (Ob)

Summary 摘要

(i) If the system is observable and controllable then the response of the output reflects changes in the input.
如果系统是可观察和可控的,那么输出的响应会反映输入的变化。

(ii) If the system is controllable and not observable then changing the input has a controlling effect but it cannot be observed at the output.
如果系统是可控的但不可观测,那么改变输入会产生控制效果,但在输出中无法观察到。

(iii) If the system is observable and not controllable then you can observe the output response but you cannot control it by changing the input.
(iii) 如果系统是可观测的但不可控的,那么你可以观察到输出响应,但无法通过改变输入来控制它。

(iv) If the system is not observable and not controllable then you cannot compare the output response with changes in the input.
如果系统不可观测且不可控,则无法将输出响应与输入的变化进行比较。

Appendix B - Transformation of state space system
附录 B - 状态空间系统的变换

The method to convert a transfer function into a representation given by (for a 3rd order SISO system)
将传递函数转换为表示的方法(对于一个三阶 SISO 系统)
A ~ = [ 0 1 0 0 0 1 a 3 a 2 a 1 ] B ~ = [ b 1 b 2 b 3 ] C ~ = [ 1 0 0 ] D ~ = d A ~ = 0 1 0 0 0 1 a 3 a 2 a 1 B ~ = b 1 b 2 b 3 C ~ = 1 0 0 D ~ = d {:[ tilde(A)=[[0,1,0],[0,0,1],[-a_(3),-a_(2),-a_(1)]]],[ tilde(B)=[[b_(1)],[b_(2)],[b_(3)]]],[ tilde(C)=[[1,0,0]]],[ tilde(D)=d]:}\begin{aligned} \tilde{A} & =\left[\begin{array}{ccc} 0 & 1 & 0 \\ 0 & 0 & 1 \\ -a_{3} & -a_{2} & -a_{1} \end{array}\right] \\ \tilde{B} & =\left[\begin{array}{l} b_{1} \\ b_{2} \\ b_{3} \end{array}\right] \\ \tilde{C} & =\left[\begin{array}{lll} 1 & 0 & 0 \end{array}\right] \\ \tilde{D} & =d \end{aligned}
where the characteristic equation s 3 + a 1 s 2 + a 2 s + a 3 = 0 = det ( s I A ) s 3 + a 1 s 2 + a 2 s + a 3 = 0 = det ( s I A ) s^(3)+a_(1)s^(2)+a_(2)s+a_(3)=0=det(sI-A)s^{3}+a_{1} s^{2}+a_{2} s+a_{3}=0=\operatorname{det}(s I-A).
特征方程 s 3 + a 1 s 2 + a 2 s + a 3 = 0 = det ( s I A ) s 3 + a 1 s 2 + a 2 s + a 3 = 0 = det ( s I A ) s^(3)+a_(1)s^(2)+a_(2)s+a_(3)=0=det(sI-A)s^{3}+a_{1} s^{2}+a_{2} s+a_{3}=0=\operatorname{det}(s I-A)

To transform any state space system represented by ( A , B , C , D ) ( A , B , C , D ) (A,B,C,D)(A, B, C, D) into the representation given by ( A ~ , B ~ , C ~ , D ~ ) ( A ~ , B ~ , C ~ , D ~ ) ( tilde(A), tilde(B), tilde(C), tilde(D))(\tilde{A}, \tilde{B}, \tilde{C}, \tilde{D}), we can use the transformation
要将任何由 ( A , B , C , D ) ( A , B , C , D ) (A,B,C,D)(A, B, C, D) 表示的状态空间系统转换为由 ( A ~ , B ~ , C ~ , D ~ ) ( A ~ , B ~ , C ~ , D ~ ) ( tilde(A), tilde(B), tilde(C), tilde(D))(\tilde{A}, \tilde{B}, \tilde{C}, \tilde{D}) 给出的表示,我们可以使用以下变换
A ~ = S A S 1 B ~ = S B C ~ = C S 1 D ~ = D A ~ = S A S 1 B ~ = S B C ~ = C S 1 D ~ = D {:[ tilde(A)=SAS^(-1)],[ tilde(B)=SB],[ tilde(C)=CS^(-1)],[ tilde(D)=D]:}\begin{aligned} \tilde{A} & =S A S^{-1} \\ \tilde{B} & =S B \\ \tilde{C} & =C S^{-1} \\ \tilde{D} & =D \end{aligned}
where S S SS is the observability matrix given by
其中 S S SS 是由以下公式给出的可观测性矩阵
S = [ C C A C A 2 ] S = C C A C A 2 S=[[C],[CA],[CA^(2)]]S=\left[\begin{array}{c} C \\ C A \\ C A^{2} \end{array}\right]
Proof: It is clear that C ~ S = C C ~ S = C tilde(C)S=C\tilde{C} S=C hence C ~ = C S 1 C ~ = C S 1 tilde(C)=CS^(-1)\tilde{C}=C S^{-1}.
证明:显然 C ~ S = C C ~ S = C tilde(C)S=C\tilde{C} S=C ,因此 C ~ = C S 1 C ~ = C S 1 tilde(C)=CS^(-1)\tilde{C}=C S^{-1}

Now A ~ = S A S 1 A ~ = S A S 1 tilde(A)=SAS^(-1)\tilde{A}=S A S^{-1}, so A ~ S = S A A ~ S = S A tilde(A)S=SA\tilde{A} S=S A. Expanding A ~ S A ~ S tilde(A)S\tilde{A} S gives
现在 A ~ = S A S 1 A ~ = S A S 1 tilde(A)=SAS^(-1)\tilde{A}=S A S^{-1} ,所以 A ~ S = S A A ~ S = S A tilde(A)S=SA\tilde{A} S=S A 。扩展 A ~ S A ~ S tilde(A)S\tilde{A} S 得到
A ~ S = C [ A A 2 a 3 I a 2 A a 1 A 2 ] A ~ S = C A A 2 a 3 I a 2 A a 1 A 2 tilde(A)S=C[[A],[A^(2)],[-a_(3)I-a_(2)A-a_(1)A^(2)]]\tilde{A} S=C\left[\begin{array}{c} A \\ A^{2} \\ -a_{3} I-a_{2} A-a_{1} A^{2} \end{array}\right]
and expanding S A S A SAS A gives
和扩展 S A S A SAS A 给予
S A = C [ A A 2 A 3 ] S A = C A A 2 A 3 SA=C[[A],[A^(2)],[A^(3)]]S A=C\left[\begin{array}{c} A \\ A^{2} \\ A^{3} \end{array}\right]
Now from the Cayley-Hamilton theorem, A 3 + a 1 A 2 + a 2 A + a 3 I = 0 A 3 + a 1 A 2 + a 2 A + a 3 I = 0 A^(3)+a_(1)A^(2)+a_(2)A+a_(3)I=0A^{3}+a_{1} A^{2}+a_{2} A+a_{3} I=0, hence A ~ S = S A A ~ S = S A tilde(A)S=SA\tilde{A} S=S A.
现在根据凯莱-哈密顿定理, A 3 + a 1 A 2 + a 2 A + a 3 I = 0 A 3 + a 1 A 2 + a 2 A + a 3 I = 0 A^(3)+a_(1)A^(2)+a_(2)A+a_(3)I=0A^{3}+a_{1} A^{2}+a_{2} A+a_{3} I=0 ,因此 A ~ S = S A A ~ S = S A tilde(A)S=SA\tilde{A} S=S A