“Power line carrier communication is a communication method that uses the existing power line as a medium for information transmission. Widely used in power management system, industrial automatic control system, remote control system, intelligent community and other fields. Using the power line as the communication medium, there is no need to set up another communication line, and it does not occupy the existing spectrum resources. However, the signal transmission on the power line has large signal attenuation and large noise interference, which limits the application of power line carrier communication. Various technical measures must be adopted to improve the communication quality. At present, the most promising solution is to use the technologically advanced CDMA spread spectrum communication technology.
“
Author: Zhao Qing
1 Introduction
Power line carrier communication is a communication method that uses the existing power line as a medium for information transmission. Widely used in power management system, industrial automatic control system, remote control system, intelligent community and other fields. Using the power line as the communication medium, there is no need to set up another communication line, and it does not occupy the existing spectrum resources. However, the signal transmission on the power line has large signal attenuation and large noise interference, which limits the application of power line carrier communication. Various technical measures must be adopted to improve the communication quality. At present, the most promising solution is to use the technologically advanced CDMA spread spectrum communication technology.
2 CDMA spread spectrum communication
CDMA (Code Division Multiple Access) includes two basic technologies: one is the code division technology, and the other is the multiple access technology.
2.1 Code Division Technology in CDMA
The basis of code division technology is spread spectrum technology, and its purpose is to solve the communication under strong interference. According to Shannon’s theorem, under the premise of a certain signal transmission rate, increasing the bandwidth can reduce the requirement for the signal-to-noise ratio. Spread spectrum communication uses this principle to obtain low signal-to-noise ratio with broadband transmission technology. The bandwidth of the spread spectrum communication system is hundreds of times larger than that of the conventional communication system. Under the condition of the same signal-to-noise ratio, the spread spectrum system has a strong anti-interference ability. The most commonly used form of spread spectrum in CDMA is to multiply a narrowband:PSK signal with a pseudorandom code sequence. In this way, after the useful signal is processed by spread spectrum, the spectrum is broadened.
2.2 Multiple Access Technology in CDMA
The so-called code division multiple access refers to the use of a set of orthogonal (or quasi-orthogonal) pseudo-random code sequences (address codes) used in the spread spectrum to achieve the requirements of multiple signals entering the network at the same time. At the receiving end, despreading is performed using the correlation of the pseudo-random code, and the useful signal is restored to a narrowband spectrum. The wideband useless signal is not related to the local pseudo-random code and cannot be despread, and is still a wide-band spectrum; the narrow-band useless signal is expanded into a wide-band spectrum by the local pseudo-random code. In this way, only the useful signal is compressed, identified and extracted.
In this system, by adopting PL3200 type SoC. Apply CDMA spread spectrum communication to power line carrier communication system.
3 PL3200 type single chip system
3.1 Structure of PL3200
PL3200 is a single chip system (SoC) developed by Fuxing Xiaocheng Company. The system uses 5V single power supply, embedded 8051 enhanced high-speed microprocessor and direct sequence spread spectrum code division multiple access carrier communication module. It has the characteristics of low cost and strong function, and can be efficiently applied to the field of power line communication. Figure 1 shows the block diagram of the internal structure of the PL3200.
PL3200 is embedded with 8/16-bit high-performance, low-power microprocessor compatible core ALU. Under the same main frequency, it is 8 times faster than the standard 8051 microprocessor. Strong data processing ability. Configured with 256B+1KBSRAM (static random access memory), 16KB. E2PROM (electrically erasable/programmable memory) and 3 external interrupts provide users with abundant embedded resources and an ideal application development platform. In addition, the system has two full-duplex UARTs (Universal Asynchronous Receiver/Transmitter), one configurable for 38kHz infrared communication mode and the other for RS-485 communication mode.
For the application requirements of smart meters, PL3200 has built-in high-precision electric energy metering circuit, LCD/LED Display control/drive circuit, real-time clock and temperature sensor. The built-in serial program memory programming interface supports in-system programming (ISP). At the same time, it integrates complete voltage monitoring, power-on, power-down reset and watchdog circuits to ensure the reliability of the system during operation in an industrial environment.
3.2 The working principle of the communication module
The carrier communication module of PL3200 adopts the direct sequence spread spectrum communication method, and adopts the multi-address communication technology to extend the information to be sent to a wider frequency band with pseudo-random code sequence. PL3200 adopts QPSK modulation method to spread spectrum data, and its carrier center frequency is 120kHz. Because the system adopts Gold/Kasami sequence, the code division multiple access is realized, and the number of addresses can be up to 40, among which there are 32 Gold sequences. 8 Kasami sequences.
The PL3200 uses the same pseudocode sequence to recover the information at the receiver. The receiving process includes the acquisition and synchronization of the carrier signal. The acquisition is that the receiving module searches for the received signal before the spread spectrum sequence is accurately synchronized, so that the spread spectrum sequence of the received signal and the local spread spectrum sequence can be synchronized and maintained in phase, that is, the phase of the two is within a spread spectrum sequence symbol. Inside. After the acquisition is completed, it enters the tracking phase, so that the local pseudo-code can automatically receive the pseudo-random code of the signal to maintain precise synchronization. The tracking circuit uses an all-digital baseband delay-locked loop.
The specific setting of the PL3200 carrier communication unit is realized by writing the corresponding control words to the registers of different addresses of the carrier communication register group. In the carrier communication register group, the 00H register is used to indicate whether the carrier communication unit is in the receiving state or the sending state, and the receiving and sending flags of the data and frame header; the 02H and 03H registers can be set to select the type of pseudocode, address selection bits and The register of 04H is used to set the capture threshold value of the phase synchronization between the local and the received pseudo-code sequence; the register of 05H is used to set the precise synchronization threshold of the phase synchronization of the pseudo-code sequence between the local and the sender.
4 CDMA spread spectrum carrier communication system
4.1 Composition of the communication system
This paper designs a CDMA spread spectrum power line carrier communication system based on PL3200, the specific composition is shown in Figure 2.
The data is sent by the serial port RS-232 of host A (or host B), and sent to PL3200 after level conversion through the PC interface circuit. In the PL3200, the data is first received by the extended serial port UART (Universal Asynchronous Receiver/Transmitter), controlled and processed by the embedded 8051 microprocessor, and then sent to the carrier communication unit to perform CDMA direct sequence spread spectrum on the data. The spread spectrum signal is modulated by the carrier frequency of 120kHz and then output. This signal is power amplified, filtered and coupled to the low-voltage power line through the power line interface circuit to realize the power line carrier communication. on the receiving end. The signal on the power line is coupled out through the power line interface circuit, and the signal is filtered and limited. The amplitude-limited signal is sent to PL3200 for capture, synchronization and despreading processing, and is processed by embedded 8051. Data is sent by the UART serial port of PL3200. After the data is level-converted by the PC interface circuit, it is sent to the host B (or host A) by the RS-232 interface of the PC.
4.2 PC interface circuit
In this paper, hosts A and B both use PCs. PL3200 has 1 RS-485 serial port, while PC generally only has 2 RS-232 serial ports. In order to realize the connection between ordinary PC and PL3200, an interface circuit is designed in this paper, as shown in Figure 3. In the figure, MAX232 is a transceiver with +5V power supply, which is connected to the serial port of the computer to realize the level conversion of RS-232 interface signals and TTL signals. MAX485 is used to realize level conversion between TTL and RS-485. An industrial control computer can also be used as the host computer. The industrial control computer itself has an RS-485 interface, which can be directly connected to the PL3200, but the price of the industrial control computer is much higher than that of an ordinary PC.
4.3 Power line carrier interface circuit
The key to realizing high-quality and high-efficiency power line carrier communication is the corresponding power line carrier interface circuit in addition to the selected carrier modem. In this paper, the power line carrier interface circuit couples the carrier modulation and demodulation of PL3200 with the power line to realize the transmission of the carrier signal on the power line. The power line interface circuit includes a transmitting part, a carrier coupling part and a receiving part, as shown in Figure 4.
(1) Sending part
The transmitting part amplifies the power of the carrier modulation signal output by the PL3200, filters out the noise and spurious signals doped in the signal, and transmits the processed signal to the low-voltage power line with high efficiency. In Fig. 4, T1 and T2 form an NPN type composite tube, and T3 and T4 form a PNP type composite tube, thereby forming a complementary symmetrical power amplifier circuit. Among them, T2 and T4 use the same type of high-power tube to achieve symmetrical characteristic curves of the two. The carrier signal generated by PL3200 is output by P1.7, and after being amplified by the power amplifier circuit, it contains harmonics. The main transmission interference frequencies of the system are the second and third harmonics of the transmitted signal (the carrier center frequency of PL3200 is 120kHz, and the second and third harmonics are 240k.Hz and 360kHz, respectively). In order to reduce the harmonics to the power grid Wave pollution, need to filter and shape. The band-pass filter circuit composed of capacitor C4 and Inductor L2 performs shaping and filtering on the transmitted carrier signal.
(2) Carrier coupling part
When the PL3200 is in the sending state, the carrier coupling part couples the spread spectrum modulation signal generated by the PL3200 to the low-voltage power line: when the PL3200 is in the receiving state, the carrier-coupling part couples the carrier signal on the low-voltage power line, and sends it to the PL3200 from the SICIN pin . The carrier coupling part consists of transformer T, capacitor C5 and inductor L3. Transformer T selects a 1:1 isolation transformer. Capacitor C5 isolates the transformer from the power line. Filtering the 50Hz signal on the power line will prevent low frequency signals from entering the circuit and allow some high frequency signals to pass. In the unlikely event that capacitor C5 loses its ability to filter the 50Hz signal due to a short circuit, the interface circuit will be damaged. Therefore, C5 should choose the X2 type capacitor with short-circuit protection function. The capacitor C5 and the inductor L3 also form a band-pass filter to further filter the carrier signal.
(3) Receiving part
The receive circuit filters out noise from the grid that degrades the PL3200’s demodulation capabilities. For the receiving circuit, the passive filter is better than the active filter, because the active filter will generate a white noise equivalent to the received signal. The system selects passive band-pass filter (composed of C3, L1 and R7) and adopts the form of parallel resonant circuit. The center frequency of the parallel loop is determined by the values of capacitor C3 and inductor L1 and is designed to be 120kHz.
In order to avoid the damage to the interface circuit caused by the spike signal on the low-voltage power line, a bidirectional voltage regulator can be used for protection. When the voltage value of the received signal is equal to or greater than the voltage regulator value of the voltage regulator tube, the voltage regulator tube clamps the potential of the received signal to the voltage regulator value, thereby ensuring that the interface circuit will not be burned out. Generally, the interference between the live wire and the neutral wire is differential mode interference; the live wire and the ground wire. The interference between the neutral line and the ground line is common mode interference. Using a bidirectional voltage regulator only works on differential mode spikes and does not work on common mode spikes; when common mode spikes occur, it will cause damage to the circuit. The system uses three diodes D3, D4 and D5 to form a star structure, as shown in Figure 4. For differential mode peak signals, D3 and D4 form a bidirectional voltage regulator; for common mode peak signals, this star structure is equivalent to 2 bidirectional voltage regulators (D3 and D5, D4 and D5).
5 Software design of carrier communication system
The carrier communication of this system is bus communication, the normal state of the carrier unit must be set to the receiving state, and different communication addresses can be assigned to different carrier Modules. After the module receives the correct verification command, only modules with the same address are allowed to respond according to the protocol. The carrier communication rate is much lower than the main frequency. In order to improve the CPU efficiency, data reception and transmission are designed to be processed in an interrupt mode. Each time an interrupt is entered, the operation of data reception or transmission is completed. The main program flow of the system is shown in Figure 5.
6 Conclusion
The CDMA spread spectrum power line carrier communication system designed by the author has good anti-interference performance because PL3200 is used as the communication circuit. In the design of the interface circuit, according to the actual circuit conditions, select the appropriate capacitors and inductors and other components, and select the power amplifier circuit with better performance. It can achieve low-cost, long-distance, high-quality communication effects.
The Links: LQ057V3DG02 M190PW01 V0