QuestionQuestion

Using a Simulink Stateflow chart, design part of a cruise control system for an automobile with the following specifications:

Inputs
• Current Speed (uint8)
• Power Button (toggle, bool)
• Decrease/Set/Coast Button (bool)
• Increase/Resume Button (bool)
• Brake Pedal (bool)
Outputs
• Target Speed (uint8)
• Cruise Control Active (bool)

Requirements
1. If the Power Button is true, the cruise control is in the on state.
2. If the Power Button is false, the cruise control is in the off state and the target speed output is zero and the cruise control active output is false
3. In the on state, if the cruise control active output is false and the current speed is less than 90 mph and the Decrease/Set/Coast button is pressed, the target speed output is set to the current speed and the cruise control active output is true.
4. In the on state, if the cruise control active output is false and the target speed is not zero and the Increase/Resume button is pressed then the Cruise Control Active output is true.
5. If Cruise Control Active signal is true and the Increase/Resume Button is pressed, then the Target Speed will increase only 1 mph for each press not matter how long the button is pressed.
6. If Cruise Control Active signal is true and the Decrease/Set/Coast Button is pressed, then the Target Speed will decrease only 1 mph for each press not matter how long the button is pressed.
7. The Target Speed cannot be greater than 90 mph.
8. If the Brake Pedal is pressed, then the Cruise Control Active signal is set to false.

Once the Stateflow chart is complete you will need to simulate the model and record the outputs. Simulate the following sequence:
1. Current speed of 55 mph.
2. Press the power button (this will toggle the button to on).
3. Press and release the Decrease/Set/Coast Button.
4. Press and release Increase/Resume Button twice.
5. Press and release Decrease/Set/Coast Button twice.
6. Press the Brake Pedal.
7. Press the Increase/Resume Button.
8. Press the Power Button (this will toggle the button to off).

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

    By purchasing this solution you'll be able to access the following files:
    Solution.slx.

    $67.50
    for this solution

    or FREE if you
    register a new account!

    PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

    Find A Tutor

    View available MATLAB for Engineering Tutors

    Get College Homework Help.

    Are you sure you don't want to upload any files?

    Fast tutor response requires as much info as possible.

    Decision:
    Upload a file
    Continue without uploading

    SUBMIT YOUR HOMEWORK
    We couldn't find that subject.
    Please select the best match from the list below.

    We'll send you an email right away. If it's not in your inbox, check your spam folder.

    • 1
    • 2
    • 3
    Live Chats