Ans:
Firstly Based on Requirements which are requirement1 & requirement2, a requirement document is created.
This requirement document will be used for tagging.
Secondly Based on Requirement1:
A subsystem is created, named "Vehicle_Turn" with Input as "SteeringWheel_YawDegreeInput" and output as "Vehicle_Turn_Status".
Signal names are given and the signal "Vehicle_Turn_Status" is resolved at output.
In Simulink data dictionary:
"SteeringWheel_YawDegreeInput" & Vehicle_Turn_Status are mentioned along with values as mentioned in requirements
Thirdly, For the logic inside vehicle_turn subsytem:
The Input "SteeringWheel_YawDegreeInput" is compared against "Right_Turn_AngularLimit", "Straight_Drive_Steering_Angle" & "Left_Turn_AngularLimit".
If Input is greater than "Right_Turn_AngularLimit", then "Right_Turn_AngularLimit" will be passed as output.
If Input is equalsTo "Straight_Drive_Steering_Angle", then "Straight_Drive_Steering_Angle" will be passed as output.
Else "Left_Turn_AngularLimit" will be passed as output.
The output is "Vehicle_Turn_Status" and switch block is used.
In Simulink data dictionary:
Right_Turn_AngularLimit", "Straight_Drive_Steering_Angle" & "Left_Turn_AngularLimit" are mentioned as calibration values with properties mentioned in requirements.
Fourthly Based on Requirement2:
A subsystem is created, named "Vehicle_Direction" with Input as "Vehicle_Turn_Status" , "CameraInput_RoadSign" and output as "Vehicle_Direction_Indicator".
Signal names are given and the signals "Vehicle_Direction_Indicator" is resolved at output.
In Simulink data dictionary:
"Vehicle_Turn_Status", "CameraInput_RoadSign" & "Vehicle_Direction_Indicator" are mentioned along with values as mentioned in requirements.
Fifthly, For the logic inside Vehicle_Direction subsystem:
The Input signal "Vehicle_Turn_Status" is compared against "RightTurn_RoadSign", "LeftTurn_RoadSign" & "Straight_RoadSign".
If Vehicle_Turn_Status is equalsTo "RightTurn_RoadSign", then the output is ANDed with Input "CameraInput_RoadSign".
If Vehicle_Turn_Status is equalsTo "LeftTurn_RoadSign", then the output is ANDed with Input "CameraInput_RoadSign".
If Vehicle_Turn_Status is equalsTo "Straight_RoadSign", then the output is ANDed with Input "CameraInput_RoadSign".
All 3 AND outputs are passed via 3*1 MUX and connected with "Signal Conversion" block and passed as output "Vehicle_Direction_Indicator"
In Simulink data dictionary:
RightTurn_RoadSign", "LeftTurn_RoadSign" & "Straight_RoadSign" are mentioned as calibration values with properties mentioned in requirements.
Sixthly, the 2 subsystems "Vehicle_Turn" & Vehicle_Direction are placed in one subsystem named "VehicleDirection".
The Input of VehicleDirection subsystem are "SteeringWheel_YawDegreeInput" and "CameraInput_RoadSign". these Inputs are resolved to Simulink Signal Object.
The output of VehicleDirection subsystem is Vehicle_Direction_Indicator.
Seventhly, The Requirement1 is tagged to subsystem "Vehicle_Turn" and Requirement2 is tagged to subsyetm "Vehicle_Direction" respectively.
Eightly, Configuration Parameter setting is done and Simulation time is given as 0.01sec as Fixed Step with discrete(no continuous state)solver and model is run for 10 sec.
Ninthly, VehicleDirection is Treated as Atomic subsystem.
Tenthly, ModelAdvisor check is done for MAB guidelines and report is attached
Lastly, Code is generated and attached in zipfile