# Prototyping the Symmetry-Based Chaotic Communication System Using Microcontroller Unit
## 2 Materials and Methods
### Hardware Implementation of Chaotic Communication System  
It was suggested in several previous works that the symmetry coefficient modulation introduces fewer changes in the dynamics of the signal due to its properties. As a result, SCM appears to be a potentially more covert method of signal modulation than parameter modulation. However, it is necessary to verify this suggestion by testing the physical chaotic communication system based on symmetry coefficient modulation under real conditions.  
In this section, we describe the experimental bench based on the microcontroller Arduino Due, with the software programming IDE. The main advantages of Arduino DUE are its built-in 12-bit analog-to-digital converter (ADC) and digital-to-analog converter (DAC) [29]. The experimental test bench consists of two Arduino Due controllers, an oscilloscope, a keyboard, and two displays. The outputs and inputs of the DAC and ADC are brought to the breadboard. In addition, between DAC and ADC, we placed the adder for additional mixing of white noise to study the noise resistivity of the communication system under investigation.  
A schematic diagram and photo of the chaotic communication test bench are shown in Figures 4 and 5, respectively.  
To transmit and receive messages via analog media (wire), we used the built-in DAC and ADC of two Arduino Due microcontrollers. A \(4\times 4\) matrix keyboard was used for system parameters configuration. The matrix keyboard was connected via diodes in case the user presses several buttons in one column at the same time. Two 0.96\({}^{\prime\prime}\) OLED displays were used for the convenience of parameter settings and to control the transmission of the message. To mix white noise with our signal, a signal adder was assembled on the breadboard using an OPA2134 operational amplifier (Texas Instruments) and resistors with a nominal value of 51 kOhm. We used a noise generator (Keysight 33210A) to mix the white noise into a signal, and an oscilloscope to monitor the signal.  
Figure 4: Schematic diagram of chaotic communication system.  
Below, one can see the program code describing the transmitter and receiver chaotic oscillators for the Arduino platform.  
The transmitter code is as follows:  
```
1 doubleAmpl=25;
2 doubleHult=2048/Ampl;
3 doubleDelta=2047;
4
5 voidset(){
6 hi=h*S;
7h2=h*(1-S);
8X[0]=(X[0]+h1*(a[0]*X[1]))/(1+h1*a[0]);
9X[1]=(X[1]+h1*(X[0]*(a[1]-X[2])))/(1+h1);
10X[2]=(X[2]+h1*(X[0]*X[1]))/(1+h1*a[2]);
11X[2]=X[2]+h2*(X[0]*X[1]-a[2]*X[2]);
12X[1]=X[1]+h2*(X[0]*(a[1]-X[2])-X[1]);
13X[0]=X[0]+h2*(a[0]*(X[1]-X[0]));
14 output=X[1]*Mult+Delta;
15 analogWrite(DACO,output);
16}
```  
The receiver code is as follows:  
```
1 doubleAmpl=25;
2 doubleHult=Ampl/2048;
3 doubleDelta=2047;
4
5 voidset(){
6 data=1.46774194*(analogRead(A0)-720);
7 input=(data-Delta)*Hult;
8 Error=input-X[1];
9 synchro=X*Error;
10h1=h*S;
11h2=h*(1-S);
12X[0]=(X[0]+h1*(a[0]*X[1]))/(1+h1*a[0]);
13X[1]=(X[1]+h1*(X[0]*(a[1]-X[2])+synchro))/(1+h1);
14X[2]=(X[2]+h1*(X[0]*X[1]))/(1+h1*a[2]);
15X[2]=X[2]+h2*(X[0]*X[1]-a[2]*X[2]);
16X[1]=X[1]+h2*(X[0]*(a[1]-X[2])-X[1]+synchro);
17X[0]=X[0]+h2*(a[0]*(X[1]-X[0]));
18}
```  
Figure 5: Photo of the chaotic communication test bench.  
The timing errors at the receiver side upon receiving the message (1010110010) with parameter modulation and symmetry coefficient modulation are shown in Figure 6. The noise level in the communication channel equals 25 dB. In the case of parameter modulation for the transmission of a binary message, the values \(c_{1}=2.3\) and \(c_{2}=2.6\) were used. In the case of symmetry coefficient modulation, the values \(s_{1}=-1.5\) and \(s_{2}=2.5\) were used to transmit a binary message.  
As can be seen from Figure 6, the use of the median filter can be easily detected by some threshold. Note that various thresholds must be selected for different noise levels.