CN111879981B - Method and device for compensating overload of single-tone signal - Google Patents

Method and device for compensating overload of single-tone signal Download PDF

Info

Publication number
CN111879981B
CN111879981B CN202010751179.XA CN202010751179A CN111879981B CN 111879981 B CN111879981 B CN 111879981B CN 202010751179 A CN202010751179 A CN 202010751179A CN 111879981 B CN111879981 B CN 111879981B
Authority
CN
China
Prior art keywords
value
overload
points
direct current
calculating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010751179.XA
Other languages
Chinese (zh)
Other versions
CN111879981A (en
Inventor
朱燕
石崇源
宣和均
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Yongchuan Technology Co ltd
Original Assignee
Hangzhou Yongchuan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Yongchuan Technology Co ltd filed Critical Hangzhou Yongchuan Technology Co ltd
Priority to CN202010751179.XA priority Critical patent/CN111879981B/en
Publication of CN111879981A publication Critical patent/CN111879981A/en
Application granted granted Critical
Publication of CN111879981B publication Critical patent/CN111879981B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R1/00Details of instruments or arrangements of the types included in groups G01R5/00 - G01R13/00 and G01R31/00
    • G01R1/28Provision in measuring instruments for reference values, e.g. standard voltage, standard waveform
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measurement Of Current Or Voltage (AREA)

Abstract

The invention discloses a compensation method and a device for single tone signal overload, wherein the method comprises the following steps: obtaining a periodic sampling signal, wherein the periodic sampling signal comprises sampling points in a preset period and data values corresponding to the sampling points; judging whether the sampling point is an overload point or a normal point based on the data value and a preset overload value to obtain a first judgment result; calculating to obtain a first peak value and a direct current component based on the first judgment result and a preset overload value; calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point; and generating a corresponding compensation signal based on the first peak value, the direct current component and the initial phase to obtain a first compensation signal. On the premise of ensuring the measurement accuracy, the obtained periodic sampling signal has overload in a certain range, and the method provided by the invention can realize the recovery of overload data in the periodic sampling signal.

Description

Method and device for compensating overload of single-tone signal
Technical Field
The present invention relates to the field of signal processing, and in particular, to a method and an apparatus for compensating for single-tone signal overload.
Background
In the existing electrical impedance imaging technology, signal measurement is generally realized by adopting a single frequency, and the acquired signal data is a single tone signal. In addition, the analog-to-digital converter generally performs signal transmission in an analog-to-digital conversion manner, but the analog-to-digital converter has limitations on speed and data bits, so in the prior art, in order to prevent transmission signals from being overloaded (signals exceeding a certain voltage are the maximum value of digital conversion), an analog amplifier is often adopted to amplify the collected single-tone signals to a power supply voltage.
If the analog-to-digital converter converts the single tone signal to the range of 0 to the power supply voltage, the single tone signal can be prevented from being overloaded, but the measurement accuracy is lost.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method and a device for compensating single-tone signal overload.
In order to solve the technical problem, the invention is solved by the following technical scheme:
the invention provides a compensation method for single tone signal overload, which comprises the following steps:
obtaining a periodic sampling signal, wherein the periodic sampling signal comprises sampling points in a preset period and data values corresponding to the sampling points;
judging whether the sampling point is an overload point or a normal point based on the data value and a preset overload value to obtain a first judgment result;
calculating to obtain a first peak value and a direct current component based on the first judgment result and a preset overload value;
calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point;
and generating a corresponding compensation signal based on the first peak value, the direct current component and the initial phase to obtain a first compensation signal.
As an implementation manner, after generating a corresponding compensation signal based on the first peak, the dc component, and the initial phase, the method further includes a step of correcting the compensation signal, and specifically includes the steps of:
and extracting the phase and the data value of a normal point according to a preset correction rule, calculating a second peak value by combining the initial phase, and generating a second compensation signal based on the second peak value, the direct current component and the initial phase.
As one possible implementation:
based on the first judgment result and the data value
Before the first peak value is calculated, whether the direct current offset exists is judged based on the data value, and the specific judgment steps are as follows:
the overload values comprise positive overload values and negative overload values, wherein the absolute values of the positive overload values and the negative overload values are equal;
counting the number of data values reaching a preset positive overload value to obtain positive overload points, and counting the number of data values reaching a preset negative overload value to obtain negative overload points;
when the number of the positive overload points is equal to that of the negative overload points, judging that no direct current component exists, recording the direct current component as 0, and otherwise, judging that direct current offset exists.
As an implementable embodiment:
when it is determined that the DC offset exists:
calculating a first sine value based on the number of the positive overload points and the number of the sampling points, and calculating a second sine value based on the number of the negative overload points and the number of the sampling points;
calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value;
calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point;
and generating a corresponding compensation signal based on the first peak value, the initial phase and the direct current component to obtain a first compensation signal.
As an implementable embodiment:
calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value according to the following calculation formula:
D+A sin(θ 1 )=d 1
D+A sin(θ 2 )=d 2
wherein A is the peak value, D is the DC component, D 1 Is a positive overload value, sin (θ) 1 ) Is the first sine value, d 2 Is a negative overload value, sin (θ) 2 ) Is the second sine value;
sin(θ 1 ) The calculation formula of (2) is as follows:
Figure GDA0003742060050000021
where m is the number of sampling points, m 1 Counting the number of positive overload points;
sin(θ 2 ) The calculation formula of (2) is as follows:
Figure GDA0003742060050000022
wherein m is 2 Negative overload points.
As an implementable embodiment:
when no DC bias is determined:
counting the number of overload points based on the first judgment result, and calculating a third sine value based on the number of the overload points and the number of sampling points;
and calculating to obtain the peak value of the compensation signal based on the preset positive overload value and the third sine value.
As an implementation manner, the calculation formula for obtaining the peak value of the compensation signal based on the preset overload value and the first sine value is as follows:
Figure GDA0003742060050000031
wherein A is the peak value, d 1 Is a positive overload value, sin (θ) 3 ) Is the third sine value;
sin(θ 3 ) The calculation formula of (2) is as follows:
Figure GDA0003742060050000032
wherein m is the number of sampling points and n is the number of overload points.
The invention also provides a compensation device for single tone signal overload, comprising:
the signal acquisition module is used for acquiring a periodic sampling signal, wherein the periodic sampling signal comprises sampling points in a preset period and data values corresponding to the sampling points;
the overload judging module is used for judging that the sampling point is an overload point or a normal point based on the data value and a preset overload value to obtain a first judging result;
the first calculation module is used for calculating and obtaining a first peak value and a direct current component based on the first judgment result and a preset overload value;
the second calculation module is used for calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point;
and the compensation signal generation module is used for generating a corresponding compensation signal based on the first peak value, the direct current component and the initial phase to obtain a first compensation signal.
As an implementable aspect, further comprising a revision module configured to:
and extracting the phase and the data value of a normal point according to a preset correction rule, calculating a second peak value by combining the initial phase, and generating a second compensation signal based on the second peak value, the direct current component and the initial phase.
As one possible implementation, the overload determination module includes a dc offset determination unit and a summation unit, and the dc offset determination unit is configured to:
the overload values comprise positive overload values and negative overload values, wherein the absolute values of the positive overload values and the negative overload values are equal;
counting the number of data values reaching a preset positive overload value to obtain positive overload points, and counting the number of data values reaching a preset negative overload value to obtain negative overload points;
when the number of the positive overload points is equal to that of the negative overload points, judging that no direct current component exists, recording the direct current component as 0, and otherwise, judging that direct current offset exists.
The summation unit is used for calculating the total number of the positive overload points and the load overload points to obtain the number of the overload points.
Due to the adoption of the technical scheme, the invention has the remarkable technical effects that:
1. on the premise of ensuring the measurement accuracy, the obtained periodic sampling signal has overload in a certain range, and according to the data values of an overload point and a normal point, the corresponding first peak value and the initial phase are calculated and obtained, so that the corresponding first compensation signal is generated, and the recovery of overload data is realized.
2. Because the voltage corresponding to the sampling point which reaches the overload value for the first time in the actual measurement may already exceed the reference voltage of the analog-to-digital conversion, the peak value which is finally calculated is smaller, the invention utilizes the data value and the phase position of the normal point to calculate the peak value again through the design of the correction step, and obtains the second peak value, and the second peak value is closer to the actual peak value compared with the first peak value at the moment, thereby improving the accuracy of the compensation signal after recovery.
3. The design of the DC offset judgment step can automatically judge whether the DC offset exists before the peak value is calculated, and directly records the DC component as 0 when no DC offset exists, thereby simplifying the calculation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a method for compensating overload of single tone signals according to the present invention;
FIG. 2 is a schematic diagram of overload compensation with DC offset and initial phase;
FIG. 3 is a schematic diagram of overload compensation without DC offset and initial phase;
fig. 4 is a schematic block diagram of a compensation apparatus for single tone signal overload according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to examples, which are illustrative of the present invention and are not to be construed as being limited thereto.
Embodiment 1, a method for compensating for overload of a single tone signal, as shown in fig. 1, includes the following steps:
s100, obtaining a periodic sampling signal, wherein the periodic sampling signal comprises sampling points in a preset period and data values corresponding to the sampling points;
the periodic sampling signal is a digital signal obtained by performing analog-to-digital conversion on a monophonic signal, that is, signal measurement is performed first to obtain the monophonic signal at a specified frequency within a set period, and then the monophonic signal is subjected to analog-to-digital conversion on the monophonic signal to obtain the periodic sampling signal.
S200, judging that the sampling point is an overload point or a normal point based on the data value and a preset overload value to obtain a first judgment result;
the point at which the absolute value of the data value reaches the preset overload value (positive overload value) is an overload point, otherwise, it is a normal point.
S300, calculating to obtain a first peak value and a direct current component based on the first judgment result and a preset overload value;
s400, calculating and obtaining an initial phase based on the first peak value, the direct current component, and the phase and data value of any normal point;
s500, generating a corresponding compensation signal based on the first peak value, the direct current component and the initial phase, and obtaining a first compensation signal.
If the dynamic range of signal measurement is 0-3V, namely, the power supply voltage is 3V, the number of bits of the adopted analog-to-digital converter is 8, and the maximum data volume is 256;
when the reference voltage of the analog-digital converter is set to be 3V (namely the conversion range is 0-3V), the measurement accuracy is 11.72mV of 3V/256, and the digital signal obtained by conversion is not overloaded;
when the reference voltage of the analog-to-digital converter is set to be 1.25V (namely the conversion range is 0-1.25V), the measurement precision is 1.25V/256 mV (4.88 mV), the measurement precision is improved, but the data values obtained by the conversion when the voltage exceeds 1.25V are all 256, namely, overload occurs;
the converted digital signal is often analyzed, calculated, processed and the like according to actual needs, and after the digital signal is overloaded, a processing result obtained based on the digital signal has larger deviation, so that a person skilled in the art often abandons the improvement of the measurement precision and directly converts the single signal into a range from 0 to the power supply voltage.
Since the single-tone signal is a sinusoidal signal, the digital signal that is not overloaded after conversion is also a sinusoidal signal, and in this embodiment, the corresponding first peak value and the initial phase are obtained by calculation according to the data values of the overload point and the normal point, so as to generate the corresponding first compensation signal, for example, the measurement of the single-tone signal with the dynamic range of 0 to 3V can be realized under the condition that the measurement accuracy is 4.88 mV.
Further, before the step S300 calculates and obtains the first peak value and the dc component based on the first determination result and the preset overload value, it is determined whether the dc offset exists based on the data value, and the specific determination step is:
the overload values comprise positive overload values and negative overload values, wherein the absolute values of the positive overload values and the negative overload values are equal;
counting the number of data values reaching a preset positive overload value to obtain positive overload points, and counting the number of data values reaching a preset negative overload value to obtain negative overload points;
when the number of the positive overload points is equal to that of the negative overload points, judging that no direct current offset exists, recording the direct current component as 0, and otherwise, judging that the direct current offset exists.
The positive overload value and the negative overload value are determined by the number of bits of the analog-to-digital converter for converting the single-tone signal, and in this embodiment, an analog-to-digital converter with 8 bits is used, and the positive overload value is 256 and the negative overload value is-256.
Further:
when the direct current offset is judged to exist, the specific steps of generating the first compensation signal are as follows:
calculating a first sine value based on the number of the positive overload points and the number of the sampling points, and calculating a second sine value based on the number of the negative overload points and the number of the sampling points; calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value;
calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point;
and generating a corresponding compensation signal based on the first peak value, the initial phase and the direct current component to obtain a first compensation signal.
Because the first compensation signal is a sinusoidal signal of each period, the sine value corresponding to the peak value of the first compensation signal is 1, based on the characteristics of the sinusoidal signal, the embodiment reconstructs each sampling point in the periodic sampling signal to obtain a reconstructed signal without an initial phase, and then calculates a corresponding peak value a and a corresponding direct current component D according to the distribution conditions of the positive overload point and the negative overload point.
After the peak value A and the direct current component D are known, the phase and the data value of any normal point are extracted, and the initial phase of the periodic sampling signal can be calculated based on a sine function;
that is, y ═ a sin (x + β) + D;
wherein x is the phase, beta is the initial phase, the known peak value A and the known direct current component D are substituted into the phase and the data value of a certain normal point to calculate and obtain the initial phase beta.
Knowing the peak value a and the dc component D and the initial phase, a corresponding sinusoidal signal is generated as the first compensation signal.
That is, a corresponding compensation signal is generated based on y ═ a sin (x + β) + D.
Further:
calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value according to the following calculation formula:
D+A sin(θ 1 )=d 1
D+A sin(θ 2 )=d 2
wherein A is the peak value, D is the DC component, D 1 Is a positive overload value, sin (θ) 1 ) Is the first sine value, d 2 Is a negative overload value, sin (θ) 2 ) Is the second sine value;
in this embodiment, two sine functions are respectively constructed for the positive overload value and the first sine value, and for the negative overload value and the second sine value, so as to eliminate the influence of the dc component and simultaneously calculate the peak value a and the dc component D.
Sin (theta) above 1 ) The calculation formula of (2) is as follows:
Figure GDA0003742060050000071
wherein m is the number of sampling points, m 1 The positive overload point number is multiplied;
sin(θ 2 ) The calculation formula of (2) is as follows:
Figure GDA0003742060050000072
wherein m is 2 Negative overload points.
Referring to fig. 2, fig. 2 is an overload signal (i.e., a periodically sampled signal) obtained by converting a tone signal through an 8-bit analog-to-digital converter, overload compensation (i.e., a first compensation signal) obtained through the above compensation method, and an original signal (for evaluating compensation effects) corresponding to the tone signal.
As can be seen from FIG. 2, the DC component of the original signal is 20, and the initial phase is π/6; the overload compensation has a small deviation from the original signal, so that the compensation method provided by the embodiment can realize the compensation of the overload signal, so as to output the compensation signal of the corresponding overload signal after reducing the analog-to-digital conversion range to improve the measurement precision, and facilitate the follow-up technicians to complete the data processing, analysis and other work by using the compensation signal.
Further:
when no DC offset is determined, the specific steps of generating the first compensation signal are as follows:
counting the number of the overload points based on the first judgment result, and calculating a third sine value based on the number of the overload points and the number of the sampling points;
and calculating to obtain a peak value of the compensation signal based on a preset positive overload value and a third sine value, wherein the calculation formula is as follows:
Figure GDA0003742060050000073
wherein A is the peak value, d 1 Is a positive overload value, sin (θ) 3 ) Is the third sine value; because no direct current bias exists, the peak value can be calculated only by constructing a sine function.
sin(θ 3 ) The calculation formula of (2) is as follows:
Figure GDA0003742060050000074
wherein m is the number of sampling points and n is the number of overload points.
Because there is no DC offset, only one sine function needs to be constructed.
For example:
the adc is 8 bits, so that the positive overload value is 256, 64 sampling points (m is 64) are obtained by one period measurement, the periodic sampling signal is shown as the overload signal in fig. 3, where the absolute value of the data values of 30 sampling points is greater than 256(n is 30), m and n are substituted into the above calculation formula, and the result is as follows:
Figure GDA0003742060050000081
A=345.4791
after obtaining the peak value, a person skilled in the art may select any normal point, where the normal point is the a-th sampling point, and the phase of the normal point is 2 pi/64 x a, and based on the sinusoidal characteristic, the initial phase may be obtained by calculation according to the phase and the data value of the normal point, referring to fig. 3, where in this case, the initial phase is 0;
the first compensation signal generated based on the initial phase and the peak value is shown as overload compensation in fig. 3.
In summary, the compensation method for single tone signal overload provided by this embodiment can compensate the overload signal after the analog-to-digital conversion of the single tone signal, and recover the corresponding digital signal; in practical use, a person skilled in the art can reduce the reference voltage of the analog-to-digital converter according to the requirement of actual measurement accuracy to improve the measurement accuracy, and then compensate the periodic sampling signal by using the method, so as to obtain the digital signal corresponding to the single-tone signal on the premise of improving the measurement accuracy.
Embodiment 2, a correction step (S600) of adding a compensation signal in embodiment 1 for correcting the first compensation signal, the rest being the same as embodiment 1;
s600, correcting the compensation signal, specifically:
and extracting the phase and the data value of a normal point according to a preset correction rule, calculating a second peak value by combining the initial phase, and generating a second compensation signal based on the second peak value, the direct current component and the initial phase.
The first peak value is obtained by calculating a sine value based on a phase in which overload occurs for the first time in the reconstructed signal, and then calculating a peak value based on the overload value and the sine value, but in an actual sampling process, a sampling rate will affect the angular resolution, and a voltage corresponding to a sampling point which reaches the overload value for the first time in actual measurement may exceed a reference voltage of analog-to-digital conversion, so that the sampling point corresponding to the phase is overloaded, and a finally calculated peak value is smaller.
The second peak is obtained by recalculating the peak using the data value and phase at any normal point, and is closer to the actual peak than the first peak.
However, repeated calculation is not avoided, so a person skilled in the art can set a correction rule by himself or herself according to actual needs, so that the extracted normal point is different from the normal point selected in step S400.
In step S400, after the normal point with the largest data value is eliminated, the phase and the data value of one point are randomly selected from the remaining normal points to calculate an initial phase; then, in step S600, a peak value is recalculated using the normal point with the largest data value, the phase corresponding to the normal point and the initial phase calculated previously, and a second peak value is obtained.
That is, the initial phase β and the dc component D are known in step S600, the phase of the normal point is substituted into x, the data value is substituted into y, and the second peak value a 'is calculated based on y ═ a' sin (x + β) + D.
A second compensation signal is generated based on the second peak, the initial phase, and the DC component.
The phase and the data value of the normal point are accurate, and the second peak value is closer to the actual peak value under the unified test condition, so the accuracy of the compensation signal can be further improved through the compensation step.
Embodiment 3, a compensation apparatus for single tone signal overload, as shown in fig. 4, comprises:
the signal acquisition module 100 is configured to acquire a periodic sampling signal, where the periodic sampling signal includes sampling points in a preset period and data values corresponding to the sampling points;
the overload judging module 200 is configured to judge that the sampling point is an overload point or a normal point based on the data value and a preset overload value, and obtain a first judgment result;
a first calculating module 300, configured to calculate and obtain a first peak value and a dc component based on the first determination result and a preset overload value;
a second calculating module 400, configured to calculate and obtain an initial phase based on the first peak, the dc component, and a phase and a data value of any normal point;
a compensation signal generating module 500, configured to generate a corresponding compensation signal based on the first peak, the dc component, and the initial phase, to obtain a first compensation signal.
Further, a modification module 600 is also included, the modification module 600 being configured to:
and extracting the phase and the data value of a normal point according to a preset correction rule, calculating a second peak value by combining the initial phase, and generating a second compensation signal based on the second peak value, the direct current component and the initial phase.
Further, the overload determination module 200 includes a dc offset determination unit configured to:
the overload values comprise positive overload values and negative overload values, wherein the absolute values of the positive overload values and the negative overload values are equal;
counting the number of data values reaching a preset positive overload value to obtain positive overload points, and counting the number of data values reaching a preset negative overload value to obtain negative overload points;
when the number of the positive overload points is equal to the number of the negative overload points, judging that no direct current bias exists, recording the direct current component as 0, and otherwise, judging that the direct current bias exists.
Further, the first calculation module 300 includes a first calculation unit and a second calculation unit;
the first calculating unit is used for calculating a first peak value and a direct current component when a direct current offset exists;
the second calculating unit is used for calculating the first peak value when no direct current bias exists.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that:
reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, the appearances of the phrase "one embodiment" or "an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
In addition, it should be noted that the specific embodiments described in the present specification may differ in the shape of the components, the names of the components, and the like. All equivalent or simple changes of the structure, the characteristics and the principle of the invention which are described in the patent conception of the invention are included in the protection scope of the patent of the invention. Various modifications, additions and substitutions for the specific embodiments described may occur to those skilled in the art without departing from the scope of the invention as defined in the accompanying claims.

Claims (9)

1. A method for compensating for single tone signal overload, comprising the steps of:
obtaining a periodic sampling signal, wherein the periodic sampling signal comprises sampling points in a preset period and data values corresponding to the sampling points;
judging whether the sampling point is an overload point or a normal point based on the data value and a preset overload value to obtain a first judgment result, wherein the overload value comprises a positive overload value and a negative overload value, and the absolute values of the positive overload value and the negative overload value are equal; calculating to obtain a first peak value and a direct current component based on the first judgment result and a preset overload value;
calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point;
generating a corresponding compensation signal based on the first peak value, the direct current component and the initial phase to obtain a first compensation signal, wherein the first compensation signal is a sine signal;
before a first peak value is obtained through calculation based on the first judgment result and a preset overload value, whether direct current offset exists is judged based on the data value;
when it is determined that the DC offset exists:
calculating a first sine value based on the number of positive overload points and the number of sampling points, and calculating a second sine value based on the number of negative overload points and the number of sampling points, wherein the number of positive overload points is the number of data values reaching a preset positive overload value, and the number of negative overload points is the number of data values reaching a preset negative overload value;
calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value;
wherein:
the calculation formula of the first sine value is as follows:
Figure FDA0003742060040000011
wherein sin (theta) 1 ) Is the first sine value, m is the number of sample points, m 1 Counting the number of positive overload points;
the calculation formula of the second sine value is as follows:
Figure FDA0003742060040000012
wherein sin (theta) 2 ) Is the second sine value, m 2 Negative overload points.
2. The method for compensating for single tone signal overload according to claim 1, further comprising a compensation signal modification step after generating a corresponding compensation signal based on the first peak value, the dc component and the initial phase, specifically comprising:
and extracting the phase and the data value of a normal point according to a preset correction rule, calculating a second peak value by combining the initial phase, and generating a second compensation signal based on the second peak value, the direct current component and the initial phase.
3. The method for compensating for single tone signal overload as claimed in claim 1, wherein the specific steps of determining whether the dc offset exists based on the data values are:
counting the number of data values reaching a preset positive overload value to obtain positive overload points, and counting the number of data values reaching a preset negative overload value to obtain negative overload points;
when the number of the positive overload points is equal to that of the negative overload points, judging that no direct current component exists, recording the direct current component as 0, and otherwise, judging that direct current offset exists.
4. The method for compensating for single tone signal overload according to any one of claims 1 to 3, wherein:
calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value according to the following calculation formula:
D+Asin(θ 1 )=d 1
D+Asin(θ 2 )=d 2
wherein A is the peak value, D is the DC component, D 1 Is a positive overload value, sin (θ) 1 ) Is the first sine value, d 2 Is a negative overload value, sin (θ) 2 ) Is the second sine value.
5. The method for compensating for single tone signal overload according to any one of claims 1 to 3, wherein:
when no DC bias is determined:
counting the number of the overload points based on the first judgment result, and calculating a third sine value based on the number of the overload points and the number of the sampling points;
calculating to obtain a peak value of the compensation signal based on a preset positive overload value and a third sine value;
the calculation formula of the third sine value is as follows:
Figure FDA0003742060040000021
wherein sin (theta) 3 ) And m is the number of sampling points, and n is the number of overload points.
6. The method for compensating for single tone signal overload according to claim 5, wherein the calculation formula for obtaining the peak value of the compensation signal based on the preset overload value and the first sine value is:
Figure FDA0003742060040000022
wherein A is the peak value, d 1 Is a positive overload value, sin (θ) 3 ) Is the third sine value.
7. An apparatus for compensating for single tone signal overload, comprising:
the signal acquisition module is used for acquiring a periodic sampling signal, wherein the periodic sampling signal comprises sampling points in a preset period and data values corresponding to the sampling points;
the overload judging module is used for judging that the sampling point is an overload point or a normal point based on the data value and a preset overload value to obtain a first judging result, wherein the overload value comprises a positive overload value and a negative overload value, and the absolute values of the positive overload value and the negative overload value are equal;
the first calculation module is used for calculating and obtaining a first peak value and a direct current component based on the first judgment result and a preset overload value;
the second calculation module is used for calculating and obtaining an initial phase based on the first peak value, the direct current component and the phase and data value of any normal point;
a compensation signal generation module, configured to generate a corresponding compensation signal based on the first peak, the dc component, and the initial phase, so as to obtain a first compensation signal;
the overload judging module comprises a direct current offset judging unit and a summing unit, and the direct current offset judging unit is used for judging whether direct current offset exists or not based on the data value;
the first computing module comprises a first computing unit and a second computing unit;
the first calculating unit is used for calculating a first peak value and a direct current component when a direct current offset exists;
the second calculating unit is used for calculating a first peak value when no direct current bias exists;
the first computing unit is configured to:
calculating a first sine value based on the number of positive overload points and the number of sampling points, and calculating a second sine value based on the number of negative overload points and the number of sampling points, wherein the number of positive overload points is the number of data values reaching a preset positive overload value, and the number of negative overload points is the number of data values reaching a preset negative overload value;
calculating a first peak value and a direct current component based on the first sine value, the second sine value, the positive overload value and the negative overload value;
wherein:
the calculation formula of the first sine value is as follows:
Figure FDA0003742060040000031
wherein sin (theta) 1 ) Is the first sine value, m is the number of sample points, m 1 Counting the number of positive overload points;
the calculation formula of the second sine value is as follows:
Figure FDA0003742060040000032
wherein sin (theta) 2 ) Is the second sine value, m 2 Negative overload points.
8. The apparatus for compensating for single tone signal overload of claim 7, further comprising a modification module configured to:
and extracting the phase and the data value of a normal point according to a preset correction rule, calculating a second peak value by combining the initial phase, and generating a second compensation signal based on the second peak value, the direct current component and the initial phase.
9. The apparatus for compensating for single tone signal overload of claim 7, wherein the dc offset decision unit is configured to:
counting the number of data values reaching a preset positive overload value to obtain positive overload points, and counting the number of data values reaching a preset negative overload value to obtain negative overload points;
when the number of the positive overload points is equal to that of the negative overload points, judging that no direct current component exists, recording the direct current component as 0, and otherwise, judging that direct current offset exists.
CN202010751179.XA 2020-07-30 2020-07-30 Method and device for compensating overload of single-tone signal Active CN111879981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010751179.XA CN111879981B (en) 2020-07-30 2020-07-30 Method and device for compensating overload of single-tone signal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010751179.XA CN111879981B (en) 2020-07-30 2020-07-30 Method and device for compensating overload of single-tone signal

Publications (2)

Publication Number Publication Date
CN111879981A CN111879981A (en) 2020-11-03
CN111879981B true CN111879981B (en) 2022-08-26

Family

ID=73205747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010751179.XA Active CN111879981B (en) 2020-07-30 2020-07-30 Method and device for compensating overload of single-tone signal

Country Status (1)

Country Link
CN (1) CN111879981B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5714755A (en) * 1980-06-30 1982-01-26 Mitsubishi Electric Corp Method of reducing effect due to quantization error of digital processing locator
CN101251556B (en) * 2008-03-04 2010-06-30 北京航空航天大学 Sinusoidal signal four parameters testing method and virtual apparatus signal detection device
CN102195650B (en) * 2010-03-11 2017-03-15 中兴通讯股份有限公司 A/D conversion system and method
CN102983572A (en) * 2012-12-13 2013-03-20 广西星宇智能电气有限公司 Extraction method for harmonic and reactive current
CN105978569B (en) * 2016-06-16 2020-03-27 北京中科国技信息系统有限公司 Radio frequency identification signal processing method, circuit and device and label reader-writer
CN107328987B (en) * 2017-06-27 2020-12-29 国网福建省电力有限公司 Method and device for processing waveform distortion of photoelectric current sensor

Also Published As

Publication number Publication date
CN111879981A (en) 2020-11-03

Similar Documents

Publication Publication Date Title
CN1637422A (en) Electrical power measuring devices
US6351228B1 (en) Digital calibration method and apparatus for A/D or D/A converters
EP0483846A2 (en) Analog-to-digital converter circuit
CN111238632A (en) High-precision vibration signal acquisition and processing system
CN111879981B (en) Method and device for compensating overload of single-tone signal
JPH0856160A (en) Abnormality detector for a/d converter
CN1627087A (en) Electric power meter
US6301550B1 (en) Phase delay correction system
CN108387834B (en) Wide area ADC error correction test method and device
CN113447871B (en) Calibration method and device
JP4076797B2 (en) Noise removal method and noise removal filter
CN111970003B (en) Non-coherent sampling signal recovery method in ADC frequency spectrum test
JPH1010163A (en) Effective voltage value measuring apparatus
JP4385931B2 (en) DC current detector
KR100417114B1 (en) Apparatus and method to measure high frequency power
JP3085496B2 (en) Sampling type measuring device
US7472025B2 (en) Energy detection apparatus and method thereof
JP2003018006A (en) Analog/digital conversion method
US4584560A (en) Floating point digitizer
JP4996992B2 (en) Impedance measuring device
CN218336001U (en) Signal detection device and signal detection system
JP4572536B2 (en) Sampling type measuring device
CN116773903B (en) Chip power consumption detection method and device, chip power consumption adjustment method and server
CN115951087A (en) Regulating circuit and method for rotating speed pulse signal
CN117335801A (en) Sampling data processing method, data processing device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant