How to Tune PID Controllers on Self-Regulating Processes

How to Tune PID Controllers on Self-Regulating Processes

This guest blog post was written by James Beall, a principal process control consultant at Emerson Process Management with 34 years of experience in process control. Beall is a member of AIChE and ISA, and chair of ISA committee ISA75.25, Control Valve Dynamic Testing. Click this link to read the first blog post in this loop tuning series.

 

The two most common categories of process responses in industrial manufacturing processes are self-regulating and integrating. A self-regulating process response to a step input change is characterized by a change of the process variable, which moves to and stabilizes (or self-regulates) at a new value. An integrating process response to a step input change is characterized by a change in the slope of the process variable. From the standpoint of a proportional, integral, derivative (PID) process controller, the output of the PID controller is an input to the process.

The output of the process, the process variable (PV), is the input to the PID controller. Figure 1 compares the response of the process variable to a step change of the PID controller output for a self-regulating process and for an integrating response.

Figure 1. Response of the PV to a step change of the controller output for a self-regulating and an integrating process.

Self-regulating responses are very common in the process industry. Many flows, liquid pressures, temperatures, and composition processes are self-regulating. In the first blog post in this series, I presented techniques for tuning a PID controller used on an integrating process. In this post, I will present a method to tune PID controllers on self-regulating processes.

Challenges

Regardless of the tuning of the PID controller, the control performance is limited by the performance of the instrumentation and final control element. Before tuning a controller, it is helpful to have an understanding of the process and to verify the performance of the instrumentation and final control element, usually a control valve. The control valve should have a small deadband and resolution—another topic of discussion! It should have an appropriate and consistent flow gain. It should have a response time that is appropriate for the process performance requirements. ANSI/ISA-75.25 and the EnTech Control Valve Dynamic Specification V3.0 are excellent sources of information on this topic. Also, the control scheme should be reviewed to make sure it is an appropriate, linear, control scheme for the application. Finally, the interaction of the control loop to be tuned with other control loops should be reviewed and understood. The desired “aggressiveness” of the loop tuning should be based on the interaction of the control loop with other loops and the consequences of movement of the controller output.

Tuning for a self-regulating process

A tuning methodology called lambda tuning addresses these challenges. The lambda tuning method allows the user to choose the closed loop response time, called lambda, and calculate the corresponding tuning. The lambda closed loop response time is chosen to achieve the desired process goals and stability criteria. This could result in choosing a small lambda for good load regulation, a large lambda to minimize changes in the controller output and manipulated variable by allowing the PV to deviate from the set point, or somewhere in between these two extremes. More importantly, the lambda of the loop can be used to coordinate the responses of many loops to reduce interaction and variability.

Lambda tuning for self-regulating processes can result in a closed loop response that is slower or faster than the open loop response time of the process. Though lambda is defined as the closed loop time constant of the process response to a step change of the controller set point, the load regulation capability is also a function of the lambda of the loop. The response to a step set point change and a step load change for a self-regulating process response with lambda tuning is shown in figure 2.

Figure 2. Response of lambda tuning for a self-regulating process for a step set point and a step load step change.

Self-regulating process responses typically include dead time and can usually be approximated by a “first-order” or “second-order” response. This article describes the lambda tuning procedure when the process response can be approximated by a first-order-plus-dead-time response. The lambda tuning for a second-order-plus-dead-time response will be covered in future articles.

Procedure

The lambda tuning method for self-regulating processes involves three steps:

  1. Identify the process dynamics.
  2. Choose the desired closed loop speed of response, lambda.
  3. Calculate the required PID tuning constants.

Figure 3 shows the dynamic parameters of a self-regulating, “first-order-plus-dead-time” process, which include dead time (Td), in units of time; time constant (tau), in units of time; and the process gain (Kp), in units of percent controller PV span/percent controller output span. Typically several step tests are performed; the results are reviewed for consistency; and the average process dynamics are calculated and used for the tuning parameter calculations. If the controller output goes directly to a control valve, any significant deadband in the valve will reduce process gain if the output step was a reversal in direction. If the controller output cascades to the set point of a “slave” loop, the slave loop should be tuned first.

Figure 3. Open loop process dynamics of a first-order, self-regulating process include dead time, the time constant, and process gain. T98 is the time required for the process to reach 98 percent of its final value.

The next step is to choose the lambda to achieve the desired process control goal for the loop—the allowable stability margin and the expected changes in process dynamics. A shorter lambda produces more aggressive tuning and less stability margin. A longer lambda produces less aggressive tuning and more stability margin. It is not uncommon for the process dynamics, particularly the process gain, to vary by a factor of 0.5 to 2. If testing during different conditions reveals that the process dynamics change significantly, then an additional margin of stability is required. Or, the process response can be “linearized” or adaptive tuning can be used.

If the potential change in process dynamics is unknown, starting with lambda equal to three times the larger of the dead time or time constant will provide stability even if the dead time doubles and the process gain doubles. If it is desirable to coordinate the response of loops to avoid significant interaction, the lambda of the interacting loops can be chosen to differ by a factor of three or more. For cascade loops, the lambda can be chosen to ensure the slave loop of the cascade pair has a lambda 1/5 or less of the master control loop.

The lowest recommended lambda for a first-order-plus-dead-time self-regulating process is equal to the dead time, although this provides a very low gain and phase margin. Thus, a smaller increase in the dead time or process gain can cause instability of the loop.

From a stability standpoint, there is no upper limit on the lambda. If the lambda is not chosen based on a coordinated response, a good starting point for stability is:

The tuning performance can be monitored for a time period and adjusted to be a shorter or longer lambda as needed.

The final step is to calculate the tuning parameters from the process dynamics. Care should be taken to use consistent units of time for the dead time and the lambda. For a first-order-plus-dead-time process response (no significant lag or lead), the controller gain and reset times are calculated with the following equations. The derivative time is set to 0. These equations are valid for the standard (sometimes called ideal, noninteractive) and series (sometimes called classical, interactive) forms of the PID implementation. Note that only the controller gain changes as lambda (λ) changes. The integral time remains equal to the time constant regardless of the lambda chosen.

Example

Consider the steam pressure controller shown in figure 4. The pressure controller, PIC-101, manipulates a properly sized control valve that has a high-performance digital positioner.

Figure 4. Process and control diagram for a reboiler shell steam pressure control.

Figure 5 shows a step test of the pressure controller to identify the process dynamics. The process gain is %PV/%OUT; the dead time is 5 seconds; and the time constant is 20 seconds.

Figure 5. Open loop step test and analysis of one step response.

 

Because there are no “loop response coordination” requirements, the initial lambda is chosen to be 3 * (larger of dead time or time constant) = 3*20 seconds = 60 seconds.

Now, the tuning can be calculated with the lambda tuning rules.


In preparation for being able to make the tuning more aggressive if the control loop is consistent over the required operating range, the tuning can be calculated for shorter values of lambda. The following table shows the tuning for different values of lambda. Note that the integral time remains the same for all choices of lambda.

Figure 6 shows the response to a step set point and a step load change for each of the lambda values in the table. Note that the tuning is stable for much shorter lambda values than the starting point of 3 * (larger of dead time or time constant). However, this is with perfectly constant process dynamics in a simulator. Additional tests on a real process, at different operating conditions will help determine the consistency of the process dynamics.

Figure 6. Response of self-regulating process for a step set point and step load change with different lambda values.

Meeting process goals

Most published PID controller tuning methods are designed for optimum load regulation, not necessarily optimum process performance. The lambda tuning method provides the ability to tune the PID controller to achieve process performance goals, whether they are maximum load regulation or a coordinated response to other loops. Note that the lambda tuning method for integrating processes can also be used for a lag dominant, self-regulating process to achieve excellent load regulation. This technique and tuning for more complex dynamics will be covered in a future article in this series.

Click this link to read the first blog post in this loop tuning series.

About the Author
James Beall is a principal process control consultant at Emerson Process Management with more than 34 years of experience in process control. He graduated from Texas A&M University with a BS in electrical engineering and worked for Eastman Chemical Company until 2001. He has worked at Emerson since 2001. Beall’s areas of expertise include process instrumentation, control valve performance, control strategy analysis and design, advanced regulatory control and multivariable, and model predictive control. He has designed and implemented process control improvement projects in the chemical, refinery, pulp and paper, power, pipeline, gas and oil, and pharmaceutical industries. Beall is a member of AIChE and ISA, and chair of ISA committee ISA75.25, Control Valve Dynamic Testing. He is a contributing author to the Process/Industrial Instruments and Control Handbook, 5th Edition.

Connect with James:

LinkedInEmail
 

A version of this article originally was published at InTech magazine.

New Integration Architectures for Federated Systems

New Integration Architectures for Federated Systems

This guest blog post was written by Dennis Brandl, chief consultant for BR&L Consulting, specializing in manufacturing IT and flexible manufacturing solutions.

 

Most manufacturing environments are federated systems. In manufacturing, the term federation describes a collection of devices and software from multiple vendors that must work together to support business and operational processes. In theory, integrating federated systems is not too hard. Most devices have some form of communication available, and most software has some method for importing and exporting files, some way to request information, and some way to respond to requests. In practice, there are multiple issues to address to integrate federated systems, including the meaning and format of the exchanged data; the meaning of names, identifiers, and enumeration values; the devices and applications that actually send and receive data; and finally the technologies used for sending and receiving the exchanged data.

Fortunately, a set of standards for federated systems is making the practice of integration easier. The use of OPC UA (Unified Architecture), the ISA-95, Enterprise Control System Integration standard, the MESA B2MML (Business to Manufacturing Markup Language), and message exchange models make integration easier and also change the integration architecture used in manufacturing environments.

The original ISA-95 standard defined an information model for exchanges of information between business systems and manufacturing operations systems. The 2012 release of ISA-95 Part 4: Objects and Attributes for Manufacturing Operations Management Integration, and the planned 2016 release of the equivalent IEC 62264-4 standard, has added information models for data exchange between manufacturing execution systems (MESs), laboratory information management systems, warehouse management systems, tank farm systems, asset management systems, and other manufacturing operations management systems. The MESA B2MML Version 6.0 2013 release provided an implementation of the ISA-95 Part 4 models. The ISO 22400 KPI standard and the MESA KPI-ML Version 1.0 2015 release provide a vendor-independent way to exchange key performance indicator (KPI) information, using a similar structure as ISA-95.

OPC UA was released in 2009. It provides an industrial Ethernet, TCP/IP, and user datagram protocol (UDP)/IP-based, platform-independent, service-oriented communication architecture. It includes the functionality of the original OPC standard but uses standard Internet technology, security, and the ability to handle complex data. OPC UA has been internationalized through the IEC 62542 standards.

When the ISA, OPC Foundation, IEC, and MESA standards are combined, they provide a new capability for federated system integration and a new integration architecture. In traditional architectures, devices are “mostly dumb,” at least in respect to communications. They only respond to requests for information across a dedicated fieldbus, or they may have hardwired connections to controllers. Controllers are fieldbus masters that typically “poll” the devices on a regular schedule. The controllers usually communicate to higher-level systems, such as human-machine interfaces and data historians. Most software applications also “poll” for data on a regular schedule. Networks are optimized for operating in master-slave configurations, and there is often only a single master allowed on each network segment. Traditional architectures resemble pyramids, with the levels of the pyramid generally corresponding to the ISA-95 activity levels, as illustrated in figure 1. This pyramid architecture and segmentation into ISA-95 layers is just an artifact of technology limitations. Limited CPU capability, networking capability, and memory in devices and controllers have limited the architecture choices to hierarchical networks of devices and controllers.

Figure 1. The traditional control pyramid

Faster networks, smarter devices, and a desire for interoperable software applications is driving a new architecture. In the new architecture, every device is a data publisher and exposes selected information using standard exchange models. Publish/subscribe protocols, such as those in the OPC UA Part 4 specification and the IEC 62641-4 standard, and those defined in ISA-95 Part 6: Message Service Model and implemented in the Open O&M specification, eliminate the need for master-slave polling protocols. Software applications and devices become data subscribers. Any application or device can implement functions associated with multiple activity levels.

New architectures are defined as collections of peer-to-peer zones, with zones identified by similar security and communication speed requirements (figure 2). If real-time control is needed among a collection of devices, then they operate within a single zone. If a collection of devices need a common protection policy, then they operate within a single zone. The system architecture is defined by the organization of devices and applications into self-consistent zones with secure communication between zones. Communication between zones is through secure conduits, with the selected conduit technology optimized for speed, security, and data complexity requirements. The traditional control pyramid is being replaced by a web of zones and interzone conduits.

Figure 2. Web of multilevel speed and security zones

Functions in multiple ISA-95 activity levels are often implemented in a single zone, and conduits between zones may also operate at more than one ISA-95 level. Single devices and applications may also implement multiple level functions, such as providing control, monitoring, KPI generation, and historical data collection.

Within a zone there are several options for communication: hardwired, fieldbus, OPC, OPC UA, and message exchanges. The specific speed requirement within each zone dictates the method used. Many companies are moving to OPC UA for intrazone communication when high-speed and tightly coupled processes are needed. Communication across zones also has options for system integration. However, performance between zones is usually less important than support for occasional disconnections, loosely coupled data requirements, and little process integration. Many companies use a secure message exchange system based on B2MML or some other form of XML messages for interzone communications. Table 1 lists the general characteristics of B2MML and OPC UA that are used to help determine the appropriate interzone and intrazone communication model. Table 1 illustrates the differences between the XML queued message-based integration model of B2MML, and the binary connection-based message model of OPC UA, and how they complement each other.

OPC UA devices (servers) expose a “view” of their internal data. The term view is used in the same manner as a database view. It may or may not represent the underlying data structures, but defines the server’s representation of externally accessible data. The OPC UA clients that read the data must understand the defined view. This means that the clients and servers must have high data coupling. A change in the server representation often requires a change in the client systems. This coupling is limited when the data types are simple, such as tagged values, but can be high for complex data, such as analyzers, printers, case packers, and filling machines. OPC UA is also high speed, providing a binary representation of data and relatively short message frames. This makes OPC UA suitable for real-time control and also for synchronized processes. OPC UA works best in situations where the devices are continuously connected and control high-speed synchronous processes.

Software applications using B2MML import and export information using a standard “data exchange model.” This model does not represent the internal data structure of an application, but provides a vendor- and application-independent way to represent commonly exchanged information objects. This results in loose data coupling, because a change in one application does not require changes in other applications. The downside is that B2MML imports and exports are slower and are usually performed using a queued message exchange system, such as an enterprise service bus or manufacturing service bus. Queued message exchange systems provide guaranteed message delivery at the expense of reading and writing messages to permanent storage to handle service disruptions and equipment failures.

The OPC Foundation has recently released the first OPC UA 95 companion specification, which adds ISA-95 object model representations of equipment, personnel, material, and physical assets. This joint effort between the OPC Foundation, the ISA95 committee, and MESA illustrates how these standards can be used together in a federated system architecture. Figure 3 illustrates the types of integration information exchanged in federated systems, and which standards define the associated information models.

Figure 3. Types of data exchanges in federated environments

The following example of a federated environment illustrates how OPC UA handles high-speed, continuous connection requirements, coupled with the lower speed and limited communication throughput of a typical ERP system using B2MML.

Material must be identified in shop floor production. Each material lot’s status (available, not certified, not released) is maintained in the corporate ERP system, and only material that has a status of available may be used in production.

  • Material lots are identified by bar code in the MES as part of a normal workflow. The MES releases the material for use in production only if its status is available.
  • The ERP system cannot be queried for the material status at the rates required for shop floor operations, and the ERP system only publishes material lot status changes on a scheduled basis (every shift).
  • A material cache application is:
    • a subscriber to B2MML material lot information from the ERP system
    • a local cache of material lot statuses
    • an OPC UA server that exposes the OPC UA 95 material models
  • The material cache application maintains the last received status for each material lot and makes it available through OPC UA.
  • The material cache application also subscribes to material lot status changes. It receives published lot statuses from the ERP in a B2MML format and makes the information available in an OPC UA 95 format.

In summary, limitations in network performance, CPU capability, and memory size in devices, controllers, and servers have forced the traditional pyramid control architecture in many facilities. However, faster networks, more powerful and inexpensive processors, and abundant memory enable a more flexible architecture for manufacturing facilities. A new architecture, based on the ISA/IEC 62443 standards of zones and conduits, merged with the OPC UA (IEC 62541), ISA-95 (IEC 62264), and MESA B2MML standards, provides increased flexibility and robust system architectures. Companies implementing the new architecture for federated manufacturing systems will have systems that are more secure, easier to integrate, and easier to update. When considering your new system update or new installation, focus on zones and conduits to develop the new federated system architecture, and look to the ISA and IEC standards for guidance and direction.

About the Author
Dennis Brandl is the chief consultant for BR&L Consulting, specializing in manufacturing IT and flexible manufacturing solutions. He has been involved in MES, batch control, and automation system design and implementation in a wide range of applications over the past 30 years. Brandl is an active member of the ISA88 Batch Control System committee, the ISA95 Enterprise/Control System Integration committee, and the ISA99 Cyber System Security committee. Brandl has a B.S. in physics and an MS in measurement and control from Carnegie-Mellon University, and an M.S. in computer science from California State University.

Connect with Dennis:

LinkedInEmail
 
 

A version of this article originally was published at InTech magazine.

PID Controller Loop Tuning Primer: Working With Integrating Processes

PID Controller Loop Tuning Primer: Working With Integrating Processes

This guest blog post was written by James Beall, a principal process control consultant at Emerson Process Management with 34 years of experience in process control. Beall is a member of AIChE and ISA, and chair of ISA committee ISA75.25, Control Valve Dynamic Testing.

 

The two most common categories of process responses in industrial manufacturing processes are self-regulating and integrating. A self-regulating process response to a step input change is characterized by a change of the process variable, which moves to and stabilizes (or self-regulates) at a new value. An integrating process response to a step input change is characterized by a change in the slope of the process variable.

From the standpoint of a proportional, integral, derivative (PID) process controller, the output of the PID controller is an input to the process. The output of the process, the process variable (PV), is the input to the PID controller. Figure 1 compares the response of the process variable to a step change of the PID controller output for a self-regulating process and for an integrating response.

Figure 1. Response of the PV to a step change of the controller output for a self-regulating and an integrating process.

Level processes typically have an integrating response, the likely exception being when the outflow of the vessel is gravity driven. Other processes can have an integrating response. For example, a “low-pressure, large-volume” gas pressure control application can have an integrating process. Another example of an integrating process is a reactor temperature controller that cascades to a “jacket water inlet temperature difference” controller. This controller controls the difference between the reactor contents’ temperature and the jacket water inlet’s temperature based on the set point specified by the output of the reactor contents’ temperature controller.

Challenges

One of the challenges of tuning a PID controller for an integrating process is that when the integral action of the controller is combined with the integrator function of the process, the control loop will oscillate if the integral action of the controller is “too fast” (i.e., the integral time is too short). It is not intuitive to know when the integral time is too short. Another challenge is that most PID tuning methods for integrating processes do not provide a method to adjust the aggressiveness of the closed loop response. If the controller proportional gain (P) is reduced to make the closed loop response less aggressive, the loop is more likely to oscillate. This is quite the opposite result of when this tactic is used on a self-regulating process.

Tuning for an integrating process

A tuning methodology called lambda tuning solves these challenges. The lambda tuning method allows the user to choose the closed loop response time, called lambda, and calculate the corresponding tuning. The lambda closed loop response time is chosen to achieve the desired process goals and stability criteria. This could result in choosing a small lambda for good load regulation, a large lambda to minimize changes in the controller output and manipulated variable by allowing the PV to deviate from the set point, or somewhere in between these two extremes. Lambda tuning for integrating processes results in tuning that produces a “critically damped,” nonoscillatory response for a step load or set point change (i.e., some oscillation when lambda is less than three times dead time). The response to a set point change and a load change for an integrating response and a PID controller tuned with the lambda method is shown in figure 2.

Figure 2. Response of lambda tuning for an integrating process for a set point and a load step change

Procedure

The lambda tuning method for integrating processes involves three steps:

  1. Identify the process dynamics.
  2. Choose the desired closed loop speed of response, lambda.
  3. Calculate the required PID tuning constants.

Figure 3 shows the dynamic parameters of an integrating process. The dynamic parameters that describe the integrating response are dead time (Td), in units of time, and the integrating process gain (Kp), in units of percent PV span/time unit/percent output span. Note that the process variable can have a nonzero initial slope when performing the step test to measure the process dynamics. Typically several step tests are performed; the results are reviewed for consistency; and the average process dynamics are calculated and used for the tuning parameter calculations. If the controller output goes directly to a control valve, any significant dead band in the valve will cause reduced process gain if the output step was a reversal in direction. If the controller output cascades to the set-point point of a “slave” loop, the slave loop should be tuned first.

Integrating process gain, Kp = (final slope – initial slope)/ Δ%OUT
Figure 3. Identify the process dynamics of an integrating process.

The next step is to choose the lambda to achieve the desired process control goal for the loop. If the goal is the best load regulation, choose a shorter lambda. If the goal is to absorb variability in the vessel by allowing the level to vary and lessen the movement of the controller output and manipulated variable, then choose a longer lambda. A shorter lambda produces more aggressive tuning and less stability margin. A longer lambda produces less aggressive tuning and more stability margin. The low limit on lambda for an integrating plus dead time process (no lag or lead in the response) is equal to the dead time, although this provides a very low gain margin and phase margin. A more reasonable low limit on lambda is three times the dead time. Care should be taken to make sure the dead time does not increase under any other conditions if the lambda is set equal to the dead time. From a stability standpoint, there is no upper limit on the lambda. However, the lambda must be fast enough to keep the process variable within the allowable process deviation (APD) for the maximum load disturbance (MLD). The required lambda can be estimated with equation 1, subject to the minimum limit on lambda. Note that the time units of lambda will be the same as the time units used for the integrating process gain, Kp.

This formula can be used regardless of whether “tight” control is desired, to provide good load regulation, or “averaging” control is desired, to reduce variability of the manipulated variable by reducing the controller output movement.

The final step is to calculate the tuning parameters from the process dynamics. Care should be taken to use consistent units of time for the integrating process gain, the dead time, and the lambda. For a pure integrator plus dead time process (no significant lag or lead), the controller gain and reset times are calculated with the following equations. The derivative time is set to 0. These equations are valid for the standard (sometimes called ideal, noninteractive) and series (sometimes called classical, interactive) forms of the PID implementation. Note that both the controller gain and integral time change as lambda (λ) changes.

Example

Consider the distillation column feed storage tank level control process in figure 4. The level controller, LIC-1, output is cascaded to the set point of the column feed flow controller, FIC-2. FIC-2 has been properly tuning and responds in a nonoscillatory manner with a closed loop response time, lambda, of 6 seconds. It is desirable to minimize the changes in the column feed rate by using the capacity of the feed tank to attenuate the transfer of the variability of the reactor flows into the tank to the flow out of the tank, which is the feed flow to the distillation column.

Figure 4. Process and control diagram for distillation feed tank system

 

Figure 5. Analysis of a controller output step test on a feed trunk level

Figure 5 shows a step test of the level controller to identify the process dynamics. The integrating process gain is –0.000216 percent level/second/percent out, and the dead time is about 30 seconds. Based on the process goals, the APD selected for the level PV is 30 percent. It is often appropriate in these applications to use a fraction of the nominal controller output as the MLD. The idea is to find the MLD for which the controller is expected to keep the PV within the APD without operator intervention. Load changes larger than the chosen MLD are expected to require operator intervention due to other consequences. After reviewing the process, the maximum load disturbance is chosen to be 50 percent of the nominal 80 percent controller output, or 40 percent. This represents the loss of two reactors simultaneously. The required lambda and the resulting tuning parameters using the lambda tuning method are calculated from equations 1, 2, and 3, respectively. These values are shown below.

Lambda = 6,900 seconds
Integral time = 13,830 seconds
Controller gain = 1.34

Simulation of the process response to a step load disturbance equal to 40 percent controller output (MLD) confirms that the recommended tuning will keep the level deviation (APD) to less than ±30 percent and that the response is nonoscillatory. The calculated tuning was installed in the level controller, and the system performed as desired.

Meeting process goals

Tuning PID controllers for integrating or near-integrating processes is counterintuitive when compared to tuning for self-regulating processes. Most published PID controller tuning methods for integrating processes are designed for optimum load rejection, not necessarily optimum process performance. The lambda tuning method provides the ability to tune the PID controller to achieve process performance goals, whether they are maximum load regulation or attenuation of variability.

 

About the Author
James Beall is a principal process control consultant at Emerson Process Management with 34 years of experience in process control. He graduated from Texas A&M University with a bachelor’s degree in electrical engineering and worked for Eastman Chemical Company until 2001, when he joined Emerson. Beall’s areas of expertise include process instrumentation, control valve performance, control strategy analysis and design, advanced regulatory control and multivariable, and model predictive control. He has designed and implemented process control improvement projects in the chemical, refinery, pulp and paper, power, pipeline, gas and oil, and pharmaceutical industries. Beall is a member of AIChE and ISA, and chair of ISA committee ISA75.25, Control Valve Dynamic Testing.

Connect with James:

LinkedInEmail
 
 

A version of this article originally was published at InTech magazine.

How to Overcome Challenges of PID Control and Analyzer Applications via Wireless Measurements

How to Overcome Challenges of PID Control and Analyzer Applications via Wireless Measurements

This article was authored by Greg McMillan, industry consultant, author of numerous process control books, 2010 ISA Life Achievement Award recipient and retired Senior Fellow from Solutia Inc. (now Eastman Chemical).

Wireless measurements offer significant life-cycle cost savings by eliminating the installation, troubleshooting, and modification of wiring systems for new and relocated measurements. Some of the less recognized benefits are the eradication of EMI spikes from pump and agitator variable speed drives, the optimization of sensor location, and the demonstration of process control improvements. However, loss of transmission can result in process conditions outside of the normal operating range. Large periodic and exception reporting settings to increase battery life can cause loop instability and limit cycles when using a traditional PID (proportional-integral-derivative) for control. Analyzers offer composition measurements key to a higher level of process control but often have a less-than-ideal reliability record, sample system, cycle time, and resolution or sensitivity limit. A modification of the integral and derivative mode calculations can inherently prevent PID response problems, simplify tuning requirements, and improve loop performance for wireless measurements and sampled analyzers.

Wireless measurements

The combination of periodic and exception reporting by wireless measurements can be quite effective. The use of a refresh time (maximum time between communications) enables the use of a larger exception setting (minimum change for communication). Correspondingly, the use of an exception setting enables a larger refresh time setting. The time delay between the communicated and actual change in process variable depends upon when the change occurs in the time interval between updates (sample time). Since the time interval between a measured and communicated value (latency) is normally negligible, on the average, the true change can be considered to have occurred in the middle of the sample time. This delay limits how quickly control action is taken to correct changes introduced by process disturbances.

Analytical measurements

Since ultimately what you often want to control is composition in a process stream, online analyzers can raise process performance to a new level. However, analyzers, such as chromatographs, have large sample transportation and processing time delays that contribute to the total loop deadtime and are generally not as reliable or as sensitive as the pressure, level, and temperature measurements.

The sample transportation delay from the process to the analyzer is the sample system volume divided by the sample flow rate. This delay can be five or more minutes when analyzers are grouped in an analyzer house. Once the sample arrives, the processing and analysis cycle time normally ranges from 10 to 30 minutes. The analysis result is available at the end of the cycle time. If you consider the change in the sample composition occurs in the middle of the cycle time and is not reported until the end of the next cycle time, the analysis delay is 1½ times the cycle time. This cycle time delay is added to the sample transportation delay, process deadtime, and final control element delay to get the total loop deadtime. The sum of the 1½ analyzer cycle time plus the sample transportation delay will be referred to as the sample time.

Smart PID

Most of the undesirable reaction to discontinuous measurement communication is the result of integral and derivative action in a traditional PID. Integral action will continue to drive the output to eliminate the last known offset from the setpoint even if the measurement information is old. Since the measurement is rarely exactly at the setpoint within the A/D and microprocessor resolution, the output is continually ramped by reset. The problem is particularly onerous if the current error is erroneous.

Derivative action will see any sudden change in a communicated measurement value as occurring all within the PID execution time. Thus, a change in the measurement causes a spike in the controller output. The spike is especially large for restoration of the signal after a loss in communication. The spike can hit the output limit opposite from the output limit driven to from integral action. The spike from large refresh time can also cause a significant spike, because the rate of change calculation uses the PID execution time.

A smart PID has been developed that makes an integral mode calculation only when there is a measurement update. The change in controller output from the proportional mode reaction to a measurement update is fed back through an exponential response calculation with a time constant equal to the reset time setting to provide an integral calculation via the external reset method. For applications where there is an output signal selection (e.g., override control) or where there is a slowly responding secondary loop or final control element, the change in an external reset signal can be used instead of the change in PID output for the input to exponential response calculation. The feedback of actual valve position as the external reset signal can prevent integral action from driving the PID output in response to a stuck valve. The use of a smart positioner provides the readback of actual position and drives the pneumatic output to the actuator to correct for the wrong position without the help of the process controller.

For a reset time set equal to the process time constant so the closed loop time constant is equal to the open loop time constant, the response of the integral mode of the smart PID matches the response of the process. This inherent compensation of process response simplifies controller tuning and stabilizes the loop. For single loops dominated by a large time in between updates (large sample time), whether due to wireless measurements or analyzers, the controller gain can be the inverse of the process gain.

In the smart PID, the time interval used for the derivative mode calculation is the elapsed time from the last measurement update. Upon the restoration of communication, derivative action considers the change to have occurred over the time duration of the communication failure. Similarly, the derivative response to a large sample time or exception setting spreads the measurement change over the entire elapsed time. The reaction to measurement noise is also attenuated. This smarter derivative calculation combined with the derivative mode filter eliminates spikes in the controller output.

The proportional mode is active during each execution of the PID module to provide an immediate response to setpoint changes. The module execution time is kept fast so the delay is negligible for a corrective change in the setpoint of a secondary loop or signal to a final control element. With a controller gain approximately equal to the inverse of the process gain, the step change in PID output puts the actual value of the process variable extremely close to the final value needed to match the setpoint. The delay in the correction is only the final control element delay and process deadtime. After the process variable changes, the change in the measured value is delayed by a factor of the measurement sample time. Consequently, the observed speed of response is not as fast as the true speed of process response, a common deception from measurements with large signal delay or lag times.

Communication failure

Communication failure is not just a concern for wireless measurements. Any measurement device can fail to sense or transmit a new value. For pH measurements, the broken glass electrode or broken wire will result in a 7 pH reading, the most common setpoint. The response of coated or aged electrodes and large air gaps in thermowells can be so slow to show no appreciable change. Plugged impulse lines and sample lines can result in no new information from pressure transmitters and analyzers. Digitally communicated measurements can fail to update due to bus or transmitter problems.

If a load upset occurs and is reported just before the last communication, integral action in the traditional controller drives the PID output to its low limit. The smart PID can make an output change that almost exactly corrects for the last reported load upset, since the controller gain is the inverse of the process gain.

Sample time

The wireless measurement sample time and transport delay associated with sample analyzers must be taken into account when using these measurements in control. A minimum wireless refresh time of 16 seconds is significant compared to the process response for flow, liquid pressure, desuperheater temperature, and static mixer composition and pH control. The sample time of chromatographs makes nearly all composition loops deadtime dominant except for industrial distillation columns and extremely large vessels. To eliminate excessive oscillations and valve travel caused by sample time and transport delay, a traditional PID controller is tuned for nearly an integral-only type of response by reducing the controller gain by a factor of 5. Increasing the reset time instead of reducing could also provide stability, but the offset is often unacceptable especially for flow feedforward and ratio control.

The smart PID can be aggressively tuned by setting the gain equal to the inverse of the process gain for deadtime dominant loops. The result is a dramatic reduction in integrated absolute error and rise time (time to reach setpoint). The immediate response of the smart PID is particularly advantageous for ratio control of feeds to wild flows and for cascade and model predictive control by higher level loops. The advantage may not be visible in the wireless or analyzer reported value because of the large measurement delay. The improvement in performance is observed in the speed and degree of correction by the controller output and reduced variability in upper level measurements and process quality. A similar deception also occurs for measurements with a large lag time relative to the true process response due to large signal filters and transmitter damping settings, and slow sensor response times. An understanding of these relationships and the temporary use of fast measurements can help realize and justify process control improvement. The ability to temporarily set a fast wakeup time and tight exception reporting for a portable wireless transmitter could lead to automation system upgrades.

Level loops on large volumes can use the largest refresh time of 60 seconds without any adverse affect because the integrating process gain is so slow (ramp rate is less than 1% per minute). Temperature loops on large vessels and columns can use an intermediate refresh time (30 seconds) and the maximum refresh time (60 seconds), respectively, because the process time constant is so large. However, gas and steam pressure control of volumes and headers will be adversely affected by a refresh time of 16 seconds because the integrating response ramp is so fast that the pressure can move outside of the control band (allowable control error) within the refresh time. Furnace draft pressure can ramp off scale in seconds. Highly exothermic reactors (polymerization reactors) can possibly run away if the largest refresh time of 60 seconds is used. To mitigate the effect of a large refresh time, the exception reporting setting is lowered to provide more frequent updates.

Measurement sensitivity

Measurements have a limit to the smallest detectable or reportable change in the process variable. If the entire change beyond threshold for detection is communicated, the limit is termed sensitivity. If a quantized or stepped change beyond the threshold is reported, the limit is termed resolution. Ideally, the resolution limit is less than the sensitivity limit.  Often, these terms are used indiscriminately.

Wireless measurements have a sensitivity setting called deadband that is the minimum change in the measurement from the last value communicated that will trigger a communication when the sensor is awake. In the near future, the wakeup time in most wireless transmitters of 8 seconds is expected to be reduced. pH transmitters already have a wakeup time of only 1 second enabling a more effective use on static mixers.

A traditional PID will develop a limit cycle whose amplitude is the sensitivity and resolution limit, whichever is larger, from integral action. The period of the limit cycle will increase as the gain setting is reduced and the reset time is increased. A smart PID will inherently prevent the limit cycle.

Bottom line

Wireless and composition measurements offer a significant opportunity for optimizing process operation. A smart PID can dramatically improve the stability, reliability, and speed of response for wireless measurements and analyzers. The result is tighter control of the true process variables and longer battery and valve packing life.

 

A version of this article originally was published at InTech magazine.

PID Tuning Rules

PID Tuning Rules

This article was authored by Greg McMillan, industry consultant, author of numerous process control books, 2010 ISA Life Achievement Award recipient and retired Senior Fellow from Solutia Inc. (now Eastman Chemical).

Nearly every automation system supplier, consultant, control theory professor, and user has a favorite set of PID tuning rules. Many of these experts are convinced their set is the best. A handbook devoted to tuning has over 500 pages of rules. The enthusiasm and sheer number of rules is a testament to the importance of tuning and the wide variety of application dynamics, requirements, and complications. The good news is these methods converge for a common objective. The addition of PID features, such as setpoint lead-lag, dynamic reset and output velocity limits, and intelligent suspension of integral action enable the use of disturbance rejection tuning to achieve other system requirements, such as maximizing setpoint response, coordinating loops, extending valve packing life, and minimizing upsets to operations and other control loops.

Potential performance

The purpose of a control loop is to reject undesired changes, ignore extraneous changes, and achieve desired changes, such as new setpoints. PID control provides the best possible rejection of unmeasured disturbances (regulatory control) when properly tuned. The addition of a simple deadtime block in the external reset path can enhance the PID regulatory control capability more than other controllers with intelligence built-in to process dynamics, such as model predictive control. In plants, unknown and extraneous changes are a reality, and the PID is the best tool if properly tuned. The test time has been significantly reduced for the most difficult loops. Simple equations have been developed to estimate tuning and resulting performance for a unified approach. (Equation derivations and a simple tuning method are in the online version.)

Control requirements

The foremost requirement of a PID is to prevent the activation of a safety instrumentation system or a relief device and the prevention of an environmental violation (RCRA pH), compressor surge, and shutdown from a process excursion. The peak error (maximum deviation from setpoint) is the most applicable metric. The most disruptive upset is an unmeasured step disturbance that would cause an open loop error (Eo) if the PID was in manual or did not exist. The fraction of open loop error seen in feedback control is more dependent upon the controller gain than the integral time since the proportional mode provides the initial reaction important for minimizing the peak error. Equation (1) shows if the product of the controller gain (Kc) and open loop gain (Ko) is much greater than one, the peak error (Ex) is significantly less than the open loop error. The open loop gain (Ko) is the product of the final element, process, and measurement gain and is the percent change in process variable divided by the percent change in controller output for a setpoint change. For most vessel and column temperature and pressure control loops, the process rate of change is much slower than the deadtime. Consequently, the controller gain can be set large enough where the denominator becomes simply the inverse of the product of the gains. Conversely, for loops dominated by deadtime, the denominator approaches one, and the peak error is essentially the open loop error.

The peak error is critical for product quality in the final processing of melts, solids, or paste, such as extruders, sheet lines, and spin lines. Peak errors show up as rejected product due to color, consistency, optical clarity, thickness, size, shape, and in the case of food, palatability. Unfortunately, these systems are dominated by transportation delays. The peak errors and disruptions from upstream processes must be minimized.

The most widely cited metric is an integrated absolute error (IAE), which is the area between process variable and the setpoint. For a non-oscillatory response, the IAE and the integrated error (IE) are the same. Since proportional and integral action are important for minimizing this error, Equation (2) shows the IE increases as the integral time (Ti) increases and the controller gain decreases.

Equation (2) also shows how the IE increases with controller execution time (Δtx) and signal filter time (τf). The equivalent deadtime from these terms also decreases the minimum allowable integral time and maximum allowable controller gain, further degrading the maximum possible performance. In many cases, the original controller tuning is slower than allowed and remains unchanged, so the only deterioration observed is from these terms in the numerator of Equation (2). Studies on the effect of automation system dynamics and innovations can lead to conflicting results because of the lack of recognition of the effect of tuning on the starting case and comparative case performance. In other words, you can readily prove anything you want by how you tune the controller.

IE is indicative of the quantity of product that is off-spec that can lead to a reduced yield and higher cost ratio of raw material or recycle processing to product. If the off-spec cannot be recycled or the feed rate cannot be increased, there is a loss in production rate. If the off-spec is not recoverable, there is a waste treatment cost.

A controller tuned for maximum performance will have a closed loop response to an unmeasured disturbance that resembles two right triangles placed back to back. The base of each triangle is the total loop deadtime and the altitude is the peak error. If the integral time (reset time) is too slow, there is slower return to setpoint. If the controller gain is too small, the peak error is increased, and the right triangle is larger for the return to setpoint.

Process dynamics

The major types of process dynamics are differentiated by the final path of the open loop response to a change in manual controller output assuming no disturbances. (The online version shows the three major types of responses and the associated dynamic terms.) If the response lines out to a new steady state, the process is self-regulating with an open loop time constant (τo) that is the largest time constant in the loop. Flow and continuous operation temperature and concentration are self-regulating processes. If the response continues to ramp, the process is integrating. Level, column and vessel pressure, batch operation temperature, and concentration are integrating processes. If the response accelerates, reaching a point of no return, the process has positive feedback leading to a runaway. Batch or continuous temperature in highly exothermic reactors (e.g., polymerization) can become runaway processes. Prolonged open loop tests are not permitted, and setpoint changes are limited. Consequently, the acceleration is rarely intentionally observed.

Unified approach

The three major types of responses have an initial period of no response that is the total loop deadtime (θo) followed by the ramp before the deceleration (inflection point) of a self-regulating response and the acceleration of the runaway response. The percent ramp rate divided by the change in percent controller output is the integrating process gain (Ki) with units of %/sec/%, which reduces to 1/sec.

For at least 10 years, slow self-regulating processes with a long time to deceleration have shown to be effectively identified and tuned as “near integrating” or “pseudo integrating” processes, leading to a “short cut tuning method” where only the deadtime and initial ramp rate need to be recognized. The tuning test time for these “near integrating” processes can be reduced by over 90% by not waiting for a steady state. Recently, the method was extended to runaway processes and to deadtime dominant self-regulating processes by the use of a deadtime block to compute the ramp rate over a deadtime interval. Furthermore, other tuning rules were found to give the same equation for controller gain when the performance objective was maximum unmeasured disturbance rejection. For example, the use of a closed loop time constant (λ) equal to the total loop deadtime in Lambda tuning yields the same result as the Ziegler Nichols (ZN) ultimate oscillation and reaction curve methods if the ZN gain is cut in half for smoothness and robustness. Equation (3) shows the controller gain is half the inverse of the product of integrating process gain and deadtime.

The profession realizes that too large of a controller gain will cause relatively rapid oscillations and can instigate instability (growing oscillations). Unrealized for integrating process is that too small of a controller gain can cause extremely slow oscillations that take longer to decay as the gain is decreased. Also unrealized for a runaway process is that a controller gain set less than the inverse of the open loop gain causes an increase in temperature to accelerate to a point of no return. There is a window of allowable controller gains. Also realized is too small of an integral time will cause overshoot and can lead to a reset cycle. Almost completely unrealized is that too slow of an integral time will result in a sustained overshoot of a setpoint that gets larger and more persistent as the integral time is increased for integrating processes. Hence a window of allowable integral times exists. Equation 4a provides the right size of integral time for integrating processes. If we substitute Equation 3 into Equation 4a, we end up with Equation 4b, which is a common expression for the integral time for maximum disturbance rejection. Equation 4a is extremely important because most integrating processes have a controller gain five to 10 times smaller than allowed. The coefficient in Equation 4b can be decreased for self-regulating processes as the deadtime becomes larger than the open loop time constant (τo) estimated by Equation 5.

The tuning used for maximum load rejection can be used for an effective and smooth setpoint response if the setpoint change is passed through a lead-lag. The lag time is set equal to the integral time, and the lead time is set approximately equal to ¼ the lag time.

For startup, grade transitions, and optimization of continuous processes and batch operations, setpoint response is important. Minimizing the time to reach a new setpoint (rise time) can in many cases maximize process efficiency and capacity. The rise time (Tr) for no output saturation, no setpoint feedforward, and no special logic is the inverse of the product of the integrating process gain and the controller gain plus the total loop deadtime. Equation 6 is independent of the setpoint change.

Complications, easy solutions

Fast changes in controller output can cause oscillations from a slow secondary loop or a slow final control element. The problem is insidious in that oscillations may only develop for large disturbances or large setpoint changes. The enabling of the dynamic reset limit option and the timely external reset feedback of the secondary loop or final control element process variable will prevent the primary PID controller output from changing faster than the secondary or final control element can respond, preventing oscillations.

Aggressive controller tuning can also upset operations, disturb other loops, and cause continual crossing of the split range point. Velocity limits can be added to the analog output block, the dynamic reset limit option enabled, and the block process variable used as the external reset to provide directional move suppression to smooth out the response as necessary without retuning.

The different closed loop response of loops can reduce the coordination, especially important for blending and simplification of the identification of models for advanced process control systems that manipulate these loops. Process nonlinearities may cause the response in one direction to be faster. Directional output velocity limits and the dynamic reset limit option can be used to equalize closed loop time constants without retuning.

Final control element resolution limits (stick-slip) and deadband (backlash) can cause a limit cycle if one or two or more integrators, respectively, exist in the loop. The integrator can be in the process or in the secondary or primary PID controller via the integral mode. Increasing the integral time will make the cycle period slower but cannot eliminate the oscillation. However, a total suspension of integral action when there is no significant change in the process variable and when the process is close to the setpoint can stop the limit cycle. The output velocity limits can also be used to prevent oscillations in the controller output from measurement noise exceeding the deadband or resolution limit of a control valve preventing dither, which further reduces valve wear.

Bottom line

Controllers can be tuned for maximum disturbance rejection by a unified method for the major types of processes. PID options in today’s DCS, such as setpoint lead-lag, directional output velocity limits, dynamic reset limit, and intelligent suspension of integral action, can eliminate oscillations without retuning. Less oscillations reduces process variability, enables better recognition of trends, offers easier identification of dynamics, and provides an increase in valve packing life.

A version of this article originally was published at InTech magazine.

Pin It on Pinterest