1 Similarity-based Traffic Reduction to Increase Battery Life in a Wireless Process Control Network Deji Chen, Mark Nixon, Tom Aneweer, Rusty Shepard, Terry Blevins, and Greg McMillan Emerson Process Management 12301 Research Blvd. Building III, Austin, TX 78759 Aloysius K. Mok Dpt. of Computer Sciences University of Texas at Austin Austin, TX 78712 KEYWORDS Process control, wireless network, similarity, data traffic, battery life ABSTRACT In a process control loop, the control algorithm is executed periodically at a rate such that process values are sensed timely into the algorithm and output values are sent timely to the actuators. Data is transmitted through wire between the controller and the devices the sensors and actuators. When wireless transmission is used among the controller and devices, energy consumption by the wireless transmitters becomes a concern. In this paper, we visit the trend of the latest development in both the controllers and the devices, and present the need for energy conservation for ever proliferating wireless devices. We introduce the concept of similarity distance to reduce the data traffic, hence reduce the device energy consumption. Similarity distance is defined for the difference between two values. Two values are considered similar in certain context if they are exchangeable in that context. After discussing the applications of the similarity concept, we proceed to one general concept where a similarity interface is placed between the controller and its communications subsystem. We then present a detailed analysis of a closed loop control with some experimental results. One assumption for this work is that the added complexity could be handled by the ever increasing computation power. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 2 INTRODUCTION Process loop control must have fast and reliable data communication between the controller and the devices in order to achieve optimum control. As is always the case, the controller executes control algorithms periodically at a rate fast enough that unwanted deviation in the process is quickly corrected. It is strongly discouraged to execute the control algorithms only when data changes [5]. In real-time terms, we should apply time triggered rather than event triggered mechanism. This rule of thumb is slowly challenged by the latest development on two fronts, the controller side and the device side. On the controller side, the exponential growth of raw computation power makes complex real-time control a reality. Moore's law applies equally to the embedded processors. A current embedded processor has enough computation power as past mainframes. For example, the latest MPC5500 family of 32-bit microcontrollers from Freescale Semiconductor has speed up to 600MHz [7]. In comparison, the CPU of PlayStation 2 runs with a clock speed of 300MHz [8]. With increased controller power improved control opportunities are possible. For example, we have seen the introduction and maturity of fuzzy control, neural network control, model predictive control, etc. We are seeing continued improvement over traditional control logic such as PID. With increased controller power we could also move the computational load from devices and other parts of a control system to the controller. On the device side, we see ever faster pace of new product introductions. More and more process variables are being monitored and controlled. Normally, a device requires wire to draw power and transmit data. As more and more devices packed into a control system, wireless devices start to show up. The latest we hear is “Wireless HART”. Wireless devices rely on power sources other than main power and communicate with the controller wirelessly. Most of them are battery powered, some draw solar power, some pilfer ambient energy such as vibration, heat, pressure, etc. For these devices, energy consumed for data transmission comprises a sizable portion of total energy consumption. This is even more prominent for large-scale sensor networks where tiny sensors monitor environment data. By putting the sensors sleeping most of the time, we could extend the sensor lifetime for years. Let’s look at the energy usage of a wireless device, this include the energy to sense, actuate, compute, and transmit. With main power support, sensing and actuating consumes most of the energy while data transmission is negligible. However, sensing and actuating could be improved but wireless data transmission is difficult. For many sensor types such as temperature sensors and piezoelectric pressure sensors, the reading can be made very quickly, possibly as quickly as 50uS for the reading at about 1mA at 3V. A Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 3 fixed energy amount is required for the radio to reach a certain distance. In a wireless device, data transmission will constitute a bigger percentage. It is with above background that we present this work. Although the change is not significant yet, it helps if we study the trend and look into the future. We explore the ways to reduce a wireless device's energy consumption and hence, prolong its lifetime or maintenance cycle. We look at the ways to reduce the amount of data communication with computation power from the controller. The concept we introduce is called similarity distance. With this concept, we eliminate the transmission of similar data while not degrading control performance. We shall emphasize here that this is a research paper, the ideas are exploratory. At present process loop control is still designed based on periodical sampling of the instruments. In the next section we briefly mention the current process control mechanism. Then we shall expand on the concept of similarity distance and its application to the process control in Section 3. Section 4 discusses one general design of such application. We present a detailed loop control experiment in Section 5 and conclude in Section 6. PROCESS LOOP CONTROL In this section we provide basic background information on control architecture. Sensor Controller Control Network Actuator Figure 1. A Process Control System Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 4 Figure 1 shows a process control system. The controller is connected with the devices, both sensors and actuators, via the control network. The control network is wired. The controller reads data from the sensors and writes data to the actuators. Data is also read from the actuators and written to the sensors for other purposes like feedbacks. To maintain continuous control, the control algorithm is run strictly periodically. Error will be declared when data is not received for one or more consecutive periods. Besides the control data, configuration data could be written to the devices; diagnostic and alarm information could be retrieved from the devices. Let’s call this data assistant data. The assistant data is transmitted only when the data is changed or it is requested. During the life time of the system, control data takes up the majority of the network traffic. The main reason is that the process data is time triggered whereas the assistant data is event triggered. The time triggered data strictly increases as time passes; the event triggered data varies and do not occur most of the time in a steady system. While we transmit control data every period regardless of the value, we do employ many ways to reduce data size when archiving historical data [6]. For example, exception report records only those data values that exceed a pre-specified data tolerance level or dead band. Exception reporting can produce compression ratios of up to 20:1 for moderately variable process industry data. A ratio of 10:1 is typical. The compression ratios of adaptive data-compression algorithm have been measured to range from 10: 1 to as high as 100:1 depending on the variability of the incoming raw data [6]. On one hand we must transmit control data periodically to have a good control of the process; on the other hand we know the data transmitted could be greatly compressed. The question is if we could combine both to save energy for wireless devices. In the next section we shall digress to talk about the general idea of data transmission reduction and come back to this topic in the subsequent sections. SIMILARITY CONCEPT AND ITS APPLICATIONS Similarity distance [2] is defined for the difference between two values. Two values are considered similar in certain context if they are exchangeable in that context. Similarity distance is a measurement of the difference between two values such that two values are similar if their similarity distance is within a limit value. The limit value depends on the context. As an example, the temperature value used in a control algorithm is considered similar to the actual real world temperature at the time the algorithm is executed and before the next measurement, even though the value was measured by the temperature sensor some time beforehand. The real world temperature value may change from the time it is measured to the time it is used in the algorithm. But if we keep the time short enough, we could confidently assume that the temperature value is within allowable precision requirement. This requirement dictates the algorithm execution rate. The more precise is required, the faster rate we have to run the algorithm. For example, the temperature control of a chemical reactor has short time constant and must be run once a second, whereas the Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 5 heating algorithm for a water boiler has long time constant and could be run every 10 second. We could define above similarity distance to be 1 second and 10 seconds separately. In this sense, the concept of similarity is already used in process control. The similarity distance measurement applies differently in different context. In the previous example we used time for the similarity distance for temperature. In other context, we could use the temperature difference as the similarity distance. In extreme cases, we could consider any temperature value to be similar if the temperature does not contribute to the execution of the algorithm. For example the temperature of water usually does not matter much in its flow control through a pipeline. If the output of a control algorithm is in fail safe state holding last value, any input value to the algorithm has no effect on the output and could be considered similar to 0. Another key point of similarity concept is that we could use similar value in place of the actual value without even knowing what the actual value is. We use the sensed temperature value in the control algorithm without knowing what the exact current real world temperature is. The law of physics tells us how big the temperature will change within one second. Under the same condition, the water temperature changes at a slower rate than steel temperature; a higher viscosity fluid flows slower than a lower viscosity one. Within a context, we could calculate the similarity distance from the actual value. A controller, armed with all the information associated with the process in control, should be able to calculate the maximum change of the sensor values. If the maximum change since last read is within the similarity distance limit, the controller could use the last read value in its processing instead of reading anew. The controller does not need the sensor to tell it if the value is similar. Similarity could also be defined for output value to actuators. Two identical output values could be considered similar; two different values could be considered similar if the physical results are the same or the difference could be ignored. For some actuators, the value change has to be big enough to cause physical change to the device. The values within a deadband could be considered similar as they do no cause any output change. One of the report-by-exception methods is sandbox (or deadband). For a data source, be it sensor or outputting controller, if the current value is within a certain range from the last sent value, it is considered sandboxed and not sent. The sandbox could be interpreted as the similarity distance; and the value within the sandbox is similar to the last sent value. One way to increase the lifetime of a wireless device is to reduce its active cycle and put it sleep most of the time. Similarity distance could be used to calculate how long a device could be put into sleep. The design problem is to define where to place the rules for deciding what is similar. In some cases we need to always send the value, in others sending a value when it changes is enough. In still others the issue will be to only send the value when it changes by some amount. The opportunity here could be realized if we told the loop controller that it was a pressure loop, temperature, or mass-flow, etc. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 6 Now let's look at a few examples. Flow control Figure 2 is a flow control unit. The controller reads the flow speed from the flow transmitter and sends control data to the valve actuator to adjust its position. This algorithm is run repeatedly to maintain the flow at a constant speed set by the user, the setpoint (SP). The algorithm is configured to run at a period fast enough to maintain good control during SP changes. However, most of the time the flow runs at SP in a steady state. If we assume minor measured disturbances, the input and output values of the control algorithm almost do not change in a steady states. Let's define the similarity distance to be the longest time allowed between two controller executions, during SP change, the similarity distance must be at most τ/3 to smoothly handle SP changes, where τ is the time constant. In steady state, the similarity distance could be bigger, that is, we could run the control algorithm at a lower rate. The drawback is the added complexity, which means additional computation requirement. Controller Flow Transmitter Valve FT Figure 2. Flow control Level control Figure 3 is a water tank level control unit. The input pipe fills the tank at a rate based on the upstream process operation. The output flow is controlled by the valve. The periodic control algorithm reads the tank level from the level transmitter and adjusts the valve. The goal is to maintain the water level between a high limit (HI_LIM) and a low limit (LO_LIM). Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 7 Let's define the similarity to be the level difference, the similarity distance should be smaller when the level is close to the limits and could be bigger otherwise. In other words, we do not care much about the precise tank level when it is in the middle. Based on the input flow, last measured level, and the last output valve position, the controller could derive the maximum rate of water level change with time. The controller can delay the control algorithm as long as the maximum change is within HI_LIM and LO_LIM. Again, with more computation, the controller can reduce communications with the devices. Controller LT Level Transmitter Valve Figure 3. Level control Skipped write In a loop control, a controller output is periodically written to the actuator even if the value is the same. For wirelessly communication, we could skip sending identical writes as long as it does not jeopardize the communication condition status. Further more we could also skip similar values. For device with deadband and limit cycle, similarity distance could be defined to be the deadband. For example, let’s suppose in Figure 3 the valve is sticky and only makes a move when the target value differs from current value by 1 unit. Armed with this knowledge, the controller will not transmit the output value unless it is outside the 1 unit similarity distance of the last sent value. With high precision measuring devices, the output value will be different each time because the input value is not exactly the same at each period. For this situation, the similarity check will eliminate many unnecessary transmissions. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 8 A SIMILARITY LAYER WITH WIRELESS NETWORK In this section we describe a general design that makes use of existing process control with a similarity interface. The design is applied in a process control system where the wired control network is replaced by a wireless network whose energy consumption for data transmission should be as small as possible. The goal is to reduce the data traffic in the wireless network while maintain the same level of process control. We use the similarity concept to reduce the data traffic. Instead of sending the input and output data each time the control algorithm is executed, we only transmit them when they are no longer similar to the last transmitted ones. In the mean time, the quality of the control system is maintained. In a process control system, the control algorithm, once configured, will run at a constant rate. In the design a similarity layer is placed between the controller and its communications subsystem. Such a layer may also be placed in smart devices depending on if extra handling is required to skip data transmission. Such a layer does not exist in devices that simply respond to controller request. This layer only handles control data. It does not interfere with how assistant data is transmitted. Figure 4 is the wireless process control system with the similarity layer. Upon a reading request, the similarity layer calculates the similarity distance between the current input value and the last read value. If similar, the last read value will be returned directly; if no similar, the read request will be forwarded. Upon a writing request, the similarity layer calculates the similarity distance between the current output value and the last sent value. If similar, return success back without actually sending the value; if no similar, the write request will be forwarded. Smart devices have advanced software running inside. Their input or output function blocks will declare communication failure if expected read or write request is not received from the controller. For these devices, the similarity layer will also be installed in them, but at a reduced computation load. The majority of similarity calculation will be done at the controller side. Pre-calculated result could be downloaded from the controller to the device during system configuration. In cases as described in the next section, no enhancement to the device is required. In other words, this scheme could be applied to devices currently on the market. The similarity layer will be configured at the same time when the control algorithm is configured. The configuration engineer will determine the similarity distance and the algorithms to be executed in the similarity layer. Rules can be included in the configuration system to automatically suggest what the similarity value is based on the type of loop, loop performance, and the criticality of the loop. Note the actual algorithm must be modified to account for the measurement not being available in a periodic basic. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 9 Similarity Layer Sensor Controller Wireless Network Actuator Figure 4. A wireless process control system Examples For the application in Figure 2, the similarity layer in the controller will not interfere with the algorithm execution but the algorithm must be designed to use non-periodic update. Assume the modified controller runs once every 1 second. In steady state, the similarity layer will skip most of the input/output requests; let's say it is nine out of ten. This results in 90% reduction of data traffic in the network. Assume 10% of the time the process is not in steady state, the similarity layer reduces totally 90% * (1 - 10%) = 81% of traffic. For the application in Figure 3, the similarity layer will skip some of the periodic read requests as follows. Based on the input flow and last set valve position, it derives the maximum rate of water level change. On a read request, the similarity layer calculates the upper and lower bound of the water level based on the maximum change rate and the last read water level. If the bounds are well within HI_LIM and LO_LIM, the read request is skipped. The closer the water level is to HI_LIM or LO_LIM, the less skips occur. Most of the skips happen when the water level is in the midpoint between HI_LIM and LO_LIM. Assistant data The similarity layer will not interfere with assistant data. The alarms, events, diagnostic information, and user inquiries will be handled timely by the controller as if the similarity layer does not exist. The majority of the control unit’s life time will be in a steady state without assistant data traffic. Assume in Figure 2 10% of the data traffic is for assistant data, the traffic reduction by the similarity layer is 81% * (1 - 10%) = 73%. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 10 Communication failure detection and elimination of offset The similarity layer should also detect possible communication failure in time. In the typical control system, loss of communication will be declared if read or write request do not get through the network. The similarity distance calculation will take the possibility of bad communication into account. Assume in Figure 2 a communication failure should be caught within 5 seconds. We know the algorithm is run every one second. To detect communication failure in the steady state, the similarity distance will be defined to be 5 seconds instead of 10 seconds. So the similarity layer could only skip four out of five input/output requests from the algorithm. This results in an 80% * (1 - 10%) = 72% of control data traffic reduction, and 72% * (1 - 10%) = 65% of total traffic reduction. The use of a default refresh communication rate also has the benefit of eventually removing the offset of the used value from the actual value. Another communication failure detecting method is based on consecutive communication failures. This should be adjusted in the similarity layer. Depending on the application context, the similarity layer could further reduce the similarity distance to increase transmission frequency, and/or resume regular transmission whenever one communication failure occurs. Once loss of communication is detected, the similarity layer should no longer skip network request until communication is back in normal. Some control data is broadcasted without confirmation requirement. If the sender uses similarity layer to skip broadcasts, the receiver, if it has communication failure detection mechanism based on receiving the broadcasts, should also deploy the similarity layer to handle skipped broadcasts. Computation overhead This design is aimed at deploying the similarity layer in the controller and the transmitter, where the heavy part is put in the controller. The overhead could be very small as we shall see in the next section. Existing wireless devices could be readily used for this design. Similarity layer adds very little into transmitter computation. The power consumption is more significant for transmission than computation. As controllers become more powerful, the similarity layer could be more sophisticated and more computation intensive in some complex context such as cascade controls, or better similarity distance could be calculated with more complex methods. DESIGNING CONTROL FOR WIRELESS COMMUNICATIONS In this section we give a detailed analysis and design for closed loop control. Utilizing wireless communication to provide a measurement used in closed loop control presents many technical challenges. To reduce transmitter power consumption, it is Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 11 desirable to minimize how often a measurement value is communicated. However, to avoid the restrictions of synchronizing the measurement value with the control, most multi-loop controller are designed to over-sample the measurement by a factor of 2-10X. Also, to minimize control variation, the typical rule of thumb is that feedback control should be executed 4X to 10X times faster that the process response time, process time constant plus process delay. Thus, to satisfy these requirements, the measurement value is often sampled much faster that the process responds as illustrated in Figure 5. Process Output O 63% of Change Time Constant ( ) Deadtime (TD ) Process Input I Control Execution New Measurement Available Figure 5. Control data sampling rate By synchronizing measure and control execution, as done in fieldbus devices based on FOUNDATION Fieldbus, then it is possible to eliminate the need to over sample the measurement. However, if the traditional approach is taken in scheduling control 4-10X faster than the process response, then the power consumption associated with the transmission of the measurement value may be excessive for all but the slowest types of process. Slowing down the control execution to reduce the power consumption associated with communication may increase control variability when the process is characterized by frequent unmeasured disturbances. Ideally the power consumption could be minimized by only transmitting the measurement value only as often as required to allow control action to correct for unmeasured disturbances or changes in operation point. For example, one approach to minimize the power consumed in communicating new measurement values is to design the transmitter and wireless communication according to the following rules: Rules for Transmitting a New Measurement Value 1. The transmitter will periodically sample the measurement 4-10x faster than the process response time. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 12 2. If the magnitude of the difference between the new measurement value and the last communicated measurement value is greater that a specified resolution or if the time since the last communication exceeds a refresh time then the new value will be communicated. However, the underlying assumption in the control design (using z transform, difference equations) and digital implementation of the PID is that the algorithm is executed on a periodic basis. When the measurement is not updated, then the calculated reset action may not be appropriate. For example, if the control algorithm continues to execute using the last measurement value, then the output will continue to move based on the reset tuning and error between the last measured value and the setpoint. If control execution is only executed when a new measurement is communicated, then this could delay control response to setpoint changes and feedforward action on measured disturbances. Also, when control is executed, then calculating the reset contribution based on the scheduled period of execution or on the time since the last execution may result in changes that increase process variability. To provide best control when a measurement is not updated on periodic basis, the PID may be restructured to reflect the reset contribute for the expected process response since the last measurement update. One means of doing this is illustrated in Figure 6. Traditional PI Controller Setpoint O (s ) E (s ) K P Process 1 1 sTRe set Setpoint Unmeasured Disturbance Traditional Transmitter PI Controller for Wireless Process KP Newest Communicated Measurement Value New Value Flag Modified Filter Unmeasured Disturbance Wireless Transmitter Communications Stack Figure 6. PID enhancement for wireless transmission Traditionally, a PI controller may be implemented using a positive feedback network to determine the reset contribution. Mathematically, it can be shown that the transfer Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 13 function for this implementation is equivalent to the standard formulation for unconstrained control i.e. output not limited. O( s) 1 K P 1 E (s) sTReset where K P Proportional Gain TReset Reset , seconds One advantage of the positive feedback network is that the reset contribution is automatically prevented from winding up when the controller output is high or low limit. For control applications that involve getting their measurement from a wireless transmitter, the positive feedback network may be modified to accommodate non-periodic measurement update. Specifically, the filter used in this network can be modified to have the following behavior: 1. Maintain the last calculated filter output until a new measurement is communicated. 2. When a new measurement is received, calculate the new filter output based on the last controller output and the elapsed time since a new measurement value was communicated. To account for the process response, the filter output may be calculated in the following manner when a new measurement is received. T TReset FN FN 1 ON 1 FN 1 1 e where FN New filter output FN 1 Filter output last execution filter output after last new measurement ON 1 Controller output last execution T Elapsed time since a new value was communicated For those processes that require PID control, it is necessary to apply the PI modifications for wireless communication. In addition, the rate contribution to the PID output should be recomputed and updated only when a new measurement is received. The derivative calculation should use the elapsed time since the last new measurement. EXAMPLE OF CONTROL PERFORMANCE The closed loop response of the PI controller modified for wireless communication is illustrated in Figure 7 for both setpoint and load disturbances. In this example, the wireless transmitter follows the Rules for Transmitting a New Measurement Value. Also, the response is shown for a standard PI controller where the measurement value is communicated as frequently as the PI control algorithm executes. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 14 Lambda Tuning 1.0 Communication Resolution = 1% Communication Refresh = 10 sec PV for PI Control with Wireless Measurement Setpoint PI Control Output with Wireless Measurement Unmeasured Load Disturbance Figure 7. The closed loop response of modified PI controller For the lag process used for this example, the number of communications during the duration of the test was reduced by over 96 % when the rules for wireless communication as outlined above are followed. The impact of non-periodic measurement updates on control performance is minimized through the use of the modified PI algorithm for wireless communication. The difference in control performance is shown below in terms of Integral Absolute Error (IAE) for periodic measurement update vs. non-periodic. Table 1 – Control Performance Difference Communications/Control Number of Communications IAE Periodic /standard PI controller 692 123 Update Using communication Rules/ PI controller for Wireless 25 159 The power that must be supplied by the transmitter for data transmission can be significantly reduced when the communication rules and the PI controller modifications are used with wireless transmitters. This reduction in power requirement increases the number of control applications that may be addressed using wireless transmitters. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org 15 6. CONCLUSION In a wireless process control network, the controller is usually powered from the grid, the device may or may not be powered by the grid, and the traffic relay node is most likely powered from the grid. In the case where a battery or fuel cell is required, although the battery or fuel cell is providing an extended life, there is always the need to reduce the energy consumption. By reducing the control data traffic, we could increase the lifetime of the wireless nodes powered by batteries or fuel cells. While current wired control loops should not report by exception, we speculate that future wireless control systems will have to deal with the challenges. We introduced the concept of similarity distance to support the idea of running control dynamically based on the context and in the mean time not degrading the quality of control too much. Similarity concept indicates that the control algorithm must extend for the measurement not being periodically updated. Similarity calculation is context specific as described in the previous sections. It could be computation intensive or very simple as in Section 5. The ever increasing processor power could well handle this extra work. The detail analysis and design with PID control proved that energy consumption could be greatly reduced for wireless process controls. REFERENCES 1. Caro, Dick, “Wireless Networks for Industrial Automation”, ISA - The Instrumentation, Systems, and Automation Society, 2004. 2. Chen, Deji, “Real-Time Data Management in the Distributed Environment”, Ph.D. Thesis, the University of Texas at Austin, August 1999. 3. Hieb, Brandon, “Developing a Small Wireless Control Network”, Master’s Thesis, the University of Texas at Austin, December 2003. Copyright 2005 by ISA - The Instrumentation, Systems and Automation Society. Presented at ISA EXPO 2005; http://www.isa.org