Range switching method for electric meter, electric meter and storage medium

文档序号:1168884 发布日期:2020-09-18 浏览:10次 中文

阅读说明:本技术 一种用于电表的量程切换方法、电表及存储介质 (Range switching method for electric meter, electric meter and storage medium ) 是由 赵乾坤 冯泽平 周帆 刘向伟 于 2020-04-29 设计创作,主要内容包括:本发明公开了一种用于电表的量程切换方法,其包括如下步骤:获取采样电路的量程切换阈值表PTH;获取至少一个采样信号,并将所述采样信号通过模数转换为电信号;读取一个量程切换周期内所述电信号的振幅U<Sub>n</Sub>;通过公式(1)计算得到一个量程切换周期内所述采样点对量程切换影响的等效能量P<Sub>t</Sub>;<Image he="138" wi="682" file="DDA0002472967980000011.GIF" imgContent="drawing" imgFormat="GIF" orientation="portrait" inline="no"></Image>当P<Sub>t</Sub>>PTH<Sub>m</Sub>时,切换当前量程m到最大量程m<Sub>max</Sub>;当P<Sub>t</Sub>≤PTH<Sub>m</Sub>时,则说明采样信号小于量程m范围,将当前量程m切换到量程m-1。本发明通过可变权重积分算法实时计算各采样点信号对量程切换的影响能量,软件查表实时比对各采样点信号累计影响能量与量程切换阈值,提升量程切换的灵敏度和快速性,同时对硬件采样电路元器件起到保护作用。(The invention discloses a range switching method for an ammeter, which comprises the following steps: acquiring a range switching threshold value table PTH of a sampling circuit; acquiring at least one sampling signal, and converting the sampling signal into an electric signal through analog-to-digital conversion; reading the amplitude U of the electrical signal over a range switching period n (ii) a Calculating to obtain equivalent energy P of the sampling point on the range switching influence in a range switching period by formula (1) t ; When P is present t >PTH m Then, switching the current range m to the maximum range m max (ii) a When P is present t ≤PTH m When the current range is smaller than the range m, the sampling signal is shown to be smaller than the range m, and the current range m is switchedTo a range m-1. The invention calculates the influence energy of each sampling point signal on the range switching in real time through a variable weight integration algorithm, compares the accumulated influence energy of each sampling point signal with the range switching threshold in real time through table look-up by software, improves the sensitivity and the rapidity of the range switching, and simultaneously plays a role in protecting the components of a hardware sampling circuit.)

1. A range switching method for an electric meter is characterized by comprising the following steps:

acquiring a range switching threshold value table PTH of a sampling circuit;

acquiring at least one sampling signal, and converting the sampling signal into an electric signal through analog-to-digital conversion;

reading the amplitude U of the electrical signal over a range switching periodn

Calculating to obtain equivalent energy P of the sampling point on the range switching influence in a range switching period by formula (1)t

Wherein: n represents an nth sample signal of the plurality of sample signals; u shapenRepresents the sampled signal amplitude at the nth point; r represents a circuit equivalent resistance; t represents a range switching period; ratio (U)n) Representing weight coefficients affecting different voltage ranges;

when P is presentt>PTHmThen, switching the current range m to the maximum range mmax

When P is presentt≤PTHmThen, the maximum measuring range m is obtained by comparisonmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ U ∈ [ a ]m,bm]Then the sampling signal is judged to be in the range of the measuring range m,the control range m is kept unchanged;

if it isThen the sampling signal is judged to be smaller than the range of the range m, and the range m is switched to the range m-1.

2. The range switching method of claim 1 wherein said time P ist>PTHmThen, switching the current range m to the maximum range mmaxAfter the step (2), further comprising:

obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ U ∈ [ a ]m,bm]If so, the sampling signal is judged to be in the range of the range m, and the range m is controlled to be switched to the range m + 1.

3. The range switching method of claim 2, wherein the comparing obtains the maximum range mmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm]After the step (2), further comprising:

if it isThen the sampled signal is determined to be at range mmaxWithin range, maximum range mmaxRemain unchanged.

4. The range switching method of claim 1 wherein when P ist≤PTHmThen, the maximum measuring range m is obtained by comparisonmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ Um∈[am,bm]If so, the sampling signal is judged to be in the range of the range m, and the range is kept unchanged by the range m.

5. The range switching method of claim 4 wherein if the switching is performed in a normal mode, the switching is performed in a normal modeAnd judging that the sampling signal is smaller than the range of the range m, and switching the current range m to the range m-1.

6. The range switching method of claim 1, wherein the step of obtaining the range switching threshold table PTH of the sampling circuit specifically includes:

calculating the range switching threshold value table PTH according to the materials used by hardware sampling circuit components, temperature coefficients, the accuracy of the resistance value of a sampling resistor, the turn ratio error of a transformer and the weighting of the excitation nonlinear error of the transformer;

and saving the range switching threshold value table PTH to a stack of a main control chip.

7. An electricity meter, characterized in that it comprises:

the first acquisition module is used for acquiring a range switching threshold table PTH of the sampling circuit;

the second acquisition module is used for acquiring at least one sampling signal and converting the sampling signal into an electric signal through an analog-to-digital (A/D) converter;

a reading module for reading the amplitude U of the electrical signal in a range switching cyclen

A first calculating module, configured to calculate, according to formula (1), an equivalent energy P of the sampling point on the range switching influence in a range switching periodt

Wherein: n represents an nth sample signal of the plurality of sample signals; u shapenRepresents the sampled signal amplitude at the nth point; r represents a circuit equivalent resistance; t represents a range switching period; ratio (U)n) Representing weight coefficients affecting different voltage ranges;

a first switching module for Pt>PTHmThen, switching the current range m to the maximum range mmax

A second calculation module for obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

A first control module for determining if Δ U ∈ [ a ]m,bm]If so, the sampling signal is judged to be in the range of the range m, and the range m is controlled to be switched to the range m + 1.

A second control module for ifThen the sampled signal is determined to be at range mmaxWithin range, maximum range mmaxRemain unchanged.

A third calculation module for Pt≤PTHmThen, the maximum measuring range m is obtained by comparisonmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

A third control module for determining if Δ U ∈ [ a ]m,bm]If so, judging that the sampling signal is in the range of the range m, and controlling the range m to keep unchanged;

a second switching module for ifThen the sampling signal is judged to be smaller than the range of the range m, and the range m is switched to the range m-1.

8. An electricity meter in accordance with claim 7, further comprising:

a fourth calculation module for obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signaln maxCalculating the value of Un max/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

A fourth control module for determining if Δ Um∈[am,bm]If so, judging that the sampling signal is in the range of the range m, and keeping the range m unchanged;

a fifth control module for ifAnd judging that the sampling signal is smaller than the range of the range m, and switching the current range m to the range m-1.

9. An electricity meter in accordance with claim 7, further comprising:

the fifth calculation module is used for calculating the range switching threshold table PTH according to the materials used by the hardware sampling circuit components, the temperature coefficient, the accuracy of the resistance value of the sampling resistor, the turn ratio error of the transformer and the excitation nonlinear error of the transformer in a weighting manner;

and the storage module is used for storing the range switching threshold value table PTH into a stack of the main control chip.

10. A storage medium having program data stored thereon, wherein the program data when executed by a processor implements the steps in the range switching method of any of claims 1-6.

Technical Field

The invention relates to the technical field of electric measuring equipment, in particular to a range switching method for an electric meter, the electric meter and a storage medium.

Background

The measurement of main parameters such as voltage, current, frequency, phase, power, electric energy and harmonic related to electric power is the basis for ensuring the protection control, automatic control, system operation scheduling, energy conservation and consumption reduction and fine management of an electric power system. The accurate measurement of the electric energy is an important link of production, operation and management of electric power enterprises and the economy and stable operation of a power grid, and is a basic guarantee for the power grid company to develop electric energy fair trade. The accurate and fast switching of multiple ranges is the guarantee of wide-range electric energy high-precision measurement, in the multi-range connection, the connection position of two adjacent ranges has a certain overlap region, the measured value in the overlap region may be the low-end reading of the previous range or the high-end reading of the next range, theoretically, the two measured values should be consistent, but in practice, the two measured values are difficult to completely coincide.

When large and asymmetric ripples exist in an alternating current signal, the precision and the sensitivity of range switching are very poor, and particularly when a discontinuous periodic pulse interference signal is superposed on an alternating current sinusoidal signal, the range switching can be repeated in a short time without legal range.

Disclosure of Invention

The invention provides a range switching method for an electric meter, the electric meter and a storage medium, which are used for solving the problems that in the prior art, when a large and asymmetric ripple exists in an alternating current signal, the precision and the sensitivity of range switching are poor, and particularly, when a discontinuous periodic pulse interference signal is superposed on an alternating current sinusoidal signal, repeated range switching in a short time can occur and legal range does not exist.

In order to solve the above problems, the present invention provides a range switching method for an electricity meter, which comprises the following steps:

acquiring a range switching threshold value table PTH of a sampling circuit;

acquiring at least one sampling signal, and converting the sampling signal into an electric signal through analog-to-digital conversion;

reading the amplitude U of the electrical signal over a range switching periodn

Calculating to obtain equivalent energy P of the sampling point on the range switching influence in a range switching period by formula (1)t

Wherein: n represents an nth sample signal of the plurality of sample signals; u shapenRepresents the sampled signal amplitude at the nth point; r represents a circuit equivalent resistance; t represents a range switching period; ratio (U)n) Representing weight coefficients affecting different voltage ranges;

when P is presentt>PTHmThen, switching the current range m to the maximum range mmax

When P is presentt≤PTHmThen, the maximum measuring range m is obtained by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ U ∈ [ a ]m,bm]If so, judging that the sampling signal is in the range of the range m, and controlling the range m to keep unchanged;

if it isThen the sampling signal is judged to be smaller than the range of the range m, and the range m is switched to the range m-1.

As a further improvement of the invention, saidWhen P is presentt>PTHmThen, switching the current range m to the maximum range mmaxAfter the step (2), further comprising:

obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ U ∈ [ a ]m,bm]If so, the sampling signal is judged to be in the range of the range m, and the range m is controlled to be switched to the range m + 1.

As a further development of the invention, the comparison yields the maximum range mmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm]After the step (2), further comprising:

if it is

Figure BDA0002472967960000031

Then the sampled signal is determined to be at range mmaxWithin range, maximum range mmaxRemain unchanged.

As a further improvement of the present invention, when P ist≤PTHmThen, the maximum measuring range m is obtained by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ Um∈[am,bm]If so, the sampling signal is judged to be in the range of the range m, and the range is kept unchanged by the range m.

As a further improvement of the invention, if

Figure BDA0002472967960000032

And judging that the sampling signal is smaller than the range of the range m, and switching the current range m to the range m-1.

As a further improvement of the present invention, the step of obtaining the range switching threshold table PTH of the sampling circuit specifically includes:

calculating the range switching threshold value table PTH according to the materials used by hardware sampling circuit components, temperature coefficients, the accuracy of the resistance value of a sampling resistor, the turn ratio error of a transformer and the weighting of the excitation nonlinear error of the transformer;

and saving the range switching threshold value table PTH to a stack of a main control chip.

In order to solve the above problems, the present invention also provides an electricity meter, including:

the first acquisition module is used for acquiring a range switching threshold table PTH of the sampling circuit;

the second acquisition module is used for acquiring at least one sampling signal and converting the sampling signal into an electric signal through an analog-to-digital (A/D) converter;

a reading module for reading the amplitude U of the electrical signal in a range switching cyclen

A first calculating module, configured to calculate, according to formula (1), an equivalent energy P of the sampling point on the range switching influence in a range switching periodt

Wherein: n represents an nth sample signal of the plurality of sample signals; u shapenRepresents the sampled signal amplitude at the nth point; r represents a circuit equivalent resistance; t represents a range switching period; ratio (U)n) To representWeight coefficients affecting different voltage ranges;

a first switching module for Pt>PTHmThen, switching the current range m to the maximum range mmax

A second calculation module for obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

A first control module for determining if Δ U ∈ [ a ]m,bm]If so, the sampling signal is judged to be in the range of the range m, and the range m is controlled to be switched to the range m + 1.

A second control module for ifThen the sampled signal is determined to be at range mmaxWithin range, maximum range mmaxRemain unchanged.

A third calculation module for Pt≤PTHmThen, the maximum measuring range m is obtained by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

A third control module for determining if Δ U ∈ [ a ]m,bm]If so, judging that the sampling signal is in the range of the range m, and controlling the range m to keep unchanged;

a second switching module for ifThen the sampling signal is judged to be smaller than the range of the range m, and the range m is switched to the range m-1.

As a further improvement of the present invention, the electricity meter further comprises:

a fourth calculation module for obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs the maximum value of the preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

A fourth control module for determining if Δ Um∈[am,bm]If so, judging that the sampling signal is in the range of the range m, and keeping the range m unchanged;

a fifth control module for if

Figure BDA0002472967960000051

And judging that the sampling signal is smaller than the range of the range m, and switching the current range m to the range m-1.

As a further improvement of the present invention, the electricity meter further comprises:

the fifth calculation module is used for calculating the range switching threshold table PTH according to the materials used by the hardware sampling circuit components, the temperature coefficient, the accuracy of the resistance value of the sampling resistor, the turn ratio error of the transformer and the excitation nonlinear error of the transformer in a weighting manner;

and the storage module is used for storing the range switching threshold value table PTH into a stack of the main control chip.

In order to solve the above problem, the present invention also provides a storage medium having program data stored thereon, wherein the program data, when executed by a processor, implements the steps in the range switching method described above.

The invention calculates the influence energy of each sampling point signal on the range switching in real time through a variable weight integration algorithm, compares the accumulated influence energy of each sampling point signal with the range switching threshold in real time through a software table look-up, improves the sensitivity and the rapidity of the range switching, plays a certain protection role on hardware sampling circuit components, prolongs the service life of the components, and increases the long-term measurement accuracy index of the standard table. The range switching method is suitable for range switching of alternating current meters, direct current meters, single-phase and three-phase multi-range standard voltmeters, ammeters, power meters and electric energy meters.

Drawings

FIG. 1 is a schematic flow chart diagram illustrating a method for switching the range of an electricity meter according to an embodiment of the present invention;

FIG. 2 is a schematic flow chart illustrating a method for switching the range of an electricity meter according to an embodiment of the present invention;

FIG. 3 is a schematic flow chart illustrating a method for switching the range of an electricity meter according to an embodiment of the present invention;

FIG. 4 is a schematic flow chart illustrating a method for switching the range of an electricity meter according to an embodiment of the present invention;

FIG. 5 is a functional block diagram of an embodiment of the electricity meter of the present invention;

fig. 6 is a schematic diagram of functional modules of an embodiment of the electricity meter according to the invention.

Detailed Description

In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

Fig. 1 shows an embodiment of the range switching method for the electricity meter, and referring to fig. 1, in the embodiment, the range switching method includes the following steps:

in step S1, a range switching threshold table PTH of the sampling circuit is acquired.

Specifically, the range switching threshold table PTH is a maximum range value in the same electric meter at different ranges.

Step S2, at least one sampling signal is obtained, and the sampling signal is converted into an electrical signal through analog-to-digital conversion.

Specifically, the sampling signal is a corresponding numerical value of the measured object, such as voltage, current, resistance, and the like, read by a probe of the electric meter during the measurement operation.

Step S3, reading the amplitude U of the electric signal in a measuring range switching periodn

Step S4, calculating the equivalent energy P of the sampling point on the range switching influence in a range switching period by the formula (1)tAnd determining PtAnd PTHmWhen P is a magnitude relation oft>PTHmThen, step S5 is executed, when Pt≤PTHmThen, step S6 is executed.

Figure BDA0002472967960000061

Wherein: n represents an nth sample signal of the plurality of sample signals; u shapenRepresents the sampled signal amplitude at the nth point; r represents a circuit equivalent resistance; t represents a range switching period; ratio (U)n) Representing weight coefficients affecting different voltage ranges; PTHmIndicating the handover threshold table PTH at range m.

Step S5, switching the current range m to the maximum range mmax

Step S6, comparing to obtain the maximum measuring range mmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm]If Δ U ∈ [ a ]m,bm]Then step S7 is executed ifStep S8 is executed; wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmFor the preset floatMaximum value of the kinetic interval, bmHas a value range of (0, 1)]And a is am≤bm

Step S7, judging that the sampling signal is in the range of the range m, and controlling the range m to keep unchanged;

and step S8, judging that the sampling signal is smaller than the range of the range m, and switching the range m to the range m-1.

According to the embodiment, the influence energy of each sampling point signal on range switching is calculated in real time through a variable weight integration algorithm, the software table look-up compares the accumulated influence energy of each sampling point signal with the range switching threshold value in real time, the sensitivity and the rapidity of range switching are improved, meanwhile, a certain protection effect is played on hardware sampling circuit components, the service life of the components is prolonged, and the long-term measurement accuracy index of a standard table is increased. The embodiment is suitable for range switching of an alternating current meter, a direct current meter, a single-phase multi-range standard voltmeter, a three-phase multi-range standard voltmeter, an ammeter, a power meter and an electric energy meter.

In order to further determine the range of the measuring range m, on the basis of the above embodiment, referring to fig. 2, in this embodiment, after step S5, the method further includes:

step S50, comparing to obtain the maximum measuring range mmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm]If Δ U ∈ [ a ]m,bm]Then step S51 is executed if

Figure BDA0002472967960000071

Step S52 is executed; wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs a maximum value of a preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

Specifically, amAnd bmThe value of (b) can be set according to actual conditions. For example, when Pt>PTHmWhen a ismIs 0.5, bmThe value of (a) is 1,i.e. the maximum value U of the current sampled signalnmaxFull range value U exceeding range mmloopWhen half, the range needs to be switched to m + 1; if the maximum value U of the current sampling signalnmaxFull range value U exceeding range mmloopThen, it is necessary to switch to the maximum range mmaxSo as to ensure the use safety of the equipment.

Step S51, determining that the sampling signal is within the range of range m, and controlling the range m to switch to the range m + 1.

Step S52, judging that the sampling signal is in the range of m, and keeping the maximum range mmax

Further, referring to FIG. 3, when P ist≤PTHmAfter step S6, the method further includes:

step S60, comparing to obtain the maximum measuring range mmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/UloopWherein U isloopThe full range value of the maximum range is represented, and whether the delta U belongs to [ a ] or not is judgedm,bm]If Δ Um∈[am,bm]Then step S62 is executed ifStep S63 is executed; wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs a maximum value of a preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

In step S61, it is determined that the sampling signal is within range m and range m remains unchanged.

And step S62, judging that the sampling signal is smaller than the range of the range m, and switching the current range m to the range m-1.

Specifically, amAnd bmThe value of (b) can be set according to actual conditions. For example, when Pt≤PTHmWhen a ismIs 0.5, bmIs 1, i.e. the maximum value U of the current sampling signalnmaxFull range value U exceeding range mmloopHalf ofIn time, the range does not need to be switched; if the maximum value U of the current sampling signalnmaxFull range value U less than range mmloopHalf of this, it is necessary to switch to range m-1 to ensure accuracy.

This embodiment is realized by comparing the equivalent energy PtAnd PTH withmJudging whether the sampling signal is in a proper measuring range or not by judging the proportional relation between the sampling signal and the maximum value of the sampling signal, judging whether the sampling signal is in a proper measuring range or not, if the sampling signal is in a small interval of the measuring range m, switching to the measuring range m-1, if the sampling signal is in a large interval of the measuring range m, switching to the measuring range m +1, and if the sampling signal exceeds the maximum value of the measuring range m, switching to the maximum measuring range mmax

In order to further refine the range switching threshold table PTH, on the basis of the above embodiment, referring to fig. 4, in this embodiment, the step S1 specifically includes:

step S10, calculating a range switching threshold value table PTH according to the material and temperature coefficient of the hardware sampling circuit component, the accuracy of the resistance value of the sampling resistor, the turn ratio error of the transformer and the excitation nonlinear error of the transformer;

step S11, saving the range switching threshold table PTH to the stack of the main control chip.

In the embodiment, the range switching threshold table PTH is calculated by weighting the materials, the temperature coefficients, the resistance accuracy of the sampling resistor, the turn ratio error of the transformer and the excitation nonlinear error of the transformer, which are used by the hardware sampling circuit components, so that the accuracy of different sampling circuit components is ensured.

Fig. 5 shows an embodiment of the electric meter according to the present invention, and referring to fig. 5, in this embodiment, the electric meter includes a first obtaining module 1, a second obtaining module 2, a reading module 3, and a calculating and judging module 4.

The first acquisition module 1 is used for acquiring a range switching threshold table PTH of the sampling circuit; the second acquisition module 2 is used for acquiring at least one sampling signal and converting the sampling signal into an electric signal through analog-to-digital conversion; the reading module 3 is used for reading telecommunication in a range switching periodAmplitude U of the hornn(ii) a The calculating and judging module 4 is used for calculating and obtaining the equivalent energy of the sampling point on the range switching influence in a range switching period through the formula (1), and PtJudging the equivalent energy Pt

Wherein: ptThe equivalent energy of the sampling signal on the range influence in a range switching period is represented; n represents an nth sample signal of the plurality of sample signals; u shapenRepresents the sampled signal amplitude at the nth point; r represents a circuit equivalent resistance; t represents a range switching period; ratio (U)n) Representing the weight coefficients affecting the different voltage scales.

When P is presentt>PTHmThen, switching the current range m to the maximum range mmaxAnd obtaining the maximum measuring range m by comparisonmaxMaximum value U of middle range switching period sampling signalnmaxCalculating the value of Unmax/Uloop(UloopA full scale value representing the maximum scale), and determines whether or not Δ U belongs to [ a ]m,bm](ii) a Wherein, amIs a minimum value of a preset floating interval, amThe value range of (1) is [ 0; bmIs a maximum value of a preset floating interval, bmHas a value range of (0, 1)]And a is am≤bm

If Δ U ∈ [ a ]m,bm]If so, the sampling signal is judged to be in the range of the range m, and the range m is controlled to be switched to the range m + 1.

If it is

Figure BDA0002472967960000093

Judging that the sampling signal is not in the range of the range m, and controlling the range m to be switched to the maximum range mmax

When P is presentt≤PTHmWhile, calculate Δ Um=Unmax/Umloop(UmloopFull scale value representing the scale m), if Δ Um∈[am,bm]The sampled signal is illustrated in the range of mThe measuring range keeps m unchanged.

If it isThe sampling signal is smaller than the range of the range m, and the current range m is switched to the range m-1.

Further, on the basis of the above embodiment, referring to fig. 6, in this embodiment, the electric meter further includes a calculating module 5 and a saving module 6.

The calculation module 5 is used for calculating a range switching threshold table PTH according to the material, temperature coefficient, sampling resistance value accuracy, transformer turn ratio error and transformer excitation nonlinear error weighting of hardware sampling circuit components; the saving module 6 is used for saving a range switching threshold table PTH.

The invention also provides a storage medium, which is provided with program data, and the program data realizes the steps in the measuring range switching method when being executed by a processor.

The storage medium in this embodiment may be a read-only memory, a static storage device capable of storing static information and instructions, a random access memory, or a dynamic storage device capable of storing information and instructions, and may also be an electrically erasable programmable read-only memory, a read-only optical disc, or other optical disc storage, magnetic disc storage medium, or other magnetic storage device.

It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-based embodiments, since they are substantially similar to the method embodiments, detailed descriptions thereof are omitted, and reference may be made to some descriptions of the method embodiments for relevant points.

The embodiments of the present invention have been described in detail, but the present invention is only exemplary and is not limited to the embodiments described above. It will be apparent to those skilled in the art that any equivalent modifications or substitutions can be made within the scope of the present invention, and thus, equivalent changes and modifications, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the scope of the present invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一体式直流电能表

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类