💥💥💞💞欢迎来到本博客❤️❤️💥💥
🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。
⛳️座右铭:行百里者,半于九十。
📋📋📋本文目录如下:🎁🎁🎁
目录
💥1 概述
非线性模型预测控制(Model Predictive Control, MPC)是一种常用的控制方法,可以应用于多种系统,包括非线性系统。MPC基于离散化的模型和未来时间段的优化问题,通过迭代地求解优化问题来生成控制策略。
针对非线性MPC问题的求解研究,可以涉及以下几个方面:
1. 模型表达:选择合适的非线性模型来描述系统动态,并通过合适的数学表达式来表示其非线性特性。
2. 离散化:将连续时间的非线性模型离散化为离散时间的模型,一般使用数值方法(如欧拉法或龙格-库塔法)来进行离散化。
3. 优化问题设计:将控制问题转化为一个优化问题,通过最小化指定的性能指标(例如系统状态的跟踪误差、控制输入的幅值等),得到最优的控制策略。
4. 求解技术:针对离散化的优化问题,可以采用各种数值优化方法进行求解,例如序列二次规划(Sequential Quadratic Programming, SQP)、内点法(Interior Point Method, IPM)等。
5. 稳定性分析:对于非线性MPC控制器,稳定性是一个重要的考虑因素。需要研究控制系统的稳定性条件,确保控制器能够产生稳定的闭环系统。
通过对以上几个方面的研究,可以实现对非线性模型预测控制问题的求解,并得到有效的控制策略。当然,具体的研究方法和算法选择还需要根据具体问题的特点和要求来确定。
📚2 运行结果
可视化:
% Plot the results
% Plant: Controlled by PI controller
% Strip off last computed value of h
hhp=hp(timeref);
figure(2)
clf
subplot(211)
plot(time,hhp,'k-',time,ref,'b--')
grid
ylabel('Liquid height, h')
title('Liquid level h and reference input r (plant)')
subplot(212)
plot(time,up,'k-')
grid
title('Tank input, u')
xlabel('Time, k')
axis([min(time) max(time) -50 50])
% Model: Controlled by PI controller
% Strip off last computed value of hmm
hhm=hmm(timeref);
figure(3)
clf
subplot(211)
plot(time,hhm,'k-',time,ref,'k--')
grid
ylabel('Liquid height, h_m')
title('Liquid level h_m and reference input r (model)')
subplot(212)
plot(time,umm,'k-')
grid
title('Tank input, u_m')
xlabel('Time, k')
axis([min(time) max(time) -50 50])
% Difference between plant and model: Controlled by PI controller
% Strip off last computed value of hmm
figure(4)
clf
subplot(211)
plot(time,hhp-hhm,'k-')
grid
title('Liquid height error')
subplot(212)
plot(time,up-umm,'k-')
grid
title('Tank input error')
xlabel('Time, k')
%-----------------------------------------------------------
% Planning system results
% Strip off last computed value of h
hh=h(timeref);
figure(5)
clf
subplot(211)
plot(time,hh,'k-',time,ref,'k--')
grid
ylabel('Liquid height, h')
title('Liquid level h and reference input r')
subplot(212)
plot(time,u,'k-')
grid
title('Tank input, u')
xlabel('Time, k')
axis([min(time) max(time) -50 50])
figure(6)
clf
plot(time,rowindex,'k-',time,colindex,'k--')
axis([min(time) max(time) 0 max(length(Kpvec),length(Kivec))])
grid
title('Indices of plan (row=solid, column=dashed)')
ylabel('Row and column indices')
xlabel('Time, k')
% Next, study the effect of the projection length N
figure(7)
clf
plot(NN,trackerrorenergy,'b-',NN,trackerrorenergy,'ro')
title('Tracking energy vs. projection length N')
xlabel('Projection length N')
figure(8)
clf
plot(NN,inputenergy,'b-',NN,inputenergy,'ro')
title('Control energy vs. projection length N')
xlabel('Projection length N')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End of program
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Plot the results
% Plant: Controlled by PI controller
% Strip off last computed value of h
hhp=hp(timeref);
figure(2)
clf
subplot(211)
plot(time,hhp,'k-',time,ref,'b--')
grid
ylabel('Liquid height, h')
title('Liquid level h and reference input r (plant)')
subplot(212)
plot(time,up,'k-')
grid
title('Tank input, u')
xlabel('Time, k')
axis([min(time) max(time) -50 50])
% Model: Controlled by PI controller
% Strip off last computed value of hmm
hhm=hmm(timeref);
figure(3)
clf
subplot(211)
plot(time,hhm,'k-',time,ref,'k--')
grid
ylabel('Liquid height, h_m')
title('Liquid level h_m and reference input r (model)')
subplot(212)
plot(time,umm,'k-')
grid
title('Tank input, u_m')
xlabel('Time, k')
axis([min(time) max(time) -50 50])
% Difference between plant and model: Controlled by PI controller
% Strip off last computed value of hmm
figure(4)
clf
subplot(211)
plot(time,hhp-hhm,'k-')
grid
title('Liquid height error')
subplot(212)
plot(time,up-umm,'k-')
grid
title('Tank input error')
xlabel('Time, k')
%-----------------------------------------------------------
% Planning system results
% Strip off last computed value of h
hh=h(timeref);
figure(5)
clf
subplot(211)
plot(time,hh,'k-',time,ref,'k--')
grid
ylabel('Liquid height, h')
title('Liquid level h and reference input r')
subplot(212)
plot(time,u,'k-')
grid
title('Tank input, u')
xlabel('Time, k')
axis([min(time) max(time) -50 50])
figure(6)
clf
plot(time,rowindex,'k-',time,colindex,'k--')
axis([min(time) max(time) 0 max(length(Kpvec),length(Kivec))])
grid
title('Indices of plan (row=solid, column=dashed)')
ylabel('Row and column indices')
xlabel('Time, k')
% Next, study the effect of the projection length N
figure(7)
clf
plot(NN,trackerrorenergy,'b-',NN,trackerrorenergy,'ro')
title('Tracking energy vs. projection length N')
xlabel('Projection length N')
figure(8)
clf
plot(NN,inputenergy,'b-',NN,inputenergy,'ro')
title('Control energy vs. projection length N')
xlabel('Projection length N')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% End of program
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
🎉3 参考文献
文章中一些内容引自网络,会注明出处或引用为参考文献,难免有未尽之处,如有不妥,请随时联系删除。
[1]修观.非线性模型预测控制方法在滑翔弹道控制中的应用研究[D].南京理工大学,2011.DOI:10.7666/d.y1919740.
[2]陈垣君.基于LPV模型非线性预测控制的精细化建模及精确求解[D].浙江大学,2015.
[3]谢树光.非线性模型预测控制(NMPC)在微型飞行器自适应控制中的应用[J]. 2002.