Frenet坐标系及其与笛卡尔坐标的转换(2)——原理

目录

文章目录

  • 目录
      • 4.1.3 推导 s ˙ \dot{s} s˙
      • 4.1.4 推导 l ′ ′ l'' l
      • 4.1.5 推导 s ¨ \ddot{s} s¨
      • 4.1.6 推导 l ¨ \ddot{l} l¨
      • 4.1.7 综合结果:
    • 4.2 运动状态:Frenet坐标 —> 笛卡尔坐标
      • 4.2.1 推导 θ e \theta_{e} θe
      • 4.2.2 推导 v e v_{e} ve
      • 4.2.3 推导 κ e \kappa_{e} κe
      • 4.2.4 推导 a e a_{e} ae
      • 4.2.5 综合结果:
  • 5 Frenet坐标系的局限性
  • 6 总结
    • 6.1 笛卡尔坐标 —> Frenet坐标
    • 6.2 Frenet坐标 —> 笛卡尔坐标
  • 7 参考文献

4.1.3 推导 s ˙ \dot{s} s˙

由公式 (21) \text{(21)} (21) 与公式 (28) \text{(28)} (28) 可知:

l ′ = ( 1 − κ r l ) ⋅ t a n ( Δ θ ) = v e s i n ( Δ θ ) s ˙ (29) l' = (1-\kappa_{r} l) \cdot tan(\Delta\theta) = \frac {v_{e}sin(\Delta\theta)}{\dot{s}}\tag{29} l=(1κrl)tan(Δθ)=s˙vesin(Δθ)(29)

因此有:

s ˙ = v e c o s ( Δ θ ) ( 1 − κ r l ) (30) \dot{s} = \frac{v_{e}cos(\Delta\theta)}{(1-\kappa_{r} l)}\tag{30} s˙=(1κrl)vecos(Δθ)(30)

4.1.4 推导 l ′ ′ l'' l

根据公式 (28) \text{(28)} (28) 可得:

l ′ ′ = d   l ′ d s = ( 1 − κ r l ) ′ ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) ⋅ [ t a n ( Δ θ ) ] ′ = − ( κ r l ) ′ ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) ⋅ ( Δ θ ) ′ c o s 2 ( Δ θ ) (31) \begin{aligned}l'' &= \frac{d \ l'}{ds}\\&= (1-\kappa_{r} l)' \cdot tan(\Delta\theta) + (1-\kappa_{r} l) \cdot [tan(\Delta\theta)]'\\&= -(\kappa_{r} l)' \cdot tan(\Delta\theta) + (1-\kappa_{r} l) \cdot \frac{(\Delta\theta)'}{cos^{2}(\Delta\theta)}\\\end{aligned}\tag{31} l=dsd l=(1κrl)tan(Δθ)+(1κrl)[tan(Δθ)]=(κrl)tan(Δθ)+(1κrl)cos2(Δθ)(Δθ)(31)

为了使得推导能够顺利进行下去,我们聚焦于公式 (31) \text{(31)} (31) 中的 Δ θ ′ = ( θ e − θ r ) ′ \Delta\theta'=(\theta_{e} - \theta_{r})' Δθ=(θeθr) 部分。

( θ e − θ r ) ′ = d θ e d s − d θ r d s (32) (\theta_{e} - \theta_{r})'=\frac{d \theta_{e}}{ds} - \frac{d \theta_{r}}{ds} \tag{32} (θeθr)=dsdθedsdθr(32)

由指引线在投影点 M M M 处的曲率定义可知:

κ r = d θ r d s (33) \kappa_{r} = \frac{d \theta_{r}}{ds} \tag{33} κr=dsdθr(33)

因此

( θ e − θ r ) ′ = d θ e d s − κ r (34) (\theta_{e} - \theta_{r})'=\frac{d \theta_{e}}{ds} - \kappa_{r} \tag{34} (θeθr)=dsdθeκr(34)

从直觉上来讲, d s ds ds 代表指引线上一段里程微元, θ e \theta_{e} θe 代表轨迹上 P P P 点的切线姿态角,两个变量相互无关,因此似应直接取 d θ e / d s = 0 d\theta_{e}/ds=0 dθe/ds=0 。这种想法是不正确的, d s ds ds 代表投影点 M M M 在指引线上的微小变化,这一变化直接导致 P P P 点位置变化, θ e \theta_{e} θe 也会相应变化,这意味着 d s ds ds θ e \theta_{e} θe 是间接有关联的。那么如何计算 d θ e / d s d\theta_{e}/{ds} dθe/ds 呢?我们定义临时变量 d s e ds_{e} dse 来表示轨迹上的一段微元,根据轨迹在 P P P 点曲率的定义式 κ e = d θ e / d s e \kappa_{e} = d \theta_{e} / ds_{e} κe=dθe/dse ,以及公式 (30) \text{(30)} (30) 则有:

d θ e d s = d θ e d s e d s e d t d t d s = d θ e d s e ⋅ v e ⋅ 1 s ˙ = d θ e d s e ⋅ ( 1 − κ r l ) c o s ( θ e − θ r ) = κ e ⋅ ( 1 − κ r l ) c o s ( θ e − θ r ) (35) \begin{aligned}\frac{d\theta_{e}}{ds} &= \frac{d\theta_{e}}{ds_{e}}\frac{ds_{e}}{dt}\frac{dt}{ds}\\&= \frac{d\theta_{e}}{ds_{e}} \cdot v_{e} \cdot \frac{1}{\dot{s}}\\&= \frac{d\theta_{e}}{ds_{e}} \cdot \frac{(1-\kappa_{r}l)}{cos(\theta_{e} - \theta_{r})}\\&=\kappa_{e} \cdot \frac{(1-\kappa_{r}l)}{cos(\theta_{e} - \theta_{r})}\end{aligned}\tag{35} dsdθe=dsedθedtdsedsdt=dsedθeves˙1=dsedθecos(θeθr)(1κrl)=κecos(θeθr)(1κrl)(35)

因此有:

( Δ θ ) ′ = κ e ⋅ ( 1 − κ r l ) c o s ( Δ θ ) − κ r (36) (\Delta\theta)'= \kappa_{e} \cdot \frac{(1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r} \tag{36} (Δθ)=κecos(Δθ)(1κrl)κr(36)

将公式 (36) \text{(36)} (36) 代入公式 (31) \text{(31)} (31) 则得到:

l ′ ′ = d   l ′ d s = ( 1 − κ r l ) ′ ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) ⋅ [ t a n ( Δ θ ) ] ′ = − ( κ r l ) ′ ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) ⋅ ( Δ θ ) ′ c o s 2 ( Δ θ ) = − ( κ r l ) ′ ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) c o s 2 ( Δ θ ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] = − ( κ r ′ l + κ r l ′ ) ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) c o s 2 ( Δ θ ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] (37) \begin{aligned}l'' &= \frac{d \ l'}{ds}\\&= (1-\kappa_{r} l)' \cdot tan(\Delta\theta) + (1-\kappa_{r} l) \cdot [tan(\Delta\theta)]'\\&= -(\kappa_{r} l)' \cdot tan(\Delta\theta) + (1-\kappa_{r} l) \cdot \frac{(\Delta\theta)'}{cos^{2}(\Delta\theta)}\\&= -(\kappa_{r} l)' \cdot tan(\Delta\theta) + \frac{(1-\kappa_{r} l)}{cos^{2}(\Delta\theta)} \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}]\\&= -(\kappa_{r}' l +\kappa_{r} l' ) \cdot tan(\Delta\theta) + \frac{(1-\kappa_{r} l)}{cos^{2}(\Delta\theta)} \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}]\\\end{aligned}\tag{37} l=dsd l=(1κrl)tan(Δθ)+(1κrl)[tan(Δθ)]=(κrl)tan(Δθ)+(1κrl)cos2(Δθ)(Δθ)=(κrl)tan(Δθ)+cos2(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr]=(κrl+κrl)tan(Δθ)+cos2(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr](37)

4.1.5 推导 s ¨ \ddot{s} s¨

根据公式 (30) \text{(30)} (30) 可得:
s ¨ = d s ˙ d t = d [ v e c o s ( Δ θ ) / ( 1 − κ r l ) ] d t = d v e ˙ d t ⋅ c o s ( Δ θ ) ( 1 − κ r l ) + v e ⋅ d [ c o s ( Δ θ ) / ( 1 − κ r l ) ] d t (38) \begin{aligned}\ddot{s} &= \frac{d \dot{s}}{dt}\\&=\frac{d {[v_{e}cos(\Delta\theta)}/{(1-\kappa_{r}l)}]}{dt}\\&=\frac{d \dot{v_{e}}}{dt} \cdot \frac{cos(\Delta\theta)}{(1-\kappa_{r}l)} \quad+\quad v_{e} \cdot \frac{d[cos(\Delta\theta)/(1-\kappa_{r}l)]}{dt}\end{aligned}\tag{38} s¨=dtds˙=dtd[vecos(Δθ)/(1κrl)]=dtdve˙(1κrl)cos(Δθ)+vedtd[cos(Δθ)/(1κrl)](38)

我们聚焦于公式 (38) \text{(38)} (38) 第二项中的微分部分,同时使用公式 (36) \text{(36)} (36)

d [ c o s ( Δ θ ) / ( 1 − κ r l ) ] d t = d c o s ( Δ θ ) d t ⋅ ( 1 − κ r l ) − d ( 1 − κ r l ) d t ⋅ c o s ( Δ θ ) ( 1 − κ r l ) 2 = − s i n ( Δ θ ) ⋅ ( 1 − κ r l ) ⋅ d Δ θ d s d s d t + d ( κ r l ) d s d s d t ⋅ c o s ( Δ θ ) ( 1 − κ r l ) 2 = − s i n ( Δ θ ) ⋅ ( 1 − κ r l ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] s ˙ + ( κ r ′ l + κ r l ′ ) s ˙ ⋅ c o s ( Δ θ ) ( 1 − κ r l ) 2 = s ˙ ⋅ − s i n ( Δ θ ) ⋅ ( 1 − κ r l ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] + ( κ r ′ l + κ r l ′ ) ⋅ c o s ( Δ θ ) ( 1 − κ r l ) 2 (39) \begin{aligned}&\frac{d[cos(\Delta\theta)/(1-\kappa_{r}l)]}{dt}\\&= \frac{ \frac{dcos(\Delta\theta)}{dt} \cdot (1-\kappa_{r}l) \quad-\quad \frac{d (1-\kappa_{r}l)}{dt} \cdot cos(\Delta\theta) }{(1-\kappa_{r}l)^{2}}\\&= \frac{-sin(\Delta\theta) \cdot (1-\kappa_{r}l) \cdot \frac{d\Delta\theta}{ds} \frac{ds}{dt} \quad+\quad \frac{d (\kappa_{r}l)}{ds} \frac{ds}{dt} \cdot cos(\Delta\theta) }{(1-\kappa_{r}l)^{2}}\\&= \frac{-sin(\Delta\theta) \cdot (1-\kappa_{r}l) \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \dot{s} \quad+\quad (\kappa_{r}'l+\kappa_{r}l') \dot{s} \cdot cos(\Delta\theta) }{(1-\kappa_{r}l)^{2}}\\&=\dot{s} \cdot \frac{-sin(\Delta\theta) \cdot (1-\kappa_{r}l) \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \quad+\quad (\kappa_{r}'l+\kappa_{r}l') \cdot cos(\Delta\theta) }{(1-\kappa_{r}l)^{2}}\\\end{aligned}\tag{39} dtd[cos(Δθ)/(1κrl)]=(1κrl)2dtdcos(Δθ)(1κrl)dtd(1κrl)cos(Δθ)=(1κrl)2sin(Δθ)(1κrl)dsdΔθdtds+dsd(κrl)dtdscos(Δθ)=(1κrl)2sin(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr]s˙+(κrl+κrl)s˙cos(Δθ)=s˙(1κrl)2sin(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr]+(κrl+κrl)cos(Δθ)(39)

将公式 (28) \text{(28)} (28) 代入公式 (39) \text{(39)} (39) ,则有:

d [ c o s ( Δ θ ) / ( 1 − κ r l ) ] d t = s ˙ ⋅ − s i n ( Δ θ ) ⋅ ( 1 − κ r l ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ − κ r ] + ( κ r ′ l + κ r l ′ ) ⋅ c o s ( Δ θ ) ( 1 − κ r l ) 2 = s ˙ ⋅ − c o s ( Δ θ ) ⋅ t a n ( Δ θ ) ⋅ ( 1 − κ r l ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] + ( κ r ′ l + κ r l ′ ) ⋅ c o s ( Δ θ ) ( 1 − κ r l ) 2 = s ˙ ⋅ c o s ( Δ θ ) ⋅ − l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] + ( κ r ′ l + κ r l ′ ) ( 1 − κ r l ) 2 (40) \begin{aligned}&\frac{d[cos(\Delta\theta)/(1-\kappa_{r}l)]}{dt}\\&=\dot{s} \cdot \frac{-sin(\Delta\theta) \cdot (1-\kappa_{r}l) \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta} - \kappa_{r}] \quad+\quad (\kappa_{r}'l+\kappa_{r}l') \cdot cos(\Delta\theta) }{(1-\kappa_{r}l)^{2}}\\&=\dot{s} \cdot \frac{-cos(\Delta\theta) \cdot tan(\Delta\theta) \cdot (1-\kappa_{r}l) \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \quad+\quad (\kappa_{r}'l+\kappa_{r}l') \cdot cos(\Delta\theta) }{(1-\kappa_{r}l)^{2}}\\&=\dot{s} \cdot cos(\Delta\theta) \cdot \frac{-l' [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \quad+\quad (\kappa_{r}'l+\kappa_{r}l') }{(1-\kappa_{r}l)^{2}}\\\end{aligned}\tag{40} dtd[cos(Δθ)/(1κrl)]=s˙(1κrl)2sin(Δθ)(1κrl)[cos(Δθκe(1κrl)κr]+(κrl+κrl)cos(Δθ)=s˙(1κrl)2cos(Δθ)tan(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr]+(κrl+κrl)cos(Δθ)=s˙cos(Δθ)(1κrl)2l[cos(Δθ)κe(1κrl)κr]+(κrl+κrl)(40)

将公式 (40) \text{(40)} (40) 代入公式 (38) \text{(38)} (38) 中,并利用公式 (30) \text{(30)} (30) 对其进行简化,则有:

s ¨ = d s ˙ d t = d [ v e c o s ( Δ θ ) / ( 1 − κ r l ) ] d t = d v e ˙ d t ⋅ c o s ( Δ θ ) ( 1 − κ r l ) + v e ⋅ d [ c o s ( Δ θ ) / ( 1 − κ r l ) ] d t = a e ⋅ c o s ( Δ θ ) ( 1 − κ r l ) + v e ⋅ { s ˙ ⋅ c o s ( Δ θ ) ⋅ − l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] + ( κ r ′ l + κ r l ′ ) ( 1 − κ r l ) 2 } = a e ⋅ c o s ( Δ θ ) ( 1 − κ r l ) + s ˙ ⋅ v e ⋅ c o s ( Δ θ ) ( 1 − κ r l ) ⋅ − l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] + ( κ r ′ l + κ r l ′ ) ( 1 − κ r l ) = a e ⋅ c o s ( Δ θ ) ( 1 − κ r l ) − s ˙ 2 ⋅ l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] − ( κ r ′ l + κ r l ′ ) ( 1 − κ r l ) = 1 ( 1 − κ r l ) ⋅ { a e ⋅ c o s ( Δ θ ) − s ˙ 2 ⋅ [ ( κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ) l ′ − ( κ r ′ l + κ r l ′ ) ] } (41) \begin{aligned}\ddot{s} &= \frac{d \dot{s}}{dt}\\&= \frac{d {[v_{e}cos(\Delta\theta)}/{(1-\kappa_{r}l)}]}{dt}\\&=\frac{d \dot{v_{e}}}{dt} \cdot \frac{cos(\Delta\theta)}{(1-\kappa_{r}l)} \quad+\quad v_{e} \cdot \frac{d[cos(\Delta\theta)/(1-\kappa_{r}l)]}{dt}\\ &= a_{e} \cdot \frac{cos(\Delta\theta)}{(1-\kappa_{r}l)} \quad+\quad v_{e} \cdot \{\dot{s} \cdot cos(\Delta\theta) \cdot \frac{-l' [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \quad+\quad (\kappa_{r}'l+\kappa_{r}l') }{(1-\kappa_{r}l)^{2}}\}\\&= a_{e} \cdot \frac{cos(\Delta\theta)}{(1-\kappa_{r}l)} \quad+\quad \dot{s} \cdot \frac{v_{e} \cdot cos(\Delta\theta)}{(1-\kappa_{r}l)} \cdot \frac{-l' [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \quad+\quad (\kappa_{r}'l+\kappa_{r}l') }{(1-\kappa_{r}l)}\\&= a_{e} \cdot \frac{cos(\Delta\theta)}{(1-\kappa_{r}l)} \quad-\quad \dot{s}^{2} \cdot \frac{l' [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] \quad-\quad (\kappa_{r}'l+\kappa_{r}l') }{(1-\kappa_{r}l)}\\&= \frac{1}{(1-\kappa_{r}l)} \cdot \{ a_{e} \cdot cos(\Delta\theta) \quad-\quad \dot{s}^{2} \cdot [( \frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}) l' \quad-\quad (\kappa_{r}'l+\kappa_{r}l') ]\}\\\end{aligned}\tag{41} s¨=dtds˙=dtd[vecos(Δθ)/(1κrl)]=dtdve˙(1κrl)cos(Δθ)+vedtd[cos(Δθ)/(1κrl)]=ae(1κrl)cos(Δθ)+ve{s˙cos(Δθ)(1κrl)2l[cos(Δθ)κe(1κrl)κr]+(κrl+κrl)}=ae(1κrl)cos(Δθ)+s˙(1κrl)vecos(Δθ)(1κrl)l[cos(Δθ)κe(1κrl)κr]+(κrl+κrl)=ae(1κrl)cos(Δθ)s˙2(1κrl)l[cos(Δθ)κe(1κrl)κr](κrl+κrl)=(1κrl)1{aecos(Δθ)s˙2[(cos(Δθ)κe(1κrl)κr)l(κrl+κrl)]}(41)

4.1.6 推导 l ¨ \ddot{l} l¨

使用公式 (36) \text{(36)} (36) 和公式 (30) \text{(30)} (30),求出:

l ¨ = d l ˙ d t = d [ v e s i n ( Δ θ ) ] d t = a e ⋅ s i n ( Δ θ ) + v e c o s ( Δ θ ) d Δ θ d s d s d t = a e ⋅ s i n ( Δ θ ) + v e c o s ( Δ θ ) ( κ e ⋅ ( 1 − κ r l ) c o s ( Δ θ ) − κ r ) s ˙ = a e ⋅ s i n ( Δ θ ) + v e c o s ( Δ θ ) ( κ e ⋅ ( 1 − κ r l ) c o s ( Δ θ ) v e c o s ( Δ θ ) ( 1 − κ r l ) − κ r s ˙ ) = a e ⋅ s i n ( Δ θ ) + v e c o s ( Δ θ ) ( v e κ e − κ r s ˙ ) (42) \begin{aligned}\ddot{l} &= \frac{d \dot{l}}{dt}=\frac{d[v_{e}sin(\Delta\theta)]}{dt}\\&=a_{e} \cdot sin(\Delta\theta) \quad+\quad v_{e}cos(\Delta\theta)\frac{d\Delta\theta}{ds}\frac{ds}{dt}\\&=a_{e} \cdot sin(\Delta\theta) \quad+\quad v_{e}cos(\Delta\theta) (\frac{\kappa_{e} \cdot (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}) \dot{s}\\&=a_{e} \cdot sin(\Delta\theta) \quad+\quad v_{e}cos(\Delta\theta) (\frac{\kappa_{e} \cdot (1-\kappa_{r}l)}{cos(\Delta\theta)} \frac{v_{e}cos(\Delta\theta)}{(1-\kappa_{r} l)}- \kappa_{r}\dot{s})\\&=a_{e} \cdot sin(\Delta\theta) \quad+\quad v_{e}cos(\Delta\theta) (v_{e}\kappa_{e} - \kappa_{r}\dot{s})\\\end{aligned}\tag{42} l¨=dtdl˙=dtd[vesin(Δθ)]=aesin(Δθ)+vecos(Δθ)dsdΔθdtds=aesin(Δθ)+vecos(Δθ)(cos(Δθ)κe(1κrl)κr)s˙=aesin(Δθ)+vecos(Δθ)(cos(Δθ)κe(1κrl)(1κrl)vecos(Δθ)κrs˙)=aesin(Δθ)+vecos(Δθ)(veκeκrs˙)(42)

4.1.7 综合结果:

{ Δ θ = θ e − θ r l ˙ = v e s i n ( Δ θ ) l ′ = ( 1 − κ r l ) ⋅ t a n ( Δ θ ) s ˙ = v e c o s ( Δ θ ) ( 1 − κ r l ) l ′ ′ = − ( κ r ′ l + κ r l ′ ) ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) c o s 2 ( Δ θ ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] s ¨ = 1 ( 1 − κ r l ) ⋅ { a e ⋅ c o s ( Δ θ ) − s ˙ 2 ⋅ [ ( κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ) l ′ − ( κ r ′ l + κ r l ′ ) ] } l ¨ = a e ⋅ s i n ( Δ θ ) + v e c o s ( Δ θ ) ( v e κ e − κ r s ˙ ) (43) \left\{\begin{aligned}\Delta\theta &= \theta_{e} - \theta_{r}\\\dot{l} &= v_{e}sin(\Delta\theta)\\l' &= (1-\kappa_{r} l) \cdot tan(\Delta\theta)\\\dot{s} &= \frac{v_{e}cos(\Delta\theta)}{(1-\kappa_{r} l)}\\l'' &= -(\kappa_{r}' l +\kappa_{r} l' ) \cdot tan(\Delta\theta) + \frac{(1-\kappa_{r} l)}{cos^{2}(\Delta\theta)} \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}]\\\ddot{s} &= \frac{1}{(1-\kappa_{r}l)} \cdot \{ a_{e} \cdot cos(\Delta\theta) \quad-\quad \dot{s}^{2} \cdot [( \frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}) l' \quad-\quad (\kappa_{r}'l+\kappa_{r}l') ]\}\\\\\ddot{l} &= a_{e} \cdot sin(\Delta\theta) \quad+\quad v_{e}cos(\Delta\theta) (v_{e}\kappa_{e} - \kappa_{r}\dot{s})\\\end{aligned}\right.\tag{43} Δθl˙ls˙ls¨l¨=θeθr=vesin(Δθ)=(1κrl)tan(Δθ)=(1κrl)vecos(Δθ)=(κrl+κrl)tan(Δθ)+cos2(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr]=(1κrl)1{aecos(Δθ)s˙2[(cos(Δθ)κe(1κrl)κr)l(κrl+κrl)]}=aesin(Δθ)+vecos(Δθ)(veκeκrs˙)(43)

4.2 运动状态:Frenet坐标 —> 笛卡尔坐标

**Q:已知Frenet坐标系下的 s ∗ 、 l ∗ 、 θ r 、 s ˙ 、 s ¨ 、 l ˙ 、 l ¨ 、 l ′ 、 l ′ ′ s^{\ast }、l^{\ast }、\theta_{r}、\dot{s}、\ddot{s}、\dot{l}、\ddot{l}、l'、l'' slθrs˙s¨l˙l¨ll; 推导 ** 笛卡尔坐标系下 ( x e , y e ) 、 θ e 、 v e 、 a e 、 κ e (x_{e},y_{e})、\theta _{e}、v_{e}、a_{e}、\kappa _{e} (xe,ye)θeveaeκe

4.2.1 推导 θ e \theta_{e} θe

根据公式 (28) \text{(28)} (28) 可推导出 θ e \theta_{e} θe

θ e = a r c t a n ( l ′ 1 − κ r l ) + θ r (44) \theta_{e} = arctan(\frac{l'}{1-\kappa_{r}l}) + \theta_{r} \tag{44} θe=arctan(1κrll)+θr(44)

4.2.2 推导 v e v_{e} ve

根据公式 (30) \text{(30)} (30) 可推导出 v e v_{e} ve

v e = s ˙ ( 1 − κ r l ) c o s ( θ e − θ r ) = s ˙ ( 1 − κ r l ) c o s ( Δ θ ) (45) v_{e}=\frac{\dot{s}(1-\kappa_{r}l)}{cos(\theta_{e}-\theta_{r})} = \frac{\dot{s}(1-\kappa_{r}l)}{cos(\Delta\theta)}\tag{45} ve=cos(θeθr)s˙(1κrl)=cos(Δθ)s˙(1κrl)(45)

4.2.3 推导 κ e \kappa_{e} κe

根据公式 (37) \text{(37)} (37) 可反推导出 κ e \kappa_{e} κe

κ e = { [ l ′ ′ + ( κ r ′ l + κ r l ′ ) t a n ( Δ θ ) ] ⋅ c o s 2 ( Δ θ ) 1 − κ r l + κ r } ⋅ c o s ( Δ θ ) 1 − κ r l (46) \kappa_{e} = \{ \frac{[l''+(\kappa_{r}'l+\kappa_{r}l')tan(\Delta\theta)] \cdot cos^{2}(\Delta\theta)}{1-\kappa_{r}l}+\kappa_{r} \} \cdot \frac{cos(\Delta\theta)}{1-\kappa_{r}l} \tag{46} κe={1κrl[l+(κrl+κrl)tan(Δθ)]cos2(Δθ)+κr}1κrlcos(Δθ)(46)

4.2.4 推导 a e a_{e} ae

根据公式 (38) \text{(38)} (38) 可反推导出 a e a_{e} ae

a e = s ¨ ( 1 − κ r l ) c o s ( Δ θ ) + s ˙ 2 c o s ( Δ θ ) { l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] − ( κ r ′ l + κ r l ′ ) } (47) a_{e} = \frac{\ddot{s}(1-\kappa_{r}l)}{cos(\Delta\theta)} + \frac{\dot{s}^{2}}{cos(\Delta\theta)} \{ l'[\frac{\kappa_{e}(1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] - (\kappa_{r}'l+\kappa_{r}l')\} \tag{47} ae=cos(Δθ)s¨(1κrl)+cos(Δθ)s˙2{l[cos(Δθ)κe(1κrl)κr](κrl+κrl)}(47)

4.2.5 综合结果:

{ θ e = a r c t a n ( l ′ 1 − κ r l ) + θ r v e = s ˙ ( 1 − κ r l ) c o s ( Δ θ ) κ e = { [ l ′ ′ + ( κ r ′ l + κ r l ′ ) t a n ( Δ θ ) ] ⋅ c o s 2 ( Δ θ ) 1 − κ r l + κ r } ⋅ c o s ( Δ θ ) 1 − κ r l a e = s ¨ ( 1 − κ r l ) c o s ( Δ θ ) + s ˙ 2 c o s ( Δ θ ) { l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] − ( κ r ′ l + κ r l ′ ) } (48) \left\{\begin{aligned}\theta_{e} &= arctan(\frac{l'}{1-\kappa_{r}l}) + \theta_{r} \\v_{e} &= \frac{\dot{s}(1-\kappa_{r}l)}{cos(\Delta\theta)}\\\kappa_{e} &= \{ \frac{[l''+(\kappa_{r}'l+\kappa_{r}l')tan(\Delta\theta)] \cdot cos^{2}(\Delta\theta)}{1-\kappa_{r}l}+\kappa_{r} \} \cdot \frac{cos(\Delta\theta)}{1-\kappa_{r}l} \\a_{e} &= \frac{\ddot{s}(1-\kappa_{r}l)}{cos(\Delta\theta)} + \frac{\dot{s}^{2}}{cos(\Delta\theta)} \{ l'[\frac{\kappa_{e}(1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] - (\kappa_{r}'l+\kappa_{r}l')\}\end{aligned}\right.\tag{48} θeveκeae=arctan(1κrll)+θr=cos(Δθ)s˙(1κrl)={1κrl[l+(κrl+κrl)tan(Δθ)]cos2(Δθ)+κr}1κrlcos(Δθ)=cos(Δθ)s¨(1κrl)+cos(Δθ)s˙2{l[cos(Δθ)κe(1κrl)κr](κrl+κrl)}(48)

5 Frenet坐标系的局限性

第2节曾提到, Frenet 坐标系未必能够将二维平面上所有点位进行有效的描述。在这里,有效描述是指点位与 Frenet 坐标值之间构成一一映射。以图F4所示的由圆弧段构成的指引线为例,图中 P P P 点是圆弧段的圆心;原则上来讲, P P P 点在指引线上的投影点 M M M 应该是使得 M P MP MP 线段长度最短的点,然而此时这样的点有无穷多个——圆弧段上所有点全部符合此要求。由于投影点不唯一, P P P 点在指引线上坐标无从确定。我们发现,只有当 P P P 点落人图中阴影区域内时, P P P 点的投影点 M 才确保是唯一的。

图F4:反映Frenet坐标系表示范围受限的例子
Frenet坐标系及其与笛卡尔坐标的转换(2)——原理_第1张图片

现考虑另一种极端情况——指引线为无限延伸的直线,此时 Frenet 坐标系的点位表示范围完全覆盖整个二维平面,它与笛卡儿坐标系没有任何差异。不难发现,指引线的走势与形态决定了相应 Frenet 坐标系的表示范围大小。

为了定量地确定 Frenet 坐标系在二维平面上的有效作用范围,给出了指引线曲率的一种计算方法,它与曲率定义式实质上是等价的(感兴趣的读者可自行推导):

κ ( s ) = ∣ y ( s ) ′ ′ x ( s ) ′ − x ( s ) ′ ′ y ( s ) ) ′ ∣ { [ x ( s ) ′ ] 2 + [ y ( s ) ′ ] 2 } 3 / 2 (49) \kappa(s) = \frac{ \left| y(s)''x(s)'-x(s)''y(s))' \right|}{\{[x(s)']^{2} + [y(s)']^{2}\}^{3/2}}\tag{49} κ(s)={[x(s)]2+[y(s)]2}3/2y(s)x(s)x(s)y(s))(49)

给定一条参数化指引线 Γ [ x ( s ) , y ( s ) ] \Gamma[ x(s), y(s)] Γ[x(s),y(s)] ,可针对指引线上每一点 [ x ( s ) , y ( s ) ] [ x(s), y(s)] [x(s),y(s)] 计算曲率,曲率的倒数为该点的曲率半径 κ − 1 ( s ) \kappa^{-1}(s) κ1(s) 。如图F5所示,在指引线上点 M M M 处切线所对应的法线 N N N 上,在指引线凹陷侧定义临界点 P P P 使得 M P MP MP 长度为 κ − 1 ( s ) \kappa^{-1}(s) κ1(s)

**将法线 N N N 上从 P P P 点到指向曲线凸出侧无穷远处的一段开区间(不包括端点 P P P )定义为扫描线。随着里程 s s s 连续变化.扫描线连续扫过的区域合并起来统称 Frenet 坐标系的有效表征区域。**在有效表征区域内的点位均确保能够对应唯一的 Frenet 坐标值,这一论断涉及微分同胚理论,详情可参阅文献或更早期文献。

Frenet 坐标系作用范围受限意味着距离指引线较远的移动障碍预测轨迹等未必能够准确转换至 Frenet 坐标系中,该现象在指引线曲率较大的行车场景由尤为显著,此时还需采取额外措施避免坐标系转换误差,或干脆直接以类似于泊车决策规划的方式在笛卡儿坐标系中生成行车轨迹12

图F5:Frenet坐标系有效作用范围量化模型
Frenet坐标系及其与笛卡尔坐标的转换(2)——原理_第2张图片

6 总结

曲线指引线参数方程:
Γ [ x ( s ) , y ( s ) ] , s ε [ 0 , L ] , (1) \begin{aligned} &\Gamma [ x(s), y(s) ],s\varepsilon [0,L],\\\end{aligned}\tag{1} Γ[x(s),y(s)],sε[0,L],(1)
轨迹上某点 P P P 在笛卡尔坐标系下的表示 ( x e , y e ) (x_{e} ,y_{e}) (xe,ye) ,在Frenet坐标系下的表示 ( s ∗ , l ∗ ) (s^{\ast },l^{\ast }) (s,l)

P P P 点在指引线上的投影点 M M M 在笛卡尔坐标系下的表示 M = ( x ( s ∗ ) , y ( s ∗ ) ) M=(x(s^{\ast }),y(s^{\ast })) M=(x(s),y(s)) ,在Frenet坐标系下的表示 ( s ∗ , 0 ) (s^{\ast },0) (s,0)

6.1 笛卡尔坐标 —> Frenet坐标

已知:笛卡尔坐标系下 ( x e , y e ) 、 v e 、 a e 、 θ e 、 κ e (x_{e},y_{e})、v_{e}、a_{e}、\theta _{e}、\kappa _{e} (xe,ye)veaeθeκe

求解:Frenet坐标系下的 s ∗ 、 l ∗ 、 θ r 、 s ˙ 、 s ¨ 、 l ˙ 、 l ¨ 、 l ′ 、 l ′ ′ s^{\ast }、l^{\ast }、\theta r、\dot{s}、\ddot{s}、\dot{l}、\ddot{l}、l'、l'' slθrs˙s¨l˙l¨ll
Frenet坐标系下位置状态 { s ^ = s i n i t − D ′ ( s i n i t ) D ′ ′ ( s i n i t ) , D ′ ( s ∗ ) = 0 , 二阶最小化+牛顿法迭代 l ∗ = s i g n [ ( y e − y ( s ∗ ) ) c o s θ r − ( x e − x ( s ∗ ) ) s i n θ r ] ⋅ [ x e − x ( s ∗ ) ] 2 + [ y e − y ( s ∗ ) ] 2 θ r = a r c t a n [ y ′ ( s ∗ ) x ′ ( s ∗ ) ] (51) \text{Frenet坐标系下位置状态}\left\{\begin{aligned}&\widehat{s} = s_{init} - \frac{D'(s_{init})}{D''(s_{init})},D^{'}(s^{\ast })=0,\text{二阶最小化+牛顿法迭代}\\&l^{\ast } = sign[(y_{e}-y(s^{\ast }))cos\theta_{r} - (x_{e}-x(s^{\ast }))sin\theta_{r}] \cdot \sqrt{[x_{e}-x(s^{\ast })]^{2} + [y_{e}-y(s^{\ast })]^{2}}\\&\theta_{r} = arctan[\frac{y'(s^{\ast })}{x'(s^{\ast })}]\\\end{aligned}\right.\tag{51} Frenet坐标系下位置状态s =sinitD(sinit)D(sinit),D(s)=0,二阶最小化+牛顿法迭代l=sign[(yey(s))cosθr(xex(s))sinθr][xex(s)]2+[yey(s)]2 θr=arctan[x(s)y(s)](51)

Frenet坐标系下运动状态 { Δ θ = θ e − θ r l ˙ = v e s i n ( Δ θ ) l ′ = ( 1 − κ r l ) ⋅ t a n ( Δ θ ) s ˙ = v e c o s ( Δ θ ) ( 1 − κ r l ) l ′ ′ = − ( κ r ′ l + κ r l ′ ) ⋅ t a n ( Δ θ ) + ( 1 − κ r l ) c o s 2 ( Δ θ ) ⋅ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] s ¨ = 1 ( 1 − κ r l ) ⋅ { a e ⋅ c o s ( Δ θ ) − s ˙ 2 ⋅ [ ( κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ) l ′ − ( κ r ′ l + κ r l ′ ) ] } l ¨ = a e ⋅ s i n ( Δ θ ) + v e c o s ( Δ θ ) ( v e κ e − κ r s ˙ ) (52) \text{Frenet坐标系下运动状态}\left\{\begin{aligned}\Delta\theta &= \theta_{e} - \theta_{r}\\\dot{l} &= v_{e}sin(\Delta\theta)\\l' &= (1-\kappa_{r} l) \cdot tan(\Delta\theta)\\\dot{s} &= \frac{v_{e}cos(\Delta\theta)}{(1-\kappa_{r} l)}\\l'' &= -(\kappa_{r}' l +\kappa_{r} l' ) \cdot tan(\Delta\theta) + \frac{(1-\kappa_{r} l)}{cos^{2}(\Delta\theta)} \cdot [\frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}]\\\ddot{s} &= \frac{1}{(1-\kappa_{r}l)} \cdot \{ a_{e} \cdot cos(\Delta\theta) \quad-\quad \dot{s}^{2} \cdot [( \frac{\kappa_{e} (1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}) l' \quad-\quad (\kappa_{r}'l+\kappa_{r}l') ]\}\\\\\ddot{l} &= a_{e} \cdot sin(\Delta\theta) \quad+\quad v_{e}cos(\Delta\theta) (v_{e}\kappa_{e} - \kappa_{r}\dot{s})\\\end{aligned}\right.\tag{52} Frenet坐标系下运动状态Δθl˙ls˙ls¨l¨=θeθr=vesin(Δθ)=(1κrl)tan(Δθ)=(1κrl)vecos(Δθ)=(κrl+κrl)tan(Δθ)+cos2(Δθ)(1κrl)[cos(Δθ)κe(1κrl)κr]=(1κrl)1{aecos(Δθ)s˙2[(cos(Δθ)κe(1κrl)κr)l(κrl+κrl)]}=aesin(Δθ)+vecos(Δθ)(veκeκrs˙)(52)

6.2 Frenet坐标 —> 笛卡尔坐标

已知:Frenet坐标系下的 s ∗ 、 l ∗ 、 θ r 、 s ˙ 、 s ¨ 、 l ˙ 、 l ¨ 、 l ′ 、 l ′ ′ s^{\ast }、l^{\ast }、\theta_{r}、\dot{s}、\ddot{s}、\dot{l}、\ddot{l}、l'、l'' slθrs˙s¨l˙l¨ll

求解:笛卡尔坐标系下 ( x e , y e ) 、 θ e 、 v e 、 a e 、 κ e (x_{e},y_{e})、\theta _{e}、v_{e}、a_{e}、\kappa _{e} (xe,ye)θeveaeκe
笛卡尔坐标系下位置状态 { θ r = a r c t a n [ y ′ ( s ∗ ) x ′ ( s ∗ ) ] ( x e , y e ) ≡ [ x ( s ∗ ) + l ∗ ⋅ c o s ( θ r + π 2 ) , y ( s ∗ ) + l ∗ ⋅ s i n ( θ r + π 2 ) ] θ e = a r c t a n ( l ′ 1 − κ r l ) + θ r (53) \text{笛卡尔坐标系下位置状态}\left\{\begin{aligned} &\theta_{r} = arctan[\frac{y'(s^{\ast })}{x'(s^{\ast })}]\\&(x_{e},y_{e}) \equiv [ x(s^{\ast }) + l^{\ast } \cdot cos(\theta_{r} + \frac{\pi }{2}), y(s^{\ast }) + l^{\ast } \cdot sin(\theta_{r} + \frac{\pi }{2})]\\&\theta_{e} = arctan(\frac{l'}{1-\kappa_{r}l}) + \theta_{r} \\\end{aligned}\right.\tag{53} 笛卡尔坐标系下位置状态θr=arctan[x(s)y(s)](xe,ye)[x(s)+lcos(θr+2π),y(s)+lsin(θr+2π)]θe=arctan(1κrll)+θr(53)

笛卡尔坐标系下运动状态 { v e = s ˙ ( 1 − κ r l ) c o s ( Δ θ ) κ e = { [ l ′ ′ + ( κ r ′ l + κ r l ′ ) t a n ( Δ θ ) ] ⋅ c o s 2 ( Δ θ ) 1 − κ r l + κ r } ⋅ c o s ( Δ θ ) 1 − κ r l a e = s ¨ ( 1 − κ r l ) c o s ( Δ θ ) + s ˙ 2 c o s ( Δ θ ) { l ′ [ κ e ( 1 − κ r l ) c o s ( Δ θ ) − κ r ] − ( κ r ′ l + κ r l ′ ) } (54) \text{笛卡尔坐标系下运动状态}\left\{\begin{aligned}v_{e} &= \frac{\dot{s}(1-\kappa_{r}l)}{cos(\Delta\theta)}\\\kappa_{e} &= \{ \frac{[l''+(\kappa_{r}'l+\kappa_{r}l')tan(\Delta\theta)] \cdot cos^{2}(\Delta\theta)}{1-\kappa_{r}l}+\kappa_{r} \} \cdot \frac{cos(\Delta\theta)}{1-\kappa_{r}l} \\a_{e} &= \frac{\ddot{s}(1-\kappa_{r}l)}{cos(\Delta\theta)} + \frac{\dot{s}^{2}}{cos(\Delta\theta)} \{ l'[\frac{\kappa_{e}(1-\kappa_{r}l)}{cos(\Delta\theta)} - \kappa_{r}] - (\kappa_{r}'l+\kappa_{r}l')\}\end{aligned}\right.\tag{54} 笛卡尔坐标系下运动状态veκeae=cos(Δθ)s˙(1κrl)={1κrl[l+(κrl+κrl)tan(Δθ)]cos2(Δθ)+κr}1κrlcos(Δθ)=cos(Δθ)s¨(1κrl)+cos(Δθ)s˙2{l[cos(Δθ)κe(1κrl)κr](κrl+κrl)}(54)

7 参考文献

【自动驾驶】笛卡尔坐标系和frenet坐标系相互转换

Apollo cartesian_frenet_conversion.c

ving on curvy roads without Frenet frame : Cartesian frame is al you need [ J ], IEEE Transactions on Inteligent Transportation Systems , under review .


  1. LI B , OUYANG Y , ZHANG Y , et al . Trajectory planning for autonomous driving on curvy roads without Frenet frame : Cartesian frame is al you need [ J ], IEEE Transactions on Inteligent Transportation Systems , under review . ↩︎

  2. LI B , ZHANG YM . Fast trajectory planning in Cartesian rather than Frenet frame : A precise solution for autonomous driving in complex urban scenarios [ J ]. IFAC - PapersOnLine ,2020, ↩︎

你可能感兴趣的:(几何学,概率论,机器学习)