Simulation of Cyclic Signals (Generalized Approach) Serhii Lupenko1, Iaroslav Lytvynenko1, Volodymyr Hotovych1 1 Ternopil Ivan Puluj National Technical University, Ruska str. 56, Ternopil, 46001, Ukraine Abstract The efficiency of cyclic signal modeling algorithms is significantly determined by their mathematical models. Using a mathematical model in the form of a cyclic random process and taking into account the obtained statistical information in the form of statistical estimates of mathematical expectation and variance, as well as the estimated discrete rhythm function of the studied cyclic signal, a computer modeling method was developed. This method allows modeling a wide range of signals (of different physical nature), which have a repetitive (cyclic) structure. Based on the information about the estimated rhythmic structure (discrete rhythm function) of the known signal, or by setting (simulating) the rhythm of unfolding in time of the cyclic signal, which can be constant (periodic) and variable (cycle lengths are not equal to each other), the method allows modeling signals with different rhythms. Keywords Computer modeling, methods of statistical processing, cyclic signal, cyclic random process 1. Introduction Computer simulation of various cyclic signals and their processing using digital systems is an important task. The simulation allows determining the possibilities of known and created methods of processing cyclic signals at different stages of signal analysis, testing, for example, them using simulated implementations. In addition, the simulation of cyclic signals allows the training of newly created decision-making systems (diagnostic or prognostic), as well as methods for recognizing biomedical images through their training and testing. Stochastic periodic processes (periodic random processes), such as periodically correlated random process and periodically distributed random process with different types of distributions, can be distinguished as mathematical models used for modeling cyclic signals, taking into account the stochastic approach. They are widely used in the stochastic modeling paradigm for mathematical models of cyclic signals [1-19]. In [20, 21] the generalization of stochastic periodic processes in the form of a new mathematical model of cyclic signals is made. It is presented as a cyclic random process, which, as a special case, includes a periodic random process. The model of a cyclic random process is substantiated and applied as a mathematical model of various signals with cyclic spatiotemporal structure in different diagnostics information systems (medical diagnostics, technical diagnostics, and forecasting), as well as in systems of analysis and forecasting of mechanical and economic cyclic processes [23, 24]. 2. Purpose of the research This work is devoted to the development of a method of computer modeling of cyclic signals of different physical nature on the basis of information obtained by statistical processing methods on the probabilistic characteristics of cyclic random processes, based on a mathematical model in the form of cyclic random process in medicine, technology, and economics. ___________________________ IDDM-2021: 4th International Conference on Informatics & Data-Driven Medicine, November 19–21, 2021 Valencia, Spain EMAIL: lupenko.san@gmail.com (A. 1); iaroslav.lytvynenko@gmail.com (A. 2); gotovych@gmail.com (A. 3) ORCID: 0000-0002-6559-0721 (A. 1); 0000-0001-7311-4103 (A. 2); 0000-0003-2143-6818 (A. 3) ©️ 2021 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0). CEUR Workshop Proceedings (CEUR-WS.org) 3. Proposed method of cyclic signals simulation Modeling of cyclic signals allows to carry out training of the created systems of decision-making (diagnostic or prognostic), methods of recognition of biomedical images by their training and testing. Often for the needs of testing and analysis of various algorithms in practice, it is necessary to have a large base of representative implementations of cyclic signals. Therefore, for these purposes, it is convenient to have tools (methods and algorithms) for computer modeling, which allow you to simulate the desired implementation of cyclic signals. Thus in cyclic signals which are modeled, if the mathematical model allows, those parameters and characteristics to which the investigated method (algorithm) reacts and which need to be investigated, to carry out an estimation by the created methods are put. In the formation of real cyclic signals, their implementation should be preprocessed by an expert who, using his own experience, will determine in advance representative cycles and certain parameters and characteristics, which will then be taken into account in cyclic signals modeled, analyzed, and determined by research methods. In computer simulation, the input data are the characteristics and parameters of the morphological and rhythmic nature of cyclic signals. Figure 1 shows a block diagram of the general algorithm of the method of modeling cyclic signals using two approaches – deterministic and stochastic. Input of morphological characteristics and parameters Enter the Enter the Simulation of white noise with або implementations of implementation of a normal distribution law statistical estimates representative cycle   (t), t  W mˆ  (t ), t  W1 dˆ (t ), t  W  1 f1 (t ), t  W1 Enter the amount C of cycles f d (t ),  (t ), Stest (t ), t  W The cyclic signal simulation Z Enter the amount of zones Enter the characteristics and parameters of Tˆ (t , n), t  W, n  Z the rhythm The rhythmic structure estimation Enter the discrete Formation of a discrete rhythmic structure or rhythmic structure Tˆi (t , n), i = 1, С , j = 1, Z , t  W, n  Z Enter the Tˆ Tˆi (t , n), i = 1, С , t  W, n  Z або Ti Enter cycles Formation of value of the or or durations cycles durations period ____ Enter the Determining the Determination of durations of the duration of cycles zone durations zones on the cycle D c  ˆ = tˆ , i = 1, С i  Ti j ˆ = tˆi , i = 1, С , j = 1, Z  D z ____  j  j Figure 1: Block diagram of the general algorithm of the method of modeling cyclic signals Features of the form of cyclic signals are taken into account in the block of morphological characteristics and parameters. Here, a representative cyclic signal cycle can be introduced f1 (t ), t  W , using a deterministic approach to simulation of a cyclic signal. Implementations of ˆ  (t ), t  W and statistical estimates of mathematical expectation can be or are introduced m dispersions dˆ (t ), t  W , using a stochastic approach to simulating the cyclic signal. In addition, to add additional stochasticity to the simulated data, if necessary, you can add white noise with a normal distribution law, as an additive component of the simulation model. In addition to morphological characteristics, the modeling takes into account the parameters of segmental structures, namely, the number of cycles C and zones Z , as well as the characteristics and parameters of the rhythm in the corresponding block on the block diagram. The following data can be entered in the rhythm generation unit (simulation): discrete rhythmic structure, if known, for cases of identified segmental cyclic structure T (ti , n), ti  W, n  Z, i = 1, C and the identified segmental zone structure T (t i , n), t i  W, n  Z , i = 1, C , j = 1, Z ; sets of j j   samples of segmental cyclic structure Dc = ti , i = 1, C or multiple samples of the segmental zone  structure D z = t i , i = 1, C , j = 1, Z . j  In the case where certain durations of the respective segment segments are known Ti , i = 1, C or zone segments Ti , i = 1, C , j = 1, Z or an estimate of the value of the period Tˆ (stable rhythm) then j the rhythm can be set taking into account these parameters. The input data for modeling the implementation of the cyclic signal is a continuous rhythm function, which can be evaluated in the block "estimation of rhythmic structure", taking into account one of the developed methods, or if it is known in advance, can be entered in the block characteristics and rhythm parameters. For the stochastic case of computer simulation of cyclic signal implementations, stochastic, independent cycles are modeled and sequentially combined: C  (, t ) = Ui (, t ),   Ω, t  W . (1) i =1 In the case of simulation taking into account the segments-zones: C Z  ( , t ) = UU ( , t ),   Ω, t  W . i j (2) i =1 j =1 Taking into account the relationship between segmental cyclic and segmental band structures of cyclic signal implementations: Z  i ( , t ) = U ( , t ),   Ω, t  W . i j (3) j =1 Computer simulation of a sequence of stochastic, equivalent, independent cycles: i (, t ) = ( yi (t1 ), gi (, t1 )), t1  W1, i = 1, C, t  W , (4) where yi (t1 ) – is a scale transformation function that takes into account rhythmic structures; gi ( , t1 ) – is a set of independent basic (representative) cycles: yi (t1 ) = t1 + T (t1 , n), i = 1, C, t1  W1 . (5) In such modeling, the attributes are the implementation of statistical estimates (mathematical expectation and variance) or the implementation of a representative cycle of the cyclic signal (in the case of a deterministic approach to modeling the cyclic signal): mg (t1 ) = mˆ  (t1 + T (t1 , n)), d g (t1 ) = dˆ (t1 + T (t1 , n)), n  Z; (6) mg (t1 ) = f1 (t1 + T (t1 , n)), n  Z. In block diagram (see Fig. 1) the characteristics of rhythm (rhythmic structures) can be obtained by taking into account the segmental structures of the set either Dc = ti , i = 1, C or    D z = t i , i = 1, C , j = 1, Z . j    In addition, we can take into account the variable rhythm by specifying either the appropriate sets   of cycle durations Ti , i = 1, С or sets of duration zones Ti , j = 1, Z , i = 1, С on the cycle. Here j we take into account the stable rhythm by entering the value of the period Tˆ . 4. Experiments and obtained results In this part of the study, we consider examples of the results of the application of the method of computer modeling of cyclic signals, taking into account different rhythmic structures in different areas (Figures 2 - 5). Mathematical expectation and variance estimates were used to simulate the implementation of the electrocardiographic signal (Figure 2). Estimation of the mathematical expectation of the electrocardiographic cycle is the input data for modeling – as a representative cycle that characterizes a particular pathology. In this case it is hypertrophy of the right and left ventricles. The estimation of the mathematical expectation determines the morphology of the cycle corresponding to the pathology, and the variation of the values on the cycle when simulating the implementation of the electrocardiographic signal is determined by the estimation of the variance. The rhythm of unfolding the values of the implementation of the electrocardiographic signal in time is set by the rhythmic structure (discrete rhythm function) given in Figure 3, a. The result of simulation the implementation of the electrocardiographic signal is presented in Figure 3, b. ˆ  (t ), mВ m 0,06 dˆ (t ), mV 2 0,3 0,05 0,2 0,04 0,1 0,03 0 0,02 -0,1 0,01 -0,2 0 t, s -0,3 t, s 0 0,2 0,4 0,6 0,8 1 0 0,2 0,4 0,6 0,8 1 a) b) Figure 2: Input data for computer simulation of cyclic signals (electrocardiographic signals), implementation of estimates of mathematical expectation and variance: a) Assessment of mathematical expectation electrocardiographic signal (II lead), diagnosis – hypertrophy of the right and left ventricles; b) Assessment of variance electrocardiographic signal T (t ,1), s  (t ), mV 1 0,3 0.95 0,2 0.9 0,1 0.85 0 0.8 -0,1 0.75 -0,2 0.7 t, s 0.65 t , s -0,3 0 1 2 3 4 5 6 0 1 2 3 4 5 a) b) Figure 3: Input data for computer modeling of cyclic signals (electrocardiographic signals), and the result of modeling: a) Implementation of the estimated rhythmic structure (rhythm function), obtained on the basis of mixed interpolation: cubic spline and piecewise linear interpolation; b) The results of computer simulation of the implementation of the cyclic signal – the implementation of the electrocardiographic signal (II lead), the diagnosis – hypertrophy of the right and left ventricles mˆ  (t ), c. u. ˆ 2 0.3 0.04 d (t ), c. u. 0.2 0.03 0.1 0.02 0 0.01 -0.1 t, year t, year 0 -0.2 2005 2006 2005 2006 a) b) Figure 4: Input data for modeling the implementation of the economic process of the index of computer and electronic indicators of the United States, the assessment of probabilistic characteristics: a) The implementation of the assessment of mathematical expectation; b) The implementation of the assessment of variance 368 T (t ,1), day ˆ  (t ), c. u. 1.0 366 0.8 364 0.6 362 t , year 0.4 t , year 360 2005 2006 2007 2008 2005 2006 2007 2008 a) b) Figure 5: Input data for computer modeling of cyclic signals (implementation of the economic process), and the result of modeling: a) The implementation of the estimated rhythmic structure (rhythm function), obtained on the basis of piecewise linear interpolation; b) Simulated implementation of the cyclical economic process of the index of computer and electronic indicators of the USA 5. Discussion Proposed by the authors model resembles the classical autoregressive model for the analysis of a noisy signal. However, the new model differs from the autoregression one in that it allows taking into account both the morphology of the simulated signals (by taking into account statistical estimates: mathematical expectation, variance) of the cyclic process and information about the rhythm of its deployment which can be constant (periodic) and variable (differ from each other among particular cycles). Comparison of the mathematical apparatus offered in this work with others needs separate research. For example, when comparing with mathematical apparatus of wavelets, the result of modeling using wavelets will depend on the correctness of the choice of "mother wavelet". That is, it should be close to the shape of the simulated cycle. There is no such shortcoming in the proposed method of modeling, because the shape (morphology) of the signal cycle is given arbitrarily and is determined by estimating the mathematical expectation and variance. 6. Conclusions The developed method allows modeling a wide range of signals of different physical nature, which have a repetitive (cyclic) structure. Based on the information about the estimated rhythmic structure (that is discrete rhythm function) of the known signal, or by setting (simulating) the rhythm of time development of the cyclic signal, which can be constant (periodic signal) and variable (cycle lengths are not equal to each other), the proposed method allows simulation of signals with a different rhythm. This method allows considering both a rhythm of signal development in time and features of morphology of a signal representative cycle. The developed method based on a mathematical model in the form of a cyclic random process allows computer modeling of cyclic signals that can be used in intelligent information systems in economics, mechanics, and medicine. Also, this method is especially important at the testing stage of new systems for processing signals of such nature. This paper concerns the method of modeling cyclic signals, the simulation results of which are sufficiently interpreted in this paper. To confirm the results obtained in this work, the authors have used mathematical statistics. However, it is not possible to place all the obtained results only in one work. In further research, it is planned to conduct computer modeling of cyclic signals in the field of energy consumption and to investigate the absolute and relative errors of modeling, in particular gas consumption and energy consumption signals. 7. References [1] W. A. Gardner, A. Napolitano, L. Paura, Cyclostationarity: Half a century of research, Signal Processing, 2005, № 86 (2006), pp. 639-697. https://doi.org/10.1016/j.sigpro.2005.06.016. [2] H. L. Hurd, Periodically Correlated Random Sequences : Spectral Theory and Practice, The University of North Carolina at Chapel Hill Hampton University. [3] P. Kochel, Periodically stationary Markovian decision models, Elektron. Informationsverarb. Kybernet, 1980, no. 16, pp. 553-567 (in German). [4] N. Singh, J. M. Kegan, J. C. Wilcox, D. Hadley, D. Plews, and V. Froelocher, “Heart Rate Variability: An Old Metric with New Meaning in the Era of using mHealth Technologies for Health and Exercise Training Guidance. Part One: Physiology and Methods”, Arrhythmia & electrophysiology Review , vol. 7, 2018, pp 193–198. [5] C. Hoang, N. Kien, N. Dung, “A Review of Heart Rate Variability and its Applications”, APCBEE Procedia, vol. 7, 2013, pp 80–85. [6] R. Sassi, S. Cerutti, F. Lombardi, and etc., “Advances in heart rate variability signal analysis: joint position statement by the e-Cardiology ESC Working Group and the European Heart Rhythm Association co-endorsed by the Asia Pacific Heart Rhythm Society”, EP Europace, vol. 17, 2015, pp 1341–1353. [7] M. Hitoshi, K. Ritsushi, I. Yoshifumi, and etc., “Analysis of the heart rate variability during cryoballoon ablation of atrial fibrillation”, EP Europace, vol. 20, 2018, pp 1259–1267. [8] G. Sandercock, P. Bromley, D. Brodie, “The reliability of short-term measurements of heart rate variability”, International Journal of Cardiology, vol. 103, 2005, pp 238–247. [9] A. R. Nematollahi, A. R. Soltani, Discrete time periodically correlated Markov processes, Probability and Mathematical Statistics, 2000, No. 20 (1), pp. 127-140. [10] E. Ghysels, R. E. McCulloch, R. S. Tsay, Bayesian Inference for a General Class of Periodic Markov Switching Models, 1993. [11] E. Ghysels, On the Periodic Structure of the Business Cycle, Cowles Foundation, Yale Universiti, 1992, No. 1028. https://doi.org/10.2307/1392085. [12] S. Bittanti, F. Lorito, S. Strada, Markovian representations of cyclostationary processes, in: L. Gerencser, P. E. Caines (Eds.), Topics in Stochastic Systems : Modelling, Estimation and Adaptive Control, Springer, Berlin, Germany, 1991, vol. 161, pp. 31-46. [13] Israa Shaker Tawfic, Sema Koc Kayhan. (2017), Improving recovery of ECG signal with deterministic guarantees using split signal for multiple supports of matching pursuit (SSMSMP) algorithm, Computer Methods and Programs in Biomedicine, vol. 139, 2017, pp. 39-50. doi.org/10.1016/j.cmpb.2016.10.014. [14] F. Fumagalli, A. E. Silver, Q. Tan, N. Zaidi, G. Ristagno (2018), Cardiac rhythm analysis during ongoing cardiopulmonary resuscitation using the Analysis During Compressions with Fast Reconfirmation technology, Heart Rhythm, 15(2), pp.248-255. doi:10.1016/j.hrthm.2017.09.003. [15] N. J. Napoli, M. W. Demas, S. Mendu, C. L. Stephens, K. D. Kennedy, A. R. Harrivel, R. E. Bailey, L. E. Barnes (2018), Uncertainty in heart rate complexity metrics caused by R-peak perturbations, Computers in Biology and Medicine, 103, pp. 198-207. doi:10.1016/j.compbiomed.2018.10.009. [16] A. Napolitano. (2016), Cyclostationarity: Limits and generalizations. Signal Processing, vol. 120, March 2016, p. 323-347. doi:10.1016/j.sigpro.2015.09.013. [17] V. Karyotis, M. H. R. Khouzani (2016), Malware Diffusion Models for Modern Complex Networks. Theory and Applications, USA. 201, p. 324. ISBN: 978-0-12-802714-1. [18] B. Sericola. (2013), Markov Chains: Theory and Applications. London, July 2013, p. 416. ISBN: 978-1-848-21493-4. [19] F. Shaffer, J.P. Ginsberg (2017), An Overview of Heart Rate Variability Metrics and Norms, Frontiers in Public Health, Volume 5, Article 258, September 2017, pp. 1-17, doi:10.3389/fpubh.2017.00258. [20] P. Onyskiv, S. Lupenko, I. Lytvynenko, A. Zozulia, Mathematical modeling and processing of high resolution rhythmocardio signal based on a vector of stationary and stationary related random sequences, IDDM’2020: 3rd International Conference on Informatics & Data-Driven Medicine, November 19–21, 2020, Växjö, Sweden. CEUR Workshop Proceedings, 2020, 2753, pp. 149–155. http://ceur-ws.org/Vol-2753/short8.pdf. [21] S. Lupenko, I. Lytvynenko, N. Stadnyk, Method for reducing the computational complexity of processing discrete cyclic random processes in digital data analysis systems, Scientific Journal of the Ternopil National Technical University, 2020, vol. 97, no. 1, pp. 110-121. https://doi.org/10.33108/visnyk_tntu. [22] S. Lupenko, I. Lytvynenko, N. Stadnyk, A. Zozulia, Mathematical model of rhythmocardiosignal in vector view of stationary and stationary-related case sequences, Advanced Information Systems. National Technical University “Kharkiv Polytechnic Institute”, 2020, vol. 4, no. 2 pp. 42-46. doi:10.20998/2522-9052.2020.2.08. [23] A. B. Gorkunenko, S. A. Lupenko, Obg'runtuvannja diagnostychnyh i prognostychnyh oznak v informacijnyh systemah analizu ta prognozuvannja cyklichnyh ekonomichnyh procesiv, Naukovyj visnyk NLTU Ukrainy: zbirnyk naukovo-tehnichnyh prac. L'viv, 2012, no. 22.9, pp. 347−352 [in Ukrainian]. [24] V. Hutsaylyuk, I. Lytvynenko, P. Maruschak, G. Schnell, A new method for modeling the cyclic structure of the surface microrelief of titanium alloy ti6al4v after processing with femtosecond pulses, Materials, 2020, 13(21), pp. 1-8, 4983. doi:10.3390/ma13214983.