A system for controlling a lane keeping feature of a vehicle, the lane keeping feature having a predefined safety requirement criterion for keeping the vehicle within bounds while the lane keeping feature is active, the system comprising: a road estimation module configured to: receive sensor data comprising information about a surrounding environment of the vehicle; and determine a drivable area based on the sensor data, the drivable area comprising a left boundary and a right boundary extending along a direction of travel of the vehicle, wherein each boundary comprises a plurality of points distributed along each boundary, each point being associated with a confidence level (21a-d); a trajectory planning module configured to: receive the determined drivable area; determine a nominal trajectory based on the received drivable area, wherein the nominal trajectory is further determined based on the predefined safety requirement criterion and a predefined availability criterion, wherein the predefined availability criterion defines a probability of an updated nominal trajectory not being available in a subsequent time step; determine a back-up stop trajectory for the vehicle based on the received drivable area, the back-up stop trajectory being further determined based on a predefined confidence criterion; wherein the predefined confidence criterion is dependent on the predefined safety requirement criterion and a predefined value of frequency of back-up stops, wherein the predefined value of frequency of back-up stops is based on the predefined availability criterion for the nominal trajectory. a road estimation module configured to: receive sensor data comprising information about a surrounding environment of the vehicle; and determine a drivable area based on the sensor data, the drivable area comprising a left boundary and a right boundary extending along a direction of travel of the vehicle, wherein each boundary comprises a plurality of points distributed along each boundary, each point being associated with a confidence level (21a-d); receive sensor data comprising information about a surrounding environment of the vehicle; and determine a drivable area based on the sensor data, the drivable area comprising a left boundary and a right boundary extending along a direction of travel of the vehicle, wherein each boundary comprises a plurality of points distributed along each boundary, each point being associated with a confidence level (21a-d); a trajectory planning module configured to: receive the determined drivable area; determine a nominal trajectory based on the received drivable area, wherein the nominal trajectory is further determined based on the predefined safety requirement criterion and a predefined availability criterion, wherein the predefined availability criterion defines a probability of an updated nominal trajectory not being available in a subsequent time step; determine a back-up stop trajectory for the vehicle based on the received drivable area, the back-up stop trajectory being further determined based on a predefined confidence criterion; receive the determined drivable area; determine a nominal trajectory based on the received drivable area, wherein the nominal trajectory is further determined based on the predefined safety requirement criterion and a predefined availability criterion, wherein the predefined availability criterion defines a probability of an updated nominal trajectory not being available in a subsequent time step; determine a back-up stop trajectory for the vehicle based on the received drivable area, the back-up stop trajectory being further determined based on a predefined confidence criterion; wherein the predefined confidence criterion is dependent on the predefined safety requirement criterion and a predefined value of frequency of back-up stops, wherein the predefined value of frequency of back-up stops is based on the predefined availability criterion for the nominal trajectory.