Method for Automatic Calculation of Two-Way Switching Time of Power Supply Panel
By automatically acquiring voltage drop waveforms with an oscilloscope and analyzing them using control software algorithms, accurate calculation of the switching time between two power supply channels was achieved. This solved the problems of cumbersome testing and errors in existing technologies, and improved testing efficiency and accuracy.
Patent Information
- Application Number
- CN202310016334.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-01-06
AI Technical Summary
In the existing technology, the two-way conversion test process of the power supply panel is cumbersome and inefficient. The waveform captured manually is inaccurate and prone to errors. In addition, the data error caused by human testing may lead to the power supply panel output power loss, causing the power supply equipment to shut down.
The system automatically acquires voltage drop waveform data using an oscilloscope, analyzes the waveform frequency and amplitude using control software algorithms, accurately predicts waveform change points, and automatically calculates power transition time, thus achieving waveform capture and time measurement.
This improves the efficiency and accuracy of two-way switching tests for power supply panels, reduces the risk of defective products entering customers, reduces reliance on manual operation and errors, and ensures the reliability of the tests.
Smart Images

Figure CN116224133B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway signal power supply technology, and more specifically, to a method for automatically capturing two-channel switching waveforms and automatically calculating voltage drop time in a power supply panel. Background Technology
[0002] Railway signal power supply equipment standards require that the switching time between two input power sources (including manual and automatic) should not exceed 0.15 seconds. The power supply panel system has two power sources; if one fails, it will automatically switch to the other. This switching process must not exceed 150ms, therefore this parameter must be tested during product completion inspection. The test site is the common terminal of the two-way switching output voltage of the power supply panel. That is, during the two-way switching process, the output voltage at the common terminal of the two-way switching will experience a voltage drop. The waveform of this voltage drop is as follows: Figure 1 As shown in the figure: A: represents the amplitude of the sine wave; t: t represents the time axis. Figure 1 The waveform shown is a sine wave. The arrow in the figure points to the position where the output voltage drops and the time occur during the two-way switching process of the power supply panel, which is the test position of this invention.
[0003] The typical method for testing the voltage drop time of a sine wave is as follows: An oscilloscope probe is clipped to the output, and the voltage drop time at the AC output terminal is manually captured. This process requires multiple operators, with one person manually operating the two-way switch. This operator must coordinate with the person capturing the waveform on the oscilloscope before the switch. This method requires close coordination and multiple captures. After capture, the oscilloscope cursor must be manually moved to measure the power-down time. The entire testing process is cumbersome, slow, inefficient, and prone to errors, making it unsuitable for automated testing. Furthermore, if the captured waveform is inaccurate, manual data readings will introduce errors. If the switching time exceeds 150ms and is not detected manually, the power supply panel will lose power during the two-way switching process, causing a power outage. If such equipment is put into use, it will lead to serious quality complaints.
[0004] Therefore, there is an urgent need to develop a control method that automatically captures waveforms and automatically calculates conversion time, so as to reliably and effectively achieve waveform capture and time calculation, improve inspection rate, and reduce the flow of such defective products to customers. Summary of the Invention
[0005] The purpose of this invention is to solve the problem of two-way switching testing of power supply panels, complete the test automatically, capture the precise switching time, and obtain it automatically through a test algorithm, thereby improving test efficiency.
[0006] This invention provides a method for automatically capturing waveforms and automatically calculating switching time for a power supply panel with two-way switching. During the testing process, the oscilloscope accurately captures data points after receiving a control command, and the control software calculates the AC output voltage drop time based on the acquired waveform data using a software algorithm. This method can reliably and quickly detect the two-way switching of the power supply panel, reducing the risk of defective products entering the customer's possession.
[0007] This invention provides a method for automatically capturing two-channel switching waveforms and automatically calculating switching time in a power supply panel, comprising the following steps:
[0008] 1. Use an oscilloscope to sample the drop time waveform using the test start command; read the waveform data points through the oscilloscope's network port and store them in the storage space allocated by the project program.
[0009] 2. The AC power supply is a sinusoidal waveform. By analyzing the trend of the AC waveform, the voltage amplitude and frequency of the first two and last two AC waveforms are found.
[0010] 3. Based on the voltage amplitude and frequency of the two AC waveforms found before and after, and the standard formula of the sine wave, predict the trend of the changing sine wave before and after. By comparing the predicted trend waveform points with the corresponding time points collected by the actual oscilloscope, find the moment when the waveform changes abruptly before and after. The time difference between the two moments is the switching time between the two power supplies.
[0011] In the first step, the control system provides a signal to test the conversion between the two channels. This signal is simultaneously sent to the oscilloscope. After receiving the signal, the oscilloscope prepares to acquire the output voltage of the power supply panel. The timing of the signal transmission and reception is synchronized.
[0012] The specific implementation steps of step 2 are as follows: The control software will search for and determine the first zero-crossing data point from the collected data point one by one; this point is used as the starting point for cycle determination. The zero-crossing point refers to the zero position that the waveform passes through when it transitions from the positive half-cycle to the negative half-cycle; after analyzing the amplitude and frequency of the waveform, the collected data will be analyzed starting from the first zero-crossing point after the second cycle. Based on the fundamental wave data and the theoretical formula of the normal sine wave stored in the data structure, the theoretical value of the next data point is predicted. The difference between the predicted waveform amplitude and the actual waveform point value is calculated. When the data deviation exceeds the percentage of the set deviation value, it is determined as the waveform drop start point Point1; the end point Point2 is determined by analyzing backward from the last collected data point to find the first zero-crossing point. After finding the first zero-crossing point, it is necessary to analyze the waveform data for two more cycles. Based on the waveform data of the two cycles that have been found, the amplitude and frequency of the waveform are analyzed to generate a comparison fundamental wave, which is convenient for finding the end point Point2; the zero-crossing point refers to the zero position that the waveform passes through when it transitions from the positive half-cycle to the negative half-cycle.
[0013] The specific steps for implementing step 3 are as follows:
[0014] 1) Based on the voltage amplitude and frequency of the two AC waveforms found before and after, the corresponding waveform formula can be generated according to the standard formula of the sine wave.
[0015] 2) Predict the trend of the preceding and following sine waves using the formula of the generated sine wave, that is, calculate the points of each time interval using the formula, so as to use for comparison of the corresponding points in the future.
[0016] 3) Compare the predicted trend waveform points, i.e. the points generated in step 2) above, with the corresponding points acquired by the actual oscilloscope. Subtract each pair of values and compare the result with the measured value. When the percentage value is greater than the program setting value, it is the moment of change. This process requires comparing each point to find the location of the change before and after the waveform.
[0017] 4) By subtracting the two positions from the locations of the mutation points found in step 3), we can obtain the number of differences between the two positions;
[0018] 5) The oscilloscope can be used to obtain the cell time and the number of points in each cell at that time. The time interval between any two points can be obtained by using the formula: cell time / number of data points in the cell.
[0019] 6) By multiplying the point difference between the endpoint and the starting point found in step 4) and the time interval between the two points calculated in step 5), the switching time of the two power sources can be obtained.
[0020] The present invention has the following beneficial effects:
[0021] The purpose of this invention is to address the shortcomings of existing methods that use oscilloscopes to manually acquire the switching time between two power supplies on a power supply panel (the shortcomings mainly include low acquisition efficiency, inaccurate waveform recognition, and individual differences in manual acquisition readings), and to provide a method that can automatically and accurately acquire the switching waveforms between two power supplies using an oscilloscope and automatically determine the AC dropout time.
[0022] This invention uses a specific algorithm to accurately analyze the acquired waveform, determining its frequency and amplitude. This allows for precise prediction of subsequent waveform trends, enabling rapid and effective identification of waveform change points and subsequent calculation of the conversion time. This effectively solves the problems of randomness, difficulty in acquisition, and inaccurate readings in capturing two-channel conversion waveforms during actual production. This method improves the efficiency of verifying the conversion time of two-channel power supply panels in the workshop, increases the accuracy of waveform capture, and enhances the ease of operation for workers. Simultaneously, it reduces the skill requirements for operators and decreases the number of operators, thus reducing costs and increasing efficiency in factory production.
[0023] This invention has good versatility and can be used not only for two-way power conversion, but also for other projects that require waveform sampling analysis. Through the calculation method concept of this invention, it automatically finds the differences and solves the problem of difficulty in capturing and finding data. Attached Figure Description
[0024] Figure 1 AC output voltage drop waveform diagram;
[0025] Figure 2 A schematic diagram of the steps performed in a specific embodiment of the detection method provided by the present invention;
[0026] Figure 3 This is a schematic diagram of the test waveform;
[0027] Figure 4 A flowchart (test software flowchart) for calculating drop time is provided for this invention. Detailed Implementation
[0028] The invention will now be further described with reference to the accompanying drawings.
[0029] See Figure 4 (Test Software Flow) This invention provides a method for automatically capturing two-channel switching waveforms and automatically calculating switching time of a power supply panel, which specifically includes the following steps:
[0030] 1. Before testing, the software will request and store a continuous array of waveform databases, with 100,000 data points per channel.
[0031] 2. The control system sends a test signal for the two-channel conversion, which is simultaneously sent to the oscilloscope. After receiving this signal, the oscilloscope prepares to acquire the power supply panel output voltage. The timing of this signal transmission and reception should be synchronized.
[0032] 3. After the test signal is given in step 2, the oscilloscope acquires waveform data, which is then sent to the control system software one by one;
[0033] 4. Connecting to step 3, the control software reads the waveform data of the oscilloscope test channel one by one (each data includes the amplitude of the acquired sine wave) and stores it in the waveform array (the storage space allocated in step 1).
[0034] 5. After step 4 is completed, the control software will start from the very beginning of the collected data (the data placed in the storage space, which has been stored in the data middle opened in step 1). 2 Start searching through each data point and determine the first zero-crossing point. 1 (See Figure 2①) Data; Because the zero point data of the sine wave is relatively easier to find and judge than other point data, this invention uses this point as the starting point for cycle judgment.
[0035] The aforementioned zero-crossing point: In this article, it refers to the zero point that the waveform passes through when transitioning from the positive half-cycle to the negative half-cycle, as shown below. Figure 2 In this invention, the zero-crossing point is not limited to positive or negative zero-crossing; both can be applied.
[0036] 6. This invention utilizes front-end and back-end interpretation. Since this invention focuses on the duration of the drop waveform, the definitions before and after the waveform are no longer executed in chronological order. Therefore, to better understand the test method, the following definitions are used: Figure 3 The front end is on the left, and the back end is on the right.
[0037] 7. Determining the zero-crossing point requires comparing each collected data point with the zero point, and determining the zero-point position by analyzing the data magnitude trend. Starting from the first found zero-crossing point, data is retrieved from the storage space. Each data point is compared with the standard sine wave data. When the second zero-crossing point is found, the first sine wave data retrieval is complete. This method is then used to find the second sine wave. After finding two complete sine waves, the system software analyzes the waveform amplitude and frequency one by one from these data points, according to the data time sequence and amplitude magnitude. The analyzed amplitude and frequency of the current waveform are compared with the parameters of a known sine wave (frequency 50Hz, amplitude 220V) to verify its normality. If the waveform is judged to be normal according to the known waveform, the waveform data is stored according to time and point, serving as the fundamental wave before the drop (see...). Figure 3 ⑦).
[0038] 8. After analyzing the amplitude and frequency of the waveform in step 5, start from the first zero-crossing point after the second cycle from the beginning (see...). Figure 3 ③) Begin analyzing the collected data. Based on the fundamental wave data and the theoretical formula for a normal sine waveform previously stored in the data structure, predict the theoretical value of the next data point (see...). Figure 3 ②), Figure 3 Position ② is where the measured waveform (solid line) and the predicted waveform (dashed line) coexist and are compared. From this point onward, the difference between the predicted waveform amplitude and the actual waveform point value is calculated. When the data deviation exceeds the percentage of the set deviation value, it is determined as the waveform drop start point Point1 (see...). Figure 3 ③). The deviation ratio needs to be calculated. This article uses 5% as the basis for calculation.
[0039] The method for predicting waveform amplitude points is as follows:
[0040] Given the amplitude A, frequency F, and period 1 / F; the time t for each data point on the oscilloscope, then the number of points per period is C = 1 / F / t; the angle of each period is 360°, and the average of 360° is ψ = 360 / C; therefore, the theoretical amplitude of the first point is Vcal = A*sin(ψ*1), and the value of the Nth point is A*sin(ψ*N). Substituting the actual and theoretical values into the formula (Vreal - Vcal) / Vreal*100% gives the actual deviation ratio. Vreal is the actual acquired value.
[0041] 9. Since this invention focuses on the duration of the drop, the software method requires analysis from both the front and back ends of the data acquisition process. After finding the drop point at the front end, waveform prediction and comparison are completed. Then, the search for the drop point at the back end begins.
[0042] 10. Steps 2-6 involve analyzing the waveform from the front end to find the waveform's leading drop point. Starting from this step, search for the first zero-crossing point from the back end (see...). Figure 3 ⑥) Analyze the data for two cycles starting from the zero crossing point to obtain the amplitude and period of the waveform. Compare it with the known waveform parameters to check whether the waveform is normal (this step is a repeat of step 5).
[0043] 11. After completing step 8, the analysis should begin from the first zero-crossing point after the second cycle of the backend. Based on the amplitude and cycle obtained from the analysis, predict the theoretical value of the next data point according to the theoretical formula of the sine wave. Calculate the phase difference between the theoretical value and the actual waveform point value. When the phase deviation exceeds the set deviation value, it is determined to be the waveform drop recovery point Point2 (see...). Figure 3 ⑨). If the wave is judged to be normal by comparison with known waveforms, the data of the waveform is stored according to time and point, as the fundamental wave before the drop (see...). Figure 3 ⑩).
[0044] 12. The drop start point and recovery point of the drop waveform were found through steps 6 and 9. Then, the difference between the two points, Point2-Point1=DeltaPoint, was calculated.
[0045] Explanation: Point1, Point2: Point is the location where data is allocated in storage space, that is, a number.
[0046] Difference: In step 1 of this invention, the data collected by each oscilloscope is placed into a continuous data space:
[0047] For example: 100 data spaces were allocated.
[0048] [0]、[1]、[2]、┄┄
[355] 、
[356] 、
[357] ┄┄
[521] 、
[522] ┄┄
[97] 、
[98] ,
[99]
[0050] If Point1 is the 357th point and Point2 is the 522nd point,
[0051] Therefore, DeltaPoint = 522 - 357 = 165, which means there are 165 points between the starting point of the fall and the recovery point.
[0052] 13. Obtain the oscilloscope cell time and the number of points in each cell using commands. Use the formula PointTime = Cell Time / Number of Data Points in the Cell;
[0053] 14. Assuming the results are obtained in steps 10 and 11, calculate the fall time = DeltaPoint * PointTime (see...). Figure 3 ⑧).
[0054] In this invention, considering the periodic variation of the sine wave and the random occurrence of power drop times, if the voltage drop occurs at the zero point, it cannot be accurately determined at that point; it can only be determined at the next point. Therefore, the algorithm only obtains a slightly shorter voltage drop time at the zero point than at other points. For the oscilloscope capturing the waveform, this waveform is sent to the measurement and control software in 1s intervals (10,000 points). The time allocated to this single point is 1 / 100,000s, or 0.01ms. Given the significant difference between the product requirement parameter of 150ms and the actual test results, the 0.01ms difference at a single point has no impact and can be ignored. Furthermore, in practice, the control software uses synchronization commands, and the oscilloscope uses these commands to accurately capture the voltage drop waveform. Therefore, the oscilloscope's full-screen sampling time can be achieved at the millisecond level. With 100,000 sampling points, the percentage of time for a single point is even smaller. Similarly, the probability of a voltage drop at the zero point is 1 / 360, so the impact of this point on the test results is negligible.
[0055] It should be noted that the waveform data acquired by the oscilloscope is real-time. Therefore, the testing method in this invention analyzes the amplitude and frequency of the waveform in real time. Real-time waveform analysis can accurately reflect the predicted value and trend of the waveform at the next point. In practical use, this detection method and calculation effect are good, achieving the purpose of automatic calculation.
Claims
1. A method for automatically calculating the switching time of a power supply panel between two channels, characterized in that, Includes the following steps: (1) Use an oscilloscope to sample the drop time waveform using the test start command; read the waveform data points through the oscilloscope network port and store them in the storage space allocated in advance in the project program; (2) The AC power supply is a sinusoidal waveform. By analyzing the trend of AC waveform changes, the receiving and collecting points are analyzed one by one. Starting from the collected data, the first zero-crossing data is found and determined. The first zero-crossing point is used as the starting point for cycle judgment. The zero-crossing point refers to the zero position that the waveform passes through when it transitions from the positive half-cycle to the negative half-cycle. Find the voltage amplitude and frequency of the two AC waveforms after the first zero-crossing point of the AC current, and then find the voltage amplitude and frequency of the two AC waveforms before the last zero-crossing point of the waveform. (3) Based on the voltage amplitude and frequency of the two AC waveforms after the first zero crossing point and before the last zero crossing point, and the standard formula of the sine wave, predict the trend of the sine wave before and after. By comparing the predicted trend waveform points with the corresponding time points collected by the actual oscilloscope, find the moment of sudden change before and after the waveform. The time difference between the two moments is the switching time of the two power supplies.
2. The method for automatically calculating the two-channel switching time of the power supply panel according to claim 1, characterized in that, In step (1), the control system provides a signal to test the conversion between the two channels. This signal is simultaneously sent to the oscilloscope. After receiving the signal, the oscilloscope prepares to collect the output voltage of the power supply panel. The time of sending and receiving this signal is synchronized.
3. The method for automatically calculating the two-channel switching time of the power supply panel according to claim 1, characterized in that, The specific implementation steps of step (3) are as follows: 1) Based on the voltage amplitude and frequency of the two AC waveforms found before and after, the corresponding waveform formula can be generated according to the standard formula of the sine wave. 2) Predict the trend of the preceding and following sine waves using the formula of the generated sine wave, that is, calculate the points of each time interval using the formula, so as to use for comparison of the corresponding points in the future; 3) Compare the predicted trend waveform points, i.e. the points generated in step 2) above, with the corresponding points acquired by the actual oscilloscope. Subtract each pair of values and compare the result with the measured value. When the percentage value is greater than the program setting value, it is the moment of change. This process requires comparing each point to find the location of the change before and after the waveform. 4) By subtracting the two positions from the locations of the mutation points found in step 3), we can obtain the number of differences between the two positions; 5) The oscilloscope can be used to obtain the cell sampling time and the number of points in each cell. The time interval between any two points can be obtained by using the formula cell time and the number of data points in the cell. 6) By multiplying the point difference between the endpoint and the starting point found in step 4) and the time interval between the two points calculated in step 5), the time of the two power supply conversion can be obtained.
Citation Information
Patent Citations
Electric arc welding system and electric arc welding method
CN102806410A
Waveform comparison test method for transient-state wave-recording-type fault indicator
CN109001664A