Sunteți pe pagina 1din 35

Lecture 7

Process Optimisation

Lec 07 1

Process Design & Simulation 2013

Intended Learning Outcomes

Identify and represent quantitatively trade-offs in process design Develop understanding of role of optimisation in process design Develop understanding of how type of optimisation problem affects solution strategy Define and identify a simple optimisation problem and solve it

Lec 07 2

Process Design & Simulation 2013

Optimisation in process design and operation


Optimisation is intrinsic to design Design decisions should be based on good designs
o Experience and judgement are useful o Rigorous optimisation is often needed

Operations including planning, scheduling, supply-chain management and selection of operating conditions benefit significantly from optimisation

Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9


Lec 07 3 Process Design & Simulation 2013

Process synthesis, design and optimisation


Structural (topology) optimisation discrete options
o Technology selection, flowsheet configuration, connections
Project definition

Synthesis

Parameter optimisation continuous variables


o Design and operating variables (conversion, purity, pressure, temperature...)

Simulation

Parameter optimisation

Evaluation

Performance evaluation
o Which measure of performance (key performance indicator, KPI; objective function)?
Lec 07 4

Structural optimisation

Final flowsheet

Process Design & Simulation 2013

Process optimisation: Key concepts


The model a mathematical description of the key aspects of the problem The process performance must be evaluated
a suitable measure of performance must be defined this is the objective function

We need to set some constraints


the required outcomes provide problem specifications feasibility (e.g. non-negative mole fractions) and external issues (e.g. related to safety) may be needed to arrive at meaningful solutions

The overall optimisation problem...


select values for the degrees of freedom of the problem in order to achieve the best performance model, constraints and objective function may include both discrete and continuous variables model, constraints and objective function may have linear or nonlinear formulation
Lec 07 5 Process Design & Simulation 2013

Outline

1 Optimisation example: Heat exchanger design 2 Problem formulation 3 Objective functions 4 Convexity 5 Solving single-variable optimisation problems 6 Multivariable optimisation 7 Constrained optimisation

Lec 07 6

Process Design & Simulation 2013

Setting up the problem


Problem decomposition may make the problem simpler
o Need to ensure that optimum solution for one unit (sub-problem) is not at the expense of another unit (sub-problem) o Often need to consider process system and interactions between units

Need good understanding of physics and chemistry


o Ensure that degrees of freedom and constraints are satisfactorily addressed o Identify and include significant issues

Need good understanding of problem context


o What performance indicator(s)? o What constraints? ... solution must be feasible and practical

Need to select mathematical formulation


o linear, non-linear, mixed integer/continuous variables? o what optimisation algorithm? o what initial guess?
Lec 07 7 Process Design & Simulation 2013

Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9.4

Simulation vs. optimisation (Degrees of freedom)


Simulation is a prediction mathematical model relates inputs, specifications, constraints, etc. to outputs
o To simulate, number of unknown variables must be equal to number of independent equations o i.e. number of degrees of freedom is zero

In optimisation, there remain some degrees of freedom


o no. of equations, equality constraints, etc. is fewer than number of unknowns o during optimisation, the values of the degrees of freedom (decision variables or optimisation variables) are selected o ... to maximise or minimise the objective function o ... subject to constraints o typically, optimisation will require repeated simulation using different values of the optimisation variables
Lec 07 8 Process Design & Simulation 2013

1 Optimisation example: Heat exchanger design


1 Design problem
A hot stream is available for heat recovery in a process. A heat exchanger design is needed.
Hot waste stream PROCESS PROCESS Heat recovery

Design problem: How big should we make the heat exchanger ? How much heat should be recovered ?
Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.1
Lec 07 9 Process Design & Simulation 2013

Optimisation example: Heat exchanger design


TC out

2. Mathematical model
mH = mass flowrate of hot stream (kg.s1)

Hot stream TH in (being cooled)

TH out TC in

Cold stream (being heated)

mC = mass flowrate of cold stream (kg.s1) CP H = heat capacity of hot stream (kJ.kg1.K1) CP C = heat capacity of cold stream (kJ.kg1.K1) QH = hot utility demand without heat recovery (kJ.s1) CE = unit cost of energy ($.kJ1 or $.kW1.h) A = heat exchange area (m2) U =overall heat transfer coefficient (kJ.m2.K1 s1) TLM = logarithamic mean temperature difference (K) a,b,c = cost coefficients AF = annualisation factor T = temperature (K)

Write equations (equality constraints) : Enthalpy change :

QREC = mH CP H (TH in - TH out) - 1 QREC = mC CP C (TC out - TC in) - 2 Energy Cost = (QH - QREC) CE QREC UTLM 3 - 4

- transfer area (A) = Heat

Annualised capital cost = (a + bAc)AF - 5


Lec 07 10

Process Design & Simulation 2013

Optimisation example: Heat exchanger design


3. Problem analysis
Five Equations + Specifications for 13 variables (mH, mC,CP H, CP C, TH in,TC in, U, a, b, c, AF, QH, CE) = 18 equality constraints In addition to above 13 known variables, there are 6 unknown variables (QREC, TH out, TC out, Energy Cost, Annualised Capital Cost, A) = 19 variables Degrees of freedom = [No of variables] [No of equality constraints] = 19 18 There is one degree of freedom to be optimised ... Let us select heat recovery as the optimisation variable
Lec 07 11 Process Design & Simulation 2013

Optimisation example: Heat exchanger design


4. Graphical representation
TC out Hot stream TH in (being cooled) TH out T
Hot stream

TH in

TC in Cold stream (being heated)

TH out TC out
Increase heat recovery

TC in

QREC

Conditions in heat recovery exchanger

Graphical representation can help with insights


Lec 07 12 Process Design & Simulation 2013

Optimisation example: Heat exchanger design


5. Application of model
Cost Total Cost

Energy Cost

Capital Cost

Trade-off exists between capital and energy

Optimum

Heat recovered

Recovery of heat from a waste steam involves a trade-off between reduced energy cost and increased capital cost of heat exchanger. Objective function: Total Annualised Cost (TAC) = Energy cost + Annualised Capital Cost Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.1
Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9.3 Process Design & Simulation 2013

Lec 07 13

2 Problem formulation
Integer vs. continuous variables
Process optimisation problems typically involve discrete decisions
o e.g. how many stages? which connection between equipment? how many of a given type of unit? o these often translate into integer variables

Hot stream 1 Cold stream

Hot stream 2 ? Cold stream

Hot stream 3 ? Cold stream

Example of discrete decision which heat recovery match?


Other important process parameters form continuous variables
o e.g. what operating pressure? what volume of tank? what product purity?

The overall problem formulation depends on that of the process model, the objective function and the constraints
Lec 07 14 Process Design & Simulation 2013

Problem formulation Non-linear problems


Most process optimisation problems are non-linear
o i.e. model + objective function + constraints o e.g. physical properties models, reaction models, mass balance using mole fractions, cost calculations...
Cost Total Cost

Energy Cost

Capital Cost

Energy Cost =

(QH - QREC) CE QREC UTLM

Heat transfer area (A) =

Annualised capital cost = (a + bAc)AF


Optimum
Lec 07 15

Heat recovered
Process Design & Simulation 2013

Problem formulation Linear problems


No. batches (product 2) Constraint: Use of unit 1

It is often possible to formulate the problem as a linear problem


o model, constraints and objective function must all be represented using linear (or piece-wise linear) expressions o but... the accuracy of the modelling may be compromised

Revenue dependent on no. of batches

Constraint: Use of unit 2

The benefits of a linear formulation are that the optimisation problems are much easier to solve ... and the optimum that is found is guaranteed to be the global optimum
Lec 07 16

No. batches (product 1)

Two products produced batch-wise in two- step process


Value of products, time required in each processing step known Constraint: Availability of equipment for each processing step

Objective: Maximise revenue from production

Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.5
Process Design & Simulation 2013

3 Objective function
The objective function measures how good the design is
o Is the design fit for purpose? How effectively does it satisfy customer needs? o Measure of performance is maximised or minimised

Profit Net present value Process yield Plant availability

Project expenditure Cost of production Total annualised cost Waste production

Process economics dominates decision making


o e.g. maximise profit

Good understanding of the important issues can allow a simpler objective to be set
o e.g. maximise yield

Difficult to quantify some costs and benefits


o e.g. health, environment, safety, societal impact

May need to consider uncertainties in prices, sales volumes, etc.


Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9.1
Lec 07 17 Process Design & Simulation 2013

Objective functions
Example: Unimodal objective functions
In the heat exchanger design example there was only one 'extreme' point (minimum) in the objective function i.e. it was unimodal.
Cost Total Cost Capital Cost

Energy Cost

Optimum

Heat recovered

Not all objective functions are as straightforward


Lec 07 18 Process Design & Simulation 20132005, Chemical Process Design and Integration, W Smith,

Complex forms of objective functions


f(x) f(x)

Discontinuity Stationary Point

Stationary Points

Local Optimum Global Optimum


x

Local Optimum

Discontinuous function

Multimodal function

A 'false' optimum can be obtained, depending on where we start the search


o A local optimum is not the best solution

A zero gradient is a necessary but not sufficient condition for optimality


Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.1
Lec 07 19 Process Design & Simulation 2013

4 Convexity and concavity


If we draw a straight line between any two points on a function...
f(x) f(x)

x1

x2

x1

x2 x

If the function is to be minimised and all values of the function lie below the straight line convex function
Lec 07 20 Process Design & Simulation 2013

If the function is to be maximised and all values of the function lie above the straight line concave function

Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.1

Objective functions: Convex and concave functions


A convex or concave objective function provides a single optimum
o If we find a minimum for a function that is to be minimised, and is known to be convex, then we know it is the global optimum o If we find a maximum for a function that is to be maximised, and is known to be concave, then we know it is the global optimum

Non-convex and non-concave functions can have local optima

f(x)

f(x)

f(x)

x1

x2

x1

x2

x1

x2

convex function
Lec 07 21

concave function
Process Design & Simulation 2013

neither concave nor convex

Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.1

5 Solving single-variable optimisation problems


1 Region elimination
An example of a method for single variable search is region elimination The function is assumed to be unimodal
f(x) f(x)
f(x)

x1 x2

x1

x2

x1

x2

If f(x1) > f(x2), we need search only for x > x1

If f(x1) < f(x2), we need search only for x < x1

We keep narrowing the search space until x1 x2


i.e. x1 and x2 are within a specified tolerance

Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.2

Lec 07 22

Process Design & Simulation 2013

Solving single-variable optimisation problems


2 Newton's method
f(x)

Evaluate derivative of objective function given candidate solution, x1

Estimate new candidate solution, x2, by assuming objective function is linear

xOPT x1 x2 x3 x

Iterate until successive values of x are sufficiently close

Method can be extremely efficient However, the solution procedure can be unstable if function is not unimodal
Lec 07 23 Process Design & Simulation 2013

Higher-dimensional optimisation problems

Single variable problem find highest point on line

Two-variable problem Two-variable problem find highest peak in find mountain top mountain range

Lec 07 24

Process Design & Simulation 2013

Higher-dimensional optimisation problems


If the optimisation involves two variables, then we can represent it as a contour plot
x2
200 100 50 20

Global Optimum

Local Optimum

x1

The concepts of convexity and concavity can be extended to problems with more than one variable
If a straight line between any two points on the surface always lies above (or below) the surface, the function is concave (or convex, respectively)
Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.1 Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9.7
Lec 07 25 Process Design & Simulation 2013

Multivariable optimisation methods


Direct search
o do not require gradients

Indirect search
o use gradients to select search direction

Stochastic optimisation
o use random choices to guide search

Lec 07 26

Process Design & Simulation 2013

Multivariable optimisation methods


1 Direct search methods e.g. univariate search (parametric search)
all variables except one are fixed remaining variable is optimised this variable is then fixed and another variable is optimised, etc.
x2 x2
200 100 50 20

Global Optimum

Starting point Local Optimum x1

NOTE: Start at the wrong initialisation and we will find the local optimum.
Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.3
Lec 07 27 Process Design & Simulation 2013

Multivariable optimisation methods


2 Indirect search methods
e.g. steepest descent (ascent)
x2

maximum rate of change of the objective function gives search direction problems caused by gradient changing significantly during search and choice of step size search can become extremely slow as the optimum is approached

x2

200 100 50 20

Global Optimum

Starting point Local Optimum x1

NOTE : Start at the wrong initialisation and we will find the local optimum.
Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.3
Lec 07 28 Process Design & Simulation 2013

Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9.7

Multivariable optimisation methods


3 Stochastic optimisation
All of the methods so far seek to improve the objective function at each step.
Unfortunately, this can mean that the search is attracted towards a local optimum.

Stochastic search methods generate a random path to the solution based on probabilities. Improvement in the objective function becomes the ultimate goal, rather than the immediate goal. Some deterioration of the objective function is tolerated, especially during the early stages of a search. Stochastic optimisation reduces the problem of becoming trapped in a local optimum, and of requiring good initial values.

Lec 07 29

... usually at the expense of computation time


Process Design & Simulation 2013

Constraints in design

Issues external to the design problem often constrain the solutions


o e.g. safety, environmental issues, materials, design codes and standards, available resource, the market o these may be represented mathematically as inequalities or equalities

A good understanding of the design problem and its context is essential to formulate the problem constraints
o ... otherwise the optimal solution may be far from practical or feasiblet

Lec 07 30

Process Design & Simulation 2013 Sinnott and Towler, 2009, Chemical Engineering Design

Constrained optimisation
Most optimisation problems involve constraints General form of an optimisation problem involves three basic elements: 1 An objective function to be optimised (e.g. minimise total cost, maximise economic potential, etc.). 2 Equality constraints, which are equations describing the model of the process or equipment. 3 Inequality constraints, expressing minimum or maximum limits on various parameters. Inequality constraints reduce the solution space to be explored In general, the existence of constraints complicates the problem relative to the problem with no constraints
Lec 07 31 Process Design & Simulation 2013

Constrained optimisation
Graphical representation
Constraints on solution space are imposed on objective function
x2

Unconstrained optimum

x2

x2

Constrained optimum

Unconstrained optimum

Local optimum

Unconstrained optimum

Feasible region
x1

Feasible region x1

x1

Unconstrained optimum can be reached (no constraints active at optimum)

Unconstrained maximum cannot be reached (constraints active at optimum)

A non-convex region might prevent the global optimum from being reached.

To ensure we reach the global optimum we need a convex function and a convex region
Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.4
Lec 07 32 Process Design & Simulation 2013

The search for global optimality


If problem is linear, global optimality can be guaranteed If problem is non-linear, global optimality cannot be guaranteed
Most design problems are non-linear Objective Function

Solutions

In the region of the optimum there are usually several solutions with very similar performance Don't concentrate on one solution with the absolute lowest value of the objective function
o always uncertainties in the data o many other factors to consider in the final design
Lec 07 33 Process Design & Simulation 2013

Design optimisation industrial practice


In practice, rigorous optimisation is rare
Time constraints vs. value added Economic uncertainties are large Capital cost estimates are highly approximate Safety, operability, reliability etc. not embedded in optimisation Typically several near-optimal solutions exist

... need to develop confidence that design is close to optimal


Understanding of physical phenomena is important! Which costs dominate? What are constraints and causes of step changes (discontinuities)? What trade-offs need to be accounted for? How sensitive is performance (objective) to important design parameters?

Sinnott and Towler, 2009, Chemical Engineering Design, Ch. 1.9.11


Lec 07 34 Process Design & Simulation 2013

Summary
Models allow quantitative, mathematical representation of process, design objectives and constraints Optimisation employs systematic techniques to find the best process designs Optimisation can address fixed flowsheets and flowsheet generation
o discrete design decisions typically involve integer variables

Which optimisation strategy is appropriate depends on the nature of the mathematical formulations
structural vs. parametric variables, number of degrees of freedom, convexity of problem and objective function

Typically, process design problems are non-linear 'mixed integer' (both discrete and continuous variables), constrained, non-convex problems
o local optima, infeasibilities and discontinuities present significant challenges for process optimisation
Smith, 2005, Chemical Process Design and Integration, Wiley, Ch. 3.11
Lec 07 35 Process Design & Simulation 2013

S-ar putea să vă placă și