# Development of a Digital System for Monitoring Emergency Conditions in 20 kV Distribution Networks
## 2 Materials and Methods  
To create a model of a digital radio channel in the Simulink environment, a number of conditions must be met to ensure signal compatibility in the model's schematic. For this purpose, we use a mathematical description of the processes occurring in this type of communication channel [6; 7]. A random integer generator--Random-Integer Generator from the Simulink library--is used as the data source. The generator outputs a sequence of complex numbers, while the input to the virtual observer Scope requires the \"amplitude-phase\" format. Therefore, it is necessary to apply a converter that transforms complex numbers into the amplitude-phase format, such as the Complex to Magnitude-Angle block (Figure 3). Figure 3: Converting complex numbers to amplitude-phase format. The real-valued signals from the \"amplitude \(\left|\,\mathsf{u}\,\right|\)\" output of this block are transmitted to the Scope virtual observer block, which operates exclusively with real numbers. The converter of complex numbers to the amplitude-phase format, such as the Complex to Magnitude-Angle block, must also be applied at the output of the demodulator. The real-valued signals from the \"amplitude \(\left|\,\mathsf{u}\,\right|\)\" output of this block are transmitted to the Scope virtual observer block, which operates exclusively with real numbers (Figure 4). The conversion of complex numbers into a format combining real and imaginary parts, for the purpose of generating a time-domain diagram of the modulated signal, is performed in the Complex to Real-Imag block. At the Re output of the block, the signal representing the real part of the complex number is generated, while at the Im output, the signal representing the imaginary part of the complex number is generated (Figure 5). To obtain additional capabilities for automatic monitoring of errors arising due to noise in the information transmission channel, it is necessary to create a corresponding circuit for detecting and visualizing errors in the signal transmission path. To implement such a circuit, it is required to compare the original signal at the input of the transmission path with the signal at the output of the reception path in such a way that, in the event of errors, a graphical representation of the error appears in one channel of the oscilloscope. Figure 6 shows the block diagram of such a device. To implement the model of the information transmission channel from the measurement node to the server, a scheme for organizing the wireless transmission of a digital  
Figure 4: Converting complex numbers to amplitude-phase format that works only with real numbers. Figure 5: Converting complex numbers to a combination of real and imaginary parts [8; 9]. Figure 6: Block diagram of the device for generating a signal and error oscillogram. signal originating from the measurement node and pre-converted into digital form is used, as shown in Figure 7.  
The signal frequency \(\mathrm{F_{c}}=8\) kHz and the carrier frequency \(\mathrm{F_{h}}=700\) MHz are adopted. At the initial stage, we will simulate the digital modem section using FSK modulation (frequency shift keying) in the M-FSK variant (number of modulation levels M = 4), which is used in Bluetooth short-range communication technology. To create the model, we select models, blocks, and functionality from the libraries. As the source of the primary signal, to simulate the signal from the measurement node and convert it into digital form, we choose the Random-Integer Generator module. As the modulator, we use the programmable module called Modulator M-FSK Baseband [10]. To simulate a wireless communication channel where different levels of continuous spectral noise impact on the transmitted signal can be simulated, we use the programmable module called AWGN Channel. This module allows us to model the practical transmission environment with the maximum level of industrial noise typical for power lines. As the demodulator, we use the controlled module called Demodulator M-FSK Baseband.