# Bayesian Estimation of Oscillator Parameters: Toward Anomaly Detection and Cyber-Physical System Security

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Problem Formulation

#### 2.1. SHO Actuator

#### 2.2. A Simplified CPS Model

#### 2.3. Normal Versus Anomalous System Operation and Anomaly Detection

#### 2.4. Bayesian Model

## 3. Proof-of-Principle Example

#### 3.1. Experimental Test CPS

#### 3.2. Bayesian Inference Results

#### 3.3. Anomaly Detection

## 4. Discussion

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Passian, A.; Imam, N. Nanosystems, edge computing, and the next generation computing systems. Sensors
**2019**, 19, 4048. [Google Scholar] [CrossRef] [PubMed] - Huang, Q.; Amin, W.; Umer, K.; Gooi, H.B.; Eddy, F.Y.S.; Afzal, M.; Shahzadi, M.; Khan, A.A.; Ahmad, S.A. A review of transactive energy systems: Concept and implementation. Energy Rep.
**2021**, 7, 7804–7824. [Google Scholar] [CrossRef] - Zhang, Y.; Krishnan, V.V.G.; Pi, J.; Kaur, K.; Srivastava, A.; Hahn, A.; Suresh, S. Cyber Physical Security Analytics for Transactive Energy Systems. IEEE Trans. Smart Grid
**2020**, 11, 931–941. [Google Scholar] [CrossRef] - Tavolato, P.; Scholnast, H.; Tavolato-Wotzl, C. Analytical modelling of cyber-physical systems: Applying kinetic gas theory to anomaly detection in networks. J. Comput. Virol. Hacking Tech.
**2020**, 16, 93–101. [Google Scholar] [CrossRef] - Saez, M.A.; Maturana, F.P.; Barton, K.; Tilbury, D.M. Context-Sensitive Modeling and Analysis of Cyber-Physical Manufacturing Systems for Anomaly Detection and Diagnosis. IEEE Trans. Autom. Sci. Eng.
**2020**, 17, 29–40. [Google Scholar] [CrossRef] - National Academies of Sciences, Engineering, and Medicine. Biodefense in the Age of Synthetic Biology; National Academies Press: Washington, DC, USA, 2018. [Google Scholar]
- Faezi, S.; Chhetri, S.R.; Malawade, A.V.; Chaput, J.C.; Grover, W.; Brisk, P.; Al Faruque, M.A. Oligo-Snoop: A Non-Invasive Side Channel Attack Against DNA Synthesis Machines. In Proceedings of the Network and Distributed Systems Security Symposium (NDSS 2019), San Diego, CA, USA, 24–27 February 2019; p. 5B.1. [Google Scholar]
- Ney, P.; Koscher, K.; Organick, L.; Ceze, L.; Kohno, T. Computer Security, Privacy, and DNA Sequencing: Compromising Computers with Synthesized DNA, Privacy Leaks, and More. In Proceedings of the 26th USENIX Security Symposium (USENIX Security 17), Vancouver, BC, Canada, 16–18 August 2017; pp. 765–779. [Google Scholar]
- Gatlin, J.; Belikovetsky, S.; Moore, S.B.; Solewicz, Y.; Elovici, Y.; Yampolskiy, M. Detecting Sabotage Attacks in Additive Manufacturing Using Actuator Power Signatures. IEEE Access
**2019**, 7, 133421–133432. [Google Scholar] [CrossRef] - Yarnpolskiy, M.; King, W.E.; Gatlin, J.; Belikovetsky, S.; Brown, A.; Skjellum, A.; Elovici, Y. Security of additive manufacturing: Attack taxonomy and survey. Addit. Manuf.
**2018**, 21, 431–457. [Google Scholar] - Ranabhat, B.; Clements, J.; Gatlin, J.; Hsiao, K.T.; Yampolskiy, M. Optimal sabotage attack on composite material parts. Int. J. Crit. Infrastruct. Protect.
**2019**, 26, 100301. [Google Scholar] [CrossRef] - Liu, X.; Zhang, J.; Zhu, P.; Tan, Q.; Yin, W. Quantitative cyber-physical security analysis methodology for industrial control systems based on incomplete information Bayesian game. Comput. Secur.
**2021**, 102, 102138. [Google Scholar] [CrossRef] - Li, S.C.; Zhao, S.S.; Yuan, Y.; Sun, Q.D.; Zhang, K.W. Dynamic Security Risk Evaluation via Hybrid Bayesian Risk Graph in Cyber-Physical Social Systems. IEEE Trans. Comput. Soc. Syst.
**2018**, 5, 1133–1141. [Google Scholar] [CrossRef] - Kornecki, A.J.; Subramanian, N.; Zalewski, J. Studying Interrelationships of Safety and Security for Software Assurance in Cyber-Physical Systems: Approach Based on Bayesian Belief Networks. In Proceedings of the 2013 Federated Conference on Computer Science and Information Systems, Krakow, Poland, 8–11 September 2013; pp. 1393–1399. [Google Scholar]
- Passian, A.; Lereu, A.; Yi, D.; Barhen, S.; Thundat, T. Stochastic excitation and delayed oscillation of a micro-oscillator. Phys. Rev. B
**2007**, 75, 233403. [Google Scholar] [CrossRef] - Passian, A.; Protopopescu, V.; Thundat, T. Fluctuation and dissipation of a stochastic micro-oscillator under delayed feedback. J. Appl. Phys.
**2006**, 100, 114314. [Google Scholar] [CrossRef] - Yaghoubi, M.; Foulaadvand, M.E.; Bérut, A.; Luczka, J. Energetics of a driven Brownian harmonic oscillator. J. Stat. Mech.
**2017**, 2017, 113206. [Google Scholar] [CrossRef] - Straub, J. An approach to detecting deliberately introduced defects and microdefects in 3D printed objects. Proc. SPIE
**2017**, 10203, 102030L. [Google Scholar] - Srinivasan, S. Duffing Oscillator. MATLAB Central File Exchange. 2014. Available online: www.mathworks.com/matlabcentral/fileexchange/44987-duffing-oscillator (accessed on 7 July 2022).
- Ralich, R. Stochastic Resonance in the Duffing Oscillator with MATLAB. MATLAB Central File Exchange. 2013. Available online: https://www.mathworks.com/matlabcentral/fileexchange/35479-stochastic-resonance-in-the-duffing-oscillator-with-matlab (accessed on 7 July 2022).
- Heng, J.; Jasra, A.; Law, K.J.H.; Tarakanov, A. On Unbiased Estimation for Discretized Models. arXiv
**2021**, arXiv:2102.12230. [Google Scholar] - Jasra, A.; Law, K.J.; Yu, F. Randomized multilevel Monte Carlo for embarrassingly parallel inference. arXiv
**2021**, arXiv:2107.01913. [Google Scholar] - Martins, G.; Bhatia, S.; Koutsoukos, X.; Stouffer, K.; Tang, C.; Candell, R. Towards a systematic threat modeling approach for cyber-physical systems. In Proceedings of the Resilience Week (RWS), Philadelphia, PA, USA, 18–20 August 2015; pp. 114–119. [Google Scholar]
- Lazarova-Molnar, S.; Niloofar, P.; Barta, G.K. Data-driven fault tree modeling for reliability assessment of cyber-physical systems. In Proceedings of the Winter Simulation Conference (WSC), Orlando, FL, USA, 14–18 December 2020; pp. 2719–2730. [Google Scholar]
- MacKay, D.J.C. Information Theory, Inference, and Learning Algorithms; Cambridge University Press: Cambridge, UK, 2003. [Google Scholar]
- Jaynes, E.T. Bayesian Spectrum and Chirp Analysis. In Maximum-Entropy and Bayesian Spectral Analysis and Estimation Problems; Smith, C.R., Erickson, G.J., Eds.; Reidel: Dordrecht, The Netherlands, 1987; pp. 1–37. [Google Scholar]
- Robert, C.P.; Casella, G. Monte Carlo Statistical Methods; Springer: New York, NY, USA, 1999. [Google Scholar]
- Cotter, S.L.; Roberts, G.O.; Stuart, A.M.; White, D. MCMC methods for functions: Modifying old algorithms to make them faster. Stat. Sci.
**2013**, 28, 424–446. [Google Scholar] [CrossRef] - Metropolis, N.; Rosenbluth, A.W.; Rosenbluth, M.N.; Teller, A.H.; Teller, E. Equation of State Calculations by Fast Computing Machines. J. Chem. Phys.
**1953**, 21, 1087–1092. [Google Scholar] [CrossRef] - Hastings, W.K. Monte Carlo sampling methods using Markov chains and their applications. Biometrika
**1970**, 57, 97–109. [Google Scholar] [CrossRef] - Lukens, J.M.; Law, K.J.H.; Jasra, A.; Lougovski, P. A practical and efficient approach for Bayesian quantum state estimation. New J. Phys.
**2020**, 22, 063038. [Google Scholar] [CrossRef] - Lukens, J.M.; Passian, A. Bayesian inference for plasmonic nanometrology. Phys. Rev. A
**2021**, 104, 053501. [Google Scholar] [CrossRef] - Vollmer, S.J. Dimension-Independent MCMC Sampling for Inverse Problems with Non-Gaussian Priors. SIAM/ASA J. Uncertain. Quantif.
**2015**, 3, 535–561. [Google Scholar] [CrossRef] - MathWorks. tfest. 2022. Available online: www.mathworks.com/help/ident/ref/tfest.html (accessed on 7 July 2022).
- MathWorks. ksdensity. 2022. Available online: www.mathworks.com/help/stats/ksdensity.html (accessed on 7 July 2022).
- Bretthorst, G.L. Bayesian Spectrum Analysis and Parameter Estimation; Springer: Berlin/Heidelberg, Germany, 1988. [Google Scholar]
- Casella, G.; Berger, R.L. Statistical Inference, 2nd ed.; Duxbury: Pacific Grove, CA, USA, 2002. [Google Scholar]
- Ramtin, A.R.; Nain, P.; Menasche, D.S.; Towsley, D.; de Souza e Silva, E. Fundamental scaling laws of covert DDoS attacks. Perform. Eval.
**2021**, 151, 102236. [Google Scholar] [CrossRef] - Jacob, P.E.; O’Leary, J.; Atchadé, Y.F. Unbiased Markov chain Monte Carlo methods with couplings. J. R. Stat. Soc. B
**2020**, 82, 543–600. [Google Scholar] [CrossRef] - Goodman, J.; Weare, J. Ensemble samplers with affine invariance. Commun. Appl. Math. Comput. Sci.
**2010**, 5, 65–80. [Google Scholar] [CrossRef] - Huang, D.Z.; Huang, J.; Reich, S.; Stuart, A.M. Efficient derivative-free Bayesian inference for large-scale inverse problems. arXiv
**2022**, arXiv:2204.04386. [Google Scholar]

**Figure 1.**Schematic of the proposed Bayesian anomaly detection approach. A set of digital instructions may be converted to an analog input $g\left(t\right)$ driving a linear or nonlinear actuator. Parameters ${x}_{i}^{\prime}$ (${x}_{i}$), $i=1,2,\dots $ describe the actuator (actuator input). An array of sensors measure the input-output relation and generate a transfer function $\chi $, which is utilized as a model by the Bayesian algorithm. The model and the outcome data $y\left(t\right)$ are employed by the Bayesian algorithm to generate probability distributions for the parameters involved. Such an analysis has the potential to detect an adversarial influence on the outcome from either a cyber or a cyber-physical attack (an example being a modification of the G-code in 3D printing [18]).

**Figure 2.**Dynamics of the studied actuator. Shown are the experimentally measured output signal, which is the actuator response to a periodic square-wave input signal, and the simulated output of Equation (19) given the same input signal.

**Figure 3.**Estimated output data for the considered actuator, given an example input, using the generated transfer function [Equation (17)].

**Figure 4.**Output voltage samples simulated from a stepper motor excited by 21 sinewaves with frequencies evenly spaced from 140 to 160 Hz. Vertical dashed lines denote the total durations of subsets with various numbers of samples N. (See legend in Figure 5 for the ground truth frequency corresponding to each combination of color and line style.)

**Figure 5.**Marginal posterior distributions of excitation frequency, obtained by Bayesian inference of the datasets in Figure 4 and grouped by the number of data samples N. The ground truth frequencies for each curve appear in the legend.

**Figure 6.**Anomaly detection curves for each sample number N. The anomaly probability ${P}_{a}$ is the Bayesian-inferred probability that the excitation frequency exceeds 150 Hz, plotted against the ground truth frequency.

Variable | Description |
---|---|

${E}_{a}$ | Armature voltage |

${E}_{b}$ | Back EMF voltage |

${R}_{a}$ | Armature resistance |

${L}_{a}$ | Armature inductance |

${J}_{m}$ | Rotational inertia |

${B}_{m}$ | Viscous friction |

${K}_{T}$ | Motor torque constant |

${K}_{E}$ | Back EMF constant |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 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 (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Lukens, J.M.; Passian, A.; Yoginath, S.; Law, K.J.H.; Dawson, J.A.
Bayesian Estimation of Oscillator Parameters: Toward Anomaly Detection and Cyber-Physical System Security. *Sensors* **2022**, *22*, 6112.
https://doi.org/10.3390/s22166112

**AMA Style**

Lukens JM, Passian A, Yoginath S, Law KJH, Dawson JA.
Bayesian Estimation of Oscillator Parameters: Toward Anomaly Detection and Cyber-Physical System Security. *Sensors*. 2022; 22(16):6112.
https://doi.org/10.3390/s22166112

**Chicago/Turabian Style**

Lukens, Joseph M., Ali Passian, Srikanth Yoginath, Kody J. H. Law, and Joel A. Dawson.
2022. "Bayesian Estimation of Oscillator Parameters: Toward Anomaly Detection and Cyber-Physical System Security" *Sensors* 22, no. 16: 6112.
https://doi.org/10.3390/s22166112