PD(PI) Math Model (e.g.Tank Level)

Anything could be thought in mA and minutes.

formatting link
The level moves v1' = 15 mA/min

Process transfer function F1(s)

A1 * v1' = v2 = 0.3mA (Valve step) A1 = 0.3mA/(15mA/min) = 0.02min

F2(s) Feedforward controller PD(PI)

---------------------------------------

Error e = u - v1

v2 = u + B1 * u' + ^^^^^^^^^^^ Recognize PD1! (=PD)

  • K * (e + 30 * Integrator(e)) + z1 ^^^^^^^^^^^^^^^^^^^^^^ ^^ PI! K = 1 Integration[0...t] e dt + C, C=0 Forced disturbance z1 z1=0.1 at t=0.3

F1(s) Process transfer function

-------------------------------

A1*v1' + v1 + z2 = v2 ^^ Forced disturbance z2 z2=-0.1 at t=0.5

F3(s) Target filter (1st order)

-------------------------------

C1*u' + u = w (w = scheme)

Data used:

A1 = 0.02 min B1 = A1 C1 = A1 (for full compensation)

v1 ist NOT missing because you can integrate v1'.

v1 = Integration[0...t] v1' dt + C

Note: A tank is a machanical integrator with delta flow input (v2) and level v1 output.

Reply to
JCH
Loading thread data ...

system I presented. However, you mentioned that this system is controlled by a valve rather than a pump like the system covered a month or two ago. Valves are not the easiest thing to model and in that respect this should be more difficult than my problem system.

  1. As the tank level changes these flow though the valve will change even if the valve position is constant.
  2. Valve spools are rarely cut so the flow is proportional to the spool position. You can get linear valves but they are more expensive.

Why is feed forward required? You are using the target filter as your target generator. A properly tuned PI or PID controller will give you closed to the sampe response. I can get exactly the same response when I place zero separately from the PID gains in the feedback path.

You still never show the output between the controller and the plant or valve in this case. This signal is limited to 0 to 100%. In my Scilab program it is possible for a disturbance ( in flow stopping or decreassing ) to cause the motor to stop until the level increases due to inflow. The water level can not increase at a faster rate. Look at your disturbances. The response looks exponential which can't be. This is why the controller and plant must be broken down into two parts and the controller output limits applied. Combining the controller and plant ignores these real limitations so it looks like the valve can pump up the tank level.

I will add that to the list of thing to do but make this number 1. Break down the controller and plant in to separte parts with the controller output limits applied to the control output.

This shouldn't be needed. You only need a PI controller for a simple Gp(s)=Kp/s. Otherwise you will need a PID. If you pick your gains wisely you end up making the whole system into a low pass filter and you can chose the desired response. Actually you chose the desired resonse and calculate the gains. I think it is great that you have discovered how feed forwards work. Now you should

  1. Learn how to make target generators where one can control the derivatives of the set point.
  2. Learn how to design PI, PID and PID with second derivatives to give you the desired response.

The model for the system should be Gp(s)=Kp/s for a fast valve that is linear or Gp(s)=Kt*Kv(f,l)/(s*(tau*s+1) for a non linear valve with a response time. In the first case Kp is the overall gain that includes the Kt ( tank ) and Kv ( valve )

It is simple to make a valve linearization table and scale the gain as a function of the sqrt of the pressure across the valve. The bare minimim is a deadband elimintator. I get involved with hydraulics, not level control. A person more experienced in level control, like Fred Thomasson, can tell you how much effort they put into their control algorithms.

Peter Nachtwey

Reply to
Peter Nachtwey

"JCH" schrieb im Newsbeitrag news:4651bc4f$0$10193$ snipped-for-privacy@newsspool4.arcor-online.net...

CORRECT:

v2 = 0 + B1 * u' +

CORRECT:

A1*v1' + 0 + z2 = v2 ^^

See controler value v2:

formatting link

Reply to
JCH

JCH, are you listening?

This is another example of the nonsense that people think they can get away with when they combine the plant and controller transfer functions and convert the response directly to the time domain. There is no 0-100% limit on the controller so the closed loop transfer function will be happy allowing valves to pump fluid level up and heaters to cool a temperature control system.

Peter Nachtwey

Reply to
Peter Nachtwey

I'd like to get my hands on some of those heaters -- particularly with summer coming on.

If he hasn't listened by now, I'm not sure that he ever will.

Reply to
Tim Wescott

I just don't want anyone to think that what JCH is doing the right way. How about your class? What are you going to teach them? The last thing the world needs is more people thinking their heater systems can cool and gains can be infinite.

Peter Nachtwey

Reply to
pnachtwey

"Peter Nachtwey" schrieb im Newsbeitrag news:ldOdnZ5xS5Dfo8_bnZ2dnUVZ snipped-for-privacy@comcast.com...

Show me your benchmark test solution. Yes, I want to see it. In a way I can compare (time domain). You 'should respond' to what I have written and show me a better solution if you can.

Notes

0.2 ... 1 = 0 ... 100% (e.g. 0.6 = 50%)

All these level controller work, too:

- on/off

- p

- PI

- PID Yes, I know. But could they control better using the defined benchmark test?

See benchmark scheme (step, target and result):

formatting link
That is what I want to know. Nothing else.

Polemic is not the right answer!

Reply to
JCH

On 22 May 2007 00:09:51 -0700, snipped-for-privacy@gmail.com proclaimed to the world:

You have been very vigilant so far.

Reply to
Paul M

Please show me your solution for the benchmark test I defined in:

formatting link
If you have a different 'time domain solution' I would think about it. Putting hands on something is NOT a solution I could appreciate. Sorry.

Reply to
JCH

Newsbeitragnews:ldOdnZ5xS5Dfo8_bnZ2dnUVZ snipped-for-privacy@comcast.com...

result):

formatting link

Doesn't it bother you when your results don't make sense? It isn't all math. It is mostly the reality of phsyics. Math is just a tool we use to understand physics.

I have posted links to these files before. The files were generated in response to others having the same questions. They are in my newsgroup ( NG ) directory

ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20sigreg-PID%20.pdf

This file was generated for a plcs.net forum. The original poster provided me with real numbers for his real system. Notice that the level rises at a steady rate until it gets close to the set point. The PID cannot fill the tank generating a negative control signal as in your example. This is basic. Notice how all the work is displayed, even how I symbollically calculate the gains. I think that much more is learned by seeing the symbolic solution to the gains rather than just the numbers provided by Scilab or Matlab. Those of you that want to split hairs should know I change the formulas a bit when there is a dead time.

ftp://ftp.deltacompsys.com/public/NG/tanklevel.sce

I posted scilab script a month or two ago. You can use this to try different gains and flow rates ( distrubances ). If you run the script you can see how the control output saturates.

Notice that target or jerk filters and feed forwards are not required. The plant and controller are turned into a low pass filter and the response is determined by choosing a closed loop time constant tc.

Peter Nachtwey

Reply to
pnachtwey

When or where did I say heater systems can cool? I never said that.

Can you understand the meaning of: If gain k goes to infinity then x will be u (x=u).

What I stated in Fig. 2:

formatting link
That's polemic. Keep honest.

Reply to
JCH

Sorry, I never before responded to the solutions of your papers. I published a certain task and stated having found a good solution for that. That's all.

Cited:

See benchmark scheme (step, target and result):

formatting link
Note: Tanks have e.g. water inlet and water outlet. I know that. My benchmark test shows that.

Reply to
JCH

At least once a class meeting I remind them that while the analysis is linear, the real systems aren't. So you use the linear approximation to get close to a solution, or to get a solution that's close.

I do keep throwing out hints -- I was just thinking that this week's homework will have an example of treating a nonlinearity (friction in this case) as a disturbance, and using the known magnitude of the discrepancy to predict the worst-case deviation of the real system from the predictions of the linear model.

I _am_ saving the nonlinear analysis for later (or in this case for another class because I only have one quarter). But it's there in my book, and in a form that can be handled by someone with greasy hands and a pencil to do the math, instead of a form that requires access to a university math department and a super computer or two.

Note that I'm not dissing simulation here, or higher math: they're both excellent tools. But without understanding the underlying issues simulation is just a quicker way to fart around in the lab until you stumble on something that works on that day, at that temperature, with that particular choice of components. You need the understanding to guide the simulation, and to understand the results. On the other hand, for most people the higher math is a bar across the door rather than a window to let the light in. For those who do understand the math one can easily get lost in the beauty of it and forget to connect it back to the physical reality of the system that you're trying to get working.

Reply to
Tim Wescott

Newsbeitragnews:ldOdnZ5xS5Dfo8_bnZ2dnUVZ snipped-for-privacy@comcast.com...

result):

formatting link

Doesn't it bother you when your results don't make sense? It isn't all math. It is mostly the reality of phsyics. Math is just a tool we use to understand physics.

I have posted links to these files before. The files were generated in response to others having the same questions. They are in my newsgroup ( NG ) directory

ftp://ftp.deltacompsys.com/public/NG/Mathcad%20-%20sigreg-PID%20.pdf

This file was generated for a plcs.net forum. The original poster provided me with real numbers for his real system. Notice that the level rises at a steady rate until it gets close to the set point. The PID cannot fill the tank generating a negative control signal as in your example. This is basic. Notice how all the work is displayed, even how I symbollically calculate the gains. I think that much more is learned by seeing the symbolic solution to the gains rather than just the numbers provided by Scilab or Matlab. Those of you that want to split hairs should know I change the formulas a bit when there is a dead time.

ftp://ftp.deltacompsys.com/public/NG/tanklevel.sce

I posted scilab script a month or two ago. You can use this to try different gains and flow rates ( distrubances ). If you run the script you can see how the control output saturates.

Notice that target or jerk filters and feed forwards are not required. The plant and controller are turned into a low pass filter and the response is determined by choosing a closed loop time constant tc.

Peter Nachtwey

Reply to
pnachtwey

I guess you posted this accidently twice. I anwsered it already. Or didn't you receive my answer (22. May 2007 17:40).

Reply to
JCH

Why? Peter's comments, and my joke, are about your controller output taking on absurd values. I don't have to go past looking at your controller output on the first page of your presentation to know that you're being unrealistic, and if you aren't speaking about real things I see no reason to jump through hoops of your making.

Your control output works just like all valves and most pumps don't: it's bilateral. It's as if you expect to jump into your car, put it in gear, pull up on the accelerator, and go backwards. That can happen in mathemagic land, but here in the real world things simply don't work that way.

  • your accelerator is restricted to making the motor go faster -- below a certain point it stops doing anything. To be more precise, your accelerator is restricted to making the motor try harder, and is restrained from allowing it to stall out.
  • your brake pedal is restricted to making your car go slower -- you hope.
  • Valves can be opened, partially opened, or closed. Once they're closed they can't be opened in reverse to make the liquid flow up hill.
  • I suppose I could build a perverse sort of pump that would pump backwards if I spun it backwards, but nearly all economically feasible pumps have an input and an output, and they only pump in the given direction.
  • Systems that don't saturate the control output are trivial. You show your control output as a decaying exponential, with no flat- topping where your valve is fully opened or your pump is running flat out. Valves that only open so far, motors that can only deliver so much torque without burning, and can only go so fast without flying apart, heaters that can only deliver so much power without tripping a breaker or burning themselves up -- that's _real_ control.

Linear systems are a Platonic ideal that we use to make the math manageable, but we have to step back from reality to make the math work. The price we pay for this separation from reality is that the linear analysis is _wrong_; before you use it for real you have to correct for the wrong parts so you can use the right parts.

Reply to
Tim Wescott

Have you ever heard of 'Split Range Control'?

formatting link
In real life: e.g. Controller output 4 ... 20 mA

2 Valves operating

Valve 1 Water Inlet 12 ... 20 mA (closed to fully open) Valve 2 Water Outlet 12 ... 4 mA (closed to fully open)

It's simple, isn't it?

In chemical reaction plants you have the same principle:

Heating with valve 1 and then cooling with valve 2. It's a bit more difficult because of extreme nonlinearity. All I planned and tuned work fine.

Reply to
JCH

I have, and I've contemplated using it. So let's forget the control going negative part, and concentrate on the lack of any limits to your control effort.

Here's an experiment to try:

Let's say that your car will decelerate at 10m/s^2 when you push the brake pedal all the way to the floor (it's a really nice car). Let's say that the distance the pedal moves is 10cm.

Now let's say that you're traveling toward a brick wall at 180km/hour, and you want to stop before you hit it, to avoid damage to you and the car.

By my reasoning, you'd have to apply the brakes at least 125 meters short of the wall, or get a nasty bump.

By your reasoning you could wait until you're only one meter away from the wall, depress the pedal 125cm, and come to a smooth stop.

To you, the following are just insignificant details: * the pedal will only go 10cm, * if it could go farther it wouldn't make any difference because the tires would be locked, * your leg isn't that long, * and if it were, and the pedal would go that far, and the tires could grip, then the car would decelerate at 125g and you'd be jelly on the windshield.

Because, aside from these minor details, the math works!

Note: If you try this experiment in reality, please leave me on the curb -- I don't take extreme deceleration very well.

Reply to
Tim Wescott

...

Just for reference, 1 g = (very nearly) 22 mph/sec.

Jerry

Reply to
Jerry Avins

Oh, but you have. Not in words but by your equations. It is sad that you still don't realize that you do not have limits for you controller and assume the output can be +/- infinity. In your latest example there are no limits to keep the controller from generating a negative output which implies the valve should some how increase the level in the tank or, in the case of heaters, cool the systems.

Show us the output limits on the controller!

Peter Nachtwey

Reply to
Peter Nachtwey

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.