Challenge

Project 1 (Mini Project on Vehicle Direction Detection

Project -1 Vehicle Direction Determination

Aim: To identify the direction of vehicle based on steering and camera inputs

Objectives:

  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

Requirement - 1:

  1. Steering wheel input as yaw rate (Signal name: SteeringWheel_YawDegreeInput) is the input for this system.
  2. 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.
  3. 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:

  1. 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.
  2. 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,
  3. Using a logical operator block, only one among them is finally given as output signal (Signal Name: Vehicle_Direction_Indicator).

Signals & Calibration Data List:

Signal / Calibration Name Signal Type Data Type

Dimension

Min Max Initial Value Unit
SteeringWheel_YawDegreeInput Input Int16 1 -180 180 - deg
CameraInput_RoadSign Input Boolean 1 0 1 - deg
Vehicle_Turn_Status Local Int16 1 -180 180 - deg
Right_Turn_AngularLimit Calibration Int16 [1 1] -180 180 30 deg
Left_Turn_AngularLimit Calibration Int16 [1 1] -180 180 -120 deg
Straight_Drive_Steering_Angle Calibration Int16 [1 1] -180 180 0 deg
RightTurn_RoadSign Calibration Int16 [1 1] -180 180 30 deg
LeftTurn_RoadSign Calibration Int16 [1 1] -180 180 -120 deg
Straight_RoadSign Calibration Int16 [1 1] -180 180 0 deg
Vehicle_Direction_Indicator Output Boolean 3 0 1 - -

Solution:

In the given project, we have been tasked to determine the direction of a vehicle based on inputs from the camera and the steering wheel. Two requirements have been provided and our model needs to satisfy both of them.

Firstly, we begin by defining the data dictionary for the signals to be used. For it, we follow:

Modeling->Model properties->Click on New->Name the SLDD and save it

After creating the SLDD, we add all the signals to it as per the given details. Next, we move on to building the model. According to the given requirements, it is clear that the model should have two subsystems, corresponding to the two given requirements. Heading to the first requirement, steering wheel input is the only input to this system. This input is to be compared against three values for the left, right and straight angular limits. This can be done using the compare to constant blocks. Corresponding to the outputs of the given comparators, only the true conditions should pass through the subsystem as outputs. For it, the switch block is used. Here the multiport switch is used for better feasibility. The output of the subsystem would thus be the vehicle turn status, indicating in which direction the vehicle is moving based on the steering wheel yaw degree input.

Next, we move on to requirement no 2. For this also there would be a separate subsystem and the output of the first subsystem (i.e. the vehicle turn status) alongwith the camera inputs (regarding the road signs) are fed as inputs to the system. The turn status is compared against the road sign and then is verified against the camera input. If the camera input is available, then based on the input and the turn status, our system will prompt the user as to what action he needs to take.

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.