|
Algorithm 1 Online MPC Control Loop with Optional Disturbances and Re-Entry Strategy |
| Require: , , , , bounds , band , reference path , optional disturbances
|
| 1: |
while goal not reached do
|
|
| 2: |
Read
|
|
| 3: |
Compute lateral errors for all
|
|
| 4: |
Find closest point
|
|
| 5: |
← ComputeReferenceHorizon
|
▹ see Algorithm 2 |
| 6: |
Build by stacking from
|
|
| 7: |
Linearize model at to obtain
|
|
| 8: |
Construct prediction matrices from and
|
|
| 9: |
Form ,
|
|
| 10: |
Compute ,
|
|
| 11: |
Solve s.t.
|
|
| 12: |
Extract and apply
|
|
| 13: |
if a disturbance is due then
|
|
| 14: |
Apply for seconds; mark as applied; continue
|
|
| 15: |
Update metrics (, band exits, # re-entries) |
|