MPC关键参数解析

# -- control parameters --
control_sampling_time: 0.1 # [s] control interval
reference_speed: 0.5 # [m/s]

# -- Prediction path smoothing parameters --
curvature_smoothing_num: 1.0 # ? int? Smoothing value for curvature calculation 
max_curvature_change_rate: 1.0 # Saturate value for curvature change rate [1/m^2]
speed_reduction_rate: 0.5 # Reduce the speed reference based on the rate of curvature change; v_ref' = v_ref * exp (-speed_reduction_rate * curvature_rate^2)
deceleration_rate_for_stop: 0.5 # Reduce the speed reference for stopping; v_ref'  = v_ref * (1 - exp(-deceleration_rate_for_stop * (x_goal -x_f))), recommend the same value as a a_min in MPC formulation

# -- C/GMRES solver parameters --
Tf: 1.5 # Length of predictive horizon in C/GMRES [s]
alpha: 0.5 # The length horizon at time t is given by T_f * (1-exp(-alpha*t))
N: 15 # The number of discrete of the predictive horizon
finite_distance_increment: 0.0002 # Step length of the finite difference in C/GMRES method
zeta: 10 # A parameter for stabilization of the C/GMRES method, it should be 1/control_sampling_time
kmax: 100 # dimension of the Krylov subspace and maximum iteration number

# -- MPC parameters --
weight_lat_error: 0.1 # Weight for lateral error from reference path in stage cost
weight_yaw_error: 0.0 # Weight for yaw error from reference path in stage cost
weight_twist_x_error: 0.5 # Weight for twist_x error from reference path in stage cost
terminal_weight_lat_error: 0.1 # Weight for lateral error from reference path in terminal cost
terminal_weight_yaw_error: 0.0 # Weight for yaw error from reference path in terminal cost
terminal_weight_twist_x_error: 0.5 # Weight for twist_x error from reference path in terminal cost
weight_input_angular_yaw: 0.01 # Weight for angular velocity input
weight_input_accel: 0.5 # Weight for acceleration input
barrier_coefficient: 0.0 # barrier function coefficient for inequality constraint
maximum_acceleration: 0.5 # Maximum acceleration
minimum_deceleration: -0.5 # Minimum deceleration

这段配置参数涉及到路径预测平滑、C/GMRES求解器配置以及模型预测控制(MPC)的参数设置。下面是对每个参数的详细解释:

预测路径平滑参数

  • curvature_smoothing_num: 这个参数用于曲率计算的平滑处理,但注释中提到的“int?”可能是个疑问或错误,因为平滑值通常是一个浮点数。它的具体作用可能依赖于平滑算法的实现细节。

  • max_curvature_change_rate: 曲率变化率的饱和值,单位为1/m^2。这个参数限制了路径曲率随时间变化的最大速率,有助于生成平滑的路径。

  • speed_reduction_rate: 基于曲率变化率的速度参考值减小率。当路径曲率变化较大时,车辆将降低速度以保持稳定性。这里的公式v_ref' = v_ref * exp (-speed_reduction_rate * curvature_rate^2)表示速度参考值v_ref如何根据曲率变化率进行调整。

  • deceleration_rate_for_stop: 停车时的速度参考值减小率。当车辆接近目标位置时,它将根据与目标距离x_goal - x_f减小速度。这里的公式v_ref' = v_ref * (1 - exp(-deceleration_rate_for_stop * (x_goal - x_f)))用于计算调整后的速度参考值。注释建议这个值与MPC公式中的最小加速度a_min相同。

C/GMRES求解器参数

  • Tf: C/GMRES方法中的预测时域长度,单位为秒(s)。这个参数决定了求解器在考虑未来状态时的时间范围。

  • alpha: 用于计算时变预测时域长度的参数。公式T_f * (1-exp(-alpha*t))表示随时间t变化的预测时域长度,其中T_f是最大预测时域长度。

  • N: 预测时域的离散化数量。这个参数决定了在预测时域内将时间划分为多少个离散点。

  • finite_distance_increment: C/GMRES方法中有限差分的步长。这个参数用于数值微分或求解梯度。

  • zeta: 用于稳定C/GMRES方法的参数,建议设置为控制采样时间的倒数。这个参数有助于控制求解过程的稳定性和收敛性。

  • kmax: Krylov子空间的维度和最大迭代次数。这个参数决定了C/GMRES求解器在找到解之前可以进行的最大迭代次数。

MPC参数

  • weight_lat_errorweight_yaw_errorweight_twist_x_error: 这些参数分别表示在阶段成本中对于横向误差、偏航误差和沿x轴的扭转误差的权重。它们用于平衡MPC优化问题中不同误差项的重要性。

  • terminal_weight_lat_errorterminal_weight_yaw_errorterminal_weight_twist_x_error: 这些参数与上述阶段成本权重类似,但用于终端成本。它们强调了在优化过程结束时减小这些误差的重要性。

  • weight_input_angular_yawweight_input_accel: 这些参数分别表示对偏航角速度和加速度输入的权重。它们用于控制MPC优化问题中对控制输入的惩罚程度。

  • barrier_coefficient: 不等式约束的屏障函数系数。这个参数用于处理MPC优化问题中的不等式约束,如避免碰撞或保持速度限制。

  • maximum_accelerationminimum_deceleration: 最大加速度和最小减速度。这些参数限制了车辆可以施加的最大和最小加速度值,有助于确保控制命令的可行性和安全性。

请注意,这些参数的具体作用和效果可能依赖于MPC算法和控制系统的具体实现细节。在实际应用中,可能需要通过试验和调整这些参数来优化系统性能。

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

#君#

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

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

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

打赏作者

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

抵扣说明:

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

余额充值