LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to keep that valve open for certain period of time and shut off automatically

Thank you again for spending so much time on my post and please  forgive my ignorance.

 

The reason I first come up with PID is because we have a control system and the value which is pH has to be adjusted to a set point value, PID is the only thing we learn in college, to be honest, just one semester course and I am ME student, not EE....

 

So Mr. 

0 Kudos
Message 11 of 26
(866 Views)

If you said "PID" because it's the only thing you were taught in college but you don't really understand how it works, then it won't be of much use to you.

 

I am confused about some parts of your project. You wrote that the valve will be open only for 5 seconds once per hour. There's not much to control there. Will you vary the length of time that the valve is open, or will it always be 5 seconds? How often do you take a pH reading? Does it matter what the pH is, or do you only care that it's acid, neutral, or basic? It sounds like your control is as simple as evaluating the acidity. If it's acid, open the base valve for 5 seconds, then measure again an hour later. If it's basic, open the acid valve instead. Is that correct? If that's all you're doing, there's no need for a more complicated control algorithm.

0 Kudos
Message 12 of 26
(858 Views)

Thank you Mr. 

The system will consist of a tank of 25 gallons of an electrolyte that is normally a natural solution.  You will be required to pump a small quantity of the electrolyte from the tank on a continuous basis and periodically monitory the chemistry of the electrolyte. The continuous pumping should be at a rate of about one pint per hour.  The electrolyte chemistry must be checked every 24 hours and corrected if necessary. If a correction is required to the chemistry the correcting reagent should be metered out over a period of  several hours to give the correction time to mix into the system before the next measurement is taken.

The system must be able to self calibrate for at least 10 years and have a working life of 10 years. The correcting reagent should last at least 10 years. The volume taken up by the whole monitoring system should be no greater than 19” X 23” X 4”.

The following items must be measured:

  1. PH level which is normally approximately 7. The PH must be kept in a range of 6.5 to 7.5. The reagents that will be used to correct the PH are HCL for a basic correction and NH3 for an acidic correction.
  2. Chloride concentration on the electrolyte. The level must be kept at just below fully saturated. Right on the verge of precipitation.
  3. Conductance of the electrolyte if it is too low salt must be added if it is too high distilled water must be added. The salt will consist of Cl-, NH4+, no3- and ZN+2

 

Based upon these requirements you will need to pick the appropriate reagents.

We will add more details as we develop the problem.

0 Kudos
Message 13 of 26
(853 Views)

This is an interesting problem, particularly for a ME - I would have expected this as a ChemE problem.

 

In any case, you know the volume of the tank, so from the pH measurement you can calculate how much acid or base needs to be added to achieve the desired pH level. You will know the concentration of your acid and base solutions (at least I hope so), so you can calculate what volume needs to be added. I assume you will also measure the flow rate from the valve. With this information you should be able to add the correct amount of acid or base, and you just need to figure out how to do that slowly.

0 Kudos
Message 14 of 26
(849 Views)

Thank you Mr. n

0 Kudos
Message 15 of 26
(846 Views)

I can't tell you what to do here - it's your project, and in any case I don't know. I do think you can make some guess over time at how much acid or base to add to effect a certain change in pH, by tracking the history in your software. So if one day you read a pH of 6 and you add 10mL of base to raise the pH and the next measurement you read a pH of 8, then the next time you read a pH of 6 you can use that historical data to determine that you should add less base. I do think you want to use proportional control - the amount of acid or base that you add should be related to how far the pH is from the desired value.

0 Kudos
Message 16 of 26
(838 Views)

Thanks Mr. 

 

0 Kudos
Message 17 of 26
(828 Views)

@godpaul wrote:


I wouldn't bother with the PID toolkit for proportional control only. It's only subtraction and multiplication.

I don't understand the question. The output of what? The output of a proportional controller is a number. It's up to you to determine what that number means, based on your gain. Ideally you would either conduct some experiments to determine the relationship between the pH and the amount of acid or base added or determine it through knowledge of the chemistry, but if neither option is available then you'll have to start with some reasonable guess (for example assume it's not a buffer) and then make your algorithm smart enough to compensate as it takes more measurements.

0 Kudos
Message 18 of 26
(823 Views)

Ok Mr. 

0 Kudos
Message 19 of 26
(819 Views)

Yi,

 

nathand has given you some good advice.  I recommend that before you try to write any more code or consider any equipment, that you run some calculations. You have the total volume, the types of reagents, and some constraints on reagent flow. Using pencil and paper, start with a tank pH of 6.5. Calculate how much reagent will be necessary to bring that back to 7.0. Then calculate what your pH readings woudl be at various timse after you start adding the reagent assuming different mixing rates.  This is something that any engineering student should be able to do because it only involves volumes and ratea and not the chemistry. Repeat for other starting values and perhaps other reagent flow rates.

 

After you have some numbers, then you can plan your apparatus and program.

 

Lynn

 

Master's degree and 40 years of experience, including teaching senior projects.

0 Kudos
Message 20 of 26
(818 Views)