# Explicit GPC Control Applied to an Approximated Linearized Crane System

Authors: Daniel Guerra Vale da Fonseca; André Felipe O. de A. Dantas; Carlos Eduardo Trabuco Dórea; André Laurindo Maitelli
Journal: Journal of Control Science and Engineering
 (2019)

---

## Abstract

This paper proposes a MIMO Explicit Generalized Predictive Control (EGPC) for minimizing payload oscillation of a Gantry Crane System subject to input and output constraints. In order to control the crane system efficiently, the traditional GPC formulation, based on online Quadratic Programming (QP), is rewritten as a multiparametric quadratic programming problem (mp-QP). An explicit Piecewise Affine (PWA) control law is obtained and holds the same performance as online QP. To test effectiveness, the proposed method is compared with two GPC formulations: one that handle constraints (CGPC) and another that does not handle constraints (UGPC). Results show that both EGPC and CGPC have better performance, reducing the payload swing when compared to UGPC. Also both EGPC and CGPC are able to control the system without constraint violation. When comparing EGPC to CGPC, the first is able to calculate (during time step) the control action faster than the second. The simulations prove that the overall performance of EGPC is superior to the other used formulations.


---

## Body

## 1. Introduction

For decades cranes have been playing an essential role as a transportation tool for objects in various areas [1]. Industry and academia have studied its application in construction, steelworks, shipyards, and offshore container crane [2], due to its operational flexibility and high payload capacity [3]. However, the crane trolley rapid movement causes an excessive payload oscillation, which is an obstacle that limits safe and fast transportation. This swing happens during or even at the end of trolley movement due to crane dynamics and external disturbances [4]. Hence, the main issue involving crane system rests in the ability to quickly move the trolley, in order to perform load-carrying tasks in a short period; at the same time undesirable fluctuations of the payload are decreased, using an efficient control system [5–7]. This is a challenge task, since crane control systems usually are underactuated [8].Among crane applications, Gantry Crane Systems (GCS) are highlighted as the most preferred application in industries [9, 10]. This type of crane is mobile and is supported by a pair of rigid steel legs, being frequently used in factories, shipyards, and warehouses [11]. In GCS, the trolley mass, payload mass, and cable length directly influence payload swing and trolley displacement [12].To control the GCS and other crane types, several strategies may be applied. Reference [11] brings a very deep and complete review about these techniques over the last two decades. They are categorized into Open Loop, Closed Loop, and Hybrid (combines Open and Closed Loop) strategies, as depicted through Figure 1. About open loop schemes, they are easy to implement and less costly, since there is no need for sway angle or cart position sensors. Among them, the input shaping was widely used by researchers, being present in several works [13–15]. Despite being an efficient feed-forward control, it has as main drawback the sensitive to external disturbance. Because of this, it may be combined with Closed Loop ones, as seen in [16, 17].Figure 1
Crane control strategies [11].The other types of schemes used into crane operations are the feedback ones. This type of technique uses the desired output response to adjust their performance; hence they are less sensitive to disturbances. However, they are also slow, due to the input delay in the feedback loop.Many control loop strategies were used to improve a GCS performance. Some examples are the state feedback controller (SFB) using the Ackerman formula, the PID controller [18], sliding mode control (SMC), adaptive controllers [19], Fuzzy Control System [20], and Linear Quadratic Regulator (LQR) [21]. However, the aforementioned controllers are not fully suitable, since most of them do not consider system constraints, and they do not have their parameters obtained from an optimization problem. In this context, the MPC is a reasonable choice, because the constraints are included into its formulation. Moreover, the gantry crane can be considered a Multiple Input Multiple Output (MIMO) process [10], which is easily dealt by MPC controllers. It should also be mentioned that high-performance controllers, based on solutions of an online optimization problem, like MPCs, are often computationally costly, mainly when applied to MIMO processes.Therefore, this work proposes to obtain an explicit formulation for the Multivariable Generalized Predictive Control (GPC) based into a multiparametric programming and applying it to a Gantry Crane System (GCS) subject to input and output constraints. The used crane system model is based on [9, 22]. The proposed controller is compared with two conventional GPC control strategies: one that does not handle constraints but uses an analytical solution from cost function; and another one that uses Quadratic Programming (QP) to calculate the control action under constraints.This paper proposal differs from other MPC crane applications because it is able to calculate the control actions (at runtime), more quickly than when obtained from online optimization. Also, a multiparametric GPC formulation is an under-explored topic in literature, with few examples [23, 24].The remainder of this paper is organized as follows: in Section2, a GCS concept is deepened, where we explain the used crane model and its linearized form. After that, we address the traditional GPC controller, with and without constraints, in Sections 3 and 4. In order to design the explicit controller, in Section 5, the algorithm to obtain the Piecewise Affine control law parameters is described. In sequence, a numerical example of a crane is used to highlight the proposed controller behavior and compare it to the other GPC strategies (Section 6). Finally, the conclusions of the paper are presented.


## 2. Gantry Crane Dynamics

Crane dynamic model has been an important research area over the years for controller design [4, 13, 22, 25]. Because the crane controller needs to quickly move the trolley at the same time it decreases undesirable fluctuations of the payload, a model that describes crane dynamics is very important to understand how the relationship between the trolley movement and the payload swing works.Among crane systems, the Gantry Crane System (GCS) is one of the most preferred in industries [9, 10]. In this application, the trolley mass, payload mass, and cable length influence payload swing and trolley displacement [12] as shown in Figure 2.Figure 2
Schematic diagram of GCS.Figure2 shows, along one axis, a GCS scheme where x is the trolley horizontal displacement with mass m2 and θ is the payload oscillation angle. The payload with mass m1 (subject to gravity action g) is connected to the cart with a cable of length l. While the cart is in motion, the trolley is subject to damping friction d. Note that, in this system, the number of inputs is lower than the number of outputs which means this is an underactuated system.The GCS can be represented by a nonlinear model as shown in (1) and (2):(1)m1+m2x¨+m1lθ¨cos⁡θ-m1lθ˙2sin⁡θ+dx˙=F(2)m1l2θ¨+m1lx¨cos⁡θ+m1glsin⁡θ=0The driving forceF that moves the trolley is provided by a DC motor, where the input voltage is limited. In this paper, the system used by [22] will be taken into consideration, where the DC motor is limited by ±5 volts and the crane horizontal track length for trolley movement is about 0.8m.The gantry crane motion equation, considering the DC motor dynamic, is given by(3)V=RrpKtrm1+m2x¨+Kerrp+dRrpKtrx˙+m1lRrpKtrθ¨cos⁡θ-θ˙2sin⁡θwhere V, R, Kt, Ke, r, and rp are the input voltage, resistance, torque constant, electric constant, gear ratio, and pulley radius, respectively.Equation (3) can be rewritten as follows:(4)V=K1x¨+K2x˙+K3θ¨cos⁡θ-θ˙2sin⁡θwhere(5)K1=RrpKtrm1+m2,K2=Kerrp+dRrpKtrandK3=m1lRrpKtrAs depicted, the deflection angle can be considered sufficiently small during the crane system control. This allows the model linearization sinceθ near zero imply sin⁡θ≈θ, cos⁡θ≈1 and θ˙=0. Therefore, (2) and (4) become(6)V=Ax¨+Bx˙+Cθ¨(7)lθ¨+x¨+gθ=0These ODEs represent crane dynamic while the model is linearized atθ=0. Thus, a single input two outputs system can be obtained from (6) and (7), with the following transfer functions:(8)XsVs=ls2+gAl-Cs4+Bls3+Ags2+Bgs(9)θsVs=-sAl-Cs3+Bls2+Ags+BgIn order to apply a predictive controller to the Gantry Crane System, some assumptions shall be considered, as follows:(1)
the payload is considered a point mass and works like a pendulum;(2)
the mass and stiffness of the hoisting rope are neglected;(3)
the effects of wind disturbances are not considered.The information shown into Table1 summarize all the parameter values used for the system based on [9, 22].Table 1
Gantry Crane model parameters.
Parameter Value Parameter Value Payload mass (m1) 2.5 Kg Resistance (R) 2.6 Ω Trolley mass (m2) 2.0 Kg Torque constant (Kt) 0.007 Nm/A Cable length (l) 0.6 m Electric constant (Ke) 0.007 Vs/rad Gravitational Acceleration (g) 9.81 m / s 2 Radius of pulley (rp) 0.02 m Damping coefficient (d) 0.001 Ns/m Gear ratio (r) 0.15 DC Motor voltage limits ± 5 V Horizontal track length ≈ 0.8mSince proposed GPC and the other used techniques are formulated in discrete-time, the system model also is discretized. In this case, the sample timeTs is chosen as 0.1 seconds. Note that MPC controllers may need a high computational time. Therefore a conservative choice of sample time, that do not compromise the performance, is made.


## 3. Multivariable GPC Formulation

In this section, the Generalized Predictive Control (GPC) formulation is discussed. This controller is one of the most famous Model Predictive Control (MPC) methods. Its fundamental idea is to calculate a control sequence in a control horizon (Nu) in order to minimize a cost function defined over a prediction horizon (Np). Some MPC are also able to handle input, output, and states constraints. Despite being similar to other predictive controllers as seen in [26, 27], the GPC calculates an analytical solution for a minimization problem without constraints. Additionally, this controller is capable of dealing with MIMO systems, as well as controlling both unstable and nonminimum phase system [28].Recently, MPC has still been relevant in different crane control approaches as [29–33]. Concerning GPC, [34, 35] used this strategy to control an overhead crane system, while [36] applied a GPC to control an offshore crane operation. Hence, in this section, the GPC described in [28] is adapted and rewritten to control crane systems.Consider the CARIMA model for a multivariable process withm inputs and n outputs described as follows:(10)Az-1yk=Bz-1uk-1+1ΔCz-1υkAz-1Δyk=Bz-1Δuk-1+Cz-1υkwhere A(z-1) and C(z-1) are n×n monic polynomial matrices and B(z-1) is a n×m polynomial matrix. The backward shift operator, z-1, is used to define Δ=1-z-1. The variables y(k), u(k), and υ(k) are the output vector, input vector, and noise vector signals, at time instant k, respectively.The following GPC algorithm consists of applying a control sequence capable of minimizing the following cost function:(11)J=∑j=1Npy^k+j∣k-wk+jR2+∑j=1NuΔuk+j-1Q2where y^(k+j∣k) is the j-th system optimal output prediction; Np is the prediction horizon while Nu is the control horizon; w(k+j) is the future system set point; Δu is the control action increment; finally, R and Q are weighting matrices (positive definite) for tracking error and control increments, respectively.Considering the white noise case, whereC(z-1) is equal to identity matrices of order n×n (C(z-1)=I), the optimal prediction for output vector can be generated as follows.The Diophantine Equation is given as(12)I=Ejz-1A~z-1+z-jFz-1where A~(z-1)=A(z-1)Δ, Ej(z-1) and Fj(z-1) are polynomial matrices whose orders are j-1 and na (degree of A(z-1)), respectively.From this point, the argument(.)(z-1) will be omitted for readability when its use is implicit.If (10) is multiplied by ΔEjzj, then we have (13)ΔEjzjAyk=ΔEjzjBuk-1+ΔEjzj1ΔIυkEjA~yk+j=EjBΔuk+j-1+Ejυk+jUsing (12), we obtain(14)I-z-jFyk+j=EjBΔuk+j-1+Ejυk+jyk+j=Fjyk+EjBΔuk+j-1+Ejυk+jBecause Ej degree is j-1, all the noise terms are in future. Considering E[υ(k)]=0, the expected value of y(k+j) is(15)y^k+j∣k=Eyt+j=Fjyk+EjBΔuk+j-1Considering EjB=Gj+z-jGjp the prediction of y can be written as(16)y^k+j∣k=GjΔuk+j-1+GjpΔuk-1+FjykNote that the last two right-hand side terms depend only on past values, which correspond to process free response if the control action is maintained constant. Additionally, the first term depends only on the future values and is known as the forced response.Finally, (16) can be generalized as (17)y^k+j∣k=GjΔuk+j-1+fjwhere(18)y^k+1∣ky^k+2∣k⋮y^k+Np∣k=G00⋯0n×mG1G0⋯0n×m⋮⋱⋱⋮GNp-1GNp-2⋯GNp-NuΔukΔuk+1⋮Δuk+Nu-1+f1f2⋮fNpwith fj=GjpΔu(k-1)+Fjy(k) and Gj(z-1)=∑i=j-Nuj-1‍Giz-i and Gi=0n×m for i<0.The predictions can be expressed in a simplified form as(19)y=Gu+fTherefore, (11) can be rewritten as(20)J=Gu+f-wTR¯Gu+f-w+uTQ¯uwhere R¯ and Q¯ are diagonal matrices with R and Q as entries of main diagonal, respectively.Equation (11) can assume a quadratic form, as follows: (21)J=uTGTR¯G+Q¯u+f-wTR¯Gu+f-wTR¯f-wmore precisely as(22)J=12uTHu+bTu+f0where(23)H=2GTR¯G+Q¯bT=2f-wTR¯Gf0=f-wTR¯f-wIf there are no constraints, the optimal solution is given by(24)u=-H-1b=GTR¯G+Q¯-1GTR¯w-f


## 4. Constrained GPC Formulation

So far, given formulations do not consider any limit to the process. This approach is not so realistic since in practice all processes are susceptible to some constraint. In this sense, the crane system described in Section2 shows boundaries in both DC motor voltage and cart path size (see Table 1). Hence, to keep the machine safe, physical limitations must be respected. To solve this problem, the GPC controller can use optimization algorithms in order to calculate control action that respect imposed constraints.The control action increment calculated from (24) is an optimal solution for the optimization problem shown in (22). However, if this solution violates some constraints, the control effort would be directly saturated either by the control algorithm or by the actuator itself. Thus, this is not the best control action, since it does not guarantee the optimum solution for the cost function. This situation can be solved when constraints are taken into account.According to [28], process constraints usually impose amplitude limits in the control actions (in crane case this will be the voltage applied to DC motor and its variation) and in the outputs (maximum crane trolley track length and payload oscillation). This can be described by(25)Δumin≤uk≤Δumax∀kumin≤uk-uk-1≤umax∀kymin≤yk≤ymax∀kConsidering a process withm inputs and n outputs, subject to a prediction horizon Np and a control horizon Nu, (25) can be expressed by (26)1uΔumin≤u≤1uΔumax1uumin≤Triangu+uk-11u≤1uumax1yymin≤Gu+f≤1yymaxwhere 1u is a matrix of dimension (mNu×m) formed by Nu(m×m) identity matrices; 1y is a (nNp×n) matrix formed by Np(n×n) identity matrices. Finally, Triang is a Nu×Nu lower triangular block matrix whose nonnull block entries are m×m identity matrices. These constraints can be expressed in a simplified form as (27)Rcu≤cwhere(28)Rc=ImNu×mNu-ImNu×mNuTriang-TriangGGc=1uΔumax-1uΔumin1uumax-1uuk-1-1uumin+1uuk-11yymax-f1yymin+fTherefore, the minimization of objective functionJ can be formulated as a QP problem in the following form:(29)minuJ=12uTHu+bTu+f0s.t.:Rcu≤cThere are several optimization techniques to solve this problem. In this case, the QP must be solved at each iteration of control algorithm. In other words, at each time step, the control action is calculated and sent to the process. When applied to a MIMO process, the amount of memory and CPU time required to solve the optimization problem may grow, according to chosen prediction and control horizons. To reduce this, the simplified form presented by (28) can be expressed considering a Constraint Horizon [37] for input constraints (Nuc≤Nu) and another for output constraints (Nyc≤Np).(30)RNc=ImNuc×mNu-ImNuc×mNuTriangNuc-TriangNucGNycGNyccNc=1uNucΔumax-1uNucΔumin1uNucumax-1uNucuk-1-1uNucumin+1uNucuk-11yNycymax-fNyc1yNycymin+fNycwhere the terms 1uNuc, TriangNuc, 1yNyc, and GNyc are truncated forms of 1u, Triang, 1y, and G, respectively.The objective functionJ is then rewritten as(31)minuJ=12uTHu+bTu+f0s.t.:RNcu≤cNcBy solving this programming problem, it is possible to keep the system under constraints ensuring optimal performance.


## 5. Explicit GPC

In Sections3 and 4, the GPC strategies with and without constraints were introduced. The main problem with the Unconstrained GPC (UGPC) is that it does not calculate the optimum control action taking constraints into account, which can lead to loss of performance or limits violation. On the other hand, the Constrained GPC (CGPC), despite regarding constraints, computes the optimal solution at each iteration of online control. This means that at each time step a large number of calculations must be performed, which imply in high computational cost.One solution to reduce the online QP computational cost is to calculate an explicit control law using multiparametric programming (mp). Controller designs have been developed with mp, focusing on linear systems control subject to constraints [38]. The explicit/multiparametric MPC [39] is one of them, and it has been applied in several practical applications [40, 41], including crane systems [30]. Many of these are industrial applications where the available hardware and control software are limited to Advanced Process Control (APC) [42].The multiparametric programming is capable of subdividing the parameter space into characteristic regions (CR), where the optimal value and the optimizer are expressed as explicit functions of the parameters [43]. This offline controller design approach produces an optimal solution, which is defined as a Piecewise Affine (PWA) control law over polyhedral regions. Therefore, this strategy can find an explicit control law for the Constrained GPC, similar to the Unconstrained GPC control law, as follows(1)
The convex polyhedral setCP is partitioned into NCP polyhedral regions: (32)CPi=x∈Rp∣Pix≤dii=1,⋯,NCP(2)
The optimal solutionu∗(x(k)):CP→Rq is an PWA function in the form (33)u∗xk=Sixk+qiifxk∈CPiThe QP problem shown in (11) can be rewritten as a multiparametric quadratic programming problem (mp-QP). Thus, consider the following mp-QP formulation available in the MPT toolbox for MATLAB® [44]:(34)minu12uTHu+xTF+Cfu+xTYx+Cxx+Ccs.t.:RcNcu≤W+ExThe mp-QP parameters expressed in (34) are defined based on GPC formulation presented in Sections 3 and 4, as follows:(35)x=w-f1uNucuk-1fNyc,F=-2GR¯0nNyc+mNuc×mNu,W=ΔumaxΔuminUmaxUminYmaxYmin,E=02mNuc×nNp+Nyc+mNuc0mNuc×nNp-ImNuc×mNuc0mNuc×nNyc0mNuc×nNpImNuc×mNuc0mNuc×nNyc0nNpc×nNp0nNyc×mNuc-InNyc×nNyc0nNpc×nNp0nNyc×mNucInNyc×nNyc with(36)u=ΔukΔuk+1…Δuk+Nu-1Y=0nNp+Nyc+mNuc×nNp+Nyc+mNucCf=0Cx=0Cc=0and H and RcNc as the same of(23) and (30), respectively.Once the programming problem is settled, it is necessary to design the Explicit GPC control and use it to control the crane system. To better exemplify the controller design step see Algorithm1.Algorithm 1:GPC design.
Input: Model and Constraints parameters. Output: Sj, qj, CP (Characteristics Regions). (1) Assign parameters (see equation (34)) (2) Solve the mp-QP of equation (34)The presented algorithm summarizes the steps required to obtain an explicit law. This law is obtained by including the necessary variables and solving the problem. As output, it returns both the explicit law parameters (Sj and qj) and CP as space parameter divided into characteristic regions CPj.After designing the Explicit GPC, the next part is to control the constrained system with the generated explicit law. Algorithm2 details the required sequence to perform the online control.Algorithm 2:Online control loop.
Input: Sj, qj, CP (Caracteristics Regions). Output: Control action. (1) Calculate x values from equation (34) (2) Verify to which polyhedral region x belongs (3) Calculate the control action from equation (33) associated to the j-th polyhedral regionAs seen, the loop is described in three main steps. At first, it is necessary to calculate the parametersfNyc and w-f. Note that at first iteration u(k-1)=0. These parameters determine the vector x. In sequence, the obtained values of x are used to find the associated polyhedral region. Finally, (33) is used to calculate the control action for the current time instant. The loop continues until the maximum number of iterations is reached or the execution of the algorithm is forced to finish.


## 6. Numerical Example

In this section, the linearized model presented in Section2 is controlled, assuming input and output constraints to illustrate the proposed approach discussed in previous sections. Three situations are explored. In the first one, the crane system is controlled by an Unconstrained GPC (UGPC), in the second, the system is controlled by a Constrained GPC (CGPC), using QP subject to constraints, and, in the third, the system is controlled by the Explicit GPC (EGPC). For comparison purposes, the same parameters are used in all situations.The first step to control the crane system is to obtain the discretized model and, then, rewrite it in CARIMA form. By using the parameters shown in Table1, it is possible to obtain(37)XzVz=4.9630×10-5z3-0.8388z2-0.8387z+1z4-3.6432z3+5.2863z2-3.6430z+1After system discretization, GPC is designed to obtain (23) and (24). In sequence, tuning parameters must be found in order to maximize the performance of the controller when applied to the GCS. In this case, the parameters of the Table 2 were chosen for all three study cases previously listed. It should be mentioned that the MPC parameters were empirically adjusted in the numerical simulations. It was also considered a maximum tolerance of ±0.0029rad for payload swing and the track length of 0.8m.Table 2
GPC parameters.
Parameters Value Np 45 Prediction horizon Nu 1 Control horizon Nyc 13 Constraint output horizon Nuc 1 Constraint input horizon Ts 0.1s Sample time R 0.6 0 0 150 Weighting coefficient for tracking error Q 0.0005 I m × m Weighting coefficient for control increments Δumax + 0.7V Input increment upper limit Δumin - 0.7V Input increment lower limit Umax + 5V Input upper limit Umin - 5V Input lower limit Ymax + 0.8 m + 0.0029 r a d Output upper limit Ymin 0 m - 0.0029 r a d Output lower limitIn all cases, the main objective is to achieve zero payload swing while putting the trolley at the desired position. During the simulation, the set point for the trolley position is0.77m. The cable length, cart mass, and payload mass are those shown in Table 1.The performance of the controllers is analyzed based on minimization of payload oscillation and transient and residual swing angle when the cart is in movement. The Mean Square Error (MSE) can be used as a performance index to both payload oscillation and trolley position, where a lower value of MSE represents a higher swing suppression and correct positioning for the cart (according to its set point), respectively.Together with payload oscillation, maximum transient swing (MT) and residual swing (RS) are also analyzed in which it is desirable to minimize both MT and RS. It is important to define RS as a payload sway that remains after the trolley has reached the steady-state value.Additionally, besides MSE, the control of cart position it is also evaluated considering step responses characteristics, as overshoot and settling time. Furthermore, in order to obtain information about the energy consumption during crane operation, the control effort and its variability are used to calculate the Goodhart indexIgh [45], which is determined as follows:(38)Igh=α1ε1+α2ε2+α3ε3where (39)ε1=∑ukNε2=∑uk-ε12Nε3=∑wk-ykNwith N being the number of samples. The parameters α1, α2, and α3 will weight what is more relevant to the control performance: spent control energy, variability imposed to actuator, and tracking error, respectively. The chosen value for this parameters were α1=0.2, α2=0.3, and α3=0.5.In order to summarize the comparison between controllers Table3 shows the performances according to error measures, maximum transient swing, residual swing, Goodhart index, settling time, and overshoot.Table 3
Controllers performance.
Performance Index UGPC CGPC EGPC Oscillation MSE 9.9898 × 1 0 - 6 6.7987 × 1 0 - 6 6.7987 × 1 0 - 6 Oscillation Goodhart 8.6761 9.3991 9.3991 MT 0.0046 0.0025 0.0025 RS 1.0561 × 1 0 - 6 1.3208 × 1 0 - 7 1.3208×10-7 Position MSE 0.3385 0.3698 0.3698 Position Goodhart 8.9758 9.7103 9.7103 Settling time(s) 18 14.4 14.4 Overshoot (%) 5.8855 3.8961 3.8961


### 6.1. Unconstrained GPC Control

The first examined case is the application of the Unconstrained GPC to the Gantry Crane System expressed by (8). Figures 3 and 4 illustrate the payload swing and the trolley position.Figure 3
Payload oscillation.Figure 4
Trolley displacement.As observed in Figure4, the trolley position is controlled showing an overshoot of 5.89%. However, the UGPC is not able to keep the cart inside the track limits, since the position is higher than 0.8m. The same happens regarding payload swing. The ±0.0029rad tolerance is violated, with swing reaching a maximum value of 0.0046rad during transient state. The residual swing is nearly zero. The control action and its increment are presented in Figures 5(a) and 5(b), respectively. The input constraints were only respected due to a saturation added in control routine.Figure 5
Control action behaviour for Unconstrained GPC.
(a)
Control effort (b)
Control increment


### 6.2. Constrained GPC Control

The Constrained GPC used the same parameters presented in Table2. This type of control, at each iteration, solves an optimization problem and returns the optimal control action. The advantage of this technique is that even though the system changes, the control action calculation can be correctly performed, unless the problem is infeasible. The CGPC results are shown in Figures 6(a), 6(b), 7(a), and 7(b). As seen from Figures 6(a) and 6(b), the controller is able to keep both payload swing and trolley position inside their respective limits. The maximum swing happens during the transient reaching a value of 0.0025rad and nearly no RS was left. Comparing with the previous case, the CGPC has a better performance, mainly during transient state. About the trolley position, the controller has a lower overshoot reaching 3.8961%. When one considers the control effort, Figures 7(a) and 7(b) show that CGPC keeps the input signal and input increment inside boundaries.Figure 6
System outputs for Constrained GPC.
(a)
Payload oscillation (b)
Trolley displacementFigure 7
Control action behaviour for Constrained GPC.
(a)
Control effort (b)
Control incrementOne limitation found in online optimization is the time spent to calculate the control action. The overall runtime simulation was higher than the other controllers, reaching approximately2.3360s. If the computation takes longer than the sampling time, this may lead the system to instability. For this numerical examples, this is the case when Np is higher and Nyc=Np.The overall runtime spent during the simulations for all controllers is shown on Table4.Table 4
Design time and overall time simulation.
Procedure UGPC CGPC EGPC Design 89.778 μs - 36min Overall runtime 0.0291s 0.9901s 2.3360s


### 6.3. Explicit GPC Control

In this last numerical simulation, the results obtained by the proposed controller are presented. It is important to note that the UGPC showed problems to handle process constraints while the CGPC may have issues regarding the time spent at online execution. The EGPC was able to deal with both situations. Moreover, the tuning parameters of Table2 are also used from this approach. With this tuning configuration, the mp-QP was solved after 34 minutes, generating a total of 57 polyhedral regions. The greater Np, Nu, Nyc, and Nuc are, the greater will be the number of regions and, consequently, the memory storage and CPU time needed to solve mp-QP.The results of proposed EGPC are shown in Figures8, 9, 10(a), and 10(b). Table 3 shows that EGPC has the same performance as CGPC, respecting all imposed constraints. Additionally, note that the overall runtime spent during simulation to compute all control actions was 1.0274s. This is around 2.3594 times faster than CGPC and 34.0241 times slower than UGPC.Figure 8
Payload oscillation.Figure 9
Trolley displacement.Figure 10
Control action behaviour for Explicit GPC.
(a)
Control effort (b)
Control incrementThe main drawback observed for EGPC was the design runtime (time spent during the resolution of the mp-QP problem). That took about36min to finish. However, this procedure is an offline operation and it is one time only execution, whenever the parameters change. After the mp-QP solution is found, the time spent is lower than online solutions.The three studied cases were also evaluated by other index as settling time MSE, Goodhart. The settling time is directly related to the DC motor applied voltage. Its amplitude regulates how fast the trolley can move to reach the set point. Since the maximum input voltage is limited to±5 Volts, it is difficult to obtain a faster control. As shown in Table 3, the CGPC and EGPC controllers took a bit more than 14s to reach steady state, while UGPC was slower than the others, taking 18s. On the other hand, the UGPC achieve a lower value for position MSE. The main reason for this is his fast rising time, which reduces error quickly during transient state but provokes a higher overshoot, and, in this case, a constraint violation. The UGPC had also lower values for both Goodhart indexes. The control increment variability explains this behaviour, since UGPC has a lesser oscillatory signal. Regarding payload’s swing error, the CGPC and EGPC had the better performance, reducing almost 1.47 times the oscillation when compared to the unconstrained case.


## 6.1. Unconstrained GPC Control

The first examined case is the application of the Unconstrained GPC to the Gantry Crane System expressed by (8). Figures 3 and 4 illustrate the payload swing and the trolley position.Figure 3
Payload oscillation.Figure 4
Trolley displacement.As observed in Figure4, the trolley position is controlled showing an overshoot of 5.89%. However, the UGPC is not able to keep the cart inside the track limits, since the position is higher than 0.8m. The same happens regarding payload swing. The ±0.0029rad tolerance is violated, with swing reaching a maximum value of 0.0046rad during transient state. The residual swing is nearly zero. The control action and its increment are presented in Figures 5(a) and 5(b), respectively. The input constraints were only respected due to a saturation added in control routine.Figure 5
Control action behaviour for Unconstrained GPC.
(a)
Control effort (b)
Control increment


## 6.2. Constrained GPC Control

The Constrained GPC used the same parameters presented in Table2. This type of control, at each iteration, solves an optimization problem and returns the optimal control action. The advantage of this technique is that even though the system changes, the control action calculation can be correctly performed, unless the problem is infeasible. The CGPC results are shown in Figures 6(a), 6(b), 7(a), and 7(b). As seen from Figures 6(a) and 6(b), the controller is able to keep both payload swing and trolley position inside their respective limits. The maximum swing happens during the transient reaching a value of 0.0025rad and nearly no RS was left. Comparing with the previous case, the CGPC has a better performance, mainly during transient state. About the trolley position, the controller has a lower overshoot reaching 3.8961%. When one considers the control effort, Figures 7(a) and 7(b) show that CGPC keeps the input signal and input increment inside boundaries.Figure 6
System outputs for Constrained GPC.
(a)
Payload oscillation (b)
Trolley displacementFigure 7
Control action behaviour for Constrained GPC.
(a)
Control effort (b)
Control incrementOne limitation found in online optimization is the time spent to calculate the control action. The overall runtime simulation was higher than the other controllers, reaching approximately2.3360s. If the computation takes longer than the sampling time, this may lead the system to instability. For this numerical examples, this is the case when Np is higher and Nyc=Np.The overall runtime spent during the simulations for all controllers is shown on Table4.Table 4
Design time and overall time simulation.
Procedure UGPC CGPC EGPC Design 89.778 μs - 36min Overall runtime 0.0291s 0.9901s 2.3360s


## 6.3. Explicit GPC Control

In this last numerical simulation, the results obtained by the proposed controller are presented. It is important to note that the UGPC showed problems to handle process constraints while the CGPC may have issues regarding the time spent at online execution. The EGPC was able to deal with both situations. Moreover, the tuning parameters of Table2 are also used from this approach. With this tuning configuration, the mp-QP was solved after 34 minutes, generating a total of 57 polyhedral regions. The greater Np, Nu, Nyc, and Nuc are, the greater will be the number of regions and, consequently, the memory storage and CPU time needed to solve mp-QP.The results of proposed EGPC are shown in Figures8, 9, 10(a), and 10(b). Table 3 shows that EGPC has the same performance as CGPC, respecting all imposed constraints. Additionally, note that the overall runtime spent during simulation to compute all control actions was 1.0274s. This is around 2.3594 times faster than CGPC and 34.0241 times slower than UGPC.Figure 8
Payload oscillation.Figure 9
Trolley displacement.Figure 10
Control action behaviour for Explicit GPC.
(a)
Control effort (b)
Control incrementThe main drawback observed for EGPC was the design runtime (time spent during the resolution of the mp-QP problem). That took about36min to finish. However, this procedure is an offline operation and it is one time only execution, whenever the parameters change. After the mp-QP solution is found, the time spent is lower than online solutions.The three studied cases were also evaluated by other index as settling time MSE, Goodhart. The settling time is directly related to the DC motor applied voltage. Its amplitude regulates how fast the trolley can move to reach the set point. Since the maximum input voltage is limited to±5 Volts, it is difficult to obtain a faster control. As shown in Table 3, the CGPC and EGPC controllers took a bit more than 14s to reach steady state, while UGPC was slower than the others, taking 18s. On the other hand, the UGPC achieve a lower value for position MSE. The main reason for this is his fast rising time, which reduces error quickly during transient state but provokes a higher overshoot, and, in this case, a constraint violation. The UGPC had also lower values for both Goodhart indexes. The control increment variability explains this behaviour, since UGPC has a lesser oscillatory signal. Regarding payload’s swing error, the CGPC and EGPC had the better performance, reducing almost 1.47 times the oscillation when compared to the unconstrained case.


## 7. Conclusion

In this work, a GPC based on transfer function model was adapted to calculate an explicit PWA controller that guarantees the same performance as the constrained controller but with low computational cost.Results showed that the proposed controller was able to control the presented Gantry Crane System reducing payload swing, while positioning the trolley at desired position. When compared with the Unconstrained GPC, the EGPC was able to respect both input and output constraints which derive in better overall performance. When EGPC is compared to CGPC, Table3 evaluation indexes show same results; however online EGPC calculation needs lower computational effort during simulation.In comparison with Quadratic Programming, multiparametric Quadratic Programming storage need is higher. Also, online programming is more flexible to parameter changes. In other words, when using an identification algorithm the control action calculation that uses Quadratic Programming may be less expensive than the calculation by multiparametric programming, since the design step has higher computational cost.Future work shall do a further investigation onto multiparametric formulation so the parameterx becomes independent of the prediction and control horizon size. In the proposed formulation, whenever this tuning parameters increase, the vector x also grows, enlarging the amount of necessary memory and time to solve the mp-QP. Moreover, future works also shall address the control law adaptation with a recursive multiparametric programming algorithm, which would improve the algorithm performance. Finally, the proposed GPC controller needs to be better investigated and applied in different scenarios and problems.



---

*Source: 3612634-2019-02-03.xml*