High-precision transient switching value real-time test method
By adopting high-precision transient switching quantity real-time testing method in switching quantity test, and using high-speed acquisition and real-time data processing technology, the problems of low sampling rate and low testing accuracy in the existing technology are solved, and high-precision and automated transient switching quantity testing are realized.
Patent Information
- Application Number
- CN202411653544.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-11
AI Technical Summary
The existing switching quantity test methods have low sampling rate, low test accuracy and low automation, making it difficult to meet the industrial needs of real-time testing of transient switching quantity.
Using a high-precision transient switching quantity real-time testing method, by creating a high-speed acquisition task, the collected switching quantity is converted into unsigned byte data, added to the element queue for real-time processing and storage, real-time display of dynamic waveforms and automatic evaluation of test results.
It realizes high-precision and high-speed transient switching quantity test, with high degree of automation, can analyze and process data in real time, automatically determine test results and generate reports, improving the automation level of switching quantity tests.
Smart Images

Figure CN119596203A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of switch quantity testing methods, in particular to a high-precision transient switch quantity real-time testing method. Background Art
[0002] The test field of switch quantity test is extremely wide and very important, especially in the field of diesel generator set starting and stabilization time test, generator set short-circuit test, and special valve action time test. The diesel generator set starting and stabilization time test is a key step to ensure that the diesel generator set can respond quickly and operate stably during actual use, and it is a necessary test before the diesel generator set is put into use; the generator set short-circuit test is to evaluate the performance and safety of the generator set, and it is a key test to ensure that it can operate stably under short-circuit conditions; the main purpose of the start-up time test of special valves (such as nuclear power safety-level valves) is to verify the reliability and safety of the valve and ensure its normal operation under extreme conditions. Through the start-up time test, the response speed and stability of the valve under specific conditions can be evaluated, thereby ensuring the safe operation of the nuclear power plant.
[0003] At present, most of the switch quantity testing methods in the existing technology have low sampling rate, low test accuracy and low degree of automation. These testing methods generally only have acquisition functions and require manual post-processing of the acquired data. They cannot obtain test results in a timely manner and are difficult to meet the industrial needs of real-time testing of transient switch quantities. Summary of the invention
[0004] In view of the shortcomings of the above-mentioned existing production technology, the applicant provides a high-precision transient switch quantity real-time testing method, which has the advantages of high sampling rate and high testing accuracy. In order to meet actual testing needs, the method automatically collects and records waveforms while performing real-time analysis and processing of data, automatically determines test results, automatically generates test reports, and automatically stores original data and test results, effectively improving the automation level of switch quantity acquisition.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A high-precision transient switch quantity real-time testing method includes the following operation process:
[0007] First, create a collection task, specifically create a high-speed switch quantity collection task, issue the collection task, and collect switch quantities;
[0008] In order to ensure the integrity and accuracy of the collected switch quantity data and the transmission and processing efficiency of a large amount of switch quantity data, the collected switch quantity is converted into unsigned byte data;
[0009] Then, the unsigned byte data and the corresponding time data are added as waveform elements to an element queue that can accommodate transient switch waveform data of a certain length of time. Through the buffering of the queue, real-time synchronization and interaction between producers and consumers are achieved to ensure the stable operation of the system.
[0010] Elements are dequeued, waveform splicing and processing are performed on the switch waveform data, real-time display of the switch dynamic waveform and real-time automatic storage of the waveform data are realized, real-time analysis of the waveform is performed during the dynamic display of the waveform, the rising edge of the switch is automatically captured, the time difference between the two rising edges of the switch is automatically calculated, the test situation is automatically interpreted according to the calculation results, and the test report is automatically generated for printing and storage. In order to facilitate users to view the test results, the waveform curve can be stored synchronously when the test report is stored; the real-time automatic storage of waveform data also ensures that users can query historical data and dynamically trace the waveform at any time.
[0011] Its further technical solution is:
[0012] The software adopts the producer-consumer design pattern.
[0013] Producers and consumers use the memory buffer, i.e., the element queue, to achieve real-time interaction and synchronization of switch data.
[0014] The system adopts the producer-consumer model, and the dynamic high-speed acquisition of switch data and the real-time processing and automatic storage of switch data are multi-threaded. The real-time processing and automatic storage of switch data will not affect the high-speed acquisition of switch data, and can maintain the stability of switch data acquisition.
[0015] In order to ensure the realization of high sampling rate and the stability of large data processing, the switch data is converted into unsigned byte data, and the real-time synchronous interaction between acquisition and processing is guaranteed by the element queue.
[0016] The sampling frequency of switch quantity acquisition is 100kHZ, and the time accuracy of judgment is 10us level.
[0017] The real-time display of dynamic waveforms corresponds to real-time analysis of dynamic waveforms, automatic storage of waveform data, and storage of waveform images.
[0018] After real-time analysis of the dynamic waveform, the test results are automatically interpreted, and then a test report is automatically generated. The test report can then be automatically printed or automatically stored, and the test report history can be queried.
[0019] The beneficial effects of the present invention are as follows:
[0020] The present invention realizes automatic high-precision and high-speed acquisition of transient switch quantity signals, real-time analysis and processing, automatic determination of test results, automatic generation of test reports, automatic storage of original data and test results, and improves the automation level of switch quantity testing through a high-precision transient switch quantity real-time testing method with a sampling frequency of up to 100 kHz and a judgment time accuracy of up to 10 us.
[0021] The invention is mainly used for real-time measurement of transient switching quantities such as diesel generator set starting and stabilization time test, generator set short-circuit test and special valve action time test. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0023] The specific implementation of the present invention is described below in conjunction with the accompanying drawings.
[0024] like Figure 1 As shown, the high-precision transient switch value real-time testing method of this embodiment includes the following operation flow:
[0025] First, create a collection task, specifically create a high-speed switch quantity collection task, issue the collection task, and collect switch quantities;
[0026] In order to ensure the integrity and accuracy of the collected switch quantity data and the transmission and processing efficiency of a large amount of switch quantity data, the collected switch quantity is converted into unsigned byte data;
[0027] Then, the unsigned byte data and the corresponding time data are added as waveform elements to an element queue that can accommodate transient switch waveform data of a certain length of time (10s before the current moment). Through the buffering of the queue, real-time synchronization and interaction between producers and consumers are achieved to ensure the stable operation of the system.
[0028] The elements are dequeued, the waveform data of the switching quantity is spliced and processed, the real-time display of the dynamic waveform of the switching quantity and the real-time automatic storage of the waveform data are realized, the waveform is analyzed in real time during the dynamic display of the waveform, the rising edge of the switching quantity is automatically captured, and the time difference between the two rising edges of the switching quantity is automatically calculated. According to the calculation results, the test situation is automatically interpreted, and the test report is automatically generated for printing and storage. In order to facilitate users to view the test results, the waveform curve can be stored synchronously when the test report is stored; the real-time automatic storage of waveform data also ensures that users can query historical data and dynamically trace the waveform at any time.
[0029] The software adopts the producer-consumer design pattern.
[0030] Producers and consumers use the memory buffer, i.e., the element queue, to achieve real-time interaction and synchronization of switch data.
[0031] The system adopts the producer-consumer model, and the dynamic high-speed acquisition of switch data and the real-time processing and automatic storage of switch data are multi-threaded. The real-time processing and automatic storage of switch data will not affect the high-speed acquisition of switch data, and can maintain the stability of switch data acquisition.
[0032] In order to ensure the realization of high sampling rate and the stability of large data processing, the switch data is converted into unsigned byte data, and the real-time synchronous interaction between acquisition and processing is guaranteed by the element queue.
[0033] The sampling frequency of switch quantity acquisition is 100kHZ, and the time accuracy of judgment is 10us level.
[0034] The real-time display of dynamic waveforms corresponds to real-time analysis of dynamic waveforms, automatic storage of waveform data, and storage of waveform images.
[0035] After real-time analysis of the dynamic waveform, the test results are automatically interpreted, and then a test report is automatically generated. The test report can then be automatically printed or automatically stored, and the test report history can be queried.
[0036] After the element leaves the queue, the switching waveform is spliced according to the element information entering the queue to ensure the real-time synchronous display of the switching waveform. At the same time, the element buffer queue also allows the waveform to display the waveform of the previous period, which is convenient for users to observe and compare.
[0037] The system can automatically store waveform data in real time, analyze the waveform in real time, automatically capture the rising edge of the switch quantity, automatically calculate the time difference between two rising edges of the switch quantity, automatically interpret the test situation according to the calculation results, and automatically generate a test report for printing and storage, thus realizing the automated testing of the switch quantity and improving the automation level of the switch quantity test.
[0038] The present invention provides a high-precision real-time testing method for transient switching values, such as Figure 1 As shown, the test method adopts a multi-threaded concurrent collaborative producer / consumer model. The producer thread is responsible for collecting data and the consumer thread is responsible for processing data. In order to coordinate the speed difference between the producer collecting data and the consumer processing data, an element queue that can accommodate a certain length of time and can achieve high-speed caching is set between the producer and the consumer to process the data collected by the producer until the consumer has completed the processing.
[0039] The specific implementation process is:
[0040] In the acquisition thread, users issue switch quantity acquisition tasks according to actual needs. The switch quantity sampling frequency can be customized according to user needs, up to 100KHz. Switch quantity acquisition mainly collects rising and falling edges. The rising edge is defined as digital 1 and the falling edge is defined as digital 0. Therefore, the switch quantity collected by the producer can be regarded as digital quantity data. In order to ensure the smooth progress of high sampling rate, the collected digital quantity is converted into unsigned byte data (U8), and then enters the high-speed cache queue to wait for processing by the processing thread.
[0041] In the processing thread, as long as there is unprocessed data in the element queue, the processing thread will take out the data for processing and judgment, and the judgment accuracy of the switch quantity can be 10us level. The specific implementation method is to first splice the waveforms of the elements taken out from the queue, restore them to the original switch quantity waveforms, and display them in real time. For the restored original switch quantity waveform data, a tdms file with the current time as the file name is created for high-speed storage, and the attributes are defined in the storage file to ensure that the original switch quantity waveform can be restored to the highest level when the user queries, which is convenient for the user to query historical data and waveform backtracking later. At the same time, for the real-time displayed switch quantity waveform, the user can intercept the stored waveform image data with one click according to the needs. While the switch quantity waveform is displayed in real time, the switch quantity waveform can also be analyzed with one click. The software automatically captures the rising edge of the switch quantity, automatically calculates the time difference between the rising edges of the switch quantity, and automatically compares and judges with the pre-set judgment criteria to generate test results, and then generates a test report according to the report template or the user-defined report template. The report is saved with the initial time of the analyzed switch quantity waveform as the file name to facilitate the user to view it later. At the same time, a print task is created while saving the test report to automatically print the test results.
[0042] In one embodiment, the switch quantity collects two switch quantities, namely, the special valve control signal and the valve opening signal. When the switch quantity waveform is collected, the software automatically captures the rising edge of the valve control signal and the rising edge of an adjacent valve opening signal, automatically calculates the time difference between the two rising edges, and compares it with the judgment standard, and generates a test report for storage and printing. At the same time, the software can also capture the falling edge of the control signal and the opening signal according to user needs, calculate the difference with the corresponding rising edge, determine the duration of the signal and save it for record.
[0043] In this switch quantity test system, the sampling frequency can reach 100kHZ, and the time accuracy can reach 10us level, so as to realize the automatic high-speed acquisition of transient switch quantity signals, real-time analysis and processing, automatic determination of test results, automatic generation of test reports, and automatic storage of original data and test results, thereby improving the automation level of transient switch quantity test and meeting the test requirements of diesel generator start-up and stabilization time test, generator short-circuit test and special valve action time. To achieve the above purpose, the system adopts the producer-consumer design mode to realize the real-time interaction and synchronization of high-speed acquisition of transient switch quantity signals, and ensure the timely transmission and processing of switch quantity data. In the process of high-speed acquisition, a dynamic data buffer queue that can accommodate a certain amount of data is created, and the switch quantity data elements in the queue are analyzed and processed in real time, and real-time dynamic display curves are drawn to automatically capture the change of switch quantity, automatically determine the test results, generate test reports and automatically export, print and store them in the form of reports. In the dynamic display process, the curve data information is automatically stored, and the curve picture can be stored according to user needs. After the test is completed, the user can also check the test report, historical data and dynamically replay the historical curve according to needs.
[0044] The above description is an explanation of the present invention, not a limitation of the present invention. The scope of the present invention is defined in the claims. Any form of modification may be made within the scope of protection of the present invention.
Claims
1. A high-precision transient switch quantity real-time testing method, characterized in that: The operation process includes the following: first, create a collection task, specifically create a high-speed acquisition task for switch quantities, issue the collection task, and collect switch quantities; In order to ensure the integrity and accuracy of the collected switch quantity data and the transmission and processing efficiency of a large amount of switch quantity data, the collected switch quantity is converted into unsigned byte data; Then, the unsigned byte data and the corresponding time data are added as waveform elements to an element queue that can accommodate transient switch waveform data of a certain length of time. Through the buffering of the queue, real-time synchronization and interaction between producers and consumers are achieved to ensure the stable operation of the system. Elements are dequeued, waveform splicing and processing are performed on the switch waveform data, real-time display of the switch dynamic waveform and real-time automatic storage of the waveform data are realized, real-time analysis of the waveform is performed during the dynamic display of the waveform, the rising edge of the switch is automatically captured, the time difference between the two rising edges of the switch is automatically calculated, the test situation is automatically interpreted according to the calculation results, and the test report is automatically generated for printing and storage. In order to facilitate users to view the test results, the waveform curve can be stored synchronously when the test report is stored; the real-time automatic storage of waveform data also ensures that users can query historical data and dynamically trace the waveform at any time.
2. A high-precision transient switch quantity real-time testing method as claimed in claim 1, characterized in that: The software adopts the producer-consumer design pattern.
3. A high-precision transient switch quantity real-time testing method as claimed in claim 2, characterized in that: Producers and consumers use the memory buffer, i.e., the element queue, to achieve real-time interaction and synchronization of switch data.
4. A high-precision transient switch quantity real-time testing method as claimed in claim 1, characterized in that: The system adopts the producer-consumer model, and the dynamic high-speed acquisition of switch data and the real-time processing and automatic storage of switch data are multi-threaded. The real-time processing and automatic storage of switch data will not affect the high-speed acquisition of switch data, and can maintain the stability of switch data acquisition.
5. A high-precision transient switch value real-time testing method as claimed in claim 1, characterized in that: In order to ensure the realization of high sampling rate and the stability of large data processing, the switch data is converted into unsigned byte data, and the real-time synchronous interaction between acquisition and processing is guaranteed by the element queue.
6. A high-precision instantaneous switch quantity real-time testing method as claimed in claim 1, characterized in that: The sampling frequency of switch quantity acquisition is 100kHZ, and the time accuracy of judgment is 10us level.
7. A high-precision transient switch value real-time testing method as claimed in claim 1, characterized in that: The real-time display of dynamic waveforms corresponds to real-time analysis of dynamic waveforms, automatic storage of waveform data, and storage of waveform images.
8. A high-precision instantaneous switch quantity real-time testing method as claimed in claim 7, characterized in that: After real-time analysis of the dynamic waveform, the test results are automatically interpreted, and then a test report is automatically generated. The test report can then be automatically printed or automatically stored, and the test report history can be queried.