Project 1 (Mini Project on Vehicle Direction Detection
Aim : Vehicle Direction Determination.
Objective of Mini Project:
- Development of MATLAB Simulink model as per requirement.
- Tag the requirements to the simulink model; tagging requirement 1 & requirement 2 to their corresponding subsystems is fine.
- MBD compliant changes, Data Dictionary creation & code generation is added advantage, and that is not scope of this project.
- 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.
- Choose sample time for all signals as 0.01s
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).
Steps:
Take two input and one output and name those signals. after that create a subsystem in which we will have both the requirement. this is how the top level model looks like.

Moving inside the subsystem we have to create two new subsystem for two seperate requirement.
Requirement 1: Comparing 'SteeringWheel_YawDegreeInput' value with ‘Right_turn_angularlimit’ , ‘Left_turn_angularlimit’ , ‘Straight_drive_steering_angle’ and if and else condition is created using switch block.
This is how requirement 1 subsystem looks like.

Requirement 2 :Take ‘Vehicle_turn_status’ as one of the input to the Requirement 2 subsystem. Comparing ‘Vehicle_turn_status’ with “RightTurn_Roadsign” , “LeftTurn_Roadsign” , “Straight_Roadsign” and give a output named “Vehicle_Direction_Indicator” which is used to notify the driver whether is he in the right path or not. this subsystem containing Requirement 2 is shown below.

once the model is created we move to link a simulink data dictionary for the model. For that we need to click on model explorer and select on link to data dictionaryand then new and name the sldd file and save it.

after this select on new and give a proper name and save it. after this is done start adding the signal to it.once signal are added is sldd the sldd will look like.

once data dictionary is created we need to resolve the signal and propragate the signal. for that select on a signal and then rignt click on it you will see properties at the botom select that and click on resolve signal as shown below.

To tag the requirement with the simulink model we need to first make a new word file in which we will have requirement 1 and 2 both with all its specifaction to link requirement 1 move to simulink seelect requirement1 subsystem and left click on it you will see as shown below


when you click on requirement then you select link selection from word but before that open that word file and select the requirement1 heading so that the selection can be linked with that subsystem.