An IEEE21451-001 Compliant Smart Sensor for Early Earthquake Detection

This article introduces a novel smart sensor that employs an advanced algorithm for earthquake early warning (EEW). The sensor utilizes a smart sampling technique to extract significant signal information, simplifying the process of inferring knowledge. The main objective is to assess the potential destructiveness of an incoming earthquake by analyzing the initial moments of the pressure wave and to generate an alert for prompt action, if necessary. This study includes the development and presentation of the proposed method, as well as performance evaluations using real seismic data obtained from freely accessible databases. These evaluations confirm the effectiveness of the proposed method in accurately estimating earthquake magnitudes. Furthermore, this article includes a comparison with a widely used EEW algorithm. The real-time functionality and interoperability of devices are crucial considerations in earthquake detection applications. The suitability and compatibility of the proposed method with the IEEE1451 family of standards are demonstrated and emphasized in this article.


I. INTRODUCTION
W ITH the advent of new technologies like smart trans- ducers, there has been a growing interest among researchers in leveraging these solutions to protect humans, animals, and infrastructure.One notable application of this is the emergence of Smart Buildings in Smart Cities, where buildings equipped with sensors and actuators can interact with their occupants.These smart buildings offer various applications, including the automated control of utilities like gas and water.Exploiting the advantages of Smart Buildings, one crucial application is their interaction with earthquake prediction to mitigate potential consequences.Studies have shown that the most significant cause of death during an earthquake is not the seismic event itself, but rather the resulting effects such as water or gas leaks leading to flooding or explosions [1], [2].Therefore, it is crucial to explore methods and solutions that employ advanced measurement systems capable of predicting the potentially destructive phase based on early information, and that can interact with advanced systems in Smart Buildings to minimize the impact of earthquakes.
Earthquakes, as complex phenomena, can have catastrophic effects depending on their magnitude and proximity to populated areas.While we cannot change or control the nature of earthquakes, scientific knowledge, and modern technologies have enabled us to study their properties and characteristics.An earthquake is typically defined as the shaking of the Earth's surface, resulting from various causes such as tectonic plate movements or volcanic activities.These events generate seismic waves, specifically pressure waves (P-waves) and shear waves (S-waves).P-waves, being faster than S-waves, are commonly utilized in earthquake early warning (EEW) techniques due to their ability to provide advance notice, as S-waves carry the destructive aspects of an earthquake [3].
Thanks to advanced instruments and data acquisition systems, utilizing smart sensors and networks, numerous studies and methodologies have been proposed and developed to better understand the causes, origins, propagation, and amplitude of earthquakes [4], [5], [6], [7], [8], [9], [10].These approaches rely on advanced signal processing algorithms and have contributed to the development of EEW systems.The literature offers various contributions worldwide: Allen et al. [4] provided a comprehensive overview of EEW principles and systems, showcasing different techniques and approaches from around the world.Satriano et al. [5] summarized concepts for realtime information-based EEW systems, comparing on-site and regional approaches for estimating parameters like location and magnitude.Additionally, Yamamoto et al. [6] primarily focused on intensity estimation in EEW systems.
Considering the need for rapid earthquake detection, an EEW algorithm should incorporate techniques that offer both fast response times and low computational requirements, which with the techniques proposed in the literature nowadays [4], [5], [6], are not considered to be run in embedded system but on dedicated workstation In particular, processing all the raw data from sensors can be resource-intensive, especially when dealing with typical smart sensors.To obtain meaningful and actionable information directly from the acquired signals on the site, an alternative algorithm will be proposed, departing from traditional EEW approaches.
If an EEW system is designed to interact with devices from different manufacturers and instruct them to react to potentially dangerous earthquakes, adopting the IEEE1451 standard for smart transducer interfaces is highly beneficial.This standard enhances the effectiveness of the proposed system and supports the integration and connectivity of transducers.
This article introduces a novel approach for seismic signal analysis, utilizing a segmentation and elaboration algorithm [7].This algorithm is specifically designed to run in real time with low computational requirements while effectively detecting relevant events for EEW.To assess the efficiency of the proposed algorithm, a benchmark analysis is conducted, comparing it to the short-term average/longterm average (STA/LTA) algorithm used in the GISMO toolbox [8].
This article is organized as follows: after a brief review on the existing EEW techniques today employed, Section II analyzes in detail the operation of the well-know STA/LTA EEW algorithm.Section III introduces the proposed algorithm, which is based on signal segmentation, and evaluates its performance against the STA/LTA algorithm.In Section IV, the integration of the algorithm into a smart sensor compatible with the IEEE1451 standard is discussed while Section V evaluates the real-time operation of the algorithm by measuring its execution time.Potential future directions and further research are reported in Section VI.

II. EARTHQUAKE EARLY DETECTION A. REVIEW IN EARLY DETECTION
Seismic signal analysis has been extensively researched for estimating event magnitude, source characteristics, and arrival times of earthquake waves, primarily using data from seismographs.Withers et al. [9] conducted a comprehensive comparison of digital algorithms for automatic phase arrival detection, while Pikoulis and Psarakis [10] proposed a twostep procedure for automatic detection and compared it with the standard STA/LTA procedure.Lior et al. [11] introduced two attenuation laws for P-wave displacement and velocity.
Numerous studies have focused on noise reduction in P-wave analysis.Frequency-domain approaches using wavelet transforms have been employed for noise reduction [12], [13].Hoshiba and Iwakiri [14] proposed a method that utilizes amplitude and τ c (the waveform's period parameter) for magnitude estimation.Saad et al. [15], [16] conducted research on automatic arrival time detection.
Another critical area of research is on-site distributed techniques, which improve earthquake localization [17], [18], [19].As highlighted by Hung et al. [20], energy efficiency and timing are important challenges in wireless sensor network (WSN) applications for earthquake detection, and improvements in these areas are necessary.
Two different configurations of systems for early earthquake detection exist: 1) on-site warning systems based on a single measuring station and 2) regional warning systems that utilize information from a sensor network.Böse et al. [18] proposed a solution based on a decision module incorporating three parallel methodologies: 1) a detection algorithm; 2) a virtual seismologist (an automated system mimicking human seismologists); and 3) ElarmS (a network-based early warning algorithm that collectively characterizes events using frequency and amplitude information from multiple stations).
However, the majority of existing solutions lack standardization, hindering effective cooperation among networked devices.In contrast, the solution presented in this article, which adopts the IEEE1451 standard, can be easily integrated into a network, enhancing the overall efficiency of the methodology.The proposed methodology in this work is compatible with the adopted standard, allowing for seamless integration into a network of devices for event detection.

B. BENCHMARKING EEW WITH STA/LTA
In seismic event detection, it is crucial to generate a trigger signal to indicate the occurrence of an event, allowing other devices on the network to perform tasks such as data recording, alarm generation, or executing specific actions.The simplest approach for trigger generation is based on reaching a predefined amplitude threshold or using the root-meansquare (RMS) value within a small observation window.However, this simplistic approach has limitations.A high trigger level may lack sensitivity while reducing it can result in a high number of false triggers.More advanced methods employ sophisticated pattern recognition, adaptive techniques, and artificial intelligence-based approaches.
One commonly used algorithm for trigger generation is the STA/LTA algorithm.It calculates the average amplitude of the seismic signal in two consecutive windows: the shorttime window (STA) is sensitive to seismic events, while the long-time window (LTA) provides information about the temporal amplitude of seismic noise.When the ratio between the two values exceeds a predefined threshold, a trigger is generated.
The GISMO toolbox is an open-source MATLAB toolbox designed for seismic data analysis, and it includes the implementation of the STA/LTA algorithm as a function [21].The STA/LTA function can be customized by setting parameters such as the duration of the STA and LTA windows, as well as the trigger threshold levels.In this study, the STA/LTA algorithm implemented in GISMO is selected as a reference to evaluate the performance of the proposed algorithm.The time taken by the STA/LTA algorithm to detect a specific seismic event is used as a benchmark for comparing the performance of the proposed algorithm when applied to the same event.

III. SIGNAL SEGMENTATION AND EVENT DETECTION
When applying the real-time sampling algorithm (RTSAL), we obtain Mark Class Time (MCT) vectors as described in Appendix A. If we reconstruct the signal from the essential samples using linear interpolation, a new set of MCT vectors, M'C'T', is generated.However, this new set loses some of the high-frequency content.By iterating this process, we achieve a low-pass filtering effect.This concept of filtering is novel, where the signal reconstruction and segmentation are repeatedly performed until the unwanted frequency content is eliminated.The unwanted frequency is the electronic signals that have frequency outside of the normal bandwidth of the earthquakes [22].
The key to estimating the frequency content of a signal lies in the shortest distance between consecutive maxima and minima, which are natural outputs from the RTSAL algorithm.The MCT process can be iterated to achieve the desired filtering, known as MCT filtering.One advantage of this type of filtering is that there is no delay in the output data compared to the input data.The bandwidth of the filter is controlled by the number of iterations and the interpolation error.Each iteration allows for decisions to be made regarding the effectiveness of the filter, such as detecting if the noise has been eliminated.Fig. 1 illustrates the impact of iterations on the filter's bandwidth.A Sinc signal with a frequency of 15 Hz, sampled at 100 Hz, was iterated with a low interpolation error of 1.0E-04.Thus, the behavior of the filter can be controlled by adjusting both the number of iterations and the interpolation error.
Filtering plays a crucial role in the analysis of seismic waves.According to the IEEE 21451-001-2017 standard [23], one of the key advantages of MCT filtering is its ability to provide high-quality results without introducing transients or phase shifts.However, the most significant aspect of MCT filtering is its capability to generate smooth signals, which allows for the extraction of behavior patterns that can be used to infer the associated phenomenon.This is particularly important in the context of EEW systems, where real-time decisions about the magnitude of detected earthquakes need to be made within the first few seconds.
Seismic intensity is typically obtained from ground acceleration transducers operating within a specific frequency band.In this article, all the data presented and processed were obtained from the Incorporated Research Institutions for Seismology (IRIS) Wilber3 interactive database, which is accessible at [24].
To assess the performance of the MCT filter, the procedure was applied to real seismic data using different parameters.By conducting different tests reported in the next section, the effectiveness and suitability of a novel parameter based on the MCT filtering algorithm for seismic signal analysis will be evaluated.
For Fig. 2(a) and (b), the "Counts" for the y-axis is the raw number read off the physical instrument, i.e., the voltage read from a sensor.Like any physical instrument, a seismometer cannot measure every motion with perfect accuracy.In Fig. 2(a), a target seismic signal of an earthquake with a magnitude of 6.9, which occurred on 24 April 2017, near the coast of central Chile, recorded at the Las Campanas Astronomical Observatory in Chile, is displayed.The signal was resampled at a rate of 100 Hz, while the original sampling frequency was 40 Hz.
To analyze the signal, the MCT filter was applied with different parameters.Fig. 2(b) illustrates the results of the filter for two specific cases on a 3-s time window highlighted by the red square on Fig. 2(a): No. of iteration=1 iteration and No. of iteration = 5000 iterations.By examining these results, we can observe the impact of the number of iterations on the filtered signal highlighting a low-pass filtering behavior with the increasing of the number of MCT iterations (see the Appendix for more details about the MCT algorithm).

A. EARTHQUAKE MAGNITUDE ESTIMATION FROM P-WAVE
In order to estimate the magnitude of an earthquake using only the first 3 s of data from a single station, it is important to capture the essential patterns present in large-scale seismic events.Given the complex and unique nature of earthquakes, obtaining an accurate estimation based on a small portion of the event is challenging.However, early warning systems require a quick determination of whether an earthquake is destructive or not.
The MCT algorithm offers the advantage of filtering the seismic signal without introducing phase shifts or transients.Leveraging this capability, the quotient of energy obtained at different parameters of the MCT filter can serve as a reliable estimator of the earthquake magnitude.Specifically, the energy at low frequencies compared to the energy at medium frequencies, using the first 3 s of the P-wave arrival has been demonstrated to be a good estimator.This comparison leads to the definition of α MCT , which represents the relationship between the two energy components  Iter D is the number of MCT iterations for the denominator, which represents the energy at low frequencies; From the previous definition of α MCT , to obtain the frequency ranges desired with the MCT filtering procedure, the number of iterations of the denominator Iter N (representing the low-frequency contribution) must be greater than Iter D (representing the medium-frequency contribution) resulting in an α MCT ranging from zero to one.The variance was used as an estimator for energy in this article due to its ease of computation, but other estimators can also be used.No signal preprocessing is required to calculate α MCT .
To determine the optimal number of iterations for sensitivity in discriminating between nondestructive and destructive earthquakes, α MCT was computed for different earthquakes while varying the number of iterations.Fig. 3 illustrates the α MCT values as a function of the numerator iteration number, with fixed values for the interpolation error and denominator iterations.
For major events, α MCT tends to approach one, even with a large number of iterations.Depending on the assigned values for Iter N and Err, sensitivity can be achieved for different earthquake magnitudes.By using larger Iter N values, α MCT tends to approach zero for smaller earthquakes.The next section provides detailed information on the procedure and the range of values used for experimental results.

B. EEW PROCEDURE
The following algorithm is applied directly to the accelerometer signal.Since α MCT has low sensitivity to amplitude variations, excellent quality for an EEW based on a single station, a trigger signal is necessary to detect the arrival of a P-wave.For this purpose, the energy calculated in the previous 10-s FIFO window is used to trigger the α MCT calculation.The latter calculation is then provided on a sliding window of 3 s, which has been considered for a real operation with an overlap of 50%.To avoid artificial discontinuities, a Blackman window is used (4).
The use of a Blackman window helps mitigate any artifacts introduced by the windowing process and ensures a smooth transition between adjacent windows.
It is worth noting that this algorithm focuses on event detection based on energy variations in the seismic signal and may need to be supplemented with additional techniques for accurate earthquake magnitude estimation or other seismic analysis tasks where M is (N/2), since an even window is adopted.Fig. 4 shows α MCT for 53 earthquakes of a different magnitude from all over the world.Detailed information about each event is provided in Table 4 reported in Appendix B.
From the results plotted in Fig. 4 is possible to observe that for low-magnitude events (below 5.5), the value of α MCT is very low (near zero).However, as the magnitude raises, also the computed value for α MCT increases.The red line delimits an area above which the expected α MCT is expected.It is clear that the α MCT also increases with the magnitude.
The STA/LTA algorithm was used with the same seismic event data.The time taken by this algorithm is listed in Appendix B (Table 4) as t_stalta [s].It should be observed that for the events marked as missed detection (MD), the algorithm fails the detection.In some situations, it consumes an extended period.It is possible to observe that the STA/LTA algorithm was parameterized to equal the MCT algorithm's sensitivity, using the following values: thresh = 2.5; ltw = 10 s; and stw = 3 s, where thresh is threshold, ltw is the long time window, and stw is the short time window.Both algorithms were parameterized only to detect events with a magnitude above 5.5, as it can be observed in Appendix B (Table 4).
For each event, the time taken by the algorithms under comparison is plotted in Fig. 5. Detection times over 16 s are not reported.From the results, it is possible to conclude that the MCT algorithm offers detection times far below the time taken by the STA/LTA.

IV. SMART SENSOR IEEE1451 IMPLEMENTATION
An EEW device should have the capability to connect and work together with other devices within the protective structure, or at the very least, be accessible through a network.The requirement mentioned above can be met by the IEEE1451 family of standards.This set of standards is structured as depicted in Fig. 6, where physical and embedded sensors and actuators are combined into a transducer interface module (TIM).The TIMs are interconnected through the user's network for seamless connectivity.The network-capable application processor (NCAP) enables network functionality by connecting TIMs to the network.Within a TIM, transducers are arranged in transducer channels according to the standard.Each channel is described by a transducer electronic data sheet (TEDS).The TIM must include at least four mandatory TEDS: META-TEDS, which facilitates communication timing between the NCAP and TIMs and provides information about the included transducer channels and their organization; a transducer channel TEDS for each individual transducer channel, offering specific characterization details; a User's Transducer Name TEDS that stores the identification of the transducer; and finally, the PHY TEDS, which defines the physical communication media used to establish the connection between the TIM and the NCAP.

A. EEW ORGANIZATION AND STRUCTURE
To implement EEW in accordance with IEEE1451, an internal structure is necessary, as depicted in Fig. 7.This organizational framework enhances the effectiveness of the earthquake warning system by ensuring compatibility with the network.
The analog input sensor transducer channel performs the crucial task of converting the signal generated by the accelerometer transducer from the analog to the digital domain.Once triggered by a command from the NCAP, this transducer channel initiates the acquisition of a dataset.The acquired samples are stored in an available buffer, as specified in the transducer channel TEDS.When the dataset acquisition is completed, the process continues with the next dataset in the next available buffer.This sequence repeats, alternating between buffers.However, if the first dataset has not yet been transferred to the NCAP at this point, it will be lost.In the streaming mode of transmission, the NCAP eliminates the need to send a data read command to the analog input transducer channel since the data is automatically transmitted to the NCAP upon the completion of a dataset acquisition.
At the end of each dataset acquisition, the Data Available/Data Processed bit in the analog transducer channel status register is set.An embedded digital event sensor constantly monitors the status of this bit.When it changes from clear to set, the embedded digital event sensor generates a trigger signal and sends it to the Event Sensor Control Group.This group analyzes the last acquired dataset to determine the occurrence of an earthquake.
When a trigger is sent to the event sensor control, it triggers all the transducer channels within the group.The embedded actuator channel within the group calculates the α MCT value using the samples stored in the latest dataset acquired by the analog transducer channel.By adjusting the number of samples in the dataset, the seismic observation window can be increased or decreased.
The analog event sensor differs from a conventional sensor in that it detects when a physical quantity surpasses a predetermined threshold, triggering an event detected by a change in the associated state, rather than providing the magnitude of the physical quantity itself.On the occurrence of an event, a timestamp can also be added.Upper and lower limits can be defined, with a hysteresis range separating them.This hysteresis range can be zero, causing the two limits to overlap.A seismic event is generated when the α MCT value exceeds the upper limit in the upward direction, indicating the detection of a P-wave and signaling a potentially hazardous earthquake.
During device initialization in the absence of an event, the magnitude of the α MCT value observed by the event sensor will be below the upper limit, and the sensor output is initialized to zero.
The IEEE1451 implementation of the analog event sensor requires four transducer channels as specified by the IEEE1451 standard.These channels are grouped into an Event Control Group, consisting of one analog embedded actuator from the IEEE1451-001 layer, which calculates the α MTC value using the last acquired dataset from the analog input sensor, and two embedded analog actuators that set the upper limit and hysteresis values for the analog event sensor.The analog event sensor transducer channel operates in a continuous sampling mode.After receiving an initial trigger command, a new α MCT value becomes available periodically, based on the dataset size, sampling period of the analog transducer channel, and the information provided in the associated TEDS.
Although the NCAP should only be notified when the α MCT value crosses the defined upper limit, the α MCT level value can be obtained using the transducer channels dataset segment read command.The analog event sensor monitors the α MCT buffer and detects changes in state.The buffer is updated updated whenever the α MTC value crosses the upper or lower thresholds, generating an event.By streaming communication mode for data transmission, data is transmitted as soon as a sample is placed in the buffer, without waiting for the NCAP to issue a read transducer channel dataset segment command.
The primary component of the EEW system is the early earthquake warning function, implemented by the analog embedded actuator.This function requires three input parameters in addition to the seismic wave samples.Three embedded actuators are responsible for setting the number of interpolations (Iter N and Iter D ) and the interpolation error (ERR).

V. REAL-TIME IMPLEMENTATION
The EEW system needs to operate in real-time, requiring the computation time of the α MCT shorter than the observation time window.A first indication about the computational burden required by the MCT filtering on a personal computer (PC) has been the estimation of the floating-point operations required for a number of iterations equal to 50.In particular, using the application developed by Hang [26] on MATLAB, the number of operations required has a result equal to 18 239.
To validate the practical implementation of the suggested earthquake detection algorithm on a microcontroller with typical features found in low-cost signal processing contexts, it was executed on an STM32 microcontroller.This microcontroller is based on the general-purpose architecture ARM Cortex-M4 core, equipped with DSP and FPU capabilities.The main specifications of the utilized microcontroller are provided in Table 2.
To assess the performance of the proposed architecture in a real-world scenario, a testbed (refer to Fig. 8) consisting of the following equipment has been employed.

1) Tektronix AFG3252G Arbitrary Function Generator:
This device features 2 channels, a bandwidth of 240 MHz, a sampling rate of 2 MSa/s, a 128 k points arbitrary waveform memory, and a vertical resolution of 14 bits.The arbitrary function generator has been programmed to produce a signal simulating the data that could be obtained during an earthquake, specifically representing the time evolution of a magnitude 6.9 earthquake that occurred on 24 April 2017, near the central coast of Chile, as recorded at Las Campanas Observatory (LCO, Chile).
To capture the necessary samples for the execution of the proposed algorithm, the microcontroller's ADC has been configured to operate at a sampling frequency of 100 Hz.Following the EEW procedure outlined in Section III, the α MCT values have been computed, considering a 3-s observation window and applying all the signal processing operations described earlier requiring a buffer equal to 1000 (2 kB) and 300 (0.6 kB) samples, respectively, for the trigger and α MCT calculation.Table 3 presents the execution times for different iterations of the MCT algorithm.These results demonstrate the practical feasibility of an onboard application with real-time processing capabilities, which is compatible with the 3-s analysis window.

VI. CONCLUSION
The segmentation method proposed in the article utilizes the α MCT parameter, which is obtained by comparing the energy of the earthquake signal with different numbers of MCT iterations.The relationship between α MCT and earthquake magnitude has been demonstrated, showing that α MCT increases with increasing magnitude.This parameter can be used to assess the level of danger associated with an impending earthquake.
The computational requirements of an algorithm are crucial, especially for real-time applications where timely actions need to be taken to mitigate the impact of an earthquake.The MCT algorithm offers a faster detection time compared to the STA/LTA algorithm, as observed during the benchmark evaluation.This implies that the MCT algorithm can provide a prompt response within the required temporal window.
The MCT algorithm is aligned with the IEEE 21451-001 standard, which facilitates the integration of earthquake early detection sensors with other transducers that comply with the same standard.This compatibility allows for the seamless integration of different sensors and the extraction of additional information using the standardized framework.
By adopting the IEEE 21451-001 standard and applying the segmentation algorithm, it becomes possible to extract and utilize a consistent set of information from earthquake sensors, promoting interoperability and compatibility among different devices in the early detection system.

APPENDIX A MCT VECTORS
The MCT vectors, which are the output of the RTSAL, are described in the IEEE 21451-001-2017 standard.This standard provides a framework for representing sensor signals in a more informative way by utilizing the MCT vectors.The MCT sampling approach, as outlined in the standard, replaces the traditional sample-based representation with a sequence of known segments, reducing signal redundancy and facilitating real-time knowledge extraction.By adopting the IEEE 21451-001-2017 standard, the sensor signal is transformed into a series of MCT vectors, which capture the essential information of the signal.These MCT vectors can be easily integrated into smart transducers and are compatible with the IEEE 1451 family of standards.The use of this standard ensures interoperability among smart transducers and supports real-time information exchange.The primary objective of the IEEE 21451-001-2017 standard is to enable the extraction of knowledge directly from the sensor signal sampling process.Instead of relying solely on individual samples, the standard represents the sensor signal as a sequence of known segments.This representation reduces redundancy and provides a more meaningful structure for real-time inference of information and knowledge.In summary, the MCT sampling approach, described in the IEEE 21451-001-2017 standard, offers a powerful tool for representing sensor signals and extracting knowledge in real time.By utilizing the MCT vectors, smart transducers can achieve interoperability and facilitate efficient information exchange within a standardized framework.The traditional approach of uniform sampling, which provides signal values at specific instances, does not offer a straightforward platform for information and knowledge extraction.It represents a memoryless system where only the sample values at specific time points are considered.However, the information present in a digital signal can be better understood by examining the relationship between these samples.To address this limitation and enable real-time knowledge extraction, the concept of representing a sensor signal as a concatenation of known line  segments is introduced.Instead of focusing solely on numerical samples, the signal is characterized by a sequence of segments.These segments, which can be dilated, contracted, and adapted to fit the real signal within a certain error, provide a more meaningful representation.Fig. 9 illustrates this concept, where the signal trajectory is approximated by a sequence of segments.To simplify the representation and facilitate real-time implementation in transducers, a finite set of subspaces, represented by simple trajectories, is utilized.Eight segment classes (A, B, C, and H) are considered VOLUME 2, 2023 9500311 Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
to approximate the real signal.Classes A, B, and C exist due to implementation constraints related to segment length, while class H represents segments where oversampling conditions or interpolation errors are not met.Class H segments should be avoided as they do not contribute to inferring signal behavior.An algorithm is required to compare the real signal with simplified trajectories and determine the best segment for a given signal segment.The main idea is to compare the real signal trajectory with a linear one and assess how it deviates from linearity.This assessment helps determine when the simplified segment should end based on an interpolation error.By employing oversampling and comparing the real signal against simplified trajectories at a fast rate, the algorithm outputs the values of the left and right samples of the segment, the time difference between these samples, and the segment class.These three vectors, namely, Mark, Class, and Time (MCT), characterize the digital sensor signal.It is important to note that although MCT sampling requires oversampling, unnecessary samples are discarded by the interpolation algorithm.Since MCT operates at the point of acquisition, these unnecessary samples are never stored, resulting in a nonuniform sampling approach.The segment classes provide valuable information about the relationship between the samples.Fig. 10 demonstrates the segmentation results applied to a seismic signal sampled at 100 Hz, showcasing how the signal is represented by a sequence of segments.This nonuniform sampling approach, using MCT vectors, enables a more informative representation of the signal and facilitates the extraction of knowledge in real time.

APPENDIX B
See Table 4.

FIGURE 1 .
FIGURE 1. Spectrum of a Sinc signal of 15-Hz bandwidth iterated from 1 to 5000 iterations through the MCT process, using an interpolation error of 1E-04.The arrow direction shows the increasing iteration number [25].

FIGURE 7 .
FIGURE 7. Early earthquake warning sensor organization and operation.

2 )
Discovery STM32F4 Development Board: This board incorporates an STM32F407VGT6 microcontroller.It offers high-speed embedded memories, including flash memory of up to 1 MB, SRAM of up to 192 kB, and backup SRAM of up to 4 kB.Furthermore, it includes several 12-bit ADCs that are essential for the presented application.The microcontroller can operate at a maximum core clock frequency of 168 MHz.3) PC: The PC is equipped with the Keil μVision software environment, which is used for programming and evaluating the performance of the proposed algorithm for earthquake detection.

TABLE 3 .
Execution times with experimental tests (a frequency clock of 168 MHz is involved) and memory required for the implementation of the earthquake for both (A) STA/LTA and (B) AMCT.

FIGURE 9 .FIGURE 10 .
FIGURE 9.If the signal parts from the linear trajectory, four simplified segments are generated: D, E, F, and G. Segments A, B, and C exist due to length constraint and segment H when the signal is not oversampled.

,
Err, Iter N N is the number of MCT iterations for the numerator, which represents the energy at low frequencies;