Delta V discrete PID algorithm (z-transform)

Dear all,

We have a control problem not solved for 30 years, because of the very fast and peculiar characteristics of our process. We can’t make any kind of disturbance test in this control loop, because of the risk of plant trip. In order to try to solve this problem we’ve made a process model, based on phenomenological modeling allowing us to test control strategies and different tuning parameters. This process model has very good fit to actual data and we tested some control strategies with standard discrete PID algorithm in Matlab, with encouraging results, when we adjust this control loop to run in 100 msec execution time

But, for our surprise, we could not reproduce the behavior of Delta V PID algorithm in Matlab. If we collect PV and SP data and try to apply PID algorithm we could not reproduce OUT data behavior. Since in Delta V  online manual there is not the discrete algorithm of PID function (difference equation), we used a standard trapezoidal discretization algorithm of the continuous PID algorithm shown in the Online manual, with no success. 

As the major DCS vendors supply the discrete PID algorithm of their systems,  we supposed Emerson could also supply Delta V PID discrete algorithm, but they said that they can´t give us this kind of information.

 So, even with a very good process model we can’t use it, because we can’t guarantee the tuning data are suitable to the real process response we need.

 Can you provide or recommend some reference of the discrete algorithm of Delta V (we are in version 12.3)? Or some implementation of it in Matlab?

 Thanks.

  • I'm not familiar with the term Discrete PID algorithm. But from what I can tell from a little Googling, it is a difference equation, also known as the "Digital Implementation" of the continuous algorithm. And this is what you need to program the algorithm in a computer program, or Matlab, in this case.

    As a control system user, I've never needed to know what the difference equation actually looks like in our controllers, and I would guess that this is considered intellectual property that Emerson will not provide.

    I worked with a Grad Student last year who wanted to implement various types of oscillation relays he was developing in Matlab into DeltaV. The Matlab models did not make allowance for all the serial components that connect the process: Transmitter, AI Channel processing, IO bus latency, Output device lag.

    Does your phenomenological model take into account all this signal processing? Some of these are configurable, such as the Transmitter Damping, or the AI Channel Anti Aliasing Filter, and of course the Control Element tuning set for the valve positioner (or other device). The PID sees these as part of the Process. If your model was derived from the actual Control System PV and OUT values of the PID, then I would think it does include these. But if not, the PID block in Matlab would not respond the same as the control system PID block, even if it was perfectly implemented.

    Good luck

    Andre Dicaire

  • The DeltaV system uses a “positional” PID implantation of the PID algorithm instead of the “incremental” or “velocity” implementation. The positional algorithm uses a positive feedback filter (first order time constant =reset time) to create the integral action. The default PID Form is Standard but a Series Form can be selected. Incremental and Positional PID’s should respond the same if the OUT is not constrained. The Form of the PID and tuning units in Matlab must be taken into account when converting to DeltaV PID (or any other system). If you can provide the Matlab PID details and tuning parameters I will show how we would convert them.
  • Flavio,
     
    Here is one way you might test your process model against a real DeltaV control algorithm, and experiment with tuning etc.
     
    I can’t remember if Matlab supports OPC but if it does, and if you have a stand-alone DeltaV Simulate, you could run the model in Matlab, connect the model output to the PV of the DeltaV PID using OPC, and likewise connect the PID output to the model.  If latency is an issue, you could run both model and PID 10 times slower than the real plant – this should also let you see any short-period behaviour better using the DeltaV historian and trend system.  Some years ago I used this method to test a vendor’s proprietary model-predictive controller – although this time the process model was in DeltaV Simulate on a laptop and the controller in another laptop.
     
    Best regards,
     
    Neil Brown
     
  • In reply to neilrbrown:

    The DeltaV PID block is a full-featured industrial PID, not the simple & generic PID supplied in MATLAB. If you continue trying to model the controls in MATLAB, at a minimum you should turn on the anti-windup feature in MATLAB and add the bumpless transfer logic recommended in the MATLAB Help.

    I suggest that the digital implementations printed by other control vendors are incomplete--showing only the basic PID and missing the alternate control structures, gain scheduling, and many other useful features of the modern controller. Asking for the full listing of that is like asking Microsoft for their source code whenever you make an MS-Excel spreadsheet.

    However, Neil's suggestion is more relevant since your plant DCS is DeltaV. DeltaV Simulate faithfully reproduces the features of all DeltaV blocks in my experience, and is very useful for a full loop simulation. So your new path should be to convert the MATLAB process model to a process model in DeltaV. As Andre pointed out, you can include the AI and AO blocks. Since your process model fits your plant data then I would hope the model already includes realistic behavior of the control valves and transmitters.

    You can do this on a DeltaV Simulate standalone workstation if you have such (for example, some plants have a separate network for operator training). However, if allowed, you can also do this on your regular DeltaV system by creating a new area and making sure that you don't connect to any real I/O.

    Emerson has a team of Control Performance specialists who frequently solve in a few hours the "difficult process" control problems that the plant struggled with for months or years. Emerson's EnTech Toolkit can model complex process dynamics and its controller library (among many makes and models) includes several useful features of DeltaV PID. So if you feel that an expert consultant might help you get to the solution faster, please contact your Emerson Local Business Partner or Field Sales Office.
  • In reply to Andre Dicaire:

    Hi Andre,
    In matlab you should define which kind of step calculation use, because all of calculation are incremental. So we defined for each component, including transmitter damping, AI filter, etc. this behavior. I will check again.
    Thanks for your time and answer.
    Flavio
  • In reply to neilrbrown:

    Hi Neil,
    That's a great suggestion! I will check if our Matlab license has OPC connection and try to do it, if so.
    Best regards,
    Flávio
  • In reply to Mark Coughran:

    Mark,
    Some other DCS vendors provides the discrete PID algorithm without fear, including their anti-reset windup strategy, AI filter, etc., directly in user manual. And we can use this information to create high fidelity models, even using Excel Speadsheet, since all discrete calculation is there.

    I think PID algorithm should not be so secret because the "source code" is known (or the continuos PID algorithm in BOL is not what Delta V really do?). But if Emerson thinks other way, what can I do?

    Neil's suggetion is very good. And I will check how to do it (it depends of our Matlab license, OPC communication, etc.).

    I also asked Emerson about this problem since when we install Delta V system in 2011 (before it, this area was controlled by several Smar CD600 multi loop controllers), but unfortunately they hven't shown any possible solution to us. I will ask them again.

    Thank you for the answer.
  • In reply to James Beall:

    James,

    Bellow is the Algorithm we made trying to reproduce Delta V PID behavior:

    The first gain is scale adjustment (0 to 6000 rpm). Then we made a discretization of BOL algorithm using the tunning parameters.

    I may be wrong, but we made this discretization to be "positional" PID, since we calculate the MV value each cycle and not only MV variation, also the discrete filter (Show as discrete-time inegrator in drawing).

    Of course there is something wrong (otherwise I would not asking you) but we cannot find the error in this continuous to discrete translation.

    Thank you,

    Flávio

  • In reply to Flavio Issa:

    Flavio,
    I see that the Matlab version does not have the derivative filter that the DeltaV PID (and most other commercial PID's) have. In DeltaV, a first order filter with time constant equal to alpha*Derivative tme is applied to the signal that is used in the derivative calculation. For DeltaV, the default Alpha is 0.125. Also, there is a slight modification to the integral action if the Reset Time is close to the value of the execution period of the PID algorithm. I see you have a Reset Time of 2 seconds, is t execution time of your PID in Matlab 250 mSec or less (faster)? If you want to investigate this in more detail, I suggest we take this off-line where we can get our Emerson technology team involved if needed. Feel free to contact me at james.beall@emerson.com .
    James