185号资源-源程序::论文+程序:基于运动学车辆模型的开放式驾驶MPC横向控制算法-------已提供下载资源

👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆下载资源链接👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆

《《《《《《《《更多资源还请持续关注本专栏》》》》》》》

论文与完整源程序_电网论文源程序的博客-CSDN博客icon-default.png?t=O83Ahttps://blog.csdn.net/liang674027206/category_12531414.html

电网论文源程序-CSDN博客电网论文源程序擅长文章解读,论文与完整源程序,等方面的知识,电网论文源程序关注python,机器学习,计算机视觉,深度学习,神经网络,数据挖掘领域.https://blog.csdn.net/LIANG674027206?type=download

运动学车辆模型关注的是车辆的运动和路径跟踪。

这个模型通常用来简化车辆行为的预测,特别是在车辆的转向和车道保持方面。 开放式驾驶MPC(Model Predictive Control)横向控制算法是应用于车辆控制的策略之一。

MPC通过解决优化问题来预测车辆的未来轨迹,并根据当前状态和目标进行实时调整。横向控制算法专注于控制车辆的方向,使其沿着预定路径行驶。开放式驾驶指的是该算法在实际应用中具备较大的灵活性,可以根据实时的路况和环境信息进行调整。 综上所述,这种基于运动学模型的MPC横向控制算法通过优化车辆的横向运动,确保车辆能够精准地沿着车道行驶,提升自动驾驶系统在各种道路条件下的行驶稳定性和安全性。

附带论文:

部分代码展示:

function cost = Autopilot_cost_function(x, trajref, ...
    veh_pose, ref_pose, autop_params, index, veh_params,N,R,Q)
% delta is control variable: steer angle

%% Initial state
v_des=veh_params.v_des; % desired speed m/s
xx=veh_pose(1,1); % current x position
yy=veh_pose(1,2); % current y position
psi=veh_pose(1,3); % current vehicle heading angle
%delta   % steering angle

cost=0;        % cost function

x_predict=zeros(N,1);
y_predict=zeros(N,1);
psi_predict=zeros(N,1);

x_error=zeros(N+1,1);
y_error=zeros(N+1,1);
psi_error=zeros(N+1,1);

delta=zeros(N,1);    % control variable delta is steering angle

% set up Non uniform time grid
% First 5 timesteps are 0.05, after that it's 0.15
T=zeros(N,1);
for i=1:5
    T(i,1)=0.05;
end
for i=5:N
    T(i,1)=0.05;
    %T(i,1)=0.15;    %autopilot variable
end

%curvature factor [1/m]
 curv_factor=1/(1-autop_params.sf*v_des^2)/veh_params.wheel_base;


%% Update the state 

for i =1: 1: N
    
    if i == 1
        delta(i,1)= x(1);
        x_predict(i,1)=xx+T(i,1)*v_des*cos(psi);
        y_predict(i,1)=yy+T(i,1)*v_des*sin(psi);
         psi_predict(i,1)=psi+T(i,1)*v_des*delta(i,1)...
            *curv_factor;
        
%         psi_predict(i,1)=psi+T(i,1)*v_des*tan(delta(i,1))...
%             /veh_params.wheel_base;
    else
        delta(i,1)=x(1);
        x_predict(i,1)=x_predict(i-1)+T(i,1)*v_des*cos(psi_predict(i-1));
        y_predict(i,1)=y_predict(i-1)+T(i,1)*v_des*sin(psi_predict(i-1));

         psi_predict(i,1)= psi_predict(i-1)+T(i,1)*v_des*delta(i,1)...
            *curv_factor;
         
%         psi_predict(i,1)= psi_predict(i-1)+T(i,1)*v_des*tan(delta(i,1))...
%             /veh_params.wheel_base;

    end

    %calculate the tracking error based on predit horizon
    x_real=zeros(N+1,1);
    y_real=zeros(N+1,1);
    x_real(1,1) = xx;
    x_real(2:N+1,1) = x_predict;
    y_real(1,1) = yy;
    y_real(2:N+1,1) = y_predict;

    x_error(i,1)=x_real(i,1)-trajref(i,1);
    y_error(i,1)=y_real(i,1)-trajref(i,2);
    psi_error(i,1)=psi_predict(i,1)-trajref(i,3);
    
end
    i=i+1;
    x_error(i,1)=x_real(i,1)-trajref(i,1);
    y_error(i,1)=y_real(i,1)-trajref(i,2);
    
%calculate the cost function
cost=cost+y_error'*R*y_error+ x_error'*Q*x_error;


end

效果展示:

185号资源-源程序::论文+程序:基于运动学车辆模型的开放式驾驶MPC横向控制算法-本人博客有解读资源-CSDN文库icon-default.png?t=O83Ahttps://download.csdn.net/download/LIANG674027206/89761830👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆下载资源链接👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆👆

《《《《《《《《更多资源还请持续关注本专栏》》》》》》》

论文与完整源程序_电网论文源程序的博客-CSDN博客icon-default.png?t=O83Ahttps://blog.csdn.net/liang674027206/category_12531414.html

电网论文源程序-CSDN博客电网论文源程序擅长文章解读,论文与完整源程序,等方面的知识,电网论文源程序关注python,机器学习,计算机视觉,深度学习,神经网络,数据挖掘领域.https://blog.csdn.net/LIANG674027206?type=download

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

电网论文源程序

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值