Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Mtlab help On/Off Control The length of time between water level measurements/ c

ID: 2084841 • Letter: M

Question

Mtlab help

On/Off Control

The length of time between water level measurements/ control adjustments is DT.

If the water level drops to the bottom of the band, the controller drives the inlet valve to 100% open.

The valve stays 100% open until the water level reaches the top of the band. When the water level reaches the top of the band, the controller drives the inlet valve to the fully closed position.

The inlet valve remains fully closed until the water level once again drops to the bottom of the band.

1.Write a matlab script to simulate water level control for the following inputs:

Tank dimensions:

D=5 feet

H=10 feet

Water level:

yi=7 ft

ysp=5 ft

Controller:

DT=30 seconds

BAND=1 ft

Inlet Valve:

Vimax=100 gallons per minute

Out flow:

Vout=40 gallons per minute

Sigpal to valve Control le Vin al h to contro h Lo fleat water level Senso watec .Tle band 's centered around the set eat 4

Explanation / Answer

here u asked about to control the water level so to control it we can use FUZZY LOGIC and it will be easy for you to solve your question

the length between the water level measurements/ control adjustments is 30sec

by using tank dimensions and other values here i am giving you a example using microcontroller 8051 if you want to control it by using fuzzy logic is also simple

This water level controller monitors the level of the over head tank and automatically switches on the water pump when ever the level goes below a preset limit

matlab code:designed to control water level using 5leds for indication purpose please verify it

MOV P2,#11111111B // initiates P2 as sensor input
MOV P0,#11111111B // initiates P2 as the output port
MOV A,#00000000B
MAIN:ACALL SMPCK // checks the level of the sump tank
MOV A,P2 // moves the current status of P2 to A
CJNE A,#11110000B,LABEL1 // checks whether tank is full
SETB P0.1
SETB P0.2
SETB P0.3
SETB P0.4
CLR P0.0 // glows full level LED
SETB P0.5
LABEL1:MOV A,P2
CJNE A,#11111000B,LABEL2 // checks whether tank is 3/4
SETB P0.0
SETB P0.2
SETB P0.3
SETB P0.4
CLR P0.1 // glows 3/4 level LED
LABEL2:MOV A,P2
CJNE A,#11111100B,LABEL3 // checks whether tank is 1/2
SETB P0.0
SETB P0.1
SETB P0.3
SETB P0.4
CLR P0.2 // glows 1/2 level LED
LABEL3:MOV A,P2
CJNE A,#11111110B,LABEL4 // checks whether tank is 1/4
SETB P0.0
SETB P0.1
SETB P0.2
SETB P0.4
CLR P0.3 // glows 1/4 level LED
JB P0.6,LABEL4
CLR P0.5 // switches motor ON
LABEL4:MOV A,P2
CJNE A,#11111111B,MAIN // checks whether tank is empty
SETB P0.0
SETB P0.1
SETB P0.2
SETB P0.3
CLR P0.4 // glows EMPTY LED
JB P0.6,MAIN // checks whether sump is low
CLR P0.5 // switches motor ON
SJMP MAIN
SMPCK:JB P0.6,LABEL5 // checks whether sump is low
SETB P0.7 // extinguishes the sump low indicator LED
SJMP LABEL6
LABEL5:SETB P0.5 // switches the pump OFF
CLR P0.7 // glows sump low indicator LED
LABEL6:RET
END

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote