Challenge

Week - 4

  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.

Explaination:

Aim: Make a control logic for "Gear Shift" using Stateflow.

Click on the Simuklink and choose Blank Model. click on the state and drag

Control Logic:

Symbol Pane:

Simulink Block Model using Basic Block:

Here, we used simulink basic blocks to create "Washing machine" using stateflow.

Constant: The constant block give Output the 'Constant value' parameter specified.

Chart: A Stateflow chart is a graphical representation of a finite state machine. You can also represent stateless flow charts.

Display: Display block used to Display input values. If the incoming signal is of type string, the 'Numeric display format' parameter selection do not affect the display of the string.

Lamp: The Lamp block displays a color that indicates the value of the connected signal or display block.

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

Give speed input while the simulation is running & display the gear number.

Explaination:

Aim: Make a simulkink chart for the "Gear Shift"

Click on the Simuklink and choose Blank Model. click on the state and drag

make a state logic for car "gear shift"

.Car "Gear Shift" simulink below:

Here, we used simulink basic blocks to create car "gear shift" Upward and Downward.

Constant: The constant block give Output the 'Constant value' parameter specified.

Slider Gain: The Slider Gain block performs a scalar gain that you can modify during simulation.

Chart: A Stateflow chart is a graphical representation of a finite state machine. You can also represent stateless flow charts.

Display: Display block used to Display input values. If the incoming signal is of type string, the 'Numeric display format' parameter selection do not affect the display of the string.

Lamp: The Lamp block displays a color that indicates the value of the connected signal or display block.

Power is ON engine can be Start, otherwise it Stop. Here we press a peadle of car the speed of the car is 38(kmph), The give data is shown below our speed is varing between from 26 to 40 (kmph) means that our car is running at the Third Gear, Similarly for all when we press peadle it is giving some value and it is varing in between our given data which is below.

Speed Range(kmph) Gear

0 to 15 1

16 to 25 2

26 to 40 3

41 to 60 4

Above 61 5

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.