Unit 06 notes: Cooperative path following and reconfiguration
Draft for instructor review - not approved for teaching, assessment, translation, or physical deployment.
Purpose, prerequisites, and outcomes
Two survey robots can stay close to their assigned curves while losing their intended relative progress. A moving target can also remain ahead of a robot by design. We therefore specify three objectives separately: convergence to a geometric path, convergence to a moving target, and regulation of team progress. None establishes collision safety.
Prerequisites are planar rotations, unicycle kinematics, derivatives and elementary Lyapunov analysis. The shared student reference is maintained at repository path common/control_foundations/en/notes.qmd; its stability and invariant-set sections supply the recap needed here. The geometry and local calculations below are derived explicitly. Marine guidance context is provided by (Fossen 2011, Ch. 10); the imported browser models are pedagogical constructions, not implementations of a verified marine-controller theorem.
After studying this unit, students should be able to:
- distinguish a geometric path from a timed trajectory and a moving target;
- construct a path frame, convert parameter rate to physical speed, and derive projection and moving-target error dynamics;
- check a dimensionally consistent local heading-rate controller and a conditional Cartesian target tracker;
- interpret supplied leader/reference offsets, communication validity, and distinct team-error metrics; and
- state feasibility, safety and supervision conditions for a bounded reconfiguration case.
Path-frame definitions
Use a right-handed planar mathematical frame with x to the right, y upward and positive heading counterclockwise. Positions are in metres, time in seconds and angles in radians. These conventions describe a plane; calling it a marine NED frame without an explicit coordinate and angle mapping would change the sign interpretation.
A path is an oriented curve without a required time law. A trajectory prescribes position at a particular time. Write an arc-length-parameterized path as , where [m] measures signed forward progress from a declared origin. Assume the curve is at least and regular. Its unit tangent and chosen left normal are
Here is the tangent angle and maps path-frame components to world-frame components. Therefore maps a world vector into tangent/normal coordinates. Signed curvature [m] satisfies
Positive curvature turns toward the chosen left normal. By the chain rule, a target advancing with arc-length rate has tangent angular rate
Curvature measures turning per metre; curvature times physical path speed measures turning per second. A circle of radius m has m under counterclockwise orientation. At m/s, its frame turns at rad/s. A tangent change of rad covers m. For a general path,
Angle change alone cannot determine distance: a tight turn and a broad turn can have the same angle change. On a straight segment , distance can increase while tangent angle stays constant. Inverting the angle to obtain distance requires a known curvature relation and an interval where that inversion is valid.
Arbitrary parameter versus arc length
Most implementations store an easier parameter than arc length. Let describe the same path, with . Then
The signed speed is and the speed magnitude is . For ,
All derivatives in this formula are with respect to . Regularity excludes points where both derivatives vanish. It does not exclude zero curvature.
The imported multi-robot Version 4 uses horizontal station, called s in its code. We denote it to distinguish it from arc length. Its sine route is
when station and the numerical constants 4, 7, 22 and are expressed in metres. Here is the lane offset and is a horizontal shift of the sine pattern. The spatial period is m; 22 m is the sine’s length scale, not its full wavelength. With denoting the second component,
Worked parameter check. At , , so . A station rate of 1.5 m/s gives target path speed 1.57409951 m/s. Conversely, nominal path speed 1.55 m/s requires a free-running station rate m/s. Feedback, limits and reference tracking can change that rate, so the simulator’s nominal pace is not its realized target speed. A lane offset changes vertical position, a sine shift moves peaks horizontally, and a desired progress lag defines a separate team objective.
Closest-point projection and error dynamics
First choose the path point as the robot’s closest projection, within a neighborhood where that projection is unique. Its tangential position error is zero, so
where [m] is positive on the left side of the oriented curve. Differentiating gives
For the ideal unicycle
[m/s] is forward speed and [rad/s] is yaw rate. Define a continuous local heading-error coordinate . Resolving velocity along and yields
The projection’s is determined by robot motion and geometry. It is not an independently assignable target speed. A smooth path and avoid a local coordinate singularity, but do not alone prove global uniqueness of the nearest point. Nearby branches and self-intersections can make projection ambiguous. Piecewise-linear corners lack a well-defined tangent/curvature at the corner and require a declared switching or smoothing procedure.
Straight-path sign check. For , and . At m/s and rad, m/s and m/s. A positive heading error initially increases the positive cross-track error. For a counterclockwise circle, the normal points inward; the factor vanishes at the circle centre, where the closest point is not unique.
Stabilizing law and a local convergence claim
Let be a fixed error-normalization length [m] and a heading-error gain [s]. Choose the dimensionless function
and define with . Select
Each term in has units s, with angles expressed in radians. Taking m reproduces the previous numerical coefficients when lengths are entered in metres; is a normalization scale, not a lookahead distance. Without it, adding squared metres to squared heading error and using as an angular rate hides a dimensional error.
For constant , exact continuous-time actuation and no saturation,
A nonpositive derivative does not by itself establish attraction. On we have , but there
Consequently only remains invariant. Apply LaSalle to the autonomous error dynamics on a compact positively invariant sublevel of contained inside a neighborhood with valid unique projection, and a continuous local heading-error coordinate. Such a neighborhood and sufficient heading-rate authority are assumptions of this local claim. The along-path coordinate itself need not be compact. If an error sublevel lies within the valid domain and commands remain feasible there, nonincrease of keeps its errors in that sublevel. Merely knowing for a varying speed does not establish the constant-speed argument used here.
For m, m, m/s, s, rad and a straight path, the requested yaw rate is rad/s and s. A yaw-limited robot may be unable to execute that request, so its actual need not equal the ideal expression.
The committed scripts/generate_path_following.py plot uses a different, bounded heading choice on a straight path. It checks signs and simple path convergence; it does not numerically validate this heading-rate law.
An independently evolving virtual target
Now choose a reference point whose progress is an independent state, rather than the closest projection. Define the vehicle-minus-target error in the moving path frame:
Both components can be nonzero. Using , where , gives
The terms involving curvature arise because the error frame rotates. If is supplied by an independent target law, use these two position-error equations. If the point is the closest projection, impose and solve the first equation for to recover the projection model above. These constructions cannot be interchanged. For an arbitrary station , replace with everywhere.
Cartesian tracking with target-velocity feedforward
A simple fully actuated reference calculation uses the opposite error convention,
where is in world coordinates and is a constant symmetric positive-definite gain matrix [s]. If the vehicle executes exactly, then
Target-velocity feedforward cancels motion of the reference. Proportional position feedback then removes the remaining position error. For s and initial target error m, the ideal norm after 5 s is m.
A unicycle-like simulator instead asks for heading and speed , then applies speed/yaw limits. If the realized velocity differs by , the actual equation is
Thus exact exponential convergence is a conditional ideal calculation. Heading transients, propulsion reduction, current and saturation can create tracking error. The zero-command direction also requires an implementation convention. This construction does not prove stability of an underactuated hydrodynamic marine vehicle.
The early imported simulator kept an intended preview gap of 9.5 m; tracking that gap is a different objective from driving target distance to zero. The recovered V4 offers both modes. In this unit use Track actual virtual target, and keep preview only as a contrast between specifications.
Multi-vehicle path offsets and supplied reference
A transparent in-scope architecture supplies timestamped arc-length reference and fixed offsets [m]. Define
Negative means behind the reference. Under the ideal reduced interface , an unsaturated command
gives . This is a supplied-reference tracking calculation: each vehicle needs the reference, its own progress, the fixed offset and a feasible progress input. A physical path follower must convert the progress request into admissible speed/heading commands. Clipping that request, stale reference data or a failed local tracker changes the scalar error equation. A target being synchronized does not imply the physical robot has reached it.
For m, desired follower offset m and actual progress m, the progress error is m: the follower is behind its assigned 22 m station. With reference rate 1.2 m/s and s the ideal request is 1.8 m/s. If authority is limited to 1.5 m/s, use the limited request and report the changed error dynamics.
The browser V4 uses station rather than arc length and offers Leader broadcast (one-way). For this course use only that supplied-reference/leader subset. On different route shapes equal station does not mean equal travelled distance, a rigid Euclidean formation, aligned peaks or collision-free motion. On a sine wave, changing moves peaks even when station lags stay zero.
Every reference packet needs the path ID/version, progress definition, units, frame, timestamp/clock basis, derivative, sequence and validity. When age exceeds a declared threshold, stop trying to close progress error using that stale reference. Enter a specified slow/hold/loiter/surface/abort policy appropriate to the platform, while preserving only locally valid behavior. A toy communication switch supplies no validated operational timeout.
Simulator metrics, faults, and a reproducible comparison
The maintained browser collection is at repository root html/, with multirobot.html for the recovered V4 and los.html for the dedicated LOS model. Use the portal to launch them. Paths are given here as repository locations because the root portal and rendered course notes have different publication roots.
Define metrics before accepting a plot label. For robots, desired positive station lag behind robot 1, actual x coordinate and target station , V4 calculates
is actual x-station alignment RMS, not complete physical formation error; is target-station alignment RMS; measures local moving-target tracking. In the archived import, “Physical formation RMS” and CSV physical_RMS_m refer to . The maintained copy names the columns vehicle_x_station_RMS_m, target_x_station_RMS_m and vehicle_to_target_RMS_m to make these definitions explicit. The code’s mean path-error approximation is
This is a local tangent-distance approximation for a graph path, rather than an exact closest-point distance on a general curve. The logged minimum separation is
It measures point-centre distance; no hull radii are included. The maintained CSV names the path approximation approx_cross_track_absolute_mean_m and separation min_vehicle_point_separation_m. The archive’s older min_hull_separation_m name is misleading and must not be read as a hull-clearance measurement. Two robots with x errors m and m relative to their prescribed slots give m, regardless of their lateral error. A small can therefore coexist with poor geometry or collision risk.
V4’s fault slider multiplies achieved speed on the selected robot after its scripted event time (18 s in this version). It is a speed multiplier, not an electrical-power, thruster or hydrodynamic fault model. The optional outage at 58 s disables the reference-coupling contribution while retaining local target following; it does not simulate individual delayed packets, clocks, jitter or a physical radio/acoustic channel. No collision avoidance, environmental current or hull dynamics is included.
For an ungraded 12-minute comparison, select three robots, the mixed-path preset, Leader broadcast (one-way) and Track actual virtual target. Record nominal speed 1.55 m/s, each pace multiplier, path choices, shifts, lane offsets, lags, gain, initial state, fault settings and simulator version. First disable faults and compare independent target following with supplied-leader operation. Then repeat matched runs with the same selected robot and speed multiplier fault; finally test the reference switch separately. Reset between comparisons. Export CSV and describe , , , actual/target speeds and minimum centre separation together. Predict which error each change should affect before running it. Do not use the preserved transcript’s numerical outcomes as checked answers for a different version or scenario.
The dedicated LOS simulator uses closest-path geometry and a tangent lookahead construction. V4’s “LOS” baseline instead aims at the route point at horizontal station m. Those geometries and plant abstractions differ: a cross-simulator comparison cannot isolate a guidance algorithm unless the relevant conditions are matched.
Bounded grid reconfiguration: optional extension
The optional hybrid case uses fixed role-to-cell mappings. A discrete supervisor permits a move only when the destination and swept region are clear, localization is valid, and timeout/deadlock checks pass. The continuous controller then realizes the motion. This is a safety-focused abstraction of the legacy grid material; it does not claim deadlock freedom without a complete proof. The 120-minute plan prioritizes the path/target/reference distinction; grid reconfiguration remains an optional appendix or follow-up activity.
Assumptions, failure cases, and summary
Check smoothness and regularity, projection uniqueness, heading branch, scale and units, turn/speed authority, sampling, pose error, reference age and degraded mode. Test straight and curved paths, ambiguous projection, speed zero/reversal, infeasible targets, saturation and reference outage. Log requested and executed inputs beside errors. Collision safety requires its own geometry, sensing/delay/actuation conditions and safe-set argument; decreasing a tracking function is insufficient.
Path following regulates geometry; moving-target tracking adds a specified reference evolution; shared progress adds a team objective. The equations, parameter definitions, validity domain and measurement definitions must accompany every claim. Core marine background is (Fossen 2011, Ch. 10). All detailed equations and numerical examples above are derived here; imported conversations identify teaching ideas and model history. ../source_map.yml records provenance and limitations. English remains a technical-review draft; Croatian synchronization awaits English approval.