Challenge

Project 2 - Development of TFT Cluster Speedometer Software Component

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

Answer:

The software component has four functional requirements to model. Each of them is described below.

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, Display Speed = Average Vehicle Speed.

  • When Average Vehicle Speed is > 250 kmph, Display Speed = 250 kmph.

This set of requirements is implemented using the saturation block. The signal Average_VehicleSpeed is passed through the saturation block which is configured to have upper limit of 250 and lower limit of 2. The output of the saturation block is the signal Display_Speed.

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

This subsystem is constructed as below.

The control signal is generated by equating the remainder of timer input on dividing by 10, with 0.

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

This subsystem is also modeled as enabled subsystem. The same control input is used for the enable port. The block diagram is shown below

4. TFT Speed Output:

The condition to implement is this subsystem is stated as -

  • If (DisplaySpeedFilter - Displayspeed)l > 1.5

{

Vehicle Speed Display = DisplaySpeed

}

else

{

Vehicle Speed Display = DisplaySpeed Filter

}

SLDD Creation:

A data dictionary file is created. All the signals such as input, output and the local signals are added in the Simulink data dictionary.

The following image shows signals in the Sldd file

Model advisor - JMAAB compliance

Fixed-point Tool test:

Goto fixed point tools and create new iterative model and prepare run.

SLDV Design error detection report

Go to Design Verifier and check Test Generation settings configuration and click Test generation.

Poly space analysis report / outputs

Steps to create a Polyspace Report:

  • Initially, open the Polyspace in that new project click on start new project.
  • The Project Properties dialogue box will open in that give the project name as we saved in the MATLAB,then select the location where it we need to save after that click Next or use the default location.
  • Then ,it asks for the Projrct source,click on browser and select the folder where the .c file are generated then optionally we can add the include folder then clock on finish,the polyspace environment will open.
  • In the configuraton settings option called Target & compiler select the source code language as c,change the target processor as X86_64.
  • In the coding standards & code Metrics in that enable the check MISRA C:2004 also select the calculate the code metrics option
  • After that go to bug finder analysis under that select the default one.
  • Go to reporting enable the generate report option and ouput formet as PDF or any file we need
  • Finally save the polyspace and run the Bug Finder.

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

Result:

The resultant output is obtained for the above simulink model for TFT Clusterspeedometer.

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.