boat's heading: ψ b {\displaystyle \psi _{b}}
direction of trajectory: μ r {\displaystyle \mu _{r}}
rudder angle: δ {\displaystyle \delta }
perturbative torque: r b {\displaystyle r_{b}}
perturbative current: d y {\displaystyle d_{y}}
Yaw r ˙ = − 1 T r + K T δ + 1 T r b {\displaystyle {\dot {r}}=-{\frac {1}{T}}r+{\frac {K}{T}}\delta +{\frac {1}{T}}r_{b}}
Heading ψ ˙ b = r {\displaystyle {\dot {\psi }}_{b}=r}
Cross track error y ˙ = u sin ( ψ b − μ r ) + α r cos ( ψ b − μ r ) + d y {\displaystyle {\dot {y}}=u\sin(\psi _{b}-\mu _{r})+\alpha r\cos(\psi _{b}-\mu _{r})+dy}
sway (traversal velocity) : α {\displaystyle \alpha }
---+ Trajectory without sway
x ˙ = u sin ( ∫ r d t ) {\displaystyle {\dot {x}}=u\sin \left(\int rdt\right)}
y ˙ = u cos ( ∫ r d t ) {\displaystyle {\dot {y}}=u\cos \left(\int rdt\right)}
---+ Trajectory with sway
x ˙ = u sin ( ∫ r d t ) + α r cos ( ∫ r d t ) {\displaystyle {\dot {x}}=u\sin \left(\int rdt\right)+\alpha r\cos \left(\int rdt\right)}
y ˙ = u cos ( ∫ r d t ) − α r sin ( ∫ r d t ) {\displaystyle {\dot {y}}=u\cos \left(\int rdt\right)-\alpha r\sin \left(\int rdt\right)}
α {\displaystyle \alpha } minimizes sum of errors
E = ∑ i = 1 N ( x o b s − x c a l c ) 2 + ( y o b s − y c a l c ) 2 {\displaystyle E=\sum _{i=1}^{N}(x_{obs}-x_{calc})^{2}+(y_{obs}-y_{calc})^{2}}
δ = K p ( ψ r − ψ b ) − K d ψ ˙ b + K i ∫ 0 t ( ψ r − ψ b ) d τ {\displaystyle \delta =K_{p}(\psi _{r}-\psi _{b})-K_{d}{\dot {\psi }}_{b}+K_{i}\int _{0}^{t}(\psi _{r}-\psi _{b})d\tau }
limit ψ r {\displaystyle \psi _{r}} to ± π / 2 {\displaystyle \pm \pi /2}
ψ r = − arctan { K 1 ( y + 1 T ∫ 0 t y d τ ) } {\displaystyle \psi _{r}=-\arctan \left\{K_{1}\left(y+{\frac {1}{T}}\int _{0}^{t}yd\tau \right)\right\}}