Automatic Test Method of Typical Sensitive Equipment for Voltage Sag Withstand Characteristics Analysis

As production and life require more and more high-end and precise power equipment, high-quality electrical energy becomes the basis for the operation of these equipment. The impact of voltage sags on these devices has also increased. The quantification of the impact of voltage sags on various sensitive equipment through tests is an important basis for equipment manufacturers to improve the equipment’s ability to withstand voltage sag and users to take governance measures. The existing test schemes are to manually change the voltage sag conditions, repeatedly test, manually analyze the test data and draw the voltage sag tolerance curve. The actual process operation is trivial and has low degree automation, which consumes a lot of human resources. This paper put forward an auto test system, it comprehensively considers the characteristics of voltage sag, sensitive equipment types, attributes, and load status, automatically generates voltage characteristic vectors, automatically tests and resets the equipment, automatically analyzes the experimental results and draws the voltage sag tolerance curve, which greatly reduces the test time and labor costs.


I. INTRODUCTION
Voltage sag refers to the situation where the effective value of the output voltage suddenly drops in a certain period of time, and after maintaining for a period of time, it finally returns to the normal output voltage. Its duration is mostly from half a cycle to a few seconds. With the continuous development of the power industry, semiconductor manufacturing, precision processing, aerospace equipment and other high-end manufacturing have higher and higher requirements for power quality. Voltage sag accidents will cause inestimable losses in equipment production, operation and maintenance [1]- [3].
Equipment such as AC contactor (ACC), adjustable speed drive (ASD) and other equipment are applied to various occasions in the power system. While improving the actual working efficiency of these devices, the actual power system users are more susceptible to the impact of voltage sag due to these devices are intolerance to voltage sag. A large The associate editor coordinating the review of this manuscript and approving it for publication was Zhigang Liu . number of investigations on voltage sags have shown that when related equipment is subjected to voltage sags, related process control systems may be interrupted, which will cause production line interruptions and huge economic losses for users [4]- [8]. In order to understand the ability of these sensitive devices to withstand voltage sag so that effective prevention and treatment schemes can be taken. Relevant institutions have conducted a large number of mechanisms, simulations and experimental studies on different types of voltage sags and different equipment.
Reference [9] measured three equipment categories sensitive to sags: contactors, PCs and gas discharge lamps. A voltage waveform generator was used to generate sag voltage of different waveform. When tested contactors, a incandescent lamp was the load, the tester observed the light on and off to judge the working condition of the contactor. When tested PC, the tester considered PC failed to work when an automatic reboot occurred due to sag. When tested discharge lamps, if it did not reignite after the voltage recovery, it is considered the lamp failed to work normally. Reference [10] aimed to study the repetitive impacts of voltage sags due to the automatic reclosing of power distribution systems, tested some characteristics of low voltage loads under the voltage sag. A three-phase source simulator was used to generate test voltage, and a digital oscilloscope was used to record waveform, the tester judged the device if malfunctions or not by the waveform. References [11], [12] discusses the sensitivity of programmable logic controllers (PLCs) to voltage sags based on mechanistic analysis and numerous tests. A detailed sag-tolerance experimental scheme is proposed, and PLC sensitivity curves that differ from early curves are established through several experimental tests. However, this paper does not consider the time and labor cost of a large number of tests, and it takes a lot of time to analyze test data and draw curves manually. References [13], [14] analyzed the working mechanism of ASD under voltage sag, and built a test platform, however the oscilloscope is also used to record the electrical quantity of equipment, which needed the tester to analyze the test result. The above tests are all based on manual analysis of test results, which can not achieve automatic testing. References [15], [16] put forward the construction method of the experimental platform, the test steps and the method of analyzing the results for several typical sensitive devices, but only suggestions, no specific implementation. References [17], [18] aimed at the problems of low accuracy and large amount of test points in the standard, a dichotomy based test point selection method was proposed to ensure the test accuracy and reduce the number of test points. The threshold value is set and the algorithm is used to judge whether the equipment is faulty or not. It used the algorithm to automatically analyze the test data to realize the automatic test, but it only judged whether the equipment is faulty according to the test data, and does not design the algorithm to read the tolerance time of the equipment, so it does not make full use of the test data, and the dichotomy still has the problem of redundant test points.
In order to overcome above shortcomings, this paper builds an automatic test system platform based on AC programmable power supplies. Based on the existing standard test items and test schemes, a complete set of automatic test methods for voltage sag tolerance of sensitive equipment is proposed. Considering the shortcomings of traditional test point selection method, this paper proposes a new method of top-down with accurate calculation, which can realize the complete automation of the overall test, and greatly improve the accuracy and efficiency of the test. This automatic test system generates the required voltage sag characteristic vector for the typical test circuit of ACC, PLC and ASD. This system collects experimental data at the same time, automatically analyses and draws the voltage sag tolerance curve quickly. It greatly shortens the experiment time and reduces the workload of the experimenters, provides an experimental basis for quantifying the voltage sag tolerance of the equipment, and lays the foundation for understanding the tolerance level of sensitive equipment and formulating test standards for equipment tolerance levels.

II. VOLTAGE SAG CHARACTERISTIC AND TEST METHOD A. VOLTAGE SAG AND ITS CHARACTERISTIC
Voltage sag is one of the most common problems in power quality. IEEE Std. 1159 and other international standards define voltage sag as a decrease in rms voltage to between 0.1 pu and 0.9 pu for durations from 0.5 cycles to 1 min. A '20% sag' sometimes refers to a sag that results in a voltage of 0.8 pu or 0.2 pu. The preferred terminology when describing rms variations is retained voltage or remaining voltage. Therefore, in the absence of guidance, remaining voltage is assumed throughout this recommended practice. So this paper uses this method to describe the sag magnitude. For example, an 80% sag refers to a disturbance that resulted in a voltage of 0.8 pu as shown in Fig. 1 [19], [20].

B. VOLTAGE SAG TOLERANCE CURVE
According to the definition of the IEEE 1668-2014 international standard, the voltage sag tolerance capability is represented by plotting the voltage sag tolerance curve, as shown in Fig. 2.
The tolerance curve is the critical line between the normal operation area and malfunction area of the device when a voltage sag occurs. The normal operation area refers to the normal operating state of the device under the condition of voltage sag, and the malfunction area is the state when the device fails to work normally. In order to draw the voltage sag tolerance curve correctly, it is necessary to accurately judge the operating status of the device.

C. SELECTION OF TEST POINTS FOR VOLTAGE SAG TOLERANCE
In order to ensure the reliability of the experimental results, the accuracy of the tolerance curve and improve the test efficiency, it is necessary to accurately determine the operating status of the equipment. According to the IEEE international standards, there are many methods of selecting test points, such as the method of top-down or the method of improved closure. Fig. 3 is the method of top-down: There are many test loops in the method of top-down. In test loop 1, the duration is fixed (usually 100 cycles), and the amplitude of the voltage drop decreases gradually from the maximum test amplitude (such as 85%) at 5% intervals until you find the critical test point that caused the equipment to operate abnormally. So far, this test loop is over and the next loop begins. At this time, reduce the duration of the voltage sag and enter loop 2. Keep the duration unchanged (usually 50 cycles). The amplitude of the voltage sag will gradually decrease from 85% at 5% intervals until you find the critical test point of this test loop and repeat this procedure until all loops are tested. Obviously, when sag duration is short the device may not sensitive to this kind of voltage sag, it belongs to the 'Normal operation area' in Fig. 2. After tests, connecting all critical points will get the voltage sag tolerance curve. The interval of voltage amplitude and each test loop duration can be set according to the precision of voltage sag tolerance curve it desired to obtain.
However, this method needs to set many voltage amplitude to test in each test loop in order to obtain the critical point under each duration. For each set sag duration, you need to test many redundant voltage amplitudes to get the critical voltage amplitude. There are a lot of redundant tests obviously. So this method is very inefficient. And the real duration corresponding to the critical voltage amplitude measured by this method must be less than or equal to the set duration. For example, the sag duration set in a test is 100ms. After testing all the set voltage amplitudes, the critical voltage amplitude is 45%. In fact, although the sag lasts 100ms under this voltage, the device will not work properly, however the device may have stopped working normally at 90ms, so an error has occurred. In order to reduce the error, the interval between voltage reductions must be reduced or setting more loop which duration very close. Therefore, the method of top-down is very inefficient and not precise. According to the analysis of the method of top-down, it does not consider the characteristic of tested device, just proved a general test method. This paper only considers the typical sensitive device in power system, so this paper can improve the test method according to the characteristics of these devices.
If the working status of tested device can be judged by its voltage waveform, a method of top-down with accurate calculation can be put forward which can improve the test efficiency and accuracy.
As shown in Fig. 4, there is only one loop. First setting the voltage amplitude in a maximum value and reduce it by a fixed interval. For each test voltage amplitude, their sag duration is in the same time. The sag duration which can be set in the longest time that the research concerned. For a certain device, it can be thought that there is a sag duration in the longest time, if the device operates normally under a voltage sag which its sag duration is the longest time upon, it can think this voltage sag belong to the normal operation area. Those exceeding the set maximum time will not be considered. For each test point, its sag duration is the longest time above, and their voltage amplitude reduces by a fixed interval. For each stage of the test, its voltage waveform data can be collected. The normal working critical time (NWCT), which is the time between the beginning of voltage sag to the device malfunctions can be analyzed by algorithm proposed in this paper. So a NWCT of a certain voltage amplitude can get by just one test, rather than by a number of redundant tests. What's more, the NWCT get by this method is accurate than the method of top-down, because it is analyzed by the voltage waveform data.
Obviously, this method solves the problem of test point redundancy, and can accurately calculate the NWCT under different voltage amplitudes.

III. MECHANISM ANALYSIS OF IMPACT OF VOLTAGE SAG ON EQUIPMENT
Different sensitive equipment has different characteristics when voltage sag occurs, these characteristics are very important for the detailed design of automatic test system. The automatic test system is used for the typical sensitive equipment of power system, so this paper just considers the characteristic of these equipment. In order to judge the working status of typical sensitive equipment, the mechanism of different equipment needs to be analyzed before testing so that the voltage sag tolerance curve can be drawn. This section studies the characteristic of voltage at normal working status and failure working status of the typical sensitive equipment including ASD, ACC, Low-voltage release, PLC.

A. ASD WORKING MECHANISM ANALYSIS
As shown in Fig. 5, ASD can be divided into four main parts: rectifier circuit, DC circuit, inverter circuit and control circuit [21].
The rectifier circuit rectifies the AC voltage of the power grid into a DC voltage. The DC side capacitor filters out the harmonics in the DC voltage. The control circuit controls the inverter circuit to invert the DC voltage to PWM voltage, it also has the function of low voltage protection. When the power grid voltage is at the rated level, DC side capacitor voltage is in the normal working range. The control circuit control the inverter circuit to work normally and the ASD output PWM voltage. However, when the power grid voltage sags, DC side capacitor voltage may be lower than the normal working range, once control circuit detects DC side capacitor voltage is lower than the normal working range, control circuit will block the IGBT and inverter circuit will stop to output PWM voltage.
According to the analysis above, it can judge the working status of ASD by the voltage it output. Once ASD malfunction, it will stop to output PWM voltage.

B. PLC WORKING MECHANISM ANALYSIS
The programmable controller was developed on the basis of electrical control technology and computer technology, and gradually developed into a new type of industrial control device with a microprocessor as the core and an integration of automation technology, computer technology and communication technology. PLC has been widely used in the automatic control of various production machinery and production processes, and has become one of the most important, most popular and most applied industrial control devices. PLC is mainly composed of power supply module, CPU module, I/O interface, storage Modules and peripheral inter-  faces, extended interface as shown in Fig. 6. Among them, the power module circuit is the switch mode power supply (SMPS), which provides DC 5V or DC 24V for the module of PLC [11].
When a voltage sag occurs, it is most likely to directly affect the PLC power module. Taking into account the presence of DC side capacitor, the power module may still be able to output the voltage that makes the PLC work normally. Once the voltage output by the power supply module cannot make the PLC work normally, the program set by the PLC will be malfunction. PLC relays are actually composed of electronic circuits, registers and memory units. They all have relay characteristics, but no mechanical contacts. In order to distinguish this kind of components from relays in traditional electrical control circuits, they are called soft relays. So this soft relay can be used to help judging the working status of PLC. Write a program to control an input interface and an output interface to form a soft relay. When the power supply output voltage that makes PLC work normally, the soft relay is closed and the voltage of the output interface is equal to the voltage of the input interface, once the voltage sag causes the PLC to malfunction, the soft relay will open and the voltage of the output interface will be not equal to the voltage of the input interface. So the working status of PLC can be judged by the voltage of its terminals of the soft relay.

C. ACC WORKING MECHANISM ANALYSIS
The AC contactor is an automatic control appliance. It is mainly used to frequently switch on or off the AC circuit. The working principle of the AC contactor is shown in Fig. 7. When the power supply voltage is applied to both ends of the coil, current flows in the coil, and the static iron core generates electromagnetic attraction force. When VOLUME 10, 2022 the electromagnetic attraction force is greater than the spring pulling force, the moving iron core is attracted. When voltage sag causes the electromagnetic attraction force is less than the spring pulling force, the moving iron core is separated from the static iron core. Reference [22]. Input sag voltage on the coil, when the electromagnetic attraction force is greater than the spring pulling force, moving contact connects with static contact and the main circuit is closed, the voltage of two main circuit terminal is equal, when the electromagnetic attraction force is less than the spring pulling force, the moving contact is separated from the static contact and the main circuit is opened, the voltage of two main circuit terminal is not equal. So the AC contactor's working status can be judged by the voltage of the main circuit terminal.

D. LOW-VOLTAGE RELEASE WORKING MECHANISM ANALYSIS
As it can be seen from Fig. 8, when the voltage of power supply is normal, the electromagnetic force is balanced with the force of spring 1. The armature of low-voltage release lies in position '1,' the main contact of circuit breaker thus remains closed. However, if the magnitude of power supply drops to a certain value, the electromagnetic force is less than the force of spring 1. In this situation, the armature of lowvoltage release lies in position '2,' so the main contact of circuit breaker is disconnected. Therefore, it can be seen that the voltage protection of circuit breaker is realized through low-voltage release [23]. Input sag voltage to the low-voltage release, when the electromagnetic force is greater than the force of spring 1, the main contact of circuit breaker is closed and the voltage of the two terminal of circuit breaker is equal. When the electromagnetic force is less than the force of spring 1, the main contact of circuit breaker is opened and the voltage of the two terminal of circuit breaker is not equal, so the working status of low-voltage release can be judged by the voltage of the two terminals of the circuit breaker.

IV. THE DEVELOPMENT OF AUTOMATIC TEST SYSTEM FOR VOLTAGE SAG TOLERANCE CHARACTERISTICS OF TYPICAL SENSITIVE EQUIPMENT
Based on the mechanism analysis of impact of voltage sag on equipment, this paper builds an automatic test system plat- form, propose and implement automatic testing of equipment. In this System, the voltage sag characteristic command is automatically issued, the experimental data is automatically collected and analysed, and the automatic reset device resets the device. After the test, the voltage sag tolerance curve can be drawn automatically.

A. AUTOMATIC TEST SYSTEM PLATFORM
The development of the control system is the core of the automatic test platform. According to the diagram of the automatic test, the control system mainly has the following functions: 1) Human computer interaction; 2) Communication with programmable power supply; 3) Communication with automatic reset module; 4) Communication with data acquisition module; 5) Data processing, data storage and drawing voltage sag tolerance curve.
Considering the long experiment time, in order to keep track of the progress of the experiment and reduce the workload of the experimenters, the automatic test system should be able to realize remote testing, so C/S(Client/Server) or B/S(Browser/Server) architecture can be adopted. As for C/S architecture, it needs develop different version client software for different computer operating system such as Windows, Mac OS etc. However as for B/S architecture, it only needs to develop one version web page that can run in browser of different computer operating system. Obviously B/S architecture has better compatibility. So this paper take up B/S architecture.
B/S structure (Browser/server mode) is a network structure mode after the rise of web. Web browser is the most important application software of client. This mode unifies the client, centralizes the core part of the system function to the server, and simplifies the development, maintenance and use of the system. There is only one browser installed on the client which is the user interface, and the server installed remotely which will realize function of the test system and communicate with the browser, of course the server should communicate with other module of the automatic system. The overall structure of the system is shown in Fig. 9. This system includes six parts, namely browser, client, programmable power supply, automatic reset module, data acquisition module, database.
The server processes the function logic, and the browser renders the interface. Server and browser communicate through HTTP protocol. The programmable power supply generates sag voltage of various voltage waveforms. The Server communicates with programmable power through TCP protocol to issue command to the programmable power supply. As for ASD and low-voltage release, the equipment can't restart itself after the voltage returns rated voltage, so the server will communicate with automatic reset module through RS232 serial port communication to issue command, the automatic reset module will restart ASD or low-voltage release. The data acquisition module connects with the server through USB, the server calls the driver of the data acquisition card in the data acquisition module to collect voltage waveform data. The database stores voltage waveform data and experimental results. The server communicates with database through TCP protocol. The automatic test system platform is shown in Fig. 10.
The control system of the automatic test system consists of a browser and a server. The voltage sag tolerance test should consider voltage sag amplitude, duration, point-onwave (POW), phase-angle-jump (PAJ). The flowchart of automatic test system is shown in Fig 11, Based on the above analysis of test point selection and control system function, the control system workflow is shown below: 1) Setting test parameters, which includes max test voltage amplitude (percentage form, 0-100%), POW, PAJ and device under test, as for duration, it doesn't set manually, because it is set by default according to device under test.
2) The control system will verify the set parameters to prevent unreasonable parameters, such as a voltage amplitude is set to 120%.
3) If voltage amplitude is less than zero, the control system will go to step 7. If voltage amplitude is greater than or equal to zero and the device under test works in rated status, the control system will issue command to programmable power supply, the programmable power supply will generate test sag voltage waveform automatically. 4) Data acquisition module will collect voltage waveform data synchronously and judge the device working status and calculate the NWCT.

5) If the device under test doesn't malfunction or it can
restart by itself, the test voltage amplitude will minus reduction interval and back to the step 3. 6) If the device under test malfunctions and it can't restart itself, the control system will issue command to the automatic reset module and restart the device and back to the step3. 7) The control system will store the test result and voltage waveform data, and draw the VTC automatically.

B. DESIGN OF AUTOMATIC RESET MODULE AND DATA ACQUISITION MODULE FOR SENSITIVE EQUIPMENT
The ASD and low-voltage release need to be restarted manually when they malfunction. In order to reduce the cost of the reset device and improve the reliability and portability of the reset device, a single chip microcomputer (SCM), which is much cheap and reliable in industrial applications, is used as the control core of the automatic reset module.
As for ASD, it can restart by click its start button, therefore, the mechanical equipment responsible for clicking this button should be fast and the force should not be too large. The electromagnetic switch meets this feature. The action time of the electromagnetic switch is short, and its force is enough to click the start button and will not damage the button.
As for low-voltage release, it needs to push his putter to the top to complete the restart. So it needs enough force to push the putter, and the speed cannot be too fast, otherwise it may damage the putter. The electromagnetic switch is not suitable for restarting the low-voltage release due to its fast action. So the automatic reset module adopts linear motor with push rod. It has enough thrust to push the putter of the low-voltage release and the speed is moderate, will not cause damage to the putter.
The automatic reset module structure diagram is shown in the Fig. 12. Its core is the Microcontroller Unit (MCU). The control system communicates with MCU via the standard RS232 communication port. When it needs to restart the device under test, the control system will issue command to the MCU, and MCU will control the electromagnetic switch to click the start button of ASD or control the linear motor with push rod to push the putter of low-voltage release.
Data acquisition module is composed of the USB-4716 data acquisition card, three voltage transformers and a speed sensor. The voltage transformer transforms the voltage of the power supply or equipment to the input voltage range of the data acquisition card. The speed sensor measures the speed of the motor. The data acquisition card connected to the control system via USB. The control system can call the driver of the data acquisition to collect voltage waveform data.

C. RESEARCH ON DATA ACQUISITION AND ANALYSIS METHODS
In order to draw the voltage sag tolerance curve of the equipment, the traditional method needs to analysis the voltage waveform through an oscilloscope manually which takes a lot of time, and even leads to errors in reading results. This system uses the data acquisition module to collect the VOLUME 10, 2022 FIGURE 11. Flowchart of automatic test system. working waveform data, and uses sliding window algorithm to calculate the NWCT.
The NWCT is time between the start time of voltage sag (t 1 ) and the time of device under test malfunctions (t 2 ), as shown in equation 1: There is a delay time between the control system issues a command to the programmable power supply and the corre- sponding voltage of the power supply outputs. This delay time depends on the performance of the computer and equipment and is a random number, so t 1 cannot be simply considered as the moment when the control system issues instructions. This paper proposes a sliding window algorithm to calculate time.
As for t 1 , taking the output voltage sag waveform of the programmable power supply of Fig.13 as an example, when voltage sag occurs, the voltage value at this phase angle will change abruptly, and it will not be equal to the voltage value at the same phase angle of the previous cycle. As shown in Fig.13, it occurs voltage sag at t 1 , There is U between the voltage value at this phase angle and the voltage value at the same phase angle of the previous cycle. Therefore, a sliding window algorithm is adopted in this paper. As shown in Fig. 14. Comparing the data point at the end of the window with the data point at the beginning of the window to get U, as shown in equation (2). The window width is the number of some voltage data. The window will slide back from the first data point until U meets the stop criteria. The window width and stop condition is different at different purpose.
As for t 1 , the window width is one cycle width of the voltage. The frequency of the voltage is 50Hz, the data acquisition card will collect 200 data points of voltage at one cycle. So the window width is 200. The rated voltage amplitude is 220V, this system will consider the min voltage reduction interval as 1% (2.2V), which is a very high precision. Once U is greater than the threshold (U th ), the moment at the end of the window is the moment of the start of voltage sag (t 1 ). Obviously the U th should be less than 2.2V so this paper take U th as 1V. The stop criteria is shown as equation (3): As for t 2 , the device under test should be divided into two categories, the first category includes ACC, PLC, low-voltage release, and the other category includes ASD.
As for the first category, based on the analysis of section III, the working status of ACC can be judged by the voltage of the main circuit terminal, the working status of PLC can be judged by the voltage of its terminals of the soft relay, the working status of low-voltage release can be judged by the voltage of the two terminals of the circuit breaker. So the  automatic test system applies DC 24V to the terminals of the device above, and data acquisition module collects the voltage between the input terminal and the output terminal. If the device under test works normally, the voltage data will be 24 V, once the device work abnormally, the voltage data will decrease to zero, so the stop criteria of equation (3) can still be applied here. Considering that the DC voltage has a fluctuation of ±0.2V, the U th is taken as 0.5V. Once U is greater than the U th , the moment at the end of the window is the moment of the device malfunctions (t 2 ). Since the detected voltage is DC voltage, so the window width is taken as 1. As shown in Fig. 15, the moment of point A is the t 1 , and the moment of point B is the t 2 . The NWCT can be calculated by equation (1).
As for the second category, according to the analysis of the working principle of ASD, it can be known that ASD output voltage in the normal working status is PWM voltage. For the PWM voltage, the difference between two adjacent data points collected by the data acquisition card is very large. Usually the load of ASD is an asynchronous motor, when the ASD malfunctions and stops to output PWM voltage, the phase to phase voltage on the output side of ASD will induce sinusoidal voltage due to the motor still rotates because of inertia. Based on this feature, as shown in Fig. 16, the window width is taken as 1, and U will be a big value when ASD works normally, once it works abnormally, U will become a small value. So the stop criteria should be the equation (4): Since the difference between two adjacent data points in the induced sinusoidal voltage does not exceed 3V, so the U th is taken as 5V. In order to prevent the possibility of misjudgment, this algorithm adds a more criteria for ASD, that is, only U meets equation (4) for 30 data points continuously, the moment of at the end side of the first window in the 30 windows is t 2 . As long as the criterion is not met once in 30 windows, then the failure point previously considered is not the real failure point, and the search for a new failure point is restarted from here. As shown in Fig. 15, the moment of point A is the t 1 , and the moment of point B is the t 2 . The NWCT can be calculated by equation (1).
Before next sag is applied in tests, it should check that is or not the adjusted operating conditions are reached. As for the first category, when the voltage between their terminal is DC 24V, it indicates that the device is working normally and can start next sag. As for the second category, when the speed of motor reach to rated speed, it can start the next sag. Before restarting the device under test, it should also judge the status is or not stop completely. For the first category, if the voltage between their terminal is zero, it indicates that the device stops completely and can restart it. As for the second category, when the motor's speed reach to zero indicates the ASD can be restarted.

V. EXPERIMENTAL VERIFICATION OF TYPICAL EQUIPMENT AUTOMATIC TEST SYSTEM
In order to verify the effectiveness of the automatic test system in this article, this article uses an automatic test system to perform voltage sag tolerance tests on PLC, ACC and ASD. The automatic test system uses AC Programmable Co. Ltd. Power supply and data acquisition card is ADVANTECH USB-4716. The normal open contact of PLC is connected to the 24V switching mode power supply. In normal operation, the normal open contact is closed, the load input is 24V, and there is no power output in case of fault. The AC contactor uses Chint NXC90 model. The ASD is a Delta C2000 series with a power of 7.5KW and a motor of 2.2kW.
The test result of PLC is shown in Fig. 17. The tolerance curve is similar to the ''Rectangle.'' If the voltage amplitude is higher than the critical voltage or the duration is lower than the critical time, the PLC will not occur fault. According to the working principle of PLC, during voltage sag, there is still energy on the capacitor at the rectifier side. Once the sag duration is lower than the maximum time that the capacitor can provide energy or the voltage amplitude is higher than   the critical voltage, the energy on the capacitor at the DC side is sufficient to provide the energy required for equipment operation, and then PLC will not occur fault.
The test results of ASD are shown in Fig. 18, it can be seen that different types of voltage sags have different equipment voltage sag tolerance curves. The three-phase symmetrical voltage sag has the greater impact on the equipment than the two-phase asymmetric voltage sag. As shown in Table 1. When the single-phase voltage sags, the equipment still work normally because the ASD power is 7.5kW and the motor is actually 2.2kW. The large capacitance of the inverter can provide the motor with normal voltage.
For the voltage sag test of the ASD, if the test voltage interval is 5%, it can't be restarted immediately after ASD stops PWM modulation for the next sag, and it needs to wait for the motor to stop rotating before the next sag, so the program gives a certain time of 0 voltage to ensure the motor stops rotating after each test step. It takes about 35 minutes from setting test conditions to automatically generating ASD voltage sag tolerance curve.
The results of ACC are shown in the user interface of the automatic test system in Fig. 19.
In order to verify the efficiency of the proposed method, a large number of tests on voltage sag tolerance of sensitive equipment are carried out by using the automatic test method proposed in this paper and traditional manual test method respectively. As shown in Table 2, the average time is recorded and compared to verify that the method proposed  in the paper significantly improves the test efficiency, which has important project practical value.
From the above experimental results, it can be seen that the automatic test system in this paper can quickly complete the voltage sag tolerance experiment and automatically analyze the experimental data to generate the voltage sag tolerance curve, which greatly improve testing efficiency, and reduce labor costs.

VI. CONCLUSION
This paper creatively proposes and implements the automatic test of the device voltage sag. Developed a control system based on B/S structure, automatically generated voltage sag instructions through the control system, reset the device by the automatic reset module, collected data with the data acquisition module and analyzed the collected data using a sliding window algorithm, and drawn the voltage sag tolerance curve automatically. Finally, based on the analysis of the working mechanism of ASD, ACC, PLC and low-voltage release, the automatic test system in this paper was used to test them.
It can be known from experiments that using this automatic test system to test ACC, PLC or low-voltage release and get the voltage sag tolerance curve only need about several minutes. Compared with the traditional manual testing method, which requires a lot of manual operation and several days, it greatly improves the testing efficiency. Similarly, the ASD is tested by this system. It does not need to wait for reset manually, which greatly reduces the workload of testers. Although many researchers have built test platforms at present, these platforms need to manually change the test state and analyze the test results. The automatic test system in this paper realizes automatic test for the first time. With only a few parameters input, it can automatically test and draw the voltage sag tolerance curve. It lays the experimental foundation for the industry or users to formulate the voltage sag tolerance characteristic test standards, and take targeted control and preventive measures. This paper only analyzes three kinds of typical sensitive equipment, in the follow-up research, more types of equipment in industrial application can be studied to expand the application scope of the proposed automatic test system.