MIMO PID 调节示例
参考:Tune MIMO Control System for Specified Bandwidth - MATLAB & Simulink (mathworks.com)
Decoupling Controller for a Distillation Column - MATLAB & Simulink (mathworks.com)
程序
clc;clear; close all; s = tf('s'); G = 1/(75*s+1)*[87.8 -86.4; 108.2 -109.6] G.InputName = {'qL','qV'}; G.OutputName = 'y'; sys_ss = ss(G); [AS,BS,CS,DS] =ssdata(sys_ss); D = tunableGain('Decoupler',eye(2)); D.InputName = 'e'; D.OutputName = {'pL','pV'}; PI_L = tunablePID('PI_L','pi'); PI_L.InputName = 'pL'; PI_L.OutputName = 'qL'; PI_V = tunablePID('PI_V','pi'); PI_V.InputName = 'pV'; PI_V.OutputName = 'qV'; sum1 = sumblk('e = r - y',2); C0 = connect(PI_L,PI_V,D,sum1,{'r','y'},{'qL','qV'}); wc = [0.1,1]; [G,C,gam,Info] = looptune(G,C0,wc); showTunable(C) T = connect(G,C,'r','y'); step(T)
输出结果:
sys_ss = A = x1 x2 x1 -0.01333 0 x2 0 -0.01333 B = qL qV x1 2 0 x2 0 2 C = x1 x2 y(1) 0.5853 -0.576 y(2) 0.7213 -0.7307 D = qL qV y(1) 0 0 y(2) 0 0 Continuous-time state-space model. AS = -0.0133 0 0 -0.0133 BS = 2 0 0 2 CS = 0.5853 -0.5760 0.7213 -0.7307 DS = 0 0 0 0 Final: Peak gain = 0.973, Iterations = 19 Achieved target gain value TargetGain=1. Decoupler = D = u1 u2 y1 2.139 -1.303 y2 -1.584 1.295 Name: Decoupler Static gain. ----------------------------------- PI_L = 1 Kp + Ki * --- s with Kp = 1.5, Ki = 0.0429 Name: PI_L Continuous-time PI controller in parallel form. ----------------------------------- PI_V = 1 Kp + Ki * --- s with Kp = -1.74, Ki = -0.0532 Name: PI_V Continuous-time PI controller in parallel form.
输出响应曲线:
依照参考网页搭建simulink模型
输出响应: