• Non ci sono risultati.

Modeling and real-time optimization of batch distillation processes

N/A
N/A
Protected

Academic year: 2021

Condividi "Modeling and real-time optimization of batch distillation processes"

Copied!
120
0
0

Testo completo

(1)

University of Pisa

Department of Civil and Industrial Engineering

Master’s Degree in Chemical Engineering

Master thesis

Modeling and Real-time optimization of

batch distillation processes

Candidate:

Gianluca Rizzi

Thesis advisors:

Prof. Dominique Bonvin

Dr. Michael Amrhein

Prof. Gabriele Pannocchia

Co-examiner:

Prof. Elisabetta Brunazzi

(2)

Dipartimento di Ingegneria Civile ed Industriale

Corso di Laurea Magistrale in Ingegneria Chimica

Tesi di Laurea Magistrale

Modeling and Real-time optimization of

batch distillation processes

Candidato:

Gianluca Rizzi

Relatori:

Prof. Dominique Bonvin

Dr. Michael Amrhein

Prof. Gabriele Pannocchia

Controrelatore:

Prof. Elisabetta Brunazzi

(3)

To my family: Mimmo, Lucia and Marco

(4)

Batch distillation is a chemical process used to separate the different components of a mixture. Even if it is not as used as the continuous operation the batch process still plays an important role in the chemical process industries mostly where the materials to be separated are produced in small quantities or where the main product contains only small amount of impurities. As this operative way of the distillation process is increasing, it is also increasing the research of optimizing the process since it represents the natural choice of reducing production costs and maximize the product yield.

The purpose of this thesis is to analyze the potential of optimizing the process via an implicit scheme of optimization, so called NCO-tracking strategy. Since the batch nature of the process repeatibility is assumed, thus the process will be optimized over few batches related to the same process specifics (charge and composition).

The different schemes of Real-Time Optimization can be divided into explicit schemes and implicit schemes. While the explicit scheme uses a model-based optimization to update the input parameters related to the process, the implicit scheme computes the update values of the input parameters directly on the bases of measurements, with the use of a high-level controller. The advantages of using an implicit scheme for optimiza-tion are related to the possible presence of uncertainties (model mismatches and process disturbances). NCO-tracking compensates the effect of uncertainties through direct input update via the action of a measurement-based controller; while input update, performed via model-based re-optimization (explicit scheme), could be affect by recursive errors and it does not guarantee that active constraints of the real process will be reached.

In order to define the features of NCO-tracking strategy several steps need to be analyzed. These steps are evaluated offline (before running the process) via simulating the process with the use of a reliable model. The first step of the thesis concerns the implementation of a batch distillation model. The short-cut model realized is based on simplified material balances and FUG equations, a set of experimental equations proposed by Fenske-Underwood-Gilliland already tested and proved to be functional for the purpose of modeling distillation processes. The model built for both Matlab and Simulink codes was tested in several simulations, obtaining satisfying results that proved the reliability of the model and its functionality for its role in NCO-tracking definition.

The main principle of NCO tracking is to turn an optimization problem into a control problem and its greatest feature is the definition of the necessary conditions of optimality (NCO). NCO are quantities related to the process that need to be met to allow the process

(5)

reaching its optimality. Along with the definition of the NCO, this optimization strategy is also characterized by the evaluation of the optimal input profiles and detection of their appropriate parameterization. The optimal input parameterization must be imposed as set-point in order to move the process towards its optimal direction and help meeting the NCO. The control problem is then defined: tracking the NCO by adjusting the parameters that compose the optimal parameterization, via a measurement-based controller (Implicit scheme).

Numerical optimization is performed to understand the optimal behavior of the process and detect the NCO and the appropriate parameterization of the key variables for the batch distillation process. This way, the model and numerical optimization are used only offline, before starting the process, to understand and characterize the optimal solution; while, the online operation will track the NCO by adjusting the parameters, leading the process to its optimality.

The thesis focuses on the application of the NCO-tracking strategy to a specific batch distillation process. The objective of the process is to recover a certain desired amount of high purity main product and the objective of optimization concerns the minimization of the final batch time.

Performing the numerical optimization via simulation of the process model, it was possible to define the NCO and the input parameterization. The NCO detected was: two terminal constraint-seeking NCO, linked to the recovery of light key and main components and two terminal sensitivity-seeking NCO, linked to the gradient of the cost function (final time). The key variable chosen as key variable was the distillate temperature and its parameterization was detected as a combination of two arcs: (i) constant at the beginning of the process, (ii) linearly increasing for the rest of the process. This optimal trajectory is imposed as set-point and controller by adjusting the internal reflux ratio.

Each arc is characterized by two parameters, this way the NCO strategy is defined by: four NCO and four input parameters.

Once that NCO and the input parameterization are defined, it is possible to transform the optimization problem into a control problem by implementing a high-level control responsible of tracking the NCO by adjusting the input parameters. The application of the NCO-tracking strategy, as a control problem, is determined by a square control configuration for a MIMO system (4×4). In order to built a good controller for this system, a decoupling effect is needed; this problem is solved by performing a SVD decomposition, capable of computing the independent input direction of the process. The controller will track the NCO (CV) by adjusting the input directions (MV) and modifying this way the input parameters, since they can be computed as a linear combination of the input

(6)

for this reason the controller will act as a batch-to-batch controller: each batch will be repeated with a new set-point profile for the distillate temperature, determined by the control action on the four parameters.

The batch-to-batch controller will track the necessary conditions of optimality to their set-point values. Sensitivity-seeking NCO will be pushed to 0, thus, the gradient of the final time will be reduced to 0 and the process will reach its optimality. For this reason the batch-to-batch controller can be defined as a Self-Optimizing controller.

The simulation results proposed in this thesis show the potential of NCO-tracking strategy and the possibility of optimizing a repeatable process by meeting the necessary conditions of optimality, reducing the final batch time over consecutive batches.

(7)

Sommario

La distillazione batch (discontinua) `e un processo chimico usato per separare i diversi componenti di una miscela. Anche se non utilizzata come l’operazione in continuo, il processo batch ha un ruolo importante nell’industria chimica di processo soprattutto dove la produzione `e limitata o il prodotto principale contiene solo piccole quantit`a di impurezze. Di pari passo allo sviluppo di questa tipologia di processo produttivo, anche la ricerca di ottimizzare il processo sta subendo una notevole crescita, come naturale metodologia per diminuire i costi di produzione e massimizzare la resa del processo.

L’obiettivo di questa tesi `e analizzare il potenziale di ottimizzazione del processo trami-te uno schema implicito, cosidetto NCO-tracking. Data la natura discontinua del processo se ne assume la ripetibilit`a, quindi il processo sar`a ottimizzato lungo la ripetizione di alcuni batch caratterizzati dalle stesse specifiche (carica iniziale e composizione).

I diversi schemi di ottimizzazione Real-Time possono essere suddivisi in schemi espliciti ed impliciti. Mentre gli schemi espliciti usano un’ottimizzazione basata su un modello del processo, gli schemi impliciti calcolano i valori aggiornati degli input direttamente sulla base di misurazioni, attraverso l’uso di un high-level control. I vantaggi nell’utilizzo di uno schema implicito per l’ottimizzazione riguardano la possibile presenza di incertezze (incongruenze del modello e disturbi di processo). NCO-tracking compensa gli effetti delle incertezze attraverso l’aggiornamento diretto degli input per mezzo dell’azione di un controllore che si basa sui dati del processo; mentre, l’aggiornamento degli input eseguito tramite riottimizzazione del modello (schema esplicito), potrebbe essere caratterizzato dalla presenza di errori ricorsivi, i quali non garantiscono il raggiungimento dei vincoli del processo reale.

Affinch´e si possano definire le caratteristiche della strategia del NCO-tracking, c’`e bisogno di analizzare diversi aspetti relativi al processo e alla strategia. Questi aspetti sono analizzati offline (prima dello svolgimento del processo di distillazione) attraverso simulazioni effetuate con un modello affidabile. Il primo compito di questa tesi riguarda l’implementazione di un modello per la distillazione batch. E’ stato realizzato un modello short-cut sulla base di bilanci materiali semplificati e in base al metodo FUG, un insieme di equazioni sperimentali proposte da Fenske-Underwood e Gilliland gi`a utilizzate per altri modelli e risultate funzionanti. Il modello, costruito attraverso l’uso di Matlab e Simulink, `e stato utilizzato per diverse simulazioni ottenendo risultati soddisfacenti che ne provano l’affidabilit`a e la funzionalit`a per il suo utilizzo nella strategia di NCO-tracking.

(8)

definizione delle condizioni necessarie di ottimalit`a (NCO). Le NCO riguardano quantit`a relative al processo che devono essere soddisfatte per permetere al processo di raggiungere la sua ottimalit`a. Insieme alla definizione delle condizioni necessarie di ottimo (NCO), an-che la valutazione dei profili ottimali degli input e la loro appropriata parametrizzazione sono parti importanti nella definizione della strategia di ottimizzazione. La parametriz-zazione ottimale deve essere imposta al processo come set-point in modo da direzionare il processo verso la sua ottimalit`a e soddisfare le NCO. Il problema di controllo `e cos`ı definito: inseguire le NCO agendo sui parametri che compongono la parametrizzazione ottimale, attraverso l’uso di un controllore che si basa su dati reali.

L’ottimizzazione numerica `e eseguita in modo tale da capire l’andamento del processo e individuare le NCO e le appropriate parametrizzazioni per le variabili chiave del processo. In questo modo il modello e l’ottimizzazione numerica sono usati solo offline per analizzare e caratterizzare la soluzione ottimale; mentre, le operazioni eseguite online (durante lo svolgimento del processo), saranno quelle relative all’inseguimento delle NCO attraverso la manipolazione dei parametri legati agli input, portando in questo modo il processo verso la sua ottimalit`a.

Questa tesi si concentra sull’applicazione della strategia di NCO-tracking ad uno specifico processo di distillazione batch. L’obiettivo del processo `e recuperare una de-terminata aliquota di componente principale caratterizzato da elevata purezza, mentre l’ottimizzazione si occupa di minimizzare il tempo finale del singolo batch.

Eseguendo un ottimizzazione numerica, attraverso simulazioni del modello, sono state definite le NCO e la parametrizzazione degli input. Le condizioni di ottimo individuate sono state: due vincoli terminali, legati al recupero del componente leggero e del principale insieme a due condizioni terminali di sensitivit`a, legate ad un determinato gradiente della funzione costo (tempo finale di batch). La variabile chiave scelta `e stata la temperatura del distillato e la sua parametrizzazione `e stata individuata come la combinazione di due profili consecutivi: (i) costante all’inizio del processo, (ii) linearmente crescente per il processo restante. La traiettoria ottimale `e stata imposta come set-point e controllata attraverso la manipolazione del riflusso interno.

Ognuno dei due profili `e caratterizzato da due parametri, componendo cos`ı la strategia di ottimizzazione: quattro NCO e quattro parametri relativi all’input.

Avendo determinato la parametrizzazione, `e possibile trasformare il problema di ot-timizzazione in un problema di controllo attraverso l’implementazione di un high-level control responsabile dell’inseguimento delle NCO attraverso la manipolazione dei

(9)

para-metri di input. Applicando la strategia di ottimizzazione come un problema di controllo, si determina una configurazione di controllo quadrato per un processo MIMO (4× 4). Per fare in modo di costruire un buon controllore per il sistema determinato, `e necessario aggiungere un effetto di decoupling per le variabili: questo problema si risolve tramite una decomposizione a valori singolari (SVD), capace di calcolare direzioni indipendenti per gli ingressi del processo. Il controllore agir`a inseguendo le NCO (CV) attraverso la manipolazione di queste direzioni e modificando in questo modo i parametri di input, in quanto questi possono essere calcolati come una combinazione lineare delle direzioni.

Le NCO individuate dall’ottimizazione numerica riguardano esclusivamente condizioni finali del processo. Per questo motivo, il controllore agir`a come un controllore batch-to-batch: ogni processo sar`a ripetuto con un nuovo profilo di set-point per la temperatura del distillato, determinato dall’azione di controllo sui quattro parametri.

Il controllore batch-to-batch inseguir`a le condizioni necessarie di ottimo al loro valore di set-point. Le condizioni di sensitivit`a saranno portate verso lo 0, riducendo perci`o il gradiente del tempo finale a 0 e portando il processo a raggiungere la sua condizione ottimale. Per questo motivo il controllore batch-to-batch pu`o essere definito anche Self-Optimizing controller.

I risultati delle simulazioni presentati in questa tesi, provano il potenziale della strategia di NCO-tracking e la possibilit`a di ottimizzare un processo batch ripetitivo attraverso il raggiungimento delle condizioni necessarie di ottimalit`a (NCO), riducendo il tempo finale di distillazione lungo la sequenza ripetitiva di batch.

(10)

List of figures x

List of tables xiv

1 Introduction 1

1.1 Overview on distillation . . . 1

1.2 Background on real time optimization . . . 1

1.3 Aims of the project . . . 3

1.4 Outline of the project . . . 3

2 Batch distillation process 4 2.1 Description of the process . . . 4

2.2 Main aspects . . . 6 2.2.1 Batch time . . . 6 2.2.2 Reflux ratio . . . 6 2.2.3 Pressure . . . 7 3 Modeling 11 3.1 Overview . . . 11 3.1.1 Assumptions . . . 12

3.1.2 Inputs and parameters . . . 13

3.2 Model A: reboiler, condenser and collecting pots . . . 13

3.2.1 Differential equations . . . 14

3.2.2 Algebraic equations . . . 14

3.2.3 Output equations . . . 16

3.2.4 DAE system . . . 17

3.3 Model B . . . 18

3.3.1 Algebraic equations to compute trays composition (theta method) . 19 3.3.2 Output equations . . . 22

(11)

Contents

3.3.3 DAE system . . . 22

3.4 Solution to the DAE system . . . 23

3.4.1 Algebraic loop . . . 24

3.4.2 Antoine and Raoult sub-models . . . 24

3.4.3 FUG sub-model . . . 25

3.4.4 Theta sub-model . . . 26

3.5 Model simulations . . . 26

3.5.1 Effects of reflux ratio . . . 27

3.5.2 Effects of pressure . . . 31

3.6 Comparison with real data . . . 32

3.7 Model B simulation . . . 33

3.8 Limitations . . . 34

3.8.1 Model A . . . 34

3.8.2 Model B . . . 35

4 Open-loop numerical optimization 37 4.1 Overview . . . 37

4.2 Optimization strategy . . . 37

4.2.1 Strategy 1: Recovery of lightest and main component . . . 38

4.2.2 Strategy 2: Recovery of the main component . . . 39

4.3 Problem formulation . . . 39

4.3.1 Formulation for strategy 1 . . . 40

4.3.2 Formulation for Strategy 2 . . . 44

4.4 Case study I . . . 47

4.4.1 Optimization of the purification cut . . . 47

4.5 Case study II . . . 50

4.5.1 Optimization of the purification cut . . . 50

4.5.2 Comments . . . 53

5 Optimization via NCO tracking 55 5.1 Overview . . . 55

5.2 Input parameterization . . . 55

5.2.1 Input parameterization for Case study I . . . 56

5.2.2 Input parameterization for Case study II . . . 58

5.3 Varying process gains . . . 59

(12)

6 Optimization via NCO tracking: Self-optimizing control 64

6.1 Overview . . . 64

6.2 Description of the control strategy . . . 65

6.3 Definition of self-optimizing control (batch-to-batch) . . . 68

6.4 Simulation results . . . 70

7 Conclusions and discussion 78 APPENDICES 82 A Nomenclature 82 B Case study III of open-loop numerical optimization 86 B.1 First-cut optimization . . . 86

B.2 Second-cut optimization . . . 90

B.3 Third-cut optimization . . . 93

C Experimental part 95 C.1 Overview . . . 95

C.2 Experiment 1: increasing set-point for distillate temperature T0(t) . . . 96

C.3 Experiment 2: decreasing set-point for distillate temperature T0(t) . . . 97

Bibliography 99

(13)

List of Figures

1.1 Explicit and Implicit scheme of optimization . . . 2

2.1 Schematic of a batch distillation column . . . 5

2.2 Block diagram of a batch distillation column . . . 6

2.3 Relationship between pressure gradient ∆p∆z and gas-load factor Fv for dif-ferent top pressure p0 in a generic packed column . . . 8

2.4 Vapor molar flow rate for variable p0 and constant ∆p(loading) . . . 9

2.5 Equilibrium line for a binary mixture in function of the pressure . . . 9

2.6 Equilibrium and operative line for different values of pressure . . . 10

3.1 Schematic of a batch distillation column for Model B . . . 19

3.2 Equilibrium diagram for a two-component mixture . . . 20

3.3 Schematic procedure for Model B . . . 22

3.4 (a) Algebraic loop for Model A, (b) Breaking of the algebraic loop . . . 24

3.5 Distillate composition x0 with low constant internal reflux ratio . . . 27

3.6 Internal reflux ratio (low value) . . . 27

3.7 Temperature profiles with low constant internal reflux ratio . . . 28

3.8 Distillate composition x0 with high constant internal reflux ratio . . . 28

3.9 Internal reflux ratio (high value) . . . 28

3.10 Temperature profiles, high constant internal reflux ratio . . . 29

3.11 Distillate composition (x0), exponential internal reflux ratio . . . 29

3.12 Exponential internal reflux ratio . . . 30

3.13 External reflux with exponential internal reflux ratio . . . 30

3.14 Temperature profiles, exponential internal reflux ratio . . . 30

3.15 Pressure profile . . . 31

3.16 Vapor flow rate for different pressures . . . 31

3.17 Temperature profiles for different pressure values . . . 32

(14)

3.19 Experimental data . . . 33

3.20 Tray temperatures: a)profile through the column b) profile during the pro-cess . . . 33

3.21 Distillate composition profiles obtained with different light key components 34 3.22 Distillate composition profiles for consecutive fractions obtained with dif-ferent light key components . . . 35

3.23 Tray temperatures for two different mixtures . . . 36

4.1 Open-loop numerical optimization . . . 38

4.2 Case study I, distillate composition x0(t) . . . 48

4.3 Case study I, reboiler composition xB(t) . . . 48

4.4 Case study I, internal reflux ratio r(t) . . . 48

4.5 Case study I, external reflux ratio R(t) . . . 49

4.6 Case study I, distillate and reboiler temperatures T0(t), TB(t) . . . 49

4.7 Case study I, recovery ratio Yp(t) . . . 49

4.8 Case study II, distillate composition x0(t) . . . 51

4.9 Case study II, reboiler composition xB(t) . . . 51

4.10 Case study II, internal reflux ratio r(t) . . . 51

4.11 Case study II, external reflux ratio R(t) . . . 52

4.12 Case study II, distillate and reboiler temperatures T0(t), TB(t) . . . 52

4.13 Case study II, top pressure p0(t) . . . 52

4.14 Case study II, recovery ratio Yp(t) . . . 53

4.15 Contour plots for different top pressure profile: a) constant b) decreasing; yellow lines: maximum temperature (global), red lines: batch time, blue lines: recovery of main component C . . . 54

5.1 Influence of the loss constraint on the optimal distillate temperature profile 56 5.2 Parameterization of the distillate temperature profile, with a constant part (blue dashed line) followed by a linearly increasing part (green dashed line) 57 5.3 Parameterization of the top and reboiler temperatures for Case study II . . 58

5.4 Control loop for the distillate temperature . . . 59

5.5 Multi-step procedure, internal reflux ratio r(t) . . . 59

5.6 Multi-step procedure, distillate temperature T0(t) . . . 60

5.7 Multi-step procedure, distillate composition x0(t) . . . 60

5.8 Process gain Kp as function of time . . . 61

5.9 Low level control, distillate temperature T0(t) (CV) . . . 61

(15)

List of Figures

6.1 Overall structure of the NCO-tracking strategy . . . 64

6.2 Block diagram for BtB control loops; green dashed box: constraint-seeking control loop, red dashed box: sensitivity-seeking control loop . . . 69

6.3 Optimization of the batch time tf over several batches . . . 70

6.4 Change of the input parameters ∆T , ts and δ over several batches . . . 71

6.5 Tracking the NCO over batches . . . 72

6.6 Change in T0 set-point profile from batch to batch . . . 73

6.7 Change of the input parameters ∆T , ts and δ over several batches . . . 74

6.8 Tracking the NCO over batches . . . 75

6.9 Optimization of the batch time tf over several batches . . . 76

6.10 Change in T0 set-point profile from batch to batch . . . 76

7.1 Implicit optimization scheme, green box: offline, red box: online . . . 78

7.2 NCO tracking with uncertainties . . . 80

B.1 Contour plot for Yp,A= 0.99; blue lines: pot composition xp,A(tf,1), yellow-green lines: batch time tf,1 . . . 87

B.2 Cut 1, distillate composition x0(t) . . . 88

B.3 Cut 1, pot composition xp(t) . . . 88

B.4 Cut 1, internal reflux ratio r(t) . . . 88

B.5 Cut 1, external reflux ratio R(t) . . . 89

B.6 Cut 1, recovery ratio Yp(t) . . . 89

B.7 Cut 1, Distillate and reboiler temperatures T0(t), TB(t) . . . 89

B.8 Contour plot for Yp,B= 0.95 and rmax= 0.99; blue lines: recovery ratio of component C Yp,C(tf,2), yellow-green lines: batch time tf,2 . . . 90

B.9 Contour plot for Yp,B= 0.95 and rmax= 0.95; blue lines: recovery ratio of component C Yp,C(tf,2), yellow-green lines: batch time tf,2 . . . 90

B.10 Cut 2, distillate composition x0(t) . . . 91

B.11 Cut 2, internal reflux ratio r(t) . . . 91

B.12 Cut 2, external reflux ratio R(t) . . . 92

B.13 Cut 2, recovery ratio Yp(t) . . . 92

B.14 Cut 2, Distillate and reboiler temperatures T0(t), TB(t) . . . 92

B.15 Cut 3, distillate composition x0(t) . . . 93

B.16 Cut 3, pot composition xp(t) . . . 93

B.17 Cut 3, internal reflux ratio r(t) . . . 94

B.18 Cut3, recovery ratio Yp(t) . . . 94

(16)

C.1 Column K020 . . . 96 C.2 Experiment 1, a) internal reflux ratio (MV) b) distillate temperature T0(CV) 97

C.3 Experiment 2, a) condenser pressure p0 (MV) b) temperature profiles T0,

(17)

List of Tables

4.1 Results for Case study I . . . 47

4.2 Results for Case study II . . . 50

5.1 Input parameterization for Case study I . . . 58

5.2 Four types of NCO . . . 62

6.1 Configuration of the square control problem for the NCO-tracking strategy 67 6.2 Feasible point: input values and terminal constraints . . . 70

6.3 Infeasible point: input values and terminal constraints . . . 73

B.1 Results for cut 1 of Case Study III . . . 87

B.2 Results for cut 2 of Case Study III, rmax = 0.95 . . . 91

(18)

Introduction

1.1

Overview on distillation

The separation of liquid mixtures into their various components is one of the major oper-ations in the process industries, and distillation, the most widely used method for separa-tion processes [6].The theoretical principle behind this chemical process is the difference in volatility between the different components of the mixture [7].

The distillation can be performed as either a continuous or a batch process. Batch dis-tillation has several advantages in many cases and it is often used in industries where high purity products are produced. In particular, it is used for purifying products or recovering solvents or valuable reactants from waste steams. Batch distillation has the advantage of being much more flexible than continuous distillation. The flexibility makes it possible to cope with varying compositions of feed and product specifications; also completely dif-ferent mixtures can be separated using the same column. This is a big advantage with todays frequently changing product specification requirements of the market [12, 15]

1.2

Background on real time optimization

As this operative way of the distillation process is increasing, it is also increasing the research of optimizing the process since it represents the natural choice of reducing pro-duction costs and maximize the product yield [11, 28].

The standard nominal optimization approach consists of determining the optimal solu-tion for a given model of distillasolu-tion process. In practical situasolu-tions, however, it is difficult to develop an accurate process model that would reproduce exactly the real process. The resulting modeling errors, together with process variations and disturbances, may lead to either infeasible operation in the presence of constraints or nonoptimality [5, 21].

(19)

1.2. Background on real time optimization

To reduce the effects of modeling errors, process variations and disturbances it is nec-essary to use measurements. This can be accomplished using a measurement-based opti-mization: via model refinement and re-optimization (explicit optimization) or by updating the inputs directly (implicit optimization) [28].

Explicit schemes involve two steps: a model update that consists of estimating the current states of the process model, and numerical optimization based on the updated process model. This procedure is called repeated optimization and involves the use of a model during the process (online) in fact, the optimization of the model is repeated for each time with the use of new measurements to update the model. These ideas have been widely used in the context of both static optimization (real-time optimization, RTO) and dynamic optimization (model predictive control, MPC) [22, 1].

Figure 1.1: Explicit and Implicit scheme of optimization

Implicit schemes use measurements to update the inputs directly. This scheme for optimization involves the presence of a Self-Optimizing controller that update the inputs for the process with the only use of measurements during the process (online) and the use of the model to develop the control strategy for the controller (offline). For example, under the assumption that the active constraints do not change, it is possible to reach optimality defining offline an appropriate control structure that meets the necessary conditions of optimality (NCO). [22, 23].

(20)

1.3

Aims of the project

This project aims to build a reliable model for batch distillation and optimize the process by using an implicit scheme as the NCO tracking, thus optimizing the process via tracking the necessary conditions of optimality.

This strategy involves the use of measurements to update the inputs in order to satisfy specified constraints defined as NCO (necessary condition of optimality) and optimizing the process by the use of a Self-Optimizing controller. NCO tracking approaches the problem of optimizing the process on the concept of solution model, which can be con-sidered as a description of the input profiles from an optimal point of view. The solution model is based on the input trajectories obtained by numerical optimization of the process model and involves input parameterization and the definition of the necessary condition of optimality. [28].

Once that both parameterization and NCO are defined, a Self-Optimizer controller will be develop to track the necessary conditions. Since the batch nature of the process this controller will be structured as a run-to-run (batch-to-batch) controller, in fact, while some of these conditions can be enforced on-line, others need several successive runs to be met [28].

1.4

Outline of the project

The project has been realized at Laboratoire d’Automatique EPFL Lausanne in collabo-ration with HEIA-FR Fribourg and Firmenich SA.

In the first part (chapter 2 and 3) it is described the batch distillation process and the corresponding short-cut model built. Then, the model developed is used for numerical optimization (Chapter 4) with some analysis of different case studies related to different problem formulations.

The results obtained from numerical optimization will be then discussed in Chapter 5 to evaluate the necessary condition of optimality NCO and the input parameterization, together with the low level control. The high level control will be described in Chapter 6. While the low level control in Chapter 5, will be responsible for the online control of the input, the high level control (Batch-to-batch controller) will update the input from run to run, to track the necessary condition of optimality and optimize the process.

(21)

Chapter 2

Batch distillation process

2.1

Description of the process

Batch distillation is a chemical process used to separate the different components of a mixture. Even if it is not as used as the continuous operation the batch process still plays an important role in the chemical process industries mostly where the materials to be separated are produced in small quantities or where the main product contains only small amount of impurities [13].

Generally the process is composed of a column, a reboiler and a condenser [27]. The reboiler heats the mixture to its boiling point and generates the gas phase inside the column, while the condenser produces the liquid phase. These two equipment operate at different conditions, which means that there is a decreasing profile for both pressure and temperature from the bottom to the top of the column.

The column contains several trays, or is composed of a packing structure, on which the equilibrium between the gas and liquid phases is established in order to enrich the gas phase of the lighter component, while the heavier ones condensate into the liquid phase [26, 19]. The temperature decreases along the column from bottom to top. The different trays, or the different sections of the packing structure, represent the equilibrium stages of the column at which the boiling temperature of the mixture is reached. The decreasing temperature profile produces composition changes between each tray, thus resulting in the separation between lighter and heavier components.

The liquid stream from the condenser is separated into two streams: the reflux stream is sent back to the column to continue and improve the separation, while the product stream is sent into some collecting pots, where the final product is obtained. From Figure 2.1 it is possible to understand the main structure of a batch distillation column [27], composed of four main parts:

(22)

Figure 2.1: Schematic of a batch distillation column

• Part 1: charge and reboiler

• Part 2: trays

• Part 3: condenser

• Part 4: pots

The tray part is characterized by N trays or stages, the reboiler defines the stage N + 1, while the total condenser is not considered as an equilibrium stage. Hence the overall structure consists of N + 2, namely, N + 1 equilibrium stages and the condenser, with the subscript notation k = 0 for the condenser, k = 1, ..., N for the N trays, and k= N + 1 or k = B for the reboiler.

Initially, a mixture composed of S components containing n0

Bnumber of moles is loaded

into the pot (Part 1), then, the liquid charge is sent to the reboiler to produce the vapor stream.

The vapor stream, generated in the reboiler flows through the trays (Part 2), with enrichment of the lighter component. The vapor stream is then totally condensate in the

(23)

2.2. Main aspects

condenser producing the reflux liquid stream uL,0and the distillate liquid stream uD, with

the molar composition x0 (Part 3).

It is also possible to visualize the process as a block diagram. Figure 2.2 shows the

Figure 2.2: Block diagram of a batch distillation column

different interactions between each stage, obtaining the equilibrium vapor composition yk

that will be enriched of the lighter component at the top of the column.

2.2

Main aspects

2.2.1 Batch time

The batch time for the distillation process characterizes the total operational time, that is, the time on which the charge is completely processed, or partially if the goal of the process is to distillate only defined components of the mixture. This parameter is influenced by the distillate stream [13]; in fact, with a higher value of distillate flow rate, the charge will finish faster, thereby reducing the batch time.

2.2.2 Reflux ratio

The distillation process is also influenced by the reflux ratio [13, 19]. The value of the reflux ratio specifies how the liquid stream, leaving the condenser, is split between distillate

(24)

and reflux streams. It can be defined as internal (r) or external (R) reflux ratio: r= uL,0 uG,1 R= uL,0 uD (2.1)

with the following relationships between the two different reflux ratios:

uD = uG,1− uL,0 (2.2) R= uL,0 uG,1− uL,0 = 1 1 r− 1 = r 1− r (2.3) r = R R+ 1 (2.4) It is also important to understand that the external reflux ratio does not have any upper limit, that is R = [0÷ ∞], while the internal reflux ratio is limited between 0 and 1, r= [0÷ 1].

The reflux ratio is important for the process because it affects two main aspects of the distillation, namely the batch time and the distillate composition. In fact, with a high reflux ratio the distillate stream will be smaller, thus allowing the process to improve the separation, while a low reflux ratio increases the distillate flowrate and reduces the batch time.

2.2.3 Pressure

Another important parameter for the distillation process is the pressure. The distillation process works with saturation pressures and thus, increasing the pressure will increase the temperatures.

Effects on the vapor flow rate

A little study shows what happens to the gas flow rate when the pressure is changed. The gas velocity vs,G depends on the gas-load factor Fv [7] and the gas density ρG:

vs,G =

Fv(∆p, p0)

ρ0.5 G

(2.5)

The gas-load factor Fv is a function of the pressure drop through the column ∆p and

the top pressure p0. The curves shown in Figure 2.3, represent the pressure drop for a

specific system obtained at full reflux and it is possible to evaluate the relationship between pressure drop and liquid load or vapor flow rate: working at low specific liquid loads will affect the pressure drop only marginally as long as the gas-load factor remains far from the flooding point [10].

(25)

2.2. Main aspects

From Eq. 2.5, it is possible to compute the vapor mass and molar flow rates. Since the volumetric flow rate is given by:

qG= Acvs,G (2.6)

the mass and molar flow rates become:

wG= qG ρG = Fv Ac ρ0.5G 3600 (2.7) uG= wG ¯ Mw,G (2.8)

Figure 2.3: Relationship between pressure gradient ∆p∆z and gas-load factor Fv for different

top pressure p0 in a generic packed column

Figure 2.3 illustrates, for a generic packing and a given pressure gradient, that an increase in operative pressure reduces the gas-load factor.

Figure 2.4 shows how the vapor molar flow rate increases with the pressure, which results in a reduction of the batch time.

The gas-load factor correlation (Eq. 2.5-2.8) is important because it computes the gas flow rate, having as input the pressure drop and the top pressure. Inverting the equations, it is possible to evaluate the pressure drop as output, starting from the value of Fv as

input, knowing the value of the vapor molar flow rate and using the curves of maximum capacity.

(26)

Figure 2.4: Vapor molar flow rate for variable p0 and constant ∆p(loading)

Effects on the separation

It is also important to analyze the effects of the pressure on the equilibrium between the components and on the efficiency of the separation during the distillation process [26, 19].

Figure 2.5: Equilibrium line for a binary mixture in function of the pressure

Figure 2.5 and 2.6 show the effects of the pressure on the equilibrium curve of a binary mixture. It is possible to see that, increasing the pressure the curve collapse and the separation zone is reduced, namely that the separation is more difficult and to obtain a better separation one would need a larger number of trays in the column or an higher value of reflux ratio.

(27)

2.2. Main aspects

(28)

Modeling

3.1

Overview

An important aspect for optimizing batch distillation is to have a good model that can simulate the real process and produce results similar to the real ones.

In general, an appropriate and highly accurate model requires also high complexity in equations and structure, meaning that the size of the model has to be the result of a compromise between accuracy and simplicity to avoid numerical problems [14].

The batch distillation process can be simulated using some equations that define the model of the distillation process.

The model used in this thesis is based on the standard equations to calculate the physical properties, material balances [14, 19, 13], and on some ad hoc (short cut) equations that allow simulating the distillation process [25, 7].

The process is characterized by two short-cut models:

• Model A: reboiler, condenser and collecting pots

• Model B: trays

While the first model describes only the reboiler, the condenser and the collecting pot sections, the second one also describes the trays section, thus including all the parts necessary to the simulation of the batch distillation process.

These short-cut models are based on the equations of Antoine and Raoult for the equilibrium, on the theta-method equations to evaluate the composition profiles through the column [9] and the FUG equations to evaluate the distillate composition [25, 7].

All these equations represent a DAE system that contains both explicit (linear) and implicit (nonlinear) equations [20].

(29)

3.1. Overview

3.1.1 Assumptions

The model is also characterized by some assumption about the process:

• A1: Ideal gas

• A2: Ideal mixture

• A3: Total condenser, meaning that both the distillate and reflux liquid stream will have the same composition as the vapor stream entering the condenser

• A4: Distillate composition obtained with FUG equations

• A5: At any time instant, the batch column is identical to the rectifying section of a continuous column. This permits the shortcut design methods that have been used successfully in simulation of continuous distillation columns to be used at every step in batch distillation[25]

• A6: Equilibrium between vapor and liquid phase for every stage

• A7: The lightest component is assumed to be the light key component, and the heaviest component is assumed to be the heavy key component during the overall process[25]

• A8: The equilibrium assumed in A6 is evaluated with the Antoine and Raoult equa-tions

• A9: Negligible molar hold-up in the column and in the condenser,PN

k=1 nk,i<< nB,i

• A10: Assumption A4 implies that the liquid and gas molar flow rate are equal for all the stages and the condenser, uL= uL,k ∀ k = 0, 1, ..., N and uG = uG,k ∀ k =

1, .., N + 1.

• A11: Equal pressure drop for the different trays, which implies a linear pressure profile inside the column

• A12: ∆p evaluated with the gas-load factor Fv [7] correlation (Section 2.2.3), thus

avoiding to utilize a model for the heat exchange into the reboiler.

• A13: Correction factor θ in Model B assumed valid for each tray [9], zk,i= zk,i0 θ ∀ k =

1, ..., N

(30)

3.1.2 Inputs and parameters

Mixture parameters Some parameters for the S-component mixture are:

• Antoine coefficients a1,i, a2,i, a3,i ∀ i = 1, ..., S

• Molecular weights Mw = [Mw,1, ..., Mw,S]T

Column parameters The model for the process it is also function of the column pa-rameters, which define the characteristics of the main equipment:

• Diameter

• Height

• Number of trays N

• Column molar hold-up nc

• Tray molar hold-up nt

Initial conditions The user-specified initial conditions for the model refer to the initial number of moles into the charge pot. For an S-component mixture, these initial conditions are:

• Charge pot: nB(0) = n0B, defined by the user

Inputs The inputs for the model are variables that need to be defined by the user:

• Internal reflux ratio r(t)

• Condenser pressure p0(t)

• Vapor flow rate uG(t)

3.2

Model A: reboiler, condenser and collecting pots

The first short-cut model describes the behavior of the distillation process, analyzing only Section 1, Section 3 and Section 4 (Figure 2.1).

This means that we focus on the reboiler, the condenser and the pots, without the analysis of what happens inside the column. Consequently we will analyze quantities related to a S-component mixture only for the condenser and the reboiler.

(31)

3.2. Model A: reboiler, condenser and collecting pots

3.2.1 Differential equations

Computation of reboiler molar composition

According to the assumptions described in Section 3.1.1 (A1, A4, A5), it is possible to express the S-dimensional vector of numbers of moles in the reboiler by writing a material balance between part 1 and part 3 (Figure 2.2).

dnB(t)

dt =−x0(t) uD(t) , nB(0) = n

0

B (3.1)

where the subscript B denotes quantities related to the reboiler, the subscript D denotes quantities related to the distillate stream and x0 denotes the molar fraction of the

distil-late stream. The differential part of the DAE system is then composed of S differential equations.

3.2.2 Algebraic equations

The algebraic equations that compose this model are related to quantities that will be evaluated only in the reboiler and the condenser. These quantities are labeled with the subscript k = 0 and k = B, respectively.

Computation of pressures and pressure drop

Considering the number of trays N and the inputs of the model p0(t) and uG(t), it is

possible to evaluate the pressure in the reboiler in terms of p0(t) and the pressure drop

∆p(t):

0 = g1,1 =−pB(t) + p0(t) + ∆p(t) (3.2)

where k = N + 1, computing the pressure only in the reboiler and having already the pressure in the condenser p0 as input.

The pressure drop ∆p is function of the molar flow rate uGand will be evaluated using

the gas-load factor Fv (Section 2.2.3). To use this correlation, it is necessary to compute

some physical properties such as the molecular weight (Eq. 3.3) and the vapor density of the mixture(Eq 3.4). 0 = g1,2=− ¯Mw,D(t) + MTw x0(t) (3.3) 0 = g1,3 =−ρG(t) + p0(t) ¯Mw,D(t) Rc(T0(t) + 273.15) (3.4)

(32)

0 = g1,4 =−F v(t) +

uG(t) ¯Mw,D(t)

3600 Ac ρG(t)0.5

(3.5)

0 = g1,5 =−∆p(t) + f(Fv(t), p0(t)) (3.6)

where Rc= 82.057 is the gas constant [m

3 mbar

K kmol ].

Note that the vapor density is calculated with the distillate composition, considering the condenser configuration as a total condenser (assumption A5).

This part of the model consists of 5 explicit algebraic equations.

Computation of boiling temperature

The boiling temperatures of the mixture are computed using the Antoine and Raoult equations, a system of implicit equations that describes the equilibrium on the different stages (k = 0 and k = B):

0S = g2,1 =− log ps,k(t) + a1− (Tk(t) IS+ diag(a3))−1a2 (3.7)

0S = g2,2 =−pp,k(t) + diag(xk(t)) ps,k(t) (3.8)

0 = g2,3=−pk(t) + 1TS pp,k(t) (3.9)

This section is composed of 4S + 2 implicit algebraic equations.

Computation of molar distillate flow rate

An important operational quantity of the model A is the distillate flow rate uD(t).

Con-sidering the vapor flow rate uG(t) and the internal reflux ratio r(t) as input, it is possible

to compute the distillate flowrate as:

0 = g1,6 =−uD(t) + uG(t) (1− r(t)) (3.10)

The computation of the distillate molar flow rate requires only one explicit algebraic equation.

FUG method to evaluate the distillate composition x0

The short-cut model is based on the Fenske-Underwood-Gilliland equations, a system of equations that allows the computation of the distillate composition[25].

This method has been studied and tested several times and has been proven efficient for modeling the distillation process, for both batch and continuous operations.

(33)

3.2. Model A: reboiler, condenser and collecting pots

In order to use the FUG equations it is necessary to compute some other parameters such as the external reflux ratio, the bottom composition and the relative volatility:

0 = g1,7=−R(t) + r(t) 1− r(t) (3.11) 0S= g1,8=−αk(t) + ps,k(t) ps,k,h(t) (3.12) 0S= g1,9 =− ¯α(t) + p diag(α0(t)) αB(t) (3.13) 0S= g1,10=−xB(t) + nB(t) 1T S nB(t) (3.14)

where ¯α represent the average value of relative volatility between the condenser and the reboiler parts, while l and h are the light and the heavy key component respectively (A7), the FUG equations are:

     0 = g2,4=−Rmin(t) + ¯ αl,h(t)Nmin(t)− ¯αl,h(t) ( ¯αl,h(t)−1) 1TS diag ( ¯α(t)Nmin(t))xB(t) 0 = g2,4=−Rmin(t) + R(t) [Rmin(t) > R(t)] (3.15)      0 = g2,5 =−Nmin(t) + N− 0.75 (N + 1) (1 − (R(t)−RR(t)+1min(t))0.5668) 0 = g2,5 =−Nmin(t) + N (t) [Rmin(t) > R(t)] (3.16) 0S = g1,11=−x0(t) + (diag ( ¯α(t)Nmin(t)))x B(t) 1T S diag ( ¯α(t)Nmin(t)) xB(t) (3.17)

Note that each equation can be different depending on the value of Rmin to avoid solutions

containing an imaginary part. In fact, in case of Rmin > Rthe value of Rmin is set equal

to the current value of R, avoiding a solution containing an imaginary part from Eq 3.16. The last part of this model is defined by two implicit algebraic equations and 5 S + 1 explicit algebraic equations.

3.2.3 Output equations

Once both the differential and algebraic equations have been solved, it is possible to compute other quantities as outputs of the model.

These quantities refer to the mass and molar amounts in the charge and the collecting pot, the gas and distillate mass flow rates, the composition and the recovery ratio obtained in the pot as result of the distillation process:

(34)

nB(t) = 1TS nB(t) (3.18) mB(t) = MTw nB(t) (3.19) np(t) = nB(0)− nB(t) (3.20) np(t) = 1TS np(t) (3.21) mp(t) = MTw np(t) (3.22) wG(t) = uG(t) ¯Mw,D(t) (3.23) wD(t) = uD(t) ¯Mw,D(t) (3.24) xp(t) = np(t) 1T S np(t) (3.25) Yp(t) = np(t) nB(0) (3.26)

where the subscript p denotes quantities related to the collecting pot.

The last two process outputs are very important since they represent quantities to be optimized in batch distillation, namely, the pot composition and the recovery ratio.

3.2.4 DAE system

The model can also be written as a semi-explicit DAE system[20]:

˙x(t) = f (x(t), z1(t), z2(t))

0 = g1(x(t), z1(t), z2(t)) or z1(t) = ˜g1(x(t), z2(t))

0 = g2(x(t), z1(t), z2(t)))

where

f , vector of differential equations g1,vector of explicit algebraic equations

g2,vector of implicit algebraic equations

x, vector of differential variables z1,vector of explicit algebraic variables

(35)

3.3. Model B

The model equations defined above are:

f =−x0(t) uD(t)

g1T = [g1,1 g1,2 g1,3 g1,4 g1,5 g1,6 g1,7 gT1,8 gT1,9 gT1,10g1,11]

gT2 = [gT2,1 gT2,2 g2,3 g2,4 g2,5]

Note that the equations g1,8, g2,1, g2,2, g2,3 are evaluated for both the condenser and the

reboiler and count 2S and 2 equations, respectively. The variables that characterize Model A are:

x = nB

zT1 = [ p0 pB ∆p Mw,D ρG Fv uG uD r R αT0 αTB α¯T xTB xT0]

zT2 = [pTs,0 pTs,B T0 TB pTp,0 pTp,B Nmin Rmin]

The overall system consists of:

• S differential equations

• 9S + 11 algebraic equations

• 10S + 14 variables

and there are therefore 3 degrees of freedom. It is then possible to set 3 variables, imposed as inputs for the model. The 3 chosen inputs are:

• r(t)

• p0(t)

• uG(t)

as defined in Section 3.1.2. The DAE system is also characterized by a differentiation index of 1 like most of the semi-explicit DAE systems.

3.3

Model B

The second short-cut model computes the composition on each tray using the theta method of convergence for the continuous column [9] and applying it to the case of the batch column.

(36)

3.3.1 Algebraic equations to compute trays composition (theta method)

The short-cut model computes the composition profiles through the column by evaluating the temperatures and compositions on the various trays, denoted with the subscript k = 1, ...N .

Figure 3.1: Schematic of a batch distillation column for Model B

Assumption A5 allows evaluating the batch process as the rectifying section of a con-tinuous column, thus evaluating the tray compositions using the equation of the operating line (Figure 3.2). Considering assumption A9, it is possible to obtain this equation writing a quasi steady-state material balance around the generic tray k− 1 and the distillate part (red line in Figure 3.1):

uG yk,i= uL xk−1,i+ uD x0,i ∀i = 1, ..., S

However, from Eq. 2.2:

(37)

3.3. Model B

and consequently:

uG yk,i = uL (xk−1,i− x0,i) + uG x0,i

Dividing by uG x0,i and considering uuGL = r, it is possible to obtain the operating line for

the batch distillation:

yk,i

x0,i

= r(xk−1,i

x0,i − 1) + 1

considering assumption A6, the equilibrium is assumed for every tray:

yk,i= Kk,i xk,i

zk,i:= xk,i x0,i = r( xk−1,i x0,i − 1) + 1 Kk,i

and, assuming the condenser configuration as total condenser z0,i = 1. For each tray, the

Figure 3.2: Equilibrium diagram for a two-component mixture

theta method evaluates the composition as a function of the operating line and saturation constants, which are computed assuming linear profiles for the pressure (Eq. 3.2) and the temperature in the column:

0 = g1,9 =−pk(t) + p0(t) + k N + 1 ∆p(t) (3.27) 0 = g1,10=−Tk+ TB− N+ 1− k N + 1 (TB− T0) (3.28) 0S = g1,11=− log ps,k(t) + a1− [Tk(t) IS+ diag(a3)]−1a2 (3.29) 0S = g1,12=−Kk+ ps,k pk (3.30)

(38)

0S = g1,13=−zk+ [diag(Kk)]−1[r(zk−1− 1S) + 1S] (3.31)

From a material balance around the tray N and the distillate part (red line in figure 3.1), considering assumption A), it is possible to express uD x0,i as:

di := uD x0,i =

uG yB,i

1 +uG−uD

uD zN,i

∀i = 1, ..., S

where di is the partial molar distillate flow rate related to component i. Considering the

reboiler as an equilibrium stage (Assumption A5)

yB,i= KB,i xB,i

and

uG− uD

uD

= r 1− r

the values of the partial molar flow rates can be written as:

di=

uG xB,i KB,i

1 + 1−rr zN,i

The partial molar flowrates di, i = 1, ..., S, are computed using the assumption of a linear

temperature profile in the column (Eq 3.28). Since the temperature profile is clearly not linear, the correction factor θ is introduced to convert di as follows:

d0i= uG xB,i KB,i 1 + r

1−r zN,i θ

and θ is computed iteratively (Figure 3.3) so that:

S

X

i=1

d0i = uD

where d0i is the corrected value of the partial molar distillate flow rate, computed as function of θ, that satisfies the material balance.

The second part of Model B is then composed of a set of implicit equations used to determine an appropriate value of theta:

0S= g2,6=−d0+  diag  1S+ r 1− r zN θ −1 uG diag(KB) xB (3.32) 0 = g2,7=−uD+ 1TS d 0 (3.33)

(39)

3.3. Model B

Figure 3.3: Schematic procedure for Model B

The algebraic part of Model B is defined by 3SN + 2N + S + 1 equations, of which S+ 1 define the implicit system for the theta method.

3.3.2 Output equations

Once the appropriate value of θ has been determined, it is possible to compute the new composition profile through the column applying the correction factor θ to each tray (A13):

0S = g1,14=−xk+ [diag(d0)] zk

θ uD

(3.34)

evaluating then the new temperature profile through the column using the Antoine and Raoult equations (figure 3.3).

3.3.3 DAE system

Model B can also be written as semi-explicit DAE system as was done for Model A. The equations for Model B are:

g1T = [g1,9 g1,10 g1,11T gT1,12gT1,13]

(40)

Note that the equations g1,9, g1,10, g1,11, g1,2, g1,13are evaluated for N trays. The variables

that characterize the model are:

zT1 = [{pk}k=1,...,N {Tk}k=1,..,N {ps,k}Tk=1,...,N

{Kk}Tk=1,..,N {zk}Tk=1,...,N]

zT 2 = [d

0 θ]

Model B, which consists of:

(3SN + 2N + S + 1) algebraic equations (3SN + 2N + S + 1) variables

has the same number of variables as equations and thus no degrees of freedom. The combined system with Model A consists of:

(3SN + 2N + 11S + 12) equations (3SN + 2N + 11S + 15) variables

and has 3 degrees of freedom.

3.4

Solution to the DAE system

The equations described in the previous sections compose the DAE system for Models A and B:

˙x(t) = f (x(t), z1(t), z2(t))

0 = g1(x(t), z1(t), z2(t)) or z1(t) = ˜g1(x(t), z2(t))

0 = g2(x(t), z2(t), z2(t))

To solve this system, it is possible to utilize a DAE solver, which could provide good accuracy. However, because of the complexity of the model and the resulting difficulty for the DAE solver to obtain a feasible solution quickly, the DAE system for Models A and B will be solved by decomposition of the algebraic and differential equations. This way, it is possible to solve the differential system as an ODE system, receiving the necessary input from the algebraic equations calculated previously.

The algebraic system AE contains both explicit and implicit equations. To solve the implicit part, it is possible to utilize two different strategies: solve an optimization

(41)

3.4. Solution to the DAE system

problem[18] or solve a regression function.

The implicit equations include the Antoine and Raoult sub-models to evaluate the boiling temperature of the mixture and the FUG sub-model to evaluate the distillate composition.

3.4.1 Algebraic loop

To compute the distillate composition with the FUG equation (Eq. 3.17), it is necessary to compute the saturation pressures ps,0 and ps,B from the Antoine equation (Eq 3.7)

and one needs some quantities that are functions of the distillate composition (Mw,D, ρg,1,

∆p, T0, TB). This defines an algebraic loop for Model A. To break the algebraic loop, the

Figure 3.4: (a) Algebraic loop for Model A, (b) Breaking of the algebraic loop

distillate composition computed in the previous step is used as input in order to evaluate the quantities needed by the FUG equations and compute the new value of the distillate composition.

3.4.2 Antoine and Raoult sub-models

The Antoine and Raoult sub-models are used in Model A to evaluate the condenser and reboiler temperatures that are needed to compute the distillate composition with the FUG equations (k = 0 and k = B), and in Model B to compute the tray temperatures as output of the model (k = 1, ..., N ).

Optimization problem

The temperature that corresponds to a given composition can be computed by solving an optimization problem. This optimization problem will find the temperature Tk that will

(42)

minimize a cost function expressing the difference between the pressure computed as a linear profile (Eq 3.2 and 3.27), and the pressure computed with the Antoine and Raoult equations (Eq 3.7 - 3.9).

JAntoine=|pk(t)− pk(t, Tk)| (3.35)

min

Tk

JAntoine

subject to Antoine and Raoult equations (3.7− 3.9)

Regression function

The implicit system can be also solved by fitting the stage temperature Tk to training

data, using the fitrgp command in Matlab, for a given interval of the inputs.

Tk(t) = fT(xk(t), pk(t)) (3.36)

where Tk is the scalar output for the nonlinear equation whose inputs are a vector

con-taining the molar composition and the total pressure of the stage.

3.4.3 FUG sub-model

Optimization problem

The FUG sub-model allows the computation of the distillate composition. This set of equations can be solved by computing the minimal external reflux ratio (Rmin) that

min-imize a cost function.

This optimization problem will find the value Rmin that minimizes a cost function

expressing the difference between the guessed value of Rmin and the value computed with

the FUG equation (Eq 3.15 - 3.16).

JF U G=|Rmin(t)− Rmin(t, Nmin)| (3.37)

min

Rmin

JF U G

(43)

3.5. Model simulations

Regression function

The distillate composition can be found with a surrogate function, which can fit the results of the FUG sub-model, having the distillate composition as output and, the column parameter and the bottom composition, as input.

x0(t) = fD(N, R(t), xB(t), ps,k(t)) (3.38)

3.4.4 Theta sub-model

Optimization problem

Also for this method, it is necessary to solve an optimization problem and compute the correct tray compositions. The optimization problem will find the correct value θ such that the material balance between the last tray and the distillate part (Eq. 3.32 - 3.33) is satisfied.

Jθ =|uD− 1TS d0| (3.39)

min

θ Jθ

subject to T heta equations (3.32− 3.33)

Regression function

The second sub-model could also be solved via a regression function obtained with the fitrgpcommand in Matlab

xk(t) = fx(Tk(t), pk(t), r, xB(t)) (3.40)

where xk is the composition of the generic tray k obtained as output of the nonlinear

equation, whose input is a vector containing the temperature and pressure profiles, the reflux ratio and the composition in the boiler.

3.5

Model simulations

Once that the model is fully described with all the equations, it is important to test it to verify whether the model responds as expected to input changes. The most significant input changes concern the reflux ratio and the pressure.

All the simulations have been done using a 4-component mixture, considering the pressure drop constant and computing the gas molar flow rate as function of gas-load

(44)

factor Fv (Section 2.2.3), using a value given by experience Fv = 2 [Pa0.5], along with a

minimum value of reflux ratio rmin = 0.1, that ensure the correct working of the column.

uG(t) =

Fv(∆p, p0) Ac ρ0.5G (t) 3600

Mw,D(t)

(3.41)

3.5.1 Effects of reflux ratio

It is important to verify how the distillate composition varies with changes of the reflux ratio. Theoretically increasing the value of the reflux ratio improves the purity of the distillate. To verity the correct behavior of the model we changed the value and the profile of the reflux ratio.

Constant internal reflux ratio: low value

Figure 3.5: Distillate composition x0 with low constant internal reflux ratio

(45)

3.5. Model simulations

Figure 3.7: Temperature profiles with low constant internal reflux ratio

Constant internal reflux ratio: high value

Figure 3.8: Distillate composition x0 with high constant internal reflux ratio

(46)

Figure 3.10: Temperature profiles, high constant internal reflux ratio

From the profiles obtained, it is possible to see how reflux ratio affects the purity in the distillate stream: good purity is only possible with a high value of the reflux ratio.

Exponential profile of internal reflux ratio

The next simulation investigates the purity obtained with a exponential profile of internal reflux ratio:

r(t) = 1− (1 − r0)e(−βt) (3.42)

Figure 3.11: Distillate composition (x0), exponential internal reflux ratio

The profiles obtained show the difference between increasing and constant reflux. If with a constant profile it is only possible to have a good separation with a high value of internal reflux ratio, with the exponential profile, it is possible to start with a lower value

(47)

3.5. Model simulations

Figure 3.12: Exponential internal reflux ratio

Figure 3.13: External reflux with exponential internal reflux ratio

(48)

and then increase it to reach a high value of purity, which leads to a reduction of batch time. These simulations have shown the expected behavior of the model in response to changes in reflux ratio.

3.5.2 Effects of pressure

To simulate the effects of pressure we use ∆p as input, evaluating the vapor flow rate as per Eq. 3.14 and assuming a perfect control of pressure drop and a value for the gas-load factor Fv given by experience (Section 3.1.2).

Figure 3.15: Pressure profile

Figure 3.16: Vapor flow rate for different pressures

Figure 3.16 shows that the vapor mass flow rate increases with the pressure. This way, it is possible to speed up the distillation process, having an equal profile for the relux ratio. The temperature also increases with increasing pressure as shown by Figure 3.17.

(49)

3.6. Comparison with real data

Figure 3.17: Temperature profiles for different pressure values

3.6

Comparison with real data

In addiction to looking at the expected model response, it is important to compare model prediction to real data.

A simple simulation has been done with different values of constant reflux ratio, to check whether the results fit experimental data.

Figure 3.18: Model simulation

From Figure 3.18 and 3.19 it is possible to see that the model does not fit the exper-imental data too well, but both profiles have the same behavior in terms of separation. The model seems to give a faster response, but the similarity of the separation make this short-cut model a good tool for the simulation analysis.

(50)

Figure 3.19: Experimental data

3.7

Model B simulation

The output values of Model B are the tray temperatures. From the simulation of Model B, it is possible to obtain the following temperature profiles.

(51)

3.8. Limitations

Figures 3.20 shows the estimation of the temperature profile with the theta method of convergence. It is possible to see the difference between the linear and the altered temperature profiles through the column (Figure 3.20 a) and the consequently profiles obtain for a batch process (figure 3.20 b).The profiles follow correct trajectories and the model can be used to estimate the different tray temperatures for the column.

3.8

Limitations

3.8.1 Model A

As explained in Section 3.2, Model A is based on the FUG equations and on some as-sumptions. One of the assumption (A5) is related to the chose of the heavy and light key component set as the lightest and the heaviest components of the mixture. The first limitation of Model A is related to the dependence of the FUG equations on the key com-ponents; in fact, the composition profiles change with the choice of the light and heavy key components (Figure 3.21).

(52)

The second limitation is related to the assumption of setting the light and heavy key components for the overall process. In fact, the key components are assumed at the beginning of the simulation and they cannot change during the process because this will cause alterations in the parameters and therefore discontinuities in the composition profiles (Figure 3.22).

Figure 3.22: Distillate composition profiles for consecutive fractions obtained with different light key components

This assumption could be incorrect in the case of complete distillation of the light key component before the end of the process: if the light key component is no more present in the column, it should not be considered anymore as a key component for the remaining process.

3.8.2 Model B

As explained in Section 3.3, Model B is based on the theta method of convergence and allows the computation of the tray temperatures.

(53)

3.8. Limitations

The main limitation of this model is related to the convergence condition.

S

X

i=1

d0i = uD

In fact, this condition does not imply that the equation is satisfied for each component, that is,

d0i= di ∀i = 1, ..., S

As a result, the composition profile through the column could be incorrect and influence also the temperature profiles.

Figure 3.23: Tray temperatures for two different mixtures

Figure 3.23 shows the temperature profiles through the column for two different mix-tures and it is possible to notice that, for the second mixture, the reboiler temperature is lower than the temperature on the lower tray.

(54)

Open-loop numerical optimization

4.1

Overview

The model for the distillation process described in Chapter 3 contains inputs that need to be specified in an optimal way to optimize performance.

A method to improve the results of the simulation is to perform numerical optimization. The numerical optimization consists in finding values of these inputs, so-called decision variables, which are able to minimize a cost function, subject to some specific path and terminal constraints that characterize the optimization problem itself [18].

This chapter describes the open-loop numerical optimization, an optimization method aimed of optimizing the process without the use of control loops.

This optimization is important not only to fully understand the behavior of the model but also to have a good indication on what could be a good strategy for the low-level control and NCO tracking strategies.

4.2

Optimization strategy

Considering the batch distillation process of a S-component mixture, the optimization strategies could be different, each one considering the improvement of aspects of the dis-tillation process. The open-loop numerical optimization will determine the optimal input profiles for each one of the optimization problems.

It is also important to notice that the different optimization problems refers to the different cuts. The different optimization strategies depend on what it is necessary to obtain in the pot, which is different for each cut.

The same process can be divided in a different numbers of cuts according to the purpose of the overall process. For this reason, the optimization could be evaluated as an overall

(55)

4.2. Optimization strategy

problem considering all the different cuts that characterize a single strategy, or it can be done a single optimization for each one of the different cuts.

Model A is used for the open-loop numerical optimization. The inputs are

• Internal reflux ratio r(t)

• Vapor flow rate uG(t)

• Condenser pressure p0(t)

Figure 4.1: Open-loop numerical optimization

In case of open-loop simulation, the vapor flow rate uG(t) will be computed as function

of Fv(t), keeping the ∆p constant during the simulation (section 2.2.3).

4.2.1 Strategy 1: Recovery of lightest and main component

The first strategy focuses on the recovery Yp of two of the S components of the mixture:

the lightest one and the main component of the mixture, considering the main component as an intermediate between the lightest and heaviest of a S-component mixture. The recovery of these two components needs to be of good quality, meaning a high purity product obtained in the accumulation pot xp.

For the first optimization strategy, the distillation process will be split in three parts, one for each cut

• First cut: Recovery of lightest component with high purity

• Second cut: Purification of the mixture from the lighter components

(56)

4.2.2 Strategy 2: Recovery of the main component

The second strategy focuses only on the recovery of the main component of the mixture, characterized by high purity in the accumulation pot.

For the second optimization strategy, the distillation process will be split in two parts, one for each cut

• First cut: Purification of the mixture from the lighter components

• Second cut: Recovery of main component with high purity

4.3

Problem formulation

A generic dynamic constrained optimization problem can be described as:

min

h φ(x(tf), ρ) (4.1)

subject to ˙x = F (y, h, ρ) S(y, h, ρ)≤ 0 T(y(tf), ρ)≤ 0

where φ is the scalar cost function, y is a vector of states, h is the input vector (decision variables), ρ the process parameters and tf is the final time. F are the functions describing

the dynamics and the quantities related to the process, S the path constraints and T the terminal constraints.

To formulate the optimization problem, it is necessary to define for each problem:

• Cost function

• Decision variables

• Constraints

The objective of each strategy is the minimization of the batch time, which can increase the productivity of the overall process. The constraints will be different according to the purpose of each optimization strategy, while the decision variables will be divided into two sets and will be different for each cut.

The first set includes only the internal reflux ratio and the batch time, while in the second and third set the top pressure is also considered.

Riferimenti

Documenti correlati

Tuttavia, sebbene la rispazializzazione delle frontiere punti a stabilire un controllo statale sui flussi di merci e persone in entrata e in uscita, essa è diretta anche a gene- rare

It can be seen that patients in phase ON tended to under- estimate the time interval that had to be measured, with respect to controls; the same patients, however,

When a level is created, obviously there are no grabbed object, so grabbing is set to false and grabbing_index to −1 which is the convention equivalent to no grab- bing. We

Wake measurements were also performed in the confined environment; in these tests, the upstream wind speed was set in corresponding conditions with open tunnel experiments, by

Il primo è il Roncesvalles, fram- mento di un cantar de gesta perduto; il secondo è il Libro de buen amor di Juan Ruiz, Arciprete di Hita; il terzo è la Celestina di Fernando de

Renal replacement therapy is an independent risk factor for mortality in critically ill patients with acute kidney injury. Clec'h C, Gonzalez F, Lautrette A, Nguile-Makao

A ran- domised controlled trial of fluid restriction compared to oesophageal Doppler-guided goal-directed fluid therapy in elective major colorec- tal surgery within an