Challenge

Week - 4

  1. Implement control logic of a “washing machine” using Stateflow:

In this program, we have used two slider switches known as power supply and water supply. To start the process of washing we need both the inputs that mean without power and water supply our system will not start. If the power supply is present but the water supply is not present then the system will stop the process and indicates an LED signal.

From two LEDs one is used to show water supply indication and the second LED is used to show the process is finished means clothes are washed.

XOR gate is used to make a logic of water level indication LED indication with respect to the power supply.

Here, the soaking time is 200 sec after which the washing state will take place and it will last for 100 sec. after washing rinsing state will take place and it will take 20 sec and then the dryer state will be on and it will stay on for 50 sec. after all the process finishes or cloths are washed LED will blink.

The Stateflow diagram of the same is attached here.

  1. Make a Simulink chart for the “Gear shift” logic:

The toggle switch is used as an ignition switch to turn on the engine.

The vehicle speed is controlled by the slider gain which is named as vehicle accelerator.

As per the chart, the state programming is done in such a way that the gear shifting will show only when the engine is started. The gear shift once the vehicle accelerator range changes according to the below:

From speed, 0 to 15 system will select 1st Gear

From speed, 16 to 25 system will select 2nd Gear

From speed, 26 to 40 system will select 3rd Gear

From speed 41 to 60 system will select 4th Gear

and Speed above 61 the system will select 5th Gear

The max speed is adjusted up to 100 Km/h in which the vehicle will be on the gear 5th.

We can observe this from the attached Simulink file and graph.

Gear is considered as output and n is the input speed to the system.

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.