New Constrained Predictive PID controller for packet dropouts in Wireless Networked Control Systems⁎

New Constrained Predictive PID controller for packet dropouts in Wireless Networked Control Systems⁎

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

453KB Sizes 0 Downloads 85 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 Ghent, May 9-11, 2018 Proceedings of the 3rd IFAC Conference on Control 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) 811–816

New New Constrained Constrained Predictive Predictive PID PID controller controller for for New Constrained Predictive PID controller for packet dropouts Wireless Control New Constrained PID controller for packet dropouts in inPredictive Wireless Networked Networked Control packet dropouts in Systems Wireless Networked Control packet dropouts in Systems WirelessNetworked Control Systems  Systems ∗∗ Mercedes Chac´on V´asquez ∗∗ Reza Katebi ∗∗

Mercedes Chac´on V´asquez ∗ Reza Katebi ∗∗ Mercedes Chac´on V´asquez ∗ Reza Katebi ∗∗ ∗∗ School of Electrical Mercedes Chac´on V´ asquez Reza Katebi San Jos´e, Costa School of Electrical Engineering, Engineering, University University of of Costa Costa Rica, Rica, San Jos´e, Costa ∗ School of Electrical Rica ([email protected]) Engineering, University of Costa Rica, San Jos´e, Costa Rica ([email protected]) ∗ School ∗∗ of Electrical University of Costa Rica, San Jos´ e, Costa Rica Engineering, ([email protected]) ∗∗ Industrial Industrial Control Centre, University University of Strathclyde, Strathclyde, Glasgow, United Centre, of Glasgow, United ∗∗ Industrial Control RicaKingdom ([email protected]) Control Centre, University of Strathclyde, Glasgow, United ([email protected]) Kingdom ([email protected]) ∗∗ Industrial Control Centre,([email protected]) University of Strathclyde, Glasgow, United Kingdom Kingdom ([email protected]) Abstract: Abstract: A A new new constrained constrained predictive predictive PID PID controller controller is is presented presented to to achieve achieve stability stability and and performance performance robustness in Wireless Networked Control Systems (WNCS), where the communication is Abstract: A new constrained predictive PID controller is presented to achieve stability and performance robustness in Wireless Networked Control Systems (WNCS), where the communication is subject subject to to Abstract: in A both new constrained predictive PID Systems controller is presented to achieve stabilitytransmission. and performance robustness Wireless Networked Control where the to communication is subjectThe to dropouts communication directions: sensor to to(WNCS), control and control to actuator The dropouts ininboth communication directions: sensor control and control actuator transmission. robustness inboth Wireless Networked Control Systems (WNCS), where the to communication is Predictive subjectThe to dropouts in communication directions: sensor to control and control actuator transmission. control strategy is based on a new PID controller with similar properties to Model-Based control strategy is based on a new PID controller with similar properties to Model-Based Predictive dropouts in both iscommunication directions: sensor prediction to control and control totoactuator transmission. The Control (MBPC). A Kalman filter used for output and a consecutive dropouts compensator control strategy based on a new PID controller with similar properties Model-Based Predictive Control (MBPC). A Kalman filter used for output prediction and a consecutive dropouts compensator control strategy isAbased on afilter new PID controller with similar to Model-Based Predictive have also been to scheme. The of approach is develop estimation Control Kalman for output prediction andproperties a consecutive compensator have also(MBPC). been added added to the the control controlused scheme. The purpose purpose of this this approach is to to dropouts develop an an estimation Control (MBPC). A Kalman filter used for output prediction and a consecutive dropouts compensator have also been added to the control scheme. The purpose of this approach is to develop an estimation algorithm and and aa control control system system that that maintain maintain information information of of the the sensor sensor packets packets and and the the control control actions. actions. algorithm have alsoexperiments been tosystem thethe control scheme. The purpose ofthe thissensor approach is toand develop an estimation algorithm and aadded control that maintain information of packets the control actions. Several using network simulator showed that the PID Several experiments using the TrueTime TrueTime network simulator showed that the predictive predictive PID controller controller algorithm and a control system that maintain information ofofthe sensor packets and the control actions. performs as good as the MBPC scheme with the advantage having a simple structure. Several experiments using the TrueTime network simulator showed that the predictive PID controller performs as good as the MBPC scheme with the advantage of having a simple structure. Several using the TrueTime network simulatorofshowed the predictive performsexperiments as good as the MBPC scheme with the advantage having athat simple structure. PID controller © 2018, IFAC (International Federation Automatic Control)ofHosting Elsevier Ltd. All rights reserved. performs as good as the MBPC schemeofwith the advantage having by a simple structure. Keywords: Keywords: Wireless Wireless Networked Networked Control Control Systems, Systems, predictive predictive PID. PID. Keywords: Wireless Networked Control Systems, predictive PID. Keywords: Wireless Networked Control Systems, predictive PID. Motivated by by the the optimality optimality of of the the predictive predictive control control solution solution WNCS are are control control systems systems where where controllers, controllers, actuators actuators and and Motivated WNCS WNCS systems actuators and and Motivated by the optimality of the predictive control solution and of control, it sensors are connected to shared communication network. and the the simplicity simplicity and flexibility flexibility of the the PID PID control, it is is sensors are are control connected to aa where shared controllers, communication network. Motivated byapply the optimality of theapproach predictive control solution WNCS applications are systems controllers, actuators and and sensors are control connected to a where shared communication network. beneficial to the predictive to the PID control WNCS are increasing as a result of stronger industhe simplicity and flexibility of the PID control, it is beneficial to apply the predictive approach to the PID control WNCS applications are increasing as a result of stronger industhe simplicity andpredictive flexibility of the PID it is sensors are connected to in a shared network. WNCS are increasing as communication a result of stronger indusloops to communication. Very trial andapplications academic interests the potential potential benefits of these these sys- and beneficial applythem the approach to thecontrol, PID control loops and and toadapt adapt them to the the network network communication. Very trial and academic interests in the benefits of sysbeneficial to apply the predictive approach to the PID control WNCS applications are increasing as a result of stronger industrial and academic interests in the potential benefits of these sysloops and adapt them to the network communication. Very few studies studies have have been been focused focused on on predictive predictive control control algorithms algorithms tems. The The networked networked solution solution offers offers the the possibility possibility of decreased decreased few tems. and adapt them tocan the on network communication. Very trial and academic interests in the potential benefitsand these sys- loops tems. networked solution offers possibility of decreased few have been focused predictive control algorithms PID that compensate dropouts. costs, simplify the and maintenance increase withstudies PID structures structures that can effectively effectively compensate dropouts. costs, The simplify the installation installation and the maintenance and increase with few studies have beenthat focused onMrosko predictive control algorithms tems. The networked solution offers possibilityHowever, of decreased costs, simplify the installation and the maintenance and increase For example, Mikloviˇ c ov´ a and (2012) addressed system-wide monitoring and control capabilities. the with PID structures can effectively compensate dropouts. example, Mikloviˇcov´a and Mrosko (2012) addressed the the system-wide monitoring and control capabilities. However, the For PID structures that can effectively compensate dropouts. costs, simplify the installation and maintenance and increase system-wide monitoring and control capabilities. However, the with compensation of dropouts using Predictive inclusion of the network leads to significant technical barriers For example, Mikloviˇ cov´ a and Mrosko (2012) addressed the compensation of control control dropouts using Generalised Generalised Predictive inclusion of the network leads to significant technical barriers example, Mikloviˇ cov´ a and Mrosko (2012) addressed the system-wide monitoring control capabilities. However, the For inclusion network and leads to significant technical compensation control using Generalised Predictive pole placement structure to aa PID that the application of technologies in process Control (GPC) (GPC)ofand and pole dropouts placement structure to design design PID that limit limit of thethe application of wireless wireless technologies in barriers process Control compensation ofand control dropouts using Generalised Predictive inclusion of network leads to significant technical that limitThe thethe application ofthe wireless technologies in barriers process Control (GPC) pole placement structure to design a PID controller. Hassan et al. (2016) presented a predictive WNCS control. main issue is limited capacity of the shared Hassan et al. (2016) presented a predictive WNCS control. The main issue isofthe limitedtechnologies capacity of the shared controller. (GPC) andetpole placement structure towhere design aSmith PID that limitthat thecauses application wireless in process control. The main issue is the limited capacitycontrol of the shared Control to variable and disturbance, channel the degradation degradation of WNCS WNCS perforcontroller. Hassan al.delays (2016) presented a predictive to compensate compensate variable delays and disturbance, where aaWNCS Smith channel that causes the of control perforcontroller. Hassan et al. (2016) presented a predictive WNCS control. The main issue is the limited capacity of the shared channel that causes the WNCS control perfor- to predictor is PID control. A solution is mance. In In particular, the degradation network may mayofintroduce introduce large commucommucompensate variablewith delays and disturbance, where a Smith predictor is combined combined with PID control. A similar similar solution is mance. particular, the network large to compensate variable delays and disturbance, where a delays Smith channel delays that causes the degradation WNCS control perfor- postulated mance. particular, theof mayofintroduce largeinfluence commupredictor combined PID A similar solution is Wu (2016) to compensate random nication and information, which postulatedisby by Wu et et al. al.with (2016) tocontrol. compensate random delays nicationIn delays and loss loss ofnetwork information, which greatly greatly influence predictor isby combined with PIDtocontrol. A similar solution is mance. In particular, theand may introduce largeinfluence communication delays and loss ofnetwork information, which greatly and dropouts. the controller stability robustness. These problems motipostulated Wu et al. (2016) compensate random delays dropouts. the controller stability and robustness. which Thesegreatly problems moti- and postulated by Wu et al. (2016) to compensate random delays nication delays and lossof ofcontrol information, influence the controller stability and robustness. These problems motivated the development systems that address the comand dropouts. vated the development of control systemsThese that address the moticom- In paper, dropouts. the controller stability and robustness. problems In this this paper, aa new new predictive predictive PID PID controller controller with with similar similar vated the development of control that address the complexity and intricate estimation ofsystems the WNCS, WNCS, meanwhile, the and plexity and intricate estimation of the meanwhile, the properties to MBPC is developed to compensate dropouts in In this paper, a new predictive PID controller similar vated the development ofof control systems thatpreferred. address the comproperties to MBPC is developed to compensatewith dropouts in plexity and intricate estimation of the WNCS, meanwhile, the simplicity and efficiency the controller are Among simplicity and efficiency of the controller are preferred. Among In this paper, a newprogramming predictive PID controller with similar WNCS. A quadratic problem optimises a MBPC properties to MBPC is developed to compensate dropouts in plexitymethods, andand intricate estimation of the WNCS, meanwhile, the simplicity efficiency of the controller arecontrol preferred. Among WNCS. A quadratic programming problem optimises a MBPC these the networked predictive scheme is to MBPC is developed to compensate dropouts in these methods, the networked predictive control scheme is properties cost function to find the optimal PID gains at every sampling WNCS. A quadratic programming problem optimises a MBPC simplicity and efficiency of the controller are preferred. Among these methods, the networked control schemefor is cost function to find programming the optimal PID gainsoptimises at every sampling considerably effective, since it it predictive can actively actively compensate WNCS. Aconstraint quadratic problem athe MBPC considerably effective, since can compensate for cost function to find the optimal PID gains at every sampling time. The handling is included to guarantee loop these methods, the networked control scheme is time. The constraint handling is included to guarantee the loop considerably effective, since it predictive can actively compensate for the transmission delays and consecutive consecutive packet dropouts (Sun cost function to find handling the optimal PIDThe gains at every sampling the transmission delays and packet dropouts (Sun stability the problem of Theto is included guarantee theocculoop considerably effective, since it can actively compensate for time. stability toconstraint the controller controller limitations. limitations. The to problem of the the occuthe transmission delays and consecutive packet dropouts (Sun et al., 2014). et al., 2014). time. The constraint handling is included to guarantee theocculoop rrence of dropouts from sensor to controller is compensated stability to the controller limitations. The problem of the theal., transmission delays and consecutive packet dropouts (Sun rrence of dropouts from sensor to controller is compensated et 2014). stability to the controller limitations. The problem of the occuby combining combining the controller controller withtoaa controller Kalman Filter Filter (KF). The The While there are are numerous numerous approaches approaches that that have have been been reviewed reviewed by rrence of dropouts from sensor is compensated et al., 2014). the with Kalman (KF). While there rrence of dropouts from sensor is compensated While numerousevent-triggered approaches that have been reviewed by combining they(k) controller withtowith a controller Kalman Filter (KF). The output is the estimation such fuzzy, predictive, and robust control, the measured output y(k) is replaced replaced with the Kalman Kalman estimation such as asthere fuzzy,are predictive, event-triggered and robust control, the measured combining the controller with a Kalman Filter of (KF). The Whileasthere numerous approaches have been reviewed such fuzzy,are predictive, event-triggered and robust control, the by yyˆˆe (k) allowing they(k) controller to receive information the proProportional Integral Derivative (PID) that control has received measured output is replaced with the Kalman estimation Proportional Derivative (PID) control has received the e (k) allowing the controller to receive information of the promeasured output y(k) is replaced with information the Kalman of estimation such as fuzzy,Integral predictive, event-triggered and robust control, the cess Proportional Integral Derivative (PID) control has received even in the presence of dropouts. To compensate consemost attention in the history of process control. There are some y ˆ (k) allowing the controller to receive the prothe e cess even in the presence of dropouts. To compensate consemost attentionIntegral in the history of process control.has There are some yˆe (k)even allowing the controller receive information of the Proportional Derivative (PID) control the cess most attention the history of process control. There are some in the presence of to dropouts. To compensate consecutive dropouts from controller to actuator, actuator, predictions ofprothe networked PIDincontrol control methods to compensate compensate forreceived delays and cutive dropouts from controller to predictions of the networked PID methods to for delays and cess even in the presence of and dropouts. To compensate consemost attention in the history of process control. There are some networked PID control methods to compensate for delays and cutive dropouts from controller to actuator, predictions of the control signal are calculated saved in the actuator for dropouts. For instance, Dasgupta et al. (2015) addressed the the dropouts. For instance, Dasgupta et al. (2015) addressed the control signal are calculated and saved in the actuator for dropouts from controller actuator, predictions of the the networkedFor PID control toetcompensate for delays and dropouts. instance, Dasgupta al. (2015) addressed the cutive next closed-loop stability of methods the system under time-varying delays control signal instant. are calculated andtosaved in the actuator for next sampling sampling instant. closed-loop stability of the system under time-varying delays signal instant. are calculated and saved in the actuator for the dropouts. For instance, Dasgupta et al. (2015) addressed the control closed-loop stability of the system under time-varying delays and dropouts with a discrete PID controller. WNCS applicanext sampling and dropoutsstability with a of discrete PID controller. WNCS applicacomparison with next sampling instant. closed-loop the et system under Blevins time-varying delays In In comparison with the the above above PID PID approaches, approaches, where where the the loss loss and dropouts a discrete controller. WNCS tions are cited citedwith by Abdullah Abdullah al. (2016); (2016); et al. al.applica(2014) tions are by et PID al. Blevins et (2014) of information is generally assumed only in one direction, the In comparison with the above PID approaches, where the loss and Hassan dropouts with a discreteet PID controller. WNCS information is generally assumed only in one direction, the tions are cited by(2017). Abdullah al. (2016); Blevins et al.applica(2014) of and et al. In comparison with the above PID approaches, where the loss and Hassan et al. (2017). new predictive PID controller has the advantage of compenof information is generally assumed only in one direction, the tions are cited by Abdullah et al. (2016); Blevins et al. (2014) new predictive PID controller has the advantage of compenand Hassan et al. (2017). of information isPID generally assumed only in one direction, the new predictive controller hasIt the advantage ofinnovative compensating both communication ways. also provides an and Hassan et al. (2017). sating both communication ways. It also provides an innovative  new predictive PID controller has the advantage of compenChac´ o n wishes to thank the financial support from the University of Costa  M. sating both communication ways. It also provides an innovative and reliable design for WNCS where stability robustness M. Chac´on wishes to thank the financial support from the University of Costa and reliable design for WNCS where stability robustness to to Rica, and CONICT Rica. sating both communication ways.where It also stability provides robustness an innovative M. MICITT Chac´on wishes to thankCosta the financial support from the University of Costa and reliable design for WNCS to Rica, MICITT and CONICT Costa Rica.  M. Chac´on wishes to thank the financial support from the University of Costa and reliable design for WNCS where stability robustness to Rica, MICITT and CONICT Costa Rica.

Rica, MICITT and CONICT Costa Rica. 2405-8963 © 2018 2018, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Copyright © 811 Copyright © under 2018 IFAC IFAC 811 Control. Peer review responsibility of International Federation of Automatic Copyright © 2018 IFAC 811 10.1016/j.ifacol.2018.06.176 Copyright © 2018 IFAC 811

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

Find K with quadratic

e

Find the cost function

Using

J(G, F, uk−1 , yk−1 , r, a, b)

A and

Calculate matrices F, G

programming ∇J

r

Mercedes Chac´on V´asquez et al. / IFAC PapersOnLine 51-4 (2018) 811–816

Network

PID

u

dca

K(k, e, u)

2. THE MBPC METHOD The MBPC algorithm seeks a set of optimal control signals that minimises the following quadratic cost function Camacho and Bordons (2007):

B solve Diophantine equation

no

Actuator

G p (z)

y

J=

j=N1

yes



ys yˆe

predictions u(k) yes

ys

dsc

[y(k ˆ + j) − r(k + j)]2 +

Nu



j=N1

λ [ ∆u(k + j − 1)]2

(1)

where N1 and N are positive scalars indicating the initial and final predictive horizons. λ is a constant weight used to penalise the control effort. Nu is the control horizon. The future reference trajectory is r(k + j) and has been assumed to be known. The control objective is to minimise the cost function to compute the future control signals that guaranties that the future process output y(k + j) follows the future reference r(k + j). Meantime it assures that the control signal is penalized as well.

Use

Filter

N



Sensor

no

Figure 1. Diagram of predictive PID controller structure variations of the system’s gain and poles can be accomodated. Moreover, it compensates for a high incidence of dropouts and at the same time satisfies input constraints and rejects disturbance in WNCS, which have not yet been addressed in the revised literature. This paper is structured as follows. Section 2 introduces the MBPC scheme. The predictive PID controller is derived in Section 3. A compensator of dropouts from controller to actuator is studied in Section 4. A Kalman filter and a compensator for consecutive sensor packet dropouts have been added to the control scheme in Section 5. Sections 6 and 7 include several experiments to show the performance and robustness of the controller. Finally, conclusions and future research work are presented in Section 8. 1. PRELIMINARIES 1.1 Predictive PID implementation The proposed control scheme is presented by the block diagram depicted in Fig. 1. The controller signal is u, y stands for process output, e is the error and r is the reference signal. The controlled plant is G p (z). The proposed framework is for a class of linear, discrete-time, constrained process. A WNCS whose sensor and control information is transported over a wireless network is considered. The dropouts from sensor to controller and from controller to actuator are represented as d psc and d pca , respectively. A quadratic programming problem optimises a MBPC criterion to find the optimal PID gains at every sampling time. The constraint handling is presented to stop input saturation. The measured output ys is switched to the Kalman filter estimation yˆe allowing the controller to always have information of the process even in the presence of dropouts. Predictions of the control signal are calculated and applied accordingly to compensate consecutive dropouts from controller to actuator. 1.2 Network constraints A Wireless Local Area Network (WLAN) is selected in this study. Due to collisions or congestion in the channel, the system has to tolerate dropouts. In this paper, the percentage of dropouts and delays are assumed to be bounded. Also, a maximum number of consecutive dropouts has been investigated γmax as well as a different percentage of dropouts. 812

To optimise the performance, appropriate horizons and an accurate model are required. To find the prediction of process output y(k ˆ + j), a linear SISO plant is described using the Controlled Auto Regressive and Integrated Moving-Average (CARIMA) model: A(q−1 )y(k) = q−d B(q−1 )u(k − 1) +C(q−1 )ξ (k)/∆ (2) where y(k) and u(k) are the process output and the control input, respectively. The process delay is d. A discrete-time setting is assumed and the current time is labelled as time instant k. A, B and C are polynomials function of the backwards shift operator q−1 with order na , nb and nc , respectively; such that: A(q−1 ) = 1 + a1 q−1 + a2 q−2 + · · · + ana q−na (3) B(q−1 ) = b0 + b1 q−1 + b2 q−2 + · · · + bnb q−nb C(q−1 ) = c0 + c1 q−1 + c2 q−2 + · · · + cnc q−nc The model represents the uncertainty of random disturbances in the process. ξ (k) is a zero mean white noise, and ∆ = 1 − q−1 is a difference operator, indicating the difference between the current time point and the previous time point. The proposed model is more appropriate in industrial applications where disturbances are non-stationary. For simplicity, C is chosen as one in the following analysis. Next, a Diophantine equation is used to find the output predictions: (4) 1 = E j (q−1 )∆A(q−1 ) + q− j Fj (q−1 )

where E j and Fj are polynomials. Multiplying (2) by ∆E j (q−1 )q j gives: ˆ + j) = E j (q−1 )B(q−1 )∆u(k + j − d − 1) ∆A(q−1 )E j (q−1 )y(k + E j (q−1 )ξ (k + j)

(5) The best estimation of the future disturbance is achieved by selecting ξ (t + k) = 0. Substituting A(q−1 )E j (q−1 ) from (4) in (5), it results:   ˆ + j) = E j (q−1 )B(q−1 )∆u(k + j − d − 1) 1 − q− j Fj (q−1 ) y(k (6) Simplifying results in: y(k ˆ + j) = Fj (q−1 )y(k) + E j (q−1 )B(q−1 )∆u(k + j − d − 1) (7) where E j (q−1 ) = ed+ j,0 + ed+ j,1 q−1 + · · · + ed+ j, j−1 q−(d+ j−1) Fj (q−1 ) = fd+ j,0 + fd+ j,1 q−1 + · · · + fd+ j,na q−na

Define G j = E j (q−1 )B(q−1 ), then (7) can be expressed as: y(k ˆ + j) = Fj (q−1 )y(k) + G j (q−1 )∆u(k + j − d − 1)

(8)

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

Mercedes Chac´on V´asquez et al. / IFAC PapersOnLine 51-4 (2018) 811–816

Applying the last result to (1), the cost function J is formulated as the following quadratic problem: (9) J = (Gu + Fy − r)T (Gu + Fy − r) + λ uT u where r = [r(k + 1) r(k + 2) · · · r(k + N)]T y = [y(k ˆ + 1)

y(k ˆ + 2)

···

y(k ˆ + N)]T

u = [∆u(k) ∆u(k + 1) · · · ∆u(k + Nu − 1)]T    Fd+1 (q−1 ) g0 0 ···  Fd+2 (q−1 )  g g  1 0 ···   F(q−1 ) =  , G =  .. .. .. ..    . . . . −1 g · · · g N−1 N−2 Fd+N (q )

 0 0 ..  .

g0

For simplicity of notation, it is assumed that d = 0 in the equations above. The quadratic cost function is minimised by solving ∇J = 0. Note that the optimal input solution ∆u(k + j − 1) = 0 for j > 1. The control horizon has been selected as one because the PID law only computes ∆u(k). 3. THE DESIGN OF THE PREDICTIVE PID CONTROLLER 3.1 The PID The velocity form of the PID controller with sampling time ts is considered: ∆u(k) = k p [e(k) − e(k − 1)] + ki ts e(k)+ (10) kd [e(k) − 2e(k − 1) + e(k − 2)] ts The matrix representation is: ∆u(k) = KT e(k) where e(k) is the vector of control errors:

(11)

(12) e(k) = [e(k) e(k − 1) e(k − 2)]T The vector of gains K is defined as:   kd kd kd T K = k p + ki ts + − kp − 2 = [k1 k2 k3 ]T (13) ts ts ts The PID controller gains must be positive scalars: k p > 0, ki > 0, kd > 0. Therefore, it is easy to see that the vector of gains K must fulfil the linear inequality constraints: k1 + k2 + k3 > 0, k2 + 2k3 < 0, k3 ≥ 0 (14) 3.2 The predictive PID controller The PID predictive controller is obtained by combining the MBPC and PID control laws. The purpose of the design is to compute the PID gains in such a way that the control signal is as close as possible to the MBPC signal. First, by simplifying (9) yields: (15) J(K) = uT (GT G + λ I)u + uT 2GT (Fy − r) Replacing ∆u from (11) leads to: J(K) = [e(k)T K]T (GT G + λ I)e(k)T K + [e(k)T K]T 2GT (Fy − r) (16) This is equivalent to: J(K) = K T e(k) (GT G + λ I)e(k)T K + K T 2 e(k) GT (Fy − r) (17) 813

813

The new algorithm will be carried out by minimising the cost function respect to the PID controller gains K: ∆ucons = min J(K, y) (18) K

where ∆ucons is the constrained optimal input at time instant k. It follows directly from (17) that the PID gains can be found by solving the following quadratic program: 1 T K H K + fT K min (19) K 2 s.t. a(k) K ≤ b(k) where H = 2(GT G + λ I)e(k)e(k)T (20) f = 2GT (Fy − r)e(k) The constraints of (19) will guarantee the contributions of control input and rate input are applied according to the controller limitations. a(k) depends on the past values of the error and b(k) on the upper and lower limits on the control input and rate input. The design is provided in the next section. The control law can be rewritten from (11) as: ∆u(k) = K(k)e(k) (21) The Optimisation Toolbox of Matlab is selected to solve the problem and find the PID gains. The optimisation problem has been set using the command quad prog(H, f , a, b), where H, f have been stated in (20) and a, b are the constraint matrices of the linear inequality. The interior-point-convex algorithm is used. The solver tries to find the optimal point based on the Karush-Kuhn-Tucker (KKT) conditions, where the gradient must be zero at the minimum and take constraints into account. It is important to stress that the vector of PID gains will change at every time instant k. As a consequence, the proposed predictive PID is time-varying and it will be optimised for a bounded percentage of dropouts. The advantage of the predictive PID is that it improves the traditional PID performance by equating its control signal with the MBPC control signal. Since the gains are varying every sampling time, the performance of the PID controller is as good as the MBPC controller. Moreover, the control signal along the input steps changes smoothly, as demonstrated in Section 6. 3.3 Constraints for the control input and control rate input To introduce the constraint handling, the predictive PID control subject linear constraints is solved: − ∆umin ≤ ∆u(k) ≤ ∆umax , −umin ≤ u(k) ≤ umax (22) Using (13) the predictive PID control law in equation (21) can be defined as: ∆u(k) = k1 e(k) + k2 e(k − 1) + k3 e(k − 2) (23) Hence, by noticing that ∆u = u(k) − u(k − 1), the constraints can be written as: − ∆umin ≤ k1 e(k) + k2 e(k − 1) + k3 e(k − 2) ≤ ∆umax − umin − u(k − 1) ≤ k1 e(k) + k2 e(k − 1) + k3 e(k − 2) (24) ≤ umax − u(k − 1) By combining (14) with the previous result, the final constraint matrix is found: 

0  0   −1   e(k)  −e(k)   e(k) −e(k)

1 0 −1 e(k − 1) −e(k − 1) e(k − 1) −e(k − 1)

   2 −ε   −1  0       −1  −ε  k1        ∆umax e(k − 2)  k2 ≤     −e(k − 2) −∆u k min  3     e(k − 2) umax − u(k − 1)  −e(k − 2) −umin + u(k − 1)

(25)

Mercedes Chac´on V´asquez et al. / IFAC PapersOnLine 51-4 (2018) 811–816

where ε is a small positive scalar. The constraints should be fulfilled for every ∆u j (k), f or j = 1, . . . , N − 1. The final constraint matrix in (25) has the form a(k) K ≤ b(k) previously defined in the optimisation problem proposed in (19).

2

y,r

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

1 0

4. DROPOUTS FROM CONTROLLER TO ACTUATOR COMPENSATION

-1 0

Notably, in the proposed algorithm the controller has not knowledge of the control input that the actuator applies. However, this is not a limitation since it has been demonstrated that acknowledgements from the actuator to the controller do not improve the stability of the networked predictive control (see Gupta and Martins (2010) and the references therein). In the case of consecutive dropouts, the maximum number of consecutive dropouts, γmax is selected to match the prediction horizon N. Thus, the “smart” actuator can determine the occurrence of consecutive dropouts and apply the past predictions until either the condition is over or γmax has been reached. For this end, a consecutive dropouts detector has been created. It consists of an index, m, that counts the number of consecutive dropouts and it is reset every time the information is available. To obtain γmax the WNCS was implemented in the simulator and the number of consecutive dropouts was measured for variations of the percentages of dropouts from 25% to 80%. A maximum value of γmax = 30 was selected since it covered the maximum number of consecutive dropouts. 5. DROPOUTS FROM SENSOR TO CONTROLLER COMPENSATION The occurrence of dropouts during the transmission from the sensor to the controller results in an open-loop system which degrades the reliability of the WNCS. To solve this problem a KF is proposed to estimate yˆe (k). In the presence of dropouts, only the traditional equations for estimation (prediction) of the KF are computed. Once the information is available the measurement (update) equations are calculated. The KF gives an estimation as follows: x(k ˆ + 1) = Ax(k) ˆ + Bu(k) + K f (k)[y(k) − yˆe (k)] (27) yˆe (k) = Cx(k) ˆ K f (k) represents the filter gain that is calculated using a set of recursive equations: K f (k) = P(k)CT [CP(k)CT + R]−1

(28) 814

100

200

300

400

10 5 u

To compensate dropouts from controller to actuator, predictions of the control signal are calculated. First, from (20) the matrix G1 is computed instead of G: G1 = G(1 : N, j) (26) where j stands for columns of matrix G and N1 ≤ j ≤ N. Therefore, the quadratic program computes N predictions of the control signal ∆u(k) using the coefficients of j − th column of matrix G. During a successful transmission from controller to actuator, the controller inputs are saved in the actuator for the next sampling instant. At time k, a dropouts detector at the actuator location indicates if the new control signal is not received and applies the next prediction u j (k) to compensate the dropout. If there is not saved predictions, the actuator arbitrarily applies the initial condition u0 = 0. Note, that it has been assumed that some computational and buffering resources are available at the actuator.

PPID MBPC setpoint 500 600 disturbance

upid upmc umax,umin

0 -5 0

100

200

300

400

500

600

time (s)

Figure 2. System outputs for predictive PID and MBPC where R is the covariance of the measurement noise and P(k) is the covariance of estimation error that is computed as follows: (29) P(k) = P(k) − P(k)CT [CP(k)CT + R]−1CP(k) and that can be updated as: (30) P(k + 1) = AP(k)AT + BQBT where Q is the covariance of the process noise. The filter gain is computed by selecting appropriate values for Q and R. 6. SIMULATION STUDIES 6.1 Numerical example 1: Non-minimum phase process Consider the following non-minimum phase process with dead time and sampling time ts = 1 s: −0.26785 (z − 1.292) z−3 (31) G p (z) = (z − 0.6065)(z − 0.006738) The predictive algorithm is implemented and simulated using the TrueTime network configured for 802.11b Wireless Local Area Network (WLAN), with a data rate of 800000 bits/s. The minimum frame size has been selected as 272 bits (see Chac´onV´asquez (2017) for more details). As explained before, the prediction horizon is N = 30 and the control horizon Nu = 1. The closed-loop stability is achieved by selecting λ = 25. Control input constraints have been assumed as umax = 10, umin = −5 and the rate input ∆umax = 10. A step disturbance of magnitude 1.1 is introduced at time t = 450 s to test the robustness of the design. The results have been compared with the solutions obtained by the classical MBPC with constraints. Fig. 2 shows the system outputs and constrained controller inputs of predictive PID and MBPC for step changes in reference signal (dashed line). The predictive PID shows almost the same behaviour than MBPC as it is expected. The reference tracking and the disturbance rejection are achieved. Note that the input constraints (dotted line) are satisfied. However, further tests shown this leads to a slower rising time compared to the case without constraints. The percentage and occurrence of dropouts for the simulation are depicted in Fig. 3. A variable d p (k) ε [0, 1] indicates if the packet containing the feedback signal y(k) is received (d psc (k) = 0) or if it is dropped (d psc (k) = 1). Similarly,

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

1

1 0.5

dropouts

100

200

300

400

500

0

600

0

5

10

15

20

25

30

1

P loss=7% from controller to actuator

u0 u65 u84 umax,umin

1 u

dropoutspca d(k)

0% Packets lost 65% Packets lost 84% Packets lost Reference

0.5

0 0

815

=9% from sensor to controller

loss

y,r

dropoutspsc d(k)

P

Mercedes Chac´on V´asquez et al. / IFAC PapersOnLine 51-4 (2018) 811–816

0.5

0.5 0

0 0

100

200

300

400

500

0

600

5

10

15

20

25

30

time (s)

time (s)

Figure 3. Time instant of data dropouts

Figure 5. Comparison of step responses with dropouts variations further examination. Therefore, the stability of the method is investigated here studying the closed-loop responses for variations of the process model parameters and the percentage of dropouts. The following process is selected for this analysis: G p (z) =

0.06347z−1 + 0.04807z−2 1 − 1.323z−1 + 0.4346z−2

(32)

The controller settings are the same than the previous example. A step of magnitude one is selected. Control constraints have been chosen as umax = 1, umin = 0 and ∆umax = 10.

Figure 4. KF estimation for constrained predictive PID dropouts from the controller to the actuator are represented as (d pca (k) = 1) and (d pca (k) = 0) if there is no dropouts. Fig. 4 shows that the KF output estimation is close to the process output. Therefore, when a dropout from sensor to controller occurs, the KF provides an accurate estimate of the process output. The control system is stable and works within the requirements for the entire drop of sensor and controller packets. Further tests showed that the percentages of dropouts could be increased up to Ploss = 84% which is the threshold to ensure the closedloop stability. The performance of predictive PID and MBPC responses for servo and regulatory responses has been assessed using the Integral of Absolute Error (IAE) criterion. The results are summary in the Table 1. The indexes values demonstrate that the predictive PID method performs as good as the MBPC scheme. Table 1. IAE values for step responses Controller Predictive PID MBPC

Jr 211.8 205

Jd 7.988 7.989

Study of stability for variations of percentage of dropouts The percentages of dropouts from sensor to controller and from controller to actuator are varied to demonstrate the robustness of the design. The step responses for different scenarios are shown in Fig. 5. The dashed lines show that when the probability of loss is increased from 0% to 65%, the responses are similar. Nevertheless, after 20 s, the control input for a 65% of packet loss presents small oscillations. If the probability keeps increasing, the oscillations continue to grow until the output is unstable. The dotted line shows that for a percentage of dropouts of 84%, the performance of the control system decreases considerably. Further validations report this percentage is the threshold to ensure the closed-loop stability. Study of stability for variations of the gain Fig. 6 shows that even with the constraints, the closed-loop system is stable if the gain is increased and reduced to ±35% of the model process gain. Although the process presented a small oscillation and slower rising time, zero steady error and a good tracking performance are accomplished when the process gain changes within the given percentages. Study of stability for variations of the poles

7. ROBUSTNESS RESULTS Since the PID predictive controller is model based, the effects of model uncertainties and dropouts on NCS’s stability require 815

Fig. 7 shows the closed-loop responses for variations in the non-dominant pole called p1 . Note that, the effect of varying the p2 is similar since the poles are closer to each other. It is evident from the plot, that pole variations of ±35% are permitted without making the closed-loop system unstable.

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

Mercedes Chac´on V´asquez et al. / IFAC PapersOnLine 51-4 (2018) 811–816

wing a maximum system parameters variation and percentage of dropouts.

y,r

1

0

8. CONCLUSIONS

Process w/o variations 35% Increase gain 35% Reduce gain Reference

0.5

0

5

10

15

20

25

30

35

25

30

35

1.5

u

1 0.5 umax,umin 0 0

5

10

15

20

time (s)

Figure 6. Comparison of step responses with gain process model variations

REFERENCES

y,r

1 Process w/o variations 35% Increase p1 35% Reduce p1 Reference

0.5

0

A new predictive PID controller was presented to compensate dropouts in WNCS. The results showed that the approach successfully solved two main problems in the WNCS: missing sensor measurements and controller actions. The problem of dropouts from sensor to controller was compensated by combining the controller with a KF. The predictions of the control signal were calculated to compensate consecutive dropouts from controller to actuator. The proposed method dealt with long dropouts and high consecutive occurrence. The performance analysis showed that the predictive PID method performs as good as the MBPC scheme. Also, the control system meets the stability requirements in the presence of disturbance, model uncertainties and input constraints. In future works, this approach will be extended to complex WNCS with MIMO systems and decentralised control whose results can be tested in an industrial context.

0

5

10

15

20

25

30

35

30

35

1.5

u

1 0.5 umax,umin 0 0

5

10

15

20

25

time (s)

Figure 7. Comparison of step responses with pole 1 process model variations 7.1 Discussion The performance stability of the control scheme is satisfactory for the selected prediction horizon. Further tests showed that a larger N deteriorate the performance because the errors in the prediction are bigger for long prediction horizon. The predictive PID controller and MBPC show similar performances; in some cases, the predictive PID controller performs better than the MBPC for higher percentages of dropouts. The constraint handling produces a reduction of the performance, but satisfactory results are still found. In most cases, a faster weight λ can improve the sluggish response of the control signal. However, there are scenarios where the control strategy can not stabilise faster responses with high percentages of dropouts. The new predictive PID controller offers a good performance to model uncertainty. Also, this methodology can compensate systems subject to dropouts within a large range of variations. The fact that the closed-loop system is robust to process and dropouts variations obeys to the optimisation tool used to obtain the predictive PID controller gains and the accurate estimation of the KF. The approach successfully minimises the error by changing the controller gains at every sampling time and allo816

Abdullah, H., Ibrahim, R., Hassan, S.M., and Chung, T.D. (2016). Filtered feedback PID control for wirelesshart networked plant. In 2016 6th Int. Conference on Intelligent and Advanced Syst. (ICIAS), 1–5. Malaysia. Blevins, T., Nixon, M., and Wojsznis, W. (2014). PID control using wireless measurements. In 2014 American Control Conference, 790–795. Camacho, E. and Bordons, A. (2007). Model Predictive Control. Springer-Verlag, London, U.K. Chac´on-V´asquez, M. (2017). Strategies for Wireless Networked Control Systems. Ph.D. thesis, University of Strathclyde. Dasgupta, S., Halder, K., Banerjee, S., and Gupta, A. (2015). Stability of networked control system (NCS) with discrete time-driven PID controllers. Control Eng. Practice, 42, 41 – 49. Gupta, V. and Martins, N.C. (2010). On stability in the presence of analog erasure channel between the controller and the actuator. IEEE Trans. on Automatic Control, 55, 175–179. Hassan, S., Ibrahim, R., Bingi, K., Chung, T.D., and Saad, N. (2017). Application of wireless technology for control: A wirelesshart perspective. Procedia Computer Science, 105, 240 – 247. Hassan, S.M., Ibrahim, R., Saad, N., Asirvadam, V.S., and Chung, T.D. (2016). Predictive PI controller for wireless control system with variable network delay and disturbance. In 2016 2nd IEEE Int. Symp. on Robotics and Manufacturing Automation (ROMA), 1–6. Malaysia. Mikloviˇcov´a, E. and Mrosko, M. (2012). PID control strategy for sensor random packet dropouts in networked control system. Int. Journal of Systems Applications, Engineering and Development, 6, 154–162. Sun, X.M., Wu, D., Liu, G.P., and Wang, W. (2014). Input-tostate stability for networked predictive control with random delays in both feedback and forward channels. IEEE Trans. on Industrial Electronics, 61, 3519–3526. Wu, Y., Wu, Y., and Zhao, Y. (2016). An enhanced predictive control structure for networked control system with random time delays and packet dropouts. In 2016 3rd Int. Conf. on Inform. Science and Control Eng., 834–838. China.