Frequency signal acquisition system and method
The trigger signal is generated through the signal acquisition module, combined with the time frequency formula and module design, the problem of insufficient high-frequency signal acquisition accuracy is solved, high-precision and efficient frequency signal acquisition and direction judgment are achieved, and the cost is reduced.
Patent Information
- Application Number
- CN202411574475.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing frequency measurement method is insufficient in the acquisition of high-frequency signals due to the chip main frequency limitation, which cannot meet the accuracy requirements of high-frequency signals.
The signal acquisition module generates a trigger signal to avoid the main frequency influence of the control unit, and use the time frequency formula to calculate the actual frequency of the frequency signal. Combined with the signal conditioning module, signal diagnosis module and direction comparison module, it realizes high-precision high-frequency signal acquisition and direction judgment and frequency diagnosis.
It significantly improves the acquisition accuracy of high-frequency signals, supports waveform direction judgment and frequency diagnosis of multiple same-frequency frequency signals, and realizes low-cost and high-precision frequency signal acquisition, with the accuracy error controlled at 2‰.
Smart Images

Figure CN119087036A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of signal acquisition, and in particular to a frequency signal acquisition system and method. Background Art
[0002] At present, in the field of signal acquisition, there are two commonly used methods for acquiring frequency signals: the period measurement method and the frequency measurement method. The period measurement method is often used to measure low-frequency signals, and the frequency measurement method is often used to measure high-frequency signals. Although the frequency measurement method can measure high-frequency signals, it often cannot meet the acquisition accuracy requirements when measuring high-frequency signals. For example, when acquiring a frequency signal with a frequency of 10M, when using the frequency measurement method to measure, due to the limitation of the chip's main frequency, the error of the collected frequency signal will exceed 1%, and the error accuracy is large, which cannot meet the acquisition requirements. Therefore, how to collect high-frequency signals without being affected by the chip's main frequency factors, and ensure that the collected frequency signals meet the accuracy range and realize signal direction judgment and frequency diagnosis is a direction that needs to be considered. Summary of the invention
[0003] In response to the above problems, the present disclosure provides a frequency signal acquisition system and method, which can not only realize the acquisition of frequency signals through a signal acquisition module and a control unit, but also obtain the actual frequency of the frequency signal through a trigger signal generated by the signal acquisition module, thereby avoiding the influence of the main frequency of the control unit, and thus significantly improving the acquisition accuracy of the frequency signal, solving the above problems. The present disclosure supports high-precision high-frequency signal acquisition, direction judgment, frequency diagnosis and redundant design. The frequency signal acquisition system and method provided by the present disclosure not only collect frequency signals with high accuracy and low cost, but also support waveform direction judgment of multiple channels of the same frequency signals, and support frequency diagnosis function.
[0004] According to a first aspect of the present disclosure, a frequency signal acquisition system is provided, the system comprising a signal acquisition module, configured to respectively receive a frequency signal and a predetermined time signal at an input end of the signal acquisition module, and generate a trigger signal when the received frequency signal meets a predetermined condition within a predetermined time; and a control unit, configured to be communicatively connected with the signal acquisition module to provide the predetermined time signal to the signal acquisition module and receive a trigger signal from the signal acquisition module, so as to determine the frequency of the received frequency signal through the trigger signal, wherein the predetermined condition comprises a rising edge interrupt of the received frequency signal and a falling edge interrupt of the received frequency signal.
[0005] In one embodiment, the control unit is further configured to: start the timer for the standard frequency signal and the timer for the received frequency signal when the trigger signal corresponding to the rising edge interrupt is received for the first time; and turn off the timer for the standard frequency signal and the timer for the received frequency signal when the trigger signal corresponding to the falling edge interrupt is received.
[0006] In one embodiment, the control unit is further configured to: based on the frequency of the standard frequency signal, calculate the actual frequency of the received frequency signal using a time-frequency formula according to the data recorded by the timer for the standard frequency signal and the data recorded by the timer for the received frequency signal.
[0007] In one embodiment, the frequency signal acquisition system further includes: a signal conditioning module configured to receive the frequency signal and separate one or more frequency-divided frequency signals having the same frequency as the received frequency signal from the received frequency signal; and a signal diagnosis module configured to include a channel selection unit and selectively receive the frequency-divided frequency signal or the frequency diagnosis signal having a fixed frequency from the signal conditioning module through the channel selection unit.
[0008] In one embodiment, the signal diagnosis module is further configured to: be communicatively connected with the control unit to respectively receive a frequency division frequency signal from the signal conditioning module and a predetermined diagnostic time signal from the control unit at the input end of the signal diagnosis module; generate a trigger signal when the frequency division frequency signal meets the predetermined condition within a predetermined diagnostic time of the predetermined diagnostic time signal; and send the trigger signal to the control unit to obtain an actual frequency division frequency corresponding to the frequency division frequency signal through the trigger signal.
[0009] In one embodiment, the signal diagnosis module is further configured to: receive a frequency diagnosis signal and the predetermined diagnosis time signal from the control unit at the input end of the signal diagnosis module, respectively; generate a trigger signal when the frequency diagnosis signal meets the predetermined condition within the predetermined diagnosis time of the predetermined diagnosis time signal; and send the trigger signal to the control unit to obtain the actual diagnostic frequency corresponding to the frequency diagnosis signal through the trigger signal.
[0010] In one embodiment, the control unit is further configured to: calculate the frequency difference between the actual frequency of the received frequency signal and the actual frequency division frequency corresponding to the frequency division frequency signal; calculate the diagnostic frequency difference between the fixed frequency of the frequency diagnostic signal and the actual diagnostic frequency corresponding to the frequency diagnostic signal; and determine whether the actual frequency of the received frequency signal is correct based on the frequency difference and the diagnostic frequency difference.
[0011] In one embodiment, the frequency signal acquisition system also includes: a direction comparison module, configured to communicate with the control unit to receive a first frequency signal and a second frequency signal having the same frequency; generate a trigger signal having a high level or a low level when the first frequency signal and the second frequency signal satisfy a predetermined relationship; and send the trigger signal to the control unit, thereby determining the direction through the trigger signal.
[0012] In one embodiment, the control unit is further configured to: receive the trigger signal from the direction comparison module and identify the level corresponding to the trigger signal; when it is identified that the triggered signal corresponds to a high level, update the direction state value to 1; and when it is identified that the triggered signal corresponds to a low level, update the direction state value to 0.
[0013] According to a second aspect of the present disclosure, a method is provided, comprising connecting a frequency signal acquisition system to at least one frequency signal source; acquiring the frequency signal through a signal acquisition module and generating a corresponding trigger signal; and receiving the trigger signal through a control unit, and determining the actual frequency corresponding to the frequency signal through the trigger signal.
[0014] According to a third aspect of the present disclosure, a computing device for frequency signal acquisition is provided, comprising one or more processors; and a memory storing computer executable instructions, which, when executed by the one or more processors, enable the one or more processors to execute the method according to the second aspect of the present disclosure.
[0015] According to a fourth aspect of the present disclosure, a non-volatile storage medium having computer executable instructions stored thereon is provided. When the computer executable instructions are executed by a computer, the computer executes the method according to the second aspect or the third aspect of the present disclosure.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements.
[0018] Figure 1 A schematic diagram of a frequency signal acquisition system according to an embodiment of the present disclosure is shown.
[0019] Figure 2 A schematic diagram of a frequency signal acquisition system according to another embodiment of the present disclosure is shown.
[0020] Figure 3 A schematic diagram of a frequency signal acquisition system according to another embodiment of the present disclosure is shown.
[0021] Figure 4 A schematic diagram showing an exemplary circuit of a frequency signal acquisition system according to the present disclosure is shown.
[0022] Figure 5 A flow chart of a method for using a frequency signal acquisition system according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] As used herein, the term "including" and its variations mean open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The terms "an example embodiment" and "an embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". Other explicit and implicit definitions may also be included below.
[0025] As mentioned above, although the frequency measurement method can collect high-frequency signals, it will be affected by the chip main frequency of the control unit when collecting high-frequency signals, resulting in the acquisition accuracy not meeting the required accuracy acquisition range, causing inaccurate acquisition results and failing to meet work requirements. In order to meet the accuracy requirements of high-frequency signal acquisition, related technologies have proposed a solution based on a field programmable gate array (FPGA) combined with a microprocessor (MCU) to achieve high-frequency signal acquisition. The specific process includes collecting the input frequency signal through the FPGA and transmitting the collected frequency value to the MCU, and then the MCU performs data processing on the frequency value. Although this method improves the frequency acquisition accuracy, the FPGA cost is relatively high, resulting in an increase in overall costs.
[0026] Therefore, how to collect high-frequency signals without being affected by the chip frequency of the microprocessor and keep the cost low while ensuring that the signal acquisition meets the accuracy range becomes a consideration.
[0027] Based on the above situation, the present disclosure provides an improved frequency signal acquisition system and method, which can not only realize the acquisition of high-frequency signals through a signal acquisition module and a control unit, but also obtain the actual frequency of the frequency signal through a trigger signal generated by the signal acquisition module, thereby avoiding the influence of the chip main frequency of the control unit, thereby significantly improving the acquisition accuracy of the frequency signal, and solving the above problems. The frequency signal acquisition system according to various embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. It should be understood that the actual frequency signal acquisition system may have other components, but in order to avoid blurring the focus of the present disclosure, the present disclosure does not discuss these other components and the accompanying drawings do not show them.
[0028] Figure 1 FIG. 2 shows a frequency signal acquisition system according to some embodiments of the present disclosure. Figure 1 As shown, the frequency signal acquisition system provided by the present disclosure includes: a signal acquisition module, configured to receive a frequency signal and a predetermined time signal at its input end respectively, and generate a trigger signal when the frequency signal meets a predetermined condition within a predetermined time; and a control unit, configured to communicate with the signal acquisition module, provide a predetermined time signal to the signal acquisition module, and receive a trigger signal from the signal acquisition module, so as to determine the frequency of the frequency signal through the trigger signal, wherein the predetermined condition includes a rising edge interrupt of the frequency signal and a falling edge interrupt of the frequency signal.
[0029] The control unit is also configured to simultaneously start the timer for the standard frequency signal and the timer for the frequency signal when the trigger signal corresponding to the rising edge interrupt is received for the first time; and simultaneously close the timer for the standard frequency signal and the timer for the frequency signal when the trigger signal corresponding to the falling edge interrupt is received. After the timer for the frequency signal is started, the trigger signal received within the predetermined time is counted. At the same time, the timer for the standard frequency signal directly calculates the number corresponding to the standard frequency within the predetermined time based on the frequency of the standard frequency signal.
[0030] The control unit is also configured to calculate the actual frequency of the frequency signal using a time-frequency formula based on the frequency of the standard frequency signal and according to the data recorded by the timer for the standard frequency signal and the data recorded by the timer for the frequency signal.
[0031] The frequency signal acquisition system may further include a signal separation module configured to receive the frequency signal and separate one or more frequency-divided signals having the same frequency as the frequency signal from the frequency signal.
[0032] Alternatively, if Figure 1As shown, the frequency signal acquisition system may also include a signal conditioning module, which is configured to reduce the amplitude of the frequency signal so that the waveform of the frequency signal during the step-up or step-down delay is smaller. The signal conditioning module reduces the amplitude of the frequency signal to protect the back-end circuit. Moreover, the input voltage range of the back-end logic device is usually limited and small. Reducing the amplitude of the frequency signal can ensure that the back-end logic device effectively receives and recognizes the conditioned frequency signal. The signal conditioning module can be a high-speed op amp, a high-speed comparator or a high-speed logic device, and its communication speed meets 5-10 times the frequency of the frequency signal, thereby ensuring that the frequency signal passes through without being filtered, and ensuring that the back-end logic device will not have recognition errors during the recognition process, thereby ensuring the accuracy of frequency acquisition.
[0033] Diagnosis of the frequency value obtained after the input frequency signal is collected is a function point that needs to be paid attention to. Because after confirming that the collected frequency value is correct after diagnosis, it can be used as a guarantee to increase the accuracy and reliability of the collected value. However, none of the above related methods can diagnose the collected frequency value.
[0034] Therefore, if Figure 2 As shown, the frequency signal acquisition system may further include a signal diagnosis module, which includes a channel selection unit configured to selectively receive the divided frequency signal from the signal separation module or the frequency diagnosis signal with a fixed frequency through the channel selection unit.
[0035] The signal diagnosis module is also configured to be communicatively connected with the control unit, and to receive at its input end a frequency division frequency signal from the signal separation module and a predetermined diagnostic time signal from the control unit; to generate a trigger signal when the frequency division frequency signal satisfies the aforementioned predetermined conditions within the predetermined diagnostic time; and to send the trigger signal to the control unit, thereby using the control unit to obtain an actual frequency division frequency corresponding to the frequency division frequency signal through the trigger signal.
[0036] The signal diagnosis module is also configured to receive a frequency diagnosis signal and a predetermined diagnosis time signal from the control unit at its input end respectively; generate a trigger signal when the frequency diagnosis signal meets the aforementioned predetermined conditions within the predetermined diagnosis time; and send the trigger signal to the control unit, so that the control unit obtains the actual diagnostic frequency corresponding to the frequency diagnosis signal through the trigger signal.
[0037] The control unit is also configured to respectively calculate the frequency difference between the actual frequency and the actual divided frequency and the diagnostic frequency difference between the frequency diagnostic signal and the actual diagnostic frequency; and determine that the actual frequency is correct when both the frequency difference and the diagnostic frequency difference are within a predetermined range.
[0038] Exemplarily, the predetermined range may be 2‰. As described above, if the frequency difference between the actual frequency and the actual frequency division frequency satisfies 2‰, and the diagnostic frequency difference also satisfies 2‰, the actual frequency value of the diagnostic frequency signal is correct. If the frequency difference between the actual frequency and the actual frequency division frequency is much greater than 2‰, and the diagnostic frequency difference is also much greater than 2‰, the diagnostic signal diagnostic module fails. If the frequency difference between the actual frequency and the actual frequency division frequency satisfies 2‰, and the diagnostic frequency difference does not satisfy 2‰, the diagnostic frequency diagnostic signal is wrong. If the frequency difference between the actual frequency and the actual frequency division frequency is much greater than 2‰, and the diagnostic frequency difference satisfies 2‰, the diagnostic signal acquisition module fails. At this point, the signal diagnostic module can provide a frequency signal acquisition function, thereby realizing a frequency signal acquisition redundancy function, and the control unit sends a signal that the signal acquisition module has failed.
[0039] Moreover, those skilled in the art know that neither the period measurement method, the frequency measurement method, nor the frequency signal acquisition method of FPGA+MCU can determine the direction of the two input signals (i.e., which input signal waveform reaches the rising edge interrupt first). Based on this situation, Figure 3 As shown, the frequency signal acquisition system provided by the present disclosure also includes a direction comparison module, which can receive multiple frequency signals with the same frequency and compare which frequency signal's rising edge reaches the interruption first among the two input frequency signals.
[0040] Specifically, Figure 3 As shown, the direction comparison module is configured to communicate with the control unit and receive a first frequency signal and a second frequency signal having the same frequency; generate a trigger signal having a high level or a low level when the first frequency signal and the second frequency signal satisfy a predetermined relationship; and send the trigger signal to the control unit, thereby determining the direction through the trigger signal.
[0041] The predetermined relationship includes the case where the first frequency signal reaches the rising edge interrupt first and the case where the second frequency signal reaches the rising edge interrupt first. Specifically, when the first frequency signal reaches the rising edge interrupt first, the direction comparison module generates a trigger signal with a high level; when the second frequency signal reaches the rising edge interrupt first, the direction comparison module generates a trigger signal with a low level. The direction comparison module can also be configured to be in communication connection with the signal separation module, receive the corresponding frequency division frequency signal separated by the signal separation module from different frequency signals with the same frequency, and use the corresponding frequency division frequency signal as the aforementioned first frequency signal and second frequency signal.
[0042] The control unit is also configured to receive a trigger signal from the direction comparison module and identify the level corresponding to the trigger signal; when it is identified that the triggered signal corresponds to a high level, the direction state value is updated to 1; and when it is identified that the triggered signal corresponds to a low level, the direction state value is updated to 0.
[0043] According to the frequency signal acquisition system described above, for simultaneous signal acquisition, diagnosis and direction determination of two frequency signals with the same frequency, the frequency signal acquisition system provided by the present disclosure can be as follows: Figure 4 As shown, it includes a signal conditioning module, a signal separation module, two signal acquisition modules, two signal diagnosis modules, a direction comparison module and a control unit. For simultaneous signal acquisition, diagnosis and direction judgment of multiple frequency signals with the same frequency, the number of signal acquisition modules, signal diagnosis modules and direction comparison modules can be changed accordingly. No further details are given here.
[0044] Compared with the prior art, the present invention supports high-precision high-frequency signal acquisition, direction judgment, frequency diagnosis and redundant design. The frequency signal acquisition system and method provided by the present invention not only acquire frequency signals with high accuracy and low cost, but also support waveform direction judgment of multiple co-frequency frequency signals and support frequency diagnosis function. The present invention solves the problem of completing the acquisition of high-frequency signals without being affected by the main frequency of the control unit chip, and the acquisition accuracy error is controlled within 2‰. In addition, it is also possible to realize the judgment of the direction of multiple co-frequency frequency signals and the diagnosis of input frequency signals, and has a wide range of application scenarios.
[0045] In order to realize high-frequency signal acquisition, frequency signal diagnosis and waveform direction judgment when multiple channels of the same frequency signal are input, software design and hardware circuit design support are required. In order to realize frequency signal acquisition, frequency value diagnosis and direction judgment, the present disclosure provides such Figure 4 The circuit design of the frequency signal acquisition system shown can be as follows Figure 5 As shown. Figure 5 As shown, the frequency signal acquisition system provided by the present disclosure is composed of two dual D flip-flops, a single D flip-flop, a fixed crystal oscillator, a single-pole double-throw switch, a signal separation circuit (not shown) and an MCU. Among them, the dual D flip-flops are used for frequency signal acquisition and diagnosis, and the single D flip-flop is used to determine the direction.
[0046] The connection method of the above devices is as follows: the CLK1 pin of the dual D flip-flop is used as the input pin of the frequency signal (i.e., the frequency signal to be collected) Fa and Fb. The D1 pin of the dual D flip-flop is connected to the GPIO pin of the MCU to receive the predetermined time signal from the MCU (i.e., the time input of the preset gate). The Q1 pin corresponding to the dual D flip-flop is also connected to the GPIO pin of the MCU (the GPIO pin corresponding to the MCU timer) to send the generated trigger signal to the MCU. After receiving the trigger signal, the MCU will calculate the actual frequency value corresponding to the frequency signal Fa and Fb. Figure 4 As shown, the connected lines ①②③ and lines ④⑤⑥ form a signal acquisition module for acquiring frequency signals Fa and Fb with equal precision.
[0047] Further, the CLK2 pin of the dual D flip-flop is connected to a single-pole double-throw switch, and the single-pole double-throw switch is selectively connected to a separation circuit or a crystal oscillator unit to receive the same-frequency frequency division signal (Fa1 and Fb1) separated by the separation circuit or the frequency diagnosis signal Fa crystal generated by the crystal oscillator unit. The D2 pin of the dual D flip-flop is respectively connected to the GPIO pin of the MCU to receive the predetermined diagnosis time signal (i.e., the preset gate time input) from the MCU, and the Q2 pin corresponding to the dual D flip-flop is also respectively connected to the GPIO pin of the MCU (the GPIO pin corresponding to the MCU timer) to send a trigger signal to the MCU. At this time, the lines ⑦⑧⑨⑩⑪ form a signal diagnosis module for the frequency signal Fa, and the lines ⑫⑬⑭⑮⑯ form a signal diagnosis module for the frequency signal Fb. Among them, Fa1 and Fb1 are the same-frequency frequency division signals separated by the frequency signals Fa and Fb through the signal separation module, and Fa crystal is the frequency diagnosis signal output by the fixed crystal oscillator.
[0048] After receiving the trigger signal, the MCU will calculate the actual frequency division ratio corresponding to the frequency division ratio signals Fa1 and Fb1, and the actual diagnosis frequency corresponding to the frequency diagnosis signal Fa. Taking the frequency signal Fa as an example, the MCU can also save and compare the actual frequency and the actual frequency division ratio, as well as the theoretical diagnosis and the actual diagnosis frequency, and obtain the following situations.
[0049] Compare the actual frequency values of the frequency signal Fa and the frequency division signal Fa1. If the difference satisfies 2‰, and the difference between the calculated actual diagnostic frequency value and the input crystal oscillator value satisfies 2‰, then the frequency value result of the diagnostic frequency signal Fa is correct.
[0050] Compare the actual frequency values of the frequency signal Fa and the frequency division signal Fa1. If the difference is much greater than 2‰, and the difference between the calculated actual diagnostic frequency value and the input crystal value satisfies 2‰, the diagnostic acquisition circuit is faulty and exceeds the normal value range. At this time, the diagnostic circuit can provide the acquisition function, which also realizes the frequency acquisition redundancy function and reminds the acquisition circuit of the fault signal.
[0051] Compare the actual frequency values of the frequency signal Fa and the divided frequency signal Fa1. If the difference satisfies 2‰, and the difference between the calculated actual diagnostic frequency value and the input crystal oscillator value is much greater than 2‰, the actual frequency value of the diagnostic frequency signal is correct, but the crystal oscillator signal is faulty.
[0052] Compare the collected frequency values of the frequency signal Fa and the frequency division signal Fa1. If the difference is much greater than 2‰, and the difference between the calculated actual diagnosis frequency value and the input crystal value is much greater than 2‰, then the diagnosis circuit is faulty. The diagnosis process for the frequency signal Fb is similar to the diagnosis of the frequency signal Fa.
[0053] At the same time, the CLK pin of the single D flip-flop is connected to the Fa channel, the D pin is connected to the Fb channel to receive two frequency signals of the same frequency, and the Q pin of the single D flip-flop is connected to the GPIO port of the MCU. At this time, ⑰⑱⑲ forms a direction comparison module, Fa2 can be the frequency signal Fa separated by the separation circuit, and Fb2 can be the frequency signal Fb separated by the separation circuit. If the waveform of the frequency signal Fa input to the CLK pin of the D flip-flop is ahead of the waveform of the frequency signal Fb input to the D pin, the output value of the Q output pin remains in a high level state. If the waveform of the frequency signal Fa input to the CLK pin of the D flip-flop lags behind the waveform of the frequency signal Fb input to the D pin, the output value of the Q output pin remains in a low level state. The forward and reverse rotation of the motor can be detected according to the direction judgment, and the motor can be controlled to perform corresponding operations according to the running state of the motor.
[0054] Compared with the frequency signal acquisition method of the period measurement method and the frequency measurement method, the present invention can acquire high-precision signals without being limited by the influence of the chip main frequency of the control unit. By combining hardware external circuits and software algorithms, the frequency acquisition of high-frequency signals (such as frequency signals above 10M) can be achieved, and the acquisition accuracy error does not exceed 2‰. It can also realize the waveform direction judgment of multi-channel frequency signals and the functional diagnosis of the frequency of the input frequency signal, thereby increasing the reliability of the acquired frequency value.
[0055] Compared with the frequency signal acquisition method of FPGA+MCU, the present disclosure does not require the support of FPGA when acquiring signals, and can also realize high-frequency signal frequency acquisition, with an acquisition accuracy error of no more than 2‰, and can realize the judgment of the waveform direction of multi-channel frequency signals, and can also perform frequency value diagnosis on the input frequency signal, thereby increasing the reliability of the acquired frequency value. Moreover, compared with the combination of FPGA+MCU, the present disclosure significantly reduces the use cost.
[0056] The frequency signal acquisition system according to the present disclosure realizes high-frequency signal acquisition, direction judgment, and frequency signal diagnosis by combining hardware circuits and software. The MCU and D trigger design realizes high-precision, high-frequency frequency signal acquisition, waveform direction judgment of two frequency signals of the same frequency, and diagnosis of the acquired frequency signals. It should be understood that the frequency signal acquisition system provided by the present disclosure can be appropriately expanded. For example, the present disclosure uses multiple triggers to realize the acquisition, diagnosis, and direction judgment of four-way, six-way, and other multi-way frequency signals. At the same time, the dual trigger in the present disclosure can also be replaced by two single triggers.
[0057] The present disclosure also provides a method for using the aforementioned frequency signal acquisition system, including connecting the frequency signal acquisition system to at least one frequency signal source; acquiring the frequency signal through a signal acquisition module and generating a corresponding trigger signal; and receiving the trigger signal through a control unit, and determining the actual frequency corresponding to the frequency signal through the trigger signal.
[0058] In the process of collecting frequency signals, the signal acquisition module receives the predetermined time input by the control unit, waits for the rising edge interrupt of the frequency signal input (i.e., the D flip-flop is connected to the Q pin input interrupt) to generate a trigger signal, and starts the control unit's timer for the standard frequency signal and the timer for the frequency signal. Subsequently, within the predetermined time, the signal acquisition signal waits for the falling edge interrupt of the frequency signal input (i.e., the D flip-flop is connected to the Q pin input interrupt) to generate a trigger signal, so that the control unit turns off the aforementioned timer for the standard frequency signal and the timer for the frequency signal, and records the calculated value of the standard frequency signal and the count value of the frequency signal through the timer. Finally, after the predetermined time has passed, the actual frequency value of the frequency signal is calculated and saved according to the time-frequency formula.
[0059] In the process of diagnosing the frequency signal, a predetermined diagnostic time signal is input to the signal acquisition module and the signal diagnosis module at the same time through the control unit, the signal acquisition module receives the frequency signal input, and the signal diagnosis module receives the frequency division frequency signal input through the channel selection unit (for example, switching the single-pole double-throw switch to a signal separation module that can separate the signal with the same frequency from the frequency signal). Then, the signal acquisition module and the signal diagnosis module wait for the rising edge interrupt of the frequency signal and the frequency division frequency signal respectively (that is, the dual D flip-flop is connected to the Q1 and Q2 pin input interrupt) to generate corresponding trigger signals, thereby starting the timer for the standard frequency signal, the timer for the frequency signal, and the timer for the frequency division frequency signal.
[0060] Subsequently, the signal acquisition module and the signal diagnosis module wait for the falling edge interrupt of the frequency signal and the frequency division signal respectively (i.e., the dual D flip-flop is connected to the Q1 and Q2 pin input interrupt) to generate the corresponding trigger signal, thereby turning off the timer for the standard frequency signal, the timer for the frequency signal, and the timer for the frequency division signal, and recording the calculated value of the standard frequency signal and the count value of the frequency signal and the frequency division signal. In addition, the actual frequency value of the frequency signal and the frequency division signal is calculated and saved according to the time-frequency formula.
[0061] Next, a predetermined diagnostic time signal is input to the signal acquisition module and the signal diagnosis module simultaneously through the control unit, the signal acquisition module receives the frequency signal input, and the signal diagnosis module receives the frequency diagnosis signal input through the channel selection unit (for example, switching the single-pole double-throw switch to a diagnostic signal source that can generate a frequency diagnosis signal with a fixed frequency). Subsequently, the signal acquisition module and the signal diagnosis module wait for the rising edge interrupt of the frequency signal and the frequency diagnosis signal (that is, the dual D flip-flop is connected to the Q1 and Q2 pin input interrupt) to generate corresponding trigger signals, thereby starting the timer for the standard frequency signal, the timer for the frequency signal, and the timer for the frequency diagnosis signal in the control unit.
[0062] Then, the signal acquisition module and the signal diagnosis module wait for the falling edge interrupt of the frequency signal and the frequency diagnosis signal respectively (i.e., the dual D flip-flop is connected to the Q1 and Q2 pin input interrupt) to generate the corresponding trigger signal, thereby turning off the timer for the standard frequency signal, the timer for the frequency signal, and the timer for the frequency diagnosis signal, and recording the calculated value of the standard frequency signal and the count value of the frequency signal and the frequency diagnosis signal. In addition, the actual frequency value of the frequency diagnosis signal is calculated and saved according to the time-frequency formula.
[0063] The control unit compares the actual frequency value difference between the frequency signal and the frequency division signal, and the diagnostic difference between the actual frequency value of the frequency diagnosis signal and the theoretical frequency value based on the calculated actual frequency value of the frequency signal, the actual frequency value of the frequency division signal, and the actual frequency value of the frequency diagnosis signal. If the actual frequency value difference satisfies 2‰, and the diagnostic difference also satisfies 2‰, the actual frequency value of the diagnosis frequency signal is correct. If the actual frequency value difference is much greater than 2‰, and the diagnostic difference is also much greater than 2‰, the diagnosis signal diagnosis module fails. If the actual frequency value difference satisfies 2‰, and the diagnostic difference does not satisfy 2‰, the diagnosis frequency diagnosis signal is wrong. If the actual frequency value difference is much greater than 2‰, and the diagnostic difference satisfies 2‰, the diagnosis signal acquisition module fails. At this time, the signal diagnosis module can provide the frequency signal acquisition function, thereby realizing the frequency signal acquisition redundancy function, and the control unit sends a signal that the signal acquisition module has failed.
[0064] Through the above method, the frequency signal acquisition system provided by the present disclosure can realize the acquisition and diagnosis of frequency signals. In addition, when a signal acquisition module fails, a redundant design is provided, and the signal diagnosis module is used as a signal acquisition module.
[0065] In the process of direction determination, the direction comparison module receives the first frequency signal and the second frequency signal input with the same frequency, and the control unit detects the level change of the output signal of the direction comparison module. When the control unit detects that the signal output by the direction comparison module is at a high level, it determines that the waveform of the first frequency signal leads the waveform of the second frequency signal, and updates the direction state value to 1 (corresponding to, for example, forward rotation of the motor). When the control unit detects that the signal output by the direction comparison module is at a low level, it determines that the waveform of the first frequency signal lags behind the waveform of the second frequency signal, and updates the direction state value to 0 (corresponding to, for example, reverse rotation of the motor).
[0066] Through the above method, this solution can realize high-precision frequency signal acquisition, waveform direction judgment of multiple frequency signals and non-intrusive diagnosis. Moreover, this solution can realize the function of redundant frequency signal acquisition, that is, when the acquisition circuit fails, the frequency value collected by the diagnosis circuit can also be used.
[0067] The present disclosure also provides a computing device for frequency signal acquisition, which includes one or more processors and a memory storing computer executable instructions. When the computer executable instructions are executed by the one or more processors, the one or more processors execute the method according to any of the aforementioned embodiments of the present disclosure.
[0068] The present disclosure also provides a non-transitory storage medium having computer executable instructions stored thereon, which, when executed by a computer, enables the computer to execute the method according to any of the aforementioned embodiments of the present disclosure.
[0069] Those skilled in the art should understand that the present disclosure is not limited to the above-mentioned embodiments, and the present disclosure can be implemented in many other forms without departing from its subject matter and scope. Therefore, the examples and embodiments shown are considered to be illustrative rather than restrictive, and the present disclosure can cover various modifications and substitutions without departing from the spirit and scope of the present disclosure as defined in the appended claims.
Claims
1. A frequency signal acquisition system, characterized in that: include: A signal acquisition module, configured to receive a frequency signal and a predetermined time signal at an input end of the signal acquisition module, respectively, and generate a trigger signal when the received frequency signal meets a predetermined condition within a predetermined time; as well as A control unit is configured to be communicatively connected with the signal acquisition module to provide the predetermined time signal to the signal acquisition module and receive a trigger signal from the signal acquisition module, thereby determining the frequency of the received frequency signal through the trigger signal, wherein the predetermined condition includes a rising edge interrupt of the received frequency signal and a falling edge interrupt of the received frequency signal.
2. The frequency signal acquisition system according to claim 1, characterized in that: The control unit is also configured to: When a trigger signal corresponding to the rising edge interrupt is received for the first time, starting a timer for the standard frequency signal and a timer for the received frequency signal; and When a trigger signal corresponding to the falling edge interrupt is received, the timer for the standard frequency signal and the timer for the received frequency signal are turned off.
3. The frequency signal acquisition system according to claim 2, characterized in that: The control unit is also configured to: Based on the frequency of the standard frequency signal, the actual frequency of the received frequency signal is calculated using a time-frequency formula according to the data recorded by the timer for the standard frequency signal and the data recorded by the timer for the received frequency signal.
4. The frequency signal acquisition system according to claim 1, characterized in that: The frequency signal acquisition system also includes: a signal conditioning module configured to receive the frequency signal and separate one or more frequency-divided signals having the same frequency as the received frequency signal from the received frequency signal; and The signal diagnosis module is configured to include a channel selection unit and selectively receive the frequency-divided frequency signal or the frequency diagnosis signal with a fixed frequency from the signal conditioning module through the channel selection unit.
5. The frequency signal acquisition system according to claim 4, characterized in that: The signal diagnosis module is also configured to: being communicatively connected with the control unit to receive the frequency division signal from the signal conditioning module and the predetermined diagnosis time signal from the control unit at the input end of the signal diagnosis module respectively; generating a trigger signal when the frequency division signal satisfies the predetermined condition within the predetermined diagnosis time of the predetermined diagnosis time signal; as well as The trigger signal is sent to the control unit to obtain an actual division frequency corresponding to the division frequency signal through the trigger signal.
6. The frequency signal acquisition system according to claim 5, characterized in that: The signal diagnosis module is also configured to: receiving a frequency diagnosis signal and the predetermined diagnosis time signal from the control unit at an input end of the signal diagnosis module; generating a trigger signal when the frequency diagnosis signal satisfies the predetermined condition within the predetermined diagnosis time of the predetermined diagnosis time signal; as well as The trigger signal is sent to the control unit to obtain an actual diagnostic frequency corresponding to the frequency diagnostic signal through the trigger signal.
7. The frequency signal acquisition system according to claim 6, characterized in that: The control unit is also configured to: Calculating a frequency difference between an actual frequency of the received frequency signal and an actual frequency division frequency corresponding to the frequency division frequency signal; calculating a diagnostic frequency difference between a fixed frequency of the frequency diagnostic signal and an actual diagnostic frequency corresponding to the frequency diagnostic signal; as well as Based on the frequency difference value and the diagnostic frequency difference value, it is determined whether the actual frequency of the received frequency signal is correct.
8. The frequency signal acquisition system according to claim 4, characterized in that: The frequency signal acquisition system also includes: a direction comparison module configured to be communicatively connected with the control unit to receive a first frequency signal and a second frequency signal having the same frequency; generating a trigger signal having a high level or a low level when the first frequency signal and the second frequency signal satisfy a predetermined relationship; and The trigger signal is sent to the control unit, so that the direction is determined by the trigger signal.
9. The frequency signal acquisition system according to claim 8, characterized in that: The control unit is also configured to: receiving the trigger signal from the direction comparison module, and identifying a level corresponding to the trigger signal; When it is identified that the triggered signal corresponds to a high level, the direction state value is updated to 1; as well as When it is identified that the triggered signal corresponds to a low level, the direction state value is updated to 0.
10. A method for using the frequency signal acquisition system according to any one of claims 1 to 9, characterized in that: The method comprises: Connecting the frequency signal acquisition system to at least one frequency signal source; Collecting the frequency signal through the signal acquisition module and generating a corresponding trigger signal; and The trigger signal is received by a control unit included in the frequency signal acquisition system, so as to determine the actual frequency corresponding to the received frequency signal through the trigger signal.
11. A computing device for frequency signal acquisition, characterized in that: The computing device comprises: one or more processors; and A memory storing computer executable instructions which, when executed by the one or more processors, cause the one or more processors to perform the method according to claim 10.
12. A non-transitory storage medium having computer executable instructions stored thereon, characterized in that: The computer executable instructions, when executed by a computer, cause the computer to perform the method according to claim 10 .
Citation Information
Patent Citations
Frequency measurement method and apparatus
CN101221200A
Delay-locked loop circuit
CN101697488A
Method and device for detecting rotation state of rotation part
CN102830247A
Communication circuit used for tracking rotation speed of motor
CN104539214A
Digital oscilloscope and signal frequency measurement method
CN106918731A
Cited By
Power and spectrum characteristic measurement method based on pulse modulation signal
CN122017367A
