Project 1 (Mini Project on Vehicle Direction Detection
Aim of the project:
The aim of this project is to create a MATLAB Simulink model (attached separately) that can accurately determine the direction in which a vehicle is moving. This determination is based on two primary inputs:
1. Steering Wheel Input: The system takes input from the vehicle's steering wheel in the form of yaw rate, which indicates how much the driver is turning the wheel.
2. Camera Input: The project also considers data from a camera, which captures and interprets road signs. The camera input helps the system confirm the presence of specific road signs, such as those indicating left turns, right turns, or straight driving.
Analyzing these inputs, the system aims to provide the driver with clear and timely directional indications. These indications can be crucial for safe and efficient driving, especially in scenarios such as autonomous driving and advanced driver assistance systems.
In summary, the project aims to build a model that combines data from the steering wheel and the camera to accurately determine the vehicle's direction. This information can assist the driver in following recommended directions and enhance the overall driving experience.
Description:
- We created two subsystems for Requirement 1 and Requirement 2 as per the problem statement
- In Requirement 1 we have a single input (SteeringWheel_YawDegreeInput) and a single output (Vehicle_Turn_Status)
- In Requirement 2 we have two inputs (CameraInput_RoadSign & Vehicle_Turn_Status) and a single output (Vehicle_Direction_Indicator)
- Inside the Requirement 1 subsystem, we are comparing the yaw rate input received from the steering (physical parameter) and compare it with 3 different parameters viz. Right_Turn_AngularLimit, Straight_Drive_Steering_Angle, and Left_Turn_AngularLimit.
- If the yaw rate input is greater than 30 degrees it switches to Right_Turn_AngularLimit.
- If the yaw rate input is less than 0 degrees and goes negative (-120) it switches to Left_Turn_AngularLimit.
- If the yaw rate input equals 0 degrees it switches to Straight_Drive_Steering_Angle.
- Thus, as per the above logic Vehicle_Turn_Status is achieved which is an integer value.
- Now, this value (Vehicle_Turn_Status) is compared with three different values inside our 2nd subsystem which is Requirement 2 which are constant values namely RightTurn_RoadSign, LeftTurn_RoadSign, and Straight_RoadSign. The output from these comparator blocks is boolean which is then compared with CameraInput_RoadSign with the help of AND gate.
- CameraInput_RoadSign provides output as per the details it receives and processes by capturing the sign conventions, lane cross-over, etc. It is also a boolean output.
- Finally, after comparing right, left, and straight, any 1 output will be true for an instance hence we used the OR gate whose output is connected to Vehicle_Direction_Indicator.
(Dear TSE,
I've not performed code generation and requirement tagging tasks due to the unavailability of the option in Matlab version 2023a. Nevertheless, I have written below the steps required to perform the same.)
Code Generation Steps & Requirement Tagging:
- Configuration Parameters -> Code Generation -> Target Selection -> System target file -> ert.tlc (Embedded Coder)
- Coverage -> Enable coverage analysis -> Coverage metric -> Structural coverage level -> Modified Condition Decision Coverage (MCDC)
- Press Ctrl + D to generate code for the model.
- For Requirement tagging just right the subsystem -> Requirements -> Link to selection in 'WORD'
All the necessary screenshots and models are attached herewith.