Challenge

Project 1 (Mini Project on Vehicle Direction Detection

Aim: To develope a model to show vehicle direction determination.

Abstract:

Identifying the direction of the vehicle is one of the important & diverse features in Autonomous driving & Advanced Driver Assistance Features. This particular sub-feature of identifying the direction of vehicle is basically identifying the direction the vehicle is taking based on the camera input. Camera reads the road signs & stores into its memory with unique values for left turn, right turn & straight drive. Depending on the direction it is taking, final indication is given to the driver – as an indication if he is driving in the recommended direction or not. Vehicle Direction Determination can also be coupled along - side features like GPS systems to identify whether the vehicle is reaching its destination in an optimized manner. This sub feature can also be used along with Lane Detection, Highway Warning, Ramp Entry / Exit in Wrong Way Detection etc.

Objective:

  1. Development of MATLAB Simulink model as per requirement.
  2. Tag the requirements to the simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems is fine.
  3. MBD compliant changes, Data Dictionary creation & code generation is added advantage, and that is not scope of this project.
  4. If choosing code generation, Storage class for Input signals: ImportedExtern; Storage class for Output signal: Export to File; Storage class for local signals: localizable; Storage class for calibration signals: Const.
  5. Choose sample time for all signals as 0.01s.

Blocks Used:

Inport: Provide an input port for a subsystem or model.

Outport: Provide an output port for a subsystem or model.

Switch: Pass through input 1 when input 2 satisfies the selected criterion; otherwise, pass through input 3.

Compare To Constant: Determines the signal by comparing it to a constant.

Logical Operator: The Logical Operator block performs the specified logical operation on its inputs. If the input is true the result is 1, if the input is false or non zero then it is 0.

Mux: The Mux block combines same data type and converts it into a vector output.

Signal Conversion: A signal conversion is used to convert a type of signal to other.

Requirement Tagging: This is used to tag the documentation and load it into the subsystem.

Steps:

  • Select the required word or heading or sentance to tag.

  • Right click on the subsystem `rarr` Requirements `rarr` Link to Selection in Word.

  • After tagging the subsystem will be highlited.

Report:

Almost all vehicle accidents are caused by human error, which can be avoided with Advanced Driver Assistance Systems (ADAS). The role of ADAS is to prevent deaths and injuries by reducing the number of car accidents and the serious impact of those that cannot be avoided.

There are two requirements for the given project:

Requirement - 1:

  • Steering wheel input as yaw rate (Signal name: steeringwheel_yawdegreeinput) is the input for this system.
  • This is compared against 3 angular values, one each for left turn, right turn & straight drive (Calibration Values: right_turn_angularlimit, left_turn_angularlimit, straight_drive_steering_angle) to say which specific direction the steering wheel is turning towards.
  • Use switch blocks to compare & develop this requirement. Keep this requirement in a subsystem & output of this requirement is a local signal (Signal Name: vehicle_turn_status).

Requirement – 2:

  • Keep this requirement as a separate subsystem. Inputs to this requirement are local signal from requirement 1 (Signal Name: vehicle_turn_status) & an input signal from camera (Signal Name: camerainput_roadsign), which confirms the occurrence of a road sign.
  • Signal vehicle_turn_status is compared against calibration values (Calibration Values: rightturn_roadsign, leftturn_roadsign, straight_roadsign), if each of them is found equal, then each of the three corresponding output is compared against the camera input signal,
  • Using a logical operator block, only one among them is finally given as output signal (Signal Name: vehicle_direction_indicator).

Building the Model:

Open Simulink `rarr` Create model `rarr` Modelling Tab `rarr` Repositories `rarr` Link To Data Dictionary.

Give required name in the dialog box and uncheck Enable model acess to base workspace.

Click the Model Explorer Tab and select Design Data and enter the given signals and calibration data.

In the Design Data tab while choosing code generation, Storage class for Input signals: ImportedExtern; Storage class for Output signal: Export to File; Storage class for local signals: localizable; Storage class for calibration signals: Const.

Create a subsytem with two inport and one outport and name them according to the requirements.

Inside the subsystem two mode subsystem and name them as Requirement - 1 and Requirement - 2 and connects the inports and outports.

Requirement - 1:

  • Steering wheel input as yaw rate (Signal name: steeringwheel_yawdegreeinput) is the input for this system.
  • This is compared against 3 angular values, one each for left turn, right turn & straight drive (Calibration Values: right_turn_angularlimit, left_turn_angularlimit, straight_drive_steering_angle) to say which specific direction the steering wheel is turning towards.
  • Use switch blocks to compare & develop this requirement. Keep this requirement in a subsystem & output of this requirement is a local signal (Signal Name: vehicle_turn_status).
  • Use constant blocks and compare to constant blocks and connects them to switches to compare the three angular values.

Set the threshold value to "Not Equal To Zero" so the signal would be between 1 to 3.

Requirement – 2:

  • Keep this requirement as a separate subsystem. Inputs to this requirement are local signal from requirement 1 (Signal Name: vehicle_turn_status) & an input signal from camera (Signal Name: camerainput_roadsign), which confirms the occurrence of a road sign.
  • Signal vehicle_turn_status is compared against calibration values (Calibration Values: rightturn_roadsign, leftturn_roadsign, straight_roadsign), if each of them is found equal, then each of the three corresponding output is compared against the camera input signal,
  • Using a logical operator block, only one among them is finally given as output signal (Signal Name: vehicle_direction_indicator).
  • As per the requirement connect the constant block to logical gate and compare constant to mux. Mux is used to compress input from same data type to vector output.
  • Signal conversion block is used to convert the incoming signal to another signal.

Result: Thus the model has been developed and requirement tagging has been performed.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.