Challenge

Week - 4

1.

Aim: To implement the control logic of a “washing machine” using Stateflow as per the 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 the next 20s & dryer runs for 50s

Description:

  1. Open the state flow chart in Simulink
  2. A 7 state flow chart is created as shown

3. The input signals are sent through the switches, and the attached LEDs pick them up.

4. Then it enters the state flow chart, where all of the outputs activate the LEDs associated with them, before passing via the mux, which combines all of the output signals into a single signal that can be readily connected to the display, which shows an array of output data. When there is no data, the display shows 0.

5. when the relevant output port has no signal and when the respective output port has a signal

Steps:

  1. First, the power is off, when the power is turned on, the matching led is activated, and it is switched from off to on.
  2. Then it checks whether there is a water supply and if there is, it starts the soaking process; if not, it outputs an "error" and triggers the water supply led, which is then switched back on through the junction.
  3. Until now, the system has been event triggered; from now on, it will be time triggered.
  4. It will begin the soaking process and trigger the associated Led, then finish the state after 200 seconds and cease this process, deactivating the related Led.
  5. Then it will start washing for 100 seconds before stopping the procedure.
  6. It will then begin rinsing for 20 seconds before terminating the procedure.
  7. Then it will start for 50 seconds and then end the procedure.
  8. It will then switch the Finnish Led off.

Output:

2.

Aim: To 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.

  1. In the Simulink window open up 'state flow chart
  2. Within the state flow chart, create 5 state blocks for 5 gears and an additional state block for the neutral gear
  3. Interconnect all the state blocks using appropriate logic and conditions as given below.
  4. After running the simulation, if we get an error as shown below. Then we should make sure to resolve all unresolved symbols by using a symbols pane. Basically, here we need to specify whether the symbol used will take Input or give output. Here 'S' is given as input and 'G' as an output.
  5. Now, come out of the state flow chart and provide input through the slider. And take output through the display and lamps, as shown below. And put simulation time as infinity and Run the model.

Output:

https://drive.google.com/file/d/1qA8jL_SvPKQTCqyxGqfIhi5vnYoovpGJ/view?usp=sharing

https://drive.google.com/file/d/174Pn8wlXB-33sr9aSy_JGMP7rYySq91r/view?usp=sharing

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.

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.