模型预测控制4-MIMO-Example_第1页
模型预测控制4-MIMO-Example_第2页
模型预测控制4-MIMO-Example_第3页
模型预测控制4-MIMO-Example_第4页
模型预测控制4-MIMO-Example_第5页
已阅读5页,还剩33页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

第七章模型预测控制算法

之二~5-状态方程模型杨根科上海交通大学自动化系2011年3月第7章模型预测控制4-MIMO-Example内容提要概述动态矩阵控制---状态方程模型动态矩阵控制的进一步讨论模型算法控制应用第7章模型预测控制4-MIMO-Example动态矩阵控制---状态方程模型Matlab6.5---参考MPC.pdfMatlab7.1---在线第7章模型预测控制4-MIMO-Example动态矩阵控制---参数设置对性能作用MPCControlofaDCServomotor第7章模型预测控制4-MIMO-Example动态矩阵控制---未建模动态对性能作用ApositionservomechanismconsistsofaDCmotor,gearbox,elasticshaft,andaload,参数含义第7章模型预测控制4-MIMO-Example动态矩阵控制---参数设置对性能作用参数含义第7章模型预测控制4-MIMO-Example动态矩阵控制---参数设置对性能作用参数含义Thecontrollermustsettheload'sangularpositionqLatadesiredvaluebyadjustingtheappliedvoltage,V.measurementavailableforfeedbackisqL.Fromaninput/outputviewpoint,theplanthasasingleinput,V,whichismanipulatedbythecontroller.Ithastwooutputs,onemeasuredandfeadbacktothecontroller,qL,andoneunmeasured,T.第7章模型预测控制4-MIMO-Example动态矩阵控制---参数设置对性能作用Asingleinput,V,onemeasuredandfeadbacktothecontroller,qL,andoneunmeasured,T.第7章模型预测控制4-MIMO-Example动态矩阵控制---参数设置对性能作用第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-SimulinkDesign第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-SIMO模型描述参数与模型设计MpcMotorModel.m第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-模型描述SYS=SS(A,B,C,D)createsaSSobjectSYSrepresentingthecontinuous-timestate-spacemodeldx/dt=Ax(t)+Bu(t)y(t)=Cx(t)+Du(t)第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-模型描述sys

a=x1x2x3x4x10100x2-51.21-12.560x30001x41280-6.401-10.2

b=u1x10x20x30x41

c=x1x2x3x4y11000y212800-64.010

d=u1y10y20

第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-模型描述umin=-220;umax=220;%控制约束dumin=-Inf;dumax=Inf;%控制增量约束ymin=-ymax;ymax=[InfVmax];%输出约束%Vmax=tauam*pi*dshaft^3/16=78.5;%MaximumadmissibletorqueTs=0.1;Tstop=200*Ts;uweight=0;duweight=.05;yweight=10*[10];%y2转矩没有权系数第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-模型描述备注:下面文件单独键入运行界面ManipulatedVariables=struct('Min',umin,'Max',umax,'Units','V');OutputVariables(1)=struct('Min',-Inf,'Max',Inf,'Units','rad');OutputVariables(2)=struct('Min',Vmin,'Max',Vmax,'Units','Nm');Weights=struct('Input',uweight,'InputRate',duweight,'Output',yweight);clearModelModel.Plant=sys;Model.Plant.OutputGroup={1'Measured';2'Unmeasured'};PredictionHorizon=10;ControlHorizon=2;第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-模型描述CreateMPCobjectinworkspaceServoMPC=mpc(Model,Ts,PredictionHorizon,ControlHorizon);ServoMPC.Weights=Weights;ServoMPC.ManipulatedVariables=ManipulatedVariables;ServoMPC.OutputVariables=OutputVariables;第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-参数设置对性能作用仿真运行Simulink仿真mpc_motor.m第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-Simulink仿真第7章模型预测控制4-MIMO-ExampleMPCControlofaDCServomotor-Analysis仿真运行Simulink仿真mpc_motor.m第7章模型预测控制4-MIMO-Example动态矩阵控制---扰动情形扰动情形分析MPCControlofaMulti-InputSingle-Outputsystemmpc_misonoise第7章模型预测控制4-MIMO-Example动态矩阵控制---例子2状态方程模型sys=ss(tf({1,1,1},{[1.51],[11],[.7.51]}),'min');tf({1,1,1},{[1.51],[11],[.7.51]})?第7章模型预测控制4-MIMO-Example动态矩阵控制---例子(离散)状态方程模型Ts=.2;%samplingtimemodel=c2d(sys,Ts);%predictionmodel第7章模型预测控制4-MIMO-Example动态矩阵控制---例子与阶跃响应模型关系step(model)第7章模型预测控制4-MIMO-Example动态矩阵控制---例子阶跃响应模型S=step(model)

?S=[S(:,:,1),S(:,:,2),S(:,:,3)]?S(k,j,i),时间k,输出j,输入i第7章模型预测控制4-MIMO-Example动态矩阵控制---可测/不可测系统输入Definetypeofinputsignals:thefirstsignalisamanipulatedvariable,thesecondsignalisameasureddisturbance,thethirdoneisanunmeasureddisturbancemodel=setmpcsignals(model,'MV',1,'MD',2,'UD',3);第7章模型预测控制4-MIMO-Example动态矩阵控制---可测/不可测系统输入DefinethestructureofmodelsusedbytheMPCcontrollerModel=[];%resetstructureModelModel.Plant=model;第7章模型预测控制4-MIMO-Example动态矩阵控制---例子%Disturbancemodel:Integratordrivenbywhitenoisewithvariance=1000Model.Disturbance=tf(sqrt(1000),[10]);p=40;m=3;MPCobj=mpc(Model,Ts,p,m);MPCobj.MV=struct('Min',0,'Max',1,'RateMin',-10,'RateMax',10);第7章模型预测控制4-MIMO-Example动态矩阵控制---例子Thecontinuous-timeplanttobecontrolledhasthefollowingstate-spacerealization:[A,B,C,D]=ssdata(sys);第7章模型预测控制4-MIMO-Example动态矩阵控制---例子Nowsimulateclosed-loopMPCinSimulinkTstop=30;%Simulationtimempc_miso解释:t=10,20时加入可测/不可测系统输入的动态特性第7章模型预测控制4-MIMO-Example动态矩阵控制---例子mpc_miso第7章模型预测控制4-MIMO-Example动态矩阵控制---可测测量干扰%Let'ssayweknowthatoutputmeasurementsareaffectedbyasinusoidal%measurementnoiseoffrequency0.1Hz.WewanttoinformtheMPCobject%aboutthissothatstateestimatescanbeimprovedomega=2*pi/10;MPCobj.Model.Noise=0.5*tf(omega^2,[10omega^2]);%%%WealsorevisedtheMPCdesignMPCobj.Model.Disturbance=.1;%Modelforunmeasureddisturbance=whiteGaussiannoisewithzeromeanandvariance0.01MPCobj.weights=struct('MV',0,'MVRate',0.1,'OV',.005);MPCobj.predictionhorizon=40;MPCobj.controlhorizon=3;

第7章模型预测控制4-MIMO-Example动态矩阵控制---可测测量干扰

备注-前1:sys=ss(tf({1,1,1},{[1.51],[11],[.7.51]}),'min');Ts=.2;%samplingtimemodel=c2d(sys,Ts);%predictionmodelmodel=setmpcsignals(model,'MV',1,'MD',2,'UD',3);Model=[];%resetstructureModelModel.Plant=model;%Disturbancemodel:Integratordrivenbywhitenoisewithvariance=1000Model.Disturbance=tf(sqrt(1000),[10]);第7章模型预测控制4-MIMO-Example动态矩阵控制---可测测量干扰

备注-前2:Model.Disturbance=tf(sqrt(1000),[10]);p=[];m=3;MPCobj=m

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论