In autonomous vehicle design, a lidar sensor scans the surroundings by emitting light pulses across a specific field of view. The domain of the range-finding function is restricted by the sensor's physical limits: the horizontal scanning angle is restricted to radians, and the radial distance is restricted to meters.
To determine how the vehicle should respond to obstacles, software engineers program a piecewise control function to evaluate safety zones:
Determine the vehicle's response and safety state if an obstacle is detected at a distance of:
Step-by-Step Solution:
- For , since , we use the first piecewise condition:
- For , since , we use the second piecewise condition:
- For , since , we use the third piecewise condition:
Meaning of the Answer & Real-Life Application:
Identifying domain constraints and evaluating piecewise functions in real-time allows the vehicle's onboard computer to calculate safe velocity profiles without executing undefined operations or misinterpreting out-of-range sensor noise. For example, if an obstacle is detected outside the sensor's domain ( or ), the system ignores the signal or triggers a sensor fault handler.