Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:safeav:ctrl:algorithms [2026/04/23 11:26] raivo.sellen:safeav:ctrl:algorithms [2026/06/02 23:40] (current) momala
Line 1: Line 1:
-====== Motion Planning and Behavioural Algorithms ======+====== Methods and Architectures ======
  
-{{:en:iot-open:czapka_b.png?50| Bachelors (1st level) classification icon }}+Having located planning and control within the autonomy stack, the next step is to examine the principal methods used to implement this layer. These methods fall broadly into classical control, AI-based control, behavioral decision-making, and motion-planning architectures, each with different implications for validation, traceability, and safety assurance.
  
-<todo @tgrzejszczak #raivo.sell:2025-09-18></todo>+The chapter therefore distinguishes between two linked topics: 
 + 
 +  - **control strategies**, which determine how the vehicle follows a desired trajectory or state; 
 +  - **behavioral and motion-planning strategies**, which determine which maneuver should be executed and which path or trajectory should be followed. 
 + 
 +A useful way to view the full chain is: 
 + 
 +  **decision-making** selects the maneuver; 
 +  - **motion planning** generates a feasible path or trajectory; 
 +  - **control** tracks that trajectory through the vehicle actuators; 
 +  - **monitoring and replanning** supervise execution and trigger corrections when necessary. 
 + 
 +The distinction is important. A behavior module may be correct in isolation, but if it produces an aggressive maneuver, the motion planner may fail to find a safe trajectory. Likewise, a good planner may still produce unsafe results if the controller cannot track the planned motion or if the system state estimate is inaccurate. This is why planning and control must be presented together, even if they are implemented by different software modules. 
 + 
 +===== Classical Control Strategies ===== 
 + 
 +Classical control strategies form the foundation of most vehicle control systems. They are based on mathematical models of the vehicle and on feedback control principles that relate the current vehicle state to a desired reference. Their main advantage is that they are well understood, mathematically structured, and comparatively easy to analyze. 
 + 
 +^ Aspect ^ Description ^ 
 +| **Core idea** | Measure the current state, compare it to the desired state, compute the error, and generate a control action that reduces the error. | 
 +| **Typical model** | Vehicle dynamics, often simplified or linearized around a nominal operating point. | 
 +| **Main strength** | Predictability, stability analysis, transparency, and mature engineering practice. | 
 +| **Main limitation** | Performance depends strongly on model accuracy and operating conditions. | 
 + 
 +==== Typical classical methods ==== 
 + 
 +1. **PID control**   
 +   The proportional-integral-derivative controller is the most widely used classical method. It computes control action from: 
 +   - the current error, 
 +   - the accumulated past error, 
 +   - the predicted future trend of the error. 
 + 
 +   PID control is widely used for speed regulation, yaw-rate control, heading correction, and other low-level vehicle functions where the controlled variable must stay near a reference value. 
 + 
 +2. **LQR control**   
 +   The linear quadratic regulator is an optimal control method that minimizes a cost function balancing tracking error and control effort. It requires a linear or linearized model and is often used for trajectory tracking, stabilization, and path-following tasks. 
 + 
 +3. **State estimation**   
 +   Classical control is rarely used alone. Controllers usually depend on estimated states obtained through Kalman filters or related observers. These estimators combine measurements from multiple sensors such as IMU, GNSS, wheel-speed sensors, and steering sensors to produce a more reliable estimate of position, velocity, orientation, and yaw rate. 
 + 
 +4. **Sliding mode control**   
 +   Sliding mode control is a robust control method designed to keep the system on a predefined surface despite disturbances and model uncertainty. It is attractive in cases where the system must tolerate external perturbations, though its practical tuning can be more demanding. 
 + 
 +==== Safety properties of classical control ==== 
 + 
 +Classical control methods are attractive in safety-critical systems because they offer a number of practical advantages: 
 + 
 +  * **Predictability:** the control law is explicit and easier to inspect. 
 +  * **Stability analysis:** the behavior can often be studied analytically or with well-known engineering tools. 
 +  * **Transparent tuning:** gains, cost weights, and observer parameters can be justified and documented. 
 +  * **Debuggability:** failures are often easier to trace to a model mismatch, tuning issue, or sensor problem. 
 +  * **Mature practice:** these methods have been used for decades in automotive, aerospace, and industrial control. 
 + 
 +These strengths do not remove the need for validation, but they make the validation argument more structured because the controller behavior can often be bounded more directly. 
 + 
 +==== Limitations of classical control ==== 
 + 
 +The limitations of classical control appear when the operating conditions move away from the assumptions used in design. 
 + 
 +  * **Model dependency:** the controller is only as good as the model on which it is based. 
 +  * **Nonlinear behavior:** tire slip, saturation, load transfer, aerodynamic drag, and road friction changes can all reduce accuracy. 
 +  * **Disturbances:** wind gusts, low friction, slopes, and actuator delays may degrade performance. 
 +  * **Limited adaptability:** a controller tuned for one operating regime may require retuning in another regime. 
 +  * **Scaling difficulty:** the more complex the vehicle dynamics become, the more difficult the tuning and analysis can become. 
 + 
 +For this reason, classical control remains highly valuable, but it is often combined with higher-level decision logic or learned components. 
 + 
 +===== AI-Based Control Strategies ===== 
 + 
 +AI-based control strategies use data-driven methods to learn control behavior from examples, simulations, or interaction with the environment. Instead of specifying the full model and control law manually, the system learns a mapping from state or observation to action. 
 + 
 +^ Aspect ^ Description ^ 
 +| **Core idea** | Learn a control policy from data, simulation, or interaction. | 
 +| **Typical tools** | Reinforcement learning, supervised learning, neural network controllers, learned models for predictive control. | 
 +| **Main strength** | Ability to represent complex nonlinear behavior and adapt to rich environments. | 
 +| **Main limitation** | Harder to interpret, certify, and guarantee under all operating conditions. | 
 + 
 +==== Typical AI-based methods ==== 
 + 
 +1. **Reinforcement learning**   
 +   Reinforcement learning learns a policy through trial and error. The controller receives observations, selects actions, and receives rewards or penalties. Over time, it tries to maximize cumulative reward. In autonomous driving, this can be used for behavior selection, trajectory control, or adaptive decision-making in simulation-based training environments. 
 + 
 +2. **Supervised learning for control**   
 +   In supervised approaches, the model is trained on expert demonstrations or labeled data. It learns to imitate desired control outputs. This can be useful when expert behavior is available and when the goal is to reproduce a known control style or policy. 
 + 
 +3. **Neural network controllers**   
 +   A neural network may directly map current state estimates to steering, braking, throttle, or other actuator commands. This can be effective in highly nonlinear settings, but it creates validation challenges because the internal decision process is not as transparent as in classical control. 
 + 
 +4. **Learned models inside MPC**   
 +   Model predictive control can remain the outer optimization structure while a learned model replaces or augments part of the vehicle dynamics model. This can improve accuracy in difficult-to-model situations while preserving the optimization structure of MPC. 
 + 
 +==== Safety properties of AI-based control ==== 
 + 
 +AI-based control can be powerful, but its validation burden is significantly higher. 
 + 
 +  * **Handling complexity:** AI can represent difficult nonlinear relationships that are hard to capture analytically. 
 +  * **Adaptability:** it may handle diverse scenarios and gradual changes in the environment or vehicle condition. 
 +  * **Data dependence:** it inherits biases, gaps, and limitations from the training set. 
 +  * **Generalization risk:** behavior outside the training distribution may be unreliable. 
 +  * **Explainability challenge:** the reason for a particular action may be difficult to inspect. 
 +  * **Formal guarantees:** strong mathematical safety proofs are often difficult to establish for production systems. 
 + 
 +These characteristics do not make AI-based control unsuitable, but they mean that the validation strategy must be broader, more scenario-driven, and more conservative in how safety is claimed. 
 + 
 +==== Challenges and safety concerns ==== 
 + 
 +The main concerns for AI-based control are: 
 + 
 +  * **black-box behavior**, which makes debugging and certification more difficult; 
 +  * **training-data dependency**, where performance depends heavily on the quality and diversity of examples; 
 +  * **out-of-distribution behavior**, where the controller is asked to act in situations it has not learned; 
 +  * **adversarial vulnerability**, where inputs may be crafted to mislead the model; 
 +  * **safety assurance**, where proving stability and bounded behavior remains difficult for complex systems. 
 + 
 +For these reasons, AI-based control is often paired with explicit runtime monitoring, fallback logic, and classical low-level control. 
 + 
 +===== Behavioral Algorithms ===== 
 + 
 +Behavioral algorithms decide the next maneuver or driving intention. They answer questions such as: 
 +  - Should the vehicle stop or continue? 
 +  - Should it yield, follow, overtake, or change lane? 
 +  - Should it remain in the current lane or prepare a reroute? 
 + 
 +Behavioral algorithms define the transition from perception and prediction to motion planning. They are the bridge between what the vehicle understands and what it intends to do. 
 + 
 +==== Common behavioral approaches ==== 
 + 
 +| Method | Main idea | Typical use | 
 +|---|---|---| 
 +| **Finite State Machines** | Use discrete states and transitions to represent maneuvers | lane following, stop-and-go logic, lane change preparation | 
 +| **Hierarchical State Machines** | Organize behaviors in layers with mission-level and maneuver-level states | more complex driving logic with nested decisions | 
 +| **Behavior Trees** | Use tree structures with selectors, sequences, and conditions | modular, readable, reusable maneuver logic | 
 +| **Rule-Based Systems** | Apply explicit if-condition-then-action rules | traffic-law compliance, right-of-way handling | 
 +| **Utility-Based Methods** | Score candidate behaviors and choose the best option | trade-offs between safety, efficiency, and comfort | 
 +| **Learning-Based Behavior** | Learn behavior selection from data or interaction | adaptive maneuver selection, complex interaction handling | 
 + 
 +==== Behavioral safety concerns ==== 
 + 
 +Behavioral logic must be validated for: 
 + 
 +  * **rule compliance**, such as stopping at red lights and respecting right-of-way; 
 +  * **predictability**, so that other road users can anticipate the vehicle’s actions; 
 +  * **consistency**, so similar situations lead to similar decisions; 
 +  * **uncertainty handling**, especially when perception is incomplete or prediction is uncertain; 
 +  * **ethical tension**, where the system may face competing safety, comfort, or efficiency objectives. 
 + 
 +Behavioral algorithms are therefore not just a software convenience. They are part of the safety argument because they determine when the vehicle acts, when it waits, and when it escalates to a fallback behavior. 
 + 
 +===== Motion Planning ===== 
 + 
 +Motion planning turns a behavioral decision into a concrete path or trajectory. If the behavioral layer decides *what* the vehicle should do, motion planning determines *how* it can do it safely. 
 + 
 +==== Common motion-planning families ==== 
 + 
 +1. **Grid-based planning**   
 +   Grid planners such as A* or D* work on a discretized map. They are useful for route-level or map-based planning and can be efficient when the environment is represented in a structured way. 
 + 
 +2. **Sampling-based planning**   
 +   Methods such as RRT, RRT*, and PRM explore the state space by sampling and connecting feasible states. They are useful in higher-dimensional planning problems and in situations where exact search is difficult. 
 + 
 +3. **Optimization-based planning**   
 +   Trajectory optimization and MPC-style planning formulate motion planning as an optimization problem. They are especially suitable for generating smooth trajectories while respecting constraints on collision avoidance, curvature, acceleration, and comfort. 
 + 
 +4. **Potential-field methods**   
 +   These methods use attractive and repulsive forces to guide the vehicle. They are conceptually simple, but they may suffer from local minima or unstable motion in complex scenes. 
 + 
 +5. **Lattice-based planning**   
 +   Predefined motion primitives are searched to build feasible trajectories. This is efficient and often attractive for road vehicles because it can respect kinodynamic constraints more naturally. 
 + 
 +==== Motion-planning safety aspects ==== 
 + 
 +Motion planning must satisfy several requirements at the same time: 
 + 
 +  * **collision avoidance**: the path must not intersect obstacles or unsafe regions; 
 +  * **feasibility**: the trajectory must be physically executable by the vehicle; 
 +  * **comfort**: acceleration and jerk should remain within acceptable limits; 
 +  * **predictability**: the path should be understandable to the vehicle and to other road users; 
 +  * **reactivity**: the planner must be able to update when the environment changes; 
 +  * **robustness**: the planner should remain safe when perception or prediction is uncertain. 
 + 
 +==== Motion-planning challenges ==== 
 + 
 +  * **real-time computation**, especially in dense traffic or high-speed scenarios; 
 +  * **dynamic obstacles**, where the environment changes while the vehicle is moving; 
 +  * **uncertain predictions**, where other actors may not behave as expected; 
 +  * **conflicting objectives**, such as safety versus efficiency versus comfort; 
 +  * **limited generalization**, where a planner may work well only in situations similar to those used during design. 
 + 
 +Motion planning is therefore best understood as a constrained decision problem, not merely a geometric search problem. 
 + 
 +===== Integration and Hybrid Architectures ===== 
 + 
 +In production systems, purely classical or purely AI-based solutions are uncommon. Most autonomy stacks are hybrid. 
 + 
 +^ Hybrid pattern ^ Typical structure ^ Why it is useful ^ 
 +| **AI high-level, classical low-level** | AI selects maneuvers; classical controller tracks trajectory | preserves transparent low-level actuation | 
 +| **AI model, classical controller** | Learned vehicle model inside a classical MPC framework | improves model accuracy while keeping optimization structure | 
 +| **Classical baseline, AI exception handling** | Classical controller handles normal cases; AI assists in rare cases | keeps the core system predictable | 
 +| **Safety layer plus learned policy** | Learned planner or controller is constrained by a safety monitor | useful for bounding behavior in difficult environments | 
 +| **Tuned hybrid controller** | Neural network adjusts gains or parameters of a classical controller | combines adaptability with known control structure | 
 + 
 +These architectures reflect the practical reality of autonomy engineering. The most safety-critical elements are usually kept as transparent and bounded as possible, while AI is introduced where it adds the most value and where validation methods are strong enough to support it. 
 + 
 +===== Summary Perspective ===== 
 + 
 +The main lesson of this subsection is that planning, control, and decision-making must be treated together. Classical methods provide structure, transparency, and a strong safety tradition. AI-based methods provide flexibility and a way to address complexity that is difficult to model explicitly. Behavioral algorithms and motion planners convert system understanding into executable motion. Hybrid systems combine these strengths and are often the most realistic route to deployable autonomy. 
 + 
 +The next step is to validate these methods not only in isolation, but as parts of a system. For that reason, the following subsection should move from methods to validation, scenario design, and testing. 
 + 
 + 
 + 
 + 
 + 
 + 
 +/*  ----------------Commented 
 + 
 +====== Motion Planning and Behavioural Algorithms ======
  
-While decision-making algorithms determine *what* high-level goal the autonomous vehicle should pursue (e.g., reach destination, avoid obstacle, follow lane), motion planning and behavioral algorithms translate these goals into specific, executable paths and maneuvers within the dynamic and complex environment. This sub-chapter delves into these critical components, exploring how they generate safe, efficient, and predictable trajectories and behaviors for the vehicle. The interplay between planning the path and deciding the behavior is fundamental to the safe operation of autonomous vehicles, requiring algorithms that can handle uncertainty, react to other road users, and comply with traffic rules.+While decision-making algorithms determine **what** high-level goal the autonomous vehicle should pursue (e.g., reach destination, avoid obstacle, follow lane), motion planning and behavioral algorithms translate these goals into specific, executable paths and maneuvers within the dynamic and complex environment. This sub-chapter delves into these critical components, exploring how they generate safe, efficient, and predictable trajectories and behaviors for the vehicle. The interplay between planning the path and deciding the behavior is fundamental to the safe operation of autonomous vehicles, requiring algorithms that can handle uncertainty, react to other road users, and comply with traffic rules.
  
 ===== Behavioral Algorithms: Deciding the "What" and "When" ===== ===== Behavioral Algorithms: Deciding the "What" and "When" =====
  
-Behavioral algorithms form the higher-level decision-making layer that interprets the vehicle's goals and the perceived environment to choose appropriate driving behaviors. They determine *what* the vehicle should do next and *when* to do it, such as deciding to change lanes, yield, accelerate, or stop.+Behavioral algorithms form the higher-level decision-making layer that interprets the vehicle's goals and the perceived environment to choose appropriate driving behaviors. They determine **what** the vehicle should do next and **when** to do it, such as deciding to change lanes, yield, accelerate, or stop.
  
 ==== Key Behavioral Concepts ==== ==== Key Behavioral Concepts ====
Line 85: Line 301:
   *   **Future Trends:** Research is moving towards more integrated, learning-based approaches where AI models might learn both behavioral policies and motion planning strategies simultaneously from data. There is also a focus on multi-agent planning, where the vehicle explicitly models and coordinates with other agents in the environment. Ensuring safety within these more complex and less transparent systems remains a core focus.   *   **Future Trends:** Research is moving towards more integrated, learning-based approaches where AI models might learn both behavioral policies and motion planning strategies simultaneously from data. There is also a focus on multi-agent planning, where the vehicle explicitly models and coordinates with other agents in the environment. Ensuring safety within these more complex and less transparent systems remains a core focus.
  
-===== Conclusion ===== 
  
 Motion planning and behavioral algorithms are the intelligent core that guides autonomous vehicles through the complexities of the real world. Behavioral algorithms decide the appropriate high-level actions based on goals and the environment, while motion planners generate the precise, safe, and feasible paths to execute those actions. Both face significant challenges related to complexity, uncertainty, computational demands, and safety assurance. The successful integration and continuous refinement of these algorithms, underpinned by rigorous testing and validation, are essential steps towards achieving the high levels of safety required for autonomous vehicles to operate reliably and deploy widely. Their evolution will continue to be a critical driver in the development of safe autonomous mobility. Motion planning and behavioral algorithms are the intelligent core that guides autonomous vehicles through the complexities of the real world. Behavioral algorithms decide the appropriate high-level actions based on goals and the environment, while motion planners generate the precise, safe, and feasible paths to execute those actions. Both face significant challenges related to complexity, uncertainty, computational demands, and safety assurance. The successful integration and continuous refinement of these algorithms, underpinned by rigorous testing and validation, are essential steps towards achieving the high levels of safety required for autonomous vehicles to operate reliably and deploy widely. Their evolution will continue to be a critical driver in the development of safe autonomous mobility.
  
---- +*/
-===== Case Study and Safety Argumentation ===== +
-On the TalTech iseAuto shuttle, the digital twin (vehicle model, sensor suite, and campus environment) is integrated with LGSVL/Autoware through a ROS bridge so that “photons-to-torque” loops are exercised under realistic scenes before any track test. Scenarios are distributed over the campus xodr network using Scenic/ M-SDL; multiple events can be chained within a scenario to probe planner behaviors around parked vehicles, slow movers, or oncoming traffic. Logging is aligned to the KPIs above so outcomes are comparable across LF/HF layers and re-runnable when planner or control parameters change. +
-In practice, this has yielded a concise, defensible narrative for planning & control safety: (1) what was tested (formalized scenarios across a structured parameter space); (2) how it was tested (two-layer simulation with a calibrated digital twin and, when necessary, track execution); (3) what happened (mission success, DTC minima, TTC profiles, braking/steering transients, localization drift); and (4) why it matters (evidence that tuning or algorithmic changes move the decision–execution loop toward or away from safety). The same framework has been used to analyze adversarial stresses on rule-based local planners, reinforcing that planning validation must include robustness to distribution shifts and targeted perturbations. +
-As a closing reflection, the approach acknowledges that simulation is not the world—so it measures the gap. By transporting formally generated cases to the track and comparing time-series behaviors, the program both validates planning/control logic and calibrates the digital twin itself, using discrepancies to guide model updates and ODD limits. That is the hallmark of modern control & planning V&V: scenario-driven, digitally twinned, formally grounded, and relentlessly comparative to reality. +
- +
  
en/safeav/ctrl/algorithms.1776932767.txt.gz · Last modified: by raivo.sell
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0