S7200 Siemens PID Control with dead time

Espartaco

Member
Join Date
Mar 2011
Location
Perú
Posts
6
Hello to all, I need its aid. I need to implement a control of pH for acid water neutralization and will use a PLC Siemens S7200, the problem is that the process contains an dead time of 250 seconds (which I cannot avoid) worries which me in the development about the control.
So great what can be the problem of 250 seconds of dead time?
Somebody of you has some experience on the matter?

Thank You very much for your answers.
Greetings
Espartaco

 
Wow, you have two BIG problems. First, pH control is not linear and the second is dead time. A lot depends on how fast the system must respond to changes in the pH set point or in disturbances of the pH level. The dead time sets a lower limit on how tightly the PID can be tuned using normal methods found on www.controlguru.com. First you need to change the controller gain as a function of the pH and second you need to use a Smith Predictor.
 
Thank You Peter for your answer, it is correct, control of pH is not lineal, but i have controls PID working correctly, but now i need to realize a control with dead time (250 seconds). Is possible to realize a predictor smith with PLC Siemens S7-200?

Thank You very much

Espartaco
 
Yes, it would take a bit of work. The tough part is that you need to have a model of how your system responds so that you can predict what is going to happen. The modeling prediction part is the hard part.

I am trying to simulat a system right now with a 4 minute dead time. I can control it but the response is so slow.
 
Last edited:
Dear Peter, thanks to answer.
I understand that you have simulated the process of pH control, having considered an dead time of 250 seconds, and that the answer is slow, I suppose that you value of your Kp gain was minor who one, and the value of your Ki was between about 200 and 400 seconds (PID standard). In the PLC S7200 using the tuning panel encounter that I can modify the time of sampling of algorithm PID, I consider that perhaps increasing this time in 25 seconds I can hide a little to the dead time of 250 seconds. What do you think?...
I will be in the plant within about 15 days and i want to apply the Ziegler and Nichols method, producing a unitary step in the process and registering the PV in the pH sensor.
The method of Z&N works correctly for processes with large dead time? , you have some experience of this? , in addition it would want to know that type of PID used Z&N to find its relations: series, parallel, standard?. I am searching the type of PID that uses the PLC Siemens S7-200 CPU 224.
Thank You very much
Your friend from Perú
Luis
 
Dear Peter, thanks for your answer.
I understand that you have simulated the process of pH control, having considered an dead time of 250 seconds, and that the answer is slow, I suppose that you value of your Kp gain was minor who one, and the value of your Ki was between about 200 and 400 seconds (PID standard). In the PLC S7200 using the tuning panel encounter that I can modify the time of sampling of algorithm PID, I consider that perhaps increasing this time in 25 seconds I can hide a little to the dead time of 250 seconds. What do you think?...

The process that we have is simple, we added dissolved lime in an open channel that takes acid water and after 250 meters we measured the pH with a sensorial mark Hatch Lange, the dissolved lime is recirculating in an independent pipe and a motorised proportional valve will realize the injection of lime to the acid water torrent.

I will be in the plant within about 15 days and i want to apply the Ziegler and Nichols method, producing a unitary step in the process and registering the PV in the pH sensor.
The method of Z&N works correctly for processes with large dead time? , you have some experience of this? , in addition it would want to know that type of PID used Z&N to find its relations: series, parallel, standard?. I am searching the type of PID that uses the PLC Siemens S7-200 CPU 224.

Thank You very much
Your friend from Perú

Luis

P.D.: Sorry for my bad english.
 
Dear Peter, thanks for your answer.
I understand that you have simulated the process of pH control, having considered an dead time of 250 seconds, and that the answer is slow, I suppose that you value of your Kp gain was minor who one, and the value of your Ki was between about 200 and 400 seconds (PID standard).
There aren't standard controller gains. My temperature simulator assumes the system is a SOPDT or second order+dead time. I set the dead time to 4 minutes. The limits the closed loop time constant to 4 minutes. It takes 9-10 closed loop time constants for the PV to reach the PV. If that is fast enough then you can use the simple IMC method found on the www.controlguru.com site.

In the PLC S7200 using the tuning panel encounter that I can modify the time of sampling of algorithm PID, I consider that perhaps increasing this time in 25 seconds I can hide a little to the dead time of 250 seconds. What do you think?...
No, it doesn't change the physics of what is going on. My loop time is 1 second. Every 6 seconds,0.1min, should be good.

I will be in the plant within about 15 days and i want to apply the Ziegler and Nichols method, producing a unitary step in the process and registering the PV in the pH sensor.
It won't work. ZN is a method to use when you don't want to understand what is really happening. ZN will not work.

The method of Z&N works correctly for processes with large dead time?
It depends on the dead time relative to the other time constants and how fast the system needs to respond to disruption.

, you have some experience of this?
Yes, but I can calculate the PID gains if I now the plant gain, time constants, dead times and linearity. I don't need to guess because I make the effort to model the system.

I am away now. Next week when I get back I will have to try the ZN method to see how it does. I know that using my method the PV reaches the SP in about 10 times the dead time with little or no overshoot.
 
I haven't done anything because I had to simulate a dam gate that suffers from slip/stick oscillations and this fell off the radar screen.

Did you try ZN? I bet it didn't work.
Can you reduce the dead time by moving the pH detector or is that long pipe required for mixing?

Can the lime be premixed so it doesn't need a long tube ( dead time ) for mixing?

You are given a difficult task.
 
PID dead time issues

What you need to do is change your sample time to 250 seconds.

Before you say WHAT THE HELL!! let me explain . . . . 👨🏻‍🏫

Basically when a controller algorithm makes a change to the manipulated variable to control a given process, there is no point in the controller re-evaluating that process and making anymore changes untill the result in the process from the last manipulation can be evaluated. The inherent properties of what you are doing need to be understood and accepted.

After the dead time (sample time ... and you can allow more than 250 seconds to make sure), the controller can then take another sample of the process and see what effects the last change made and make it's new output accordingly, and this is exactly what will happen with a 250 second sample time.

I have had similar experience with chlorine dosing systems, in which I had to wait 15 minutes for sample water to return before I make anymore adjustments. Of course with shorter sampling times the controller will still manipulate the process however the logic in this approach is a little silly (or just plain wrong!) because the controller tries to correct for something that might not be the case! Meaning the correction it made previously might be suffice, it just doesn't know it yet. What this results in what is called "hunting" whereby the system constantly overshoots and undershoots and it must be avoided at all costs.

On one particular system I worked on we had to dose into a 200kL tank. After collating data over a period it become apparent it took 12 hours (half a day!) for a new dose speed to mix thouroughly in the tank and level out at a steady result to be seen at the controller. For this purpose as that sort of sample time cant be done I needed to write my own PID algorithm (it's actually easier than you think, and you can then customise any which way you want! 🍺) One other option would be to trick the controller by letting the PID make a change, then normalise the output (between 0.0-1.0) and write this to the manual PID setpoint and slip it onto manual, then later down the track slip the PID call back into auto and manipulate your loop table to suit. . . however if your going to this you might as well write your own custom PID algorith!🔨

With regards to the non-linear response of the PH control, what I would do is manipulate your gain setting (it's called adaptive gain) by writing to your PID loop table in the user program dependant on the current PH value. The best way to do this would be to plot the curve of PH response in a microsoft excel spreadsheet, from here you could inset an 'x' 'y' scatter plot and the insert a polynomial trendline and have excel display the equation (3rd order polynomial should be suffice). With this equation in hand you should then find your best gain setting at a stable part of the plot, then multiply this by your polynomial depending on you PV (Ph value) and write this dynamically to the loop table within your plc code (user program).

The loop table memory location for gain is offset 12 bytes from where you define the start of the loop table from the PID wizard. Remember the Gain value is the only value you will need to adjust, as the integral and derivitive aspects of a PID algorithm are both affected by your gain setting.

note** this is not true the other way).
PID output =
P(error*gain) +
I(error*gain . put onto system bias over the integral time) +
D(differnce from previous sample to current sample mltiplied by projecting a resulted error over the derivitive time multiplied by gain)+
current syatem bias value.
Note Gain is common to them all!! (y)

I recently wrote a PID routine of a hydro-pneumatic booster whereby I calculated the polynomial equation of a pump curve for given flow response at varying pressure, therefore I was able to "forward feed" specific information to the PID "feeback" trim routine.

I hope some of this banter helps, there are countless ways to manipulate things to your advantage, the key is always intimately understanding the process you are trying to control and acepting all of it's inherant properties that you cannot change, before setting about brainstorming the best methods to enable you to best control those that things you can change. You also need to know what is an acceptable outcome and what isn't.

If you need any clarification on anything let me know.

I have attached a couple examples of how to work out polynomials in microsoft excel and how they are programmed in the s7-200 with the hydro-pneumatic done.

I can give examples of custom "dead time" algorithms if required as well as PID routines with long sample times. Just let me know.

Cheers

View attachment 17187

View attachment 17188 🍻
 
Last edited:

Similar Topics

Hi Can anyaone please help..? I need to bild a line following robot it will be steered and driven by pneumatics, I need to be sent into a...
Replies
5
Views
2,443
hey guys here first time for me in this awesome forum actually i have S7-200 connected to Winview HMI and HMI project file has lost and broken...
Replies
0
Views
600
Hi everyone I hope someone would be so kind to help me with this issue, I have trouble finding the way to declare a value which I want to be my...
Replies
1
Views
1,279
Hi everyone Does anybody know if it's possible to connect a termopar to an analog input directly? being more specific Siemens S7-200 analog input...
Replies
2
Views
1,683
Hello everyone, I am quite new both in this forum and in the PLC area. I am happy I found this great forum and hope one day I can help with my...
Replies
3
Views
2,236
Back
Top Bottom