Challenge

Project 1 (Mini Project on Vehicle Direction Detection

AIM : To develope a model to determine direction of the vehicle and perform verificaation tests

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 and model verification and testing

OverView:

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 the vehicle is basically identifying the direction the vehicle is taking based on the camera input.

The camera reads the road signs & stores them into its memory with unique values for a left turn, right turn & straight drive. Depending on the direction it is taking, the 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 alongside 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

Procedure:

1) Creation of SLDD

SLDD is created with given signals and parametrs by selecting Modelling tab and link to data dictionary.

all signals and constant parametrs are added as below

2) Design of model as per the requirement

The first step in building the model is the understand the requirements and select the right blocks. We will be building a subsystem satisfying the Requirement-1 objectives. We give an input named 'SteeringWheel_YawDegreeInput' which is nothing but the yaw rate of the steering wheel. This value will be compared with 3 angular values for the left turn, right turn, and straight drive to say which specific direction the steering wheel is turning towards and we use the switch blocks to achieve this. This subsystem is shown below.

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).

3) Requirement tagging and Traaceability

Requirements are tagged in the subsystem by right clicking the subsystem selecting Requirement>> Link to selection in word both the requirements are tagged in the subsystems and traceability can be seen below

4) Model settings

model settings are done as Fixed step discrete Non continious steps with step size as 0.01

5) Signal Routing

Signals are routed and propogated Throughtout the Model

6) Model Advisor Report

Model Advisor to check a model or subsystem for conditions and configuration settings that can result in inaccurate or inefficient simulation of the system represented by the model or generation of inefficient code from the model. The Model Advisor produces a report that lists all the suboptimal conditions or settings that it finds, suggesting better model configuration settings where appropriate.

7) Code Generation:

For Code Generation in APPS>>Embedded Coder>> Generate CODE code is generated which is attached in attachements as HTML format

Results:

When yaw degree input is 30 the we got output as follows which indicated Right signal

When yaw Degree input is zero straight drive indication is given

When yaw degree input is Negative left turn indication is given

When camera input is Zero no indication is given

Conclusion:

The above model is ready for the further stages of the V-Cycle development. The model can be tested for MIL and SIL by creating a test harness for the model using the functional test cases or by using Simulink built-in Test Harness feature. The same testbed can be used for both the MIL and SIL. To further the process of Model-Based Development, for this model auto code generation is done and this code can then be used to create the final production-level software for the above-mentioned feature.

The model successfully depicts the behavior of a direction detection module and can be implemented on a vehicle after successful testing.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

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.