Improved PI control for a surge tank satisfying level constraints⁎

Improved PI control for a surge tank satisfying level constraints⁎

Proceedings Proceedings of of the the 3rd 3rd IFAC IFAC Conference Conference on on Advances in in Proportional-Integral-Derivative Proportional-Integ...

752KB Sizes 0 Downloads 41 Views

Proceedings Proceedings of of the the 3rd 3rd IFAC IFAC Conference Conference on on Advances in in Proportional-Integral-Derivative Proportional-Integral-Derivative Control Proceedings of the 3rd IFAC Conference on Control Advances Available online at www.sciencedirect.com Proceedings of the 3rd IFAC Conference on Control Ghent, May 9-11, 2018 Advances in Proportional-Integral-Derivative Ghent, Belgium, Belgium, May 9-11, 2018 Advances in Proportional-Integral-Derivative Control Ghent, Belgium, May 9-11, 2018 Ghent, Belgium, May 9-11, 2018

ScienceDirect

IFAC PapersOnLine 51-4 (2018) 835–840

Improved PI control for a surge tank Improved PI control for a surge tank Improved PI control for a surge tank   satisfying level constraints Improved PI control for a surge tank satisfying level constraints satisfying level constraints  satisfying ulevel constraints Adriana Reyes-L´ a ∗∗ Christoph Josef Backi ∗∗

Adriana Reyes-L´ ua ∗ Christoph Josef Backi ∗,1Josef Backi ∗ Adriana Reyes-L´ ua ∗Skogestad Christoph ∗,1 Sigurd Sigurd Skogestad ∗,1 Adriana Reyes-L´ ua Skogestad Christoph Josef Backi ∗ Sigurd Sigurd Skogestad ∗,1 ∗ ∗ Department of Chemical Engineering, Norwegian University of ∗ Department of Chemical Engineering, Norwegian University of Department of Chemical Engineering, Norwegian University of Science and (NTNU), NO-7491 Trondheim, Norway Science and Technology Technology (NTNU), NO-7491 Trondheim, Norway ∗ Department of Chemical Engineering, Norwegian University of Science and Technology (NTNU), NO-7491 Trondheim, Norway (e-mail: {adriana.r.lua,christoph.backi,sigurd.skogestad}@ntnu.no). (e-mail: Science{adriana.r.lua,christoph.backi,sigurd.skogestad}@ntnu.no). and Technology (NTNU), NO-7491 Trondheim, Norway (e-mail: {adriana.r.lua,christoph.backi,sigurd.skogestad}@ntnu.no). (e-mail: {adriana.r.lua,christoph.backi,sigurd.skogestad}@ntnu.no). Abstract: This This paper paper considers considers the the case case of of averaging averaging level level control, control, where where the the main main objective objective is is Abstract: Abstract: This paper considers the case of averaging level control, where the main objective is to reduce flow variations by using varying liquid levels. However, to avoid overfilling or emptying to reduce flow variations by usingthe varying liquid levels. level However, to avoid overfilling emptying Abstract: This paper considers case of averaging control, where the mainor objective is to variations by usingto liquid levels. However, to avoid overfilling or emptying thereduce tank, flow the liquid level needs tovarying satisfy safety-related constraints. In the the simplest case, Pthe tank, the liquid level needs satisfy safety-related constraints. In simplest case, aa Pto reduce flow variations by using varying liquid levels. However, to avoid overfilling or emptying the tank, the liquid level needs to satisfy safety-related constraints. In the simplest case, a Pcontroller can be used, but may not give acceptable averaging of the flow, especially if the surge controller can liquid be used, butneeds may not give acceptable averaging of the flow, especially ifcase, the surge the the level to satisfy safety-related constraints. Inthe the simplest a be Pcontroller can be used, but not give averaging of the flow, especially if the to surge tanktank, is relatively relatively small. Inmay addition, theacceptable P-controller does not allow level setpoint to tank is small. In addition, the P-controller does not allow the level setpoint be controller can be used, but may not give acceptable averaging of the flow, especially if the surge tank is relatively small. In addition, the P-controller does not allow the level setpoint to be adjusted. We We propose propose a a simple simple scheme scheme with with aa PI-controller PI-controller for for normal normal operation operation and and two two highhighadjusted. tank is relatively small. In the addition, P-controller does notnormal the level be adjusted. We propose a simple scheme with a PI-controller for operation and two to highgain P-controllers P-controllers to avoid avoid liquid the level constraints, which isallow compared withsetpoint a benchmark benchmark gain to the liquid level constraints, which is compared with a adjusted. We propose a simple scheme with a PI-controller for normal operation and two highgain P-controllers to avoid the liquid level constraints, which is compared with a benchmark MPC strategy. We demonstrate that the proposed method has similar performance, but with MPC strategy. Weto demonstrate that the proposed method hasissimilar performance, but with gain P-controllers avoid the liquid level constraints, which compared with a benchmark MPC strategy.effort, We demonstrate that the proposed method has similar performance, but with less modeling modeling effort, less computational time and simpler simpler tuning. less less computational time and tuning. MPCmodeling strategy.effort, We demonstrate that thetime proposed method has similar performance, but with less less computational and simpler tuning. © 2018, IFAC (International Federation of Automatic by Elsevier Ltd. All rights reserved. less modeling effort, less computational time andControl) simplerHosting tuning. Keywords: Process Process control, control, PI, PI, safety, safety, flow flow control, control, MPC MPC Keywords: Keywords: Process control, PI, safety, flow control, MPC Keywords: Process control, PI, safety, flow control, MPC 1. INTRODUCTION INTRODUCTION In 1. In this this work, work, we we propose propose aa PI-based PI-based control control structure structure 1. INTRODUCTION In this work, we propose a PI-based control structure that efficiently allows for setpoint tracking with low that efficiently allows for setpoint tracking with low usus1.can INTRODUCTION In this work, we propose a PI-based control structure that efficiently allows for setpoint tracking with low usage of the manipulated variable (MV) and safety-related Liquid level control have two purposes (Shinskey, 1988; of the manipulated variable (MV) and safety-related Liquid level control can have two purposes (Shinskey, 1988; age that allows for setpoint tracking with low usofefficiently the satisfaction. manipulated variable (MV) and safety-related constraint satisfaction. Model Predictive Control (MPC) Liquid can have twoto (Shinskey, Faanes level and control Skogestad, 2003): topurposes tightly control control the 1988; level age constraint Model Predictive Control (MPC) Faanes and Skogestad, 2003): tightly the level age of the manipulated variable (MV) and safety-related Liquid level control can have two purposes (Shinskey, 1988; constraint satisfaction. Model Predictive Control (MPC) is well known for its capability of following a setpoint Faanes and Skogestad, 2003): to tightly control the level (setpoint tracking) tracking) or or to to dampen dampen flow flow disturbances. disturbances. The The is well known for its capability of following a setpoint (setpoint satisfaction. Model Predictive Control (MPC) Faanes and Skogestad, to tightly control the level is wellfollowing known for its capability of following setpoint while constraints and rate change of (setpoint tracking) oracts to2003): dampen flow disturbances. The latter, where where the tank tank acts as aa surge surge tank, is also also known known as constraint while following constraints and limiting limiting rate of ofa change of latter, the as tank, is as is well known for its capability of following a setpoint (setpoint tracking) or to dampen flow disturbances. The while following constraints and limiting rate of change of MVs. For this reason, we compare the performance of the latter, where the tank acts as a surge tank, is also known as averaging level control and is the focus in this paper. The MVs. For this reason, we compare the performance of the averaging level control and is the focus in this paper. The following constraints and predictive limiting rate of change of latter, where thecontrol tank acts asiscases athe surge tank, is also known as while MVs. For structure this reason, wemodel compare the performance of the proposed with control (MPC). averaging level and focus in this paper. The controller tuning for the two are completely different, proposed structure with model predictive control (MPC). controller tuning for theand twoiscases are completely different, MVs. For this reason, we compare the performance of the averaging level control the focus in this paper. The proposed structure with model predictive control (MPC). controller tuning for the two cases are completely different, because for for tight tight level level control control we we need need aa high high controller controller The rest of this paper is structured as follows: Section 3 because structure withismodel predictive controlSection (MPC).3 The rest of this paper structured as follows: controller tuning thecontrol two cases completely different, because for tight level weare need a we highwant controller gain, whereas whereas forfor averaging level control we want low proposed gain, for averaging level control aa low The rest ofthe thisproblem, paper iswhile structured as follows: Section 3 introduces the proposed control strucintroduces the problem, while the proposed control strucbecause for tight level control we need a high controller gain, whereas level the control we value want of a low controller gain.for Foraveraging a surge surge tank, tank, the actual actual value of the The rest ofthe thisproblem, paper iswhile structured as follows: Section 3 controller gain. For a the introduces the proposed control structure is presented in Section 4. Section 5 introduces the is presented in Section Section 5 introduces the gain, whereas averaging level control want within a low controller gain. Forimportant a surge tank, the of the ture level may may not for be important as long long asactual it we is value kept introduces the problem, while4. the proposed control struclevel not be as as it is kept within ture is presented in Section 4. Section 5 introduces the MPC formulation and simulation results are presented in andSection simulation results 5are presentedthe in controller Forimportant alimits surge(Shinskey, tank, theasactual value of and the MPCisformulation ˚ level may gain. notsafety be as long it is ˚ kept within its allowable allowable safety 1988; A str¨ m presented in 4. Section introduces MPC formulation and simulation results are presented in its limits (Shinskey, 1988; A str¨ oom and ture Section 6. A performance comparison is shown Section 7, Section 6. A performance comparison is shown Section 7, level may not be that important as long as1988; it is ˚ kept within its allowable safety limits (Shinskey, A str¨ o m and H¨ a gglund, 1995), is, to avoid overfilling or emptying MPC formulation and simulation results are presented in H¨ a gglund, 1995), that is, to avoid overfilling or emptying Section 6. A performance comparison is shown Section 7, while the paper is concluded in Section 8. ˚ while the paper is concluded in Section 8. its allowable safety limits (Shinskey, 1988; A str¨ o m and H¨ a gglund, 1995), that is, to avoid overfilling or emptying the tank. Section 6. A performance comparison is shown Section 7, the tank. while the paper is concluded in Section 8. H¨ agglund, the tank. 1995), that is, to avoid overfilling or emptying while the paper is concluded in Section 8. Fields of applications applications for for setpoint setpoint tracking tracking and and safety safety 2. the tank. Fields of 2. PROBLEM PROBLEM FORMULATION FORMULATION Fields of applications for setpoint tracking and safety control for levels in tanks are as diverse as drum boilers 2. PROBLEM FORMULATION control for levels in tanks are as diverse as drum boilers Fields of applications for setpoint tracking and safety 2. PROBLEM control levels where in tanks are dry-running as diverse as and drum boilers The control task is dampenFORMULATION in power powerforplants, plants, where both, dry-running and complete flow disturbances in a simin both, complete control for levels in tanks are as diverse as drum boilers The control task is dampen flow disturbances in a sim˚ in power plants, where both, dry-running and complete filling should should be be avoided avoided ((˚ Astr¨ str¨ om m and and Bell, Bell, 2000), 2000), gravity gravity The control task is dampen flowthe disturbances in a simple tank system, modeled with following filling A o tank system, with following differential differential in power plants, where and filling should (˚ A odry-running m and Bell, 2000), gravity separators in be theavoided miningboth, asstr¨ well as the the oilandcomplete gas inin- ple The control task modeled is dampen flowthe disturbances in a simple tank system, modeled with the following differential equation separators in the mining as well as oiland gas equation filling should be avoided (˚ A str¨ om and Bell, 2000), gravity as well as the separators in the mining oiland gas industry, where setpoint tracking and avoidance of complete ple tank system, modeled with the following differential equation dustry, where tracking andasavoidance of complete dh separators in setpoint the mining as well thetasks oil- and gasand in- equation dh = 11 (qin − qout ) , dustry, where setpoint tracking and avoidance of complete filling are are the most important control (Backi (1) filling the most important control tasks (Backi and (1) dh 1 (qin − qout ) , dt = a dustry, where setpoint tracking and avoidance of complete filling are the most control tasks (Backi and =a (1) Skogestad, 2017), andimportant waste-water sumps in the the chemical dt dh 1 (qin − qout ) , Skogestad, 2017), and waste-water sumps in chemical dt a filling are the most important control tasks (Backi and where h is the level (controlled variable CV), a denotes = (q − q ) , (1) ˚ in out Skogestad, 2017), and waste-water sumps in the chemical variable - CV), a denotes industry and and surge surge tanks tanks ((A Astr¨ str¨ m and and H¨ H¨ gglund, 2001). 2001). where h is the leveldt(controlled ˚ industry oom aaingglund, a the liquid 2 Skogestad, 2017), and waste-water sumps thechange chemical where h is the levelarea (controlled variable - CV), denotes 2 ), qin the cross-sectional of (here a = 11a m ˚ industry and surge tanks ( A str¨ o m and H¨ a gglund, 2001). ), qin the cross-sectional area of the liquid (here a = m Especially for the latter, minimization of the in Especiallyand forsurge the latter, minimization ofagglund, the change in denotes where h the is the levelarea (controlled variable - CV), denotes ˚ qin the cross-sectional of the(disturbance liquid (here a = 1a m volumetric inflow variable --22 ), DV), industry tanks (minimization Astr¨ osince m and H¨ 2001). Especially for the latter, of the change in denotes the volumetric inflow (disturbance variable DV), the outflow is highly desired, the incoming surge the outflowforis the highly desired, since theofincoming surge qin the cross-sectional areainflow of outflow. the(disturbance liquid (here a = 1residence m- ), denotes the volumetric variable DV), and q is the volumetric The nominal Especially latter, minimization the change in out the outflow is highly desired, since the incoming surge qoutthe is the volumetric outflow. The nominal residence should be be distributed distributed further further with with reduced reduced amplitude. amplitude. In In and −1 should 3(disturbance 3 nominal denotes volumetric inflow variable DV), −1 and q is the volumetric outflow. The residence of the theout tank is is ττ = =V V /q /q = = 11 m m3 /0.5 /0.5 m m3 min min = =2 2 min. min. the outflow isnothighly desired, since thewere incoming surge should be distributed with reduced In and of tank recent years, only further PI(D) controllers designed for 3 nominal recent years, not only PI(D) controllers wereamplitude. designed for qout is the The tank is τvolumetric = V /q = 1outflow. m33 /0.5 m min−1 = 2residence min. should be distributed further with reduced amplitude. In of the recent years, not only PI(D) controllers were designed for level control of tanks, but also fuzzy control approaches −1 3 We assume that have aa lower-layer level control of tanks, but also fuzzy control approaches of the tank is τ =we V /q = 1implemented m /0.5 m min = 2 min.flow We assume that we have implemented lower-layer flow recent years, not only PI(D) controllers were designed for level of tanks, butet (Tanicontrol et al., al., 1996; 1996; Petrov etalso al., fuzzy 2002),control as well well approaches as optimal optimal We assumeso implemented a lower-layer flow controller sothat that we qouthave is the the MV 22 .. The The inflow inflow and outflow outflow (Tani et Petrov al., 2002), as as controller that q is MV and out level control of tanks, but also fuzzy control approaches 2 (Tani et al., 1996; Petrov et al., 2002), as well as optimal We assume that we have implemented a lower-layer flow averaging strategies (McDonald et al., 1986; Campo and controller so that q is the MV . The inflow and outflow are assumed to be limited within q ≤ q ≤ q . With out averaging strategies (McDonald et al., 1986; Campo and are assumed to be limited within2 qmin ≤ q−1 ≤ and qmax . With min maxoutflow (Tani et 1989; al., 1996; Petrov 2002), wellCampo as optimal −1 3 ≤ so33 that qout is the MV .qThe inflow averaging strategies (McDonald et al., as 1986; and controller Morari, Rosander etetal., al.,al., 2012). −1 −1 are to be limited within q ≤ q . With 3 min qqminassumed = 0 m min and q = 1 m The tank is min max Morari, 1989; Rosander et 2012). max = 0 m3 to min and qmax = 1qm3 min is minassumed averaging strategies (McDonald et al., 1986; Campo and are be−1limited within ≤ q−1 ≤ The qmaxtank . With Morari, 1989; Rosander et al., 2012). min min q = 0 m min and q = 1 m The tank is min max −1 −1 2 Here, we assume  3 3 Morari, 1989; Rosander et al., 2012). that we we have level=control control in the direction direction of flow, flow, This work work was was supported supported in in part part by by the the Norwegian Norwegian Research Research CounCoun2  This qmin =we 0 assume m minthat and qmax 1 m in min The tank is Here, have level the of

This work was supported in part by the Norwegian Research Coun 2 Here, so that inflow the DV and the but cil under the project SUBPRO (Subsea processing). we assume control is inthe theMV, direction ofother flow, This work supported in part by theproduction Norwegianand Research Counso that the the inflow is isthat the we DVhave and level the outflow outflow is the MV, but in in other cil under thewas project SUBPRO (Subsea production and processing). 2 Here,  1 we assume have control is inthe theMV, direction ofother flow, This work was supported in part by the Norwegian Research Councases it may be It not affect in this corresponding author so that isthat the we DV and level the outflow 1 corresponding cil under the project SUBPRO (Subsea production and processing). cases it the mayinflow be opposite. opposite. It will will not affect the the results results inbut thisinpaper. paper. author 1 so that is the DV and not the outflow is results the MV,inbut other cilcorresponding under the project SUBPRO (Subsea production and processing). cases it the mayinflow be opposite. It will affect the thisinpaper. author 1 corresponding author cases it by may be opposite. will not affect the results in this paper. 2405-8963 © 2018, IFAC (International Federation of Automatic Control) Hosting Elsevier Ltd. AllItrights reserved. Copyright © 2018 835 Copyright 2018 IFAC IFAC 835 Control. Peer review© under responsibility of International Federation of Automatic Copyright © 2018 IFAC 835 10.1016/j.ifacol.2018.06.125 Copyright © 2018 IFAC 835

Adriana Reyes-Lúa et al. / IFAC PapersOnLine 51-4 (2018) 835–840

at its maximum level when h = 1 m, while an empty tank corresponds to h = 0 m. Actually, to be on the safe side, the level should stay within 0.1 ≤ h ≤ 0.9 m. So hmin = 0.1 m and hmax = 0.9 m. These limits are shown by the yellow dotted lines in the figures. Two types of inflow disturbances are assumed to act upon the process (1); namely, step-changes and sinusoidal variations. The period of the sinusoids is 6.28 min which is quite long compared to the nominal residence time of 2 min, which means that it will be difficult to dampen large sinusoidal disturbances without violating the level constraints. Furthermore, the level measurement can be noisy.

Kc,min qout

IFAC PID 2018 836 Ghent, Belgium, May 9-11, 2018

Kc Kc,max h

Fig. 1. Nonlinear relationship (solid lines) between level and outflow for case with three P-controllers.

3. SIMPLE CONTROLLER SCHEMES

Level

The main drawback of the three P-controller scheme is that the normal range (with low controller gain) can be quite narrow in terms of flow rates, as illustrated in Figure 1. Once we get out of the normal range and one of the high-gain P-controllers takes over, it remains controlling the level tightly at the high or low limit and dampening of inflow disturbances is lost, as shown in Fig. 2. Another problem with P-only control is that there is no level setpoint which the operator or a higher-level master 836

0

20

40

60

80

100

60

80

100

[m3/min]

Inflow 1 0.5 0 0

20

40

[m3/min]

Outflow 1 qout,min

0.5

qout,max

qout

0 0

20

40

qout,mid

60

80

100

time [min]

Fig. 2. Level control with three P-controllers. Kc = 0.33, Kc,max = Kc,min = 6.67. controller can manipulate. For example, the operator or master controller may want to set the level temporarily to a low value to prepare the systems for an expected large increase in the inflow. We therefore propose to use a modified three-controller scheme with the slow (normal) P-controller being replaced by a PI-controller, as discussed in the next section. However, before looking at this, let us consider the response with a single linear PI-controller. Level 2

[m]

This has led many authors to consider nonlinear controllers and MPC. The simplest nonlinear controller is a P-controller with a varying gain, that is, the gain is larger when the level approaches its safety limits. A simple implementation is to use three gain values as shown in Figure 1. The low gain works as an averaging controller when the flow changes are small (normal operation), and the two high gains track each boundary (˚ Astr¨ om and H¨ agglund, 2006). During normal operation, inflow disturbances are dampened by the low gain P-controller. Then, when the level approaches the upper limit, the P-controller with high gain takes over, avoiding overflow with a fast response. Similarly, the other high-gain P-controller takes over when the level approaches the lower limit. The scheme may be implemented with three P-controllers and a mid-selector which selects the middle controller output as the MV.

0.5 0

0

h, h,

c c

= 3 min = 0.5 min

-2 0

20

40

60

80

100

Flow 1

[m3 /min]

For a surge tank, the actual value of the level may not be important as long as it is kept within its allowable safety limits (Shinskey, 1988). Therefore, Shinskey argued that integral action should not be used in some cases, and proposed to use a P-only controller in the form, (2) qout = Kc · h, qmax Kc = . (3) hmax This controller gives qout = 0 when h = 0 and qout = qmax when h = hmax . Note that there is no level setpoint. Rewritten in terms of deviation variables there will be a ”setpoint”, but it has no practical significance as it is not well tracked (Rosander et al., 2012). For averaging level control, where we want a low controller gain, this is the P-controller with the lowest controller gain that satisfies the safety constraints. However, one problem is that the gain Kc = qmax /hmax may still be too large when the process is operating at normal conditions, resulting in too large variations in qout (MV) when there are smaller inflow disturbances.

[m]

1

0.5

q out,

c

q out,

c

= 3 min = 0.5 min

q in

0 0

20

40

60

time [min]

Fig. 3. Level control with PI-controller.

80

100

IFAC PID 2018 Ghent, Belgium, May 9-11, 2018

Adriana Reyes-Lúa et al. / IFAC PapersOnLine 51-4 (2018) 835–840

Figure 3 depicts the response with a slow and a fast PIcontroller to step and sinusoidal inflow changes. Both are tuned using the SIMC rules (Skogestad, 2003), in which the tuning parameter, τc , corresponds to the closed loop time constant. Anti-windup with back-calculation is also implemented. The fast PI-controller (green lines), with a short closed loop time constant, τc = 0.5 min (Kc = 2, τI = 2 min), keeps h within the safety constraints, but fails to dampen the sinusoidal input during normal operation (qout ≈ qin ). On the other hand, the slow PI-controller (blue lines), with τc = 3 min (Kc = 0.33, τI = 12 min), performs well during normal operation, dampening the sinusoidal signal on qout . However, the response is too slow when qin has sudden changes close to its limits, and safety and physical constraints on h are clearly violated. 4. PROPOSED CONTROL STRUCTURE FOR IMPROVED LIQUID LEVEL CONTROL The purpose of this study is to develop a simple, yet efficient control structure for averaging level control based on easy-to-tune P and PI algorithms. We propose a nonlinear control scheme in which the selection is done based on the output of three controllers. The overall structure of the proposed controller is demonstrated in Fig. 4.

hmax,sp

Cmax(P)

hsp hmin,sp

qout,max

qout,mid Cmid(PI) Cmin(P)

qin mid

qout

Plant

qout,min h

Fig. 4. Proposed PIPP control structure with one PIcontroller and two P-controllers to track safety limits Three different controllers calculate qout (PIPP control strategy): • cmid : PI-controller that tracks the actual desired value for the level, hsp . This is a ”slow” controller with a low gain Kc , designed to dampen the response for disturbances in qin during normal operation. • cmax : P-controller with a large gain, |Kc,max |  |Kc |, which avoids violation of the maximum liquid level. • cmin : P-controller with a large gain, |Kc,min |  |Kc |, which avoids violation of the minimum liquid level. The core of the proposed scheme is a mid-selector, based on the output of the three controllers. The proportional parts of the controllers behaves in a similar fashion as the nonlinear three P-controllers described in Section 3 (Fig. 1). During normal operation, the output of the PI-controller, qout,mid , will be the mid-value. When the level approaches the upper limit, the controller cmax will give an output signal qout,max > 0, which becomes the middle value, increasing the outflow to avoid overflow. Accordingly, when the level decreases close to the lower limit, cmin will take over, preventing the tank from emptying. Contrary to the scheme with three P-controllers presented in Section 3 (Fig. 2), the ”slow” PI-controller will always take over after some time due to integral action, which 837

837

should not be limited by anti windup. It will bring the level back to normal operation and dampen oscillations. 4.1 Tuning For tuning of the cmid PI-controller for normal operation,   1 1 , K(s) = Kc 1 + τI s we recommend to use the SIMC tuning rules (Skogestad, 2003), with the following parameters for integral processes: 1 Kc =  and τI = 4(τc + θ), (4) k (τc + θ) where θ is the process time delay, and k  is the slope of the integral process (∆y/(∆t · ∆u)). In our case study θ = 0 and k  = 1. The only tuning variable for the PI-controller is the desired closed-loop time constant, τc , which should be selected long enough to dampen the response for inflow disturbances. Instead of selecting τc , one can select the controller gain and from this get τc . As a starting point for the controller gain one may use the value Kc = qmax /hmax ≈ 1/1 = 1 for the slowest single Pcontroller, see (3). Here, we reduce it by a factor 3, because we want to have smaller MV (outflow) variations. Thus, we select τc = 3 min which gives Kc = 0.33, τI = 12 min. For the two P-controllers, qout,max = Kc,max (h − hmax,sp ) + qout,bias (5a) (5b) qout,min = Kc,min (h − hmin,sp ) + qout,bias In order to have a wide operation range for the PIcontroller (dampening effect), we select a large controller gain for the P-controllers, Kc,max = Kc,min = 20 Kc ≈ 6.7. We use (5) to find hmax,sp and hmin,sp , such that we have a fully open valve (qout = qout,max = 1 m3 min−1 ) when the level is at the upper limit (h = hmax = 0.9 m), and a fully closed valve (qout = qout,min = 0 m3 min−1 ) when the level is at the lower limit ( h = hmin = 0.1 m). We use the nominal value for qout as the bias, qout,bias = 0.5 m3 min−1 . For example, hmax,sp = hmax − (qout,max − qout,bias )/Kc,max , hmax,sp = 0.9 m −

(1 − 0.5) m3 min−1 = 0.825 m 6.7 m2 min−1

4.2 Simulation Fig. 5 shows the response of the proposed PIPP control structure when the process is subject to a sinusoidal disturbance and a large step change. The process starts at steady state, with h = hsp = 0.5 m, which represents normal operation. Hence, the selected MV-signal is qout,mid , the output of cmid . The output of the P-controller cmax is a closed valve, qout,max = 0 m3 min−1 , while the output of cmin is a fully open valve, corresponding to qout,min = 1 m3 min−1 . At t = 30 min, qin increases to an average of 0.9 m3 min−1 . Then, P-controller cmax takes over as qout,max increases and becomes the middle value. Eventually, at t ≈ 55 min, the output from the PI-controller, qout,mid , again becomes the middle value and brings the level back to its nominal setpoint. When this happens the variations in the outflow again become much reduced.

IFAC PID 2018 838 Ghent, Belgium, May 9-11, 2018

Adriana Reyes-Lúa et al. / IFAC PapersOnLine 51-4 (2018) 835–840

solved using qpOASES (Ferreau et al., 2014). The plant simulator is solved with an ode15s solver. We simulate 2000 MPC iterations with a sample time of ∆t = 0.1 min. The prediction horizon of the MPC controller is set to 5 min resulting in N = 50 prediction steps.

Level [m]

1 0.5 0 0

20

40

60

80

100

6. COMPARISION OF SIMPLE PIPP SCHEME WITH MPC

[m3/min]

Inflow 1 0.5

In this section we present simulation results for four different cases, in which the inflow, qin , is the disturbance:

0 0

20

40

60

80

100

(1) (2) (3) (4)

[m3/min]

Outflow 1 qout,min

0.5 0

qout,max

qout,mid

qout

0

20

40

60

80

Fig. 5. Simulation of proposed PIPP control structure. 5. MPC IMPLEMENTATION In order to have a benchmark to compare our simple PIPP scheme, we design a standard MPC controller. The optimal control problem is first discretized into a finite dimensional optimization problem divided into N elements, which represents the length of the prediction horizon. Hence, each interval is in [tk , tk+1 ] for all k ∈ {1, . . . , N }, where we use a third order direct collocation Radau scheme for the polynomial approximation of the system trajectories for each time interval [tk , tk+1 ]. The resulting discretized system model is represented as: (6) hk+1 = f (hk , qin,k , qout,k ), where hk represents the differential state from (1), qin,k is the DV (inflow) and qout,k denotes the MV (outflow), all at time step k. Once the system is discretized, the MPC problem can be formulated as N N   2 2 ω1 (hk − hsp ) + ω2 (qout,k − qout,k−1 ) min k=1

k=1

(6) hmin ≤ hk ≤ hmax qout,min ≤ qout,k ≤ qout,max h0 = hinit qout,0 = qout,init

changes changes changes changes

in in in in

qin qin and measurement noise sinusoidal qin higher frequency sinusoidal qin

In all simulations, the level setpoint is hsp = 0.5 m, and the plant is subject to the same step changes of qin : +0.2 m at t = 50 min, +0.2 m at t = 100 min, and +0.05 m at t = 150 min, with an initial value of qin = 0.5 m3 min−1 . In case 3, the amplitude is 0.05 m3 min−1 and the frequency is 1 rad min−1 . In case 4, the frequency is increased to 2 rad min−1 .

100

time [min]

s.t.

Step Step Step Step

(7a) (7b) (7c) (7d) (7e)

with hmin = 0.1 m, hmax = 0.9 m, qout,min = 0 m3 min−1 and qout,min = 1 m3 min−1 . The objective function comprises of a term for level setpoint tracking as well as a term penalizing changes in the manipulated variable qout between time steps k − 1 and k. Constraint (7a) defines the model dynamics, whereas constraint (7b) enforces the level to remain between the bounds, hmin and hmax , respectively. Upper and lower bounds are also enforced for the manipulated variable as qout,min and qout,max in (7c). We assume that the level is measured. At each iteration, the initial conditions for the states are enforced in (7d) and (7e). The dynamic optimization problem is setup as a QP problem in CasADi v3.1.0 (Andersson, 2013), which is then 838

The parameters for the plant model (1) are k  = 1 and θ = 0 min. For every case, the SIMC tuning parameter, τc , was set to 3 min. Then, Kc = 31 , τI = 12 min, and Kc,max = Kc,min = 20 Kc . For every case, we compare the response of our proposed structure with the aforementioned MPC implementation. The MPC tunings were the same for all the cases with ω1 = 1 and ω2 = 130. 6.1 Case 1: steps in the inflow As seen in Fig. 6, the constraints on the level and the output are satisfied and overall tracking performance is satisfactory for both controllers in this simple tracking case without disturbances or added noise. Note that in the case of the proposed PIPP controller, the PI-controller effectively dampens the oscillations in the beginning, and qout = qmid,out . When the disturbance is large and the level approaches the upper limit at t ≈ 50 min, cmax takes over and qout = qmax,out . This avoids overflow of the tank. Then, at t ≈ 60 min, cmid takes over again. We observe a similar behavior at t ≈ 110 min. 6.2 Case 2: steps in the inflow plus noisy measurement Fig. 7 shows the effect of the added measurement noise for the level in both controllers. The level can still be maintained around the nominal value hsp = 0.5 m and all constraints are satisfied. A drawback of using a high gain for the P-controllers is that measurement noise is magnified in qout when the h is close to the limits. 6.3 Case 3: sinusoidal inflow In this case we aim for the minimization of the change in qout . Fig. 8 shows the effect of the different gains of the proposed controller on the dampening of the sinusoidal qin . It can be seen that qout is heavily reduced in amplitude compared to qin and that the level constraints are satisfied. For the MPC, we penalize the difference in two subsequent values for qout more heavily than deviations from the level setpoint hsp = 0.5 m.

IFAC PID 2018 Ghent, Belgium, May 9-11, 2018

Adriana Reyes-Lúa et al. / IFAC PapersOnLine 51-4 (2018) 835–840

Level

Level 1

[m]

[m]

1 0.5 0

0.5 0

0

50

100

150

200

0

50

1 0.5 0 50

100

150

150

200

0.5

200

0

50

1 0.5

MPC PIPP

0 0

50

100

100

Outflow [m3/min]

[m3/min]

200

1

Outflow

150

1 0.5

MPC PIPP

0

200

0

50

time [min]

100

150

200

time [min]

Fig. 6. Response of proposed control structure and MPC with step changes in qin (case 1).

Fig. 8. Response of proposed control structure and MPC with sinusoidal qin (case 3).

Level

Level

1

1

[m]

[m]

150

0 0

0.5 0

0.5 0

0

50

100

150

200

0

50

Inflow

100

150

200

150

200

Inflow

1

[m3/min]

[m3/min]

100

Inflow [m3/min]

[m3/min]

Inflow

0.5 0

1 0.5 0

0

50

100

150

200

0

50

Outflow 1 0.5

MPC PIPP

0 0

50

100

100

Outflow [m3/min]

[m3/min]

839

150

1 0.5

MPC PIPP

0

200

0

50

time [min]

100

150

200

time [min]

Fig. 7. Response of proposed control structure and MPC with step changes in qin and measurement noise (case 2). 6.4 Case 4: Higher frequency sinusoidal inflow Fig. 9 shows the results with a higher frequency sinusoidal disturbance (2 rad min−1 ). The faster sinusoid is easier to handle and by comparing Fig. 9 with Fig. 8, we observe that qout is smoother. Level constraints are also satisfied in this case. We note that the outflow variations are smaller with PIPP than with MPC in this case. 7. COMPARISON OF PERFORMANCE OF PROPOSED STRUCTURE AND MPC Table 1 shows the Integral Absolute Error (IAE) for deviations from the level setpoint for each of the previously 839

Fig. 9. Response of proposed control structure and MPC with higher frequency sinusoidal qin (case 4). presented cases, both for the proposed PIPP control structure and MPC. Table 1. Deviation of the level from its setpoint. Case 1 2 3 4

Proposed PIPP structure 16.19 16.77 19.15 17.47

MPC 3.33 9.04 8.76 5.79

Table 2 presents the IAE for deviations from the outflow to the steady inflow reference without added sinusoidal (compare Fig. 6 and 8). Furthermore, deviations from the steady inflow to the inflow that is used in the respective

IFAC PID 2018 840 Ghent, Belgium, May 9-11, 2018

Adriana Reyes-Lúa et al. / IFAC PapersOnLine 51-4 (2018) 835–840

cases (without and with added sinusoidal) is shown as ’inflow deviation’. A clear reduction in deviations from the outflows compared to the respective inflows can be seen for cases 3 and 4, which are the cases with added sinusoidal disturbances. We can also pinpoint that the proposed controller performs better with high frequency disturbances, as the deviation is lower in case 4 (high frequency) compared to case 3 (low frequency). Table 2. Deviation of the outflow from the steady inflow setpoint. Case 1 2 3 4

Proposed PIPP structure 1.75 2.24 3.24 2.56

MPC 1.19 2.46 4.06 2.42

Inflow deviation 0 0 6.37 6.35

REFERENCES

Another performance index that could be used to quantify how the outflow is smoothed is the ”total variation” or integrated absolute variation of the MV, corresponding to the sum of all ”moves” of the MV:  N −1    qout,k − qout,k−1    (8)   tk − tk−1 k=0

As we desire to smoothen qout , this value should be as small as possible. Table 3 shows this performance index. It can be observed that the best performance of the proposed PIPP structure is when there is no measurement noise (cases 1, 3 and 4). In these cases, the PIPP performance is better than the presented MPC implementation. This can partly be explained because in the presence of noise (case 2), when the level (CV) is close to the limits, the high gain P-controllers take over and qout (MV) is correspondingly moved aggressively, see Fig. 7. Table 3. Total outflow variation Case 1 2 3 4

Proposed PI structure 5.56 123.38 27.35 28.23

upper and lower limits. Additionally, it gives the possibility to track the desired level setpoint in the presence of disturbances and noise. When compared to standard MPC, the proposed structure has the advantage that implementation of PI structures is simpler and computational times are consistently and substantially shorter. Additionally, tuning of PI controllers using the SIMC rule is fast and uncomplicated compared to tuning of MPC. The presented approach is particularly convenient for surge tanks with relatively small volumes, where it is difficult to get dampening of flow disturbances without violating liquid level constraints.

MPC 6.88 13.40 37.15 34.89

For all simulation cases, simulation times for the proposed structure were in the range 0.9 ± 0.04 s, whereas the runtime for the MPC was in the range of 88.4 − 177.6 s, depending on the case. The long runtime for the MPC was mostly due to the relatively large horizon of N = 50. 8. CONCLUDING REMARKS In this paper, we presented a simple, yet efficient level control structure for setpoint tracking and safety-related lower and upper constraint satisfaction in industrial tanks. The proposed PIPP control algorithm relies in simple and easy to tune P and PI controllers. The proposed method performs much better than standard PI controllers and has a performance comparable to standard MPC in the the exact same simulation cases. These cases include the investigation of sinusoidal and step disturbances for the inflow and white noise added to the level measurement, respectively. The proposed controller is not only able to effectively smoothen the use of the controlled variable, it is furthermore able to avoid violation of the safety constraints on 840

Andersson, J. (2013). A General Purpose Software Framework for Dynamic Optimization. Phd thesis, Arenberg Doctoral School, KU Leuven. ˚ Astr¨om, K.J. and Bell, R.D. (2000). Drum-boiler dynamics. Automatica, 36, 2000. ˚ Astr¨om, K.J. and H¨agglund, T. (2001). The future of PID control. Control Engineering Practice, 9, 2001. ˚ Astr¨om, K.J. and H¨agglund, T. (1995). PID Controllers Theory, Design, and Tuning. ISA, 2nd edition. ˚ Astr¨om, K.J. and H¨agglund, T. (2006). Advanced PID Control. ISA. Backi, C.J. and Skogestad, S. (2017). A simple dynamic gravity separator model for separation efficiency evaluation incorporating level and pressure control. In Proceedings of the 2017 American Control Conference. Seattle, USA. Campo, P.J. and Morari, M. (1989). Model Predictive Optimal Averaging Level Control. AIChE Journal, 35(4), 579–591. Faanes, A. and Skogestad, S. (2003). Buffer Tank Design for Acceptable Control Performance. Industrial & Engineering Chemistry Research, 42(10), 2198–2208. doi: 10.1021/ie020525v. Ferreau, H.J., Kirches, C., Potschka, A., Bock, H.G., and Diehl, M. (2014). qpOASES: a parametric active-set algorithm for quadratic programming. Mathematical Programming Computation, 6(4), 327–363. McDonald, K.A., McAvoy, T.J., and Tits, A. (1986). Optimal Averaging Level Control. AIChE Journal, 32(1), 75–86. Petrov, M., Ganchev, I., and Taneva, A. (2002). Fuzzy PID Control of Nonlinear Plants. In Proceedings of the 1st International IEEE Symposium on Intelligent Systems, 30–35. IEEE, Varna, Bulgaria. Rosander, P., Isaksson, A.J., L¨ofberg, J., and Forsman, K. (2012). Practical Control of Surge Tanks Suffering from Frequent Inlet Flow Upsets. In R. Vilanova and A. Visioli (eds.), IFAC Conference on Advances in PID Control. Elsevier Ltd, Brescia, Italy. Shinskey, F. (1988). Process Control Systems. McGrawHill, 3rd edition. Skogestad, S. (2003). Simple analytic rules for model reduction and PID controller tuning. Journal of Process Control, 13, 291–309. Tani, T., Murakoshi, S., and Umano, M. (1996). NeuroFuzzy Hybrid Control System of Tank Level in Petroleum Plant. IEEE Transactions on Fuzzy Systems, 4(3), 360–368.