ME 555 Project Final Report - University of...
Transcript of ME 555 Project Final Report - University of...
ME 555 Project Final Report:
Optimization of the Home Brewing Process
Team Members:
Clover Aguayo [email protected]
Ibrahim Mohedas [email protected]
Ryan Riddick [email protected]
Abstract
In this project we have optimized the home brewing process with specific attention to
small scale of operation, typical interest in producing a wide variety of beer types, and
limitations on equipment and cost. We adapt industrial brewery process optimization
models for use by a home brewer wishing to run a cost-effective, efficient operation
and predict the alcohol content and taste components of the beer produced.
Three sub-systems have been created representing the mashing process, the
fermentation process, and the design of a heat exchanger performing the dual
functions of heating the mash during mashing and cooling the wort during
fermentation. The mashing process was optimized for minimal concentration of
undesirable compounds given a strict time constraint. The fermentation process was
optimized for minimal process time given several concentration constraints that affect
the beer taste. The heat exchanger design was optimized for lowest cost given the
constraints associated with executing the heat exchange operation effectively for both
processes.
Finally, these three sub-systems were collectively optimized for minimal cost to produce
‘quality’ beer, resulting in a heat exchanger design and time-temperature schedules for
mashing and fermentation. Sensitivity analyses were performed to explore the feasible
space and inform future decisions on heat exchanger design and optimal process
parameters for a variety of beer types and flavors.
2
Table Of Contents
Section 0 Introduction 3
Section I Mashing: Ibrahim 6
1.1 Design Problem Statement 6
1.2 Nomenclature 7
1.3 Mathematical Model 12
1.4 Model Analysis 16
1.5 Optimization Study 20
1.6 Parametric Study 29
1.7 Discussion 30
Section II Fermentation: Clover 32
2.1 Design Problem Statement 34
2.2 Nomenclature 34
2.3 Mathematical Model 36
2.4 Model Analysis 39
2.5 Optimization Study 40
2.6 Parametric Study 43
2.7 Discussion 43
Section III Heat Exchange: Ryan 45
3.1 Design Problem Statement 45
3.2 Nomenclature 45
3.3 Mathematical Model 46
3.4 Model Analysis 51
3.5 Optimization Study 55
3.6 Parametric Study 55
3.7 Discussion 56
Section IV Sub-System Integration 62
4.1 Linking Between Subsystems 62
4.2 Objective Function & Constraints 63
4.3 Results 66
Conclusion 67
Acknowledgements 67
References 68
3
0.0 Introduction
Humans have been brewing beer for at least 10,000 years, however it was not until the
late 19th century that the biochemical dynamics of brewing were understood. Modern
science and industrialization have turned brewing into a highly precise operation with
many researchers dedicated to increasing efficiency, decreasing waste, and refining
the process to produce more consistent results. The basic brewing process is depicted in
Figure 0.1
Figure 0.1: General Brewing Process Schematic
This process knowledge has not been adequately adapted to home brewing, a
popular hobby worldwide with a thriving community of enthusiasts. Home brewing
presents some additional challenges for optimization given the smaller scale of
operation, typical interest in producing a wide variety of beer types, and limitations on
equipment and cost. Our team wishes to adapt the industrial brewery process
optimization models for use by a home brewer wishing to run a cost-effective, efficient
operation and predict the alcohol content and taste components of the beer
produced. Figure 0.1 above provides an overview of a typical home brewing process.
4
Figure 0.2: Overview of the home brewing process
The two sub-processes our team will focus on are the mashing and fermentation stages
wherein the major biochemical reactions occur. Since the outcomes of these two sub-
processes depend heavily on precise time-temperature schedules, our team will
include a heat exchanger design as the third sub-system.
We have chosen to analyze a home brewing process in which the heating required
during the mashing process is provided by a circulating system of water. The water is
heated by a commercial water heater in order to meet the heating needs of the
mashing process. Specifically, the setup would involve a copper tube submerged in
the mash tun in a coiled configuration and connected to a water source such as a
kitchen sink.
We are also assuming this same tubing configuration would then be used by the home
brewer to cool the wort during the fermentation process by again submerging and
passing cold water through the tubing.
5
Initially the subsystems will be individually optimized: in the mashing process
concentrations of unwanted compounds will be minimized subject to a strict process
time constraint, the fermentation process will be optimized for process time subject to a
set of taste-related constraints, and the heat exchanger design will be optimized for the
cost per gallon of beer subject to a standard time-temperature schedule constraint.
However these individual optimums represent opposing constraints on the overall
system thereby requiring collective optimization.
The optimization problem is diagrammed in Figure 0.2. One can see the major overall
objective will be to minimize undesirable flavors while constraining the overall cost. The
subsystems interact in very specific ways: the output of the mashing process (sugar
concentration) is transferred to the fermentation subsystem and the heat exchanger
subsystem will provide the thermal conduction necessary to control the fermentation
and mashing temperatures. The major variables, objectives and constraints are
diagrammed in Figure 0.3.
Figure 0.3: Hierarchical diagram for the optimization of the home brewing process
6
1. Subsystem One: Mashing (Ibrahim)
During the brewing process, mashing is the step where the fermentable sugars are
produced which will then feed the yeast during the fermentation. Malted barley and
other grains contain high levels of starch which are not fermentable by the yeast,
therefore it must be broken down during the mashing process in order to produce
fermentable sugars. This step is performed by an enzyme found in the barley when it is
held at the right temperature in an aqueous solution.
There are two main enzymes which work to break down the starches into fermentable
sugars: alpha-amylase and beta-amylase. Figure 1.1 shows the transition from a large
starch molecule to smaller sugar molecules as a result of the alpha-amylase and beta-
amylase. One can also see that the two enzymes function at different temperature
ranges.
Figure 1.1: Starch reduction to fermentable sugars via alpha-amylase and beta-amylase(Anon n.d.)
Over the years there have been many models developed to simulate this process with
varying levels of complexity (Kettunen et al. 1996; Koljonen et al. 1995; Kühbeck et al.
2005; Wijngaard & Arendt 2006; Muller 2000). In order to perform the following
optimization problem we have combined three models of the mashing process which
calculate the production of the most important molecules which affect fermentable
sugar production and the production of unwanted compounds.
Section 1.1: Problem Statement
The main task of the mashing process is to convert starch molecules into fermentable
sugar molecules. The enzymatic process of starch conversion, however, also produces
non-fermentable sugars and compounds which contribute to a poor flavor profile.
Unwanted compounds include beta-glucans, arabinoxylans, and limit dextrins. Keeping
these unwanted compounds to a limit will be a major task of the optimization. Another
end product which will need to be minimized is the concentration of starch left in the
wort by the end of the mashing. Left over starch molecules do not contribute to flavor
and are not fermentable, and therefore contribute to reduced efficiency of the
7
process. Industrial brewing operations can achieve upwards of 97% conversion
efficiency (i.e. 97% of the original starch content of the malted barley is converted to
fermentable sugars) while home brewers achieve conversion efficiencies of between
60% and 80%. Optimizing the home brew process to increase the conversion efficiency
has the potential to decrease the cost of home brewing while at the same time
reducing the uncertainties when developing brewing recipes.
The main method of controlling the mashing process is via temperature and time
control. Each enzyme has a specific range in which it can effectively convert the starch
molecules along with a corresponding rate of conversion. At the same time that
fermentable sugars are being produced, the unwanted compounds (beta-glucans,
arabinoxylans, and limit dextrins) are also being produced. The temperature profile
must therefore be optimized in order to maximize the concentration of fermentable
sugars while minimizing the concentrations of these unwanted compounds. These are
competing objectives and should therefore present an interesting optimization
problem. The other key variables that can be manipulated to affect the final
concentrations are the mass of malted barley, the initial volume of water, and the types
of malted barley used.
Mashing models which accurately predict the concentration of fermentable sugars,
non-fermentable sugars, and unwanted compounds have been developed as a
function of temperature and time. Three specific models have been identified which
will be used during the course of this project. The primary model is used for the
prediction of fermentable and non-fermentable sugar concentrations after mashing
(Koljonen et al. 1995). The second will be used to predict the concentrations of beta-
glucan after mashing (Kettunen et al. 1996). The third will be used to predict
arabinoxylans during the mashing process (Li et al. 2004). These models were
developed and validated using laboratory scale mashing, which is comparable to the
scale of home brewing.
Section 1.2: Nomenclature:
Table 1.1 shows the list of the main parameters, variables, and constants which will be
included as part of the optimization of the mashing process and which are present in all
three sub-models used in the mashing process.
8
Table 1.2: Variables, constants, and parameters which are commonly used between the three models
which simulate the mashing process
Temperature of the mash at the ith
stage [K]
Isothermal throughout
volume
The particular stage of the mashing
process [integer] Discrete
t Time [min] Discretized
M Initial amount of malted barley [g]
Vw Volume of water added to malt [l]
ttot Total mashing time [min]
Time intervals at specific
temperatures [min]
Volume of the wet mash; volume
that the malt displaces in mash [l]
Ci Cost per gram of malted barley for
each variety [$/g]
Dependent on type of
malted barley used
R Gas constant [J/mol/K] =8.3143
Concentration of starch in mash [g/l] Low final concentration
desired
Concentration of dextrins in mash [g/l] Low final concentration
desired
Concentration of glucose in mash [g/l] High final concentration
desired
Concentration of maltose in mash [g/l] High final concentration
desired
Concentration of maltotriose in
mash [g/l]
High final concentration
desired
Concentration of limit-dextrins in
mash [g/l]
Low final concentration
desired
Concentration of beta-glucans in
the liquid phase [g/l]
Low final concentration
desired
Concentration of arabinoxylans in
the water phase [g/l]
Low final concentration
desired
Initial concentration of starch in
mash [g/l]
Dependent on type of
malted barley used
Final concentration of fermentable
sugars [g/l]
High final concentration
desired
9
Table 1.2 through 1.4 shows the list of variables, parameters, and constants which will be
included in the model of the mashing process. The tables are divided amongst the
three models which comprise the full mashing model. These have been adapted from
the various research articles which developed the mathematical models we will use.
Table 1.2 shows the nomenclature associated with the model of starch hydrolysis which
was developed by Koljonen (1995).
Table 1.2: Variables, constants, and parameters which are used specifically in the model of starch
hydrolysis (Koljonen et al. 1995).
Symbol Description Units Notes
( )
( )
Activity of alpha- and beta-amylase
(liquid phase) [U/l]
Experimentally determined
constant
( )
( )
Activity of alpha- and beta-amylase
(wet phase) [U/l]
Experimentally determined
constant
Initial values of alpha- and beta-
amylase (wet phase) [U/l]
Dependent on type of
malted barley used
Maximum concentration of alpha-
and beta-amylase (liquid phase) [U/l]
Dependent on type of
malted barley used
( )
( )
Kinetic constants of production of
dextrins from ungelatinized and
gelatinized starch and maltotriose
from gelativnized starch
[none] Experimentally determined
constant
( )
( )
Frequency factors for the conversion
of gelatinized and ungelatinized
starch into dextrins and gelatinized
starch into maltotriose by alpha-
amylase
[l/min/g] Experimentally determined
constant
( )
( )
( )
Kinetic constants of glucose,
maltose, maltotriose, and limit-
dextrins production by beta-
amylase
[l/min/g] Experimentally determined
constant
Frequency factors for the conversion
of dextrins into glucose, maltose,
maltotriose and limit-dextrins by
beta amylase
[l/min/g] Experimentally determined
constant
( )
Kinetic constant and frequency
factor for conversion of dextrins into
maltose
[min-1] Experimentally determined
constant
Activation energies for the
denaturation of alpha- and beta-[J/mol]
Experimentally determined
constant
10
amylase
Activation energies for the
activation of alpha- and beta-
amylase
[J/mol] Experimentally determined
constant
Dissolution coefficients
corresponding to alpha- and beta-
amylase
[l/min/g] Experimentally determined
constant
Michaelis constant for production of
maltose from dextrins [g/l]
Experimentally determined
constant
( )
( )
Kinetic constant of the denaturation
of alpha- and beta-amylase [min-1]
Experimentally determined
constant
Frequency factors for the
denaturation of alpha- and beta-
amylase
[min-1] Experimentally determined
constant
Proportionality factor for volume
displaced by malt in mash [none]
Experimentally determined
constant
Highest temperature at which all the
starch is ungelatinized [K]
Experimentally determined
constant
Lowest temperature at which all the
starch is gelatinized [K]
Experimentally determined
constant
Table 1.3 shows the nomenclature associated with the model of starch hydrolysis which
was developed by Kettunen (1996).
Table 3: Variables, constants, and parameters which are used specifically in the model of beta-glucanase
activity and beta-glucan production (Kettunen et al. 1996).
Symbol Description Units Notes
( ) Activity of beta-glucanase in the
wet malt [U/l]
Experimentally determined
constant
( ) Activity of beta-glucanase in the
liquid phase [U/l]
Experimentally determined
constant
( ) Concentration of beta-glucans in
the wet malt [g/l]
Low final concentration
desired
( ) Concentration of beta-glucans in
the liquid phase [g/l]
Low final concentration
desired
( ) Frequency factor for the
denaturation of beta-glucanase [min-1]
Experimentally determined
constant
Activation energy for the
denaturation of beta-glucanase [min-1]
Experimentally determined
constant
Dissolution coefficient of beta- [l/g/min] Experimentally determined
11
glucanase constant
( ) Kinetic constant for the degradation
of beta-glucans [l/U/min]
Experimentally determined
constant
Activation energy for the
degradation of beta-glucans [l/g/min]
Experimentally determined
constant
Dissolution coefficient for soluble
beta-glucans [l/g/min]
Experimentally determined
constant
Parameters related to the
concentration of insoluble beta-
glucans in the wet malt
[g/l] &
[g/l/K]
Experimentally determined
constant
Table 1.4 shows the nomenclature associated with the model of arabinoxylan
production which is an unwanted compound and which was developed by Li (2004).
Table 1.4: Variables, constants, and parameters which are used specifically in the model of arabinoxylan
production (Li et al. 2004).
Symbol Description Units Notes
Kinetic constant for the degradation
of arabinoxylans [1/U/min]
Experimentally determined
constant
( ) Concentration of arabinoxylans in
the wet malt [g/l]
Low final concentration
desired
( ) Concentration of arabinoxylans in
the water phase [g/l]
Low final concentration
desired
Concentration of total
arabinoxylans in the malt [g/l]
Low final concentration
desired
Activation energy for the
degradation of arabinoxylans [J/mol]
Experimentally determined
constant
Activation energy for the
denaturation of endo-xylanase [J/mol]
Experimentally determined
constant
Dissolution coefficient of soluble
arabinoxylans [1/g/min]
Experimentally determined
constant
Dissolution coefficient of endo-
xylanase [1/g/min]
Experimentally determined
constant
Frequency factor for the
denaturation of endo-xylanase [min-1]
Experimentally determined
constant
Parameters related to the
concentration of insoluble
arabinoxylans in the wet malt
[g/l] &
[g/l/K]
Experimentally determined
constant
( ) Activity of endo-xylanase in the wet
malt [U/l]
Experimentally determined
constant
12
( ) Activity of endo-xylanase in the
water phase [U/l]
Experimentally determined
constant
Table 1.5 shows the values of the constants which are used during the mashing
simulation.
Table 1.5: Values of the constants used during mashing
Hydrolysis
Frequency Factor
[l/min/g]
[ ]
[ ⁄ ]
Activation Energy
[J/mol]
Denaturation
Frequency Factor [min-1]
Activation Energy
[J/mol]
Dissolution
[l/g/min]
Section 1.3: Mathematical Model
Objective Function:
The main concerns of the home brewer during the mashing process are related to
conversion efficiency (i.e. concentration of final fermentable sugars), flavor profile, and
effort expended during mashing. Conversion efficiency is directly calculated by the
mathematical model shown above; it is characterized by the ratio of the initial starch
concentration to the concentration of final fermentable sugars (glucose, maltose, and
maltotriose). Flavor profile can be mathematically quantified by the final
concentrations of the unwanted compounds (dextrins, beta-glucans, and
arabinoxylans). Finally, the effort spent by the home brewer can be quantified by both
the total time spent mashing and the number of distinct mashing temperature stages.
Each distinct mashing temperature stage would require the home brewer to input more
energy into the system.
This led to the formulation of the following objective function:
(1.1)
13
Minimizing the unwanted compounds would lead to the most optimum flavor profile
which is the most important factor for the home brewer. The second most important
factor is achieving a high conversion efficiency. Minimizing the level of starch, X1,f,
increases the overall efficiency of the mashing process. Minimizing the dextrins, , X2,f, the
limit-dextrins, X6,f, the beta-glucans, gw,f, and the arabinoxylans, cw,f, improves the flavor
profile of the final beer.
Constraints:
The total mashing time will be constrained based on the current practices of
homebrewers. Our optimization should not lead to excessively long mashing times as
this would increase the effort expensed by the homebrewer to an unreasonable level.
(1.2)
Another practical constraint of the homebrewer will be the level of control that can be
exerted over the temperature. As continual control of the temperature is not feasible,
the length of each temperature stage will be bounded to at least 10 minutes.
(1.3)
The volume of water available for mashing is limited by the volume of a typical home
brewer’s setup. The vast majority of home brewers work in 20 liter batches. The volume
of mashing water must therefore be kept below this level.
(1.4)
The total volume of mashing water plus malted barley must also be constrained by the
limitation of the home brewer’s equipment and bounded below by the minimum batch
size of the beer. Typical home brewers utilize mashing vessels of roughly 38 liters.
(1.5)
(1.6)
In order to constrain the total work load of the home brewer during the mashing
process we will also constrain the total number of distinct temperature stages allowed
during the mash.
(1.7)
The total cost of the brewing process is largely dictated by the malted barley which is
used during the mashing process. Therefore, a constraint on total cost will be employed
by setting a limiting value on cost to the typical recipe kit that can be purchased from
a brewery shop.
14
(1.8) ∑
Model Constraints:
Equations pertaining to fermentable sugar production (Koljonen et al. 1995):
(1.9)
( )
(1.10)
( ) ( )
(1.11)
( )
(1.12)
( ) ( )
(1.13) [ ( )][ ( )
( )]
(1.14) [ ( )] ( ) [ ( )
( )
( )]
(1.15) ( )
(1.16) ( )
(1.17) ( ) [ ( )]
(1.18) ( )
(1.19) ( ) ( ) ;
(1.20) ( ) (
) ( ) ;
(1.21) ( ) ;
(1.22) ( )
(1.23) ( )
(1.24) ( )
(1.25) ( )
Initial Values
(1.26) ( )
(1.27) ( )
(1.28) ( )
(1.29) ( )
(1.30)
(1.31)
(1.32)
15
Equations pertaining to production of beta-glucan (Kettunen et al. 1996):
(1.33)
( )
(1.34)
( ) ( )
(1.35) ( )
(1.36) ( )
(1.37) ( )
(1.38) ( )
(1.39)
( ( )) ( )
(1.40) ( )
(1.41) ( )
(1.42) ( )
(1.43) ( )
(1.44) ( )
Equations pertaining to production of arabinoxylans (Li et al. 2004):
(1.45)
( )
(1.46)
( ) ( )
(1.47) ( )
(1.48) ( )
(1.49) ( )
(1.50) ( )
(1.51)
( ( ))
(1.52)
( ( )) ( )
(1.53) ( )
(1.54) ( )
(1.55) ( )
(1.56) ( )
(1.57) ( )
Design Variables and Parameters
The following will constitute the design variables for the optimization of the mashing
process: temperature of the mash at stage i (Ti), the time spent at each mashing stage
and the time to transition between mashing stages (Δti), and the number of stages used
16
(i). The total mashing time is not a variable because it is an explicit function of the time
spent at and between the various mashing stages ( ∑ ).
Varying the number of mashing stages between one and three leads to a total number
of variables of between two and eight variables. These variables should provide the
control necessary to reach an optimum for the minimization function while still meeting
the constraints necessary to produce high quality beer.
The main parameter for consideration during the mashing process is the type of malted
barley used. A change in the malted barley has an effect on several parameters which
are important within the mathematical modeling of the mashing process. The different
barley mixes used during the parametric study are shown in Table 6.1.
Table 1.6: Parameter values which are changed when the mix of malted barley is changed
Initial Starch
Concentration
Initial Dextrin
Concentration
Initial Dextrin
Concentration
Initial Dextrin
Concentration
Initial Dextrin
Concentration
Alpha-
amylase
activity
rate
Beta-
amylase
activity
constant
X1,o X2,o X3,o X4,o X5,o α(0) Β(0)
[g/l] [g/l] [g/l] [g/l] [g/l] [U/l] [U/l]
Mix 1 112.1 20.6 5.1 10.3 0.0 3.97E5 1.21E6
Mix 2 105.0 24.6 4.8 8.8 0.0 3.34E5 9.12E5
Mix 3 107.7 23.4 5.4 8.8 0.0 2.77E5 6.03E5
Mix 4 95.7 21.7 3.6 8.9 1.3 4.37E5 1.05E6
Mix 5 126.1 22.2 4.2 12.5 0.0 4.80E5 1.22E6
Mix 6 106.9 19.9 4.7 1.1 10.1 3.29E5 9.81E5
Mix 7 104.1 19.3 4.6 1.0 9.8 3.27E5 9.76E5
Section 1.4: Model Analysis and Validation
The mathematical model which was presented in section 1.3 was implemented for
simulation in Simulink. This allowed for solutions to the many partial differential equations
which comprised the model of the mashing system to be efficiently solved and the
concentrations of interest to be calculated quickly. The overview of the Simulink model
is shown in Figure 1.2. A detailed view of the individual subsystems is not shown due to
the complexity of the model.
17
Figure 1.2: Simulink model of the mashing process as described by the mathematical equations obtained
from the literature
Monotonicity Analysis and Boundedness
A monotonicity analysis was not performed due to the time-series nature of the
equations and the partial differential equations which form the basis of the model.
Boundedness and lack of constraint redundancy were assumed since the model has
been previously validated.
Model Validation
The main variable which will be varied during the optimization of the mashing process is
the temperature profile of the mash. Figure 1.3 shows a typical temperature profile that
is used during the mashing process. This profile can be adjusted to affect the final
composition of the mash. The various temperature plateaus have been labeled T1, T2,
and T3 as shown in the figure. The time spent at each temperature and between each
plateau was the second set of major variables and these are also shown in Figure 2.
18
Figure 1.3: Typical temperature profile used during mashing
Model Results
Using the above temperature profile in the mashing model produces the following
results show in Figures 1.4 through 1.6. Figure 1.4 shows the main compound
concentration during mashing, most importantly, the starch concentration and the
fermentable and non-fermentable sugar concentrations. Figure 1.5 shows how beta-
glucan evolves during the mashing process (one of the unwanted compounds). Figure
1.6 shows the level of arabinoxlans during the mashing process (an unwanted
compound).
0 20 40 60 80 100 120315
320
325
330
335
340
345
350
355Mashing Temperature Profile
Tem
pera
ture
[K
]
Time [min]
T1
T2
T3
Δt3
Δt2 Δt1
Δt4
Δt5
19
Figure 1.4: Concentrations of the most important products of the mashing process
Figure 1.5: Beta-glucan activities and concentrations during the mashing process
0 20 40 60 80 100 1200
20
40
60
80
100
120Starch Concentration
Time [min]
Con
cen
trati
on
[g
/l]
0 20 40 60 80 100 120-5
0
5
10
15
20
25
30Dextrin Concentration
Time [min]
Con
cen
trati
on
[g
/l]
0 20 40 60 80 100 1205
6
7
8
9
10
11Glucose Concentration
Time [min]
Con
cen
trati
on
[g
/l]
0 20 40 60 80 100 12010
20
30
40
50
60
70
80
90Maltose Concentration
Time [min]
Con
cen
trati
on
[g
/l]
0 20 40 60 80 100 1200
2
4
6
8
10
12
14
16
18Maltotriose Concentration
Time [min]
Con
cen
trati
on
[g
/l]
0 20 40 60 80 100 1200
5
10
15
20
25
30
35
40Limit-Dextrins Concentration
Time [min]
Con
cen
trati
on
[g
/l]
0 20 40 60 80 100 1200
2
4
6x 10
-3
Beta
Glu
can
Acti
vity
Time [min]
Beta-Glucan
0 20 40 60 80 100 1200
10
20
30
Beta
Glu
can
Co
ncen
trati
on [
g/l]
20
Figure 1.6: Arabinoxylan activities and concentrations during mashing process
The results shown in Figures 3 through 5 as a result of the temperature profile shown in
Figure 2 are in agreement with the results from the literature from which the models
were derived. The validation of the model above allowed for the optimization of the
brewing process to proceed.
Section 1.5: Optimization
The optimization problem described in Section 1.4 above contained up to nine
continuous variables and one discrete variable. Table 1.7 shows these variables and the
conditions for their inclusion in the optimization problem.
Table 1.7: List of important variables, parameters, and constants used during optimization of the mashing
process
Temperature of first stage [K] When i = 1, 2, or 3
Temperature of second stage [K] When i = 2 or 3
Temperature of third stage [K] When i = 3
The total number of stages [integer] Discrete
Δt1 Time spent at T1 [min] When i = 1, 2, or 3
Δt2 Time spent between T1 & T2 [min] When i = 2 or 3
Δt3 Time spent at T2 [min] When i = 2 or 3
Δt4 Time spent between T2 & T3 [min] When i = 3
Δt5 Time spent at T3 [min] When i = 3
Initial concentrations [g/l] Parameter, dependent on type of
malted barley used
0 20 40 60 80 100 1200
0.5
1
1.5
2x 10
4
Ara
bin
oxyla
n A
cti
vity
Time [min]
Arabinoxylan
0 20 40 60 80 100 1200
0.5
1
1.5
2
Ara
bin
oxyla
n C
on
cen
tra
tio
n [
g/l]
21
Due to the discrete nature of the number of stages that can be involved during the
mashing process denoted by ‘i’ it was decided to treat this variable as a parameter
and perform three sets of optimizations while varying the number of stages between 1
and 3.
Optimization 1: One Mashing Stage
The first round of optimization involved an isothermal mashing temperature profile
where the temperature of the mashing was held constant throughout the process. This
represents the simplest method of mashing and also represents the simplest possible
solution for the home brewer because it does not involve changing the temperature of
the mash which requires significant effort.
This iteration of the optimization resulted in the following variables:
i = 1 Δt1
This round of optimization was run with various initial conditions due to the highly non-
linear nature of the mathematical model. The results are shown in Figures 1.7 through
1.9. The goal was to determine a mashing temperature (T1) and a total mashing time
(Δt1) which minimized the objective function.
Figure 1.7 shows how the optimal mashing temperature changed during each iteration
of the optimization (with
varying initial temperatures
selected). One can see that
the optimal values of each
optimization cycle converge
to a temperature very close to
343 degrees Kelvin. The fact
that every iteration converged
to roughly the same value
suggests that this may in fact
be a global optimum.
Furthermore this temperature is
not on a constraint boundary,
revealing that this is not an
active constraint.
Figure1.7: Optimization of one stage mashing. Here we show 26
iterations of optimization in order of decreasing function value
(i.e. iteration 26 resulted in the most optimal results); in this case
the mashing temperature is shown (both initial and final for each
optimization routine).
22
Figure 1.8: Optimization of one stage mashing. Here we show 26 iterations of
optimization in order of decreasing function value (i.e. iteration 26 resulted in
the most optimal results); in this case the mashing time is shown (both initial
and final for each optimization. We can see that a time of 10 minutes was
found for all initial conditions.
Figure 1.8 shows the optimal mashing time as determined by the optimization runs. The
initial starting point for total mashing time is shown along with the optimum mashing
time found
during each
optimization
routine. One can
see that all
optimum values
converge to a
time of ten
minutes, which is
on a constraint
boundary
revealing this is
an active
constraint.
Figure 1.9 shows the
objective function values
with respect to the optimal
mashing temperatures
calculated during various
iterations of the
optimizations. We can see
that the optimal function
values do not vary greatly
between iterations, but
there does appear to be a
clear minimum and trend
among the minimization
iterations.
Figure 1.9: Here we see the objective function value as a
function of the mashing temperature. One can see a clear
minimum where the optimal point is found.
23
Optimization 2: Two Mashing Stages
The second round of optimization involved a two staged process where the mash is first
held at T1 for a specified time and then held at T2 for another length of time. This
represents a moderate level of effort on behalf of the home brewer because it requires
him/her to change the temperature of the mash once during the process.
This iteration of the optimization resulted in the following variables:
i = 2 Δt1 Δt2 Δt3
The results of this round of optimizations are shown in Figures 1.10 and 1.11. Due to the
increasing number of variables, the most relevant plots are shown.
In Figure 1.10 the thirty minimization iterations are plotted in decreasing order of the
objective function values with respect to the mashing temperature at stage one (on
the left) and with respect to the mashing temperature at stage two (on the right). As
the local minima of the objective function decrease from 63.8 to 39.9, we see that the
mashing temperature converges to specific values. The lowest minimum was found at
T1 equal to 314 Kelvin and T2 equal to 351 Kelvin, both of which are interior points. The
fact that the trend was for the local minima to converge towards these points as the
objective function lowered suggests these mashing temperatures may in fact be global
minima however further analysis is needed to confirm this.
Figure 1.10: Optimization of two stage mashing. Here we show 30 iterations of optimization in order of
decreasing function value (i.e. iteration 30 resulted in the most optimal results). In this case the mashing
temperature is shown (both initial and final for each optimization). The figure on the left shows the
temperature at stage one and the figure on the right shows the temperature at stage two.
In Figure 1.11, the thirty minimization iterations are plotted in decreasing order of the
objective function values with respect to the total mashing time (which is a function of
the three time variables: ttotal = Δt1 + Δt2 + Δt3. The total mashing time was used in this
24
figure as a summary value for ease of viewing. One can see that a general trend
emerges wherein as the total mashing time increases, the value of the objective
function decreases. This points to the conclusion that the objective function is
monotonically decreasing with respect to the total mashing time.
The lowest value of the objective function was reached with the following variable
values: Δt1 = 49.6, Δt2 = 20.0, and Δt3 =10.0. We can see that two constraints became
active with this result (upper bound on Δt2 and lower bound on Δt3). The upper bound
on Δt2 is required because the home brewer can only adjust the temperature of the
mash at a certain rate. Loosening this constraint would require the home brewer to
expend an unmanageable level of effort attempting to control the temperature
precisely which is difficult without adequate control systems (which a home brewer
does not typically possess). The same constraint rationale caused the lower bound on
Δt3 to become active. Changing the temperature more than every ten minutes is not
reasonable for a typical home brewer. These active constraints could be loosened if
the home brewer possessed some sort of automated control system and therefore the
optimization constraints could be adjusted to reflect this and the objective function
could be decreased further.
Figure 1.11: Optimization of two stage mashing. Here we show 30 iterations of optimization in order of
decreasing function value (i.e. iteration 30 resulted in the most optimal results). In this case the total
mashing time is shown (both initial and final for each optimization).
25
Optimization 3: Three Mashing Stages
The final round of optimization involved a three-stage process where the mash is first
held at T1 for a specified time, then held at T2, and last at T3. This represents the highest
level of effort on behalf of the home brewer because it requires him/her to change the
temperature of the mash twice during the process.
This iteration of the optimization resulted in the following variables:
i = 3 Δt1 Δt2 Δt3 Δt4 Δt5
The results of the three round mashing optimization are shown in Figure 1.12. One can
see that T1 and T2 converge nicely to specific values and one can be relatively certain
that these are global minima and not just local minima. Furthermore, T2 is bounded by a
constraint which states that T2 must be greater than T1. This constraint is a practical
constraint which is based upon the enzymatic degradation of the alpha-amylase. The
data for T3 is not as convincing since it does not converge nicely towards one specific
value. This suggests that more iterations of the optimization need to be performed,
however time constraints prevented this from occurring. The total mashing time was
bounded by an active constraint which was in place to prevent the total mashing time
from exceeding the current typical mashing times experienced by home brewers.
26
Figure 1.12: Optimization of two stage mashing. Here we show 18 iterations of optimization in order of
decreasing function value (i.e. iteration 18 resulted in the most optimal results). In this case the changes in
mashing temperature as a result of optimization is shown at stages one (top left), two (top right) and three
(bottom left); in addition the total mashing time is also shown (bottom right) .
27
Global Minimization:
Due to the highly non-linear nature of the mathematical model of the mashing process,
it was also necessary to use an algorithm adept at finding global minima while not
getting stuck at local minima. A genetic algorithm was therefore used to determine
whether the minima found using the above procedure were in fact global minima.
The initial parent genes were calculated using the minima found from the above
analysis and the genetic algorithm was run in order to determine whether any better
solutions were available. The Matlab genetic algorithm implementation was used to
carry out this analysis.
The genetic algorithm was applied to the one and two stage mashing process models
and the results are shown below. The genetic algorithm was not applied to the three
stage mashing model due to a lack of processor power which prohibited such a large
scale problem from being computed.
One Stage Mashing:
The genetic algorithm performed 4,000 function evaluations and the results are shown
in Figure 1.13. The figure shows a histogram of all the objective function values which
were calculated. One can see that almost all evaluations resulted in an objective
function value between 46.22 and 46.23. This shows that there was very little variation in
the objective function value during the one stage mashing process. Furthermore, this
was not an improvement over the optimization performed using fmincon, and therefore
strongly suggests the original optimization found a global minimum.
Figure 1.13: Histogram of values of the objective function derived from the genetic algorithm run on the one
stage mashing process.
28
Two Stage Mashing:
The genetic algorithm used to determine the global optimum for the two stage
mashing process performed 4,500 iterations. Figure 1.14 shows a histogram of all the
function values calculated. Unlike the one stage process, the genetic algorithm
exhibited a slight improvement in minimizing the objective function value when
compared to the final results of fmincon. The original optimization calculated a final
objective function value of 39.9 whereas the genetic algorithm found a minimum at
38.6. This improved optimum therefore took the place of the original optimization value
and is presented in the discussion section.
Figure 1.14: Histogram of values of the objective function derived from the genetic algorithm run on the two
stage mashing process.
The genetic optimization results for two stage mashing are summarized in Figure 1.15.
We can see the final objective value as a function of the mashing temperatures (T1 and
T2). The figure shows a clear curve where the objective function cannot be minimized
further. This figure shows the high dependence of the objective function on the
temperature of the mashing process.
29
Section 1.6: Parametric Study
The main parameter of interest to home brewers during the mashing process is the
different types of malted barley used. By changing the type of malted barley used, the
initial concentrations of the most important parameters vary. These changes are shown
in Table 1.8.
Table 1.8: Parameter values which are changed when the mix of malted barley is
changed
Initial Starch
Concentration
Initial Dextrin
Concentration
Initial Dextrin
Concentration
Initial Dextrin
Concentration
Initial Dextrin
Concentration
Alpha-
amylase
activity
rate
Beta-
amylase
activity
constant
X1,o X2,o X3,o X4,o X5,o α(0) Β(0)
[g/l] [g/l] [g/l] [g/l] [g/l] [U/l] [U/l]
Mix 1 112.1 20.6 5.1 10.3 0.0 3.97E5 1.21E6
Mix 2 105.0 24.6 4.8 8.8 0.0 3.34E5 9.12E5
Mix 3 107.7 23.4 5.4 8.8 0.0 2.77E5 6.03E5
Mix 4 95.7 21.7 3.6 8.9 1.3 4.37E5 1.05E6
Mix 5 126.1 22.2 4.2 12.5 0.0 4.80E5 1.22E6
Mix 6 106.9 19.9 4.7 1.1 10.1 3.29E5 9.81E5
Mix 7 104.1 19.3 4.6 1.0 9.8 3.27E5 9.76E5
Figure 1.15: Result of genetic optimization of mashing temperatures (temperature at the initial
plateau T1, and final plateau T2).
30
The optimum temperature profile for the three stage mashing process was run with the
various malted barley recipes shown in Table 1.8. The objective function was
calculated over the course of the mashing process for all seven different malted barley
mixes. The results are shown in Figure 1.16. One can see that each different type of
barley mix had a different objective function during the course of the mashing and
most importantly the final objection function value varied widely, from a low of 32.6 to a
high of 44.0. This is a very important result and shows that the home brewer should
search the literature to find the correct parameters which most closely approximate the
type of malted barley recipe he/she is using.
Figure 1.16: Value of the objective function with respect to time for the seven different mixes of malted
barley; this shows the effect of parameter changes on the optimization process.
Section 1.7: Discussion
The results of the optimization study revealed that there are indeed preferred
temperature profiles which can be used to optimize the mashing process with the
specific needs of a home brewer in mind. The three separate conditions (one stage,
two stages, or three stages) would allow a brewer to have varying levels of control over
31
the final result of the mashing process depending on how much effort he/she would like
to expend controlling the temperature.
The single stage mashing process requires the least amount of effort (one must only
hold the temperature constant), however it had the least optimal objective function
value.
Stages T1,optimum Δt1 fobj
i [K] [min]
One 343.3 9.97 46.2
X1,opt X2,opt X3,opt X4,opt X5,opt X6,opt gw,opt cw,opt
[g/l] [g/l] [g/l] [g/l] [g/l] [g/l] [g/l] [g/l]
0.01 0.005 11.9 78.9734 16.39 45.7 4E-4 0.4
The two stage mashing process requires more effort on behalf of the home brewer,
however, a significant improvement in the objective function was seen.
Stages T1,optimum T2,optimum Δt1 Δt2 Δt3 fobj
i [K] [K] [min] [min] [min]
One 310.7 336.54 49.6 19.99 10.1 38.6
X1,opt X2,opt X3,opt X4,opt X5,opt X6,opt gw,opt cw,opt
[g/l] [g/l] [g/l] [g/l] [g/l] [g/l] [g/l] [g/l]
2E-12 5.8E-12 11.7 80.27 16.39 38.75 6E-5 1.18
The three stage mashing process requires the most effort on behalf of the home brewer,
however, a significant improvement in the objective function was seen.
Stages T1,optimum T2,optimum T3,optimum Δt1 Δt2 Δt3 Δt4 Δt5 fobj
i [K] [K] [K] [min] [min] [min] [min] [min]
One 316.0 325 363.1 35.5 13.23 10.1 11 10 38.8
X1,opt X2,opt X3,opt X4,opt X5,opt X6,opt gw,opt cw,opt
[g/l] [g/l] [g/l] [g/l] [g/l] [g/l] [g/l] [g/l]
2E-20 2.7E-10 10.9 86.85 16.4 37.4 0.01 1.4
32
A comparison of the above results reveals the home brewer does not see a decrease in
the objective function when moving from a two stage mashing process to a three
stage mashing process. This signifies that the extra effort required for a three stage
mashing process is not justifiable. The decrease in the objective function when moving
from a one stage to a two stage mashing process is justifiable.
Thus, the results of this optimization suggest that for the particular recipe of malted
barley used in this model, the home brewer should use a two stage mashing process
with the temperature profile described in the optimum results for two stage mashing
shown above. The optimization performed in the above section could prove very useful
to a home brewer who would be willing to perform research on the type of beer he/she
is making and thus allow them to increase efficiency while minimizing unwanted
compounds.
33
2. Subsystem Two: Fermentation (Clover)
2.1 Problem Statement
Fermentation is the second sub-system and the last major step in the beer-making
process. In the fermentation process, hot wort from the boiler is brought into the
fermentation tank and mixed with a special blend of Saccharomyces cerevisiae or
brewer’s yeast. Over the following 5-7 days the fermentation tank is cycled through a
precise sequence of temperature variations that influence the various component
growth rates as the product matures. There are many variables in this process that
influence product cost and quality with conflicting criteria.
Figure 1 shows a basic schematic of what inputs are brought into the fermenter, the
basic reaction which takes place, and the output.
Figure 1: Basic schematic illustrating the fermentation process
Using a model of the fermentation process composed of a series of interdependent
equations and a typical fermentation process temperature profile (see Figure 5 below),
we can accurately predict the final concentrations of the key taste components:
ethanol, diacetyl, and ethyl acetate. The ethanol concentration is of course the
alcohol content, the diacetyl concentration is a measure of a buttery flavor
characteristic that is undesirable in quality beers and hence typically minimized, and
the ethyl acetate concentration is a measure of an odor characteristic that also is
typically minimized. The process and the equations making up the model as well as all
related symbols are defined and described below.
Wort(from mashing)
Xactive
Xlag
Xdead
Fermenter:YeastWort/Sugars
Beer
Output Measures:EthanolDiacetylEthyl AcetateAcetoin2,3-Butanediol
34
Figure 2: Fermentation temperature profile followed by industrial brewing companies
(De Andres-Toro et al. 1998)
35
2.2 Nomenclature
Symbol Description Units Notes
X Total Biomass in wort g/l X0 = 3.75 g/l
Xlag Lag yeast cell biomass in wort g/l Xlag(0) = 1.5 g/l
Xact Active yeast cell biomass in
wort
g/l Xact(0) = 0.25 g/l
Xdea Dead yeast cell biomass in wort g/l Xdea(0) = 2.0 g/l
Xinc Total yeast biomass suspended
in wort at inoculum (t = 0)
g/l Xinc = 3.75 g/l
Xsus Total yeast biomass suspended
in wort
g/l Xsus0 = 3.75 g/l
Cs Substrate concentration
(sugars)
g/l Cs0 initial substrate conc (from
Mashing model)
Ce Ethanol concentration g/l by-product; Ce0 = 0
Cdy Diacetyl concentration g/l by-product; Cdy0 = 0
Cea Ethyl Acetate concentration g/l by-product; Cea0 = 0
t Process Time secs
tlag Time at which fermentation
begins
secs
T Temperature deg
K
µSD Settling rate of dead yeast secs-1 µSD0 initial settling rate of
dead yeast
µlag Specific rate of activation of
lag yeast
secs-1
µL Specific rate of activation of
lag yeast
secs-1
µX Specific rate of growth during
fermentation
secs-1 µX0 maximum specific growth
rate
36
µDT Specific rate of yeast die-off
during fermentation
secs-1
µs Specific substrate consumption
rate
secs-1 µs0 max specific consumption
rate
µe Specific rate of ethanol
production
secs-1 µe0 initial rate of ethanol
production
µdy Specific rate of diacetyl
production
secs-1 Proportional to the sugar
concentration
µab Specific rate of diacetyl
disappearance due to
conversion to acetoin and 2,3-
butanediol
secs-1 Proportional to ethanol
concentration
kx Affinity constant for µX % *
sec
ks Affinity constant for µs % *
sec
ke Affinity constant for µe % *
sec
f Inhibition factor of the specific
rate of ethanol production
secs Reflects that ethanol
production rate decreases
with time
µeas Stoichiometric coefficient: ratio
relating acetate production to
sugar production
N/A Theoretical ratio confirmed
experimentally
2.3 Mathematical Model: Process Description and Related Equations
PART A: BEFORE FERMENTATION
1. The process is started by adding an initial ‘inoculum’ of yeast, often at least partially
recycled from earlier batches, to the hot wort; this inoculum includes approximately
50% dead yeast cells, 48% ‘lag’ yeast cells, and 2% active yeast cells to catalyze the
fermentation process:
37
(2.1) ( ) ( ) ( ) when
2. Right after inoculation, all three types of yeast are suspended in the wort and we
can calculate the total yeast biomass in the substrate as a function of time:
(2.2) ( ) ( ) ( ) ( ) when
3. The dead yeast settles at a rate µSD, decreasing the suspended cells:
(2.3) ( )
( ) ( ( ) ( )) when
4. depends on:
a. the density of the wort and is proportional to the initial substrate concentration,
Cs0
b. CO2 production that avoids settling, measured as ethanol concentration, Ce
c. , the maximum value that can be reached, which is attained at the
beginning of the process
(2.4) ( )
5. Lag yeasts become active with a rate given by:
(2.5) ( )
( ) ( ( ))
PART B: DURING FERMENTATION
When about 80% of lag cells have been transformed into active cells, fermentation and
growth start, beginning the fermentation phase.
6. The biomass growth during fermentation is characterized by the following equation:
(2.6) ( )
( ) – ( ) ( ) when
Specifically:
The active yeasts grow producing new biomass at the rate expressed by the first
term
However part of them die; this rate is expressed by the second term
The remaining lag yeasts continue their activation at the rate given by the third
term
7. µx is the specific rate of growth and can be substituted by an empirical relationship
of this variable with the substrate and ethanol concentrations:
(2.7) ( )
( )
where is the maximum specific growth rate
8. The rate of sugar consumption is given by:
(2.8) ( )
( )
38
where ( )
( ), the specific substrate concentration rate. µs0 is the maximum
specific consumption rate, reached at substrate saturation, which in this case
occurs at the initial concentration of sugar (s0), and ks is an affinity constant.
9. Ethanol production rate has been described as a function of the active biomass:
(2.9) ( )
( )
Where inhibition factor f models the decreasing ethanol concentration over time; f
has been made proportional to the maximum amount of ethanol that can be
produced, i.e. half the initial sugar concentration:
(2.10) ( )
and
( )
( )
10. Ethyl acetate changes with a stoichiometric coefficient acetate/sugar, µeas:
(2.11) ( )
( )
11. The diacetyl production rate must take into account the appearance rate
(proportional to the sugar concentration) and the disappearance rate as part of it is
converted into acetoin and 2,3-butanediol (proportional to the ethanol
concentration):
(2.12) ( )
( ) ( ) – ( ) ( )
12. Most of the specific constants of production and consumption rates have been
assumed to be affected by temperature according to the following Arrhenius type
of exponential equation:
(2.13)
where A is the pre-exponential factor, B is the activation energy per mole, R is the
universal gas constant, and T is temperature in Kelvin.
PART C: FITTED PARAMETER VALUES
Parameter values as functions of temperature were calculated by fitting experimental
data (De Andres-Toro et al. 1998):
µx0 = exp(108.31 – 31934.09/T)
µeas = exp(89.92 – 26589/T)
µs0 = exp(-41.92 + 11654.64/T)
µlag = exp(30.72 – 9501.54/T)
µdy = 0.000127672
µab = 0.00113864
µDT = exp(130.16 – 38313/T)
µSD0 = exp(33.82 – 10033.28/T)
µe0 = exp(3.27 – 1267.24/T)
ke = exp(-119.63 + 34203.95/T)
39
2.4 Model Analysis and Baseline Results
Monotonicity Analysis and Boundedness
A monotonicity analysis was not performed due to the time-series nature of the
equations. Boundedness and lack of constraint redundancy were assumed since the
model has been previously validated.
Baseline Results
A Simulink model was created to simulate and solve the system of related partial
differential equations based on the previously established model (see Figure 2.3).
Figure 2.3: Fermentation Simulink Model
The model successfully outputs the expected time-dependent concentrations of the
key variables according to a given time-temperature schedule. Figure 2.4 shows the
baseline time-temperature schedule being used and Figure 2.5 shows the predicted
concentrations of the key variables.
40
Figure 2.4: Baseline Time-Temperature Schedule Used in Fermentation Model
Figure 2.5: Predicted Concentrations of Key Fermentation Variables
2.5 Optimization Study
Optimization Overview
0 20 40 60 80 100 120 140 160 180 200274
276
278
280
282
284
286
288
290Temp
0 100 2000
20
40
60
Ce
0 100 2000
50
100
150
Cs
0 100 2000
0.5
1
1.5
Cea
0 100 2000
0.5
1
Cdy
41
As mentioned above, these relationships coupled with a given time-temperature profile
enable an accurate prediction of the concentrations of biomass, total sugars, ethanol,
diacetyl, and ethyl acetate at any given point in time in the process. Establishing this
relationship allows us to reverse the process and optimize the time-temperature
schedule using the appropriate algorithm.
Therefore the objective function minimizes process time, a productivity indicator,
subject to the constraints of maximum concentrations of ethanol, sugars, diacetyl, and
acetate, and a max wort temperature above which there is risk of bacterial growth.
minimize process time measure of process cost/productivity
subject to final concentration of ethanol measure of taste/product quality
final concentration of sugars measure of fermentation efficiency
final concentration of diacetyl measure of taste/product quality
final concentration of acetate measure of taste/product quality
spoiling risk establishes a max wort temperature
Re-written numerically:
minimize f = ttotal (sum of discreet time intervals)
subject to g1 = Ce <= 60 g/l (Andrés-Toro et al. 2004)
g2 = Cs <= 20 g/l (Andrés-Toro et al. 2004)
g3 = Cdy <= 0.2 ppm (Fix 1993)
g4 = Cea <= 1.2 ppm (Anon 2011)
g5 = T <= 288 degrees K (Andrés-Toro et al. 2004)
Optimization Setup
It was determined the problem could be successfully optimized using Matlab’s
“fmincon” function with active set. Therefore, the optimization was run in Matlab using
a total of five files: 1) the Simulink simulation model, 2) the file initiating the simulations
and specifying the structure of the time-temperature profile, 3) the optimization
program containing fmincon and specifying the initial conditions or starting values and
the time and temperature upper and lower bounds, 4) the file containing the objective
function, and 5) the file containing the concentration constraints. The optimization
program also contained an “xLast” code as an efficient way to execute the iterations.
The time-temperature profile was set up as a combination of three temperature
“plateaus” each having a unique duration and separated by time-steps, for a total of
five time-steps. Therefore, the variables T1, T2, T3, dt1, dt2, dt3, dt4, and dt5 were
created. Given the nature of the wort heating/cooling process, it was decided the
most accurate time-temperature profile model would be an interpolated approach as
opposed to a fitted spline, therefore the Matlab “interp1” function was chosen. Each of
42
these times and temperatures were given an upper and lower bound based on known
process limitations.
Optimization Results
Multiple runs were executed with the results converging on the same solution: the
minimum process time for fermentation under the given constraints was found to be 113
hours with the following time-step and temperature values:
T1 = 288 degrees K dt1 = 25 hours
dt2 = 5 hours
T2 = 279 degrees K dt3 = 55 hours
dt4 = 10 hours
T3 = 284 degrees K dt5 = 18 hours
Exit flag one was obtained with the following message: “Local Minimum Found That
Satisfies the Constraints.” This result represents a reduction of 87 hours from the 200
hours prescribed in the baseline industrial model.
Figure 2.6: Optimization Results for Time-Temperature Profile
43
Figure 2.7: Optimization Results for Final Key Concentrations
As shown in the figure above, for the solution obtained all key concentrations met the
specified constraints.
2.6 Parametric Study
After an initial solution was found, a number of variations on the initial conditions were
explored to further understand what parameters had the most impact on the optimal
solution value. Six areas were considered:
1) Structure of the temperature profile: as mentioned above, it was decided that the
temperature profile contain three temperature plateaus and five time-steps.
Although this could be varied, it was decided this was satisfactory because the
44
shape of the optimal time-temperature profile was consistent with brewing process
norms. Further complexity was deemed unrealistic when considering execution by a
home brewer.
2) Upper and lower bounds for temperature plateaus: above the upper bound of 288
degrees K there is excessive risk of spoilage per industry standards, and the lower
bound is just above freezing, therefore these were not varied.
3) Upper and lower bounds for time-steps: these were initially guessed based on
literature and published industry norms for time-temperature schedules. Naturally
the lower bounds were critical in this optimization exercise since we were minimizing
time, and after several iterations the total of the lower bound time-steps was set
below the final optimal solution value. Although in the optimal solution three of the
five time-steps were at the lower bound, the key consideration here is processability
for the home brewer and therefore the smallest time-step allowed was five hours.
4) Starting temperatures T1, T2, and T3: these were varied within known industry norms
with no discernible impact to the optimal solution, i.e. the model/solution seems
robust to variations in starting temperature values.
5) Starting time-steps dt1, dt2, dt3, dt4, and dt5: these were varied within a reasonable
range of values above and below the optimal solution with no discernible impact to
the optimal solution, i.e. the model/solution seems robust to variations in starting
time-step values.
6) Key concentration constraints: in evaluating the final concentrations for the four
compounds, i.e. ethanol, sugars, ethyl acetate, and diacetyl, it was found that only
the diacetyl constraint was active. We obtained this constraint information from the
literature which stated that diacetyl concentrations above this value would cause a
disagreeable taste, and therefore we were unwilling to relax this constraint in
prescribing the optimal process for a home brewer. However, should the home
brewer feel adventurous, we did find that relaxing the constraint by 10% results in a
2% reduction in the process time. Another item to note is that at the optimal
(minimal) process time, the ethanol (alcohol) concentration is predicted to be as
low as 4%. This is not unreasonable for a lighter-style beer, but something the home
brewer may want to keep in mind. Of course, the optimization model can easily be
set up with the final alcohol concentration as an equality constraint.
2.7 Discussion of Results
It is interesting to note the optimized time-temperature schedule is essentially inverted
as compared to the baseline industrial time-temperature schedule, i.e. in the baseline
the temperature goes up then down, whereas in the optimized the temperature goes
down then up. While this was unexpected, it could be explained by the fact that the
industrial profile was optimized for cost and therefore would have held the wort at the
highest temperature possible while still meeting the quality objectives, i.e. cooled the
45
wort as little as possible. Furthermore, the temperature ranges in the optimized profile
produced by this exercise are still well within the acceptable fermentation temperature
range. Finally, literature on the optimization of the fermentation process suggests an
optimal duration of approximately 115 hours, so the result obtained of 113 hours seems
consistent with previous work.
To summarize the results and the parametric study, significant reduction in process time
can be achieved by the home brewer over the published standards for fermentation.
However, the extent of this reduction is heavily dependent on the process capabilities
possessed by the home brewer. The results presented above generally make the
assumption that a simpler, more reliable process is preferable to one that requires
frequent temperature adjustment and pushes the limits of undesirable product qualities.
On the other hand, should the home brewer wish to add additional complexity and
control to his/her process, the parametric studies discussed above indicate that further
improvement is possible by adding time steps and temperature zones.
46
3. Subsystem Three: Heat Exchanger (Ryan)
3.1 Problem Statement
The fermentation and mashing tank is a volume of 20 liters that needs to be heated and
cooled according to a schedule. This temperature control is achieved by pumping
water in a pipe through the fermentation tank. The optimization of this design focuses
on finding the length and radius of the pipe, as well as the flow rates and water
temperatures in order to minimize the monetary cost of heating. The range of
temperatures that the water in the heat exchanger can reach is determined by the
temperature range of tap water in an average household.
The objective is to minimize cost of operation over a 5 year period, assuming 10
batches a year. Costs considered are material cost, the cost of running water, the cost
of heating the water, and the temperature control system. The temperature profiles
that optimize the fermentation and mashing processes must be achieved by this heat
exchanger within some margin of error.
There is a tradeoff between minimizing time for the fermentation and mashing
processes and the amount of materials and heating costs of the heat exchanger. Also,
since the heat exchanger is responsible for managing two distinct processes, it is
possible the optimal design for controlling both is different from either one individually.
3.2 Nomenclature
Symbol Description Units
Tin Temperature entering the tank K
Tout Temperature leaving the tank K
Average inlet temperature across all time points K
Minimum temperature attainable for Tin K
Maximum temperature attainable for Tin K
Heat generated by wort during fermentation process W
Tf Average temperature of tank K
Desired average temperature profile of tank K
tf Total time the fermentation process takes s
tm Total time the mashing process takes s
E Error in temperature between desired Tf and actual Tf K
m Mass of liquid volume kg
rc Radius of fermentation tank m
h Height of fermentation tank m
47
qf Volumetric flow rate of water
Average flow rate of water across both fermentation and
mashing
v Average velocity of water
g Gravitational constant
ri Inner radius of pipes m
ro Outer radius of pipes m
δ Thickness of pipes m
d Vertical space between each coil m
N Number of pipe coils Dimensionless
R Radius of coil as defined to the center line of the coil m
V Available volume of fermentation tank
ε Pipe Roughness m
Head loss due to pipe length Pa
L Total length of straight pipe m
kw Thermal conductivity of water
cp Specific heat of water at constant pressure
kp Thermal conductivity of pipe
U Overall heat transfer coefficient
q Heat Flux
Q Heat transferred as a function of time W
Average heat transfer across one time step W
Average heat transferred across both fermentation and
mashing
W
ρ Density of water
μ Dynamic viscosity of water
F Friction factor of pipes Dimensionless
Re Reynold’s Number Dimensionless
48
3.3 Mathematical Model
Objective function
The objective function is a function of the cost of the tank, Ct, the cost of the pipe per
unit length ( ), the cost of running water Cw, the cost of heating water with the water
heater, Ch, and the cost of the temperature control equipment, CT. ( ) depends on
the radius of the pipe. The average water price is in the 30 largest cities of the US is
$0.0044/gallon (Anon 2012b). The average cost of energy in the U.S. is $0.14/kW-hr
(Anon 2012a). So:
(3.1)
( ) ( )( ) ( )( )
The third term is from the cost of tap water and the last term is the cost of heating the
water which flows through the pipes to heat the fermentation tank.
Practical Constraints
The volume in the tank not taken up by pipes must be 20 L, so
(3.2)
.
The temperature range of water to flow through the tank is limited by the water heater,
so
(3.3)
The temperature of the tank must be within an acceptable error range E of the desired
temperature at the end of each time step:
(3.4) ( )
Physics-based Constraints
Head loss due to pipes is given by the equation:
(3.5)
Since average water pressure in a home in the U.S. is around 60 psi,
(3.6)
The Reynolds number, Re, is given by:
(3.7)
Since we assume turbulent flow for this model, another constraint is:
(3.8)
49
The friction factor F in equation 3.5 will be estimated using the Haaland equation
assuming turbulent flow:
(3.9)
√ [(
)
]
The following results (equations 3.10 to 3.15) were taken from Reference 13.
The heat transferred between flowing water and tank is given by the following
equation:
(3.10) ( )
Where LMTD is the log mean temperature difference given by:
(3.11)
(
)
The overall heat transfer coefficient can be derived by considering between two
bodies of water and pipe as thermal resistances in series. This equation of resistances is:
(3.12)
(
)
( )
Note the first two terms are exact but that the third term is an estimate because it
assumes the tube to be straight, whereas it is actually arranged in coils. This estimation
will underestimate the overall heat transfer coefficient.
The heat transfer coefficient for the flowing water hi can be estimated by this
correlation for turbulent flow:
(3.13)
where n =0.4 if the flowing water is cooling the tank and n=0.3 if the flowing water is
heating the tank. The Prandtl number Pr is given by:
(3.14)
Therefore the heat transfer coefficient for the flowing water is:
(3.15)
We also know that the temperature of the tank will change depending on how much
heat (Q) is added or withdrawn from the heat exchanger. This equation was derived
using energy conservation:
(3.16)
50
where is the initial temperature of the tank and is the amount of heat produced
by the wort during fermentation. has a value of zero during the mashing process.
Additionally, the exit temperature of the flowing water can be derived using an energy
balance:
(3.17)
Variables
1. Ti
2. qf
3. L
4. ro
The temperature profile Ti must be determined so the temperature of the tank is
sufficient while not wasting energy. Since Ti is a function of time, it will be discretized
into several steps corresponding to desired temperature changes of the tank. The flow
rate qf will be limited by the available pressure from the tap. It should be as low as
possible to avoid wasting water and thereby increasing the cost of operation. It will
also be discretized over the number of time steps. For example if there are 5 time steps,
there will be 5 temperature variables and 5 flow rate variables.
The other variables L and ro will be determined by the availability of pipes with those
properties from manufacturers. See Appendix 3.1 for commercially available flexible
copper tubing and related pricing. Since the optimization will give an optimal length of
tubing, the tubes must fit inside the tank. Since it is flexible tubing, it will be bent into coils
so that the tank can be a reasonable shape instead of a long thin cylinder. This will
help with heat exchange although that effect is not modeled here.
The material of the pipe was considered as a possible variable (would affect cost and
material thermal conductivity), but a review of the other materials available and the
implementation of heat exchangers in general suggested the copper would be the
best material considering our optimization over the course of a long period of time.
51
Parameters
1. ε
2. h
3. Tf
4. tf
5. tm
ε is the roughness of the pipe and will also be determined from manufacturer
specifications. The height of the tank will be picked to be a relatively large value, since
a larger height means a smaller radius, which from equation 3.12, implies a larger
overall heat transfer coefficient U. The result of the optimization will dictate the tank
radius given the height. Tf is the desired temperature profile output from the other two
subsystems and tf and tm are the total amount of time those profiles last for fermentation
and mashing respectively.
Summary Model
The temperatures and flow rates will be discretized into mf number of steps for
fermentation over the course of tf time and mm number of steps for mashing over the
course of tm time. This allows the calculation of the average values for flow rate and
to be placed into the objective function in equation 3.1.
(3.18)
( )( ) ( )( )
is minimized according to the constraints:
( )
( (
))
52
(
[
(
)
( )
]
)
(
)
For all constraints listed besides 5 and 6, the constraint is true for each variable
corresponding to the jth time step. For example if there are 5 time steps, then constraint
is in fact 5 constraints, with one corresponding to each time step.
The flow rate maximum was set to ½ of a typical home’s water availability of 6
gallons/second. The minimum flow rate initially set was 50 ml/s.
An arbitrary limit of 100 meters was chosen for the length of the tube; it is not expected
to play a role in the optimization. and were chosen to
indicate reasonable ranges for a commercial water heater to operate at. The error
term E was arbitrarily set to 1.5, although this was an arbitrary choice that will definitely
affect the results of the optimization.
Note also that the error term only compares the final value of the fermentation tank
after a time step to the desired temperature at the end of the time step. Therefore,
these constraints do not guarantee small error when far from a discrete time step.
3.4 Model Analysis and Baseline Results
Monotonicity Analysis and Boundedness
Looking at the objective function, we see that it is monotonic with respect to tube
length L. L appears with opposite monotonicity in g5. However, it also is in the set of
nonlinear constraints g9, as well as being embedded implicitly in the constraints g8, so it
is impossible to tell which constraint will be active. The other variables do appear
monotonically in the objective function or in some of the constraints.
The boundedness of the problem is ensured by placing strict lower and upper bounds
on all variables and observing that the objective function cannot go to infinity within
these bounds. A small nonzero lower bound is necessary for flow rate since the model’s
calculation fails if flow rate is close to zero, since that would result in a log(0/0) term in
the calculation.
53
Baseline Results
The model has been coded in Matlab. The Newton-Rhapson method is used to
calculate the heat transferred as a function of time at each second in the simulation.
For this first simulation, a schedule consisting of 5 steps, 2 hours each was chosen for a
total of 10 hours. The Newton-Rhapson method requires the values of the variables
during each time step as well as the initial tank temperature. For the first time step, an
initial tank temperature of 285 K was used. For the next time steps, the final
temperature of the tank in the previous time step was used as the initial tank
temperature for the next simulation. The result is a simulation broken up into 5 steps,
with the start of one time step corresponding to the end of the previous one, as shown
in Figure 3.1. Figure 3.2 shows the corresponding outlet temperatures for the same
simulation. The fact that the outlet temperature is so close to the inlet temperature
implies that the efficiency of the heat exchanger is poor at these variable choices.
Figure 3.1: Simulation of tank temperature over time using 5 discrete time steps of 2
hours each. This simulation was done assuming copper pipes with a 0.01 m inner radius,
401
thermal conductivity, 3 coils, inlet temperatures of 315 K for all steps, and flow
rates of 0.001 m3/s for all steps.
0 0.5 1 1.5 2 2.5 3 3.5 4
x 104
285
290
295
300
305
310
Time (seconds)
Tank T
em
pera
ture
(K
elv
in)
54
Figure 3.2. A plot of the outlet temperature from the pipe for the same simulation.
A simplification made was to hold the pipe outer radius ro constant for each iteration of
the optimization. This reduces the dimension of the problem by one. The variables
were scaled since temperatures have a range on the order of 102 and flow rates have
a range on the order of 10-4. Since there are lower bounds and upper bounds for each
variable, each variable was scaled by a factor of
where and are
the upper and lower limits for each variable. This effectively transforms the range of
each variable to a magnitude of 1, which should make it easier for the optimizing
package.
Lastly, since the optimization study simulates heat transfer over the course of hours, the
Newton-Rhapson code was revised to calculate heat and temperature values every 60
seconds instead of every second in an effort to speed up optimization. The difference
between the temperature trajectory using this method and that plotted in Figure 16 was
observed to be negligible.
0 0.5 1 1.5 2 2.5 3 3.5 4
x 104
312.8
312.82
312.84
312.86
312.88
312.9
312.92
312.94
312.96
312.98
Time (seconds)
Outlet
(Kelv
in)
55
3.5 Optimization Study
Deciding to iterate on the variable ro removes the only discrete variable from the
problem. Because only continuous variables remain, a gradient-based approach was
chosen for its speed. The optimizing function fmincon in Matlab uses a SQP algorithm,
and was set to the active-set option. Active-set was chosen in an attempt to speed up
the optimization due to the large number of constraints. It was expected that a
substantial number of the constraints started and remained in the inactive set.
The optimization was first run for a pipe outer radius of 1/8 inch. The temperature
trajectory optimized for was a flat region of 283 K, followed by a linear increase up to
288 K, followed by a linear decrease to 278 K, ending with a linear increase back up to
283 K. Each time step was 20 hours. These temperature and step durations are similar
to the expected desired temperature trajectories observed in the reference authored
by De Andres-Toro, 1998. This optimization was done assuming pipe roughness
, and tank height With these parameters the optimization has a total of
9 continuous variables.
Initial guesses for the inlet temperatures are the desired temperatures of the
fermentation tank, since at steady state we would expect the fermentation tank
temperature to be equal to the inlet temperature. The initial values for the flow rate
variables were in the middle of their upper and lower range. The initial value for L was 2
meters.
Using these parameter values and algorithms, results were obtained in about 600
seconds and are presented below.
Note: optimizing values for the variables are given in unscaled units, whereas values for
Lagrange multipliers are given in scaled units.
1/8th inch tubing, active-set algorithm, Error E=1.5 K, roughness
[ ]
Active Constraints Lagrange Multiplier Values (scaled
variables)
g2 (time step 3) 1521.8
g4 (time steps 1, 2 ,3 ,4) 153800, 524760, 145650,14532
g8 (time steps 1, 2, 4) 461.9,2.49,10.4
56
Looking at the numerical results of the optimization, the most striking feature is that the
arbitrarily enforced minimum flow rate constraint was met at all time steps (for both
optimizations). This will be discussed further in section 3.7.
Something else to notice is that there are 9 variables and only 8 active constraints for
these results. This implies an interior optimal point in regards to one variable. The 8
active constraints correspond to the flow rates and inlet temperature values, so it is
likely that the optimal length of pipe L is in the interior of the problem.
Because of the choice of algorithm, this solution is not guaranteed to be a global
solution, since the algorithm relies primarily on gradient information. Therefore the study
was run with a different set of initial variable values. Initial guesses for temperature
variables were 5 degrees above desired temperature values. Initial values for flow rates
were 0.001
, and the same initial pipe length of 2 meters. The results give essentially
the same values for all variables except , and the optimized objective is
$1285. This suggests one of several things: that the algorithm is in fact not finding a local
minima, that there could be multiple local minima, that scaling is still an issue, or that
the heat transfer simulation is prone to numerical error and is throwing off the
optimization. To test the last possibility, the optimization was rerun using the same initial
values and the same result was achieved. This suggests that the simulation is robust.
To improve scaling, the same scaling was kept on the variables, but during the
calculations of all constraints (including lower and upper bounds), the variables were
converted back to their original unscaled values, and the entire constraint equation
was divided by the magnitude of the constraint. For example, g1 was divided by Tmax
whereas g8 was divided by E2. This effectively transforms the magnitude of all
constraints to 1. The objective was divided by 1300 since that was about the
magnitude of the solution currently being found.
While this seemed to improve the results slightly, different initial guesses still resulted in
different solutions. Therefore, the optimization was iterated 10 times starting at different
initial conditions and the best solution was chosen. Figure 3.3 shows the temperature
trajectory that the solution produces.
57
First solution: [ ]
Figure 3.3. Optimal solution’s temperature trajectory (solid line) compared to the
desired temperature trajectory (dashed line).
Fmincon was also run using the interior point algorithm with the same initial conditions as
the first optimization run. The interior point algorithm achieved a slightly better solution
for the problem, as stated below. The length of pipe required is substantially shorter
compared to the same parameter values using the active-set algorithm. This is good
because it would reduce the weight of the setup, a factor not accounted for by this
optimization problem.
1/8th inch tubing, active-set algorithm, Error E=1.5 K, roughness
[ ]
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000278
279
280
281
282
283
284
285
286
287
288
Time (minutes)
Tank T
em
pera
ture
(K
elv
in)
1/8 inch tube, active set, E=1.5
58
Active Constraints Lagrange Multiplier Values (scaled
variables)
g2 (time step 3) 1521.8
g4 (time steps 1, 2 ,3 ,4) 153800, 524760, 145650,14532
g8 (time steps 1, 2, 4) 461.9,2.49,10.4
Figure 19. Interior point algorithm, 1/8th inch pipe, E=1.5.
3.6 Parametric Studies
To investigate the effect of pipe diameter, the same optimization was repeated but
with quarter inch tubing. Larger pipe sizes were not examined since their price per unit
length increases dramatically at larger sizes (see Appendix 3.1). The results of the
optimization are presented below. Initial conditions were kept the same as the first
optimization run.
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000278
279
280
281
282
283
284
285
286
287
288
Time (minutes)
Tank T
em
pera
ture
(K
elv
in)
1/8th inch tube, interior point, E=1.5
59
1/4th inch tubing, active-set algorithm, Error E=1.5 K, roughness [ ]
Active Constraints Lagrange Multiplier Values (scaled
variables)
g2 (time step 3) 1515.9
g4 (time steps 1, 2 ,3 ,4) 145950,144860,145630,144960
g8 (time steps 1, 2, 4) 9.47,10.12,10.33
Figure 3.4. A comparison of temperature trajectories produced by the optimization
between eighth-inch tubing and quarter-inch tubing. Error parameter E=1.5 K.
The results are negligibly different from the first optimization using the active-set option,
however since the pipe is in fact a larger diameter, the whole unit would weigh more, a
factor not accounted for in this optimization. Therefore between these two solutions,
the first is preferable.
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000278
279
280
281
282
283
284
285
286
287
288
Time (minutes)
Tank T
em
pera
ture
(K
elv
in)
1/4th inch tube, active set, E=1.5
60
It is evident from figures 3.3, 3.4, and 3.5 that the error tracking constraints do a poor
job. This is because it only matches the error at the end of each step. If the error
parameter is made smaller, the error becomes smaller closer to the discrete steps, but
larger at points away from the discrete steps, as seen in figure 3.5. It must be decided
which trajectory is preferred, given that reducing the Error parameter also increases the
objective function (see results below). If neither trajectory is satisfactory, more discrete
steps must be taken within each temperature regime to acquire better tracking.
1/8th inch tubing, active-set algorithm, Error E=0.5 K, roughness
[ ]
Active Constraints Lagrange Multiplier Values (scaled
variables)
g4 (time steps 1, 2 ,3 ,4) 84308,84134,84309,84141
g8 (time steps 2, 4) 30.6,30.9
Figure 3.6. Temperature trajectory with a smaller Error parameter E=0.5, 1/8th inch pipes,
and still using the active-set algorithm.
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000278
279
280
281
282
283
284
285
286
287
288
Time (minutes)
Tank T
em
pera
ture
(K
elv
in)
1/8 inch tubing, active-set, Error=.5
61
By noticing in each solution that the flow rates are set to their minima, we tried
simplifying the problem by removing flow rate as a variable, and set it as a parameter
equal to its minimum value. This nearly reduces the order of the problem by 2. Finally,
we increased the number of discrete time steps to improve temperature tracking. The
results are presented in figure 3.7. This methodology gave the best results and was used
during the optimization of all 3 subsystems together.
Figure 3.7. This shows the improvement in the temperature tracking by increasing the
number of discrete time steps and reducing the error parameter.
3.7 Discussion of Results
The most noticeable feature is that for all of the simulations, the flow rates were set to
their arbitrarily enforced lower bounds. Looking at the model of heat transfer, this is not
surprising. When calculating the overall heat transfer coefficient in equation 3.15, the
term corresponding to the conduction between the fermentation tank and the pipe
dominates. This is because there is assumed to be no mixing of the fermentation tank,
therefore the heat transfer due to convection is negligible. Because this term
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000278
279
280
281
282
283
284
285
286
287
288
Time (minutes)
Tank T
em
pera
ture
(K
elv
in)
1/8 inch tubing, active-set,Error=.3
62
dominates, small improvements in the thermal resistance due to increased flow rates
within in the tube (the first term) are negligible in terms of performance.
Since the objective function also increases with respect to the flow rate due to the cost
of water, it makes sense that the optimizer would minimize flow rate. The large values
for the Lagrange multipliers for these constraints also suggest that reducing these
constraints would have a big impact on the objective function. However, they are
already close to their minimum of zero.
This does suggest that a better design and model should be considered. One solution is
to have a mixer within the fermentation tank (if it does not disturb beer quality). This
would greatly improve heat transfer and thereby lower the objective function
substantially in this formulation (the cost of the mixer would also have to be added in to
make a fair comparison). The model would have to be updated such that the thermal
resistance of the fermentation mixture is calculated from the average angular velocity
of the vortex produced by the mixer, instead of from the conduction resistance through
a cylindrical volume of water.
Another possible solution is to have the water to sit in the pipes or hold the fermentation
tank in a water bath. The water would only be replaced at discrete points in time
corresponding to new temperature demands or if enough heat transfer has occurred
to bring the bodies of water close to steady state. This could reduce water usage;
however, it could be more difficult to implement in terms of control. In this case, the
model would have to be updated to calculate the thermal resistance of the water in
the tube or water bath as the conduction of heat through water, instead of using the
Haaland equation for turbulent flow.
Obviously the solution will drastically change depending on the desired temperature
trajectories input from the other subsystems. So far, only a rough fermentation trajectory
has been optimized for, not including mashing at all. The objective function will
become much larger once the mashing trajectory is also including in the calculation. It
is important to note that some trajectories may be infeasible due to the lower and
upper bounds on inlet and temperature and flow rate, so it will be important to check
the feasibility each time a new trajectory is optimized for.
63
Appendix 3.1
Copper Tubing
Outer Radius Price per meter Thickness (m)
1/8” 1.706 0.000762
1/4” 1.4764 .000762
5/8” 7.21 .00089
3/4'” 16.02 0.001651
64
4.0 System Integration Study
4.1 Linking Between Subsystems
The brewing process is a highly integrated system and therefore there are direct links
between all three systems (mashing, fermentation, and heat exchanger). The
interactions for the brewing process are depicted in Figure 4.1. One can see that the
heat exchanger interacts with both the mashing and the fermentation subsystems
directly. Furthermore, the mashing system interacts directly with the fermentation
subsystem via the transfer of fermentable and non-fermentable sugars as well as
unwanted compounds.
Figure 4.1: Interactions between the three sub-systems involved in the production of beer.
65
Links Between Systems:
Mashing Fermentation
The final concentrations of glucose, maltose, and maltotriose transfer directly to the
fermentation subsystem. These are represented by the ‘substrate compound’ in the
fermentation section of this report. The level of conversion efficiency will be directly
related to the maximum possible efficiency in conversion of starch to alcohol. Also, the
unwanted compounds minimized during the optimization of the mashing process can
be combined with the unwanted compounds during the fermentation process to
produce a more global and holistic objective function which better characterizes the
brewer’s goal of creating a flavorful beer.
Heat Exchanger Mashing
The capacity of the heat exchanger to effectively transfer heat to and from the
mashing water volume will have a direct effect on the level of temperature control
achievable during the mashing process. As was seen above, the control of the
temperature profile is the most important variable that can be controlled during the
mashing process. However, the more effective the heat exchanger the more likely that
it will drive up costs. Therefore, there will need to be a balance between temperature
control and overall equipment cost.
Heat Exchanger Fermentation
The capacity of the heat exchanger to effectively transfer heat to and from the
fermentation vessel will have a direct effect on the level of temperature control
achievable during the mashing process. As was seen above, the control of the
temperature profile is the most important variable that can be controlled during the
fermentation. However, the more effective the heat exchanger the more likely that it
will drive up costs. There will need to be a balance between temperature control and
overall equipment cost.
4.2 Objective Function & Constraints
The general overview of the combined optimization problem is shown in Figure 4.2. The
mashing and fermentation models were combined together (including the objective
and constraints of each system). We then added the heat exchanger optimization
routine into the constraint function of the overall optimization system.
66
Combined Mashing & Fermentation Optimization
Objective:Minimize unwanted flavor compounds
Constraints:1) Combined mashing & fermentation constraints2) Heat exchanger which finds feasible minimum
fmincon produces temperature profile
for mashing and optimization
Check for feasible heat exchanger design
Check for minimization conditions
In order to integrate the systems we developed a new objective function which
incorporated key aspects of the mashing and fermentation processes. The constraints
for the mashing and fermentation subsystems were combined and then the heat
exchanger optimization subsystem was added to these constraints. We therefore
developed a nested optimization problem where the overall objective was to maximize
flavor while the heat exchanger acted as a constraint on the system.
The objective function for the combined subsystem is shown in Equation 4.1 below.
(4.1)
The objective function minimized the overall negative flavors associated with both the
mashing and the fermentation subsystems. No scaling was necessary due to the fact
that all final concentrations were within the same order of magnitude.
The constraints for the combined subsystem were made up of the constraints of the
mashing and fermentation subsystem with the additional constraint that a heat
exchanger could be found which could follow the mashing and fermentation profile.
This constraint was implemented by nesting the heat exchanger minimization problem
within the constraints of the combined mashing/fermentation system. If the heat
exchange optimization routine found a minimum which satisfied its own constraints,
then this would represent a feasible temperature profile within the full system
optimization routine. The heat exchanger constraint will be active since the optimal
Figure 4.2: Combined optimization set-up showing placement of heat exchanger
subsystem within the constraints.
67
solution for the mashing process alone was infeasible for the heat exchanger to
accomplish. In other words, we expect the mashing process to be the determining
factor for whether the heat exchanger can accomplish a given temperature trajectory.
The constraint equations are not shown below because they have already been
explicitly stated in the subsection presented earlier.
4.3 Results
The results of the system optimization are shown in Figures 4.3 and 4.4. These figures
show how the optimal temperature profile changed when compared to the
temperature profiles developed during subsystem optimizations. One can see that the
interactions between the systems had a large effect on what the optimal temperature
profiles would be when compared to the optimized values of the individual subsystems.
Figure 4.3: Results of the overall system optimization showing the change in
the optimal mashing temperature profile when combining the three systems
68
Looking at the mashing temperature profile, the magnitude of the change in
temperature was reduced and the length of time over which temperature change
occurs was increased in order to produce a feasible solution for the heat exchanger
during the mashing process. This was expected because the initial mashing profile is
infeasible for the heat exchanger.
Since feasibility of the fermentation trajectory is not an issue for the heat exchanger, the
change in profile witnessed in Figure 4.4 was caused by maximizing the new objective
function of flavor. Most notably, instead of the bowl shape found when during the
optimization of the subsection alone, the overall optimization produced a trajectory
that starts at a high temperature plateau and then drops linearly to a plateau at a
lower temperature.
The results of the optimization are summarized in Tables 4.1 and 4.2. Table 4.1 shows the
final values of the temperature profile for mashing while Table 4.2 shows the final values
for the temperature profile for fermentation
Table 4.1: Final values for optimal result of combined system with respect to mashing
Stages T1,optimum T2,optimum Δt1 Δt2 Δt3
i [K] [K] [min] [min] [min]
Two 303.2 332.8 40.0 53.6 39.3
Figure 4.4: Results of the overall system optimization showing the change in
the optimal fermentation temperature profile after all three systems have
been combined
69
Table 4.2: Final values for optimal result of combined system with respect to
fermentation
Stages T1,optimum T2,optimum T3,optimum Δt1 Δt2 Δt3 Δt4 Δt5
i [K] [K] [K] [hr] [hr] [hr] [hr] [hr]
Three 285.5 280.0 280.3 14.9 15 67.5 17.5 5
5.0 Conclusion
The brewing process provides an ideal system for optimization. The three sub-systems
that have been selected interact in a very distinct matter. The output from the mashing
sub-process transfers directly to the fermentation sub-process and the heat exchanger
interacts with both the fermentation and the mashing through temperature control. Our
team used kinetic models which accurately simulate the mashing and fermentation
process as well as thermal models for a given heat exchanger system to construct an
overall system that was optimized for the home brewer. Significant reductions in
process time were achieved while minimizing the associated costs and negative flavors.
We believe this project has not only yielded meaningful results, it has also established a
platform from which to easily conduct further optimization and exploration of the many
choices associated with home brewing ingredients and processes.
6.0 Acknowledgements
The model used for the mashing process is taken from reference (Kettunen et al. 1996; Li
et al. 2004; Koljonen et al. 1995).
The model used for the fermentation process is taken from (De Andres-Toro et al. 1998).
The model used for the heat exchanger design has been developed by the sub-system
owner Ryan Riddick with the help of the heat transfer textbook listed in reference
(Bergman et al. 2011).
70
7.0 References
De Andres-Toro, B. et al., 1998. A kinetic model for beer production under industrial
operational conditions. Mathematics and Computers in Simulation, 48, pp.65–74.
Andrés-Toro, B. et al., 2004. Multiobjective optimization and multivariable control of the
beer fermentation process with the use of evolutionary algorithms. Journal of
Zhejiang University, 5(4), pp.378–89.
Anon, A simple, illustrated introduction to single infusion mash temperatures. Homebrew
Manual. Available at: http://homebrewmanual.com/mash-temperatures/.
Anon, 2012a. Average Energy Prices. Bureau of Labor Statistics. Available at:
http://www.bls.gov/ro9/cpilosa_energy.htm.
Anon, 2011. Esters. Beer Sensory Science.
Anon, 2012b. The price of Water 2012. Circle of Blue. Available at:
http://www.circleofblue.org/waternews/2012/world/the-price-of-water-2012-18-
percent-rise-since-2010-7-percent-over-last-year-in-30-major-u-s-cities/.
Bergman, T.L. et al., 2011. Fundamentals of Heat and Mass Transfer,
Fix, G., 1993. Diacetyl: Formation, Reduction, and Control. BrewingTechniques.
Kettunen, A. et al., 1996. A model for the prediction of beta-glucanase activity and
beta-glucan concentration during mashing. Journal of Food Engineering, 29,
pp.185 – 200.
Koljonen, T. et al., 1995. A model for the prediction of fermentable sugar concentrations
during mashing. Journal of Food Engineering, 26, pp.329 – 350.
Kühbeck, F. et al., 2005. Effects of Mashing Parameters on Mash β-Glucan , FAN and
Soluble Extract Levels. Journal of the Institute of Brewing, 111(3), pp.316 – 327.
Li, Y. et al., 2004. Mathematical modeling for prediction of endo-xylanase activity and
arabinoxylans concentration during mashing of barley malts for brewing.
Biotechnology letters, 26(10), pp.779–85.
Muller, R., 2000. A mathematical model of the formation of fermentable sugars from
starch hydrolysis during high-temperature mashing. Enzyme and Microbial
Technology, 27(3-5), pp.337–344.
Wijngaard, H.H. & Arendt, E.K., 2006. Optimisation of a mashing program for 100 %
malted buckwheat. Journal of the Institute of Brewing, 112(1), pp.57–65.
71
A simple, illustrated introduction to single infusion mash temperatures.
(n.d.).Homebrew Manual. Retrieved from
http://homebrewmanual.com/mash-temperatures/
Kettunen, A., Hamalainen, J. J., Stenholm, K., & Pietila, K. (1996). A model for the
prediction of beta-glucanase activity and beta-glucan concentration
during mashing. Journal of Food Engineering, 29, 185 – 200.
Koljonen, T., Hamalainen, J. J., Sjoholm, K., & Pietila, K. (1995). A model for the
prediction of fermentable sugar concentrations during mashing. Journal of
Food Engineering, 26, 329 – 350.
Kühbeck, F., Dickel, T., Krottenthaler, M., Back, W., Mitzscherling, M., Delgado, A.,
& Becker, T. (2005). Effects of Mashing Parameters on Mash β-Glucan , FAN
and Soluble Extract Levels. Journal of the Institute of Brewing, 111(3), 316 –
327.
Li, Y., Lu, J., Gu, G., Shi, Z., & Mao, Z. (2004). Mathematical modeling for
prediction of endo-xylanase activity and arabinoxylans concentration
during mashing of barley malts for brewing. Biotechnology letters, 26(10),
779–85.
Muller, R. (2000). A mathematical model of the formation of fermentable sugars
from starch hydrolysis during high-temperature mashing. Enzyme and
Microbial Technology, 27(3-5), 337–344.
Wijngaard, H. H., & Arendt, E. K. (2006). Optimization of a mashing program for
100 % malted buckwheat. Journal of the Institute of Brewing, 112(1), 57–65.