ANALYSIS OF DETECTION OF ECOLOGICAL HAZARD BASED ON COMPUTING THE MEASURES OF CURRENT RECURRENCE OF ECOSYSTEM STATES

An environmental hazard is a possibility of occurrence of negative or catastrophic events in different ecosystems [1]. An environmental hazard normally implies the probability of destruction of the human habitat and the biosphere as a result of imperfect technologies, as well as natural and anthropogenic disasters. Usually, the implementation of an environmental hazard results in disruption of adaptability of living systems to deteriorated conditions of existence [2]. Modern anthropogenic impacts and environmental destruction, caused by local technogenic disasters [3] and the global environmental crisis, indicate that the current state of ecosystems poses a significant threat for the whole humanity [4]. In this regard, it is becoming increasingly important for most countries in the world to esure the environmental secu-


Introduction
An environmental hazard is a possibility of occurrence of negative or catastrophic events in different ecosystems [1]. An environmental hazard normally implies the probability of destruction of the human habitat and the biosphere as a result of imperfect technologies, as well as natural and anthropogenic disasters. Usually, the implementation of an environmental hazard results in disruption of adaptability of living systems to deteriorated conditions of existence [2]. Modern anthropogenic impacts and environmental destruction, caused by local technogenic disasters [3] and the global environmental crisis, indicate that the current state of ecosystems poses a significant threat for the whole humanity [4]. In this regard, it is becoming increasingly important for most countries in the world to esure the environmental secu-

Literature review and problem statement
Any human activity is related to instantaneous or delayed environmental damage. Such damages are formed in the place of activity and in remote space. Environmental damages are usually significant regional or local environmental disruptions, resulting in the destruction of local ecosystems and economic infrastructure [6]. Such damages threaten the health and lives of people, as well as inflict the noticeable economic damage.
The emergence and propagation of the environmental damage is usually a chain branching process, possibly, inertial, protracted in the time of manifestation.
Modern ecosystems are complex systems that demonstrate the dissipation of the structure, nonlinear dynamics and self-organization. In such systems, the traditional methods of analysis may not detect existing relations between environmental elements and environmental variables, because they are based on the linearity assumption, which is usually violated [7]. This leads to an incorrect presentation of fundamental physical processes and tendencies of development in ecosystems. From the point of view of ecosystem management, understanding and characterization of the dynamic mode is of paramount importance to monitor the effect of different disturbances on ecosystems [8]. Therefore, the methods of quantitative estimation of nonlinear dynamics in the presence of noise, non-stationarity and short series of monitoring data are an active area of research in many disciplines [9].
Nonlinear methods based on correlation dimensionality, Lyapunov indicators and entropy can be used to study the properties of ecosystems. However, it requires quite long data implementations. Incorrect application of such methods, especially to natural data, often leads to erroneous results [10]. To explore such a complex system successfully, it is best to use non-linear tools. Such instruments do not depend on specified statistical data distributions and are applicable for shorter datasets, disguised by natural noises, transitional processes and artifacts, resulting in an undesirable increase in space dimensionality. Today, only analysis of RS meets the above requirements [11].
It was proposed to display the recurrent behavior of states in the form of recurrence plots (RP) [12]. RP include data analysis methods, which were introduced to visualize the behavior of trajectories of dynamical systems in phase space [10]. RP make it possible to judge about the nature of processes flowing in the system, existence and influence of noise, drift, existence of recurrence and fading of states, extreme events, the presence of hidden periodicity and cyclicality. Quantitative analysis of RP makes it possible to match some numerical measures, based on the density of recurrence of points, to the plot. In this case, no satisfactory theory of RP application and their quantitative measures was created. The method needs more research, caused not only by complexity and diversity of ecosystems, but also by limitations of environmental monitoring. This applies to temporal localization of environmental violations, limited volume of observation data and the need for early detection of environmental disruptions, limited volume of monitoring data and the need for early detection of an environmental hazard.
The application of the methods of the theory of dynamical systems to analysis of various ecosystems has been actively developed recently [13,14]. A studied ecosystem is typically described by a system of differential equations. The more complex a system, the more equations are necessary to describe it adequately. However, there are ecosystems described by a small number of equations, but demonstrating their very complex behavior. For example, it is the wellknown Lorentz system, describing the convection process. This system is described by only three equations, but the dynamics of its behavior in time demonstrates the elements of chaos. During environmental monitoring, it is often difficult to determine to which class an observed ecosystem belongs, judging by the dynamics of one-dimensional monitoring. In the theory of dynamical systems, there are methods that make it possible to restore the characteristics of the whole system by one-dimensional observation data. In particular, a number of papers in geophysics are devoted to the analysis of time series, including analysis from the standpoint of the theory of dynamical systems and fractal sets [14,15].
For example, the experimental study of the state of the local ecosystem at ignitions was carried out in [16]. It is alleged that the studied local ecosystems at ignition of materials are characterized by the complex and non-stationary dynamics of their states. A particular method for early detection of ignitions in local ecosystems is explored in [17]. In this case, the dynamics of states of the ecosystem under consideration at ignitions and the RS property are not taken into account. Paper [18] proposes an approach, the aim of which is to overcome unawareness of the dynamics of states during the detection of early ignitions based on the use of self-adjusting sensors. At the same time, the problem of overcoming a priori uncertainty is partially solved, since only the data of mean values of observed states are used in self-adjustment. In paper [19], analysis is limited to the dynamics of self-adjustment of the threshold and the median probability of ignition detection. In this case, analysis of the possibility of using RS measures to detect early ignitions in the ecosystem is not considered. Paper [20] focuses on the experimental study of temporal autocorrelations and pair correlations for major dangerous states in relation to the states of gas medium at ignitions. It is noted that individual measures, characterizing a complex structure of the interaction of hazardous states, rather than an integrative measure, appear to be essential for the detection of hazardous states. Known methods [21] are based on the stationary approach enabling the detection of only the averaged distribution of energy of hazardous states by lags and frequencies. In this case, the frequency-temporal and recurring structure of hazardous states of the considered systems is not taken into account. The review of the methods of temporal and frequency resolution of states is presented in [22]. It is noted that the problem of temporal-frequency localization of hazardous states remains not completely resolved, the methods appear to be difficult to implement and of little use for operative detection of such states. Research [23] addresses the development of Fourier transform on the problems of temporal analysis of non-stationary processes. In this case, early detection of hazardous states is usually accompanied by non-stationary monitoring intervals. Paper [24] focuses on the exploration of increments of states as the signs of early detection of hazardous states in local ecosystems. However, the cited results are limited to analysis of the statistics of increments of basic states of gas medium in an ecosystem at ignition. The features of the structure of dynamics of increments of states in multi-dimensional phase space are not considered. Following [20][21][22][23][24], the studies of hazardous states in local ecosystems at model ignitions prove that an early ignition is a source of violation of the original equilibrium state of gas medium that in the general case has a rather complicated non-linear character.
Papers [26] and [27] focus on the common methods of frequency-temporal display and identification of nonlinear systems based on short-time Fourier transform. The application of short-time Fourier transform to analysis of actual temporal observations is explored in [28]. It is noted that the methods [26][27][28] appear quite complex to implement and cannot be considered as constructive for early detection of hazardous states. Other methods based on the approaches different from the Fourier approach are not considered. In this case, additional research into the area of determining RS measures in multi-dimensional phase space is required for early detection of ignitions in local ecosystems. Article [29] considers the application of the known frequency-temporal approach and its modification to the study of the structure of dynamics of hazardous states of gas medium. Considerable complexity of these approaches is noted. Despite the efficiency of the modified approach, its implementation remains quite complicated and depends on the type of used window functions. The method is limited to the energy display of hazardous states and does not make it possible to explore the structure of dynamics of hazardous states in the phase space.
Understanding the principles and mechanisms underlying the dynamics of hazardous states of modern ecosystems is closely related to the progress in the analysis of complex systems. The concepts that appear in the field of nonlinear dynamics, such as correlation dimensionality [30] or the Lyapunov indicators [31] are successfully used for quantitative description of phase space topology and dynamic properties of various systems. Fractal properties [32,33], information measures [34] and other types of measures are used when studying topology. Today, special attention is paid to dynamic characteristics based on RS measures [12]. It is noted that RS are manifested in most actual dynamic systems and processes.
Thus, RP is one of the constructive methods for studying dynamics and detection of dynamic patterns in time series of actual observations [12]. In conjunction with the methods of quantitative analysis of recurrence, they make it possible to characterize and identify structural features of dynamics of systems, which cannot be identified using classical methods. Analysis of RS of ecosystems involves fractality of dynam-ics of hazardous states. Fractal analysis methods based on recurrence measures makes it possible to solve the problems of analysis, classification, recognition, prediction, and detection of the moments of hazardous change of states at a qualitatively higher level [35]. However, the known measures of the RS of dynamic systems remain complex enough and do not make it possible to detect an environmental hazard in due time and in full degree. That is why early identification of environmental hazard in ecosystems based on the calculation of measures of the current RS remains an important and unresolved part of the studied problem of ensuring environmental security of ecosystems.

The aim and objectives of the study
The aim of this research is analysis of early detection of an environmental hazard based on the use of current recurrence of their states on the example of a local ecosystem in the form of a non-hermetic chamber.
To accomplish the aim of research, the following tasks were set: -to develop the methods and the procedure for calculation of measures of current recurrence of states for early detection of an environmental hazard in ecosystems; -to analyze the possibilities of early detection of an environmental hazard in ecosystems based on the developed methods for calculation of measures of current recurrence of their states.

Procedure of experimental study
Experimental studies were performed for the local ecosystem in the form of gas medium in the non-hermetic chamber [36], in highly flammable material (alcohol) was ignited within the known time interval. In this case, it was assumed that alcohol ignition violates original stability of non-equilibrium state of gas medium in the chamber. In the course of the experiment, the states of the gas medium were registered at discrete moments of time i at the step Δt=0.1 seconds. Registration moments were numbered from 0 to N S . The state of gas medium was determined by the vector, the components of which were smoke density, temperature, and concentration of carbon monoxide (CO). The standard sensors, used in the existing fire detectors, were applied for the registration of the specified states. The register sensors were located in the zone of convection jet above the combustible material at the height of 0.8 m. This means that at moment i, the registered state of gas medium was determined by vector i x (1) in three-dimensional phase space (m=3). Alcohol ignition was carried out in the interval from 200 to 230 counts relative to the beginning of the registration of states. For analysis of early detection of an environmental hazard in ecosystems with the use of RS, the proposed procedure for calculation of the current RS measures was applied.

Procedure for calculation of measures of current recurrence of states for early detection of an environmental hazard
We will imply by the states of ecosystems in phase space either the observed systemic variables, or the non-observed, but restored by one monitored parameter. The latter is possible to implement, for example, using the known nest and delay method [37].
In most problems of ecosystems monitoring there are no data on perturbing factors and the only information source is the state of an ecosystem, measured at discrete points of time. This information enables us to analyze the dynamics of ecosystems without reference to their internal structure. In the general case, the information on the state of an arbitrary ecosystem at a discrete point of time i may be represented by a m-dimensional vector of monitoring data where i d is the vector of current average states; ∆ i is the vector of current incremented states, determined by perturbing factors; N s is the maximum number of vector data on the states of the studied system, registered in discreet time. According to papers [22, 23,27], the components of ∆ i in (1) are essential for early detection of hazardous states. That is why calculation of recurrence measures for detecting hazardous states of ecosystems should be based on the dynamics of the vector of current increments of a state. To do this, the transition to the new vector, determined by the difference of the corresponding vectors of states (1) or current increments, was performed The RP method makes it possible in the studied case to display trajectories (2) in m-dimensional phase space onto a two-dimensional binary matrix of sizes of N s ×N s . In this case, a single element of the matrix corresponds to the RS at some where Θ() is the Heaviside function; ɛ is the sizes of neighborhood of state i z at time point i, and ǁ*ǁ is the sign of determining the norm. Analysis of the states of dynamic systems based on (3) became popular due to emergence of the methods of quantitative recurrence analysis [12]. The methods are based on measuring complexities in RP, displaying the special states in the studied dynamical systems. However, known measures do not make it possible to use them for early detection of hazardous states in ecosystems. In some cases, some known measures require prior time for their computation, which decreases the efficiency of detecting hazardous states in ecosystems. In addition, some of the known measures are not sufficiently sensitive to increments of hazardous states, which also limits their application for early detection of hazardous states in ecosystems.
The most common of these is the RS measure, determined based on Measure (4) shows the RS density, calculating it without taking into consideration the identity line in (3). In the limit at N s →∞, measure (4) determines the probability of RS in the studied ecosystem. The main limitation of the measure at early detection of hazardous states is the fact that this measure is integrated and that is why it is not meant to detect local in time dynamic features of states. The modification of measure (4) is its representation in the form of a functional depending on ɛ and N s , that is, on measure The measure (5), unlike (4), makes it possible to calculate the density of RS taking into account the dynamics of the observation interval and size ɛ of the neighborhood of state i z for current point of time i. The limitation of the measure (5) is a decrease in its sensitivity to increments in states as the monitoring interval increases. The measure is calculated from the moment of the first observation and that is why initially has low accuracy. To increase accuracy and reliability of the temporal localization of hazardous states, we propose modification (5) in the form of a window measure (a square N×N window is used), moving along the main diagonal (3) for each N s count of the state The measure (6) makes it possible to calculate current РS density and implement the possibility to detect hazardous states in ecosystems. This measure depends on parameters ɛ and N, which can be selected from the condition of the best early detection of hazardous states. In the case of calculation of the measure (6), a window of N×N size moves along the main diagonal and that is why this measure is determined only for counts N s ≥N. This means that the measure (6) is formed with a temporal delay equal to N counts of state in a window. To decrease the temporal delay, the minimum window sizes should be chosen. However, various destabilizing factors will have great influence on the magnitude of measure at small window sizes. This should be taken into consideration when using the measure (6) for early detection of hazardous states in ecosystems. Another modification of recurrence measure calculation relates to a change in the direction of the window. It is proposed to use the measure, similar to that in (6), but in which the window moves horizontally (or vertically). For the horizontal movement of the window, the modified RS measure will be determined by magnitude The measure (7), unlike (6), makes it possible to provide the desired smoothing of the measure with simultaneous increasing its sensitivity to hazardous phase transitions in the states. This property enables the improvement of reliability and efficiency of the identification of hazardous states in the studied ecosystems.

Results of experimental study into measures of current recurrence for early detection of an environmental hazard
According to p. 4 and p. 5, Fig. 1 shows the RP (3) corresponding to the vectors of states (1) (Fig. 1, a) and to the vectors of increments of states (2) (Fig. 1, b) at al-cohol ignition in case ε=0.01 for the monitoring interval determined by 180-240 counts. The results of the study of the possibility of application of the recurrence measure (5) for early detection of ignition are shown in Fig. 2. Similar results for the measure (6) at a square window the size of 50×50 counts, moving along the main diagonal of the states are shown in Fig. 3.  4 shows similar results in the case of using the measure (7) at a square window the size of 50×50 counts, moving horizontally along the axis of counts for early detection of alcohol ignition. The results of the study of the influence on the possibilities of early ignition detection at a decrease in square window sizes in the case of the measure (7) are shown in Fig. 5. The plots in Fig. 6 show the results of the study of comparative possibilities of the proposed measures for early detection of alcohol ignition in the chamber in case of using the window the size of 5×5 counts.
The results for the proposed current recurrent measures, shown in Fig. 1-6, were obtained taking actual errors into consideration. The actual errors included the errors of data registration by the sensors in the chamber, as well as the errors of data conversion into the digital form for computer processing.
In this case, it was believed that the errors of data conversion in the digital form are negligible compared to the errors of sensory measurements. That is why we can assume that within a methodological error, the above data reliably evaluate the proposed measures of recurrence of increment of the states of gas medium. Considering that the sensors, used in the chamber, are applied in existing fire detectors, one can assume that the presented results of studying of recurrence measures in general are adequate to actual conditions.  (1) and (2) of gas medium at alcohol ignition reveals the fractal structure of its states and that the possibilities of the RP for early detection of hazardous states appear different.
In this case, it follows from Fig. 1 that the RP have most information capacities for to increments of the states of gas medium. The RP offer the possibilities only of visual detection of hazardous states in ecosystems. Such states are determined by the existence of the areas with zero recurrence (white areas) in the RP. The RS areas are displayed in the RP in black. Fig. 1 shows that prior to the alcohol ignition (180-216 count), the areas with zero recurrence are located within the areas with RS. This is proved by the fact that prior to ignition, gas medium was in the stable non-equilibrium state. By analogy with the second law of thermodynamics for biological systems, such condition is ensured by a continuous alternation of phases of energy consumption and release (stability and non-stability of states -alternation of black and white closed areas in Fig. 1).
In this case, the emergence of open areas with zero recurrence is characteristic of the loss of states stability for disruptions in ecosystems.
For numerical characterization of these features of RP to automate early detection of hazardous states in ecosystems, only current RS measures were considered in ecosystems. The results of the study of the measure (5) (Fig. 2) show that this measure generally can be used to detect hazardous states. However, the measure (5) has the restriction connected with the smoothing properties of this measure in relation to small scale changes in the RP. In this case, as the interval of analysis increases, these limits are manifested to a greater extent. For small intervals of analysis, the measure (5) has a high margin of error. That is why it was established experimentally that the application of the measure (5) is possible only for the intervals of analysis not exceeding 300 counts. In addition, due to manifesting smoothing properties at an increase in the interval of analysis, this measure possesses insufficient sensitivity for detecting hazardous violations of the states of ecosystems (low rate of RS deceasing). In this case, the sensitivity of this measure may be somewhat increased by increasing magnitude ε, for example, for the case of alcohol ignition, values of ε can be in the range from 0.05 to 0.1. However, at a further increase in the size of neighborhood ε, the actual pattern of RS will be distorted.
The results of the study of window measures RS (6) and (7), represented in Fig. 3, 4, show that these measures, unlike the measure (5), are better suited for the detection of dangerous violations of the state in ecosystems. This is due to the local smoothing properties in the windows of limited sizes. However, the specified measures have the limitations related to the delay in obtaining a result for the number of counts, equal to the size of the window. It should be borne in mind that large window sizes badly localize violations of states, while large sizes appear too sensitive to RP non-homogeneities.
It should be noted that the measure (6) is based on the window moving along the main diagonal of the RP. In this case, to identify the areas with zero RS, it is necessary to use the windows of large sizes, which will reduce the efficiency of detecting violations. In addition, the movement of the window along the main diagonal does not provide the magnitude of zero recurrence in the absence of the actual RS (white areas). In this case, the general sensitivity of the measure to violations increases with an increase in the sizes of neighborhood ε for states. In the case of alcohol ignition, the magnitude of ε can range from 0.05 to 0.1, but the localization of violations of the state is detected slightly earlier. This is due to some distortions of the RP at an increase in the sizes of ε of neighborhood of states. For example, in the case of alcohol ignition, the data in Fig. 3, b reveal the existence of transitive chaos in the states of gas medium after the ignition moment. Similar results for the measure (7), shown in Fig. 4, demonstrated its great capabilities, compared to the measure (6), to identify hazardous states in ecosystems. That is explained by the use of the windows, moving horizontally along the axis of the RP to calculate the measure (7). This enables using the windows of small sizes for the best localization in time of violations of the state in ecosystems. Analysis of the results in Fig. 5 reveals that the measure (7) at the window sizes of 5×5 makes it possible to detect quite accurately a hazardous violation of the state, related to alcohol ignition, by the zero RS of gas medium. In this case, the general sensitivity of the measure (7) to violations weakly depends on increasing the size of neighborhood ε and remains capable of clear identification of the moments of occurrence of dangerous states in ecosystems (Fig. 5, a, b).
The results of the study of comparative capabilities of the proposed measures suggest that the window measure at a horizontally moving small-size window (in the case of the fixed value ε=0.01) appears the most suitable. Comparative characteristic of different measures in function ε for the fixed moment, corresponding to count 220 (alcohol ignition moment), is illustrated by corresponding dependences in Fig. 6, b. The data provided indicate the benefits of the measure (7) for early detection of hazardous states.
Therefore, this measure of the current RS with a horizontally moving window can be considered as constructive at an early reliable detection of environmental hazards in ecosystems.

Conclusions
1. The methods for calculation of the measures of the current RS for early detection of an environmental hazard in ecosystems were developed. The proposed measures are based on a modification of the known measure of global recurrence for the case of the calculation of measures of current recurrence in square windows moving along the main diagonal, as well as along the horizontal axis of the RP. This made it possible to obtain a constructive measure for detection of dangerous states in ecosystems based on its use for temporal localization by zero recurrence at minimum window sizes.
2. In accordance with the proposed measures of current recurrence, on the example of the local ecosystem, the possibilities of early detection of an environmental hazard were analyzed. A comparative analysis of the capabilities of the proposed measures revealed that the window measure of recurrence at a horizontally moving window appears most suitable for the early alcohol detection. In this case, it was found that for applications the window sizes should range from 5×5 to 15×15 counts, and the value of ε should be in the range from 0.01 to 0.15.
It was established that the specified measure of the current RS with a horizontally moving window can be considered as a constructive current measure of recurrence for the reliable early detection of hazardous states in ecosystems.