Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Amit Chilap/
  3. Week - 4

Week - 4

Simulink for Mechanical & Electrical Engineers Challenges = Week 4 Aim To Make a Simulink model using State-Flow for given questions. Questions & Solution Q1. Implement control logic of a “washing machine” using Stateflow as per given sequence: If the power supply is available, the system gets activated. If the Water supply…

  • MATLAB
  • Amit Chilap

    updated on 21 May 2021

Simulink for Mechanical & Electrical Engineers Challenges = Week 4

  1. Aim
    • To Make a Simulink model using State-Flow for given questions.
  2. Questions & Solution
    • Q1. Implement control logic of a “washing machine” using Stateflow as per given sequence:
      • If the power supply is available, the system gets activated.
      • If the Water supply is not available, stop the process & indicate through the LED.
      • Soaking time should be 200s followed by Washing time of 100s.
      • Then rinsing happens for the next 20s & dryer runs for 50s.
      • After all the processes have been completed turn on the finished LED.
    • Solution 1.
      • Theory
        • A washing machine (laundry machine, clothes washer, or washer) is a home appliance used to wash laundry. The term is mostly applied to machines that use water as opposed to dry cleaning (which uses alternative cleaning fluids and is performed by specialist businesses) or ultrasonic cleaners. The user adds laundry detergent, which is sold in liquid or powder form, to the wash water.
        • The requirements to run the machine are the Power Supply and Water Supply. And it performs the cleaning process of clothes by soaking, washing, rinsing and drying, and many more process.


      • Following is the simulation model for Washing Machine applying a given control logic.
  • In the above model the simulation blocks used & their purpose are as follows :
    1. Constant – The Constant block generates a real or complex constant value signal.
    2. StateFlowChart – Stateflow provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables. You can use Stateflow to describe how MATLAB® algorithms and Simulink models react to input signals, events, and time-based conditions.
    3. Outport – Provide an output port for a subsystem or model.
    4. Scope – Display signals generated during simulation.
    5. Relational Operator – Applies the selected relational operator to the inputs and outputs the result.
    6. Delay One Step – Delay input signal by a specified number of samples.
    7. Stop Simulation – Stop simulation when input is nonzero.
    8. Lamp – Display a color that reflects an input value.
    9. Rocker Switch – Set on/off value to tune parameters or variables.
    10. MultiStateImage – Display an image that reflects an input value.
  • Working of Model
    1. According to the given control logic, we need two inputs and single output to complete the control logic.
    2. The input signals are required for Power & Water Supply and the output port is required to know the machine status.
    3. Using constant block we provide the input signals, since they are user interface the input signals are provided using the Rocker Switch block which is Power Supply Switch & Water Supply Switch.
    4. Then for the machine to work according to the control logic sequence we use the StateFlowChart block, where we build the control logic of the given sequence which acts upon the given inputs.
    5. Now depending upon the inputs, the control logic takes to transition from one state to another.
    6. The control logic is created in stateflowchart as shown below and works according to the given sequence.
    7. The control logic is built accordingly.
      1. First, we check the input of the power supply and display the signal according to the input.
      2. Then after 3 sec of getting the power supply, we move to the next state and check the water supply.
      3. After getting the power supply and water supply for 3 sec we make the transition from the state of soaking, where it also checks the power and water supply continuously.
      4. After the soaking process is completed of 200 sec it moves towards the washing process with 3 sec delay.
      5. Then all the following states are achieved according to the given sequence and for each state transition power & water supply are checked.
    8. From the control logic stateflowchart, we collect the machine status as output.
    9. And according to outputs we display its process on the dashboard.
    10. After finishing the complete process, we check it using the relational operator and then stops the simulation with 3 sec delay.
    11. In the scope, we record the inputs and the machine status with time.
  • Results
    • Following are the results of the simulation sequentially with time.

      1. Power Supply
      2. Water Supply
      3. Soaking

      4. Washing

      5. Rinsing

      6. Drying

      7. Finish
  • Following is the video of the Washing Machine simulation.

 

  • Q2. Make a Simulink chart for the “Gear shift” logic as per the below conditions:

Speed Range (kmph)

Gear

0 to 15

1

16 to 25

2

26 to 40

3

41 to 60

4

Above 61

5

  • Give speed input while the simulation is running & display the gear number.
  • Solution 2.
    • Theory
      • A transmission is a machine in a power transmission system, which provides a controlled application of power. Often the term 5-speed transmission refers simply to the gearbox, that uses gears and gear trains to provide speed and torque conversions from a rotating power source to another device.

    • Following is the simulation model Solving the given question.

    • In the above model the simulation blocks used & their purpose are as follows :
      1. Constant – The Constant block generates a real or complex constant value signal.
      2. Slider Gain – The Slider Gain block performs a scalar gain that you can modify during simulation.
      3. StateFlowChart – Stateflow provides a graphical language that includes state transition diagrams, flow charts, state transition tables, and truth tables. You can use Stateflow to describe how MATLAB® algorithms and Simulink models react to input signals, events, and time-based conditions.
      4. Scope – Display signals generated during simulation.
      5. Circular Gauge – Display an input value on a customized gauge.
      6. Display – The Display block shows the signal value as text.

    • Working of Subsystem Model
      1. The model is just a simple program of the control logic with the simple arithmetic equation.
      2. We have a 5-speed range & 5 gear system.
      3. According to the given system requirement, we have built the control logic where it checks the speed and changes the gear according to it.
      4. Following is the stateflowchart for provided gear system.
      5. Here we give the input speed while the simulation is running, the stateflowchart runs the control logic and changes the gear according to the given speed input.
      6. We collect the output value from the chart
      7. The two blocks circular gauge and display blocks represent the input speed the gear value according to it.
      8. After running the simulation we change the speed values using slider gain, and then check its respective gear.
      9. We also use the scope block to record the speed input and then the gear output for the entire simulation.
  • Results
    • Following is the video of simulation for the gear change according to the speed, and the graph of it.

Leave a comment

Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.

Please  login to add a comment

Other comments...

No comments yet!
Be the first to add a comment

Read more Projects by Amit Chilap (11)

Week-3 Challenge: ADVISOR Tool

Objective:

Introduction to HEV using MATLAB & Simulink Week-3 Challenge: ADVISOR Tool   AIM: To simulate the given data and conditions for an EV using Advisor Tool in MATLAB. About ADVISOR ADVISOR, NREL’s Advanced Vehicle Simulator, is a set of model, data, and script text files for use with MATLAB and Simulink. It…

calendar

04 Jul 2022 11:04 AM IST

  • BIM
  • CAE
  • CFD
  • CSS
  • DEM
  • FEA
  • GIS
  • HEV
  • MATLAB
  • MBD
Read more

Project -BAJA All Terrain Vehicle (ATV) model

Objective:

Simulink for Mechanical & Electrical Engineers - Challenges Final Project Aim To study, analyze and make a detailed report on BAJA All Terrain Vehicle (ATV) model using Simulink & compare between its different modes. Objective Prepare a technical report explaining the model properties & comments on the results.…

calendar

03 Jun 2021 03:25 AM IST

    Read more

    Week - 4

    Objective:

    Simulink for Mechanical & Electrical Engineers Challenges = Week 4 Aim To Make a Simulink model using State-Flow for given questions. Questions & Solution Q1. Implement control logic of a “washing machine” using Stateflow as per given sequence: If the power supply is available, the system gets activated. If the Water supply…

    calendar

    21 May 2021 06:29 PM IST

    • MATLAB
    Read more

    Week -2

    Objective:

    Simulink for Mechanical & Electrical Engineers Challenges = Week 2 Aim To Make a Simulink model of Doorbell using solenoid block. To Use a thermistor to sense the temperature of a heater & turn on or turn off the fan according to temperature. Questions & Solution Q1. Make a Simulink model of Doorbell using…

    calendar

    14 May 2021 12:30 AM IST

      Read more

      Schedule a counselling session

      Please enter your name
      Please enter a valid email
      Please enter a valid number

      Related Courses

      coursecard

      Simulation and Design of Power Converters for EV using MATLAB and Simulink

      4.9

      22 Hours of Content

      coursecard

      Introduction to Hybrid Electric Vehicle using MATLAB and Simulink

      4.8

      23 Hours of Content

      coursecardcoursetype

      Mechanical Engineering Essentials Program

      4.7

      21 Hours of Content

      coursecard

      Vehicle Dynamics using MATLAB

      4.8

      37 Hours of Content

      coursecard

      Introduction to CFD using MATLAB and OpenFOAM

      4.8

      13 Hours of Content

      Schedule a counselling session

      Please enter your name
      Please enter a valid email
      Please enter a valid number

      logo

      Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

      https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

      Our Company

      News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
      map
      EpowerX Learning Technologies Pvt Ltd.
      4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
      mail
      info@skill-lync.com
      mail
      ITgrievance@skill-lync.com

      Top Individual Courses

      Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

      Top PG Programs

      Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

      Skill-Lync Plus

      Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

      Trending Blogs

      Heat Transfer Principles in Energy-Efficient Refrigerators and Air Conditioners Advanced Modeling and Result Visualization in Simscape Exploring Simulink and Library Browser in Simscape Advanced Simulink Tools and Libraries in SimscapeExploring Simulink Basics in Simscape

      © 2025 Skill-Lync Inc. All Rights Reserved.

                  Do You Want To Showcase Your Technical Skills?
                  Sign-Up for our projects.