PID problem...

taz3m said:
Im sure you are right Keith, i should listen to their advice carefully,...

Thanks for the manual it will be of great help im sure...

peter to tell you the truth, i have take a look to your pdf.. hmmm, nice... hope you understand me..

I will try to understand it, but i will have a lot of questions..

Firstly how do we know that a system is linear or non-linear..???
Your system is non-linear because adding one liter of hot water will have a greater affect when the level is low than when the level is high. If there is no water in the mixing tank the response will be very fast. Honestly, I don't think it makes much difference to the tuning because the water level should always be about 1 meter unless the demand is greater than what the pumps can supply. Pandiani wants to solve your problem using LQR so he needs to have a linear system. I linearized the system a lot with in the conversion from level and temperature to hot and cold control outputs. I didn't do it perfectly. I think with a little effort Pandiani can find a better better but more complicated formula.

surely the LInear one is more easy to work with, since you are trying to linearize the system.
We shall see once if linearizing makes a difference once we get the simulator working.

Taz3m, download Scilab from www.scilab.org and install it.
http://www.scilab.org/
It is this software that I am going to use for the simulation.
 
Only a little progress tonight

I updated the pdf. What bothers me is that is is possible to have more flow if the mixture is about 50-50. In this case each pump can supply full flow. If the temperature PID is at full output then only the hot water pump can be on which is just half the flow. This will require more thought. I think the LQR method may be better because it handles the hot and cold pump flows separately. They are not derived from a flow and temperature output like what I am trying to do.

Meanwhile I expanded the matrices into two first order differential equations. I also changed the range of the output from 0-100% to 0-1. Finally I computed the level PI gains. The temperature PI gains will be harder to compute. I didn't make much progress on the Scilab simulation.

I tried a couple Google searches looking for examples on how others have solved this problem. I didn't find anything.
 
I did not read all posts,
The hot tanks should have a spiral inside to avoid waterscaling in the solarpanels.
So make an indirect system.
use The hot water direct to the dorm and mix it locally with simple mixingvalves this way everybody can set their own temp.
take hot water from top of tank and feed cold water into bottom.
The spiral should be in bottom.
to avoid bugs a big heater
must be present to heat up the pipesystem to above 75 celsius.can also be used for extra heating when it is too cold.
i understand you need a cold water buffer? too
use one tank with air pocket and keep this one pressurized with a waterpump, the dorms and the hotwatertank takes water from this pressurized tank.
control is done with pressure sensor (on/off) and temp is local in dorm.
end of discussion about how to control. and all simulations.
how to make a simple problem so complicated you must use a very experienced guy.
 
I agree with you shooter.

Every place I have been too uses local mixing. It also bothers me that there are pumps to feed the demand. How are these pumps controlled? Usually the demand is gravity fed.

However, Pandiani and I were going to work through the problem anyway. Like I said, solving these kinds of problems is more of an challenge or puzzle to be solved like Sudoku only more productive.

I decided that the I should allow both the hot and cold water pump to be on 100% when the temperature control asks for a half hot and half cold mix. This will improve the level control's response to demand changes. Since a 50-50 mix of hot and cold water will result in water that is 42.5 degrees C I think that is safe.
 
Well, I tried to make state-space model of our system.
As you know, state –space representation is often written in the following form:

x' = A*x+B*u
y = C*x+D*u

x is state vector, y is output, and u is input, A, B, C and D are matrices or vectors.
I 'd like to choose states to be same as outputs: x1 = Temp, x2 = Level
In the attached file you can find my attempt to write system in state-space form and problems I have encountered.
 
Pandiani said:
Well, I tried to make state-space model of our system.
As you know, state –space representation is often written in the following form:

x' = A*x+B*u
y = C*x+D*u

x is state vector, y is output, and u is input, A, B, C and D are matrices or vectors.
Often the C and D matrix aren't required. The only time I have seen them necessary is when the plant has zeros. I prefer not to use them unless the plant has zeros..

I 'd like to choose states to be same as outputs: x1 = Temp, x2 = Level
In the attached file you can find my attempt to write system in state-space form and problems I have encountered.
What was wrong with my state space matrix? I will look at yours later. Got to get my work done now.
 
In most cases control input "u" affects output only through dynamics of the system. It is very rare that input u goes to output directly, so most of the time D is simply zero. On the other hand, C depends on how state variables are chosen. For example, in many previous cases when state space is used C was simply [1;0...] because we dealt with SISO system and choose first state variable to be output variable. In this case, if Temp and Level are chosen as state variables, C will be simply [1;1].

Peter, there's nothing wrong with your way of representing the system. However, I tried to write it in such form to be obvious what is y, u, A, B and C. I'll think more about it.
Do you agree to choose vector u like [COh;COc]?
 
Hello,,


The fact that shooter raise this point of complexity in this problem..

Earlier before ariving at the conclusion that only PID will go.. i have devise a simple logic whereby using a formula for mixing solution:

Tm=(T1V1+T2V2)/(V1+V2)

where:
Tm is temperature of mixture
T1 temp of hot water
T2 temp of cold water
V1 volume of hot water
V2 volume of cold water

Base on this equation i thought that writing some blocks in the S7 using the integer function will go,and controlling the output of my pumps using inverter but the pump being used is that at some low frequency i dont have any output from my pumps.


Another solution have been proposed, using equal volume of hot to cold water to achieve mixtures. giving a clearance of about 100 litres..

Initially this is achievable keeping the temp at a constant level by a temperature transmitter..

But the problem is that when there is demand and the level of the tank is decreasing .... there the problem start.......:unsure:

.......
 
The dog ate my home work.

Actually, my TV stopped working like it did before and that is higher priority. I think it is the sling box that has gone bad but I can't get the TV to work on all channels even when I connect the cable directly to the TV. Hmmm.

Pandiani said:
In most cases control input "u" affects output only through dynamics of the system. It is very rare that input u goes to output directly, so most of the time D is simply zero. On the other hand, C depends on how state variables are chosen. For example, in many previous cases when state space is used C was simply [1;0...] because we dealt with SISO system and choose first state variable to be output variable. In this case, if Temp and Level are chosen as state variables, C will be simply [1;1].
Yes.

Peter, there's nothing wrong with your way of representing the system. However, I tried to write it in such form to be obvious what is y, u, A, B and C. I'll think more about it.
Do you agree to choose vector u like [COh;COc]?
Yes, but at some point [COh;COc] must be replaced by some function of [COt;COl]
 
Here is my second attempt to find appropriate linear state-space model around some working point.
Please have a look and comment...
 
Elements of matrix are obtained by finding partial derivations. Element a11 is found df1/dT = -1/tau

A12 = df1/dL = -Ph*Th*COh/(A*L0^2) – Pc*Tc*COc/(A*L0^2);
I know that it is little confusing, but I have found on one internet site that state matrices can be found using derivations calculated in some steady values. I've never seen this before, so I couldn't tell for sure.

If you calculate derivations of fucntions f1 and f2, you'll get same results as I.


Aij = dfi/dxj
Bij = dfi/duj
 
Here is my third attempt. I have corrected mistakes in my previous attempt. I didn't do derivations carefully...
You can find state-space model in the attached file.
 
Pandiani said:
Here is my third attempt. I have corrected mistakes in my previous attempt. I didn't do derivations carefully...
You can find state-space model in the attached file.
Pandiani, that still doesn't look right.

Mine is not right either but I didn't see it until I started to really use my equations. I have been busy and will not be able to work on this for another week so I haven't had the opportunity to fix my .pdf yet. The mistake I made as in the top line were the control output affect the temperature rate. The TempC and TempL should have Temp subtracted from them. Subtracting Temp from TempC and TempH keep the temperature from always increaseing until the temperature is very high. The hot water can increase the temperaure to a value greater than 65 degree C so as Temp increases the rate at which the temperature increases is less.

After I fixed that things started to work. I could compute a steady state level and temperature given a controller gain. I was first trying to use only a proportional gain. As predicted the level error is proportional to the demand and inversely proportional to the controller level gain. The temperature error is similar but the temperature doesn't integrate like the level does so the temperature error is large until the gains are quite high. A bias would help the temperature. Since the temperature set point is at 40 and the temperature control output must reach 20/(65-20) or .4444 to start to increase the temperature. After 5 time constants the water temperature will then reach within 1% if 40 degrees C. The time constant is proportional to the volume/flow.

My initial thought were correct. A simple proportional gain will do nicely but not perfectly. The FB41 is not required if the temperature control has a bias of .4444 added to it.

Our simple model assume the pumps respond instantly and there is no dead time in the temperature system. I don't think the pump response will affect things much but a temperature dead time will. A temperaure dead time will limit how high the proportional gain can be without oscillalating. The bias will help greatly. We will not get a chance to know the dead time until taz3m's system is built. I hope it isn't because shooter is right about mixing at the faucet.
 
After spending some time on research, I think I made it correctly this time. My Matlab simulations work as expected.
I'm taking different approach from Peter's.

Please read this and comment.
 

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,731
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,140
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,081
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,489
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,321
Back
Top Bottom