LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to make a program for the water level in the tank where there is a disturbance in the form of a valve in the tank

Good morning labview masters. I want to ask here how to make a Labview program to adjust the water level in a 30cm high tank? so here I am using a DC motor pump with a power of 800l / hour. I want to compare the accuracy of 3 membership functions for filling water in the tank. so how it works, each membership function has a setpoint to fill the tank at a height of for example 15cm. then at the bottom of the tank there is a valve whose opening we adjust according to our wishes. it causes the water level in the tank to decrease. my pgn automatically if this water level decreases, the dc motor pump will immediately rotate to stabilize according to the initial setpoint (even if the valve is opened halfway or more). I am here to ask how to make the program run like that? to measure the height of the tank I use the ultrasonic sensor hcsr04

 

Here I am using win10 64bit

0 Kudos
Message 1 of 7
(1,651 Views)

Hi achmad,

 

short answer: you need to implement a control loop in your program…

 


@achmad10 wrote:

I want to ask here how to make a Labview program to adjust the water level in a 30cm high tank?


The height is irrelevant, the cross section area (width×length) is the interesting part…

 


@achmad10 wrote:

I want to compare the accuracy of 3 membership functions for filling water in the tank.


What are "membership functions"?

 


@achmad10 wrote:

my pgn automatically if this water level decreases


What is a "pgn"? I guess there is (atleast) a word missing in this sentence…

 


@achmad10 wrote:

Here I am using win10 64bit


This is quite uninteresting. More interesing questions:

Which LabVIEW version do you use?

Did you take the training resources as offered in the LabVIEW board?

Did you examine the example VIs coming with LabVIEW?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,617 Views)

@GerdW can you help me to make that program? 

Then how do you measure the height of the measuring tank?
The membership function is a curve that shows the mapping of input data points into membership values ​​(degrees of membership) which have an interval between 0 and 1.
so I want to make a program to fill the water tank with a certain height which is then given a disturbance in the form of a valve which makes the water in the tank decrease, so the dc motor pump will activate and fill the water tank to make it stable.
The LabView version I'm using is LabView 2018 myRIO Toolkit

 

0 Kudos
Message 3 of 7
(1,607 Views)

Hi achmad,

 


@achmad10 wrote:

The membership function is a curve that shows the mapping of input data points into membership values ​​(degrees of membership) which have an interval between 0 and 1.


Are you talking about a "fuzzy control"-type algorithm? Why don't you use a simple PID controller?

 


@achmad10 wrote:

Then how do you measure the height of the measuring tank?


You need to measure the height as you do, but to determine control parameters (like PID gains) you need to know the cross section area (or volume) of your water reservoir!

 


@achmad10 wrote:

so I want to make a program to fill the water tank with a certain height which is then given a disturbance in the form of a valve which makes the water in the tank decrease, so the dc motor pump will activate and fill the water tank to make it stable


I would start with a simple PID.

If you can measure the valve position (aka "you know the disturbance") I would add a "feed forward" to the PID…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(1,597 Views)

yes i'am talking about fuzzy control. because my project oblige to use fuzzy control to control the program, so i don't use the PID.

yes i will measure the water tank using hcsr04. for a volume of about 5300 cm cubic.

for the valve position, maybe I will give a mark for the valve rotation of 25%, 50%, 75%, 100%

 

0 Kudos
Message 5 of 7
(1,591 Views)

Hi achmad,

 

sorry, I'm no expert in those fuzzy control functions. I only used them once, about 10 years ago…

 

So I recommend to examine the example VIs provided by NI for those FuzzyControl functions!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(1,575 Views)

10 years ago?very long time. thank you for your response sir.

if the main program for activate the dc motor pump can you help me to make the program? based on the way of working that I described above sir

0 Kudos
Message 7 of 7
(1,547 Views)