Challenge

Project 2-Highway Assistant-Lane Changing Assistant

The model for Highway Assistant – Lane Changing Assistant algorithm is developed using two Subsystems and altogether four Switch blocks.While one Subsystem represents Requirement-1 as specified in the problem,the other Subsystem represents Requirement-2.The inputs and outputs have been chosen as per the specifications given in Requirement-1 and Requirement-2.The stateflow charts have been developed in accordance with the Condition versus Action Table given.After successful simulation run of the model the following result was found after clicking 'View diagnostics' option appearing at the bottom.

Highway_Display_Mode_1 = 232

Highway_Display_Mode_2 = 183

Highway_Display_Mode_3 = 41

Highway_Display_Mode_4 = 94

Lane_Display_Mode_1 = 132

Lane_Display_Mode_2 = 185

Lane_Display_Mode_3 = 54

Lane_Display_Mode_4 = 67

The developed model is attached herewith as Autosar_Proj2.slx

Choosing Modeling tab and using 'Model Settings' option System Target File was selected as autosar.tlc using the Code Generation option.As far as the 'Solver Selection' is concerned Solver was chosen as Fixed step and discrete.This was done to ensure the conditions given in the problem are satisfied.

In the Simulink Editor on the Modeling Tab under Design 'Link to Data Dictionary' was clicked.In the Model Properties dialog box 'New' was clicked to create data dictionary.The data dictionary so created was named as Auto_Proj2.sldd and is enclosed herewith.

Code  Mappings-AUTOSAR SW Component was created using APPS tab and selecting AUTOSAR Component under CODE GENERATION and thereafter clicking Next->Next->Finish.This completes Quick Start Autosar Editor.

Clicking Code Mappings-AUTOSAR SW Component and using the Radio button two runnables were found to be created and these are:Autosar_Proj2_Init and Autosar_Proj2_Step.Again clicking the Radio button and selecting XML options the View and Edit XML options was completed.The process is repeated for S-R interfaces and Receiver Ports as well as Sender Ports vide the screenshots enclosed.Validation was done successfully by clicking the tick mark appearing in the 'Code Mappings-AUTOSAR SW Component'.The screenshot for this is also enclosed.

For generation of Model Advisor Report at first Modeling Tab was clicked.Then the following sequence was executed.

Modeling->Model Advisor->System Selector

After this in the Find option MAB checks was typed and then Model Advisor report was generated by ticking that option appearing on the left side of the screen.The report so generated is enclosed as Auto_report_352.html.A MS Word version of the report is also enclosed vide Auto_MA_rep.

It is clear from the report summery that it contains the followings:

Pass:126    Fail:0   Warnings:14    Not Run:0

After Model Advisor report code generaion was carried out using the appropriate option vide Autosar_Proj2.c enclosed.The process involved the following steps:

Open Model->Configure Model->Simulate Model->Generate Code from the model.

The code so generated was also copied as a MS word file vide Autosar_Proj2_code enclosed.

After developing the Simulink model it was changed to Autosar compliant model using the steps as described above.

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.