Design Family of PID Controllers for Multiple Operating Points
This example shows how to design an array of PID controllers for a nonlinear plant in Simulink® that operates over a wide range of operating points.
Open Plant Model
The plant is a continuous stirred tank reactor (CSTR) that operates over a wide range of operating points. A single PID controller can effectively use the coolant temperature to regulate the output concentration around a small operating range for which the PID controller is designed. However, since the plant is a strongly nonlinear system, control performance degrades if the operating point changes significantly. The closed-loop system can even become unstable.
打开CSTR工厂模型。
mdl =“scdcstrctrlplant';open_system(mdl)
For more information on this system, see [1].
Introduction to Gain Scheduling
解决非线性控制问题的常见方法是使用线性控制器使用增益调度。一般来说,设计增益调度控制系统需要四个步骤。
Obtain a plant model for each operating region. The usual practice is to linearize the plant at several equilibrium operating points.
设计一系列线性控制器,例如PID控制器,用于在上一步中获得的工厂模型。
实现调度机制,使得基于调度变量的值改变诸如PID增益的控制器系数。控制器之间的平滑(无压力)在控制器之间传输,以最大限度地减少对工厂操作的干扰。
Assess control performance with simulation.
For more information on gain scheduling, see [2].
此示例侧重于设计非线性CSTR工厂的PID控制器系列。
Obtain Linear Plant Models for Multiple Operating Points
输出集中C
is used to identify different operating regions. The CSTR plant can operate at any conversion rate between a low conversion rate (C
=9.
)和高转换率(C
=2
的)。In this example, divide the operating range into eight regions represented byC
=2
通过9.
。
Specify the operating regions.
C = [2 3 4 5 6 7 8 9];
创建默认操作点规范数组。
op = operspec(mdl,numel(c));
通过指定输出浓度是已知值并指定输出浓度值来初始化操作点规范。
为了ct = 1:numel(c)op(ct).outputs.known = true;OP(CT).outputs.y = C(CT);结尾
Compute the equilibrium operating points corresponding to the values ofC
。
OPOINT = SINDOP(MDL,OP,FindopOptions('displayReport'那'off'));
Linearize the plant at these operating points.
植物=线性化(MDL,OPOINT);
由于CSTR工厂是非线性的,线性模型显示不同的特性。例如,具有高和低转换率的植物模型是稳定的,而其他工厂模型也不是。
isstable(Plants,“elem”'
ans = 1x8逻辑阵列1 1 0 0 0 0 1 1
Design PID Controllers for the Plant Models
要以批次设计多个PID控制器,请使用pidtune
功能。以下命令以并行形式生成一个PID控制器数组。所需的开环交叉频率是在1
RAD / SEC和相位余量是默认值60.
程度。
控制器= PidTune(植物,'pidf'那1的);
显示控制器C
=4.
。
Controllers(:,:,4)
ans = 1 s kp + ki * --- + kd * -------- s tf * s + 1带kp = -12.4,ki = -1.74,kd = -16,tf = 0.00875连续时间PIDF控制器以并行形式。
为了分析步骤设定点跟踪的闭环响应,首先构造闭环系统。
CLSYS =反馈(植物*控制器,1);
绘制闭环响应。
figure holdon为了ct = 1:长度(c)%从LTI数组中选择一个系统sys = clsys(::,ct);sys.name = ['C=',num2str(c(ct))];sys.inputname =.'Reference';%绘图步骤响应Stepplot(SYS,20);结尾传奇('显示'那'地点'那'southeast'的)
All the closed loops are stable, but the overshoots of the loops with unstable plants (C
=4.
, 通过7.
的)are too large. To improve the results for the unstable plant models, increase the target open-loop bandwidth to10.
rad/sec.
控制器= PidTune(植物,'pidf'那10);
显示控制器C
=4.
。
Controllers(:,:,4)
ans = 1 s kp + ki * --- + kd * -------- s tf * s + 1带kp = -283,ki = -151,kd = -128,tf = 0.0183连续时间PIDF控制器以并行形式。
构造闭环系统,并对新控制器绘制闭环步骤响应。
CLSYS =反馈(植物*控制器,1);figure holdon为了ct = 1:长度(c)%从LTI数组中选择一个系统。sys = clsys(::,ct);set(sys,'姓名'那['C=',num2str(c(ct))],'InputName'那'Reference'的);% Plot the step response.stepplot(sys,20)结尾传奇('显示'那'地点'那'southeast'的)
All the closed-loop responses are now satisfactory. For comparison, examine the response when you use the same controller at all operating points. Create another set of closed-loop systems, where each one uses theC
=2
控制器,并绘制他们的回答。
CLSYS_FLAT =反馈(植物*控制器(:,:,1),1);图Stepplot(CLSYS,CLSYS_FLAT,20)图例('C取依赖控制器'那'单控制器'的)
针对每个浓度分开设计的PID控制器阵列提供比单个控制器更好的性能。
然而,基于全非线性系统的线性近似来计算上面所示的闭环响应。要验证设计,请使用PID控制器块在模型中实现调度机制,如图所示Implement Gain-Scheduled PID Controllers。
关闭模型。
bdclose(mdl)
References
[1] Seborg, Dale E., Thomas F. Edgar, and Duncan A. Mellichamp.过程动态和控制。2nd ed., John Wiley & Sons, Inc, 2004, pp. 34-36.
[2] Rugh, Wilson J., and Jeff S. Shamma. 'Research on Gain Scheduling'.自动36,不。10(2000年10月):1401-1425。