1
Dynamic and Steady-State Process Investigations Using Functional Data Analysis
- P. James McLellan
Department of Chemical Engineering Queen’s University Kingston, ON Canada mclellnj@chee.queensu.ca
Dynamic and Steady-State Process Investigations Using Functional - - PowerPoint PPT Presentation
Dynamic and Steady-State Process Investigations Using Functional Data Analysis P. James McLellan Department of Chemical Engineering Queens University Kingston, ON Canada mclellnj@chee.queensu.ca 1 Outline Brief Exercise
1
Department of Chemical Engineering Queen’s University Kingston, ON Canada mclellnj@chee.queensu.ca
2
3 Stories –
Wrap-up
3
4
Sampled data series
} ), 3 ( ), 2 ( ), ( { } ), 3 ( ), 2 ( ), ( {
2 2 2 1 1 1
L L T y T y T y T y T y T y
Multiple responses
) ( 1
1
t y yt = ) ( 2
2
t y yt = ) ( 3
3
t y yt =
Functional data objects
) ( ), (
2 1
t y t y
5
6
7
– steady-state process investigation in which the functional response is a molecular weight distribution – Functional Regression Analysis of a 2-level factorial design
– Reducing the complexity of chemical kinetic models by identifying intermediate reactions and reactants that have limited effects on predictions of species concentrations – Functional Principal Components Analysis (fPCA)
– estimating dynamic models from data – Principal Differential Analysis (PDA)
8
… is a statistical framework in which the elementary data object is a function of one or more independent variables
– Primary reference – Ramsay and Silverman (1997) – text – Jim Ramsay presentation at the 1997 GRC – FDA toolbox for Matlab available free from Jim Ramsay web site (www.psych.mcgill.ca/faculty/ramsay.html) – Techniques have been developed and used for analyzing handwriting, lip motion, horse gait data, analyzing weather data, eye-hand response times, …
Datasets consist of collections of functional observations
– Multiple observations (realizations) of same response function – e.g., temperature profiles for different runs in a batch reactor – {y1(t), y2(t),…, yN(t)} – Observations of multiple functional responses – e.g., time traces for valve input and temperature – {u(t), y(t)}
9
∑ =
= N i i t
y N t y
1
) ( 1 ) (
( )
∑ − − =
= N i i
t y t y N t s
1 2 2
) ( ) ( 1 1 ) (
Note that the result is a function of the independent variable – average function, variance function.
10
∑ − =
= N i i i yy
s y t y N s t s
1
) ( ) ( 1 1 ) , ( ∑ − =
= N i i i yu
s u t y N s t s
1
) ( ) ( 1 1 ) , ( ∑ − =
= N i T i i yy
s t N s t
1
) ( ) ( 1 1 ) , ( y y S
These functions define surfaces describing covariance across the independent argument, and between variables.
11
– defined in terms of ensemble averages rather than time averages – philosophical shift from assuming stationarity in functional responses
(we could similarly work with time series covariances computed using ensemble averages)
– interpolated – in most instances, the functional data objects are created from measurements at discrete points using smoothing – e.g., splines – covariances reflect both the influence of the observed points and the assumptions made when smoothing – smoothing should reflect additional insight into the behaviour of measured quantities
expect underlying behaviour to be smooth, spiky or jumpy?
12
) (
1 t
y ) (
2 t
y ∑ =
=
basis
N j j j
t c t y
1 , 2 2
) ( ) ( ~ ϕ ∑ =
=
basis
N j j j
t c t y
1 , 1 1
) ( ) ( ~ ϕ ) (t
j
ϕ
are basis functions e.g., splines, polynomials, sinusoids
13
– basis function representations of data have previously been used to assist the application of conventional statistical techniques. For example, fault detection can be enhanced by introducing time-scale separation in operating data by first representing data using wavelets and then applying standard PCA
ϕ ϕ
2 22 21 2 1 12 11 1 basis N basis N
) (
1 t
y ) (
2 t
y
14
15
16
17
influence end-use and processing properties of polymer products
function of molecular weight (or log(MW))
– discretization and treatment as multi-response estimation problems – characterization using moments – detailed mechanistic modeling to predict fractions for each chain length
– loss of information vs. complexity – problem conditioning
techniques from Functional Data Analysis (FDA)
the impact of operating parameters on molecular weight distributions
18
max min 2 1
2 ) ( ), ( ), (
r r r r r
β β β
19
1 1
20
21
their non-periodic and polynomial structure is suitable for MWDs
– MWDs are inherently positive, and from fundamental models, we know that MWDs can be treated as members of an exponential family of distributions with kernel W(r) – In particular, the distribution can be expressed as the solution of the following differential equation – Since g(r) is positive for all r, and – advantage – working with exponential distributions ensures non-negative weight fraction predictions from MWD model
Reference – Ramsay J.O., “Differential equation models for statistical functions”, Can. Journal of Statistics 28, 225-240(2000)
r r
Note – kernel w(r) can be used to provide insight into type of distribution
22
were provided by Predici – non-uniform intervals
Original data y(r) Transformed responses ln(y(r)) Transformed responses d(ln(y))/dr computed from spline fits
23
12 2 1
r r
24
25
Observed (blue) and predicted (red) MWDs for 22 factorial design
26
Sensitivities of MWD to Temperature and Initiator Impact of temperature perturbation operating at centre point of design Impact of temperature perturbation operating at centre point of design
27
28
29
30
31
32
– Use parameter sensitivity information to identify which kinetic parameters have important influence on predicted concentrations
the entire trajectory – stacking of sensitivities
parameter guesses are required
∂ ∂ =
j i i j j i
k t C t C k t S ) ( ) ( ) (
,
m n k m n k n k m k k
×
, 1 , , 1 1 , 1
( ) m p n m n p m n m n
× × × × ×
2 1
kinetic parameters species
33
– principal components consist of combinations of reactions
– retain those reactions with large loadings in the significant principal components – retain those chemical species appearing in the retained chemical reactions – provides a time-averaged model reduction since constant loadings are used over entire time horizon
kinetic parameters species
34
sensitivities at discrete time points, but instead are sensitivity trajectories
trajectories
j i i j j i
,
0.75 1.5 0.2 0.3 0.4 0.5 0.6 Time - s NSC for NO
B1 B11 B44 B239 B240 B463
Normalized Sensitivity Coefficient Time Profiles
35
each time
dimensional surfaces
decomposition on covariance operator V(τ,t) defined in terms of vij (τ,t) – Conceptually, the approach is analogous to conventional PCA, except that eigenvector decomposition is expressed in terms of an integral with respect to time – fPCA produces set of orthogonal eigenfunctions pk(t) representing time- varying loadings
1
N k jk ik ij
=
T
36
– Software available from Jim Ramsay (free!) – Computational burden is higher than for discretization approach
– Generate sensitivity trajectories values at discrete points using the mechanistic model – not necessarily uniformly spaced – Earliest approach to functional PCA – Rao (1958, 1987), Tucker (1958) – Sensitivity matrices S(tk) at discrete points in the time horizon: t1, …, tp – Data matrix formed by stacking sensitivity matrices sideways » rows correspond to different chemical species and runs » columns correspond to reactions at different sampling times – Compute loading vector elements using PCA (SVD). Loading vector elements represent values of the loading functions (eigenfunctions) at sampling points along the time horizon. – Looks like one form of unfolding for multi-way PCA
j i i j j i
,
37
Time - s [CO2]& [CO] - M. F.
Temperature - K
CO2 CO T(K)
38
G26 G25 G24 G23 G22 G21 G20 G19 G18 G17 G16 G15 G14 G13 G12 G11 G10 G9 G8 G7 G6 G5 G4 G3 G2 G1
Significant loadings indicate reaction G24 should be retained over time horizon
Significant reactions: 24, 8, 22, 10, 6, 16
change over time
39
0.2 0.4 0.6 0.8
Y1 Y3 Y5 Y7 Y9 Y11 Y13 Y15 Y17 Y19 Y21 Y23 Y25
Significant reactions: 24, 8, 6, 10, 16
40
Time - s Mole Fraction CO2 CO CH4
483 Rxns & 69 Species
CH4 - 1.3% O2 - 10.8% NO - 250ppm Tmax - 825
41
O + OH = O2 + H CH3 + NO2 = CH3O + NO HO2 + NO = NO2 + OH NO2 + H = NO + OH CH3O2 + NO = CH3O + NO2
42
– Alternatives – basis function approach, numerical quadrature
– We have encountered this problem, but we haven’t given up
– imposing smoothness on the loading functions
43
44
h p c p i
T C V UA T VC UA V F T V F dt dT ρ ρ + + − = ) (
Denote x = T, u = Th , d = Ti
d V F u C V UA x VC UA V F dt dx
p c p
+ + + − = ρ ρ ) (
Mechanistic Dynamic model: Accumulation = in – out + generation - consumption
45
p c p
d p c u p x d u x
1
1
d u x
n n n
46
(PDA & traditional approaches)
x(t) u(t) d(t)
1
d u x
47
– Predominant method for estimating dynamic process models from data – Transfer function or recursion equation models
– Identification of discrete time model, conversion to continuous time – Estimation of parameters in differential equation model using nonlinear regression
– Directly estimate linear differential operators describing process dynamics – Look for linear combinations (with weights that can change with time) of measured functions and their derivatives that sum close to zero – Why?
48
– e.g., observations of temperature, heating medium temperature
– Least squares criterion with residuals given by
expts , ,
f j u j x
, 1 ,
i m l l l u k j i j j x i k i
= − =
expts
i i
General differential equation model that is k-th order in x, m-th order in u Notice that we are penalizing residuals for the highest-order derivative, rather than residuals for the predicted responses.
49
50
– 30 basis functions, 4th order B-splines
51
u
x
52
Magnitudes of residuals fall within 50% of peak magnitude of Dx: is this good?
53
54
55
56
57
response, such as the degree of smoothness (knowledge about behaviour of derivatives)
discrete time-series analysis)?
to represent the data
58
59
60