复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40function [Phi_Phi,Phi_F,Phi_R,A_e, B_e,C_e]=mpcgain(Ap,Bp,Cp,Nc,Np); %Nc control horizon %Np prediction horizon %program created for assignment number 2 [m1,n1]=size(Cp); [n1,n_in]=size(Bp); %nl-- dimension of the state variables; %ml-- number of outputs; %n_in-- number of inputs. %%%%%%%%%%%%%%%% %Augment state equations %%%%%%%%%%%%%%%% A_e=eye(n1+m1,n1+m1); A_e(1:n1,1:n1)=Ap; A_e(n1+1:n1+m1,1:n1)=Cp*Ap; B_e=zeros(n1+m1,n_in); B_e(1:n1,:)=Bp; B_e(n1+1:n1+m1,:)=Cp*Bp; C_e=zeros(m1,n1+m1); C_e(:,n1+1:n1+m1)=eye(m1,m1); %dimension of the extended state space n=n1+m1; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% h(1,:)=C_e; %scalar for single-input and single-output system F(1,:)=C_e*A_e; % row vector (1xn) one row all column for kk=2:Np h(kk,:)=h(kk-1,:)*A_e; F(kk,:)= F(kk-1,:)*A_e; end v=h*B_e; Phi=zeros(Np,Nc); %declare the dimension of Phi Phi(:,1)=v; % first column for i=2:Nc Phi(:,i)=[zeros(i-1,1);v(1:Np-i+1,1)]; %Toplitz matrix end BarRs=ones(Np,1); Phi_Phi= Phi'*Phi; Phi_F= Phi'*F; Phi_R=Phi'*BarRs;
最后
以上就是多情白云最近收集整理的关于MPC-连续性模型离散化函数的全部内容,更多相关MPC-连续性模型离散化函数内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复