PID problem...

Updated model

Here is updated model. It is built around equations Peter suggested. Peter, Keith, please have a look and verify. I hope it's OK. Interesting, Matlab gave me and error because in the first moment of time, integrator output (level) was zero, so there was division by zero. It doesn't use models of control valves. Please let us first agree on structure of the model. Then, we can go further.
I have worked with FB41, so I will jump in when that moment comes. Let's go step by step. Please, first verify that model is correct and according above's equations...
Next we'll include model of control valves. Input will be in 0-100% (Control output) and output will be flow in m^3/min.

http://www.plctalk.net/qanda/uploads/Model1.jpg
 
Technically, I think the divisor in the Mul4 block is incorrect, although it probably won't make much difference. This value is currently tank height. Technically you want tank volume. However, assuming a cylindrical or rectangular tank, the value is simply proportional anyway.


Keith
 
Well, since Volume = Area * PVLevel, I implemented 1/(A*PVLevel) as shown in the picture. Can you explain why do you think it is not correct. I placed gain (1/Area) before Mul4, aso overall it represents current volume...
 
Technical Details

wow.. never expected that much in such a short time... Keith its not only my first post here but also my first time participating in a forum. Sorry for late reply, due to this difference in time between us and on top i have to work all day, and access to the net is quite difficult there.

Well, thanks all, before starting....

OK I will try to give a brief description of the project, as well as some technical informations i have acquired...

The system is of type active solar water heating system. i.e the water will be in continuous circulation through the collectors in the Hot water tank until heat transfer is zero.Also till i get a temperature of about 65 c in the Hot water tank storage.
this is one control, and im working on this right now, still need to be approved by my senior.

Components being used:
  • 50 solar panels (Evacuated tubes)(Area=3.81 m^2)
  • 2 Hot water storage tank ( 25m^3 each)
  • 3 cold water tanks (25m^3 each)
  • 1 mixing tank of 1 m^3 capacity each
Hot water and cold water is to be supplied to a dormitory consisting of 550 people. A rough calculation have get to results, 27m^3 of water is being used by the people per day.
the hot water tank is well insuated as well as the mixing tank.

The dormitory consist of 72 bathrooms.
Peak hours ( time where people will use water mostly):

  • 17:30 - 22:00
  • 6:00 - 7:00 (a.m)
The sun radiates 17 MJ per m^2 of energy where this project will be sited.

Pump ratings:
  1. Hot water pump = 4.2L/s
  2. Pump feeding mixing tank = 4.2L/s
  3. Cold water pump 8.8L/s
Cold water temperature: 20 c
the tolerance of the 40 c water i think should be +/- 2c, so that in cold time the people wont have much difficulties, and they can mix the water with cold if it is too hot.


As far as the issue of heat loss is concerned, i have raised this discussion, and if water in the mixing tank is held the entire night definitely there will be heat loss, since the solar panel store the energy from the UV light of the sun into infrared radiation, this latter cannot pass back through the glass tube, hence there will be trapped energy in the tube wherby recirculating this water will sort out this prob.


Below are pictures of the system layout and the P&ID of the system i have drawn, this will surely facilitates your help,..


  1. Syslayout.JPG
2. http://www.plctalk.net/qanda/uploads/P&IDLay.JPG



Thanks a lot...

Taz....
 
taz3m said:
wow.. never expected that much in such a short time... Keith its not only my first post here but also my first time participating in a forum. Sorry for late reply, due to this difference in time between us and on top i have to work all day, and access to the net is quite difficult there.
You are working and working smarter. Taz3m, this is a new problem and a challenging one.
  1. Syslayout.JPG
P1 isnt pumping directly from the mixing tank. This doesn't look right.
I agree you should have some form of reciculation from the mixing tank to the hot water. Is there a level sensor in the mixing tank?
It looks like their are two pumps feeding the mixing tank, P2 and P3. I would think the recirc pump P4 would be drawing water from the mixing tank. P4 would need to run while there isn't any demand just to keep the water in the mixing tank at the right temperature. This means that if P2 and P3 should never be stopped for any length of time. If P1 and P2 are stop for a half hour the mixing tank could cool off below specs. In this case P4 would need to run. P4 could run at a fixed speed and be simply an on off control. If the mixing tank is high then the water should just flow out as people use the water. I don't see a need for P1.

I hope this system isn't designed yet. I think some modifications need to be made.

At this time I still like the two PIDs with method as the best way to go. Pandiani can try the LQR. It will be interesting to see what Keith comes up with for his simulation. It look like Taz3m will get three simulations by the time this is done. Each one will be slightly different I am sure. I may get to this project this weekend but I will use Scilab. Taz3m, do you know about Scilab? It is free at www.scilab.org.




 
GOOD drawing - just what we need.

One design change I would do is to raise the heated water temp from 40C (104F). The reason for this is Legionella growth in hot water. The temperature range for Legionella is 70F to about 110 (?) ASSUMING 24 hour stay time. Commonly in USA domestic hot water in residencies like yours is 120 to 125F.

Dan Bentler
 
It seems that taz3m's project is little bit different than my example. Maybe it would be good to separate threads, because I'm not sure we will achieve good effect by writing everything to just one thread, it will be hard to follow.
But nevermind, I'm still pretty much stuck at creating state space model. I'd be gratefull if someone jumps in and help me create state-space. Without it, I don't know how to apply theory I learned recently on this forum...
 
Originally posted by Peter Nachtwey:

P1 isnt pumping directly from the mixing tank. This doesn't look right.

I think P1 is just what is says. The dorms need just cold water also. However, it does look like Taz3m omitted the pump from the mixing tank to the dorm.


Originally posted by Taz3m:

Also till i get a temperature of about 65 c in the Hot water tank storage.

Why limit the temperature to 65oC? Why not let it get as hot as possible within safe limits? Or is 65oC your safe limit? I would think the higher the temperature the higher the energy stored (gets you through the night) and the faster the mixing tank temperature will respond.

Originally posted by Peter Nachtwey:

I agree you should have some form of reciculation from the mixing tank to the hot water.

I also agree with this. It is the best way to keep the mixing tank temperature at the right level during low flow periods.

What do you have for sensors? Do you have temperature sensors in the hot and cold water tanks? Flow sensors in the hot and cold water feeds to the mixing tank? Flow meter on outflow from the mixing tank?

Originally posted by Peter Nachtwey:

It will be interesting to see what Keith comes up with for his simulation.

I hope I have time to play with this. It doesa look like a fun one.

Keith
 
This is a first cut at a SimApp worksheet for this. As I stated before, I'm not 100% sure this is correct so if someone finds holes in it let me know.

As we already know, without a circulation pump moving water between the hot water tanks and the mixing tank there is no way to add heat unless water is flowing out of the mixing tank.

The PDFs are of the simulation worsheet and a plot of three simulations run while varying the outflow. The outflow was varied between 0.05, 0.5 and 5 units/second in that order. Also, the tank height variable was scaled up to show more detail.

I implemented this as a PI controller for tank height and a PI controller for cold to hot ratio.

On the off chance someone has SimApp, let me know and I can post the worksheet too.

Keith
 
Your post has really caught the interest of this forums big guns on PID control, you are in good hands, good luck on your project.

Now from my toy water pistol
I work in a food processing plant, we have 5 tanks of hot water that hold 150 cubic meters each, of 80 degree C water, and we are not allowed to use stored hot water at under 70 degrees C, in order to prevent bacteria growth, so I am going to make suggestions for design changes.

My suggestion is fill one tank at a time, whilst using the other tank to supply the hot water for dormitary use, do not introduce cold water directly into the hot water tanks.
Only mix the 40 degree water when its about to be used, remove the 1 cubic meter 40 degree mixing tank, as its an area that water can cool, as its stored water and at low flows, that can encourage bacteria growth.

We use this type of mixing valve for our 40 degree mixed water and they have worked out quite well, we use no mixing tanks.
http://www.emechcontrol.com/

In my alterations in purple to your drawing I have moved P3.

Syslayout.jpg
 
Last edited:
Peter Nachtwey said:
I only see water going into the mixing tank. Not out.

Lawzee lawzee Mr Nachtway you sure are a demanding man - poor ole plumber runnin them pipes as fast as he can!!!!

I think he merely forgot to draw a line out of mixing tank.

Dan Bentler
 
leitmotif said:
Lawzee lawzee Mr Nachtway you sure are a demanding man - poor ole plumber runnin them pipes as fast as he can!!!!

I think he merely forgot to draw a line out of mixing tank.

:) Indeed, i forgot to place the pump P5 to supply hot water to the Dorm...

Ok let us be clear on each pump...
Water supply to the dorm should be both Hot and Cold.
  • Therefore, pump P1 supply only cold water to the dorm.
  • Pumps P2 & P4 feeds the Mixing tank,with cold and hot water respectively.
  • Pump P3 is to circulate the water in the Solar Collectors.
  • Pump P5 feed the dorm with hot water @ 40 c from the mixing tank.
Another point of interest which Dan raised.. that is the growth of legionella.. but still assume 24 hour stand still..

As Gil 47 stated, is it wise to do the mixing in the pipe itself, therefore removing the mixing tank..?? Or should i just increase the required temperature in the mixing tank,, most probable..

Yes, i think no one looked @ the picture which i posted together with the System layout..
The P&ID layout, whereby it gives a view of all the instrumentations equipments which i proposed to use in controlling the systems..

As far as for flow sensors i have not made provision of any, since my decision was not focussed on PID at that time, if you think it is wise to implement the flow meters make the Necessary additions in the P&ID, and i've got to check it later with my senior for approval..

See picture below Pls... :)

http://www.plctalk.net/qanda/uploads/P&IDLay1.JPG

One more thing, keith, the SimAPP you have posted.. looks nice :),, but i :unsure: dont quite understand these stuffs, i know you working with some mathematical formulas in order to have the right proportion of hot to cold water needed to achieve the right temp in the mixing tank.. corect me if im wrong!!!!

Pls keith i wanna understand these stuffs, look nice but will lul even better if i understand it fully. can you give me some theory and explanations on these block, you said that you are using a PI controller for both temp & level control. Pls dont mind me asking these, coz i wanna simply learn from you guys,
...You Are all too Good...

Yep, i cannot see exactly whether you are heading with a PID controller or you will be using simatic S7 for programming... coz my senior is not willing to buy a PID controller he want this to be achieved by using the simatic S7 software...


Kamenges said:
Why limit the temperature to 65oC? Why not let it get as hot as possible within safe limits? Or is 65oC your safe limit? I would think the higher the temperature the higher the energy stored (gets you through the night) and the faster the mixing tank temperature will respond.

Hmm, yep you are right about this factor, but when we will be calculating the mixing proportion, should not we know the maximum temperature of the hot water, in order to have the according proportion for the mixed water @ 40 c, but if the temperature ever achieve a high degree, then tank will need to be pressurise you think?? on top this system will be mounted on the roof of a 3 storey building... (??)

See you....
 
taz3m said:
As Gil 47 stated, is it wise to do the mixing in the pipe itself, therefore removing the mixing tank..?? Or should i just increase the required temperature in the mixing tank,, most probable..
I agree with Gil47 on this point but how do we know the hot water demand? Water pressure? The level in the tank gives the pumps time to react by monitoring the level. However, the mixing tanks doesn't really need to be so big unless it is necessary because the pumps can't keep up during peak demand. If the pumps can keep up with demand at all times then I would make the mixing tank smaller because the hot water pump will be able to heat a smaller volume faster.

One more thing, keith, the SimAPP you have posted.. looks nice :),, but i :unsure: dont quite understand these stuffs, i know you working with some mathematical formulas in order to have the right proportion of hot to cold water needed to achieve the right temp in the mixing tank.. corect me if im wrong!!!!
I must stare at Keiths diagrams too. After a while they make sense. Just keep looking at it for a while. I prefer simple differential equations :)

Yep, i cannot see exactly whether you are heading with a PID controller or you will be using simatic S7 for programming... coz my senior is not willing to buy a PID controller he want this to be achieved by using the simatic S7 software...
You have a senior manager? I would fire him. He should have the answers and lead by example and experience. Senior must just mean older in this case. It seems that the 'senior' just told you to solve this problem without understanding it.

Hmm, yep you are right about this factor, but when we will be calculating the mixing proportion, should not we know the maximum temperature of the hot water, in order to have the according proportion for the mixed water @ 40 c, but if the temperature ever achieve a high degree, then tank will need to be pressurise you think?? on top this system will be mounted on the roof of a 3 storey building... (??)

See you....
This is why you use a PID. If reality worked like the models we wouldn't need the PIDs. The PIDs will compensate for the fact that the hot water isn't exactly 65 degrees C.

I am starting on Pandiani's state space model.
 

Similar Topics

Dear all . I made a program for boiler tank using TIA V15 , the program consists of 2 PID blocks in OB30 . but the PID didn’t work automatically...
Replies
3
Views
2,678
Dear all . I made a program for boiler tank using TIA V15 , the program consists of 2 PID blocks in OB30 . but the PID didn’t work...
Replies
1
Views
1,134
Hello Friends; I am working on a GE Funac LM 90-30 software. I face the problem to set the CV value when PID in auto mode. The parameters are set...
Replies
13
Views
3,056
I had a problem on a hydraulic servo controlled cylinder, which I believe was caused by the PID loop and the cylinder reaching a hard stop at one...
Replies
10
Views
2,460
We have a machine we're trying to commission. It's a web converting machine. It takes webs of foil, wicking paper & a label and creates a chemical...
Replies
1
Views
1,313
Back
Top Bottom