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

Loading...

All Courses

All Courses

logo

Loading...
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. VIKASH SINGH YADAV/
  3. Week - 4

Week - 4

                                                                 WASHING MACHINE   AIM:- To implement control logic for a “washing machine”…

    • VIKASH SINGH YADAV

      updated on 15 Feb 2021

                                                                     WASHING MACHINE

     

    AIM:- To implement control logic for a “washing machine” using Stateflow chart.

     

    OBJECTIVE:- a) To activate the machine when the power supply is ON.

                         b) To STOP the process and indicate through LED when the Water supply is not available.

                         c) To set delay time for different states in the Stateflow machine.

                         d) After all the processes have completed turn on the LED

     

    THEORY:-

    An automatic Washing machine switches between different operating states. These states mainly consist of Power Supply, WaterSupply, Soaking, Washing, Rinsing and Drying. The transition and States describes a Washing machine. The beginning and end of the transition arrow denote the source and destination respectively. All these states are followed one after the other and the decisions are made on the transition condition. Logical expressions are used as the temporal logic: conditions that are based on elapsed time. A common temporal logic operator is the after (N,sec) condition, where N is the wait time in seconds.For example:- the after (200,sec) transition condition from Soaking to Washing. For charts in Simulink, time is tracked according to the simulation time of the model.

    The default transition specifies the initial state of the Stateflow chart. When a State is added to a blank chart, Stateflow automatically adds a default transition. The stateflow follows the default transition and the state machine now transition between different states. The stateflow chart moves between states and transition which is further related to Simulink. The Simulink manages the chart execution. Since, Simulink has an underlined sample time. The time interval over which the simulink numerical solves takes steps. By default, stateflow chart inherit their sample time from simulink. In this case everytime the simulink solver takes a step, the chart will take a step. However the sample time can be explicitly set in the chart properties from inherited to discrete.

    The chart execution result in one of two outcomes:-

    • a valid transition is taken and a new state becomes active.
    • no valid transition exists, and the current state remains active.

    When testing transition, all transitions leaving the active state are tested according to their execution order. If a valid transition is found, no more transition are tested. State entry and exit actions occur sequentially when leaving and entering a state. The during action occurs for each consecutive state that a state remains active.

     

    WORKING:-

    • The stateflow follows the default transition and enters the PowerSupply state. The stateflow enters the ON state or the OFF state depending on the transition condition.
    • A slider switch has been used for activating PowerSupply and WaterSupply in the Washing Machine.
    • When the transition condition is [x==1] PowerSupply is activated and state entry action sets A=1; which starts the washing machine otherwise the transition condition follows [x==0] and the PowerSupply is in OFF state.
    • Now, the transition is based on the WaterSupply. If water is filled then the stateflow is valid for transition condition [y==1] and if it is empty then the stateflow is valid for the transition condition [y==0].
    • In WaterSupply ON state: State entry action sets B = 1; which starts the Washing Machine for several time step. Eventually after the Washing machine is filled then the Stateflow transition takes place to Soaking State.
    • The Washing Machine performs different mode of operations such as Soaking, Washing, Rinsing, Drying of clothes for 200 seconds, 100 second, 20 seconds and 50 seconds respextively.
    • The time delays are performed with the help of temporal logic operator in the after(N,sec) condition, where N is the wait time in seconds.
    • Now, navigate to the parent Simulink model and connect the chart input and output ports to appropriate Simulink signals.
    • The input and output ports in the chart are created in the Symbol Pane.

                                                                                                                                                     

                                                                                                                                                                  Fig:-1.1

    • These different operations performed in the washing machine are shown with the help of LED lamps.
    • After all the processes have completed and the Simulation reaches its STOP time than a yellow LED turns ON.
    • The different states and their transition in stateflow chart when PowerSupply and WaterSupply is ON are given below:-

                 

                 a) SOAKING

     

                                                                                           

                                                                                            

                                                                                                                                                                              Fig:-1.2

               

                    b) WASHING

                   

                                                                                         

                                                                                           

                                                                                                                                                                Fig:-1.3

     

                   c) RINSING

     

                                                                                               

                                                                                                

                                                                                                                                                                    Fig:-1.4

                    d) DRYING

     

                                                                                                 

                                                                                                   

                                                                                                                                                                        Fig:-1.5

     

    OPERATING STATES:-

     

                      a) When PowerSupply is OFF:-

     

                                                                                                                                    

                                                                                                        

                                                                                                                                                                          Fig:-1.6

                           

                               b) When PowerSupply is ON but WaterSupply is OFF:-

     

                                                                                                       

                                                                                                      

                                                                                                       

                                                                                                                                                                          Fig:-1.7

     

                                   c) When PowerSupply and WaterSupply both are ON:-

     

                                                                                                       

                                                                                                      

                                                                                                     

                                                                                                                                                                          Fig:-1.8

     

    CONCLUSION:- The control logic of the washing machine is implemented successfully using Stateflow chart.  It is evident from the above that the Simulink manages the chart execution successfully.The temporal logic was used to create delay time in Washing Machine. The LED was turned Red when the watersupply is not available and LED lamp turned yellow when all the processes were finished. Thus the simulation is complete when it reaches the Stop time.  

     

     

                                                                      GEAR SHIFTING

     

    AIM:- To make Simulink model for the “Gear shift” logic.

     

    OBJECTIVE:- a) To make use of Simulink chart to implement the “Gear shift” logic in the Simulink model as per below condition:

     

                               Speed Range (kmph)

                                               Gear

                                         0 -15

                                                  1

                                         16-25

                                                  2

                                         26-40

                                                  3

                                         41-60

                                                  4

                                      Above 61

                                                  5

     

                        b) To give Speed input as the Simulation is running and display the gear number.

     

     

    THEORY:-

    Gears are popular form of transmission. The power generated by the engine flows through the transmission i.e, Gears before reaching the drivewheel. The basic function of the transmission is to control the speed and torque available to the drivewheel for different driving conditions. The manual transmission works on the principle of gear ratio i.e, N1/N2=T2/T1.

    The stateflow used within Simulink helps to manage Gear shifting for varying speed. Simulink allows us to model continuous change in dynamic system. Stateflow is modeling an instantaneous changes in dynamic system. By combining the two one can capture both in single model.

    In order to reduce complexity, it is difficult to programme a code. Instead graphical programming language that allows quickly to create a runnable model of the system in stateflow chart can be used. After completion, press RUN. The chart will animate to show how the state machine behaves. In stateflow, the input and output variables are created in the Symbol pane. The variables Speed and G are used as an input and output by using chart data. The state chart transitions rapidly between the gears. The transitioning of gears depend on the Speed. The transition execution order specifies the sequence in which transitions are tested. The stateflow chart existing as a block in a Simulink model. It receives and sends data via ports just like the other Simulink blocks.

     

    PROCEDURE: -

    • Create a Stateflow chart in the Simulink.
    • In Stateflow chart, add states to a blank chart such as G1, G2, G3, G4 and G5.
    • After adding a state, stateflow automatically adds a default transition.
    • The state machine now transitions between various gears such as G1, G2, G3, G4 and G5.
    • The beginning and end of the transition denote the source and destination, respectively of the transition.
    • Add the entry action to each gear in their respective blocks in order to initialize the transition.
    • Add a temporal logic condition for varying Speed as input.
    • Use the Symbol Pane to set Data scope of Speed as input and G as output.

                                                           

    • Navigate to the parent Simulink model and connect the chart input and output port.
    • After completion, press RUN, the chart will animate to show how the state machine behaves.

     

    WORKING:-

    The slider gain block has been used to fed varying speed as an input to the Stateflow model. The varying Speed determines the chart behavior. Thus, as the Speed increases the gear state is also changed.The transition between gears is based on the transition condition. This is displayed in the Simulink block.

                                                                  

                                                                                                                                                             Fig:-2.1

     

    STATEFLOW CHART:-

     

                                                                                         

                                                                                                                                                               Fig:-2.2

     

    CONCLUSION:- The Simulink model for the  “GEAR SHIFT” logic is simulated successfully. The charts input and output were connected to appropriate Simulink signals. The gear numbers were visible while the simulation is running for varying speed.

     

                                               

    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 VIKASH SINGH YADAV (8)

    Project-1: Powertrain for aircraft in runways

    Objective:

                                  POWERTRAIN FOR AIRCRAFT IN RUNWAYS   AIM :- To analyze the aircraft design parameters.   OBJECTIVE :- a) To list out the total weight of various types of aircraft.            …

    calendar

    30 Mar 2022 07:50 PM IST

      Read more

      Week-11 Challenge: Braking

      Objective:

                                                                BRAKING   AIM :- To calculate braking energy using a defined drive cycle and contour plots for finding efficiencies…

      calendar

      09 Mar 2022 06:45 AM IST

      • HEV
      • MATLAB
      Read more

      Week -2

      Objective:

                                                      DOORBELL SIMULATION   AIM :- To make a simulink model of Doorbell using solenoid block.   OBJECTIVE :- a) To create a situation where the switch…

      calendar

      15 Feb 2022 11:09 PM IST

        Read more

        Week-4 Challenge WOT Condition Part-2

        Objective:

                                                       POWERTRAIN BLOCKSET   AIM:- To configure the control strategies in Powertrain Blockset.   OBJECTIVE:- a) To know about Mapped and Dynamic model…

        calendar

        13 Feb 2022 01:47 PM IST

        • GT-POWER
        • HEV
        Read more

        Schedule a counselling session

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

        Related Courses

        coursecardcoursetype

        Accelerated Career Program in Embedded Systems (On-Campus) - Powered by NASSCOM

        Recently launched

        0 Hours of Content

        coursecard

        5G Protocol and Testing

        Recently launched

        4 Hours of Content

        coursecard

        Automotive Cybersecurity

        Recently launched

        9 Hours of Content

        coursecardcoursetype

        Pre-Graduate Program in Bioengineering and Medical Devices

        Recently launched

        90 Hours of Content

        coursecardcoursetype

        Pre-Graduate Program in 5G Design and Development

        Recently launched

        49 Hours of Content

        Schedule a counselling session

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

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