2ASK System Modeling and Simulation

: The communication network of our country is developing vigorously, and the digital communication system has a certain development prospect. However, for wireless signal transmission, signal modulation is needed to ensure the output results. To use the limited bandwidth to transmit digital signals more efficiently, the corresponding digital signals need to be modulated by the carrier. In this paper, the digital signal is transmitted by carrier modulation, and under the condition of Gaussian white noise, the modelling and simulation of 2ASK modulation and demodulation system are realized by using Simulink and m file respectively, and the anti-noise performance of the system can be seen. And through the m file to achieve non-coherent demodulation and coherent demodulation through the Simulink, we can see the advantages and disadvantages of the two ways. At the end of the paper, the bit error rate of the 2ASK signal is analyzed.


Introduction
At present, with the wise guidance of our Party and the state, as well as the support of corresponding policies. It makes China's 5G, IC and private network communication industries mature and develop. In the transition period from analogue to digital, we have realized that most analogue communication systems are replaced by digital communication systems. However, due to the complexity of its technical knowledge, it is applied to the unpredictability of the hardware development cycle. This will make digital communication need powerful simulation software to realize its miniaturization, low cycle and low cost. This shows that digital communication system simulation has broad development prospects. The SIMULINK simulation platform based on MATLAB integrated environment has the advantages of wide adaptability, clear structure and flow, fine simulation, high efficiency and flexibility, and is suitable for the simulation of communication systems.
In long-distance transmission, especially in wireless signal transmission, if the signal is not modulated, it will cause transmission difficulties and affect the transmission results. The signal must first be modulated at a high frequency and then moved to the channel for transmission. To use the limited bandwidth to transmit digital signals more efficiently, the corresponding digital signals need to be modulated by the carrier.
The original signal is shifted by a frequency spectrum to obtain a frequency band signal suitable for transmission, and in the frequency band transmission system, the digital signal is regulated and controlled by different parameters of a carrier wave to realize a plurality of frequency band modulation methods. When the modulated signal is a binary digital baseband signal, the modulation is called binary digital modulation. A sine wave is selected as the carrier, and the modulation causes the amplitude of the carrier to change. The signal generated at this time is the binary amplitude shift keying signal (2ASK). Although 2ASK technology is greatly affected by noise, it is still the best solution under a few conditions.
In this paper, the digital signal is transmitted by carrier modulation, and under the condition of Gaussian white noise, the modelling and simulation of 2ASK modulation and demodulation system are realized by using Simulink and m file respectively, and the anti-noise performance of the system can be seen. And through the m file to achieve non-coherent demodulation and coherent demodulation through the Simulink, we can see the advantages and disadvantages of the two ways. At the end of the paper, the bit error rate of the 2ASK signal is analyzed, It is proved that the 2ASK modulation and demodulation system is robust.

2Amptitude Shift Keying Rationale
ASK (Amptitude Shift Keying), or amplitude keying uses a baseband rectangular wave of 0 or 1 to control a continuous carrier, that is, the baseband rectangular wave is directly multiplied by the carrier. When the digital information is 1, the carrier is directly passed, and when the digital information is 0, the carrier is not passed. The signal generated by this mechanism is the 2ASK signal, where 2 stands for binary.
Demodulation is divided into coherent demodulation and non-coherent demodulation. Coherent demodulation is to shift the spectrum of the modulated signal with a signal of the same frequency as the carrier. Noncoherent demodulation, that is, extracting the envelope by the detection or other methods. In practical applications, it is difficult to generate coherent carriers with the same frequency and phase, so non-coherent demodulation is more widely used.

ASK/OOK signal
The commonly used binary amplitude keying mode is called on-off keying (OOK), and its expression is: When sending "1" with probability P 0 When sending "0" with probability 1 − P A typical waveform is shown in Figure 1. It can be seen that the carrier changes on and off under the control of the binary baseband signal s (t), so it is also called on-off keying. In OOK, a certain signal ( "0" or "1") is represented by the presence or absence of a voltage. The general expression for the 2ASK signal is: Where: is the symbol duration; G (t) is the baseband pulse waveform with a duration of. For simplicity, G (t) is usually assumed to be a rectangular pulse of height 1 and width 1; is the level value of the nth symbol. If you take Then the corresponding 2ASK signal is the OOK signal.

ASK signal modulation
Generally, there are two methods: the analogue modulation method (multiplier method) and the keying method, and the corresponding modulator is shown in Figure 2.

Analog multiplication using multiplier
The output modulation signal e2ASK (t) is obtained by multiplying the digital signal s (t) and the carrier signal number cosωc t by a multiplier, which one way to modulate a sinusoidal carrier directly with the amplitude of a binary digital signal is called analogue multiplication. The multiplier shifts the frequency spectrum of the signal, and after multiplication, the output modulation signal is filtered by a filter to remove high-frequency harmonics and low-frequency interference signals, so that the amplitude keying signal can be obtained.

Digital keying using a switching circuit
The keying method is also called the switching method. This method makes the carrier wave control the switch at the binary signals "1" and "0". When the baseband signal is a high-frequency signal "1", the switch is turned on; when the baseband signal is a low-frequency signal "0", the switch is turned off. This method plays the role of simulating the two-way switch to turn on and off the signal in the circuit. This binary amplitude keying mode is also called on-off keying mode. The amplitude of a sinusoidal carrier with an initial phase of 0 is controlled by a binary digital modulation signal s (t), and its time-domain expression can be obtained as follows:

ASK signal demodulation
There are two basic demodulation methods: non-coherent demodulation (envelope detection method) and coherent demodulation (synchronous detection method) [1] . The corresponding receiving system block diagram is shown in Figure 3. Compared with the analogue signal receiving system, a "sampling decision" block is added here, which is necessary to improve the receiving performance of digital signals.  It can be seen from Figure 4 that ASK is greatly affected by noise, so the noise is superimposed on the signal and the original amplitude is changed.For the ASK modulation technology which relies on the envelope to identify the binary high and low bits, because the anti-noise performance of the amplitude keying signal is not ideal, it is gradually replaced by FSK and PSK. However, as a modulation method with a long history and profound foundation, it still has a high reference value. In the recent five years, with the increasing demand for information rate, to achieve higher information rate transmission in a narrower frequency band, M-ary Digital Amplitude Keying (MAK) [2] has been used again. As an efficient transmission method, MASK modulation is affected by its anti-noise ability. Therefore, it is generally only suitable for use in constant parameter channels with good channel conditions and tight frequency bands.

ASK System Based on m File
The modulation of the 2ASK signal can be realized by the MATLAB program. See Appendix A for the specific code. Fig. 5 (a) shows waveforms of an original signal, a carrier signal, and a 2ASK signal having a length of 8 symbols.

Figure 5: 2ASK Modulation Waveform and Noise Waveform
By adding noise, the signal has a greater impact. The waveform of the white noise is shown in Figure 5 (B).It can be seen that the noise has a great impact on the signal and affects the real information of the signal. See Appendix B for specific codes.
The non-coherent demodulation method can take less consideration of channel estimation or even omit it, so the processing complexity is reduced and the implementation is relatively simple. Therefore, the non-coherent demodulation method is used here to demodulate the FM signal. After passing through a band-pass filter and a full-wave rectifier, the modulation signal is restored through two steps of low-pass filtering and sampling judgment [3] in turn. The demodulation waveform is shown in Figure 6. It can be seen that the original signal can be reproduced more accurately by this method. See Appendix C for specific codes.

2ASK system based on Simulink
The block diagram of the whole 2ASK communication system simulation is obtained by connecting the modulation module, the demodulation module and the noise channel, as shown in The simulation of the 2ASK communication system is realized through the construction of the modulation module and demodulation module, the connection with the white noise interference channel, and the parameter setting of all related modules.
To show the simulation effect more intuitively, each signal node is connected to an oscilloscope to observe the change in the signal. This is shown in Figure (B). From top to bottom and then from left to right. Respectively showing (1) a baseband signal waveform, (2) a sinusoidal carrier signal waveform, (3) a signal waveform after being modulated, (4) a modulated waveform distorted after passing through a white Gaussian noise channel, (5) a signal waveform after passing through a bandpass filter, (6) a waveform after being multiplied by a carrier signal, (7) The waveform after passing through the low-pass filter and (8) the final waveform obtained by sampling and judging.

The too low resolution of bit error rate
Because the length of the given signal is limited, the resolution accuracy of the bit error rate (the change of the bit error rate caused by a wrong code element) is not high.
That is to say, every time a code is wrong, the error rate fluctuates greatly, and finally there is a "spike" in the drawing. It is caused by adding the randomness of Gaussian noise.
Solution: 1) Repeating the experiment many times at each signal-to-noise ratio point and taking the average value of the error rate is equivalent to performing mean filtering at each point, which can effectively resist the "noise" interference caused by the low resolution of the bit error rate and the randomness of the AWGN function.
2) The simulation step size of the PSR in the simulation can be set to be smaller, and the final error rate obtained is the average value of several adjacent error rates, which is also equivalent to a mean filter.
Optimum discrimination threshold [4] : Because of the small number of codes in the simulation, the frequency of 01 is different, and this error can not be ignored through calculation. Therefore, the discrimination threshold is recalculated instead of simply taking a/2 as the discrimination threshold. * = 2 +

Oretical error
Based on the background of 2ASK signal coherent demodulation, the total bit error rate [5] of the system is: Wherein, the signal-to-noise ratio at the input end of the demodulator is:r = A MATLAB program is established to analyze the bit error rate (see Appendix D). After Huffman encoding, the compression ratio is 1.195402. After the Hamming coding is completed, the coding efficiency is 0.571429. The total time of the program is 73.119387 seconds. It can be seen that the signal noise has a greater impact on 2ASK, but it is acceptable within a certain range. Under the condition of small noise, it can ensure that most of the data can reach the destination accurately, as shown in Figure 8.

Conclusion
Although the 2ASK system is limited by the environment, its classical modulation mode is still the basis for us to learn and understand the more advanced modulation mode. 2ASK simulation design, respectively in the MATLAB integrated environment and SIMULINK simulation platform, to achieve a complete communication system simulation of the 2ASK signal. The expected simulation effect of the 2ASK communication system is achieved. Under ideal conditions and with small noise, the system can realize error-free transmission of signals, thus ensuring the normal operation of the communication system. The successful implementation of the simulation model has a certain application value for long-distance signal transmission and provides a reference for the simulation design of the long-distance signal transmission.