Challenge

Week - 4

AIM:-

Implement control logic of a “washing machine” using Stateflow as per given sequence:

OBJECTIVE:-

  • 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.

After all the processes have completed turn on the finished LED

Theory: Case 1- Implement control logic of a “washing machine” using Stateflow

The working principle for the washing machine is "Centrifugation". Centrifugation is a separation process that uses the action of centrifugal force to promote accelerated settling of particles in a solid-liquid mixture. The washing machine consists of a centrifuge for this purpose. A centrifuge is a piece of equipment that puts an object in rotation around a fixed axis, applying a force perpendicular to the axis of spin that can be very strong.

Inside the Washing machine, there are few processes that are carried out in a successive period of time such as

a) Soaking

b) Washing

c) Rinsing

d) Drying

Simulink Model: Case-1

Stateflow Chart- A finite-state machine is a representation of an event-driven system. In an event-driven system, the system responds to an event by making a transition from one state to another. This transition happens if the condition provided is true. A state flow chart is a graphical representation of a finite state machine.

Explanation: Since in the question it is clearly stated that only when the Power is on the whole process will begin. This is followed by the availability of the water supply. If either of these 2 conditions is not satisfied the washing machine process will not begin.

Hence the only the positive condition is connected to the process while the negative condition is connected to a separate junction. Again as per the question, the first process of soaking is carried for 200 seconds which is represented as "after(200, sec)", the heading for this block can be assigned as per the block requirement. I have given the entry value as "0" and the exit value as "1". The same process is carried till the "Dryer" process then finally the End block with an entry value of "1".

Washing:-

Rinsing:-

Dry:-

The constant block has been connected to the state flow chart as inputs. These 2 constant blocks are in turn controlled by a "Slider switch" (which on sliding towards 'on' provides the value 1 and when towards 'off' provides the value 0). 5 outputs are connected from the state flow chart to the display. These 5 outputs indicate the 4 different processes that are happening inside the washing machine (Soaking, Washing, Rinsing, and Dryer) and the last one is the finish.

Both the inputs and outputs are connected to a Lamp, which is defined in a way that it emits green light when the output is 1 and emits red light when the output is 0.

AIM:-

2. Make a Simulink chart for the “Gear shift” logic as per the below conditions.

OBJECTIVE:-

Speed Range(kmph) Gear ratio

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.

THEORY:-

A transmission is a machine in a power transmission system, which provides a controlled application of power. Often the term 5-speed transmission refers simply to the gearbox, that uses gears and gear trains to provide speed and torque conversions from a rotating power source to another device.

The gear shifting mechanism is kept inside the Transmission to provide the uniform torque towards the drive shaft. This is because the IC engine produces the optimum torque only after a certain speed and it drops again. So in order to achieve the optimum torque on a continuous basis Transmission is used, with this, we can manipulate the Torque with the help of the "Gear ratio" (by using varied gear sizes inside).

As shown in the above figure, Manual transmission has synchronous gears or continuously meshed gears are kept. (In Automatic Transmission Planetary gears are used) Based on the speed requirement the gear is shifted using the Gear knob, which in turn makes the collar gear get meshed with the appropriate gears. The output shaft is connected to the collar gear, hence whichever gear gets meshed with the collar gear will be the output shaft.

During the gear shifting process, it is mandatory that the input shaft is disengaged from the engine. This is done with the help of the clutch plate (Torque convertor in case of the Automatic Transmission).

State flow chart: case:2

ere as per the question, the gears are arranged with the condition on the speed range. For example, a Speed above 0 to 15 will fall under first gear and the chart is also designated in such a way to satisfy the condition.

Simulink Model: Case-1

Here 2 input blocks are kept, one is the constant and the other is the "Slider Gain" Block. The Slider Gain block performs a scalar gain that you can modify during the simulation. The block supports fixed-point data types. The value given in the constant block get's multiplied with the Slider gain value during the simulation.

To determine the gear value required for the particular speed, a "Display" block is placed. The lamp is also placed whose parameters are set in a way that for each gear it will produce individual colors. The color inputs are shown below.

For First gear, Speed is 15 km/h

For second gear speed is 25 km/h

For Third gear, speed is 40

For fourth gear, speed is 70km/h

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.