Method for realizing communication signal transmission simulation

Abstract: A more realistic simulation method is proposed. Two PCs with sound cards are used to simulate the transmitter and receiver in the communication system to simulate the continuous signal transmission in the channel. good results.
Keywords: Sound Blaster serial communication wav file
1 Introduction In the research and development process of communication systems, computer simulations are generally required to verify the correctness and feasibility of the design scheme. However, in the process of computer simulation, because the mathematical model is too ideal to reflect the problems that may be encountered in the actual system development, the simulation is not real and cannot play its due role. For example: in a wireless communication system, The clock frequencies of the transmitter and the receiver drift randomly, the ideal waveform is not ideal, the sine wave phase randomly jitters, etc. These factors are difficult to express with mathematical expressions in the simulation. This paper presents a more realistic simulation method, which uses two PCs with sound card to simulate the transmitter and receiver respectively. The "transmitter" is connected to the A / D input of the "receiver" through the D / A output analog signal to simulate the transmission of continuous signals in the channel. The application of simulation experiments in multiple projects shows that this method can carry out simulation experiments more realistically, which can expose some problems that may be encountered in the actual communication system and achieve good benefits. This article introduces the above method through the simulation of a digital communication system.
2 System hardware structure The digital communication simulation system introduced in this paper is a digital communication system based on continuous channel transmission. It consists of three parts: "transmitter", "receiver" and continuous channel emulator. "Transmitter" is composed of coding, digital modulation, up-conversion and D / A converter realized by PC software; "receiver" is composed of A / D converter and digital down-conversion, demodulation, decoding and data realized by PC software The output and Other Parts are composed; the continuous channel is simulated with a simple adder with a "channel" noise interface. Programming tools mainly use MATLAB, C + + Builder 5.0. In addition, the two PCs are connected through the RS232 serial port to form a signaling channel, which is used to start the experiment synchronously.
2.1 A / D and D / A
The system's A / D and D / A are completed by the innovative company's SoundBlaster AWE64 sound card, which is a voice acquisition and processing card that can be controlled by programming. Its A / D and D / A support 8-bit and 16-bit stereo recording and playback and user-selectable sampling rates from 5kHz to 44.1kHz. AWE64 is equipped with a voice processing DSP, which can complete functions such as A-law and μ-law voice compression and 3D effect synthesis. It is a highly professional and efficient processing chip. Digital signals are obtained by discrete sampling of continuous signals. The highest frequency of the signal represented by the same digital signal is only related to the sampling interval, and it is not necessary to directly use the value of the sampling interval when performing various digital signal algorithms. Therefore, through Sound Blaster The continuous signals of A / D and D / A of the card can represent signals in any frequency band from 0 to tens of megahertz. That is to say, this simulation system can realistically imitate the communication system of various frequency bands.
There are two options for software programming to control the sound card to perform A / D and D / A operations: one is the dedicated development environment supporting the sound card, the developed system can only run on the sound card supported by the support; the second is the Windows application development software, such as VisualC + , C + + Builder, etc., the developed system can adapt to different sound cards. This system adopts C ++ Builder 5.0, writes the data to be sent and received into files in Wave format, and uses the Medi aPlayer control to complete A / D and D / A conversion.
The Wave format is a sound file format developed by Microsoft Corporation. It conforms to the RIFF (Resource Interchange File For mat) file specification and is used to save audio information resources of the Windows platform. It is widely supported by the Windows platform and its applications. The Wave format supports MSADPCM, A-law, μ-law, and other compression algorithms, and supports multiple audio digits, sampling frequencies, and channels. It is the most popular sound file format on a PC. Generally speaking, changing the wave format is to modify the sampling frequency flag, data length and speech length flag. Each sample value of the WAVE file is contained in an integer i, and the length of i is the minimum number of bytes required to accommodate the specified sample length. First, the least significant byte is stored, and the bit representing the sample amplitude is placed on the most significant bit of i, and the remaining position is 0.
2. 2 synchronous handshake control circuit The synchronous handshake signal is transmitted through the RS232 serial communication interface. The serial port gets 8 bits of data from the CPU each time, and then sends the data out bit by bit through a line. There are generally two such serial ports on the PC: COM1 and COM2. The program can access one of the interfaces at a time. This article is to connect the two COM1 to realize the mutual transmission of handshake signals.
2.3 Sound card connection Generally, the sound card equipped with the PC provides four interfaces: linear input, linear output, microphone input, and speaker output. Usually the audio cable is used to connect the speaker output of the sending computer and the microphone input of the receiving computer.
3 System software process software is the core part of the system, completes modulation, demodulation and control of A / D, D / A and handshake signals. The workflow is described as follows.
3.1 The overall process of the system The work of the entire system is completed by two computers in non-real time. Need to shake hands through the serial port to ensure that the system is in a coordinated working state, the detailed process is shown in Figure 1.

3.2 The software process of the sender The sender quantizes the modulation signal generated by MATLAB and converts it into the wav format. The D / A conversion frequency is 19.2kHz. The process is shown in Figure 2.

3.3 The software flow of the receiving end The sampling frequency of the receiving end is 22.05kHz, save the signal as a wav file after receiving the signal (add the wav header file before receiving the data), use the MATLAB command wavread to read, get the data file, and the receiving end processing flow As shown in Figure 3.

3.4 Serial port programming RS-232 serial port is simple in composition and convenient in programming control, so it is widely used. In terms of software programming control, the operating system provides a corresponding programming interface, allowing developers to flexibly control the serial port work. WINDOWS system adopts message drive and equipment unified management, and uses messages to control the program, so it has more advantages than DOS. At the same time, the SDK of Windows provides a complete API (application program interface) function and a communication driver program driven by an interrupt mode, making programming easier. Windows communication is generally based on the WOSA (Windows Open Service System) model. In this model, applications at the upper layer exchange data with device drivers at the lower layer by calling various communication APIs. Windows is no exception for reading and writing serial ports. By calling the Win32 serial communication API function, you can write a serial communication program. In the Win32 environment, reading and writing to the serial port is like reading and writing to a file, except that the file handle at this time points to a serial port. In addition, you can make full use of the characteristics of Win32's multi-tasking, write a communication program with better real-time performance. There are four main methods of serial communication under the Windows platform, namely: synchronous mode, asynchronous mode, query mode, and event-driven mode. Among them, the event-driven method is an efficient serial port reading method. This method has high real-time performance, especially for the expansion of multiple serial ports. It is not required to query all serial ports in turn like the query method. Like the interrupt mode, only when the set event occurs, the application program will process the information after it receives the message from the Windows operating system, to avoid data loss. In this experiment, serial communication uses an event-driven approach. When the character $ is received, the serial port receiving program is started to process the information sent by the sender and make corresponding operations. This requires the handshake signal to be sent. The basic format is $ + handshake signal. Experiment The results show that this serial port handshake communication solves the problem of system cooperative work well, and at the same time, the experiment has also achieved good results.
4 Conclusion This paper proposes a communication system simulation method. This method uses two PCs with a Sound Blaster to imitate the transmitter and receiver, respectively. The connection from the Sound Blaster D / A to A / D represents continuous channel transmission. This simulation method can realistically imitate various communication systems in different frequency bands, in which all the transmission and reception signal processing are implemented with high-level language programming. It can expose the special problems that may be encountered in the actual communication system more than any simulation system based on a computer, so that the authenticity of the simulation experiment and the actual working efficiency are greatly improved. It is a good method worth promoting.
references
1 John G. Proakis, translated by Qi Huailiang. Digital CommunicaTIons. Beijing: Electronic Industry Press, 1998
2 Miao Kai. Use Windows timer to realize serial communication control. Computer World, May 1999
3 Gou Shuai and Zhang Jun are equal. C ++ Builder 5.0 Programmer's Guide Programmer's Guide. Hope Electronic Publishing House, 2000
4 Peter W. Gofton, Wang Zhongwen and other translations. Proficient in serial communication. Beijing: Electronic Industry Press, 1995
5 Wang Jun. VB5 serial communication program based on Win95. Computer World, April 1999

Our company is specialized in supplying Capacitor . CBB60 CBB61 CBB65 250v SH AC Motor Run Capacitor . Capacitance: 1 to 180uF . Capacitance tolerance: ±5% or ±10% .

Working voltage:250VAC,300VAC,350VAC,370VAC,400VAC,440VAC,450VAC,500VAC,600VAC

Lead material: AMP 250 tin-plated brass QCs, lead wire(made by ourself,with UL,VDE approval) or cable.Outer shape: UL 94 V-O fire-retardant round or square plastic case or aluminum can and epoxy-resin sealed.Small size, small loss and excellent self-healing property.Very small dissipation factor, small inherent temperature rise.High insulation resistance.Good capacitance stability.

Available for motor run, electric pump,well pump, water pump,cooker hood,washing machine, refrigerator, fan, air exhaustor, air-conditioner,air compressor,light,fluorescent lamp,daylight lamp,halogen lamp, high pressure sodium lamp,etc.

Capacitor

Ac Capacitor,Electrolytic Capacitor,Motor Start Capacitor,Motor Capacitor

ZHEJIANG ICE LOONG ENVIRONMENTAL SCI-TECH CO.,LTD. , https://www.china-refrigerantgas.com