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. Asad Ali Baig Mirza/
  3. Week - 4

Week - 4

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 LED Soaking time should be 200s followed by Washing time of 100s. Then rinsing…

    • Asad Ali Baig Mirza

      updated on 06 Apr 2022

    1. 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 LED
    • Soaking time should be 200s followed by Washing time of 100s.
    • Then rinsing happens for next 20s & dryer runs for 50s

    After all the processes have completed turn on the finished LED

    Ans:-

    Implementation of control logic chart for washing machine using stateflow process

     

    1.start simulink and create a blank model

    2.search for chart block in the stateflow category of library browser

    3.Open the chart block and select the junction feature form the stateflow window

    4.Control logic for washing M/c is such that it should soak the water for the first 200 sec followed by washing time of 100 sec .Rinsing the water for The next 20 sec followed by drying time of 50 SEC.

    5.After finishing the control logic run the stateflow and check the sequence of operation of 370 sec.

    Blocks used.

    1.Chart

     

    a Finite state machine is a representation of an event-driver system.in an event driver system ,the system responds to an event by making a transition from one state to another.this transition occurs if the condition defining the change is true

    2.Display

    the display block show the value of the input data.you can specify the frequency of the display .for numeric input data,you can also specify the format of the display.

    3.Constant

    the contstant block generated a real or complex constant value signal.use this block to provide a constant signal input

    4.Lamp

    the lamp block displays a color indicating the value of the input signal .you can use the lamp block with other dashboard blocks to build an interactive dashboard of controls and indicators for your model.you can specify pairs of input values and colors to provide the information you want during the simulation

    Rocker switch

     

    The rocker switch block toggles the value of the connected block parameter between two values during simulation .For example ,you can connect the rocket switch block to a switch block in your model and change its state during simulation

     

     

    Logic explanation

     

    A rocker switch from dashboard library is used with a constant to supply the power and as water supply.a lamp is used to indicate the power status & water status .the power status is checked at the entry for every state and the water supply is checked for the soaking and the rinsing process.the timing for each state is as per the given inputs.the status of the running process can be seen by the glowing lamp corresponding to the process name.

     

    Washing machine logic

    In the above control logic first state is created with 2 conditions for power supply.

     

    one is with power supply avialable (Power switch==1) and second with water supply available

     

    (W==1) .if the power supply at entry is 1 and water supply is on ,then machine will get activated and start the next process of operation

     

    Next 4 Operation states have been created in flow order

    soaking,washing,rinsing,drying with their time of operation as 200sec for a soak ,100sec for wash ,20 secs for rinse & 50 sec for dry .entry and exit condition of the state are kept as 0 & I.e at entry of operation states it is 0 and as operation completes it is 1 for every states.

     

    after all process has done washing machine Completed LED will glow and we can shut the machine off.

    Symbols pane

     

     

    Here ,

     

    Powerswitch & W (water supply)is an input given while all other like washing_state,D(dryer),Wa(washing),S(soaking),R(rinsing),washing_completed are all output given.

     

    Completed simulink model,showing that washing Process is completed.

     

    Here all LED glown as green means all process has been completed and all display output as 1

     

    Simulink model,showing that the washing Process is completed & rinsing is going on

    Here red light means operations which are not completed and green light shows operation which are completed.

     

     2. Make a Simulink chart for the “Gear shift” logic as per 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 

     

     

    The blocks used are same the above functions except we are going to use slider in extra 

     

    *Slider

     

    The slider block tunes the value of the connected block parameter during the simulation .for example, you can connect the slider block to gain block in model and adjust its value during the simulation.you can modify the range of the slider blocks scale to fit your date.

     

    Logic

     

     

    1.In the above control logic ,first engine is started from input switch E=0/1 through rocker switch which is power switch to make engine ON.then next  Gear_shift_logic implemented through following states.

     

    2.Five gear state is created with state condition of gear(G)1,2,3,4 & 5 respectively and their transitiion is connected with speed range condition as shown

     

    3.The transition condition for the gear shift is decided as

     

    Speed>15 shift to G=2

    Speed>25 shift to G=3

    Speed>40 shift to G=4

    Speed>60 shift to G=5 when the speed is increasing froom 0-60 kmph

     

    similarly in reverse direction

     

    speed<60 shift to G=4

    Speed <40 shift to G=3

    Speed <25 shift to G=2

    Speed <15 shift to G=1 when the speed is decreasing from 60-0 kmph

     

    while simulation gear_shift_logic,Engine[E==1] Condition given with varioius speed change values

     

    Here,

     

    'E'(engine on/off) and 'speed' as input given while all other like power switch ,gear_first,gear_second,gear_third,gear_fourth,gear_fifth are all as output given.

     

    Simulink model at different speeds.

    at speed =72 Kmph

     

    at speed 72 kmph which is above 61 kmph gear 5 is implemented and gear_fifth LED is glow green and display output as 1

     

    at speed=20kmph

    at speed 20 kmph which is above 16 kmph gear 2 is implemented and gear_second LED is glow green and display output as 1

     

    at speed =48kmph

    At speed 48 kmph which is above 40kmph gear 4 is implemented and gear_fourth LED is glow green and display output as 1

     

    and thus all condition simulated through stateflow chart successfully

     

     

     

     

    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 Asad Ali Baig Mirza (8)

    Radar Mast & Final Assembly of Yacht

    Objective:

       Radar mast: Front view Side view  Top view          Expanded feature tree of Radarmast                                                                                                                                                           …

    calendar

    08 Mar 2023 06:59 PM IST

      Read more

      Week - 4

      Objective:

      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 LED Soaking time should be 200s followed by Washing time of 100s. Then rinsing…

      calendar

      06 Apr 2022 07:06 PM IST

        Read more

        Week -2

        Objective:

        Aim: 1)Make a Simulink model of Doorbell using solenoid block.  2)Use a thermistor to sense the temperature of a heater & turn on or turn off the fan.   Solenoid:   A solenoid  is a type of electromagnet formed by a helical coil of wire whose length…

        calendar

        06 Apr 2022 04:28 PM IST

          Read more

          Project 1 - Parsing NASA thermodynamic data

          Objective:

          Aim: To write a code to parse the thermodynamic data file provided and then calculate the thermodynamic properties of various gas species Objective: 1)Write a function that extracts the 14 co-efficients and calculates the enthalpy, entropy and specific heats for all the species in the data file.   2. Calculate the…

          calendar

          01 Apr 2022 05:25 PM IST

            Read more

            Schedule a counselling session

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

            Related Courses

            coursecard

            Design loads considered on bridges

            Recently launched

            10 Hours of Content

            coursecard

            Design of Steel Superstructure in Bridges

            Recently launched

            16 Hours of Content

            coursecard

            Design for Manufacturability (DFM)

            Recently launched

            11 Hours of Content

            coursecard

            CATIA for Medical Product Design

            Recently launched

            5 Hours of Content

            coursecardcoursetype

            Accelerated Career Program in Embedded Systems (On-Campus) Courseware Partner: IT-ITes SSC nasscom

            Recently launched

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