Design of Intelligent Fast Switch Controller Based on CPLD

. In view of the large volume, complex structure and many transmission links of the current circuit breaker operating mechanism, a new type of electromagnetic actuator and electronic controller are used to shorten the operation time. This paper introduces the hardware and software design of an intelligent fast switching controller based on CPLD. The hardware circuit design of the controller is mainly described, including power supply conversion and charging voltage monitoring, switch state monitoring, control command monitoring, relay output, LED indicator and split switch driving module. The optocoupler isolation is realized between input and output, and the thyristor module is used to drive the capacitor discharge. The feasibility of the design circuit is verified by the actual sampling waveform, which has the advantages of high-speed operation, intelligent control, high technical performance and reliable operation.


Introduction
With the expansion and intelligent development of the power system, high requirements have been put forward for the intelligent circuit breaker. In many fields and occasions, the demand for high speed switching of power energy transmission is increasing steadily. In recent years, the development of high speed mechanical switches has become a hot spot of research. On the basis of subsequent research, it is easy to form a series of intelligent switchgear and complete sets of devices in the field of distribution. It is popularized and applied in the power system to significantly improve the control and protection level of the power grid. The development of fast switch with intelligent operation function has become the main development direction of switchgear in power system. The high voltage circuit breaker plays an important protective role in the power system and provides strong guarantee for the reliable operation of the national power grid [1]. This paper introduces the hardware and software design of an intelligent fast switching controller based on Xilinx's high performance CPLD. In the hardware design, optocoupler isolation and TVS design are used to complete the design of the fast switch controller, realize the specific functions and debug. The controller can not only realize the basic functions of voltage charge and discharge management, opening and closing control, but also realize the function of opening and closing position detection and voltage undervoltage lockout alarm, which further improves the reliability of the system.

The overall structure of the controller
The core of the intelligent switch controller uses the high performance integrated chip CPLD of Xilinx company, supplemented by 3.3V/5V bidirectional level-shifting chip to realize the connection communication between different systems. Among them, CPLD belongs to the scope of large-scale integrated circuits. It is a kind of digital integrated circuit that users construct their own logic functions according to their own needs. High-speed, low-power level-shifting chips are fabricated using advanced bi-metal CMOS technology. The hardware circuit mainly includes power module, capacitor voltage monitoring, switch state detection, switch on and off command, thyristor drive, output relay, LED display and so on. The controller adopts module seal, and the reliability and speed of operation are greatly improved, so that the circuit breaker can be better integrated into the smart grid [2]. The overall structure of the system is shown in Figure 1.  Figure 1. The overall structure of the system 3 The hardware design of the controller In the hardware system, the power supply conversion module supplies the control unit with +3.3V and +1.8V working power. The collected capacitor voltage, switch status, control command and other signals are sent to the CPLD through the level conversion chip after the monitoring module, and then the logic judgment of the switch is carried out. Finally, the status output, the LED display and the opening and closing command are triggered to trigger the thyristor module drive to complete the opening and closing operation..

Power supply module
When the operating mechanism is operated, it needs to obtain a large excitation current in a short time. In this paper, three 22000 μF, 350V energy storage capacitors are used to supply the switching coils, thus ensuring that the circuit breaker can complete the operation of closing, opening and reclosing, and matching the corresponding capacitor charging module to realize the storage capacitor charging management [3]. A stable and reliable power supply is essential to ensure reliable operation of the controller. For the power supply system of the intelligent controller, the circuit board adopts three power supply modes, 220V AC power supply, 220V DC power supply and three 350V switching capacitors. The input voltage is processed by the safety isolation transformer, rectifying circuit, DC/DC power supply module and low voltage differential voltage regulator of the power module, and then output +3.3V, +1.8V, +5V, +15V DC for the internal components of the circuit board, which can supply the working power of the +3V and +1.8V to the complex programmable logic devices.

Capacitor voltage monitoring module
The lack of energy in the capacitor leads to the failure of the circuit breaker's closing operation, thus affecting the normal operation of the power grid. To prevent this from happening, the equipment must monitor the voltage of the storage capacitor before the closing operation [4]. In the judgement of closing capacitor voltage, the input C_close is the closing capacitor voltage. After dividing by R 12 and R 19 , the input of pin 2 of the voltage comparator LM293 is V 2 , where R 12 =2200kΩ, R 19 =28k Ω. JZ1 is a voltage regulator diode, providing the reference voltage 2.5V, that is, the input V 3 of pin 3 in LM293 is 2.5V. When the capacitor voltage C_close is less than 199V, V 3 is greater than V 2 , and the voltage comparator is driven by the pull resistance R 13 . The pin 1 outputs the high level, triggers the optocoupler conduction, and the switching capacitor voltage monitoring On_Vdetect is low level; On the contrary, when the capacitance voltage C_close is greater than 199V, the switching capacitor voltage monitoring On_Vdetect is high level; The value of On_Vdetect of the closing capacitor voltage monitoring is 0/1 (0 means low level, 1 means high level). and enters CPLD through level conversion chip, so as to make logical judgement. That is, when the capacitor voltage is lower than the set value 199V, the output is low level, indicating the low voltage locking of the capacitor, and the closing operation of the circuit breaker is prohibited. When the capacitor voltage is higher than 199V, the CPLD will release the low voltage locking of the capacitor, allowing the closing operation to be carried out [5][6]. The maximum voltage of the energy storage capacitor is 350V DC. The closing capacitor voltage monitoring circuit is shown in Figure 2, and the analysis is shown in Table 1.

Opening and closing drive module
The driving circuit of opening and closing is basically the same. The main and auxiliary thyristor drive circuits are used to ensure the reliability of the operation of the separation and reclosing operation. In the closing coil drive circuit, the optocoupler MOC3052 is used as the core driver chip of the thyristor module to improve the anti-interference ability of the system. The device is composed of two parts of input and output. The input stage is an AlGaAs infrared light emitting diode. The diode produces enough infrared light to trigger the output part under the action of 5-15 mA forward current. The CPLD signals the MOC3052, 1/2 is the primary side trigger control, and the on trig signal is provided by CPLD, the pulse width is 20ms, and the low level is effective. The pin 6 is the side trigger thyristor signal Trig on, which triggers the switching thyristor module gate pole. The output pulse signal drives the thyristor module to be connected, so that the closing coil is electrified and the circuit breaker completes the closing operation. The closing thyristor trigger circuit is shown in Figure 3.

Status output relay
There are three output relays in the controller, which are fault state output relay, opening state output relay and closing state output relay. In the closing state output relay, the output of the photosensor shows the closing state. The high level of the closing state means that the switch is in the closing position, and the low level means that the switch is not closed; the high level of the closing relay means that the relay is turned on, and the low level means that the relay is turned off.

The software design of the controller
When designing the software of the intelligent controller, it is necessary to ensure the realization of the functions of capacitance voltage monitoring, opening and closing position monitoring, opening and closing command monitoring, etc. Finally, the operations of the opening, closing, reclosing are completed by the opening and closing drive, and the current state of the circuit breaker can be accurately displayed to the operator. The basic design method of CPLD is to utilize the integrated development software platform, which uses schematic diagram and hardware description language to generate corresponding target files. The designer uses the download cable to transfer the code to the target chip , so as to realize the design of the digital system. The software design of the controller uses the hardware description language VHDL, which was created by the United States Department of defense in 1983. It is one of the main hardware description languages of the electronic design, which has good description of circuit behavior and powerful system description ability. The program has the advantages of modularization, subroutine and independent hardware circuit [7].
The perfect software function can guarantee the normal work of the system, and give full play to various functions of its hardware design. It not only requires the software part to control the operating mechanism, but also requires the software to monitor the system voltage, switch position and signal processing, so as to improve the system protection function. [8]. The closing logic satisfies the following four conditions at the same time: the closing capacitor voltage is normal, the switch is in the state of opening, the controller has no alarm signal and the closing order is effective. The logic of the main opening logic is divided into the main logic and the auxiliary logic, in which the main opening logic satisfies the following conditions: the main opening capacitor voltage is normal, the switch is not in the division position, and the opening command is effective. the auxiliary opening logic satisfies the following conditions: the main opening capacitor voltage is abnormal, the auxiliary opening capacitor voltage is normal, the switch is not in the division position and the opening order is effective. When any of the following conditions occurs, the controller will alarm, that is, the opening and closing command is valid at the same time, the closing capacitor voltage is abnormal, the main opening capacitor voltage is abnormal, the auxiliary opening capacitor voltage is abnormal, the switch state is abnormal, and the switch refuses to operate. The main program flowchart of the system is shown in Figure 4.

Analysis of test results
In the test and measurement, the shunt is connected in series, and the closing test is connected to the 50A/75mV specification shunt, and the opening test is connected to the 100A/75mV specification shunt. The oscilloscope is used to measure the voltage variation of the shunt through an active detection probe to represent the current wave passing the coil. By recording current waveform, opening/closing time datas, the performance of the circuit breaker is further analyzed. The opening / closing waveform meets the requirements of the theoretical design. It can meet the requirements of opening / closing drive and meet the design parameters requirements of circuit breakers [9]. The controller circuit board is shown in Figure 5. The opening time test waveform is shown in Figure 6. The closing time test waveform is shown in Figure 7. For ease of drawing, the voltage of the opening and closing command voltage is the actual value divided by 40. The circuit breaker test data is shown in Table 2.

Summary
An intelligent fast switch controller based on CPLD is designed in this paper. The design process of each component of the controller system is described in detail, and the specific circuit diagram is given. After debugging and testing the prototype, the capacitance voltage monitoring circuit has high accuracy, and the current and time of closing and opening are within the design parameters. The controller has high reliability, fast response and good electromagnetic compatibility, which can fully meet the intelligent requirements of modern power system.