Научная статья на тему 'Forecasting optimal duration of a beer main fermentation process using the Kalman filter'

Forecasting optimal duration of a beer main fermentation process using the Kalman filter Текст научной статьи по специальности «Электротехника, электронная техника, информационные технологии»

CC BY
126
38
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
main fermentation / wort / Kalman filter / temperature / time / alcohol / extract / главное брожение / сусло / фильтр Калмана / температура / спирт / экстрактивность / продолжительность

Аннотация научной статьи по электротехнике, электронной технике, информационным технологиям, автор научной работы — Niyonsaba T., Pavlov V.A.

One of the most important processes of beer production is the main process of fermentation. In this process, the wort transforms into beer. The quality of beer depends on the dynamics of wort parameters. The main fermentation process continues for 10 days and requires high costs. Therefore, the main purpose of this article is to forecast the optimal duration of the beer main fermentation process and provide its optimal control. The Kalman filter can provide optimal control of the main fermentation process. It also estimates state variables of the main fermentation process taking into account the characteristics of random effects at the object’s input and filters measuring noise. The initial values of raw materials and control parameters of the beer main fermentation process can be determined based on the predicted completion time of the main fermentation process.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

ПРОГНОЗИРОВАНИЕ ОПТИМАЛЬНОЙ ДЛИТЕЛЬНОСТИ ПРОЦЕССА ГЛАВНОГО БРОЖЕНИЯ ПИВА НА ОСНОВЕ ФИЛЬТРА КАЛМАНА

Одним из важнейших этапов в производстве пива является процесс главного брожения. На этой стадии пивное сусло превращается в молодое пиво, параметры пивного сусла изменяются, и качество молодого пива зависит от динамики изменения этих параметров. Процесс главного брожения продолжается 10 дней, что сопряжено со многими затратами. Основной целью данной статьи является исследование оптимального управления процессом главного брожения и обеспечение его минимальной продолжительности без ухудшения качества пива. Оптимальное управление процессом главного брожения выполняется фильтром Калмана. Фильтр Калмана оценивает переменные состояния процесса главного брожения с учетом характеристик случайных воздействий на входе объекта и фильтрует измерительный шум. На основе прогнозированного времени окончания процесса главного брожения определяются начальные пара-метры сырья и управление параметрами процесса главного брожения.

Текст научной работы на тему «Forecasting optimal duration of a beer main fermentation process using the Kalman filter»

DOI: 10.15827/0236-235X. 115.202-207 Дата подачи статьи: 17.06.16

FORECASTING OPTIMAL DURATION OF A BEER MAIN FERMENTATION PROCESS USING THE KALMAN FILTER

1Niyonsaba T., Master of Science, Student, nitherence@mail.ru; 1Pavlov V.A., Ph.D. (Military Science), Associate Professor lTver State Technical University, Nikitin Quay 22, Tver, 170026, Russian Federation

Abstract. One of the most important processes of beer production is the main process of fermentation. In this process, the wort transforms into beer. The quality of beer depends on the dynamics of wort parameters. The main fermentation process continues for 10 days and requires high costs.

Therefore, the main purpose of this article is to forecast the optimal duration of the beer main fermentation process and provide its optimal control. The Kalman filter can provide optimal control of the main fermentation process. It also estimates state variables of the main fermentation process taking into account the characteristics of random effects at the object's input and filters measuring noise. The initial values of raw materials and control parameters of the beer main fermentation process can be determined based on the predicted completion time of the main fermentation process.

Keywords: main fermentation, wort, Kalman filter, temperature, time, alcohol, extract.

Most technological processes are multifactorial, which is characterized by several parameters, and their occurrence depends on many factors. Dynamic changes in process parameters have an inconsistent nature. Moreover, random external influences are not always predictable and should be taken into account.

This article discusses the possibility of controlling the main fermentation process of beer (more precisely forecasting its optimal completion time) applying the Kalman filter.

Statement of the problem. The technological process of the main fermentation process in brewing manufacture is characterized by basic dynamic and threshold changes of parameters, such as the percentage of alcohol (A), the extract (E), temperature (T) and (pH) value [1]. The completion time of the product manufacturing process is the time when the basic parameters reach the specified (critical) values of (A ^ ACr, E '>Ecr, pH > pHcr). The temperature of the product must be in

the interval of T°cr min — T° — T°cr max (T=lcr min T°cr max

are minimum and maximum product temperature values, at which the process is implemented).

Based on the experimental data analysis [2] the equations of relationship between the values of parameters and the process time is shown in formula (1) and the graphs of this relationships are shown in figure 1.

- 0,043/3 + 0,35/2 + 0,34/ + 7,765 < 4,

- 0,1725/ + 5,793 < 4, 3,

1 (1)

0,0137/3 - 0,1/2 -1,675/ +16,269 < 2,5,

-0,0116/2 + 0,61/ + 0,04 = 4,5, where t>0.

The process duration is defined as a maximum time to achieve specified (critical) values of all parameters. These critical values for the studied process are: T = 4; pH = 4,3; E = 2,5; A= 4,5.

It is possible to control the process duration only by changing the temperature. In the course of the process others parameters should change in accordance with the relevant rules and by the completion of the process to achieve their critical values.

The goal of an optimal process control is forecasting a minimum duration.

The basis of the optimal process control is forecasting the dynamics of the main parameters. It should be noted that the dynamics of the process parameters is affected by various random factors of natural origin (for example, the quality of product ingredients, deviation of ambient temperature from the set point, the accuracy observance of technological modes, etc.). Therefore, the process parameters' values A(t), E(t), pH(t) at each moment of time will be of a random nature. In this context, they are presented at each current time interval (Ti, t) implementations of random functions in the process time interval T,<t<Tf, where Ti, Tf are initial and final, and t is the current time points of the process. Such functions are independent and non-stationary. It means that they change over time; their mathematical expectations are time-dependent and the correlation function is at the position of the interval [Ti, Tf] on the time axis. Therefore, forecasting the dynamics of the process parameters must be carried out

0123456789 10 11

Process duration, in a day

M The Extract * pH

• Alcohol * Temperature

Fig. 1. The changes in parameters of the process

using the method of forecasting non-stationary random processes.

The forecasting parameters process A(t), E(t), pH(t) denote by x,(t), where i is a parameter index, i = 1, 2, 3, and present it in the form of a segment of a convergent series (in the sense of mean square convergence)

x (t) = = ф=, i = 1, 2,3.

к=i - К

(2)

In an orthogonal basis of functions <pk(t), k=1, 2, 3, ..., N, where ak- are pair wise uncorrelated random variables with zero mathematical expectations, 9k(t) -functions of own integral equations of the form;

Фi (t) = J к (t> т)ф; (T)dT

(З)

X - is its own values, independent and their correlation functions change relatively slowly in time. In this case for the evaluation of correlation functions it is possible to use the principle of moving smoothing the experimental data for each x,-(t)th process parameter and write the calculated expression for them in the form

t+T/2

K (t, t) = K (t, t + t) = J x (t')X (t' + T)dt' . (4)

t-T/2

The best forecasting value of the corresponding parameter is calculated by the expression:

$,.,(/ + At)

)(t + At) = í

(5)

where the sign a refers to a continuation, which is an extrapolation x,(t), (pik(t) to the time t+At — point-intime extrapolation. Obviously, because of the deterministic basis functions <pk(t), k=1, 2, ..., N, are written expressions for the derivatives of the predicted process.

However, there is no general method of solving the integral equation (3).

Therefore, we will consider the process of product manufacturing with its polynomial representation in non-orthogonal basis functions followed by the estimation of the coefficients of the polynomial non-stationary adaptive Kalman filter by "external" thermal management of product manufacturing.

It is known that the mathematical structure of a non-stationary filter is similar to the mathematical structure of the stationary Kalman filter taking into account external control [3, 4]. At the input of the filter there will be a constant measuring the parameters of the process values. For practical purposes it is important not to select an orthogonal basis set of functions 1, t, t2, ..., tn [5, 6].

On the basis of 1, t, t2, ..., tn extrapolation (forecasting) of the parameters for the process of product manufacturing we recorded process values and rate of changes. The results of the estimates obtained at the output of the Kalman filter are shown in the following expressions:

1 7

X¡3 (t + At) = x,. (t) + X, (t)(t + At)+ - X, (t)(t +At) +...

+ —x,.(M)(/ + A/)",/ = l, 2, 3,

{t + At) = i,. (0 + ii(t)(t + At) + ...

+—^—x(n-l\t + At)n-\ i= 1,2,3, (6)

(n-1) ' V '

x(n + At) = xn(t), i = 1,2,3.

The sign a denotes the estimation of appropriate values of the controlled process in the current time. At the same time the Kalman filter forms a variance-co-variance matrix of extrapolation errors. Fundamentally, it is calculated by the expression:

= M [Ax,Ax„T ] , (7)

where Ax-3 = Ft3 Axj3 is error extrapolation t3,=t+Al;

r t" 1 t —... — 2 n!

К =

О 1

ОО

t...

О

tn

(n -1)!

1

is the operator of extrapolation [7].

As a result we will obtain the necessary input data for determining the completion time of the manufacturing process of the product. Sufficient data must contain the necessary and valid threshold region. At the input the extrapolated values of the parameters (trajectories) set the completion time for the process of product manufacturing with specific parameters.

The Kalman filter is represented by the equations shown below.

The equation of state containing external control of Markov dynamics of the parameters of the process x(t): x(t + 1) = ®(t +1, t)x(t) + w(t) + B(t)u(t). (8)

The equation of observations. It measures the parameters of x(t) dynamics:

z(t)= x(t)+ v(t). (9)

The equation for evaluating extrapolation: x(t + \\t) =<S>(t + \,t)x(t) + vw(t) + B(t)u(t) +

+kii[z(t)-[xv(t)-x(t)l

where x(t) is the value of the dynamics of x(t) parameter at the next time of taking the measurement.

Assessment of the dynamics of x(t) parameters at the current point of time:

x(/ + l) = x(/ + l|/) +

+K(t +1) [z(t +1) - |av (/) - x(t +11/)]. (11)

The gains in the equation for evaluating extrapolation of the parameters for x(t) dynamics:

K, (t) = Vwv (t)Vv-\t).

(12)

The gains in the equation for the estimation of the parameters of x(t) dynamic:

О

к=1

ik

K (t+1) = Vx (t+1 t)[Vx (t+i |t)+Vx (t+1)]-1. (13)

The extrapolation error:

x(t + l\t) = x(t + l)- x(t +1|/)]. (14)

The covariance error of extrapolation:

V (t+1| t) = [®(t+1| t) -

-K (t)]Vx (t + 1)[®(t +1| t) - K^ (t)]T +

(15)

+Vw (t ) - Kц (t)Vv (t K1 (t ).

(16)

Covariance of the estimation error: V (t+i) = [i - k (t+1)] v (t+1). Here we use the following notation: t=T°, 1, 2, 3..., for the /th of the manufacturing process parameters of the product;

x =

f r f 1 t t2 2 f Г1

r , Ф = F = 0 1 t , V = r

r \ 0 0 V 1 У r V /

f M1 f b 0 01 f u 1

^x =

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

Mr KM.rJ

B =

0 b 0 vo 0 b,

, (17)

w is Jamming effects in the manufacturing of product process (equation of state); v is Jamming effects in the equation of observation (the measurement of the x(t) dynamics parameters).

The filter equation in the notation introduced will be used to assess the parameter of x(t) dynamics for the given state equations as algebraic equations of the second order.

The Jamming effects w(t) and v(t) can't follow the normal Gaussian probability distribution. However, the recurrence relation of the Kalman filter remains valid and abnormal distributions w(t) and v(t) [9]: Cov[w(t), w(k)] = Vw (t )8(t - k), Cov[v(t), v(k)] = Vv (t)8(t - k), Cov[w(t), v(k)] = VWv (t)S(t - k), Vx (0) = D[ x(0)], ^ (t) = M [v(t)], ^ (t) = = M [w(t)]

where M is the symbol of mathematical expectation

(18)

fK 0 01

B = 0 br 0

,0 0 Ъ-г,

Values are determined from physical considerations (if they are equal to 1, then there are not strengthened and not weakened).

Initial conditions:

u(0), x (0) = x (0|0) = ^ (0) = M [ x(0)],

V (0) = V (0|0) = £>[x(0)] = V (0).

(Their values can be set based on the initial conditions of the process beginning; the result is a set of trajectories at each control point.)

The manufacturing process of the product is completed when all the observed parameters (in our case they are A, E and pH) reach the required values.

In that case under the optimal completion time of the product manufacturing process we will understand the moment in time at which the required probability of achieving all /'th process parameters required values, e.g. completion parameters. This probability is calculated according to the probability density [8] P(4 (t + At)| x, (t + At)) =

, 1 exp{-1 ( xb (t + ДО -

(19)

- x,. (t + At))7 Y xx-1 (xci3 (t + At) - x (t + At)))},

x,.(t + A) e[a6 ,p,3 ],

a,3, p,3 are the extrapolated lower and upper boundaries of the interval values of the completion indicator of the /th process parameter, calculated to a point in time 4=t+At as the point of intersection of the extrapolated trajectory of the lower and upper boundary lines - the borders of the established region of the optimal values of the product completion indicator for the /'th parameter. T , is the variance of the extrapolated values of

XI3 (t + At) trajectory z'*11 product component in the process of its manufacturing, which suits the value of the first element of the first row in the matrix Y,3. Normal density is adopted due to the fact that such density has maximum entropy compared to other densities with the same first two moments as normal density. In this case the obtained result will be the best guaranteed. The estimated probability formula is written as:

j P(xi3 (t + Д) I x (t + M))dxi (t + Д) .

(20)

The application of the Gaussian probability density is based on the linearity of the non-stationary Kalman filter, forming a trajectory of completion of the zth process parameter. The completion intervals of the z'th parameter for a product set by solving inequalities [9]. x,, (t + At) > ai3, xb (t + At) < , t,.p, (21)

where t,a and t,p are the points in time of reaching trajectory x,3 (t + At) parameters of the product for the parameter with the speed xj3 (t + At).

3

At the same time the expression p| (liu. l^,) = At is

i=i

determined by the intersection of the intervals and sets the desired optimal time, as the time of completion of the product %vt = inf AT subject to achieve a desired

probability of product availability.

However, it may be a situation in which

3

P| (/,!(. l!{,) = 0. In this case, the decision about the op-

i=i

timal completion time of the product manufacturing process obviously should be taken only on the basis of

a

The beginning

i

Input, To,pH,A,E, f, Oc, Ак, Ек

Щр ^^ Â

-С к кр'

pH. t, Г,,, 4(f), E(t),pH(t), At, Td

Input initial values of parameters and values defining the completion of the process

1 -

x(t+1 ) = Ф (f+1, f)r(f) + w(t) + B(t)u(t)z(t) = =x{t) + v{t) Calculation of the process parameters, ith parameter in the current time

X

r, = M[M,M ] T

Matrices of errors of calculation of parametrs

Determining of the optimal values of the parameters

Fig. 2. The algorithm for forecasting optimal completion time of the product manufacturing process

the Pareto expression. The Pareto set is determined by the dynamics of the extrapolated trajectories of two dominant "conflicting" parameters of the manufac-

tured product at an acceptable time interval [To, Td]. To calculate the product optimal completion time we will use the formula:

V = arg min max Plxb

tsT с[Г0,Гв ] 4

(22)

(23)

where p, are the weights of trajectories' parameters of the product manufacturing process; x,-3 are extrapolated values of the trajectories; TP is the Pareto set of efficient points of completion time of the product manufacturing process; ii, /2 are the dominant indexes "conflicting" parameters in the product manufacturing process.

On the basis of the physical nature of the product process control, a control criterion should be based on the requirement of product completion for the minimum time. The control criterion must be complex, e.g. vector, and consist of two individual criteria: one of them must reflect completion and the other must reflect the time spent on product manufacturing. For the criteria formation of the product completion we will introduce the utility function

tt(x3 0111 -1), il{t -1)) = n(x(t -1), u(t - 2)) +

+Arc(x3(t|t -1),u(t -1)).

The estimated Kalman filter of the trajectory of the product manufacturing ith parameter to the current time and the extrapolated value of the trajectory at the current time depends on the decision maker. The choice of utility function depends on the decision maker with respect to the product completion. We proceed when the selected function from the terms of the decision maker disincline towards risk. In this case the utility function is nothing other than the desired criterion, which is the functional definition on the trajectory of the product manufacturing. Such a criterion is continuous, convex upwards, owing to the decision maker disinclination towards risk and, obviously, not additive. However, it is admitted by virtue of the Markov parameters of the trajectory of the product, its reduction to additive form at every current time t for each parameter. For this, we simply use the following expression:

rc, (X3 {t\t-1), u(t -1)) = 71,. (x(t -1), ft (t - 2)) +

+Atc( x3 (t|t-1), u (t-1)), where Arc,. (x3 (111 -1), il(t -1)) = (24)

= 71,. (x3 {t\t -1), ii{t -1)) - 71,. (x(t -1), fit - 2)).

Now, taking into account the requirement to minimize the process time, it is possible to form a vector criterion process control of the product manufacturing as a maximum of the utility function of the product and the minimum time for its manufacturing can be written in the following form

max ■Kj{x(t\t-\),u{t-l)) =

u(t-l)AI 1

= max {71 (x(t -1), ii(t - 2)) +

u (t-2)eU

+ max Ащ(X,(tit-l),(t-1))},

u (t-2)eU ' э 1

Тар, = Inf AT .

ар' т. <ч<-т

Or max 7i (x (/|/-1).м(/-1)) =

u(t-1)eU 1

(25)

= max {щ (X(t -1),u(t - 2)) +

u(t - 2)eU

+ max Ащ(X„(tit-1),(t-1))},

u(t-1)eU ' 1

(26)

v=m™ maxpA(t\t-1).

It should be noted that, the first formed criteria is written as the solution of the Bellman equation and provides feedback to the Kalman filter for optimal control. The algorithm for forecasting optimal completion time of the product manufacturing process is shown in figure 2 [10].

Input initial values of parameters and values defining the completion of the process (fig. 3).

The algorithm is implemented in a high-level programming language C#, Microsoft Visual Studio 2015.

Fig. 3. The result of forecasting the temperature changes using the Kalman filter

Conclusion. The implementation of the above algorithm, the process control based on Kalman filter in an object-oriented automated control system can optimize the product manufacturing process at various combinations of the product ingredients and the parameters, under which the process is manufactured.

References

1. Ermolaeva G.A., Kolchaeva R.A Tekhnologiya i oborudo-vanie proizvodstva piva i bezalkogolnykh napitkov [Technology and equipment for beer and soft drinks production]. Study guide, Moscow, IRPO, Akademiya Publ., 2000, 416 p. (in Russ.).

2. Schuurman M., Brarudi S.A. Sustainable Development Report 2010. 2011, 16 p.

3. Baranov A.M., Osipov E.V. Sintez filtra Kalmana s ispol-zovaniemMatLab [Synthesis of Kalman Filter Using Matlab]. Tambov, 2010 (in Russ.).

4. Welch G., Bishop G. An Introduction to the Kalman Filter. Univ. of North Carolina at Chapel Hill, NC, 2001.

5. Ogarkov M.A. Metody statisticheskogo otsenivaniya pa-rametrov sluchaynykh protsessov [The Statistical Estimation Methods for Random Process Parameters]. Moscow, Energoatomizdat Publ., 1990, 208 p. (in Russ.).

6. Berezin I.S., Zhidkov N.P. Metody vychisleny [Calculation Methods]. Moscow, FML Publ., 1962, vol. 1, 464 p. (in Russ.).

7. Kuzmin S.Z. Osnovy teorii tsifrovoy obrabotki radiolo-katsionnoy informatsii [The Basics of the Radar Data Digital Processing Theory]. Moscow, Sov. radio Publ., 1974, 432 p. (in Russ.).

8. Sage A.P., Melsa J.L. Estimation Theory with Applications to Communications and Control. McGraw-Hill Publ., US, 1971, 752 p. (Russ.ed.: B.R. Levin, Moscow, Svyaz Publ., 1976, 496 p.).

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

9. Albert A. Regressiya, psevdoinversiya i rekurrentnoe otsenivanie [Regression, Pseudo-Inverse and Recurrent Estimation]. Moscow, Nauka Publ., 1977, 224 p.

УДК 658.5

DOI: 10.15827/0236-235X.115.202-207 Received 17.06.16

ПРОГНОЗИРОВАНИЕ ОПТИМАЛЬНОЙ ДЛИТЕЛЬНОСТИ ПРОЦЕССА ГЛАВНОГО БРОЖЕНИЯ ПИВА

НА ОСНОВЕ ФИЛЬТРА КАЛМАНА Нийонсаба Т., магистр, nitherence@mail.ru; Павлов В.А., к.в.н., доцент (Тверской государственный технический университет, наб. Аф. Никитина, 22, г. Тверь, 170026, Россия) Одним из важнейших этапов в производстве пива является процесс главного брожения.

На этой стадии пивное сусло превращается в молодое пиво, параметры пивного сусла изменяются, и качество молодого пива зависит от динамики изменения этих параметров. Процесс главного брожения продолжается 10 дней, что сопряжено со многими затратами.

Основной целью данной статьи является исследование оптимального управления процессом главного брожения и обеспечение его минимальной продолжительности без ухудшения качества пива. Оптимальное управление процессом главного брожения выполняется фильтром Калмана.

Фильтр Калмана оценивает переменные состояния процесса главного брожения с учетом характеристик случайных воздействий на входе объекта и фильтрует измерительный шум.

На основе прогнозированного времени окончания процесса главного брожения определяются начальные параметры сырья и управление параметрами процесса главного брожения.

Ключевые слова: главное брожение, сусло, фильтр Калмана, температура, спирт, экстрактивность, продолжительность.

Литература

1. Ермолаева Г.А., Колчаева Р.А. Технология и оборудование производства пива и безалкогольных напитков. М.: Академия, 2000. 416 с.

2. Schuurman M., Brarudi S.A. Sustainable Development Report 2010. 2011, 16 p.

3. Баранов А.М., Осипов Е.В. Синтез фильтра Калмана с использованием MatLab // Сб. статей Тамбовского гос. технич. ун-та. 2006. Вып. 5. С. 115-118.

4. Welch G., Bishop G. An Introduction to the Kalman Filter. Univ. of North Carolina at Chapel Hill, NC, 2001.

5. Огарков М.А. Методы статистического оценивания параметров случайных процессов. М.: Энергоатомиздат, 1990. 208 с.

6. Березин И.С., Жидков Н.П. Методы вычислений. М.: Физматлит, 1962. Т. 1. 464 с.

7. Кузьмин С.З. Основы теории цифровой обработки радиолокационной информации. М.: Сов. радио, 1974. 432 с.

8. Сейдж Э., Меле Дж. Теория оценивания и ее применение в связи и управлении; [пер. с англ.; под ред. проф. Б.Р. Левина]. М.: Связь, 1976. 496 с.

9. Алберт А. Регрессия, псевдоинверсия и рекуррентное оценивание. М.: Наука, 1977. 224 с.

НИИ «Центрпрограммсистем» Разработка тренажеров, тренажерных комплексов и автоматизированных систем обучения

Предлагаем комплексные решения создания систем теоретического обучения и тренажерной подготовки:

- автоматизированные системы обучения;

- специализированные тренажеры для индивидуальной и групповой подготовки специалистов по техническому обслуживанию и боевому использованию образцов вооружения, военной и специальной техники;

- комплексные тренажеры для подготовки расчетов боевых постов и командных пунктов различных уровней по решению тактических и оперативных задач;

- тренажеры по подготовке к управлению техническими средствами и борьбой за живучесть корабля;

- аппаратно-программный комплекс руководства обучением и комплексирования. Предприятие имеет 25-летний опыт разработки учебно-тренировочных средств для Вооруженных

сил, достаточную материально-техническую базу и необходимые лицензии.

Подробности на сайте www.cps.tver.ru Телефон: (4822) 44-32-44 Электронная почта: info@cps.tver.ru

i Надоели баннеры? Вы всегда можете отключить рекламу.