Real-Time Nonlinear Model Predictive Control of a … · Nonlinear model predictive control ... •...

download Real-Time Nonlinear Model Predictive Control of a … · Nonlinear model predictive control ... • Utilization of automatic differentiation ... • Using a finite difference model

If you can't read please download the document

Transcript of Real-Time Nonlinear Model Predictive Control of a … · Nonlinear model predictive control ... •...

  • Fraunhofer 1

    Janko Petereit

    Fraunhofer Institute of Optronics,System Technologies and Image Exploitation

    Karlsruhe, Germany

    Systems for Measurement, Control and Diagnosis

    Real-Time Nonlinear Model Predictive Control of a Glass Forming Process Using a Finite Element Model

    NOLCOS 2010

  • Fraunhofer 2

    Glass forming process

    pulling direction

    glass blank

    furnace

    quality measure:diameter

    pullers

  • Fraunhofer 3

    Glass forming process PI control

    finitedifference

    model

    (soft sensor)

    nominal geometry parameters,pulling speed

    PI controller

    target formingtemperature

    C

    C

    C

    forming temperature

    furnace temp. change

  • Fraunhofer 4

    Glass forming process NMPC

    Nonlinear ModelPredictive Controller

    finitedifference

    model

    nominal geometry parameters,pulling speed

    target formingtemperature

    C

    C

    C

    optimizerfuture Tforming

    Tfurnace, opt

    nC

    nP

    nP

    1

  • Fraunhofer 5

    Glass forming process FD model

    PDE for heat transfer:

    Discretization of time and space:

    200 slices

    Solution of PDE using finite difference method:

  • Fraunhofer 6

    Nonlinear model predictive control

    Prediction of future CVs:

    Cost function:

    Optimal control trajectory:

    Only numerical solution possible.

  • Fraunhofer 7

    HQP: Huge Quadratic Programming

    Omuses: Optimization of multistage systems

    C++ interface for implementation of system equations (time-continuous or time-discrete) Automatic generation of nonlinear programming problem

    HQP: Huge Quadratic Programming

    Solution of the high-dimensional nonlinear programming problemby Sequential Quadratic Programming (SQP)

    Utilization of automatic differentiation (ADOL-C) Dedicated algorithms for dynamic systems

    (e.g. exploitation of sparsity patterns)

    Efficient solver for optimal control problems

  • Fraunhofer 8

    Implementation details

    Update step of HQP:

    model parameters

    finitedifference

    model

    200

    200

    update()

  • Fraunhofer 9

    Implementation details

    30 prediction steps

    200

    spat

    ially

    dis

    trib

    ute

    dte

    mp

    erat

    ure

    sam

    ple

    s

    T(z)

    z

    full temperature profile

    spline approximation

    sampling points

    Reduction: 6000 900 optimization variables

  • Fraunhofer 10

    Implementation details

    Update step of HQP:

    model parameters

    30

    30

    update()

    200

    200

    finitedifference

    model

    expansion

    splineinterpolation

    compression

    sample im-portant pointsof full profile

  • Fraunhofer 11

    Results

    control and prediction horizon: 2 steps = 1 min

    220 230 240 250 260 time / min

    0

    5

    5

    0

    100

    200

    10

    0

    0

    2

    4

    comp. time / s:

    norm. formingtemperature / C:

    norm. furnace temperature / C:

    furnace temperature change / (C / 30 s):

    NMPCPI

    similar to PI controller

  • Fraunhofer 12

    Results

    control and prediction horizon: 30 steps = 15 min

    220 230 240 250 260 time / min

    0

    5

    5

    0

    100

    200

    10

    0

    0

    10

    20comp. time / s:

    norm. formingtemperature / C:

    norm. furnace temperature / C:

    furnace temperature change / (C / 30 s):

    NMPCPI

    much better than PI controller

  • Fraunhofer 13

    Benchmark

    0 15 30 45 600

    30

    60

    90

    120

    150

    com

    p. t

    ime

    / s

    control horizon

    20

    30

    40

    50

    60 num

    ber o

    f finite d

    ifference iteratio

    ns

    15

    Comp. time increases slightly more than linearly with respect to the control horizon.

    For a control horizon of 30 steps andfor 20 FD iterations the NMPC controller can operate in real-time.

  • Fraunhofer 14

    Conclusion

    Motivation: Improvements for a glass forming process control

    Exploitation of Huge Quadratic Programming:

    Using a finite difference model for the prediction of the temperature profile

    Reduction of complexity by a factor of seven by using splines

    Results:

    Simulations using recorded data showed that NMPC approach outperforms thePI controller by a factor of 3 to 10

    Real-time capable

    Future work:

    control of entire spatially distributed temperature profile

    faster solver (parallel computing)

    Real-Time Nonlinear Model Predictive Control of a Glass Forming Process Using a Finite Element Model

    Glass forming process

    Glass forming process PI control

    Glass forming process NMPC

    Glass forming process FD model

    Nonlinear model predictive control

    HQP: Huge Quadratic Programming

    Implementation details

    Implementation details

    Implementation details

    Results

    Results

    Benchmark

    Conclusion

    Paper_NOLCOS_ 2010.pdf

  • Real-Time Nonlinear Model PredictiveControl of a Glass Forming Process

    Using a Finite Element Model

    Janko Petereit, Thomas Bernard

    Fraunhofer Institute of Optronics, System Technologies and ImageExploitation IOSB, Fraunhoferstr. 1, 76131 Karlsruhe, Germany,

    e-mail: {Janko.Petereit, Thomas.Bernard}@iosb.fraunhofer.de

    Abstract: The control of complex forming processes (e.g. glass forming processes) is achallenging topic due to the mostly strongly nonlinear behavior and the spatial distributednature of the process. In this paper a new approach for the real-time control of a spatialdistributed temperature profile of an industrial glass forming process is presented. As thetemperature in the forming zone cannot be measured directly, it is estimated by the numericalsolution of the partial differential equation for heat transfer by a finite element scheme. Asthe dimension of the state space model, which is yield by the FE algorithm, is too large forreal-time optimization, a model reduction concept has been developed. The numerical solutionof the optimization problem is performed by the solver HQP (Huge Quadratic Programming).Results of the NMPC concept are compared with conventional PI control results. It is shown thatNMPC stabilizes the temperature of the forming zone much better than PI control. The proposedNMPC scheme is robust against model mismatch of the disturbance model. Furthermore, theallowed parameter settings for a real-time application (i.e. control horizon, sampling period)have been determined. The approach can easily be adapted to other forming processes wherethe temperature profile shall be controlled.

    Keywords: Nonlinear control systems; Predictive control; Finite element model; Processcontrol; Optimization problems; Numerical algorithms.

    1. INTRODUCTION

    The control of complex forming processes (e.g. glass form-ing processes) is a challenging topic due to the mostlystrongly nonlinear behavior and the spatial distributednature of the process. The nonlinearity is caused on theone hand by the physics of the process (e.g. radiation)and on the other hand by nonlinear material properties(e.g. memory effect). In recent years considerable progresshas been made in the field of simulation tools (e.g. finiteelement based simulation of complex rheological processes[11], [1]) and model order reduction (MOR) methods [4],[3]. Consequently, the use of these (reduced) models forprocess control and optimization is in the focus of actualresearch activities [2], [6]. Flatness based control [13] andNonlinear Model Predictive Control (NMPC) conceptsplay an important role in this context. While flatness basedcontrol is restricted to flat systems, NMPC can be appliedto a wide range of dynamic systems.

    Main advantages of NMPC approaches are that the perfor-mance criteria can be designed in a transparent way andthat even time dependent constraints can be applied tomanipulated, output and state variables of the controlledsystem. Drawbacks of NMPC are that computational costsfor the solution of the nonlinear programming problemsoften are high, hence powerful optimization solvers areneeded [8], [9]. A suited solver for large scale dynamicoptimization problems is HQP (Huge Quadratic Program-

    Fig. 1. Glass forming process overview

    ming, [10]). HQP has been used e.g. for NMPC appplica-tions in process industry [12], power plants [7] as well asfor optimal management of water resources [5].

    For complex forming processes in many cases an optimalspatial distributed (and sometimes time-dependent) vis-cosity profile of the material has to be assured. As viscosityis difficult to measure on-line, temperature often is usedas an auxiliary controlled variable. Hence the problemconsists in controlling a spatial distributed temperatureprofile. In this paper a new approach for the real-time

  • Fig. 2. NMPC temperature control scheme

    Fig. 3. HQP update step

    control of a spatial distributed temperature profile is pre-sented. As the temperature in the forming zone cannot bemeasured directly, it is estimated by the numerical solutionof the partial differential equation (PDE) for heat transferby a finite element (FE) scheme. As the dimension of thestate space model, which is yield by the FE algorithm,is too large for real-time optimization, a model reductionconcept has been developed in order to ensure a calculationtime which is sufficiant for real-time control. The numer-ical solution of the optimization problem is performedby HQP. The approach can easily be adapted to otherforming processes where the temperature profile shall becontrolled.

    The paper is organized as follows. In section 2 the generalNMPC concept is introduced. Section 3 deals with theapplication of the concept to the real-time optimization ofan industrial glass forming process. In section 4 the resultsof the NMPC concept are discussed. Section 5 gives someconclusions.

    2. CONCEPT FOR REAL-TIME OPTIMIZATION OFA SPATIAL DISTRIBUTED TEMPERATURE

    PROFILE

    In our solution concept we propose a real-time nonlinearmodel predictive control of the temperature of a formingzone (here for glass forming processes). In most cases thetemperature profile cannot be measured directly, hence ithas to be estimated by a spatial distributed model. Theheat transfer PDE

    cp(T )T

    t= (T )

    2T

    z2+ qconv(T, z) + qrad(T, z) (1)

    which here is written in 1D formulation has tobe solved numerically for the temperature distributionT (z, t), where z denotes the height and t the time. Forglass the systems behavior is in general strongly nonlineardue to the impact of radiation. Radiation inside the glassis considered in the term qrad. The term qconv describesthe convective heat transfer due to the movement of theglass cylinder. The time-dependent disturbances at the endof a cylinder are estimated by a disturbance model usingthe knowledge from previous productions to determine themodels parameters in a predictive way.

    The NMPC approach is formulated as follows. The pre-dicted values of the controlled variable y(t) are collectedin the vector y for the timesteps from tk...tk+np , wheretk is the actual time and np the prediction horizon. Thepredicted values are calculated by the model

    y = F (xk,u) (2)

    where xk denotes the actual state of the model and thevector u denotes all changes of the controlled variablesfrom the actual time step tk to the prediction horizon (weset prediction horizon np equal control horizon np). Theoptimization

    J = (w y)>Q (w y) + u>Ru (3)uopt = argmin

    uJ (4)

    is performed subject to

    umin u(k + j|k) umax j = 0, . . . , nC 1ymin y(k + j|k) ymax j = 1, . . . , nP (5)

    In this formulation the changes of the manipulated vari-able u are calculated. If necessary, also the absolute value ucould be considered directly in the optimization problem.

    The proposed control concept has been implemented ina C++ application by utilizing the software suite HQP(Huge Quadratic Programming), a solver for large scalenonlinear programming problems, to solve the arisingnonlinear optimal control problems. In order to meet real-time requirements, in each sampling interval the full finiteelement discretization of the temperature profile is reducedconsiderably by a spline approximation (see fig. 3 and4). The spline approximation is admissible due to thetemperature profiles smoothness. In our application thenumber of states could be reduced from 200 to 30.

  • Fig. 4. Spline approximation

    3. APPLICATION TO AN INDUSTRIAL GLASSFORMING PROCESS

    The proposed NMPC concept has been applied to anindustrial glass forming process (fig. 1). A vertically hungglass cylinder is fed into a ring-shaped furnace where itbegins to liquefy. It then starts flowing downwards vis-cously and is taken up by pullers which pull the resultingglass tube with an appropriate speed. It is essential forthe process to stabilize the viscosity profile along thecylinder. The viscosity can be controlled by the furnacetemperature.

    Figure 1 depicts the relevant sensors and actuators re-garding the temperature control: As the furnace tightlyencloses the glass cylinder, there are only three temper-ature sensors available one each right above (Tcyl) andbelow (Ttube) the furnace, and one which measures thefurnace temperature (Tfurnace) itself. There is no possibilityto measure the temperature in the forming zone (Tform)directly. Thus, a strategy is needed to reconstruct thiscontrol variable using the measurements of the only threeavailable sensors. This is achieved by a finite elementmodel. The forming temperature is controlled by increas-ing or decreasing the heating power and hence furnacetemperature.

    In order to ensure optimal product quality there are threemajor variables which must be controlled in an optimalway. The first two are the feeding and pulling speed(respectively force) which are accounted for by a commoncontrol loop. We call this one the geometry control. Thethird variable is the (spatially distributed) temperature ofthe glass in the forming zone, whose control is done bya seperate loop, which we call the temperature control. Inthe scope of this paper we will concentrate on the latter,i.e. the temperature control.

    At the end of a production, disturbances arise due to radi-ation effects which are caused by the end of the cylinder.Due to the transport length and the corresponding deadtime it is important that the disturbances which cannot

    Fig. 5. Computation time vs. prediction horizon

    be measured directly are suppressed as early as possibleby an optimal strategy of furnace temperature duringprocess end phase. As the steadiness of the viscosity inthe forming zone exerts the main impact upon the qualityof the final product, an optimal control must stabilizethe spatial distributed temperature (and hence viscosity)profile of the forming zone as good as possible.

    To accommodate for the deficiencies of the PI controllerwe developed a control concept which explicitly takesinto account the large dead time of the process andthe disturbances arising during the end phase. As a PIcontroller can only react to changes in the control variablewhich are already in effect, we switched over to a predictivecontrol strategy, which is able to take corrective actionbefore any impact of the disturbances is visible to thetemperature sensors. This behavior is necessary sincethe delay time of the furnace is too large to lower thetemperature in sufficient time. Otherwise, overshooting ofthe forming temperature would be unavoidable.

    As the prediction model for the NMPC scheme we ex-ploit the finite element model of the 1D temperaturedistribution T (z, t) along the vertical z-axis. The finiteelement model considers heat conduction, convection bythe movement of the glass, radiation (by means of aneffective heat conduction coefficient (T )) and the timedependent disturbances caused by the end of the cylinder.

    4. RESULTS

    We evaluated the control performance resulting with theproposed NMPC concept and compared it to a PI con-troller using previously recorded production data. It isshown that NMPC stabilizes the temperature of the form-ing zone much better than PI control. As can be seenin fig. 6 with very small prediction and control horizon(np = nc = 2) the performance of NMPC and PI controldo not differ very much. In subplot 1 of fig. 6 the deviationeforming from the reference value is shown for a produc-tion time of 40 minutes. In subplot 2 the change of thefurnace temperature (manipulated variable) compared tothe value at starting time t = 0 min. can be seen (i.e.Tfurnace(t) = Tfurnace(t) Tfurnace(0)). Subplot 3 showsthe changes of furnace temperature in each sample time.

  • Fig. 6. Comparison NMPC and PI control (nP = nC = 2)

    These changes have been restricted to 5 K during theoptimization in order to guarantee a smooth change of thefurnace temperature. Finally, in subplot 4 the computationtime for each sample interval (30 s) is shown. It can beseen that the computation time does not differ very much(about 2 s). Fig. 7 shows the results with a much largerprediction and control horizon (np = nc = 30). Fromsubplot 1 it can be observerd that the control deviationwith NMPC is much smaller compared to the resultswith PI control. Accordingly, the decrease of the furnacetemperature (subplot 2) with NMPC starts much earlier.This is caused by the internal disturbance model whichpredicts the disturbances early enough. From subplot 3 itcan be seen that the defined threshold for changes of thefurnace temperature are reached for a period of about 10minutes. In subplot 4 it can be seen that the computationis always smaller than the sample time of 30 s, hencethe real-time condition is satisfied. The computation timedecreases strongly in the last 15 minutes of the productiondue to the shortened horizon.

    The allowed parameter settings for a real-time application(e.g. control horizon, sampling period) have been deter-mined. In fig. 5 the computation time is plotted versusthe prediction and control horizon (np, nc). The internaltime discretization d of the finite element model (nFDM =Ts/d) is used as parameter (Ts: sample time). From fig. 5it is obvious that for a wide range of parameter values np,nc and nFDM real-time application (computation time