带MPC的自适应巡航控制项目(Matlab代码实现)

    目录

💥1 概述

📚2 运行结果

🎉3 参考文献

👨‍💻4 Matlab代码

💥1 概述

模型预测控制 (MPC) 方法在基本的自适应巡航控制 (ACC) 系统上实施。车辆以恒定速度移动,后方车辆接近前方车辆,并应保持相同的速度。使用MPC控制器,可以在指定的输入约束下实现所需的稳定性,并达到恒定的前方车辆速度的目标速度。将结果与使用线性二次调节器(LQR)的结果进行比较。 通过MATLAB仿真,表明所提出的MPC策略能够将车辆保持在指定的约束条件下。

自适应巡航控制 (ACC) 系统又称主动巡航控制系统, 是在传统定速巡航控制基础上结合了车距保持功能, 利用车载雷达探测前方行驶环境, 通过控制节气门和制动系统自动调整车速, 提高驾驶舒适性和安全性.

ACC的历史可以追溯至20世纪70年代, 1971年, 美国EATON (伊顿) 公司便已从事这方面的开发, 其雏形是日本三菱公司提出的PDC (preview distance control) 系统.1995年三菱汽车在日本市场推出首款ACC系统, 此后丰田、本田、通用、福特、戴姆勒、博世等公司也投入研发行列.纵观ACC系统的发展历程, 可以分为三个阶段:第一阶段为20世纪90年代初针对高速公路的ACC系统, 主要实现定速巡航和安全车距功能;第二阶段为20世纪90年代末针对城市工况的ACC系统, 即起-停巡航系统 (stop&go cruise control, SG-ACC) , 实现自动起步、停车和低速跟车功能;第三阶段为21世纪初至今综合考虑燃油经济性、跟踪性能和驾驶员感受的多目标协调式ACC系统.此外, ACC的功能也在不断扩展,如将ACC与车道保持相结合、ACC与避撞相结合、ACC与车道变更相结合等, 突破传统ACC仅纵向跟车功能局限, 进一步实现汽车辅助安全驾驶.

在基本自适应巡航控制(ACC)系统上实现了模型预测控制(MPC)方法。车辆以恒定速度行驶,后面的车辆接近前面的车辆,并应保持相同的速度。使用MPC控制器,在指定的输入约束和恒定前行车辆速度的目标速度下实现所需的稳定性。通过在MATLAB中的仿真,表明所提出的MPC策略能够将车辆保持在指定的约束条件下。

📚2 运行结果

主函数部分代码:

%% Model Predictive Control Project - SC42125
% MPC for basic ACC System
% Nikhil Hudrali Nagendra (5049628) // Yen-Lin Wu (4848489)
clc;
clear all;
close all;
addpath('Code/');
​
%%
disp('--- Model Predictive Control of a Basic Adaptive Cruise Control ---');
disp('Choose one of the options below');
disp('1. Basic ACC');
disp('2. ACC MPC and ACC LQR Comparison');
disp('3. MPC of ACC with varying prediction horizon N');
disp('
4.
 MPC 
of
ACC
with
varying
 Q
');
disp('
5.
 MPC 
of
ACC
with
varying
 R
');
disp('
6.
 MPC 
of
ACC
with
varying
 distance 
between
 cars
');
disp('
7.
 Stability analysis
');
disp('
0.
Exit
');
pause(1);
choice = input('
Please 
choose
--> ');
switch choice
    case 1
        close all;
        figure(1);
        ACC_MPC_Final;
        disp('Do you want to run another simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y'
            main;
        else
            disp('Goodbye!');
        end
    case 2
        close all;
        figure(2);
        LQR_ACC;
        disp('Do you want to run another simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y'
            main;
        else
            disp('Goodbye!');
        end
    case 3
        close all;
        figure(3);
        ACC_MPC_varying_N;
        disp('Do you want to run another simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y'
            main;
        else
            disp('Goodbye!');
        end
    case 4
        close all;
        figure(4);
        ACC_MPC_varying_Q;
        disp('Do you want to run another simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y'
            main;
        else
            disp('Goodbye!');
        end
    case 5
        close all;
        figure(5);
        ACC_MPC_varying_R;
        disp('Do you want to run another simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y'
            main;
        else
            disp('Goodbye!');
        end
    case 6
        close all;
        figure(6);
        ACC_MPC_init_dist;
        disp('Do you want to run another simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y' 
            main;
        else
            disp('Goodbye!');
        end
    case 7
        close all;
        figure(7);
        stability_analysis;
        disp('Do you want to run a1nother simulation?');
        opt = input('
Enter your 
option
 [Y/
any
 other 
key
] 
--> ','s');
        if opt == 'Y'
            main;
        else
            disp('Goodbye!');
        end

🎉3 参考文献

​[1]孙银健. 基于模型预测控制的无人驾驶车辆轨迹跟踪控制算法研究[D].北京理工大学,2015.

部分理论引用网络文献,若有侵权联系博主删除。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值