part -1
*A model of washing machine was made using stateflow in simulink using the given below condition.
*conditions
1. System gets activated when power supply is given
2. if water supply is not available, process should stop and should be indicated through LEDs.
3. soaking time = 200sec
washing time = 100sec
rinsing time = 20 sec
drying time = 50 sec
Explanation:
Input power and water supply is given through 2 constants which were attached to their respective rocker switch to allow the user to give input to the system.
A stateflow chart was made to create the control logic for the system.
*power supply state was created as the default state which if true then subsequently goes through water supply state and the system starts when both are activated.
The state flow chart was then created with the above mentioned conditions.
Output of all the states i.e. soaking, washing, rinsing, drying, exit, output power supply and output water supply were then connected to their respective displays to check whether the system was running according to the control logic provided.
All the outputs were then connected to their respective lamps to indicate the particular process condition (i.e green for active and red for inactive).
All the images and simulink file has been attached for further reference.
part - 2
*A simulink stateflow chart was made for gear shifting according to the conditions provided in the challenge.
*conditions:-
speed range gear
0-15 1
16-25 2
26-40 3
41-60 4
61+ 5
*Explanation
After the chart was added from simulink library. A constant was given as input to the chart which was attached with a slider so that the user can give input to the system.
A circular display was attached to the constant to visualise the speed input given to the system.
A display block was attached to the output of the chart to know the number of the gear which was engaged at that given input speed.
Default input was given to gear 1 and stateflow chart was created according to the given conditions.
Slider was moved randomly to see whether simulation provided accurate results for the gear engagement.
All the images and simulink file has been attached for further reference.