A variable frequency sampling system and method

By using a frequency conversion sampling system to detect and adjust the clock frequency in real time, combined with synchronous sampling by multiple ADC chips, the problem of measurement inaccuracy caused by AC signal frequency variations is solved, achieving high-precision and flexible measurement results.

CN119959605BActive Publication Date: 2026-02-27BEIJING ACCUENERGY TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510029220.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2026-02-27
Estimated Expiration
2045-01-08

AI Technical Summary

Technical Problem

Existing technologies cannot accurately measure AC signals with significant frequency variations, resulting in poor flexibility. In particular, they are unsuitable for applications with poor stability when using fixed-frequency sampling methods.

Method used

A frequency conversion sampling system is adopted. The frequency measurement module detects the frequency of the AC signal in real time, and the main control module dynamically adjusts the clock frequency of the clock generator module to ensure that the ADC module samples at a matching frequency. High-precision synchronous sampling is also performed through multiple ADC chips.

Benefits of technology

It enables high-precision measurement in scenarios with large variations in AC signal frequency, improving the accuracy and reliability of measurement. It is highly adaptable and can flexibly meet the multi-channel signal sampling requirements of different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119959605B_ABST
    Figure CN119959605B_ABST
Patent Text Reader

Abstract

The application provides a variable frequency sampling system and method, and relates to the technical field of electric power measurement. The system comprises a frequency measurement module, a clock generator module, an ADC module and a main control module. The frequency measurement module converts a measured AC signal into a target level signal. The main control module determines the current frequency of the measured AC signal based on the target level signal, and sends a frequency adjustment instruction to the clock generator module when the current frequency is different from the original frequency. The clock generator module provides a clock signal to the ADC module to drive the ADC module to sample at a sampling frequency, wherein the sampling frequency is equal to a predetermined multiple of the current frequency. The ADC module samples the voltage and current of the measured AC signal at the sampling frequency to obtain a first digital signal and a second digital signal, and transmits the signals to the main control module. The main control module calculates a set of electrical parameters of the measured AC signal. The technical solution provided by the application can effectively improve the accuracy of measurement.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power measurement, in particular to a variable frequency sampling system and method. BACKGROUND

[0002] The traditional measurement principle of alternating current signal in the power industry is: the sampling circuit obtains the instantaneous signal value of the signal source in proportion, and then the analog signal is quantized by the digital-to-analog conversion circuit (ADC), so that the instantaneous signal digital quantity is obtained. The calculation of the alternating current signal needs the measurement value of the whole signal period, that is, the signal digital quantity of one signal period. In order to obtain these data, a periodic fixed-point data acquisition scheme is generally used. At present, the scheme in the related art mainly adopts a scheme of a measurement chip + a master control chip (MCU). The signal acquisition and calculation of the scheme are completed by the special measurement chip, but the flexibility is poor. When the period frequency of the measured alternating current signal changes greatly, the correct processing of the period signal cannot be done in time, or the method of fixed frequency sampling is also used in the related art. This method is only suitable for the application scene where the measured alternating current signal is very stable. It can be seen that for the application scene where the frequency of the measured alternating current signal changes greatly, the method in the related art has the technical problem of being unable to accurately measure. SUMMARY

[0003] In order to solve the above technical problem, the present application provides a variable frequency sampling system and method.

[0004] In a first aspect, this application provides a frequency conversion sampling system, including: a frequency measurement module, a clock generator module, an ADC module, and a main control module. The frequency measurement module converts the AC signal under test into a target level signal and transmits it to the main control module. The main control module determines the current frequency of the AC signal under test based on the target level signal, and, if the current frequency differs from the original frequency, sends a frequency adjustment command to the clock generator module based on the current frequency. The current frequency represents the frequency of the AC signal under test in the current cycle, the original frequency represents the frequency of the AC signal under test in the previous cycle, and the frequency adjustment command instructs the clock generator module to adjust the clock frequency of its output clock signal. The clock generator module outputs... The clock generator module is electrically connected to the clock input terminal of the ADC module. The clock generator module provides a clock signal to the ADC module to drive it to sample at a sampling frequency equal to a predetermined multiple of the current frequency. The first SPI interface of the ADC module is connected to the second SPI interface of the main control module. The ADC module performs voltage sampling and quantization on the AC signal under test at the sampling frequency to obtain a first digital signal, and performs current sampling and quantization on the AC signal under test at the sampling frequency to obtain a second digital signal. The ADC module also transmits the first and second digital signals to the main control module through the first SPI interface. The main control module calculates a set of electrical parameters of the AC signal under test based on the first and second digital signals.

[0005] By adopting the above technical solution, the frequency measurement module converts the AC signal under test into a target level signal and transmits it to the main control module, enabling the main control module to accurately obtain the current frequency of the AC signal under test. The main control module determines the current frequency based on the target level signal and sends a frequency adjustment command to the clock generator module when the current frequency changes. This allows the clock generator module to adjust the clock frequency of its output clock signal in real time, ensuring that the sampling frequency always matches the current frequency. The clock signal output by the clock generator module drives the ADC module to sample at the sampling frequency, ensuring high-precision sampling data at different frequencies. The ADC module transmits the sampled voltage and current digital signals to the main control module via the SPI interface. The main control module calculates a set of electrical parameters based on these signals, thereby achieving comprehensive measurement of the frequency-converted AC signal. Therefore, this technical solution can achieve accurate measurement of frequency-converted AC signals and effectively improve the accuracy and reliability of measurements in application scenarios where the frequency of the AC signal under test varies significantly.

[0006] Optionally, the ADC module may include one or more ADC chips.

[0007] By adopting the above technical solutions, flexible sampling of the measured AC signal can be achieved. Specifically, when the ADC module includes a single ADC chip, the system structure is simplified, costs are reduced, and system complexity is decreased, making the system easier to maintain and manage. When the ADC module includes multiple ADC chips, simultaneous sampling through multiple channels can improve sampling accuracy and reliability, adapting to complex multi-channel signal sampling requirements. Whether using a single ADC chip or multiple ADC chips, the system can flexibly respond to frequency variations of the measured AC signal in different application scenarios, thereby improving measurement accuracy.

[0008] Optionally, if the ADC module includes an ADC chip, the ADC chip is used to perform AD sampling and quantization on the target voltage signal of the AC signal under test to obtain a first digital signal, and to perform AD sampling and quantization on the target current signal of the AC signal under test to obtain a second digital signal.

[0009] By adopting the above technical solution, high-precision synchronous sampling and quantization of the target voltage and target current signals of the measured AC signal can be achieved, ensuring the accuracy of the first and second digital signals. This single-chip solution not only simplifies the system hardware structure and reduces costs, but also improves the system's integration and reliability, making it particularly suitable for applications requiring high-precision measurements.

[0010] Optionally, the ADC module includes N ADC chips, where N is a positive integer greater than or equal to 2. The first ADC chip is used to sample and quantize the target voltage signal of the AC signal under test to obtain a first voltage sub-signal, and the first ADC chip is also used to sample and quantize J current signals of the AC signal under test to obtain a first current sub-signal. The first digital signal includes the first voltage sub-signal, the second digital signal includes the first current sub-signal, and J is a positive integer greater than or equal to 3. The i-th ADC chip is used to sample and quantize K current signals of the AC signal under test to obtain the i-th current sub-signal. The N ADC chips include the first ADC chip and the i-th ADC chip, where i is a positive integer greater than or equal to 2 and less than or equal to N, and K is a positive integer greater than or equal to 3.

[0011] By employing the above technical solution, and using multiple ADC chips, each responsible for sampling different current signals, the workload of a single ADC chip can be reduced, sampling errors can be decreased, and thus sampling accuracy can be improved. The parallel operation mode of multiple ADC chips can improve system redundancy; even if one ADC chip fails, the others can still operate normally, ensuring system stability and reliability. The first ADC chip samples not only the target voltage signal but also multiple current signals simultaneously, while the i-th ADC chip also samples multiple current signals. This design enables the system to synchronously sample multiple signals, ensuring the relative time relationship between signals and improving the accuracy of measurement results. The number of N ADC chips can be flexibly configured according to actual needs, adapting to the multi-channel current signal measurement requirements in different application scenarios, improving the system's flexibility and applicability. This technical solution can achieve high-precision synchronous sampling of multiple current signals.

[0012] Optionally, the target ADC chip can be any ADC chip in the ADC module. The clock input terminal of the target ADC chip is electrically connected to the output terminal of the clock generator module, and each interface in the SPI interface of the target ADC chip is electrically connected to the corresponding interface in the second SPI interface. The target flag port of the target ADC chip is electrically connected to the first input terminal of the main control module. The target flag port is configured to send a preset level signal to the main control module when the target ADC chip completes one sampling, so that the main control module can read the first digital signal and the second digital signal.

[0013] By adopting the above technical solution, the clock input terminal of the target ADC chip is electrically connected to the output terminal of the clock generator module, ensuring that the ADC module can accurately sample according to the real-time changing frequency, avoiding errors caused by fixed frequency sampling; the SPI interface of the target ADC chip is correspondingly connected to the second SPI interface of the main control module, realizing efficient data transmission, reducing communication latency, and improving the system response speed; the target flag port of the target ADC chip is electrically connected to the first input terminal of the main control module. When the target ADC chip completes a sampling, it will send a preset level signal to the main control module, enabling the main control module to read the latest sampling data in a timely manner, ensuring the real-time performance and accuracy of the data; through the preset level signal of the target flag port, the main control module can confirm the completion status of each sampling, enhancing the reliability and stability of the system.

[0014] Optionally, the MISO interface in the SPI interface of the target ADC chip is electrically connected to the corresponding interface in the second SPI interface through a tri-state buffer; the other interfaces of the second SPI interface are electrically connected to the corresponding interfaces in the SPI interface of the target ADC chip through the first buffer, wherein the other interfaces include the CLK interface, the CS interface and the MOSI interface.

[0015] By adopting the above technical solution, and introducing a tri-state buffer to connect the MISO (Master-In, Slave-Out) interface of the target ADC chip to the corresponding interface in the second SPI interface, it can be ensured that when multiple ADC chips share the SPI bus, only one ADC chip can send data to the master control module at any given time. This avoids communication conflicts and ensures the reliability and stability of data communication; the use of the tri-state buffer also allows for effective control of data flow during data transmission. By connecting the CLK (clock), CS (chip select), and MOSI (Master-Out, Slave-In) interfaces in the second SPI interface to the corresponding interfaces in the SPI interface of the target ADC chip through the first buffer, interference and attenuation of signals during transmission can be reduced. The buffer has signal amplification and isolation functions, which can enhance signal strength and stability, thereby improving the reliability of data communication.

[0016] Optionally, the output terminal of the frequency measurement module is electrically connected to the second input terminal of the main control module. The frequency measurement module includes a zero-crossing detection circuit, which converts the AC signal under test into a target level signal.

[0017] By adopting the above technical solution, the frequency measurement module can detect the zero-crossing point of the AC signal under test in real time and convert it into a target level signal, thereby achieving high-precision frequency measurement. Based on the target level signal, the main control module can accurately determine the current frequency of the AC signal under test, and then dynamically adjust the output clock frequency of the clock generator module to ensure that the sampling frequency of the ADC module at different frequencies always matches the actual frequency of the AC signal under test, thereby improving the adaptability and measurement accuracy of the system.

[0018] Optionally, a set of electrical parameters includes voltage, current, apparent power, active power, and reactive power.

[0019] By adopting the above technical solution, it is possible to accurately measure multiple electrical parameters of the AC signal under test, including voltage, current, apparent power, active power, and reactive power. This multi-parameter measurement capability enables the system to comprehensively reflect the characteristics of the AC signal, improving the accuracy and reliability of the measurement results, and making it suitable for various complex power application scenarios.

[0020] Secondly, this application also provides a frequency conversion sampling method applied to the aforementioned frequency conversion sampling system, comprising: using a frequency measurement module to convert the AC signal under test into a target level signal and transmitting it to a main control module; the main control module determining the current frequency of the AC signal under test based on the target level signal; the main control module comparing the current frequency with the original frequency; if the main control module determines that the current frequency is not equal to the original frequency, sending a frequency adjustment command to a clock generator module to instruct the clock generator module to adjust the clock frequency of the output clock signal; the clock generator module outputting a clock signal to an ADC module to drive the ADC module to sample the AC signal under test according to the sampling frequency, obtaining a first digital signal and a second digital signal, wherein the sampling frequency is equal to a predetermined multiple of the current frequency; the ADC module transmitting the first digital signal and the second digital signal to the main control module; and the main control module calculating a set of electrical parameters of the AC signal under test based on the first digital signal and the second digital signal.

[0021] By adopting the above technical solution, the frequency measurement module converts the AC signal under test into a target level signal and transmits it to the main control module. This allows the main control module to obtain the current frequency of the AC signal under test in real time. The main control module determines the current frequency of the AC signal under test based on the target level signal and compares it with the original frequency. If they differ, it sends a frequency adjustment command to the clock generator module to ensure that the clock frequency of the clock signal matches the current frequency of the AC signal under test. The clock generator module adjusts the clock frequency of its output clock signal according to the frequency adjustment command, enabling the ADC module to sample at the new sampling frequency, ensuring that the sampling frequency always matches the current frequency of the AC signal under test. The ADC module samples and quantizes the voltage and current of the AC signal under test according to the adjusted sampling frequency, obtaining a first digital signal and a second digital signal. These signals are then transmitted to the main control module. Based on the received first and second digital signals, the main control module calculates a set of electrical parameters of the AC signal under test, such as voltage, current, apparent power, active power, and reactive power, thereby achieving comprehensive and accurate measurement of the AC signal under test. This method is particularly suitable for applications where the frequency of the AC signal being measured varies significantly, effectively solving the problem of inaccurate measurement in existing technologies and improving the system's flexibility and adaptability. The frequency conversion sampling method provided by this technical solution enables real-time monitoring and adjustment of the sampling frequency, ensuring accurate signal acquisition even when the frequency of the AC signal being measured changes, thereby improving measurement accuracy and reliability.

[0022] Optionally, if the main control module determines that the current frequency is not equal to the original frequency, it sends a frequency adjustment command to the clock generator module to instruct the clock generator module to adjust the clock frequency of the output clock signal. This includes: the main control module sending the frequency adjustment command to the clock generator module; the clock generator module adjusting the clock frequency of the clock signal to the target clock frequency based on the frequency adjustment command; and the clock generator module outputting a clock signal to the ADC module to drive the ADC module to sample the AC signal under test according to the sampling frequency. This includes: the clock generator module outputting a clock signal of the target clock frequency to the ADC module to drive the ADC module to sample the AC signal under test according to the sampling frequency.

[0023] By adopting the above technical solution, the frequency of the clock signal can be adjusted in real time when the frequency of the AC signal under test changes, thereby ensuring that the ADC module always samples at the correct sampling frequency. This not only improves the flexibility of the system but also guarantees the accuracy of signal measurement in application scenarios with large frequency fluctuations, effectively solving the problem of inaccurate measurement due to frequency changes in traditional methods. Specifically, the main control module can quickly respond to frequency changes and accurately generate frequency adjustment commands, while the clock generator module can quickly adjust the frequency of the output clock signal, ensuring that the sampling frequency of the ADC module always matches the current frequency, thus accurately acquiring the AC signal under test.

[0024] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages:

[0025] 1. It can achieve accurate measurement of frequency conversion AC signals, and can effectively improve the accuracy and reliability of measurement in application scenarios where the frequency of the AC signal under test varies greatly;

[0026] 2. It can achieve high-precision synchronous sampling of multiple current signals. The number of N ADC chips can be flexibly configured according to actual needs, adapting to the multi-channel current signal measurement requirements in different application scenarios, thus improving the system's flexibility and applicability.

[0027] 3. The frequency measurement module can detect the zero-crossing point of the AC signal under test in real time and convert it into a target level signal, thereby achieving high-precision frequency measurement. Based on the target level signal, the main control module can accurately determine the current frequency of the AC signal under test, and then dynamically adjust the output clock frequency of the clock generator module to ensure that the sampling frequency of the ADC module at different frequencies always matches the actual frequency of the AC signal under test, thus improving the adaptability and measurement accuracy of the system. Attached Figure Description

[0028] Figure 1 This is a framework diagram of a frequency conversion sampling system provided in an embodiment of this application;

[0029] Figure 2 This is a flowchart of a frequency conversion sampling method provided in an embodiment of this application;

[0030] Figure 3 This is a schematic diagram of the hardware circuit principle of a frequency conversion sampling system provided in an embodiment of this application;

[0031] Figure 4 This is a software processing logic diagram of a frequency conversion sampling system provided in an embodiment of this application;

[0032] Figure 5 This is a software processing flowchart of a frequency conversion sampling system provided in an embodiment of this application. Detailed Implementation

[0033] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0034] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0035] In the description of the embodiments of this application, the term "multiple" means two or more. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0036] This application provides a frequency conversion sampling system, such as Figure 1 As shown, Figure 1This is a framework diagram of a frequency conversion sampling system provided in an embodiment of this application. The system includes: a frequency measurement module, a clock generator module, an ADC module, and a main control module. The frequency measurement module converts the AC signal under test into a target level signal and transmits it to the main control module. The main control module determines the current frequency of the AC signal under test based on the target level signal, and, if the current frequency differs from the original frequency, sends a frequency adjustment command to the clock generator module based on the current frequency. The current frequency represents the frequency of the AC signal under test in the current cycle, the original frequency represents the frequency of the AC signal under test in the previous cycle, and the frequency adjustment command instructs the clock generator module to adjust the clock frequency of the output clock signal. The clock generator module... The output terminal of the clock generator module is electrically connected to the clock input terminal of the ADC module. The clock generator module provides a clock signal to the ADC module to drive the ADC module to sample according to the sampling frequency, where the sampling frequency is equal to a predetermined multiple of the current frequency. The first SPI interface of the ADC module is connected to the second SPI interface of the main control module. The ADC module is used to perform voltage sampling and quantization on the AC signal under test according to the sampling frequency to obtain a first digital signal, and to perform current sampling and quantization on the AC signal under test according to the sampling frequency to obtain a second digital signal. The ADC module is also used to transmit the first digital signal and the second digital signal to the main control module through the first SPI interface. The main control module is used to calculate a set of electrical parameters of the AC signal under test based on the first digital signal and the second digital signal.

[0037] In the above embodiment, the frequency measurement module converts the AC signal under test into a target level signal and transmits it to the main control module, enabling the main control module to accurately obtain the current frequency of the AC signal under test. The main control module determines the current frequency based on the target level signal and sends a frequency adjustment command to the clock generator module when the current frequency changes. This allows the clock generator module to adjust the clock frequency of its output clock signal in real time, ensuring that the sampling frequency always matches the current frequency. The clock signal output by the clock generator module drives the ADC module to sample at the sampling frequency, ensuring high-precision sampling data is obtained at different frequencies. The ADC module transmits the sampled voltage and current digital signals to the main control module via the SPI interface. The main control module calculates a set of electrical parameters based on these signals, such as voltage, current, apparent power, active power, and reactive power, thereby achieving comprehensive measurement of the frequency-converted AC signal. Therefore, this embodiment can achieve accurate measurement of frequency-converted AC signals and effectively improve the accuracy and reliability of measurements in application scenarios where the frequency of the AC signal under test varies significantly.

[0038] This embodiment uses a frequency measurement module to monitor the frequency changes of the AC signal under test in real time and feeds these changes back to the main control module. This allows the system to dynamically adjust the sampling frequency according to the actual frequency of the signal, thereby improving measurement accuracy. The frequency conversion sampling system can adapt to large fluctuations in the frequency of the AC signal under test, no longer limited to fixed-frequency sampling, enhancing the system's flexibility and adaptability. The clock generator module dynamically adjusts the frequency of the clock signal according to the instructions of the main control module, ensuring that the ADC module samples at a sampling frequency that matches the current signal frequency, improving the real-time performance and accuracy of sampling. The ADC module can sample and quantize the voltage and current of the AC signal under test according to the adjusted sampling frequency, obtaining more comprehensive signal data. The main control module uses the acquired voltage and current digital signals to calculate the electrical parameters of the AC signal under test, such as voltage, current, and power, providing accurate data support for the monitoring and control of the power system. That is, in this embodiment, the frequency measurement module converts the AC signal under test into a target level signal in real time. The main control module can accurately determine the current frequency of the AC signal under test based on this signal. When the current frequency is different from the original frequency, the main control module can adjust the clock frequency of the clock generator module in time, thereby ensuring that the ADC module samples according to the sampling frequency that matches the current frequency of the AC signal under test. This frequency conversion sampling method can significantly improve the measurement accuracy, especially when the frequency of the AC signal under test changes significantly.

[0039] In practical applications, the clock signal output by the clock generator serves as the crystal oscillator drive signal for the ADC, and there is a corresponding relationship between it and the sampling frequency of the ADC. This relationship is calculated by the main control module according to a set formula. That is, there is a corresponding relationship between the clock signal frequency of the clock generator module and the sampling frequency of the ADC module. The sampling frequency is a fixed multiple of the frequency of the AC signal being measured. For example, if the number of sampling points for one signal cycle (i.e., one cycle of the AC signal being measured) is equal to 128 (or 256, or other), the sampling frequency = 128 × the current frequency. In this way, when the main control module determines the current frequency, it also knows the sampling frequency. Based on the correspondence between the clock frequency of the clock signal and the sampling frequency, the corresponding clock frequency can also be determined. Therefore, the clock generator module outputs a clock signal of the corresponding clock frequency through a frequency adjustment command.

[0040] In an alternative embodiment, the ADC module includes one or more ADC chips.

[0041] In the above embodiments, flexible sampling of the AC signal under test can be achieved. Specifically, when the ADC module includes a single ADC chip, the system structure is simplified, costs are reduced, and system complexity is decreased, making the system easier to maintain and manage. When the ADC module includes multiple ADC chips, simultaneous sampling through multiple channels can improve sampling accuracy and reliability, adapting to complex multi-channel signal sampling requirements. Whether using a single ADC chip or multiple ADC chips, the system can flexibly respond to frequency variations of the AC signal under test in different application scenarios, thereby improving measurement accuracy.

[0042] By using multiple ADC chips, the system can process more signal channels in parallel or increase the sampling rate of a single channel, thereby improving overall sampling performance. Employing multiple ADC chips allows for the selection of appropriate configurations based on specific application requirements, such as increasing sampling speed, improving resolution, or enabling simultaneous sampling of more channels. This is particularly important for monitoring complex power systems, providing higher-quality data support. The flexible selection of one or more ADC chips based on actual needs allows for both cost-effective single-chip solutions within a limited budget and multi-chip combinations for high-performance requirements, achieving an optimal balance between cost and performance. In practical applications, a single user typically needs to measure three-phase voltage and three-phase current, requiring only six channels, necessitating a single ADC chip. However, for multiple users, more current signals may need to be measured, requiring multiple ADC chips. The aforementioned measured AC signals include three-phase voltage signals and multiple current signals.

[0043] In an optional embodiment, when the ADC module includes an ADC chip, the ADC chip is used to perform AD sampling and quantization on the target voltage signal of the AC signal under test to obtain a first digital signal, and to perform AD sampling and quantization on the target current signal of the AC signal under test to obtain a second digital signal.

[0044] In the above embodiments, high-precision synchronous sampling and quantization of the target voltage and target current signals of the measured AC signal can be achieved, ensuring the accuracy of the first and second digital signals. This single-chip solution not only simplifies the system hardware structure and reduces costs, but also improves the system's integration and reliability, making it particularly suitable for applications requiring high-precision measurements.

[0045] Processing voltage and current signals simultaneously with a single ADC chip enables more integrated designs, effectively utilizing limited hardware resources, reducing hardware resource consumption, and lowering system costs. A single ADC chip can sample voltage and current signals concurrently, improving sampling efficiency, especially in applications requiring rapid response. Since voltage and current signals are processed by the same ADC chip, sampling synchronization is better guaranteed, which is crucial for accurately calculating electrical parameters (such as power factor). By implementing sampling and quantization of target voltage and current signals on a single ADC chip, it achieves technical benefits such as resource optimization, simplified system design, high-precision sampling, flexible configuration, and data consistency, providing an effective solution for resource-constrained applications.

[0046] In an optional embodiment, the ADC module includes N ADC chips, where N is a positive integer greater than or equal to 2. The first ADC chip is used to sample and quantize the target voltage signal of the AC signal under test to obtain a first voltage sub-signal, and the first ADC chip is also used to sample and quantize J current signals of the AC signal under test to obtain a first current sub-signal. The first digital signal includes the first voltage sub-signal, the second digital signal includes the first current sub-signal, and J is a positive integer greater than or equal to 3. The ith ADC chip is used to sample and quantize K current signals of the AC signal under test to obtain the ith current sub-signal. The N ADC chips include the first ADC chip and the ith ADC chip, where i is a positive integer greater than or equal to 2 and less than or equal to N, and K is a positive integer greater than or equal to 3.

[0047] In the above embodiment, by using multiple ADC chips, each responsible for sampling different current signals, the workload of a single ADC chip can be reduced, sampling errors can be decreased, and sampling accuracy can be improved. The parallel operation mode of multiple ADC chips can improve system redundancy; even if one ADC chip fails, the others can still operate normally, ensuring system stability and reliability. The first ADC chip samples not only the target voltage signal but also multiple current signals simultaneously, while the i-th ADC chip also samples multiple current signals. This design enables the system to synchronously sample multiple signals, ensuring the relative time relationship between signals and improving the accuracy of measurement results. The number of N ADC chips can be flexibly configured according to actual needs, adapting to the multi-channel current signal measurement requirements in different application scenarios, improving the system's flexibility and applicability. This embodiment can achieve high-precision synchronous sampling of multiple current signals. The K-channel current signals of the measured AC signal are different from the aforementioned J-channel current signals.

[0048] In some applications, simultaneous sampling and quantization of multiple signal channels is required, and a single ADC chip may not be able to meet such high concurrency demands. This embodiment utilizes multiple ADC chips working in parallel, enabling simultaneous sampling of multiple signal channels and significantly improving system sampling efficiency. The system can flexibly configure the number of ADC chips as needed to adapt to different application scenarios and requirements, enhancing system flexibility and scalability. Multiple ADC chips can process more signals simultaneously or sample the same signal at higher resolution, enhancing the depth and breadth of signal processing. Since multiple ADC chips can work simultaneously, sampling synchronization can be better guaranteed, which is crucial for accurately calculating electrical parameters (such as power factor). By having multiple ADC chips work in parallel, each ADC focuses on a specific task (e.g., the first ADC handles voltage and a portion of the current signal, while the others handle other current signals), significantly improving the speed and accuracy of multi-channel data acquisition and ensuring correct phase relationships between all signals. This configuration is ideal for three-phase or multi-phase power systems where each phase may have independent voltage and current signals that need to be accurately monitored. Multiple ADC chips can process current signals of different phases separately, while one ADC is dedicated to processing voltage signals, enabling the entire system to analyze the power status more comprehensively and in detail.

[0049] In an optional embodiment, the target ADC chip is any ADC chip in the ADC module, wherein the clock input terminal of the target ADC chip is electrically connected to the output terminal of the clock generator module, and each interface in the SPI interface of the target ADC chip is electrically connected to the corresponding interface in the second SPI interface; the target flag port of the target ADC chip is electrically connected to the first input terminal of the main control module, and the target flag port is configured to send a preset level signal to the main control module when the target ADC chip completes one sampling, so that the main control module can read the first digital signal and the second digital signal.

[0050] In the above embodiments, the clock input terminal of the target ADC chip is electrically connected to the output terminal of the clock generator module, ensuring that the ADC module can accurately sample according to the real-time changing frequency, avoiding errors caused by fixed-frequency sampling; the SPI interface of the target ADC chip is correspondingly connected to the second SPI interface of the main control module, realizing efficient data transmission, reducing communication latency, and improving the system response speed; the target flag port of the target ADC chip is electrically connected to the first input terminal of the main control module. When the target ADC chip completes a sampling, it sends a preset level signal to the main control module, enabling the main control module to read the latest sampling data in a timely manner, ensuring the real-time performance and accuracy of the data; through the preset level signal of the target flag port, the main control module can confirm the completion status of each sampling, enhancing the reliability and stability of the system.

[0051] This embodiment ensures that the sampling operation of the target ADC chip is synchronized with the system's clock signal by electrically connecting the clock input terminal of the target ADC chip to the output terminal of the clock generator module, thereby improving data synchronization. Electrically connecting the SPI interface of the target ADC chip to the corresponding interface in the second SPI interface of the main control module simplifies the data transmission path and improves the efficiency and reliability of data reading. By setting the target flag port to send a preset level signal to the main control module upon completion of one sampling cycle (i.e., completion of one cycle of sampling of the measured AC signal), the main control module can accurately know the sampling status and promptly initiate the data reading operation. This not only improves the system's response speed and real-time performance but also enhances the accuracy of data management. Since the target ADC chip can be any one of the modules, meaning any ADC chip in the ADC module connects and communicates with other modules according to the connection method described above for the target ADC chip, this design provides flexibility. Different ADC chips can be selected for data acquisition as needed, and it also facilitates the expansion of the system with more ADC chips. The first SPI interface includes the SPI interface of the target ADC chip. When the ADC module includes multiple ADC chips, the first SPI interface includes the SPI interfaces of each ADC chip.

[0052] In an optional embodiment, the MISO interface in the SPI interface of the target ADC chip is electrically connected to the corresponding interface in the second SPI interface through a tri-state buffer; the other interfaces of the second SPI interface are electrically connected to the corresponding interfaces in the SPI interface of the target ADC chip through a first buffer, wherein the other interfaces include the CLK interface, the CS interface and the MOSI interface.

[0053] In the above embodiments, by introducing a tri-state buffer to connect the MISO (Master-In, Slave-Out) interface of the target ADC chip to the corresponding interface in the second SPI interface, it can be ensured that when multiple ADC chips share the SPI bus, only one ADC chip can send data to the master control module at any given time. This avoids communication conflicts and ensures the reliability and stability of data communication; the use of the tri-state buffer also allows for effective control of data flow during data transmission. By connecting the CLK (clock), CS (chip select), and MOSI (Master-Out, Slave-In) interfaces in the second SPI interface to the corresponding interfaces in the SPI interface of the target ADC chip through the first buffer, interference and attenuation of signals during transmission can be reduced. The buffer has signal amplification and isolation functions, which can enhance the strength and stability of the signal, thereby improving the reliability of data communication.

[0054] This embodiment effectively avoids conflicts when multiple ADC chips simultaneously send data to the main control module by using a tri-state buffer on the MISO interface (master-in, slave-out). The tri-state buffer allows each ADC chip to activate its MISO line only when it is selected, thus ensuring the orderliness of data transmission. The first buffer (used for CLK, CS, and MOSI interfaces) enhances signal driving capability and anti-interference performance, reducing signal attenuation and noise problems caused by long-line transmission or complex wiring. This helps maintain signal clarity and reliability, especially in high-speed communication scenarios. The application of buffers not only improves signal quality but also increases system stability and robustness, ensuring good communication even in harsh operating environments. This design is particularly suitable for situations requiring multiple ADC chips to share the same SPI bus, providing a flexible and reliable solution for easy expansion with more ADCs or other peripherals. The frequency conversion sampling system of this embodiment allows the number of ADC chips to be increased or decreased as needed without major modifications to the SPI interface. Simply connect the SPI interface of the new ADC chip to the existing SPI bus through the corresponding buffer. This enhances the system's scalability and flexibility, enabling it to adapt to different data acquisition requirements.

[0055] In an optional embodiment, the output terminal of the frequency measurement module is electrically connected to the second input terminal of the main control module. The frequency measurement module includes a zero-crossing detection circuit, which converts the AC signal under test into a target level signal.

[0056] In the above embodiments, the frequency measurement module can detect the zero-crossing point of the AC signal under test in real time and convert it into a target level signal, thereby achieving high-precision frequency measurement; the main control module can accurately determine the current frequency of the AC signal under test based on the target level signal, and then dynamically adjust the output clock frequency of the clock generator module to ensure that the sampling frequency of the ADC module at different frequencies always matches the actual frequency of the AC signal under test, thereby improving the adaptability and measurement accuracy of the system.

[0057] This embodiment introduces a zero-crossing detection circuit, enabling the frequency measurement module to accurately capture the zero-crossing point of the measured AC signal—that is, the moment when the signal crosses zero from positive to negative or vice versa. The zero-crossing point is a significant characteristic of AC signals, and using it for frequency measurement can greatly improve measurement accuracy. The zero-crossing detection circuit converts the complex AC signal into a simple target level signal (usually high or low level), greatly simplifying the subsequent signal processing flow. The main control module only needs to process these simple level signals to achieve accurate measurement and analysis of the AC signal frequency. The zero-crossing detection circuit can quickly respond to changes in the AC signal and output the target level signal in real time, improving the real-time performance and efficiency of the measurement, allowing the system to respond to and process changes in the AC signal more quickly.

[0058] In one alternative embodiment, a set of electrical parameters includes voltage, current, apparent power, active power, and reactive power.

[0059] In the above embodiments, accurate measurement of multiple electrical parameters of the AC signal under test can be achieved, specifically including voltage, current, apparent power, active power, and reactive power. This multi-parameter measurement capability enables the system to comprehensively reflect the characteristics of the AC signal, improving the accuracy and reliability of the measurement results, and making it suitable for various complex power application scenarios.

[0060] This system can measure various electrical parameters, including voltage, current, apparent power, active power, and reactive power, providing comprehensive data support for power system monitoring and maintenance. This is particularly useful in applications where the frequency of the measured AC signal fluctuates significantly. For example, the start-up and shutdown of large industrial equipment or grid fluctuations can cause substantial frequency changes in AC signals, as can the frequency of AC signals from wind power generation equipment. Accurate electrical parameter data helps energy managers develop more effective energy management strategies, achieve rational energy allocation and use, and reduce energy costs. Comprehensive monitoring of power system electrical parameters allows for the timely detection and prevention of potential power system problems, improving system reliability and security. By calculating and outputting voltage, current, apparent power, active power, and reactive power, the system provides users with comprehensive and detailed information on power operation, facilitating better management and optimization of power usage.

[0061] As an optional implementation, the system further includes a voltage acquisition module and a current acquisition module. The voltage acquisition module acquires the target voltage signal of the AC signal under test and transmits it to the ADC module. The current acquisition module acquires the target current signal of the AC signal under test and transmits it to the ADC module. The ADC module then samples and quantizes the target voltage signal and the target current signal respectively to obtain the corresponding digital signals.

[0062] This application also provides a frequency conversion sampling method, applicable to the frequency conversion sampling system of any of the foregoing embodiments. Figure 2 This is a flowchart of a frequency conversion sampling method provided in an embodiment of this application. The process includes:

[0063] Step S201: The frequency measurement module is used to convert the AC signal under test into a target level signal and transmit it to the main control module;

[0064] Step S202: The main control module determines the current frequency of the AC signal under test based on the target level signal;

[0065] Step S203: The main control module compares the current frequency with the original frequency;

[0066] In step S204, when the main control module determines that the current frequency is not equal to the original frequency, it sends a frequency adjustment command to the clock generator module to instruct the clock generator module to adjust the clock frequency of the output clock signal.

[0067] In step S205, the clock generator module outputs a clock signal to the ADC module to drive the ADC module to sample the AC signal under test according to the sampling frequency to obtain a first digital signal and a second digital signal, wherein the sampling frequency is equal to a predetermined multiple of the current frequency.

[0068] In step S206, the ADC module transmits the first digital signal and the second digital signal to the main control module;

[0069] In step S207, the main control module calculates a set of electrical parameters of the AC signal under test based on the first digital signal and the second digital signal.

[0070] Through the above steps, the frequency measurement module converts the AC signal under test into a target level signal and transmits it to the main control module, enabling the main control module to obtain the current frequency of the AC signal under test in real time. The main control module determines the current frequency of the AC signal under test based on the target level signal and compares it with the original frequency. If they differ, it sends a frequency adjustment command to the clock generator module to ensure that the clock frequency of the clock signal matches the current frequency of the AC signal under test. The clock generator module adjusts the clock frequency of its output clock signal according to the frequency adjustment command, enabling the ADC module to sample at the new sampling frequency, ensuring that the sampling frequency always matches the current frequency of the AC signal under test. The ADC module samples and quantizes the voltage and current of the AC signal under test according to the adjusted sampling frequency, obtaining a first digital signal and a second digital signal, and transmits these signals to the main control module. The main control module calculates a set of electrical parameters of the AC signal under test based on the received first and second digital signals, such as voltage, current, apparent power, active power, and reactive power, thereby achieving comprehensive and accurate measurement of the AC signal under test. This method is particularly suitable for applications where the frequency of the AC signal being measured varies significantly, effectively solving the problem of inaccurate measurement in existing technologies and improving the system's flexibility and adaptability. The frequency conversion sampling method provided in this embodiment can achieve real-time monitoring and adjustment of the sampling frequency, ensuring accurate signal acquisition even when the frequency of the AC signal being measured changes, thereby improving measurement accuracy and reliability.

[0071] This embodiment uses a frequency measurement module to convert the AC signal under test into a target level signal in real time. The main control module can accurately determine the current frequency of the signal under test and compare it with the original frequency. If the current frequency changes, the main control module sends a frequency adjustment command to the clock generator module to achieve adaptive adjustment of the sampling frequency. This mechanism ensures that the sampling frequency always matches the frequency of the signal under test, avoiding sampling errors caused by frequency mismatch. Because the sampling frequency can be adaptively adjusted, the sampling points more accurately reflect the waveform characteristics of the signal under test. This helps improve the measurement accuracy of electrical parameters (such as voltage, current, power, etc.), making the measurement results more accurate and reliable. By adjusting the sampling frequency in real time, the system can better adapt to changes in the frequency of the signal under test, thereby enhancing the stability and robustness of the system. Even under complex operating conditions such as power grid fluctuations or load changes, the system can maintain stable measurement performance. The adaptive sampling frequency adjustment mechanism of this embodiment can dynamically adjust the sampling frequency according to the actual situation of the signal under test.

[0072] In an optional embodiment, when the main control module determines that the current frequency is not equal to the original frequency, it sends a frequency adjustment command to the clock generator module to instruct the clock generator module to adjust the clock frequency of the output clock signal. This includes: the main control module sending the frequency adjustment command to the clock generator module; the clock generator module adjusting the clock frequency of the clock signal to the target clock frequency based on the frequency adjustment command; and the clock generator module outputting a clock signal to the ADC module to drive the ADC module to sample the AC signal under test according to the sampling frequency. This includes: the clock generator module outputting a clock signal of the target clock frequency to the ADC module to drive the ADC module to sample the AC signal under test according to the sampling frequency.

[0073] In the above embodiments, the frequency of the clock signal can be adjusted in real time when the frequency of the AC signal under test changes, thereby ensuring that the ADC module always samples at the correct sampling frequency. This not only improves the flexibility of the system but also ensures the accuracy of signal measurement in application scenarios with large frequency fluctuations, effectively solving the problem of inaccurate measurement due to frequency changes in traditional methods. Specifically, the main control module can quickly respond to frequency changes and accurately generate frequency adjustment commands, while the clock generator module can quickly adjust the frequency of the output clock signal, so that the sampling frequency of the ADC module always matches the current frequency, thereby accurately acquiring the AC signal under test.

[0074] During frequency conversion sampling, the sampling frequency needs to be adjusted in real time to match the changes in the AC signal being measured, ensuring the accuracy and validity of the sampled data. When the frequency of the AC signal changes, the system needs to respond quickly and adjust the sampling frequency to avoid data loss or sampling errors. To ensure that the ADC module can sample at the correct sampling frequency, the clock signal output by the clock generator module needs to be precisely controlled. This embodiment improves the accuracy of the sampled data by adjusting the clock frequency in real time to match the current frequency of the AC signal being measured, ensuring that the sampled data accurately reflects the characteristics of the AC signal. This method allows the system to respond quickly to frequency changes, enhancing the system's adaptability to dynamically changing environments, which is particularly important for power systems requiring real-time monitoring and analysis. This method is not only applicable to AC signals with stable frequencies but also to scenarios with large frequency variations, such as frequency conversion motor drives and dynamic monitoring of power systems, and has broad application prospects.

[0075] In the above embodiment, the main control module sends a precise frequency adjustment command to the clock generator module, which can accurately adjust the frequency of the clock signal to the target clock frequency. Since the frequency of the clock signal can be accurately adjusted to the target clock frequency, the ADC module can sample the AC signal under test at the correct sampling frequency. This ensures that the sampled data accurately reflects the waveform characteristics of the measured signal, improving the accuracy and reliability of the sampled data. In practical applications, the clock signal output by the clock generator serves as the crystal oscillator drive signal for the ADC, and there is a corresponding relationship between it and the sampling frequency of the ADC. This relationship is calculated by the main control module according to the set correspondence formula. That is, there is a corresponding relationship between the clock signal frequency of the clock generator module (i.e., the target clock frequency mentioned above) and the sampling frequency of the ADC module. The sampling frequency is a fixed multiple of the frequency of the measured AC signal. For example, if the number of sampling points for one signal cycle (i.e., one cycle of the measured AC signal) is equal to 128 (or 256, or other), the sampling frequency = 128 × the current frequency. In this way, when the main control module determines the current frequency, it can determine the target clock frequency corresponding to the sampling frequency. Therefore, the aforementioned frequency adjustment command causes the clock generator module to output a clock signal at the target clock frequency.

[0076] It should be noted that the embodiments described above are only some embodiments of this application, and not all embodiments. The present application will be described in detail below with reference to specific embodiments.

[0077] This application provides an adaptive fast frequency conversion sampling system and method. The entire system is divided into a frequency measurement module, a clock generator module, an ADC cascade module (corresponding to the aforementioned ADC module), and a main control module.

[0078] Figure 3 This is a schematic diagram of the hardware circuit principle of a frequency conversion sampling system provided in an embodiment of this application. The following describes each module separately.

[0079] Frequency measurement module: This module consists of a frequency measurement circuit in hardware. Its function is to measure the frequency of AC signals. The working principle is that the AC signal under test is converted into a level signal after passing through the frequency measurement circuit and input to the main control chip. The main control chip calculates the frequency of the signal under test by comparing it with the inherent frequency.

[0080] Clock generator module: This module consists of a programmable clock generator chip and its peripheral circuits. Its function is to provide a clock source for the ADC chip. The working principle is that the main control chip sends a frequency command (corresponding to the aforementioned frequency adjustment command) to the clock generator, so that the clock generator outputs a clock signal of a given frequency (corresponding to the aforementioned target clock frequency). This signal serves as the crystal oscillator signal for the ADC chip, driving the ADC chip to sample the signal at a relevant frequency (corresponding to the aforementioned sampling frequency).

[0081] ADC Cascade Module: This module consists of three cascaded ADC chips. Each ADC's SPI (serial communication interface) port is connected to a tri-state buffer. The master control chip connects to the tri-state buffer via the SPI interface. Its function is to simultaneously sample signals from 21 channels. The working principle is that after each sampling, the ADC chip outputs a sampling completion flag, which the master control chip can retrieve. Figure 3 In the ADCs / DR0, / DR1, and / DR2, after all ADC chips have completed one sampling cycle, the main control chip reads the 21 channels of sampling data from the three ADCs simultaneously via the SPI interface. For example... Figure 3 As shown, the input to the 3-state buffer is associated with the CS chip select and controls the selected ADC data to be buffered to the corresponding 3-state buffer. Both the ADC chip and the 3-state buffer need to be notified simultaneously. Figure 3 / RST indicates the reset signal, which is a control signal used to reset the ADC chip.

[0082] Main control module: This module consists of a main control chip and its peripheral circuits. Its function is to process and calculate the frequency values ​​measured by the frequency measurement module and convert them into instructions to control the clock generator to generate clock signals. It also has the function of communicating with the ADC cascade module and acquiring sampled data.

[0083] Figure 4 This is a software processing logic diagram of a frequency conversion sampling system provided in an embodiment of this application, such as... Figure 4 As shown, the working principle of the entire system is as follows: The AC signal to be measured is input to the frequency measurement module, which converts the signal into a measurable periodic signal and inputs it to the main control module. Figure 4 The main control chip in the system calculates the frequency of the current signal through a frequency measurement algorithm, and then converts it into an instruction to control the clock generator module. The instruction is sent to the clock generator module, and the generated clock signal drives the ADC cascade module to sample at a specific frequency (corresponding to the aforementioned sampling frequency). In this way, the sampling frequency will be matched in real time according to the frequency of the signal being measured.

[0084] Adaptive fast frequency conversion process: When the frequency of the current cycle signal is consistent with the frequency of the previous cycle signal, the clock generator maintains the existing clock signal output, and the ADC cascade module maintains the current sampling frequency for one sampling. When the frequency of the current cycle signal is greater than the frequency of the previous cycle signal, the main control module calculates the output clock signal value matched by the clock generator based on the signal frequency value measured by the frequency measurement module, and then converts it into a communication command and sends it to the clock generator. After receiving the command, the clock generator immediately outputs an updated clock signal, which is larger than the old clock signal. Because the value of the driving clock source of the ADC cascade module is larger, the corresponding sampling frequency is increased, and the sampling accuracy is guaranteed by matching the frequency of the cycle signal. When the frequency of the current cycle signal is less than the frequency of the previous cycle signal, the main control module calculates the output clock signal value matched by the frequency measurement module based on the signal frequency value measured by the frequency measurement module. The measured signal frequency value is used to calculate the output clock signal value matched by the clock generator, which is then converted into a communication command and sent to the clock generator. Upon receiving the command, the clock generator immediately outputs an updated clock signal, which is smaller than the old clock signal. Because the value of the driving clock source is smaller, the sampling frequency of the ADC cascade module is reduced accordingly, and the sampling accuracy is guaranteed by matching the frequency of the periodic signal. Regardless of how the signal frequency changes, the frequency measurement module can measure the current frequency in real time. The main control module performs calculations on the frequency value in real time, converts it into control commands, and sends them to the clock generator. The clock generator adjusts the output clock signal in real time, and the ADC cascade module adjusts the sampling frequency in real time, thereby ensuring that, with a fixed number of sampling points, the sampled data can guarantee both its accuracy and be an integer period of the signal.

[0085] Figure 5 This is a software processing flowchart of a frequency conversion sampling system provided in an embodiment of this application. The flowchart includes:

[0086] S501, acquires the frequency measurement circuit signal; the frequency measurement circuit signal refers to the level signal after the AC signal under test is converted by the frequency measurement circuit.

[0087] S502, Calculate the current signal frequency (corresponding to the aforementioned current frequency); the main control module calculates the current signal frequency using a frequency measurement algorithm;

[0088] S503, compare with the past frequency (corresponding to the aforementioned original frequency);

[0089] S504 determines whether the frequency needs to be changed; that is, it determines whether the current frequency has changed relative to the original frequency.

[0090] S505: When the judgment result of S504 is yes, output clock command, that is, instruct the clock generator to adjust the frequency of the output clock signal.

[0091] If the result of S504 is negative, proceed to S507;

[0092] S506, clock generator updates output frequency;

[0093] S507, the ADC samples according to the current sampling frequency; the current frequency is determined by the updated output frequency of the clock generator, and the clock signal output by the clock generator is used to drive the ADC module to sample according to the current sampling frequency;

[0094] S508 determines whether all ADCs have completed sampling; that is, it determines whether all ADC chips have completed sampling.

[0095] S509, when the judgment result of S508 is yes, the main control chip reads the ADC sample value; that is, it reads the sample value of all ADC chips;

[0096] S510, End.

[0097] The embodiments of this application have at least the following technical effects: 1) It solves the problem of synchronous adjustment of sampling frequency when the ADC sampling module group acquires signals from multiple channels (>20 channels); 2) It solves the problem of rapid adaptive adjustment of signal sampling frequency in units of signal period; 3) It solves the problem that the signal sampling frequency adjustment accuracy does not meet the condition of small changes in signal frequency (<0.01Hz).

[0098] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0099] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0100] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practical application.

[0101] This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art that are not described in this disclosure.

Claims

1. A variable frequency sampling system, characterized by, The application relates to a frequency measurement device, comprising a frequency measurement module, a clock generator module, an ADC module and a main control module, wherein the frequency measurement module is used for converting a measured AC signal into a target level signal and transmitting the target level signal to the main control module; the main control module is used for determining a current frequency of the measured AC signal based on the target level signal, and sending a frequency adjustment instruction to the clock generator module based on the current frequency in the case that the current frequency is different from an original frequency, wherein the current frequency represents the frequency of the measured AC signal in a current period, the original frequency represents the frequency of the measured AC signal in a last period of the current period, and the frequency adjustment instruction is used for instructing the clock generator module to adjust the clock frequency of an output clock signal; the output end of the clock generator module is electrically connected with the clock input end of the ADC module, and the clock generator module is used for providing the clock signal to the ADC module to drive the ADC module to sample at a sampling frequency, wherein the sampling frequency is equal to a predetermined multiple of the current frequency; the first SPI interface of the ADC module is correspondingly connected with the second SPI interface of the main control module, and the ADC module is used for sampling and quantizing the measured AC signal to obtain a first digital signal and a second digital signal; and the ADC module is further used for transmitting the first digital signal and the second digital signal to the main control module through the first SPI interface; the main control module is used for calculating a group of electrical parameters of the measured AC signal based on the first digital signal and the second digital signal; wherein the ADC module comprises one ADC chip or a plurality of ADC chips; the target ADC chip is any one of the ADC chips in the ADC module, wherein the clock input end of the target ADC chip is electrically connected with the output end of the clock generator module, each interface of the SPI interface of the target ADC chip is electrically connected with a corresponding interface of the second SPI interface, the target flag port of the target ADC chip is electrically connected with the first input end of the main control module, the target flag port is set to send a preset level signal to the main control module when the target ADC chip completes sampling once, so that the main control module reads the first digital signal and the second digital signal; the MISO interface of the SPI interface of the target ADC chip is electrically connected with a corresponding interface of the second SPI interface through a tri-state buffer, and the other interfaces of the second SPI interface are respectively electrically connected with corresponding interfaces of the SPI interface of the target ADC chip through a first buffer, wherein the other interfaces include a CLK interface, a CS interface and a MOSI interface. ​ ​ ​ ​ ​ ​ ​ ​ ​ 2. The system of claim 1, wherein, In a case that the ADC module comprises one ADC chip, the ADC chip is configured to sample and quantize the target voltage signal of the measured AC signal to obtain the first digital signal, and sample and quantize the target current signal of the measured AC signal to obtain the second digital signal.

3. The system of claim 1, wherein, The ADC module comprises N ADC chips, N is a positive integer greater than or equal to 2, wherein, The first ADC chip is configured to sample and quantize the target voltage signal of the measured AC signal to obtain a first voltage sub-signal, and the first ADC chip is further configured to sample and quantize J current signals of the measured AC signal to obtain a first current sub-signal, wherein the first digital signal comprises the first voltage sub-signal, the second digital signal comprises the first current sub-signal, and J is a positive integer greater than or equal to 3; The i-th ADC chip is configured to sample and quantize K current signals of the measured AC signal to obtain an i-th current sub-signal, wherein the N ADC chips comprise the first ADC chip and the i-th ADC chip, i is a positive integer greater than or equal to 2 and less than or equal to N, and K is a positive integer greater than or equal to 3.

4. The system of claim 1, wherein, The output end of the frequency measurement module is electrically connected to the second input end of the main control module, the frequency measurement module comprises a zero-crossing detection circuit, and the frequency measurement module converts the measured AC signal into the target level signal by using the zero-crossing detection circuit.

5. The system of any one of claims 1 to 4, wherein, The set of electrical parameters comprises voltage value, current value, apparent power, active power and reactive power.

6. A method of frequency-sampling, characterized by The system is applied to any one of claims 1-5, comprising: The measured AC signal is converted into the target level signal by using the frequency measurement module, and transmitted to the main control module; The main control module determines the current frequency of the measured AC signal based on the target level signal; The main control module compares the current frequency with the original frequency; In a case that the main control module determines that the current frequency is not equal to the original frequency, the main control module sends the frequency adjustment instruction to the clock generator module to instruct the clock generator module to adjust the clock frequency of the output clock signal; The clock generator module outputs the clock signal to the ADC module to drive the ADC module to sample the measured AC signal at a sampling frequency to obtain the first digital signal and the second digital signal, wherein the sampling frequency is equal to a predetermined multiple of the current frequency; The ADC module transmits the first digital signal and the second digital signal to the main control module; The main control module calculates the set of electrical parameters of the measured AC signal according to the first digital signal and the second digital signal.

7. The method of claim 6, wherein, The master module sends the frequency adjustment instruction to the clock generator module to instruct the clock generator module to adjust the clock frequency of the output clock signal in a case where it is determined that the current frequency is not equal to the original frequency, comprising: the master module sending the frequency adjustment instruction to the clock generator module; and the clock generator module adjusting the clock frequency of the clock signal to a target clock frequency based on the frequency adjustment instruction; The clock generator module outputs the clock signal to the ADC module to drive the ADC module to sample the measured alternating current signal at a sampling frequency, comprising: the clock generator module outputting the clock signal of the target clock frequency to the ADC module to drive the ADC module to sample the measured alternating current signal at the sampling frequency.

Citation Information

Patent Citations

  • Synchronous tracking harmonic measurement device and method

    CN115267327A

  • Powerline Load Monitor and Control

    US20230089376A1