Method for calculating effective value of alternating voltage

文档序号:632239 发布日期:2021-05-11 浏览:8次 中文

阅读说明:本技术 一种交流电压有效值计算方法 (Method for calculating effective value of alternating voltage ) 是由 江燕 马锋 丁仕彬 于 2019-11-04 设计创作,主要内容包括:本发明提供一种交流电压有效值计算方法,1、S1、采样一个交流电压AD值,t时间内连续采集2*N个数据,U0、U1......U2N;S2、计算交流电的有效值,S3、数据清零,对上个周期内的N个数据累加的平方和清零;S4、重复S2、S3步骤,由于一直计算的是最新的一个周期的有效值,将原有方案中的累计误差避免了。(The invention provides a method for calculating an effective value of alternating voltage, which comprises the following steps of 1, S1, sampling an alternating voltage AD value, and continuously collecting 2N data within t time, wherein U0, U U1... U2N; s2, calculating the effective value of the alternating current, s3, clearing data, and clearing the sum of squares of N data accumulations in the last period; and S4, repeating the steps S2 and S3, and avoiding the accumulated error in the original scheme because the effective value of the latest period is always calculated.)

1. An alternating voltage effective value calculation method is characterized in that: s1, sampling an AC voltage AD value, and continuously collecting 2N data, U, in t time0、U1......U2N-1

S2, calculating the effective value of the alternating current,

s3, clearing data, and clearing the sum of squares of N data accumulations in the last period;

and S4, repeating the steps S2 and S3.

2. An effective value calculation method for an alternating voltage according to claim 1, wherein: in S1, when the period does not fluctuate, U is equal to the 2 × N data and the 0 th data0=U2N

3. An effective value calculation method for an alternating voltage according to claim 1, wherein: in S2, the square sum of N data before the current position is calculated at the current position of the stored data in the operation cycle, and URms is calculated.

Technical Field

The invention mainly relates to the field of calculation of an effective value of alternating voltage, in particular to a method for calculating the effective value of the alternating voltage.

Background

The effective value of the alternating current is defined according to the thermal effect of the current and is calculated according to the formula

The prior art is as follows: sampling an alternating voltage AD value in each high-precision T time period, continuously acquiring N data in N periods, forming array storage with a period T being N x T, wherein the data storage form is shown in figure 1, theoretically, the N +1 th data is equal to the 0 th data, and the data storage method is characterized in that the N +1 th data is used for replacing the 0 th data in the data storage process, and the like:

when the number of the accumulated data exceeds N, the current latest value is accumulated, and the data at the position of the previous period is subtracted at the same time, so that the accumulated square sum is obtained in the low-precision working period, and the effective value is calculated.

In China, the theoretical period of the power grid voltage is 50Hz, but the theoretical period actually fluctuates slightly, when the power grid voltage fluctuates, the Nth data is not equal to the 0 th data, errors are introduced into an accumulated value by adding the current Nth value and subtracting the 0 th data during accumulation calculation, the errors are calculated from an effective value, and after long-time operation, the errors are accumulated, so that the phenomenon of inaccurate calculation is caused.

Disclosure of Invention

The invention provides a method for calculating an effective value of alternating voltage under high-speed sampling, which is characterized in that under a long-term running state, the effective value of the grid voltage calculates the error, and the following technical scheme is adopted:

s1, sampling an AC voltage AD value, and continuously collecting 2N data, U, in t time0、U1......U2N-1

S2, calculating the effective value of the alternating current,

s3, clearing data, and clearing the sum of squares of N data accumulations in the last period;

and S4, repeating the steps S2 and S3.

Preferably, in S1, when the period is not fluctuated, U is equal to U for the 2 × N data and the 0 th data0=U2N

Preferably, in S2, the square sum of N data before the current position is calculated and then URms is calculated at the position where the data is currently stored in the work cycle.

Because the latest effective value of one period is always calculated, the accumulated error in the original scheme is avoided.

The invention has the beneficial effects that: the method comprises the steps of continuously collecting 2 x N data in a period t, calculating the sum of squares of N data before the position of the currently stored data in the period, and URms, clearing the sum of squares of the accumulated data after calculation, checking the updated position of the current data after clearing, and calculating the sum of squares and effective values.

And in the next period, checking the updated position of the current data, calculating the square sum and the effective value, and clearing the square sum. Because the latest effective value of one period is always calculated, the accumulated error in the original scheme is avoided.

Drawings

FIG. 1 is a diagram of a prior art manner of data storage;

fig. 2 shows a data storage method of the present patent application.

Detailed Description

The patent application adopts the following steps: s1, sampling an AC voltage AD value in each high-precision t time period, and continuously collecting 2N data, U0、U1......U2N-1(ii) a FIG. 2 is a schematic illustration;

s2, calculating the effective value of the alternating current,

s3, clearing the data, and clearing the sum of squares accumulated by the N data in the previous period after the effective value is calculated;

and S4, repeating the steps S2 and S3, namely looking at the updated position of the current data in the next period, calculating the square sum and the effective value, and clearing the square sum.

Preferably, in S1, when the period is not fluctuated, the 2 × N data and the 0 th data are equal, and U is0=U2N

Preferably, in S2, the position of the currently stored data in the high-precision period is checked in the low-precision working period, the sum of squares of N data before the current position is calculated, and then URms is calculated.

Because the latest effective value of one period is always calculated, the accumulated error in the original scheme is avoided.

The above-described embodiments are merely illustrative of the principles and utilities of the present patent application and are not intended to limit the present patent application. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of this patent application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of this patent application.

5页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:自适性电压定比测量方法及相关的电子装置

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!