Submitted:
10 September 2024
Posted:
11 September 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
- We conduct a comparative analysis of the sinusoidal activation function in relation to commonly utilized activation functions. Our investigation focuses on the impact of activation functions on processing periodic signals, revealing that the sinusoidal activation function leverages the periodic nature of the sinusoidal function to optimize retention and extraction of periodic features within ENF data, thereby enhancing its efficacy in processing periodic signals.
- Develop a spectral attention module and integrate it into the UniTS. The spectral attention mechanism is utilized to effectively capture crucial frequency information in the original ENF data within the frequency domain, thereby addressing the model's limited noise resistance to raw data and inadequacies in extracting and learning frequency domain information.
- We propose a standardized dataset configuration and preprocessing approach for ENF classification based on the categorization of ENF regions. Due to the diverse research objectives in previous studies on ENF, variations exist in both the datasets utilized and the processing methods employed. Our proposal aims to establish a unified dataset configuration and preprocessing approach that is better suited for the task of classifying ENF regions.
- In order to validate the efficacy of the enhanced model and investigate the factors influencing its performance, a total of three experiments were devised in this study, with each experiment being further subdivided into multiple groups according to its specific objectives. These objectives encompassed an assessment of the fundamental classification performance of the UniTS model, an ablation experiment on the novel enhancements, and a hyperparameter search for the refined model. The ultimate average classification accuracy achieved by the UniTS-SinSpec model was 97.47%.
2. Related Work
3. Proposed Approaches
3.1. Sinusoidal Activation Function
3.2. Spectrum Attention Mechanism
3.2.1. Frequency Domain Transformation
3.2.2. Define Frequency-Domain Attention Calculation
3.2.3. Frequency-Domain Weighting
3.2.4. Inverse Transform
4. Experimental and Results Analysis
4.1. Data Set and Baseline Settings
4.1.1. Data Set Description and Data Preprocessing
- Time sequence alignment: Arranging all regional data sets chronologically to preserve contextual time-related information of ENF data;
- Format alignment: Standardizing all data to actual measured values rather than differences between measured and reference values;
- Missing value treatment: Replacing all "Nan" values with the median of each region's entire dataset. According to OSF's dataset description, "Nan" values may result from measurement device or calculation errors. Instead of simply replacing missing data with nominal values, which may introduce bias, we opted for replacing all "Nan" values with medians to accurately reflect each dataset's operational characteristics without affecting central trend;
- Time span grouping: Grouping datasets based on time spans; longer time spans provide more contextual time-related information;
- Sequence length division: Significant fluctuation pattern differences exist in ENF between daytime and nighttime due to changes in power demand and supply. For instance, electricity demand is typically higher during the day, especially on workdays, leading to a higher frequency. At night, both electricity demand and frequency decrease [32]. Diurnal variation in wind speed also affects ENF; higher wind speeds occur during the day while lower speeds occur at night [33]. To investigate sequence length impact, we selected 1 minute (60 seconds), 1 hour (3600 seconds), and 1 day (86400 seconds) as dataset sequence lengths—each group divided into sequences of 60, 3600, and 86400 respectively;
- Training set and test set division: Each group is split into training and test sets at an 8:2 ratio.
| Time Span | Region and Label | Sequence Length | Dataset Number |
|---|---|---|---|
| 1 year | Baden-Württemberg, Germany-0 London, United Kingdom-1 Zealand, Denmark-2 |
60 | A1 |
| 3600 | A2 | ||
| 86400 | A3 | ||
| 41 days | Karlsruhe, Germany-3 Oldenburg,Germany-4 Istanbul,Turkey-5 Lisbon,Portugal-6 |
60 | B1 |
| 3600 | B2 | ||
| 86400 | B3 |
4.1.1. Baseline Setting
4.2. Experimental Conditions and Experimental Design
- Experiment 1: assessed the performance of the UniTS baseline model and examined the impact of temporal span and sequence length on model training. The LSTM_tsc, TH_tsc, and UniTS models were trained using preprocessed datasets A1, A2, A3, B1, B2, and B3 to establish a total of six comparative experiments.
- Experiment 2: validated the effectiveness of the improved UniTS-SinSpec model through three ablation experiments. The first group utilized UniTS_SAF, the second group used UniTS_SAM, and the third group employed UniTS-SinSpec. The dataset used in this experiment was consistent with that used in Experiment 1 where optimal training results were achieved by the UniTS baseline model.
- Experiment 3: Optuna was employed to search for hyperparameters for optimizing the performance of the UniTS-SinSpec model. The original parameters are detailed in Table 5. Similar to Experiment 1's dataset usage comparison against benchmark models including UniTS_SAF and UniTS_SAM.
- Experiment 1: assessed the performance of the UniTS baseline model and examined the impact of temporal span and sequence length on model training. The LSTM_tsc, TH_tsc, and UniTS models were trained using preprocessed datasets A1, A2, A3, B1, B2, and B3 to establish a total of six comparative experiments.
- Experiment 2: validated the effectiveness of the improved UniTS-SinSpec model through three ablation experiments. The first group utilized UniTS_SAF, the second group used UniTS_SAM, and the third group employed UniTS-SinSpec. The dataset used in this experiment was consistent with that used in Experiment 1 where optimal training results were achieved by the UniTS baseline model.
- Experiment 3: Optuna was employed to search for hyperparameters for optimizing the performance of the UniTS-SinSpec model. The original parameters are detailed in Table 5. Similar to Experiment 1's dataset usage comparison against benchmark models including UniTS_SAF and UniTS_SAM.
4.3. Experimental Results and Analysis
4.3.1. Experiment 1
4.3.2. Experiment 2
4.3.3. Experiment 3
| Model Category | Model Name | Average Accuracy |
| machine learning | • power line data based grid identification using signal processing (2016)[29] | 88.23% |
| • location identification using power and audio data based on temporal variation of electric network frequency and its harmonics (2018)[30] | 88.67% | |
| • power grid estimation using electric network frequency signals (2019)[31] | 88.23% | |
| • on spectrogram analysis in a multiple classifier fusion framework for power grid classification using electric network frequency (2024)[14] | 96% | |
| deep learning | • LSTM_tsc | 32.54% |
| • TH_tsc | 57.86% | |
| • UniTS | 91.49% | |
| • UniTS_SAF | 94.43% | |
| • UniTS_SAM | 94.11% | |
| • UniTS-SinSpec | 96.24% | |
| • UniTS-SinSpec (HPO via Optuna) | 97.47% |
4.4. Discussion and Conclusion
5. Conclusion and Prospects
- We propose an effective method for ENF region classification that fully leverages frequency domain information and periodic features. The efficacy of the enhancement is validated through ablation experiments, and further improvements in model performance are achieved by optimizing hyperparameters. The final UniTS-SinSpec model attains an average classification accuracy of 97.47%.
- Discussing and proposing data preprocessing methods: We advocate for a standardized dataset for ENF domain classification, encompassing temporal sequence uniformity, data format consistency, handling of missing values, time span regularity, and sequence length consistency.
- We propose the following suggestions for tuning model parameters: It is our belief that the model should not be overly complex for the task of ENF region classification, given that the ENF data is one-dimensional and increased model complexity may lead to decreased performance. Notably, extending the time span of the dataset can enhance training effectiveness, and appropriately adjusting the length of the time series in the dataset can optimize model performance.
Author Contributions
Funding
References
- D. P. Nicolalde Rodriguez, J. A. Apolinario, and L. W. P. Biscainho, "Audio Authenticity: Detecting ENF Discontinuity With High Precision Phase Analysis," IEEE Transactions on Information Forensics and Security, vol. 5, no. 3, pp. 534-543, 2010. [CrossRef]
- National Technical Information Service, "NTIS Homepage," [Online]. Available: https://www.ntis.gov/index.xhtml#.
- M. Kajstura, A. Trawinska, and J. Hebenstreit, "Application of the Electrical Network Frequency (ENF) Criterion: A case of a digital recording," Forensic Science International, vol. 155, no. 2-3, pp. 165-171, 2005. [CrossRef]
- M. Huijbregtse and Z. Geradts, "Using the ENF criterion for determining the time of recording of short digital audio recordings," Forensic Science International, vol. 175, no. 2-3, pp. 148-157, 2008.
- R. Adi Hajj-Ahmad, Z. Geradts, and M. Wu, "Instantaneous Frequency Estimation and Localization for ENF Signals," in Proceedings of IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), pp. 2877-2881, 2012.
- C. Grigoras, "Applications of ENF criterion in forensic audio, video, computer and telecommunication analysis," Forensic Science International, vol. 167, no. 2-3, pp. 136-145, 2006. [CrossRef]
- Yao Liu, Zhong Yuan, Paul N. Markham, Roger Conners, and Yuguang Liu, "Application of Power System Frequency for Digital Audio Authentication," IEEE Transactions on Power Delivery, vol. 27, no. 4, pp. 1820-1828, 2012. [CrossRef]
- R. Garg, A. Hajj-Ahmad, M. Wu, "Geo-Location Estimation from Electrical Network Frequency Signals," in Proceedings of IEEE International Conference on Acoustics, Speech, and Signal Processing (ICASSP), pp. 2862-2866, 2013.
- W. H. Chuang, R. Garg, M. Wu, "Anti-Forensics and Countermeasures of Electrical Network Frequency Analysis," IEEE Transactions on Information Forensics and Security, vol. 8, no. 12, pp. 2073-2088, 2013. [CrossRef]
- S. Chakma and S. A. Fattah, "Location Identification Using Power and Audio Data Based on Temporal Variation of Electric Network Frequency and Its Harmonics," in Proceedings of 2018 IEEE International WIE Conference on Electrical and Computer Engineering (WIECON-ECE), pp. 1-4, 2018. [CrossRef]
- W. Bang and J. W. Yoon, "Power Grid Estimation Using Electric Network Frequency Signals," Security and Communication Networks, vol. 2019, pp. 1-11, 2019. [CrossRef]
- R. Garg, A. Hajj-Ahmad, M. Wu, "Feasibility Study on Intra-Grid Location Estimation Using Power ENF Signals," arXiv preprint arXiv:2105.00668, 2021. [CrossRef]
- I. Khairy, "ENF based classification and extraction," IEEE Signal Processing Cup 2016, [Online]. Available: https://github.com/ibrahimkhairy/ENF_based_classification_and_extraction. [Accessed: Jun. 27, 2024].
- G. Tzolopoulos, C. Korgialas, and C. Kotropoulos, "On Spectrogram Analysis in a Multiple Classifier Fusion Framework for Power Grid Classification Using Electric Network Frequency," ArXiv abs/2403.18402, 2024.
- Shuang Gao, Tarik Koker, Oliver Queen, Thomas Hartvigsen, Theodoros Tsiligkaridis, and Marinka Zitnik, "UNITS: A Unified Multi-Task Time Series Model," 2024.
- G. U. Yule, "On a Method of Investigating Periodicities in Distributed Series, with special reference to Wolfer's Sunspot Numbers," Phil. Trans. R. Soc. London A, vol. 226, pp. 267-298, 1927. [CrossRef]
- Y. Kim, "Time Series Analysis for Macroeconomics and Finance," 2024.
- R. Jumar, H. Maaß, B. Schäfer, L. R. Gorjão, and V. Hagenmeyer, "Database of Power Grid Frequency Measurements," arXiv preprint arXiv:2006.01771, 2020.
- T. Kruse, L. Vanfretti, and F. Silva, "Data-Driven Trajectory Prediction of Grid Power Frequency Based on Neural Models," Electronics, vol. 10, no. 2, p. 151, 2021. [CrossRef]
- D. Hendrycks and K. Gimpel, "Gaussian Error Linear Units (GELUs)," arXiv preprint arXiv:1606.08415, 2016. [CrossRef]
- V. Nair and G. E. Hinton, "Rectified Linear Units Improve Restricted Boltzmann Machines," in Proceedings of the 27th International Conference on Machine Learning (ICML-10), pp. 807-814, 2010.
- G. Parascandolo and T. Virtanen, "Taming the Waves: Sine as Activation Function in Deep Neural Networks," 2016.
- M. S. Gashler and S. C. Ashmore, "Training Deep Fourier Neural Networks to Fit Time-Series Data," arXiv preprint arXiv:1405.2262, 2014. [CrossRef]
- Vincent Sitzmann, Julien N. P. Martel, Alexander W. Bergman, David B. Lindell, and Gordon Wetzstein, "Implicit Neural Representations with Periodic Activation Functions (SIREN)," Cross Validated, ar5iv, 2020.
- S. Zhou and Y. Pan, "Spectrum Attention Mechanism for Time Series Classification," in Proceedings of 2021 Chinese Control and Decision Conference (CCDC), pp. 1-6, 2021. [CrossRef]
- "Power Grid Frequency," [Online]. Available: https://power-grid-frequency.org/. [Accessed: June 27, 2024].
- Hugging Face, "Time Series Transformer Classification," [Online]. Available: https://huggingface.co/keras-io/timeseries_transformer_classification/tree/main. [Accessed: June 27, 2024].
- R. Romijnders, "LSTM Time Series Classification," [Online]. Available: https://github.com/RobRomijnders/LSTM_tsc. [Accessed: June 27, 2024].
- S. Chakma, D. Chowdhury, M. Sarkar, "Power line data based grid identification using signal processing," in Proceedings of 2016 IEEE International WIE Conference on Electrical and Computer Engineering (WIECON-ECE), pp. 1-4, 2016. [CrossRef]
- S. Chakma and S. A. Fattah, "Location Identification Using Power and Audio Data Based on Temporal Variation of Electric Network Frequency and Its Harmonics," in Proceedings of 2018 IEEE International WIE Conference on Electrical and Computer Engineering (WIECON-ECE), pp. 1-4, 2018. [CrossRef]
- W. Bang and J. W. Yoon, "Power Grid Estimation Using Electric Network Frequency Signals," Security and Communication Networks, vol. 2019, pp. 1-11, 2019. [CrossRef]
- B. Schäfer, D. Witthaut, M. Timme, and V. Latora, "Non-Gaussian power grid frequency fluctuations characterized by Lévy-stable laws and superstatistics," Nature Energy, vol. 2, p. 17058, 2017. [CrossRef]
- R. Goss, F. Mulder, and B. Howard, "Implications of diurnal and seasonal variations in renewable energy generation for large scale energy storage," Journal of Renewable and Sustainable Energy, vol. 12, no. 4, p. 045501, 2020.
- P. Tumino, "Frequency Control in a Power System," EE Power, Oct. 15, 2020. [Online]. Available: https://eepower.com/technical-articles/frequency-control-in-a-power-system/. [Accessed: Jul. 25, 2024].




| Region | Voltage | Frequency |
| Brazil | 110/220V | 60 Hz |
| China | 220V | 50 Hz |
| Germany | 230V | 50 Hz |
| Japan | 100V | 50/60 Hz |
| USA | 120V | 60 Hz |
| Myanmar | 230V | 50 Hz |
| Time Span | Location of Measurements | Synchronous Area | Time Range of Data Set |
Selected Range | Frequency | Resolution | Number of Days | |
|---|---|---|---|---|---|---|---|---|
| 1 year | Baden-Württemberg, Germany | TransnetBW | 201107-202003 | 20180101-20191231 | 50 Hz | 1 sec | 360 | |
| London, United Kingdom | National Grid | 201401-201912 | 20180101-20191231 | 50 Hz | 1 sec | 360 | ||
| Zealand, Denmark | Nordic Grid | 20180101-20181231 | 20180101-20181231 | 50 Hz | 1 sec | 360 | ||
| 41 days | Karlsruhe, Germany | Continental Europe | 20190709 - 20190818 | 20190709 - 20190818 | 50 Hz | 1 sec | 41 | |
| Oldenburg, Germany | Continental Europe | 20190710 - 20190807 | 20190710 - 20190807 | 50 Hz | 1 sec | 41 | ||
| Istanbul, Turkey | Continental Europe | 20190709 –20190818 | 20190709 - 20190818 | 50 Hz | 1 sec | 41 | ||
| Lisbon, Portugal | Continental Europe | 20190709 - 20190816 | 20190709 - 20190816 | 50 Hz | 1 sec | 41 |
| Model Category | Model |
|---|---|
| machine learning | • power line data based grid identification using signal processing (2016)[29] |
| • location identification using power and audio data based on temporal variation of electric network frequency and its harmonics (2018)[30] | |
| • power grid estimation using electric network frequency signals (2019)[31] | |
| • on spectrogram analysis in a multiple classifier fusion framework for power grid classification using electric network frequency (2024)[14] | |
| deep learning | • LSTM_TSC(2016)[28] 1 • TH_TSC (2018)[27] 2 • UniTS(2024)[15] • UniTS_SAF 3 • UniTS_SAM 4 • UniTS-SinSpec |
| Model | Batch Size | Initial Learning Rate | Model Layers | Hidden Layers | Patch Length &Stride |
| UniTS | 32 | 0.0001 | 512 | 2 | 16 |
| UniTS_SAF | 32 | 0.0001 | 512 | 2 | 16 |
| UniTS_SAM | 32 | 0.0001 | 512 | 2 | 16 |
| UniTS-SinSpec | 32 | 0.0001 | 512 | 2 | 16 |
| TH_tsc | 32 | 0.0001 | 12 | 12 | 25 |
| LSTM_tsc | 32 | 0.0001 | 2 | 2 | none |
| Data Set Number | Number of Valid Samples | Sequence Length | UniTS | TH_tsc | LSTM_tsc |
| A1 | 1575357 | 60 | 88.95% | 57.86% | 26.6% |
| A2 | 188928 | 3600 | 91.49% | 58.29% | 32.54% |
| A3 | 1046 | 86400 | none | none | 6.25% |
| B1 | 188921 | 60 | 77.03% | 48.93% | 24.02% |
| B2 | 22656 | 3600 | 79.61% | 50.21% | 29.37% |
| B3 | 124 | 86400 | none | none | 5.64% |
| Index | UniTS | UniTS_SAF | UniTS_SAM | UniTS-SinSpec |
| Time-consuming | 33.28s | 44.01s | 45.674s | 46.549s |
| Average Verification Accuracy |
91.49% | 94.43% | 94.11% | 96.24% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).