Trajectory Optimization for The Block-move Example Based on the Direct Single Shooting Method

本文通过一个简单的块移动示例,介绍了如何使用直接射击法求解最优轨迹问题。文章详细阐述了模型建立、边界条件设定及目标函数选择,并给出了解析解与仿真结果对比。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. Problem Statement

This simple example is about how to move the block between two fixed points in a fixed amount of time referred to the Ref[1]. In order to simplify this problem, the block moves one unit of distance in one unit of time, and keeps stationary at both two points, shown in Figure 1.

Figure 1. The illustration of the block-move example.
Obviously, it is quite easy to find many solutions that satisfy all of the problem requirements, illustrated in Figure 2. However, how to find the optimal trajectory for this problem?
在这里插入图片描述
Figure 2. The feasible trajectories of the block-move…

2. Modelling

In this case, this block is modeled as a point-mass that travels in one dimension. Denote the control input (Force) as u u u, Position as x x x, Velocity as v v v, and the mass of the block is 1. Then, the block-move’s system dynamics can be described as follows
x ˙ = v (1) \dot{x} = v \tag{1} x˙=v(1) v ˙ = u (2) \dot{v} = u \tag{2} v˙=u(2) As illustrated in Figure 1, the boundary conditions are given as follows
x ( 0 ) = 0 , x ( 1 ) = 1 v ( 0 ) = 0 , v ( 1 ) = 0 (3) x(0) = 0, x(1) = 1 \\ v(0) = 0, v(1) = 0\tag{3} x(0)=0,x(1)=1v(0)=0,v(1)=0(3) The objective function can be used to mathematically describe the optimal index. In this example, the objective function is chosen as the minimal force squared, expressed as
min ⁡ u ( t ) , x ( t ) , v ( t ) ∫ 0 1 u 2 ( τ ) d τ (4) \min _{u(t), x(t), v(t)} \int_{0}^{1} u^{2}(\tau) d \tau\tag{4} u(t),x(t),v(t)min01u2(τ)dτ(4) As this problem is simple, the full derivation of the analytical solution to the trajectory optimization problem is referred to the Ref[1], given as follows
u ∗ ( t ) = 6 − 12 t , x ∗ ( t ) = 3 t 2 − 2 t 3 (5) u^{*}(t)=6-12 t, \quad x^{*}(t)=3 t^{2}-2 t^{3}\tag{5} u(t)=612t,x(t)=3t22t3(5)

3. Optimal Control Theory

Describe the dynamic system by
x ˙ ( t ) = f ( x , u , t ) (6) \boldsymbol{\dot{x}}(t)=\boldsymbol{f}(\boldsymbol{x},\boldsymbol{u},{t}) \tag{6} x˙(t)=f(x,u,t)(6) where x ∈ R n \boldsymbol{x}\in{R^n} xRn is the state variables, u ∈ R m \boldsymbol{u}\in{R^m} uRm is the control input. A general objective function is expressed in Bolza form
J = Ψ [ t 0 , t f , x ( t 0 ) , x ( t f ) ] ⏟ Mayer Term  + ∫ t 0 t f Γ [ τ , x ( τ ) , u ( τ ) ] d τ ⏟ Lagrange Term  (7) J=\underbrace{\Psi\left[t_{0}, t_{f}, \boldsymbol{x}\left(t_{0}\right), \boldsymbol{x}\left(t_{f}\right)\right]}_{\text {Mayer Term }}+\underbrace{\int_{t_{0}}^{t_{f}} \Gamma[\tau, \boldsymbol{x}(\tau), \boldsymbol{u}(\tau)] d \tau}_{\text {Lagrange Term }}\tag{7} J=Mayer Term  Ψ[t0,tf,x(t0),x(tf)]+Lagrange Term  t0tfΓ[τ,x(τ),u(τ)]dτ(7) Where the Mayer term is the final weighting function, and depends on the final state; the Lagrange term is the integral function. The block-move example here is in Lagrange Form.

4. Simulation

There are many direct methods to solve the optimal trajectory problem. Here, the direct single shooting method is applied to optimize the block’s trajectory. The simulation results are shown in Figure 3and Figure 4 compared with the analytical solution.
在这里插入图片描述

Figure 3. The optimal trajectory for the block-move example.

在这里插入图片描述
Figure 4. The optimal force input for the block-move example.

Referrence

[1] Kelly M. An Introduction to Trajectory Optimization: How to Do Your Own Direct Collocation[J]. Siam Review, 2017, 59(4): 849-904.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值