1. Hi everyone. I need a little help on PID controllers. We have a project that requires us to make a water level sensor using PID controller. We can't use a controller IC and instead have to built one using op amp IC. Unfortunately we have not reached the part of the course where we study PID controllers so it is difficult. I have read on the internet about the theory of the PID but i don't think i understand much of it. What i do know is that the Proportional part multiplies the error signal with a constant, the Integral takes the sum of all previous values of error signal and adds them then multiplies with a constant, and the Differentiator finds the rate of change of error signal and multiplies it with a constant. Now here's my dilemma: how in the world do i use this knowledge to control the water in my tank? I know i will use a sensor along with a reference voltage and sum them up to get the error signal and the output of the PID will control my motor. But how will i adjust the reference voltage? and how do i set the circuits for Proportional Differentiator and Integrator?
Thanks in advance and have a nice day.

2.

3. The reference voltage is the setpoint, which represents the level you want to maintain. When the signal representing the level is equal to the reference voltage, the error is zero. The level control system in a toilet tank is similar to a proportional controller, except it only works to fill the tank, not empty it. The valve is opened wide for maximum flow when the error is great, and flow reduces proportionally as the level approaches the setpoint. This kind of controller takes a fairly long time to reach the setpoint. It could benefit from some integral control which speeds up the response when an error exists for a long time, if you really cared about that. You can also increase the gain to speed up the response (this would be like having a bigger valve).

The derivative part of your controller reacts to a rate of change. Suppose your controller is controlling the level at a certain setpoint, and there is a sudden change in the process. The controller will react to the rate of change, and turn it around quicker than a straight proportional controller would.

Here is a reference that might help you tune the PID controller.
http://en.wikipedia.org/wiki/PID_controller#Stability
http://www.omega.com/temperature/Z/pdf/z115-117.pdf

4. Originally Posted by fine
how in the world do i use this knowledge to control the water in my tank? I know i will use a sensor along with a reference voltage and sum them up to get the error signal and the output of the PID will control my motor. But how will i adjust the reference voltage? and how do i set the circuits for Proportional Differentiator and Integrator?
Thanks in advance and have a nice day.
You have a tough challenge! Without the necessary background, it's difficult to produce a stable controller. The best we can do is offer generalities. The rest will be "cut and try," I'm afraid. I would recommend reading The Art of Electronics by Horowitz and Hill as one source. There are many, many others on control theory, but their brief treatment is highly readable for beginners.

In (negative) feedback systems, the higher the gain, the better, until instability sets in. More gain simply means that the system reacts with higher precision to any error between the setpoint and the measured result. But any finite gain allows finite error.

Integrals, being what they are, give us infinite gain if we wait long enough. That property drives the steady-state error to zero.

The derivative term provides a first-order extrapolation to the future from the present. This allows your controller to compensate for delays in response associated with any other dynamics, leading to a stable solution.

These three terms all interact. Increasing the P term reduces error and increases bandwidth, but also increases the likelihood of instability. Increasing the D term can help buy back stability, but since it only performs a first-order extrapolation to the future, it is limited in what it can do.

Good luck!

5. Originally Posted by fine
Hi everyone. I need a little help on PID controllers. We have a project that requires us to make a water level sensor using PID controller.
Well, a sensor can't be a "PID controller." A typical control system senses a process variable (like the level of water in a tank) compares it to a reference and then drives a manipulated variable (like a pump or a valve.) There are a great many ways to do this, and they vary based on sensor (proportional? on/off?) output (on/off pump? proportional control of valve?) design goal (fastest fill? most accurate level control?) and desired design (analog? digital?)

how in the world do i use this knowledge to control the water in my tank? I know i will use a sensor along with a reference voltage and sum them up to get the error signal and the output of the PID will control my motor. But how will i adjust the reference voltage? and how do i set the circuits for Proportional Differentiator and Integrator?
Do you want to do this in the analog or digital world? If it's analog, then your setpoint will be a voltage reference, or a pot connected to a voltage reference to make it variable. You can implement all three terms via single op-amps and then sum them with a fourth op-amp. (Schematics to do this are readily available on the net, like this one -> The Op Amp PID Controller

If it's digital, then choose a microcontroller (Arduino and Raspberry Pi are two popular and easy-to-get controllers) choose an input conditioner (usually an A/D converter with some kind of signal conditioning) and an output means (like a PWM control.) Then it's all software, which again is readily available on-line. http://www.google.com/url?sa=t&rct=j...74115972,d.cGE - good starting point.

6. Thank u all so much for your help, everything said by everyone is very helpful and reassuring that I can do it. I might ask for more help after I start work. Thank you all

 Bookmarks
##### Bookmarks
 Posting Permissions
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts   BB code is On Smilies are On [IMG] code is On [VIDEO] code is On HTML code is Off Trackbacks are Off Pingbacks are Off Refbacks are On Terms of Use Agreement