📄 imgpc_constraints.m
字号:
%%%%% Constraints are summarised as
%%%%% umin < u < umax and | Du | < Dumax
%%%%%
%%%%% or CC*ufut -dfixed - dxu*u(k-1)<=0
%%%%% [Note: absolute inputs not increments]
%%%%%
%%%%% nu is the control horizon
%%%%%
%%%%% [CC,dfixed,dxu] = imgpc_constraints(nu,umin,umax,Dumax)
%%
%% Author: J.A. Rossiter (email: J.A.Rossiter@shef.ac.uk)
function [CC,dfixed,dxu] = imgpc_constraints(nu,umin,umax,Dumax)
sizeu = length(umax);
%%%%% Absolute limits
CC=[eye(nu*sizeu);-eye(nu*sizeu)];
dfixed=[umax;-umin];
for k=2:nu;
dfixed = [umax;dfixed;-umin];
end
%%%% rate limits
[Cd,Hd] = caha([eye(sizeu),-eye(sizeu)],sizeu,nu);
CCR=[Cd;-Cd];
dfixedr=[Dumax];
for k=2:2*nu;
dfixedr = [dfixedr;Dumax];
end
dxu=[zeros(2*nu*sizeu,sizeu);-Hd;Hd];
%%% All limits
CC=[CC;CCR];
dfixed = [dfixed;dfixedr];
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -