Challenge

Project 1- Traffic Jam Assistant Feature

1. Model Setup

  • Use MATLAB Simulink and ensure compliance with MBD guidelines.
  • Enable Embedded Coder for code generation.
  • Create and link a Simulink Data Dictionary for managing calibration signals.
  • Generate a Model Advisor Report before proceeding with code generation.


2. Implement Voltage Range Check (Requirement 1)

  • Inputs:
    • Input_Voltage (uint8, Range: 0-255)
    • VOLTAGE_MINIMUM_RANGE (uint8, Default: 30)
    • VOLTAGE_MAXIMUM_RANGE (uint8, Default: 50)
  • Logic:
    • If Input_Voltage is within the range VOLTAGE_MINIMUM_RANGE ≤ Input_Voltage ≤ VOLTAGE_MAXIMUM_RANGE, set Optimum_Voltage = 1 (true).
    • Otherwise, set Optimum_Voltage = 0 (false).
  • Output:
    • Optimum_Voltage (boolean, 0-1)


3. Implement DisplayUnit Subsystem (Requirement 2)

  • Inputs:
    • Optimum_Voltage (boolean, 0-1)
    • Input_Switch (boolean, 0-1)
    • Enable_Display (uint8, Range: 0-255) → Saturate to 0-7
  • Calibration Signals:
    • ON_MODE = 1, OFF_MODE = 2, STANDBY_MODE = 3, NO_DISPLAY = 0
    • INTERRUPT_1 = 1, INTERRUPT_2 = 1
  • Logic Flow:
    • Step 1: Saturate Enable_Display between 0-7.
    • Step 2: Multiport Switch Logic
      • Inputs 1 & 2 → ON_MODE
      • Inputs 3 & 4 → OFF_MODE
      • Input 5 → STANDBY_MODE
    • Step 3: Switch Block Logic
      • First Input: Output from Multiport Switch.
      • Second Input:
        • AND Gate checks:
          • NOT(Input_Switch)
          • Optimum_Voltage
          • INTERRUPT_1 == INTERRUPT_2
      • Third Input: NO_DISPLAY
    • Output: Output_Display (uint8, 0-255)


4. Validation & Testing

  • Run Model Advisor Checks to ensure MAAB guideline compliance.
  • Simulate with different test cases:
    • Input_Voltage inside & outside range.
    • Enable_Display with different values (0-7).
    • Input_Switch toggling.
  • Check outputs & verify logic.
  • Generate Embedded C code using Embedded Coder.


Deliverables

✅ MATLAB Simulink Model (.slx)
✅ Simulink Data Dictionary (.sldd)
✅ Model Advisor Report (PDF)
✅ Test Cases & Verification Report
✅ Generated C Code

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.