?????目錄
??1 概述
??2 運行結(jié)果
??3 參考文獻
?????4 Matlab代碼
??1 概述
自適應(yīng)巡航控制技術(shù)為目前由于汽車保有量不斷增長而帶來的行車安全、駕駛舒適性及交通擁堵等問題提供了一條有效的解決途徑,因此本文通過理論分析、仿真驗證及實車實驗對自適應(yīng)巡航控制中的若干關(guān)鍵技術(shù)展開研究,以提高自適應(yīng)巡航控制在不同工況下的應(yīng)用能力。??
本研究為基于預(yù)測控制模型的自適應(yīng)巡航控制仿真與機器人實現(xiàn)。
研究目的:
- 在兩輛車之間已經(jīng)達到了近乎精確的縱向模型
- 試圖使控制響應(yīng)接近可行性和真實條件。
- 滿足防撞和保持安全距離,前車為主要目標,舒適性為次要目標。(控制應(yīng)用于以下汽車)
- 在 MATLAB 上應(yīng)用實現(xiàn)和仿真。
??2 運行結(jié)果
主函數(shù)部分代碼:
clear ; close all; clc % Define the sample time, |Ts|, and simulation duration, |t|, in seconds. t0 = 0; Ts = 0.1; Tf = 100; t = t0:Ts:Tf; Nt = numel(t); % Specify the initial position and velocity for the two vehicles. % x0_lead = 0; %Initial position of lead car (m) %v0_lead = 0; %Initial velocity of lead car (m/s) % x0_ego = 0; %Initial position of ego car (m) %v0_ego = 0; %Initial velocity of ego car (m/s) % The safe distance between the lead car and the ego car is a function % of the ego car velocity, $V_{ego}$: % % $$ D_{safe} = D_{default} + T_{gap}\times V_{ego} $$ % % where $D_{default}$ is the standstill default spacing and $T_{gap}$ is % the time gap between the vehicles. Specify values for $D_{default}$, in % meters, and $T_{gap}$, in seconds. t_gap = 1.4; D_default = 10; % Specify the driver-set velocity in m/s. v_set = 30; % Considering the physical limitations of the vehicle dynamics, the % acceleration is constrained to the range |[-3,2]| (m/s^2). a_max = 2; da_max = 0.15; a_min = -3; da_min = -0.2; ? ? % the relationship between the actual acceleration and the desired % acceleration of the host vehicle satisfies the following conditions % % $$ a(k+1) = (1-\frac{Ts}{\tau}) \times a(k) + \frac{Ts}{\tau} \times u(k)$$ % % where $ \tau $ is the time lag of the ACC system tau = 0.3; ? % Np = 20 ; % Prediction Horizon %Nc = 20 ; % Control Horizon % % Examples % In this section we want to try to specify the various parameters % of the machine for different simulation ? % EX.1 % N = 5; % Np = 20 ; % Prediction Horizon % Nc = 5 ; % Control Horizon % x0_ego = 0; % v0_ego = 0; % x0_lead = 50; % v0_lead = 15; % a_lead = 0.3*sin(2*pi*0.03*t); % Acceleration of lead car is a disturbance for our plant; % [lead_car_position , lead_car_velocity] = lead_car_simulation(x0_lead,v0_lead,a_lead,t,Ts ,tau); % EX.2 N = 5; Np = 20 ; % Prediction Horizon Nc = 15 ; % Control Horizon x0_ego = 0; v0_ego = 0; x0_lead = 20; v0_lead = 5; a_lead = [1*(1-exp(-0.5*t(1:floor(Nt/5)))) ,0.5+0.5*exp(-0.5*t(1:floor(Nt/5))) , -0.5+exp(-0.5*t(1:floor(Nt/5))) ,-0.5*exp(-0.5*t(1:floor(Nt/5))) , zeros(1,floor(Nt/5)+1)]; [lead_car_position , lead_car_velocity] = lead_car_simulation(x0_lead,v0_lead,a_lead,t,Ts ,tau); % % % EX.3 % Np = 20 ; % Prediction Horizon % Nc = 15 ; % Control Horizon % x0_ego = 0; % v0_ego = 0; % x0_lead = 1500; % v0_lead = 0; % a_lead = zeros(1,Nt) ; % [lead_car_position , lead_car_velocity] = lead_car_simulation(x0_lead,v0_lead,a_lead,t,Ts ,tau); % % Car State Space Model ? Am=[1 Ts 0.5*Ts^2 0 1 Ts 0 0 1-Ts/tau ]; ? Bm=[0 ; 0 ; Ts/tau]; ? Cm=[1 0 0 0 1 0]; ? ? n = size(Am , 1) ; % number of eigenvalues q = size(Cm , 1) ; % number of outputs m = size(Bm , 2) ; % number of inputs ? ? [A , B , C] = AugemenFun(Am , Bm , Cm) ; ? a = 0.5 ; [Al , L0] = LagFun(N,a); L = zeros( N , Nc ); L( : , 1) = L0 ; for i = 2:Nc L(:,i) = Al*L(: , i-1) ; end
??3 參考文獻
[1]李朋,魏民祥,侯曉利.自適應(yīng)巡航控制系統(tǒng)的建模與聯(lián)合仿真[J].汽車工程,2012,34(07):622-626.文章來源:http://www.zghlxwxcb.cn/news/detail-570076.html
部分理論引用網(wǎng)絡(luò)文獻,若有侵權(quán)聯(lián)系博主刪除。文章來源地址http://www.zghlxwxcb.cn/news/detail-570076.html
到了這里,關(guān)于基于預(yù)測控制模型的自適應(yīng)巡航控制仿真與機器人實現(xiàn)(Matlab代碼實現(xiàn))的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!