Quantum Operator Model for Data Analysis and Forecast

A new dynamic model identification method is developed for continuoustime series analysis and forward prediction applications. The quantum of data is defined over moving time intervals in sliding window coordinates for compressing the size of stored data while retaining the resolution of information. Quantum vectors are introduced as the basis of a linear space for defining a Dynamic Quantum Operator (DQO) model of the system defined by its data stream. The transport of the quantum of compressed data is modeled between the time interval bins during the movement of the sliding time window. The DQO model is identified from the samples of the real-time flow of data over the sliding time window. A least-square-fit identification method is used for evaluating the parameters of the quantum operator model, utilizing the repeated use of the sampled data through a number of time steps. The method is tested to analyze, and forward-predict air temperature variations accessed from weather data as well as methane concentration variations obtained from measurements of an operating mine. The results show efficient forward prediction capabilities, surpassing those using neural networks and other methods for the same task.


Introduction
Simulation, design, and process control tasks in engineering require the knowledge of the mathematical model of the controlled system. A dynamic model of a system may be created using analytical or numerical, computational simulation tools. Complex problems involving coupled processes pose a challenge to set up an analytical or computational, dynamic model that is fast enough to evaluate, flexible enough to match experimental observations, and adjustable enough for corrective calibration. Analytical models may need precious skills to set up for sufficient details, while computational, system modeling tools are cumbersome to incorporate in real-time process control applications.
Artificial Intelligence (AI) and Machine Learning (ML) methods have arisen as a panacea for overcoming the model-building difficulties when the vast amount of monitored data is already available from the subject system. A systematic review of AI models for natural resource applications is given by Jung and Choi [1] albeit without any focus on applicability for real-time information processing. Neural Network (NN) models are regarded as the most universal model identification tools when large input and target data samples, as well as long training time, are available and acceptable, reviewed by Rojas [2]; Lin et al. [3]; Miao et al. [4]. However, for real-time data analysis, regression and autocorrelation methods may compare and compete favorably both in efficiency and evaluation time for dynamic, predictive model identification. For example, the training time for an LSTM type short-term forecasting NN model is reported by Dias [5] to take 30 minutes, while the same task is solved in one minute with the same accuracy using a first-order, time-series functional model.
The aims at the development of a new dynamic system model are: 1) data compression without information loss; 2) processing speed increase in model identification; and 3) accuracy improvement for short-term forecasting. Such demands (1)-(3) have arisen, e.g., for forward predicting and controlling atmospheric conditions in the hazardous workplace environment for workers' safety and health. The focus of the study, therefore, is to develop a fast, real-time evaluation of a method for the mass amount of data commonly monitored as environmental air parameters with the capabilities of forecasting.
The heat, mass, and momentum transport processes are dependent on the past and present input conditions involved in the outcome of process parameters of the atmospheric conditions such as air velocity, temperature, humidity, and contaminant gas species. Similarly, the expected, future, process parameters are governed by the past and present conditions and the general, self-similar system behavior, in addition to some recurring disturbances. Dynamic model identification is expected to recognize and account for these system characteristics for forward prediction applications. Once the systematic characteristics are matched, only the stochastic disturbances remain to be depressed using, for example, leastsquare fit matching during model training. The distraction caused by the "known unknowns" in the forecast of the process parameters will then be limited only to the extent of a random model fitting error.
Functional data analysis is a good starting point for dividing the input data into discrete time intervals within which the data in each time segment is characterized by some statistical parameters such as the median or mean values, e.g., in Horvath and Koloszka [6]. A classic time series analysis by Box and Jerkins [7] applies Autoregressive Moving Average (ARMA) or Autoregressive Integrated Moving Average (ARMA) models to best fit a time-series model to past values of the input time series. The goal of the presented work is the identification of a linear operator model, for which any unnecessary and nonlinear elements are avoided by design. Such nonlinear models are used e.g., by Milionis and Galanopoulos [8] in a univariate ARIMA model for analyzing economic time series in the presence of variance instability and outliers; or by Pam et al. [9], applying non-stationary time series analysis of energy intensity by an expanded ARIMA model with logarithmic terms; and Abebe [10] for annual rainfall analysis.
A similar approach is used in the presented work regarding the autoregressive concept but in a fundamentally new way in which any single time series of N members of data is broken into multivariate components in time compartments assigned to M number of designated time interval bins. A significant element is that the compartmentalized data to be processed are moved from time segment bin to bin step by step, moving with the progression of real-time. The dynamic model will then use the characteristic values of the groups of data as multivariate inputs kept in the time interval bins.
The quantum of data kept in bins serves as the fixed base of the M-dimensional operator (or functional) of the dynamic model. A similar approach is used in a previous work regarding operator representation of a system model, rendering an output function to an input function as a transformation, e.g., by matrix-vector multiplication, used by Danko [11]. The previous nomenclature is kept unchanged, referring to an operator as a "functional," that is, a function-function as opposed to a function of scalar values. The plan of the study is set up as follows. A data flow of ( ) ( ) ( ) is assumed from a single-channel sensor, acquired from the subject system at 1  for data compression. Definitions are given for the time compartmentalization into bins; the data processing and distribution into bins; and transport of the quantum of data between the bins during step-by-step sliding from the most recent to the past time periods. Various data compression methods are shown for comparison of characteristics including the common, sliding time window averaging and a new property, named the "moving window quantum of data". The moving window quantum value in each bin is defined from the contained ( ) i X t data for constructing a set of base vectors of the dynamic operator of the system. For the model training of the matrix operator, a set of M-length quantum vectors is defined for setting up an over-determined set of equations for M K < . The M M × matrix coefficients of the dynamic operator of the system are obtained by matching the model prediction to the data by the least-square (LSQ) error fit method. Application examples will complete the study to show the operator model's performance to complement or surpass those of other ML techniques including NN.
The width of each time-base bin is defined as where: and: With i t i = given, Equation (3) has to be solved first by iteration, that converges in 22 steps to 1e−12 absolute error, giving The k τ divisions from Equation (1) are plotted in Figure 1(a) against the number of bins. As shown, the division points of the bins are exponentially widening toward the oldest time instant from the latest, most recent M τ (or refining to the most recent from the oldest 1 τ until it equals the finest step of 1 day).  The time-base bins are designed to hold the newest sample unchanged, and the characteristics of past data compressed, representative to the acquisition time of the cluster relative to the last, current time instant. There are several, known ways to characterize past data using some methods of averaging. For example, the conventional, daily average of minute-acquired temperatures use the integral mean value of the measured data, the integral approximated by the Riemann sum of the definite integral for each day. Following this example, and assuming for simplicity a continuous, piecewise-linear function, belonging to each time bin may be defined as: There are difficulties in using Equation ( Indeed, substituting Equations (6a) and (6b) into (5) gives an approximate expression for ( ) k Xp t t + ∆ that is easy to evaluate and effective in data compression, but includes the sum of two error terms, 1 2 ε ε + : The need for a new, useful, average-type characteristics of the data stored in bin k is inspired by Equation (7) The quantum definition in Equation (8)  Applying the definition in Equation (8) for a discrete data series yields: The quantum property in Equation (9) is an improvement over the sliding window property in Equation (7) as the ambiguous error term, 1 2 ε ε + , is eliminated due to the modified definition. The sliding window average is not a convenient property to use in comparison to the sliding window quantum of data property. By definition and design, Note that the definition in Equation (9) is recursive and the ( )  A straightforward way to give closed formulas of ( ) evaluating the quantum of data directly in each bin from the original data stream may be obtained by repeatedly applying Equation (9) starting from the known, However, a simple, matrix-vector equation is more convenient for numerical evaluation as shown in the following example.
E2. Example of bin-to-bin quantum of data transformation using matrixvector calculation Let the values of quantum be organized into column vectors in a matrix-vector equation: where A is a sparse ( ) The last element of vector 1 i+ Q for k M = , not included in Equation (10), is defined by the new data, that is, . Example of quantum of data vectors for a harmonic signal A continuous, sinusoidal data stream of 327 days sampled at regular 5-minute time intervals is processed into 50-element quantum vectors. A synthetic data stream is selected in the example to model daily and yearly temperature variations superimposed according to , the series of time divisions. The time compartmentalization in E2 into 50 bins is used for the transformation according to Equation (11 E4. Example of quantum of data vectors for measured data A true, outside temperature data stream of 327 days sampled at regular 5-minute time intervals is accessed from a commercial weather data vendor for Northern Nevada, USA. The data is processed into 50-element quantum vectors using the same process described in E3. The time compartmentalization in E2 into 50 bins is used for the transformation according to Equation (11). The 50 components of the i Q vectors are shown in

DQO Model Building of a System for Time Series Analysis and Forecast
It is straightforward to expand the concept of the autoregressive (AR) model into a dynamic operator. The AR model of order p is defined following Shumway and Stoffer [12], and Kun [13]: where c is a constant, j ϕ are constant coefficients, and ( ) where ( ) The The solution, provided that the inverse matrix In reality, for the effective minimization of the fitting error term, a much larger input quantum set S is required. A least-square fit minimization scheme is devised by selecting a subset of time series input data, j S ∈ , as follows:  gives the LSQ solution for the over-determined set of equation, provided that the inverse exists: The z φ is a matrix representation of the linear operator of the system appli-  (with only each k marked as no difference between model and data can be seen). As shown in Figure 5(a) and Figure 5(  The variation of ( ) E i over the 327 × 288 time steps is shown in Figure 6(a).
The histogram of the variation is depicted in Figure 6 The graph of ( ) z E i and its histogram are shown in Figure 7(a) and Figure   7(b), respectively. A comparison between Figure 6 and Figure 7 indicates a steady or overall better error performance in forward prediction application relative to that in model identification, an observation that should be considered coincidental, due to generally improving regularity in the input data stream with time in the example. Nevertheless, a steady DQO model performance up to 12 forward-step forecast in the example makes the method appealing, especially in comparison to published results for LSTM NN models with poorer forward prediction performance [5]. The typical running time for model DQO identification and forward prediction at each time step in E5 takes 18 milliseconds using a laptop computer.

DQO Model Application for Safety and Health Analysis and Forecast
The DQO model is developed for analyzing and controlling atmospheric conditions for safety and health in working and living. As demonstrated in E5, a DQO model can be identified and used for forecasting with minimum cost and efforts, adding values for the raw data. The hypothesis is that precious, and quite significant time may be saved for preventive interventions to alleviate impending hazard conditions at any monitored, living or working place. The hypothesis is tested in a mine safety and health application example. Atmospheric conditions are obtained from in situ, monitored data from an operating mine for 327 days under normal operating conditions. The monitored parameters are air flow rate in the face drift (Qa), incoming Methane (CH 4 ) gas concentration at the main gate (c MG ), and exiting Methane concentration at the tail gate (c TG ). A synthetic data modification is introduced in Day 322 by an added Methane source (q ) surge that increases the CH 4 concentration above the allowable threshold value of 2%. The goal is to forecast the effect of the qms gas inburst as well as the resulting CH 4 concentration by the DQO model for preventive intervention before the condition for a fatal explosion may happen.
E6. Illustrative example of a DQO model fit and forecast using large forward steps The monitored parameters of air flow rate, Qa, incoming Methane gas concentration at the main gate, c MG , and exiting concentration at the tail gate, c TG , are inter-related. A transport model is used first for back calculating the root-cause gas source term, qm, from the observed incoming and exiting gas concentrations. A simplified Methane mass balance transport equation is used for the working drift: . As shown in Figure 9(a) and Figure 9(b), the match between the DQO model's output results and the input data is close to the match for model training.
The absolute error of the model fit, ( ) E i , for each of the 327 × 288 time step, normalized according to Equation (22), is shown in Figure 10(a). The histogram of the variation is depicted in Figure 10 Figure 11(a) of which the histogram is given in Figure 11(b). A steady DQO model performance in forward prediction by 36 forward-step forecast makes the method appealing for safety application ( Figure 12).
The time gain by using the 36-step forward predicting DQO model against the real-time input data is directly evaluated. The temporal Methane concentration variation, c TG in quantum vector form is back-calculated from the modeled The same input data and contaminant gas transport system is used in a demonstrational example for the same task but with the application of refined froward prediction steps to 1 z = , applying Equation (16). The goal is to forecast the effect of the qms gas inburst by the DQO model for preventive intervention before condition for a fatal explosive condition may happen. The DQO model training steps is reduced to     Figure 16(a). The histogram of the variation is depicted in Figure 16 Figure 17(a) of which the histogram is given in Figure 17(b). A steady DQO model performance is seen in forward prediction by 20 forward-step forecast, similar or better in quality than obtained in example E6.  concentrations are depicted in Figure 18, showing an actual time gain of 150 minutes for forecasting a future threshold crossing event at 2% against the realtime data. given for the time compartmentalization into bins; the data processing and distribution into bins; and transport of the quantum of data between the bins during step-by-step sliding from the most recent to the past time periods. Various ic conditions for safety and health in working and living. DQO models are identified and used for forecasting methane concentration variations from monitored data. A hypothesis is tested regarding a time advantage that may be gained by DQO model prediction, and saved for preventive interventions to alleviate impending hazard conditions at any monitored, living or working place. The hypothesis is tested quantitatively, using two forward-prediction algorithms to consider in a mine safety and health applications.

Concluding Remarks
 A new method is presented for AR time series analysis of a real-time, continuous data stream.  A new type of data compression, using data quantum vectors, is developed, and implemented for practical applications.  A new type of DQO model-building and identification method is described.  The hypothesis test about significant time gain is affirmed by forward prediction using the DQO model in the racing for preventive interventions to counter impending hazard events in atmospheric conditions.