Challenge

Project 2 - Development of TFT Cluster Speedometer Software Component

Develop the Simulink model based on the given requirements and also create SLDD file and link the same to the model.

Perform the complete V and V workflow for the obtained model

Development of TFT Cluster Speedometer Software Component

Cluster Instrument receives the signals from other ECU via CAN bus interface. It also receives commands from the driver via steering wheel buttons. The signals are then processed by the Cluster ECU, after which the Cluster ECU may send the vehicle information to the LCD or light the LEDs and so forth, according to the results. Therefore, the Cluster ECU can be viewed as a carrier of the information flow.

Requirements:

1.1 Calculating TFT Display Speed

Average Vehicle Speed would be displayed only if its between 2 kmph & 250 kmph. Any value outside this range will be discarded by its lower limit & upper limit

When Average Vehicle Speed is < 2 kmph, DisplaySpeed = 2 kmph

When Average Vehicle Speed is in between 2 kmph & 250 kmph, DisplaySpeed = Average Vehicle Speed

When Average Vehicle Speed is > 250 kmph, DisplaySpeed = 250 kmph

1.2 Main Data Filtering

Main Data Filtering subsystem will be activated for every 10th millisecond

DisplaySpeed1 (t) = ((DisplaySpeed (t) x 0.65)/ Main Filter Speed Value) 0.05

 

1.3 Auxiliary Data Filtering

Auxiliary Data Filtering subsystem will be activated for every 10th millisecond

DisplaySpeed_Filter (t) = ((DisplaySpeed1 (t) x 0.78)/ Auxillary Filter Speed Value) - 0.03

1.4 TFT Speed Output

 

If |(DisplaySpeedFilter - DisplaySpeed)| > 1.5

{

Vehicle Speed Display = DisplaySpeed

}

else

{

Vehicle Speed Display = DisplaySpeed Filter

}

Answer:

Step 1: Simulink Model:

Model Configuration Settings:

Step2: .SLDD file

Step 3 : Requirement Tagging and Linking

Go to App ---> Requirement Manager---> click on Requirement Editor ---> click on "New Requirement Set"----> Save it with proper name in working folder(.slreqx) ---> click on "Add requirement" (Add requirement in given format as shown in Figure Below)

Step3.2: Linking requirement

Select subsystem in Simulink Model to which requirement is to be attached ---> Go to Requirement Editor ----> Right Click on Requirement Added previously(Step3.1) ---->click on Link from "Subsystem(name)"----> go to file and click on Save all

Go to Report ---->click on Generate Report ---> Do the following settings --->click on Generate Report

Step 4: Fixed Point Data Tool:

Go to APPS ---> Click on Fixed Point Tool ----> Click on Drop down of "New" in tool ---> click on "Iterative Fixed Point Conversion" 

Step 4.1: click on "Prepare"

Step 4.2: Click on Drop down of "Collect Ranges"---> Select default settings as "Use Current Settings" ---> click on "Collect Ranges".

Step 4.3 : Click on "Propose Data Type". The proposed data types will look like,

Step 4.4 : Click on "Apply Data type". Check the data types changes at model level and in .SLDD file.

Also, Simulate model for to ensure these changes does not hamper execution of model.

Step 5: JMAAB Advisor Report:

Go to Modeling--->click on Model Advisor---->Select Entire system in System Selector---->click on Ok ---> select only JMAAB guidelines in Model Advisor(All other checks are deselected) ----> Run the selected Checks

Click on Ok

Step 5.1 Warnings are brought down to 9

Step 6: Design Error Detection:

Step 6.1: Go to APPS ---> Click on "Design Verifier" ---> Click on Drop Down of "Test Generation Tab" and select Error Detection.

 Step 6.2: Click on Run Tab to run the error detection,

Step 6.3: Click on Run Tab to run the error detection,

 Step 7.0: Functional Tests,

Step 7.1 : MIL Test Harness Creation, test cases generation

Right click on Main Subsystem ---> click on "Test Harness" ---> click on "Subsystem name" ---> do the following settings

 

Test Case:

Step 7.3: Importing Test Cases in Signal Builder,

 

Step 7.4: Settings in  Model configurations,

Scope Output:

Step 7.5: MCDC Coverage,

 

Step 7.6: SIL Test Harness Creation, test cases generation

Right click on Main Subsystem ---> click on "Test Harness" ---> click on "Subsystem name" ---> do the following settings

Step 7.7: Add test case to signal builder(Same as that of MIL test)

Scope Output:

Spikes can be neglected as the value on Y axis is very very small.

Step 8.0 : For Test Generation,

Go to APPS ---> Click on "Design Verifier" ---> Click on "Advisor" 

Step 8.1: Click Test Generation Advisor's Run tab shown in above figure,

Step 8.2: Now, click on Run tab of Test Generator,

Step 9: Autocode Generation:

 Go to APPS ----> Click on Embedded Coder ----> click on Build

Step 10. Poly space analysis report / outputs

Step 10: Polyspace

Step10.1: Go to Polyspace ---> Click on Start New Project ---> Provide Project Name ---> click on "Next"---> provide Project Source File(where .c files are generated during Auto Code Generation)--->click on "Finish"

Step 10.2: Different Settings in Polyspace Environment

In Target & Compiler ---> select Target processor type as "x86_64"

In Coding standards and Coding Metrics---> MISRA C:2004(Selected) Required Rules --->Calculate code metrics(Selected) 

In Bugfinder Analysis default settings are selected.

In Reporting ---> Generate Report(selected)--->Output Format PDF(Selected)

Step 10.3 :Save by clicking on Save tab

Step 10.4: Run the polyspace bug finder

**************************************************************************

Polyspace Code Prover:

Steps to Run the Code Prover:

Step 10.5: Go to Polyspace Environment

Go to Configuration --->Environment Settings ---> Stop analysis if file not compile(Selected)

In Code Prover Verfication ---> Check Behavior ---> Allow Negative Operand for left shift(Selected) --->Consider non finite float(Selected)

Step 10.6: Save by clicking on Save tab

Step10.7: Run Code Prover by clicking on drop down menu of Run Tab

Result will look like following(Example taken from Internet),

Step 11: Baseline Test

Report:

Step 12: Back To Back Test

Conclusion:

The Simulink model created for TFT Cluster Speedometer Software Component is working as per expectations.

The rigorous assessment of model is carried out using different tools in MATLAB such as,

·         Requirement tagging

·         Model advisor - JMAAB compliance

·         Fixed-point Tool

·         SLDV Design error detection report

·         Functional test case, MIL, SIL harness

·         SLDV test generation

·         Auto-code generation, main , .c & .h files

·         Polyspace analysis

·         Test manager – baseline & back-to-back testing

The reports for each task is generated and attached herewith(Project2.zip)

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.