## 4 Results  
For modeling, ECG signals were selected from the international open database PhysioNet Computing in Cardiology Challenge 2017 (CinC Challenge) [31]. This database contains over 10,000 ECG records; it is freely available from AliveCor and is a random sample of patient records of no more than one minute in duration. The Physionet Computing in Cardiology Challenge 2017 database consists of 8528 ECG signals for training and 3658 ECG signals for validation. The base consists of four types of single-channel signals: 5152 normal signals (N), 771 signals with cardiac fibrillation (A), 46 noisy signals (-) and 2557 other signals (O). The simulations were performed using two categories of signals, namely signals without heart defects (N) and signals with atrial fibrillation (A). These signal categories were selected to study the signs of atrial fibrillation on ECG signals for more correct LSTM learning. A total of 1000 signals were selected from the database CinC Challenge for the first modeling. For the second experimental simulation, 5925 ECG signals were selected, namely 5152 normal signals (N) and 771 signals with cardiac fibrillation (A). Examples of selected ECG signals from the database CinC Challenge are shown in Figure 6.  
The simulation was carried out using the MatLab 2020b software package for solving technical calculations. The calculations were performed on a PC with a processor Intel(R) Core (TM) i5-10210U CPU @ 1.60 GHz (8 CPUs), 2.1 GHz. Database PhysioNet Computing in Cardiology Challenge 2017 (CinC Challenge) consists of ECG signals with different numbers of samples. Figure 7 shows that there are significantly more signals from 9000 samples. For correct training of the neural network, the input ECG signals must contain the same number of samples. Therefore, at the stage of preliminary data processing for the first training, 976 ECG signals with several samples to 9000 were selected. For the second simulation, 5754 ECG signals with 9000 samples were taken at the preprocessing stage. Figure 6: An example of ECG signals without heart defects (Normal Signal) and signals with atrial fibrillation (AFib signal) from the CinC Challenge database [31]. DWT allows splitting the signal into high and low frequencies. Analysis of high frequencies of the ECG signal can determine the presence of peaks. Analysis of low frequencies of the ECG signal allows determining the presence of noise of varying nature [22]. The symlet is an orthogonal wavelet and can be used to reconstruct the signal [23] or to find R-peaks on ECG signals [24; 32]. To remove noise from ECG signals and isolate R-peaks on them, the symlet wavelet filter was chosen. The symlet is similar in shape to the QRS complex on the ECG signal. This means that the decomposition coefficients of the ECG signal using the symlet-based DWT have a high correlation with the location of the P-peaks. Their number can be determined based on the analysis of the coefficients of the wavelet decomposition of the ECG signal. Figure 8 shows a graphical display of the symlet and QRS complex. Figure 9 shows examples of the five-level decomposition of an ECG signal based on a symlet. The spikes in coefficients D 2, D 3 and D 4 correspond to heartbeats, from which it is possible to determine the location of the R-peaks of the cardiogram. Figure 8: Symlet repeating the shape of the R-peak on the ECG signal. Figure 7: Histogram of the ratio of the number of samples to the number of signals. The results from Table 2 were obtained by simulating the proposed system using various symlet. Each value of the table is the result of training the proposed system for neural network determination of atrial fibrillation based on LSTM with signal preprocessing using different coefficients of symlet. The best learning result was obtained using a five-coefficient symlet. For the correct selection of various signs on the ECG signals, one-dimensional functions must be used. The functions of instantaneous frequency and spectral entropy were selected to isolate the P-peak.