Challenge

Project 1- Traffic Jam Assistant Feature

AIM

  • Model Development of a single feature of Traffic Jam Assist using MATLAB & Simulink as well as Code Generation using Embedded Coder

  Requirement No 1:

  • Input Signal “Input_Voltage” is compared against voltage values “VOLTAGE_MINIMUM_RANGE” & “VOLTAGE_MAXIMUM_RANGE”.
  • Incoming input signal “Input_Voltage” must be greater than – equal to “VOLTAGE_MINIMUM_RANGE” and less than – equal to “VOLTAGE_MAXIMUM_RANGE”.
  • Output signal from here is “Optimum_Voltage” which will be one of the inputs to the subsystem “DisplayUnit”.

Requirement No 2 (DisplayUnit Subsystem):

  • Input Signals are “Optimum_Voltage”, “Input_Switch”, and “Enable_Display”. Signal “Enable_Display” must be saturated between the range 0 – 7. The output signal from the subsystem is “Output_Display”.
  • Input Signal “Enable_Display” is compared against a pre-defined set of values in a multiport switch. The total data ports in the multiport switch are 5.
  • Multiport switch inputs 1 & 2 are connected to calibration signal “ON_MODE”, Multiport switch inputs 3 & 4 are connected to calibration signal “OFF_MODE” while Multiport switch input 5 is connected to calibration signal “STANDBY_MODE”.
  • The output from the Multiport switch is connected to the first input port of the Switch block. The third input port of the Switch block is connected to the calibration signal “NO_DISPLAY”.
  • Meanwhile NOT the value of the input signal “Input_Switch” is compared in an AND gate against the input signal “Optimum_Voltage” and the output from comparing if calibration signals “INTERRUPT_1” & “INTERRUPT_2” are equal. The output of the AND gate is the second input of the switch block.
  • The output from the switch block is “Output_Display”.

 Data Dictionary creation: (TrafficJamAssistant.sled)

  • A new Simulink data dictionary is created and updated signals & calibration Data List as per our requirements.
  • The very first thing that we will do is create a Simulink Data Dictionary using the given Signal and Calibration Data List.

     The following is the SLDD file :

Input Signals:

Name of the Signal

Data Type

Range

Input_Voltage

 uint8

0 - 255

Input_Switch

 boolean

0 – 1

Enable_Display

 uint8

0 - 255

Output Signal:

Name of the Signal

Data Type

Range

Output_Display

 uint8

0 - 255

Calibration Signals:

Name of the Signal

Data Type

Range

Initial Value

VOLTAGE_MINIMUM_RANGE

 uint8

0 – 255

30

VOLTAGE_MAXIMUM_RANGE

 uint8

0 – 255

50

OFF_MODE

 uint8

0 – 255

2

ON_MODE

 uint8

0 – 255

1

STANDBY_MODE

 uint8

0 – 255

3

INTERRUPT_1

boolean

0 – 1

1

INTERRUPT_2

boolean

0 - 1

1

NO_DISPLAY

 uint8

0 – 255

0

Local Signal:

Name of the Signal

Data Type

Range

Optimum_Voltage

boolean

0 - 1

Code generation Parameters: 

  • System target file: ert.tlc ( Embedded Coder)

   Requirement Tagging:

  • Requirements can be a tag to requirement 1 & requirement 2 to their corresponding subsystems with word files.

Code generation: 

  • By using the Embedded coder app we can generate code and build our model.

     

    

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.