ADC data sampling processing method

By using the highest sampling rate and truncated averaging method in ADC data sampling processing, the problem of insufficient accuracy and stability of data is solved, efficient data processing and resource optimization are achieved, and judgment time is shortened.

CN119064667APending Publication Date: 2024-12-03WUHAN JINGLI ELECTRONICS TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411221002.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When the prior art configures NPLC for data sampling processing, the data after sampling is not accurate and stable enough, and occupies a large amount of storage resources and computing resources, resulting in too long cutting judgment time and alarm judgment time.

Method used

Data acquisition is collected using the highest sampling rate. By averaged multiple data in the minimum NPLC time in the NPLC value range, and accumulated and averaged the continuous minimum unit mean, the stable data processing results are finally obtained, and the cut-off average is used. Preprocessing methods such as low-pass filtering reduce storage and computing resource requirements and shorten judgment time.

Benefits of technology

It fully utilizes the advantages of ADC high-speed sampling under different NPLC configurations, and the data obtained is stable and accurate, reducing the storage and computing resource requirements, and shortening the cutting and alarm judgment time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119064667A_ABST
    Figure CN119064667A_ABST
Patent Text Reader

Abstract

The invention discloses an ADC data sampling processing method, and belongs to the technical field of data sampling processing. The method comprises the following steps: firstly, controlling an ADC to perform data acquisition at the highest sampling rate; carrying out low-pass filtering and sliding filtering on the acquired data; averaging a plurality of data collected within the minimum NPLC time in the NPLC value range to obtain a minimum unit average value; and finally, averaging a plurality of minimum unit mean values continuously obtained within the time of configuring the NPLC to obtain final data. By adopting the counting scheme, the advantage of high-speed sampling of the ADC can be fully exerted, the finally processed data is stable and accurate, and the scheme of the invention occupies a small amount of storage resources and is short in alarm and gear switching judgment time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of data sampling and processing, and more specifically, relates to an ADC data sampling and processing method. Background Art

[0002] Source Measure Unit (SMU) is a test device that integrates voltage source and current measurement functions. It can provide stable voltage or current output and can simultaneously measure parameters such as current, voltage and power of the measured component. The relevant voltage and current of the measured component are measured by converting the analog quantity into digital quantity through ADC, and then converting it into actual voltage and current after relevant processing. Among them, NPLC (Normal Power Line Cycles) is an important parameter closely related to the measurement accuracy and stability of the source meter. It represents the length of the measurement time cycle. The principle of NPLC is closely related to the working mode of the digital multimeter. When using a digital multimeter for measurement, it needs to convert the input analog signal into a digital signal, and then process and display it. Here NPLC determines the length of the measurement time cycle, thereby affecting the accuracy and stability of the measurement. Specifically, NPLC represents the number of a power grid cycle, that is, how many times the multimeter will perform measurements in a complete power grid cycle. For example, at a power grid frequency of 50Hz, a power grid cycle is 20ms. If you set NPLC to 1, the multimeter will perform a measurement calculation within 20ms; if you set NPLC to 10, the multimeter will perform 10 measurements within 200ms and average the results. Increasing the NPLC value can improve the accuracy and stability of the measurement, because more measurements can reduce the impact of noise and interference, making the measurement results more accurate. However, increasing the NPLC value will also increase the measurement time, so you need to weigh the requirements of accuracy and time when choosing the NPLC value.

[0003] At present, the method of configuring NPLC for data sampling and processing is: determine the ADC sampling frequency according to the NPLC configuration; store the sampled data in the register after sliding average with a certain width; after accumulating to the configured NPLC time period, the FPGA reads the data in the register for further data processing. Although this method can effectively realize data collection and processing, it needs to use a large amount of storage resources to store data, and cannot fully utilize the advantages of ADC high-speed sampling to collect as much data as possible, resulting in the averaged data being unstable and fluctuating greatly. At the same time, it also causes the gear switching judgment time and alarm judgment time to be too long. Summary of the invention

[0004] In view of the above defects or improvement needs of the prior art, the present application provides an ADC data sampling and processing method, which aims to solve the technical problem that the data after sampling and processing is not accurate and stable enough when NPLC is currently configured for data sampling.

[0005] To achieve the above objectives, in a first aspect, the present application provides an ADC data sampling and processing method, comprising the following steps:

[0006] Drive ADC to collect data at the highest sampling rate and pre-process the collected data;

[0007] The minimum unit mean is obtained by averaging multiple data collected within the minimum NPLC time in the NPLC value range;

[0008] The final data is obtained by averaging multiple minimum unit means obtained continuously within the configured NPLC time.

[0009] Preferably, the final data is obtained by averaging multiple minimum unit means obtained continuously within the configuration NPLC time, specifically:

[0010] Accumulate n0 consecutive minimum unit means a0 to obtain b0;

[0011] The average of 10 consecutive a0s is obtained to obtain a1; b1 is obtained by accumulating n1 consecutive a1s;

[0012] The average of 10 consecutive a1s is obtained to obtain a2; b2 is obtained by accumulating n2 consecutive a2s;

[0013] By analogy, we finally average 10 consecutive a(n-1)s to get an, and accumulate n consecutive ans to get bn.

[0014] Among them, n0, n1, n2, ..., nn are the values ​​of Num in the units, tens, hundreds, and up to the highest digit, respectively, and Num = configured NPLC / minimum NPLC;

[0015] The final data Data is obtained by the following formula:

[0016] Data=(b0×10 0 +b1×10 1 +b2×10 2 +…+bn×10 n ) / Num.

[0017] Preferably, the mean is calculated using the truncated mean method.

[0018] Preferably, the truncated mean method is specifically as follows: remove the largest and smallest multiple data in the data set to be averaged, and iThe average of the data is calculated, and i is an integer greater than 0.

[0019] Preferably, the preprocessing includes low-pass filtering and sliding filtering.

[0020] Preferably, when data collection starts, whether to switch gears is determined by using data in the sliding filter and data collected within the minimum NPLC time, and the judgment time for switching gears is (k+A) / V;

[0021] After data collection starts, the data collected within the minimum NPLC time is used to determine whether to switch gears. The judgment time for switching gears is A / V.

[0022] Where k is the width of the sliding filter, A is the number of data collected within the minimum NPLC time, and V is the maximum sampling rate of the ADC.

[0023] Preferably, when data collection starts, it is determined whether to alarm based on the data in the sliding filter and the data collected within the minimum NPLC time, and the alarm determination time is (k+A) / V;

[0024] After data collection begins, the data collected within the minimum NPLC time is used to determine whether an alarm is triggered. The alarm determination time is A / V.

[0025] Where k is the width of the sliding filter, A is the number of data collected within the minimum NPLC time, and V is the maximum sampling rate of the ADC.

[0026] Preferably, the width k of the sliding filter is determined by the step response width of the low-pass filter.

[0027] In a second aspect, the present application provides a data sampling and processing device, the data sampling and processing device comprising an ADC analog-to-digital conversion module and a data processing module;

[0028] The ADC analog-to-digital conversion module is used to convert analog signals into digital signals and collect them;

[0029] The data processing module is used to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0030] In a third aspect, the present application provides a source meter, which is used to execute the method described in the first aspect or any possible implementation manner of the first aspect.

[0031] In a fourth aspect, the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method described in the first aspect or any possible implementation of the first aspect.

[0032] In general, the above technical solutions conceived by this application have the following beneficial effects compared with the prior art:

[0033] (1) The higher the ADC sampling frequency, the more data to be processed under the high NPLC configuration. Therefore, in the existing ADC data sampling and processing methods, in order to ensure that the data to be processed does not occupy a large amount of storage resources, the ADC sampling frequency is often dynamically determined according to the NPLC configuration value. However, the technical solution of the present application controls the ADC to use the highest sampling rate for data acquisition under different NPLC configurations. Compared with the existing method, the present application can fully utilize the advantages of ADC high-speed sampling and collect as much data as possible for data processing within the configured NPLC time period, so that the final data obtained is stable and accurate.

[0034] (2) In the existing ADC data sampling and processing methods, the collected data is directly stored. After accumulating to the configured NPLC time period, the data is read from the storage resources for subsequent data processing. In order to save the read data, a large amount of storage resources are required. Compared with the existing method, the method of the present application averages multiple data collected within the minimum NPLC time in the NPLC value range and uses the average as the minimum unit mean to participate in subsequent data processing. Such pre-data processing greatly reduces the demand for storage resources.

[0035] (3) In the existing ADC data sampling and processing method, if the NPLC is configured very large, a large amount of data needs to be processed at one time, resulting in excessive fluctuations in the consumption of hardware computing resources and affecting hardware stability. In the data processing process of the present application, the data set to be averaged is processed in the order of the units, tens, hundreds, etc. of the average quantity, from low to high. Such a data processing process consumes stable computing resources and avoids the need for one-time processing of a large amount of data when the NPLC is configured very large.

[0036] (4) In the data processing process of the present application, the data on the units, tens, hundreds, etc. of the average quantity are pre-averaged before participating in the final mean processing, thereby further reducing the demand for storage resources.

[0037] (5) When making gear switching and alarm judgments, the present application only needs to involve multiple data collected within the minimum NPLC time in the NPLC value range and the data in the sliding filter in the judgment, thereby shortening the gear switching judgment time and the alarm judgment time.

[0038] (6) This application uses the truncated mean method to effectively remove the fluctuating data when taking the average, while retaining 2 i The data are averaged and the number of retained data is 2 i This can facilitate hardware calculations, thereby speeding up data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 It is an overall flow chart of an ADC data sampling and processing method provided in an embodiment of the present application.

[0040] Figure 2 It is a flowchart of data processing provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0042] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0043] In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two. For example, multiple data refers to two or more data, etc.; multiple minimum unit means refers to two or more minimum unit means, etc.

[0044] First, the technical terms involved in this application are explained:

[0045] ADC (Analog-to-Digital Converter) is the abbreviation of analog-to-digital converter. It can convert continuously changing analog signals into discrete digital signals. It is widely used in audio processing, data acquisition, sensor measurement, industrial control, communication systems and other fields.

[0046] NPLC (Number of Power Line Cycles) is an important parameter for measuring the measurement accuracy of a digital multimeter. It indicates the length of time the input signal is integrated to obtain a single measurement value when measuring DC voltage, current, or resistance. The larger the NPLC value, the longer the signal integration time, which can more effectively reduce the AC noise introduced by the power line and improve the resolution and accuracy of the measurement. However, this also means that the measurement rate will be reduced because more time is required to complete the measurement.

[0047] Next, the technical solutions provided in the embodiments of the present application are introduced.

[0048] like Figure 1As shown, an ADC data sampling and processing method in an embodiment of the present application is shown, which specifically includes the following steps:

[0049] S1. Drive ADC to acquire data at the highest sampling rate. The highest sampling rate of the ADC used in this embodiment is 2MSPS.

[0050] The present application drives the ADC to use the highest sampling rate for data acquisition, which can fully utilize the advantages of ADC high-speed sampling, collect as much data as possible for data processing within the configured NPLC time period, and the final data obtained is stable and accurate.

[0051] S2. Perform low-pass filtering on the collected data to filter out the high-frequency noise collected by the ADC.

[0052] S3. Then, a sliding filter with a width of 32 is used to perform sliding filtering on the collected data to eliminate the overshoot generated by the low-pass filter during the unit impulse response.

[0053] Those skilled in the art will appreciate that the width of the sliding filter is not limited to 32, and the width range of the sliding filter can be set according to actual needs. For example, a width range of 8 to 128 can achieve sliding filtering of data with low storage resource occupancy.

[0054] S4, averaging multiple data collected within the minimum NPLC time in the NPLC value range to obtain the minimum unit mean;

[0055] In this embodiment, the NPLC value range is 0.001 to 100. At a grid frequency of 50 Hz, one grid cycle is 20 ms.

[0056] Then the minimum NPLC in the NPLC value range is 0.001, and the number of data collected within the minimum NPLC time is:

[0057]

[0058] The 40 data collected within the minimum NPLC time are averaged. In this embodiment, the truncated mean method is used for averaging, specifically: the 12 maximum values ​​and 12 minimum values ​​of the above 40 consecutive data are removed, and the remaining 16 data are averaged to obtain the minimum unit mean. The number of remaining data is guaranteed to be 2 i , which is convenient for fast hardware processing.

[0059] Those skilled in the art will appreciate that the minimum unit mean may also be obtained by directly adding up the 40 data and then dividing by 40.

[0060] In the present application, multiple data collected within the minimum NPLC time in the NPLC value range are averaged and used as the minimum unit mean to participate in subsequent data processing. Such pre-data processing greatly reduces the demand for storage resources.

[0061] S5. The multiple minimum unit means obtained continuously within the configured NPLC time are accumulated and averaged to obtain the final data. For specific steps, see Figure 2 , including the following sub-steps:

[0062] S51, obtain the minimum unit mean a0, and accumulate n0 consecutive minimum unit mean a0 to obtain b0;

[0063] S52, averaging 10 consecutive a0s to obtain a1; accumulating n1 consecutive a1s to obtain b1;

[0064] S53, averaging 10 consecutive a1s to obtain a2; accumulating n2 consecutive a2s to obtain b2;

[0065] S54, averaging 10 consecutive a2s to obtain a3; accumulating n3 consecutive a3s to obtain b3;

[0066] S55, averaging 10 consecutive a3s to obtain a4; accumulating n4 consecutive a4s to obtain b4;

[0067] S56, averaging 10 consecutive a4s to obtain a5; accumulating n5 consecutive a5s to obtain b5;

[0068] The above steps all use the truncated mean method to obtain the average, specifically: remove 1 maximum value and 1 minimum value from the above 10 consecutive data, and average the remaining 8 data to obtain the minimum unit mean. The number of remaining data is guaranteed to be 2 i , which is convenient for fast hardware processing.

[0069] Those skilled in the art will appreciate that the minimum unit mean may also be obtained by directly adding up 10 data and then dividing the sum by 10.

[0070] Among them, n0, n1, n2, ..., nn are the values ​​of Num in the units, tens, hundreds, and up to the highest digit, respectively, and Num = configured NPLC / minimum NPLC;

[0071] In this embodiment, the minimum NPLC is 0.001, so Num=1000 times the configured NPLC.

[0072] S57, the final data Data is obtained by the following formula:

[0073] Data=(b0×10 0 +b1×101 +b2×10 2 +b3×10 3 +b4×10 4 +b5×10 5 ) / Num.

[0074] In the data processing process of the present application, the data set to be averaged is processed in the order of the units, tens, hundreds, etc. of the average quantity, from low to high. Such a data processing process consumes stable computing resources and avoids the need for one-time processing of a large amount of data when a large configuration NPLC is used.

[0075] At the same time, the data on the ones, tens, hundreds, etc. of the average quantity are pre-averaged before participating in the final mean processing, further reducing the demand for storage resources.

[0076] During the ADC data sampling process, the data in the sliding filter and the data collected within the minimum NPLC time are used to determine whether to switch gears or issue an alarm.

[0077] Switching gears means that when the source meter is used as a digital multimeter and is configured in automatic switching mode, the gear will automatically switch to the appropriate gear to display the final data according to the value (voltage / current) sampled by the ADC.

[0078] The alarm refers to whether the value (voltage / current) sampled by the ADC reaches the set clamp value. If it reaches the set clamp value, an alarm signal will be issued.

[0079] When data collection starts, the data in the sliding filter and the data collected within the minimum NPLC time are used to determine whether to switch gears or give an alarm. The judgment time for switching gears or giving an alarm is (k+A) / V.

[0080] In this embodiment, the number of data collected within the minimum NPLC time is 40, the width of the sliding filter is 32, and the time for one data sampling is That is, when the power is turned on and data collection begins, the judgment time for switching gears or alarming is (40+32)×0.5us=36us.

[0081] After data collection starts, the data collected within the minimum NPLC time is used to determine whether to switch gears or alarm. The judgment time for switching gears or alarming is A / V.

[0082] That is, after power-on, the judgment time for gear switching or alarm is 40×0.5us=20us.

[0083] It can be seen that, by adopting the method of the present application, compared with the existing method, the gear switching judgment time and the alarm judgment time are shorter.

[0084] Based on the method in the above embodiment, the embodiment of the present application also provides a data sampling and processing device, which includes an ADC analog-to-digital conversion module and a data processing module; the ADC analog-to-digital conversion module and the data processing module communicate with each other through a communication bus.

[0085] The ADC analog-to-digital conversion module is used to convert analog signals received from the outside into digital signals and perform data acquisition;

[0086] The data processing module is used to execute the method in the above embodiment.

[0087] It is understandable that the data processing module in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0088] Based on the method in the above embodiment, the embodiment of the present application further provides a source meter. When the source meter in the embodiment of the present application performs measurement, the source meter is used to execute the method in the above embodiment.

[0089] The source meter first drives the ADC to convert the input analog signal into a digital signal using the highest sampling rate and collects data, and then pre-processes the collected data;

[0090] The minimum unit mean is obtained by averaging multiple data collected within the minimum NPLC time in the NPLC value range;

[0091] The final data is obtained by averaging multiple minimum unit means obtained continuously within the configured NPLC time.

[0092] Based on the method in the above embodiment, an embodiment of the present application provides a computer program product. When the computer program product runs on a processor, the processor executes the method in the above embodiment.

[0093] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0094] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

[0095] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a storage medium or transmitted through the storage medium. The computer instructions may be transmitted from a website site, a computer, a server or a data center to another website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state disk (SSD)), etc.

[0096] It should be understood that the various numerical numbers involved in the embodiments of the present application are only used for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0097] The above content is easily understood by those skilled in the art. The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. An ADC data sampling and processing method, characterized in that: The following steps are involved: Drive ADC to collect data at the highest sampling rate and pre-process the collected data; The minimum unit mean is obtained by averaging multiple data collected within the minimum NPLC time in the NPLC value range; The final data is obtained by averaging multiple minimum unit means obtained continuously within the configured NPLC time.

2. The ADC data sampling and processing method according to claim 1, characterized in that: The final data is obtained by averaging the multiple minimum unit means obtained continuously within the configured NPLC time, specifically: Accumulate n0 consecutive minimum unit means a0 to obtain b0; The average of 10 consecutive a0s is obtained to obtain a1; b1 is obtained by accumulating n1 consecutive a1s; The average of 10 consecutive a1s is obtained to obtain a2; b2 is obtained by accumulating n2 consecutive a2s; By analogy, we finally average 10 consecutive a(n-1)s to get an, and accumulate n consecutive ans to get bn. Among them, n0, n1, n2, ..., nn are the values ​​of Num in the units, tens, hundreds, and up to the highest digit, respectively, and Num = configured NPLC / minimum NPLC; The final data Data is obtained by the following formula: Data=(b0×10 0 +b1×10 1 +b2×10 2 +…+bn×10 n ) / Number.

3. The ADC data sampling and processing method according to claim 1 or 2, characterized in that: The mean was calculated using the truncated mean method.

4. The ADC data sampling and processing method according to claim 3, characterized in that: The truncated mean method is as follows: remove the largest and smallest data in the data set whose mean is to be calculated, and i The average of the data is calculated, and i is an integer greater than 0.

5. The ADC data sampling and processing method according to claim 1, characterized in that: The preprocessing includes low-pass filtering and sliding filtering.

6. The ADC data sampling and processing method according to claim 1 or 5, characterized in that: When data collection starts, the data in the sliding filter and the data collected within the minimum NPLC time are used to determine whether to switch gears. The judgment time for switching gears is (k+A) / V. After data collection starts, the data collected within the minimum NPLC time is used to determine whether to switch gears. The judgment time for switching gears is A / V. Where k is the width of the sliding filter, A is the number of data collected within the minimum NPLC time, and V is the maximum sampling rate of the ADC.

7. The ADC data sampling and processing method according to claim 1 or 5, characterized in that: When data collection starts, the data in the sliding filter and the data collected within the minimum NPLC time are used to determine whether to alarm. The alarm judgment time is (k+A) / V. After data collection begins, the data collected within the minimum NPLC time is used to determine whether an alarm is triggered. The alarm determination time is A / V. Where k is the width of the sliding filter, A is the number of data collected within the minimum NPLC time, and V is the maximum sampling rate of the ADC.

8. A data sampling and processing device, characterized in that: The data sampling and processing device includes an ADC analog-to-digital conversion module and a data processing module; The ADC analog-to-digital conversion module is used to convert analog signals into digital signals and perform data acquisition; The data processing module is used to execute the method according to any one of claims 1-7.

9. A source meter, characterized in that: The source table is used to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product runs on a processor, the processor is caused to execute the method according to any one of claims 1 to 7.