Implementation of Internal Model Control for Flow Control Application Deepti Khimani
Swati Mane
M.D.Patil
V.E.S. Institute of Technology University of Mumbai, India E-mail:
[email protected]
K.K. Institute of Technology, R.S.T.M. University, Nagpur E-mail:
[email protected].
V.E.S. Institute of Technology University of Mumbai, India E-mail:
[email protected]
Abstract—This paper presents results of implementation of an Internal Model Control (IMC) based controller for the flow control application to meet robust performance. In this paper, implementation of IMC based controller for flow control application to achieve the set point tracking in presence of load disturbance is discussed. To show the disturbance rejection ability of IMC based controller, results of the flow control system using IMC based controller are compared with the results using a PID controller for the same system.
I.
I NTRODUCTION
In process industries almost all processes are controlled using conventional methods and very often by PID control. In such designs, disturbance is assumed to be zero. Also, the conventional control is always designed around the model of the plant to meet the desired response specifications. However, in the practical implementation, the system performance is always hampered because of a mismatch in plant and model. To solve the problem of disturbance and model mismatch, several modern control techniques such as H2 and H∞ ,optimal control techniques and parametric robustness methods are found abundantly in literature, see [3],[14] and references therein. All these are modern control techniques and involve complex mathematical design procedures. However in process industries these algorithms are not suitable, as the motive is higher productivity with cost-effective and commonly available process control solutions. The IMC is a process model approach designed to get optimal set point tracking and load disturbance rejection in a simple manner [9]. IMC structure was introduced by [5], which was essentially based on the classical work of [4] called as an internal model principle. IMC uses the philosophy of internal model principle that incorporates the process model implicitly or explicitly in the control system. An essence of this principle is that if an exact model of the process is available, then perfect control is theoretically possible. There are number of advantages of the IMC structure and the controller design procedure such as –
IMC controller can even be designed for non invertible plant
–
closed loop stability is assured simply by choosing a stable ’IMC controller’.
–
closed loop performance characteristics like settling time are related directly to controller parameters,
which makes online tuning of the IMC controller very convenient. –
IMC control structure can be formulated in the standard feedback control structure and quite often PID control structure, see [11]
In recent years, flow control has become a highly multidisciplinary research activity encompassing theoretical, computational and experimental fluid dynamics, acoustics, control theory, physics, chemistry, biology and mathematics. In the field of chemical engineering, controlling the fluid flow rate is an important operation in almost every process plant, see [12], [7] for various applications. The flow control loop essentially comprises control valve, flow meter and a controller. The flow dynamics is dependent on the restriction to the flow and fluid properties. Typically in the flow loop, restriction to the flow are offered by control valve which is a variable restriction, flow meter that restricts the flow to measure the differential pressure, bends and joints that connects pipes in desired fashion. Fluid properties such as density, type of flow etc. together with restrictions completely determine the dynamical behaviour of a flow rate. Flow control using some other techniques such as use of control valve restriction for measurement and control is found in [1] or use of fuzzy logic control in [10]. In [13], Luenberger observer based output feedback control is designed and implemented on experimental setup of flow control loop. In this paper, IMC based control is designed and implemented on experimental setup of fluid flow control system. Results of the IMC based flow control system are compared with results obtained from the PID based control on the same experimental setup. Controllers are implemented in R real time environment of MATLAB . The toolboxes used R R are Simulink , Real-Time Workshop and Control System R Toolbox . II.
P ROBLEM F ORMULATION
Flow control system is usually considered to be the fastest among other processes. The lag in process itself is negligible so the response time of entire process control system is mostly result from lags in measurement system, control valve and transmission lines. Model of various components include the flow control system are as follows.
4-20 mA
I/P
u(t)
+ -
Q(s)
r(t)
d(s)
˜ d(t) 3-15 psig
Controller Process
d(t)
u(s)
e(s) Q(s)
+−
y(s) Gp (s)
+ +
y(t) DPT
˜p (s) G
y˜(s) + −
˜ d(s)
Flow Out
Flow In
Fig. 1.
r(s)
Flow y˜(t) Dynamics + (Model)
block diagram of flow control using IMC Fig. 2.
Internal model control structure
A. Process Model The model of the process for a system is because of lags in restrictions in form of bends and joints, length of pipe and because of measuring and controlling elements. If the pipelines carrying the fluid are small in length, total lag in flow loop is often neglected. However, if the process fluids such as gas or oil which are transported through miles long pipes, appreciable process lag exists because of compression of fluid and expansion of pipes. Although process response time is very small, it can be modelled as Gp (s) =
kv τp s + 1
(1)
B. Control Valve The control valve is the one which alters the process conditions. If the opening of control valve is slightly increased, the pressure drop through the valve decreases. The difference between available head and total friction loss causes the fluid to accelerate. The first order response of the linear control valve to the change in valve position is often given by Gv (s) =
kv τv s + 1
(2)
The linear control valve is desirable when process gain is constant, however in many systems process gain decreases as flow increases. Therefore to maintain the loop gain constant, equal percent valve is used. The change in flow rate is relatively small when the valve plug is near its seat and relatively high when the valve plug is nearly wide open. Therefore, a valve with an inherent equal-percentage flow characteristic provides precise throttling control through the lower part of the travel range and rapidly increasing capacity as the valve plug nears the wide-open position, refer [6]. So the process and valve dynamics together could be treated as first order dynamics as in (2) C. Measurement System In most of the cases pressure drop across the restriction such as orifice, venturi or flow nozzles is used for flow measurement. In manometric measurement the dynamical behavior is modelled as second order under damped dynamics with usually natural frequency of 12 to 1 cycles per sec. However a valve between two legs of manometer is used to change its damping critical (ξ = 1) so that at lower frequencies the response matches to the response of first order system. In case of electronic differential pressure transmitters the response
time is relatively faster than manometers or other flow meters. Therefore the model of the flow meter including square root extractor is always considered to be first order with small time constant. km Gm (s) = (3) τm s + 1 Cascade effect of (1), (2) and (3) result in flow system dynamics given by G(s)
= Gp (s)Gv (s)Gm (s) k = (τp s + 1)(τv s + 1)(τm s + 1)
(4)
where k = kp kv km . D. Disturbances in Process Disturbances in flow control applications are fluctuations in flow. which are usually originated from pump or compressor. Mostly the disturbances are not apparent in many systems because of heavily damped measurement system. However, part of noise which actually changes fluid flow are to fast to be corrected by controller. This disturbance is matched disturbance as it is coming from input line. The process model with input u(s) and disturbance d(s) is given by y(s) =
k [u(s) + d(s)] (τp s + 1)(τv s + 1)(τm s + 1)
(5)
In this paper, second order process model for control design is identified by considering the unity gain measurement i.e G(s) = III.
y(s) k0 = u(s) + d(s) (τp s + 1)(τv s + 1)
(6)
I NTERNAL M ODEL C ONTROL
This section essentially covers the well known IMC theory. The IMC structure and its properties are revisited, based on which the controller is designed and implemented on experimental set up. IMC structure consists of closed loop controller, which acts as open loop controller in case of exact model with no disturbance. Main advantage of this control structure over the open loop control is that perfect disturbance rejection can be achieved in case of minimum phase causal systems. Fig. 2 shows the typical IMC structure. Gp (s) and Q(s) ˜ p (s) are plant and controller transfer functions respectively. G
represents plant model. r(s), u(s) and y(s) are reference input, ˜ = y(s) − y˜(s) is control and output signals respectively. d(s) the plant-model mismatch. Define, ˜ p (s) := Gp (s) − G ˜ 1 − Gp (s)Q(s) ε(s) := 1 + ∆Gp (s)Q(s) Gp (s)Q(s) η(s) := 1 + ∆Gp (s)Q(s)
∆Gp (s)
(7a) B. IMC Design Procedure (7b) (7c)
Follow from the Fig. 2, e(s) = r(s) − ∆Gp (s)u(s) − d(s) u(s) = Q(s)e(s) Q(s) ⇒ u(s) = (r(s) − d(s)) (8) 1 + ∆Gp (s)Q(s) y(s) = Gp (s)u(s) + d(s) Gp (s)Q(s) = (r(s) − d(s)) + d(s) 1 + ∆Gp (s)Q(s) ˜ p (s)Q(s)]d(s) Gp (s)Q(s)r(s) [1 − G ⇒ y(s) = + (9) 1 + ∆Gp (s)Q(s) 1 + ∆Gp (s)Q(s)
The first problem in setting the controller transfer function as model inverse is the RHP zeros and delay element. So in IMC design, factor the plant model into non-invertible ˜ p+ (s) that has all RHP zeros and delay function, and part G ˜ p− (s) which is stable and does not involve invertible part G predictions. ˜ p (s) = G ˜ p+ (s)G ˜ p− (s) G (11) ˜ −1 (s) Next step is to design IMC controller based on G p− instead of model inverse. However, another problem involved ˜ p− (s) is strictly proper then it’s inverse in inversion is that, if G becomes improper. This problem is solved by using low-pass ˜ −1 (s) so that controller becomes at filter f (s) along with G p− least semi-proper. ˜ ˜ −1 (s)f (s) Q(s) =G p−
(10)
It is clear from the (10) that effect of disturbance d(s) is governed by a sensitivity transfer function ε(s) while tracking of reference input r(s) is governed by complementary sensitivity transfer function η(s).
From (11)-(12), we have ˜ p+ (s)G ˜ p− (s)G ˜ −1 (s)f (s) = G p− ˜ p+ (s)f (s) = G (13) ˜ Gp (s)Q(s) = Gp (s)Q(s) + ∆Gp (s)Q(s) ˜ p+ (s) + ∆Gp (s)G ˜ −1 (s)]f (s) (14) = [G p−
Substituting in (9), we get y(s)
=
A. Properties of IMC structure Advantages of the IMC structure can be seen through following properties. ˜ p (s) = Gp (s) and Q(s) = G ˜ −1 1) Perfect Control: If G p (s), then η(s) = 1 and ε(s) = 0. i.e. if the model is perfect and controller is model inverse then perfect reference input tracking and perfect disturbance rejection is achieved. 2) Internal Stability: In an internally stable control system, bounded input signal introduced at any point results in bounded ˜ p (s) = Gp (s), output signals at any other point in the loop. If G then the system is internally stable if Gp (s) and Q(s) are both stable. 3) Asymptotic Properties: For stable IMC structure, if ˜ p (s)Q(s) = 1 lim G
s→0
then the system is Type 1. This implies that steady state response error vanishes for all asymptotically constant inputs r(s) and d(s). If
d ˜ [Gp (s)Q(s)] = 0 ds then the system is Type 2. This implies that steady state response error vanishes for all ramp type inputs r(s) and d(s) lim
s→0
(12)
˜ p (s)Q(s) G
From (7b) and (7c), y(s) = η(s)r(s) + ε(s)d(s)
˜ p (s) 6= Gp (s), perfect Remark 1: Even if practically G ˜ −1 disturbance rejection can be achieved with Q(s) = G p (s). However, other problems of the perfect control as discussed in the starting of this section are considered in design procedure of IMC control.
+
˜ p+ (s) + ∆Gp (s)G ˜ −1 (s)]f (s)r(s) [G p− 1 + ∆Gp (s)Q(s) ˜ p+ (s)f (s)]d(s) [1 − G 1 + ∆Gp (s)Q(s)
(15)
If model is perfect then closed loop output is governed by ˜ p+ (s)f (s)r(s) + [1 − G ˜ p+ (s)f (s)]d(s) y(s) = G
(16)
From (16), it is clear that response of the system is determined ˜ p+ (s) and f (s) unlike classic control structure. directly via G However, factorization (11) and selection of f (s) needs to be addressed to serve the purpose. 1) Factorization of the plant and filter design: From (15), the input-output error ∆y(s) := y(s) − r(s) can be written as ∆y(s) =
˜ p+ (s)f (s) 1−G [r(s) − d(s)] 1 + ∆Gp (s)Q(s)
(17)
˜ p+ (jω)f (jω)| = 1 for all ω Follow from (17), selecting |G minimizes integral square error (ISE), refer [8]. Good option ˜ p+ (s) as all-pass to achieve the minimum ISE is to factor out G filter and choosing f (s) with repeated negative real poles with the order sufficiently large to make the controller proper. So ˜ p (s) contains i RHP zeros with input delay of θ sec. when G ˜ then Gp+ (s) can be factored out as, Y −a+i s + 1 ˜ p+ (s) = exp(−θs) G , Re(a+i ) > 0 (18) a+i s + 1 i
and typically filter is chosen as
D. Current to Pressure Converter
1 (19) f (s) = (λs + 1)γ ˜ p− (s) and λ determines the where γ is relative degree of G speed of response.
Current to pressure converter is primarily used to convert the controller output, a current signal of a range 4-20 mA into the pneumatic signal in the range of 3-15 psi. In our setup, Moore, Model 77 Current-to-Pneumatic Transducer is used, which is designed specifically for measuring circuits, converts the output of an electronic measuring device to a pneumatic signal for indication, recording, computation, or control purposes. The Model 77 is typically used to signal a valve positioner.
Remark 2: When it is desirable to track ramp type of reference inputs, one finite zero is added to the filter (19), see [2]. Typically filter transfer function chosen for ramp type inputs that minimizes ISE is, γλs + 1 f (s) = (20) (λs + 1)γ ˜ p+ (s) = 1 Remark 3: In case of minimum phase system G and one only needs to design filter as in (19) or (20). IV.
E XPERIMENTAL S ETUP
In an experimental setup for the flow control system, water pumped from small reservoir is circulated and discharged in the same reservoir. The flow control system is prepared with following components. A. Control Valve The most common final control element in the process control industries is the control valve. It is essentially a variable restriction that manipulates a flowing fluid, such as gas, steam, water, or chemical compounds, to compensate for the load disturbance and keep the regulated process variable as close as possible to the desired set point. In most physical systems, the inlet pressure decreases as the rate of flow increases, for this reason, equal percentage is the most common valve characteristic for flow control operation. In equal percentage valve flow capacity increases exponentially with valve trim travel. Equal increments of valve travel produce equal percentage changes in the existing Cv. In our system pneumatic Equal % valve with valve positioner is used for the restriction to the water flow. B. Differential Pressure Transmitter In the experimental setup, Simens, SITRANS P-Series, DSIII transmitter is used. It is a microcontroller -based transmitter with inbuilt pressure to current conversion transducer for measurement of differential pressure. A measuring cell senses the applied process pressure and provides an analog output signal that is proportional to applied pressure. An analog-to-digital converter produces a digital signal for the microcontroller. The microcontroller modifies and corrects the signal for linearity and temperature, and a D to A converter produces a 4-20 mA output signal for the loop. C. HART Communicator The Model 275 Universal HART Communicator is a handheld interface that provides a common communication link to SITRANS P-series transmitters and other HART-compatible instruments. The HART Communicator connects to and communicates with a transmitter or other HART device using a 4-20 mA loop, using a minimum load resistance of 250 ohms is present between the Communicator and the power supply. Here HART communicator is used to calibrate the transmitter.
E. Data Acquisition and conversion The National Instruments PCI-6221 is a multifunction M Series data acquisition (DAQ) board optimized for costsensitive applications. It incorporates advanced features such as the NI-STC-2 system controller, NI-PGIA-2 programmable amplifier, and NI-MCal calibration technology to increase performance and accuracy. For functioning of the DAQ card, NI-DAQmx driver Software is installed in Microsoft Windows Environment. This DAQ card can draw 24 mA (digital lines) for relay and actuator control and it can drive up to four analog outputs, two 80 MHz counter/timers, and six DMA channels. This device can execute multiple control loops simultaneously. F. Software Environment The observer and state feedback is implemented in R . The toolboxes used real time environment of MATLAB R R and Control System , Real-Time Workshop are Simulink R Toolbox . The dyanmical model of the open loop flow control system is identified from the acquired data. V.
R ESULTS OF EXPERIMENTS
A. Process Description and Controller Design Open loop flow model of the experimental system is identified as 8.702 ˜ p (s) = G (21) 2 s + 6.963s + 6.012 Factorization of (21) gives, 2 ˜ p+ (s) = 1 and G ˜ p− (s) = s + 6.963s + 6.012 (22) G 8.702 Choosing the filter f (s) as in (19) with time constant λ = 1 sec., 1 f (s) = (23) (s + 1)2
So the IMC controller for the flow control system is given by, 2 ˜ p− (s)f (s) = 0.1149s + 0.8s + 0.6908 Q(s) = G (s + 1)2
(24)
R In MATLAB real-time environment, ode5 solver with fixedstep size (fundamental sample time) and sampling time for DAQ I/O are set to 0.2 sec. Therefore discrete-time model and the control as in (21) and (24) are implemented with sampling period of 0.2 sec are given by ˜ p (z) = 0.113z + 0.07124 G (25) z 2 − 1.121z + 0.2484
4.5
4
4
3.5
3.5
3
r(t), y(t)
r(t), y(t)
4.5
2.5 2 1.5
2 1.5
r(t) y(t)
1 0.5 0
3 2.5
10
20
30
40
50
60
70
80
90
r(t) y(t)
1 0.5 0
100
10
20
30
40
t
50
60
70
80
90
100
t
Fig. 3. Flow rate y(t) response to step r(t) using IMC control with no load disturbance
Fig. 5. Flowrate y(t) response to step r(t) using PID control with no load disturnabce.
5 5
3
4
2
3
u(t)
u(t)
6 4
2
1 1 0 0 −1 0
10
20
30
40
50
60
70
80
90
100
−1 0
t
Fig. 4.
0.1149z 2 − 0.08469z − 0.007526 z 2 − 1.637z + 0.6703
20
30
40
50
60
70
80
90
100
t
controller output u(t) using IMC control with no load disturbance
Q(z) =
10
(26)
Fig. 6.
controller output u(t) using PID control with no load disturbance.
Remark 5: As the demand of the flow rate increases to span value, the response becomes sluggish because of exponential relationship between % opening of valve and controller signal.
B. Ranges and Calibration The flow control system is calibrated for 10% to 90% of flow rate that corresponds to 4 to 20 mA controller signal (3 to 15 psi after conversion). 1 unit of step reference (and response magnitude) represents 20% of flow, therefore for 10% to 90% of flow rate, reference input range is 0.5 to 4.5 units. Following responses shows the responses in normalized scale. Remark 4: In the beginning of the process, valve should be opened to maximum to fill the entire loop with fluid. Therefore initially this introduces certain lag. C. Responses Fig. 3 shows, with no load disturbance, the real time flow rate for step reference of different magnitude using IMC controller (26) and fig. 4 is the control input u(t). Fig. 5 and fig. 6 show the flow rate response and controller output using PID control with Kp = 0.65, Ki = 0.72 sec−1 and Kd = 0 sec. To examine the ability of the IMC based control disturbance d(t) = 0.5sin(4t) is introduced. Responses and the control signals using IMC and PID control are shown in fig 7, fig. 8, fig 9 and fig. 10. It is evident that IMC control has great ability to reject the disturbance and also the model error.
D. Qualitative analysis Because of the load disturbance, magnitude of steady state error increases. Hence the robust performance can be examined through the maximum absolute steady state error. Table I shows the maximum absolute steady state error and steady state band. It can be observed that without disturbance, performance of the PID and IMC controllers are quite comparable. However, in presence of the disturbance PID controller performance is degraded drastically (maximum 23% of deviation from reference). On the contrary IMC controller is quite robust to the same disturbance with maximum 7.54% of deviation from reference. TABLE I.
E FFECT OF DISTURBANCE ON STEADY STATE RESPONSE
Controller d(t) |yss (t) − r(t)|†max ∆yss (t)‡ IMC 0 0.0462 4.62% PID 0 0.0398 3.98% IMC 0.5sin(4t) 0.0754 7.54% PID 0.5sin(4t) 0.2300 23% † Maximum absolute tracking error at steady state. ‡- Steady state error band % of reference input.
ACKNOWLEDGMENT
4.5
I am thankful to Indian Institute of Technology Bombay for providing necessary information and resources for this work.
4
r(t), y(t)
3.5 3
R EFERENCES
2.5
[1]
2 1.5
r(t) y(t)
1 0.5 0
10
20
30
40
50
60
70
80
90
[2]
100
t
Fig. 7. Flow rate y(t) response to step r(t) using IMC control with load disturbance
[3] [4] [5]
6
[6]
5 4
[7] [8]
u(t)
3 2 1
[9]
0 −1 0
[10] 10
20
30
40
50
60
70
80
90
100
t
Fig. 8.
controller output u(t) using IMC control with load disturbance
[11] [12]
5 4.5
[13]
4 r(t), y(t)
3.5 3
[14]
2.5 2 1.5
r(t) y(t)
1 0.5 0
10
20
30
40
50
60
70
80
90
100
t
Fig. 9. Flow rate y(t) response to step r(t) using PID control with load disturbance.
6 5 4
u(t)
3 2 1 0 −1 −2 0
10
20
30
40
50
60
70
80
90
100
t
Fig. 10.
controller output u(t) using PID control with no disturbance.
M. A. Atmanand and M. S. Konnur, “A novel method of using a control valve for measurement and control of flow,” IEEE Trans. on Instrumentation and Measurement, vol. 48, no. 6, pp. 1224–1226, 1999. B. Bequette, Process Control: Modeling, Design, and Simulation, ser. Prentice-Hall International Series in the Physical and Chemi. Prentice Hall PTR, 2003. S. P. Bhattacharyya, H. Chapellat, and L. H. Keel, Robust control. Prentice-Hall, New Jersey, 1995. B. A. Francis and W. M. Wonham, “The internal model principle of control theory,” Automatica, vol. 2, pp. 457–465, 1976. C. E. Garcia and M. Morari, “Internal model control.1. a unifying review and some new results,” Industrial & Engineering Chemistry Process Design and Development, vol. 21, no. 2, pp. 308–323, 1982. Handbook, Control Valve Handbook. Emerson Process Management, 2005. P. Harriott, Process Control. Tata McGraw Hill Ed., 1996. B. R. Holt and M. Morari, “Design of resilient processing plantsvi. the effect of right-half-plane zeros on dynamic resilience,” Chemical Engineering Science, vol. 40, no. 1, pp. 59–74, 1985. M. Morari, Robust process control. Prentice-Hall, Englewood Cliffs, New Jersey, 1989. E. Pathmanathan and R. Ibrahim, “Development and implementation of fuzzy logic controller for flow control application,” in proc. of International Conference on Intelligent and Advanced Systems (ICIAS), Malaysia, 2010, pp. 1–6. D. E. Rivera, M. Morari, and S. Skogestad, “Internal model control: Pid controller design,” Industrial & engineering chemistry process design and development, vol. 25, no. 1, pp. 252–265, 1986. F. G. Shinskey, Process control systems: application, design, and tuning, 4th ed. McGraw Hill, 1996. M. Veera, J. Xavier, and D. Khimani, “Design and implementation of luenberger observer for flow control application,” in proc. of Fourth International Conference on Advances in Recent Technologies in Communication and Computing, Bangalore, 2012. K. Zhou, J. C. Doyle, K. Glover et al., Robust and optimal control. Prentice-Hall, New Jersey, 1996, vol. 40.