Accurate RMS Calculations for Periodic Signals by

advertisement
Adv. Studies Theor. Phys., Vol. 7, 2013, no. 21, 1023 - 1033
HIKARI Ltd, www.m-hikari.com
http://dx.doi.org/10.12988/astp.2013.3999
Accurate RMS Calculations for Periodic Signals by
Trapezoidal Rule with the Least Data Amount
Sompop Poomjan, Thammarat Taengtang, Keerayoot Srinuanjan,
Surachart Kamoldilok and Prathan Buranasiri
Department of Physics, Faculty of Science
King Mongkut’s Institute of Technology Ladkrabang, Chalongkrung Rd.
Ladkrabang, Bangkok Thailand 10520
pattrix2002@yahoo.com
Copyright © 2013 Sompop Poomjan et al. This is an open access article distributed under the
Creative Commons Attribution License, which permits unrestricted use, distribution, and
reproduction in any medium, provided the original work is properly cited.
Abstract
The purpose of this research is to present a simple method using the least data
amount to calculate root mean square (RMS) values of periodic signals
(constructed from Fourier series) which the highest harmonic order is known or
able to be estimated. In the research, trapezoidal rule with the least data amount
was proved and tried to calculate definite integral values of sinusoidal signals
from a lot of trial runs until a significant property was found. Then the property
would be deployed to calculate RMS values. Results of the research can provide
not only more convenient processes of simple trapezoidal rule but also more
accurate results than the patented Simpson’s rule in the same least data amount.
Keywords: root mean square, RMS calculation, periodic signal, trapezoidal rule,
Simpson’s rule
1 Introduction
For several decades, root mean square (RMS) calculations for alternating signals
have been done by many methods. The popularly routine method is Simpson’s
rule based on definite integration which was patented more than 10 years ago[1].
Although the method of Simpson’s rule has been more widely accepted by
engineers and physicists than trapezoidal rule, there has still been no comparison
1024
Sompop Poomjan et al.
report found to support Simpson’s rule as the most appropriate method to
calculate RMS values of periodic signals. In this research, trapezoidal rule method
will be suggested to replace Simpson’s rule to calculate RMS values of periodic
signals because it is more accurate in the result and not too complicate in
calculation.
1.1 RMS Calculations
Although there are many methods for calculating RMS values, the standard
method is still Calculus integration technique for continuous data stated as :
1
T
f RMS =
t1 + T
∫f
2
(t ) dt
(1.1.1),
t1
where f RMS is the RMS of f (t ) between the domain interval of
where T is the period of f (t ) [2].
t1 to t1 + T ,
1.2 Periodic signals
A periodic signal is a signal constructed from many uniformly sinusoidal signals
which can be expanded as the following Fourier series :
M
f (t ) = a0 + ∑ (am cos( mωt ) +b m sin( mωt ) )
(1.2.1),
m =1
where f (t ) is a periodic signal with period of T , a0 is the DC signal of f (t ) ,
2π
ω=
is the basic angular frequency, am and bm are Fourier coefficients of
T
harmonic orders run from m = 1, 2, 3, …, M − 1 , M [3], where M is the
highest harmonic order of the studied signal (Actually M can be estimated from
previously experienced data.). In order to simplify calculation, T = 2π will be
used as the period of all studied signals. If the RMS value of f (t ) is required to
be known, all harmonic terms will be expanded to calculate definite integral
values. Practically f (t ) , f 2 (t ) and T can be known from collecting signal data
of general digital oscilloscopes, but the highest harmonic order ( M ) may be
estimated from routine data. Refer to equation (1.2.1), f 2 (t ) can be expanded
as :
f 2 (t ) = [( a0 ) 2 + ( a1 cos t ) 2 + (a2 cos 2t ) 2 + ... + (aM cos( Mt )) 2 + (b1 sin t ) 2 + (b2 sin 2t ) 2
+ ... + (bM sin( Mt )) 2 + 2( a0 a1 cos t + ... + aM bM cos( Mt ) sin( Mt )
+ ... + bM −1bM sin(( M − 1)t ) sin( Mt ))]
(1.2.2)
2π
From equation (1.1.1), if
∫f
0
2
(t )dt comes out, the RMS value can be obtained
Accurate RMS calculations for periodic signals
1025
successfully. In this research, all expanded terms will be integrated by using
trapezoidal rule with the least data amount. Because f 2 (t ) is comprised of
expanded harmonic terms, if all the terms are accurately calculated by trapezoidal
rule, f 2 (t ) can be accurately calculated by trapezoidal rule also.
1.3 Simpson’s Rule
In order to estimate the definite integral value of a function F (t ) between the
time interval of t1 to t1 + T , Simpson’s rule is always chosen, it can be
formulated as :
t1 + T
3T
∫t F (t )dt ≈ 8(n − 1) [F (t1 ) + 3F (t2 ) + 3F (t3 ) + 2 F (t4 ) + ... + 3F (tn − 2 ) + 3F (tn −1 ) + F (tn )]
1
(1.3.1) [1]
1.4 Trapezoidal Rule
A simple method for the definite integral calculation of a function F (t ) between
the domain interval of t1 to t1 + T is trapezoidal rule which a lot of researchers
are rather not interested to use it because they do not trust that the linear
interpolation of trapezoidal rule can calculate accurate RMS values of periodic
signals. Generally trapezoidal rule can be formulated as :
t1 + T
∫ F (t )dt ≈ 2(n − 1) [F (t ) + 2F (t ) + 2F (t ) + ... + 2 F (t
T
1
2
3
n −1
) + F (tn )]
(1.4.1),
t1
where
n
is the data amount from collecting data of
F (t i )
where
ti = t1 + T (i − 1) /( n − 1) is the domain between t1 and t1 + T by running i from
1, 2, 3, …, n − 1 , n [4]. If trapezoidal rule is deployed to calculate RMS values,
data amount can be either odd or even number.
In this research, the created linear operator of
tn
t1 , n
T ( F (t )) will be the
representative of long summation of trapezoidal rule terms as :
1026
T ( F (t )) =
tn
t1 , n
Sompop Poomjan et al.
tn − t1
[F (t1 ) + 2 F (t2 ) + 2 F (t3 ) + ... + 2 F (tn −1 ) + F (tn )]
2(n − 1)
(1.4.2),
where n is the data amount size from collecting data of F (ti ) , where
ti = t1 + T (i − 1) /( n − 1) is the domain between t1 and t n by running i from 1, 2,
3, …, n − 1 , n . By using a mathematical estimation, when data amount is greater,
definite integral values calculated by trapezoidal rule will approach closely to
continuous definite integral values as :
tn
lim ( T ( F (t ))) = ∫ F (t )dt
n→∞
tn
t1 , n
(1.4.3)
t1
2 Experiments for Checking Accuracy of Definite integral
2π
Calculation of
∫ sin
2
(mt )dt by Using Trapezoidal Rule
0
2π
In order to discuss the result of
∫ sin
2
(mt )dt , m will be integers run from 1, 2,
0
3, … for consideration of the m th harmonic component signal of each periodic
signal between its period. The result of this integral value can be stated according
to basic Calculus as :
2π
∫ sin
2π
2
0
⎛ 1 − cos(2mt ) ⎞
(mt )dt = ∫ ⎜
⎟dt = π
2
⎠
0⎝
(2.0.1),
for m will be integers run from 1, 2, 3, …
Let
2π
0, n
T (sin 2 (mt )) =
π
2mπ
2m(n − 2)π
⎡ 2
⎤
sin (0) + 2 sin 2 (
) + ... + 2 sin 2 (
) + sin 2 (2mπ )⎥
⎢
(n − 1) ⎣
n −1
n −1
⎦
Accurate RMS calculations for periodic signals
1027
2π
be the integral value of
∫ sin
2
(mt )dt by using trapezoidal rule with data amount
0
of n.
2.1 Discussion on m = 1
2π
The integral value of
∫ sin
2
(t ) dt calculated by trapezoidal rule with starting the
0
least data amount of n = 4 is used (If n = 2 or 3 were selected, the summation
result would be equal to zero) for the experiment, results are stated as :
2π
0, 4
T (sin 2 (t )) =
2π
0,5
T (sin 2 (t )) =
2π
0,6
T (sin2 (t)) =
π
2π
4π
6π ⎤
⎡ 2
sin (0) + 2 sin 2 ( ) + 2 sin 2 ( ) + sin 2 ( ) ⎥ = π
⎢
3 ⎦
( 4 − 1) ⎣
3
3
π
2π
4π
6π
8π ⎤
⎡ 2
sin (0) + 2 sin 2 ( ) + 2 sin 2 ( ) + 2 sin 2 ( ) + sin 2 ( ) ⎥ = π
⎢
4 ⎦
(5 − 1) ⎣
4
4
4
π ⎡
2π
4π
6π
8π
10π ⎤
sin2 (0) + 2sin2 ( ) + 2sin2 ( ) + 2sin2 ( ) + 2sin2 ( ) + sin2 ( )⎥ = π
⎢
(6 −1) ⎣
5
5
5
5
5 ⎦
After running computer programs (such as Microsoft Excel 2007, MATLAB etc.)
to calculate
2π
0 ,n
T (sin 2 (t )) by using n ≥ 4, results of the calculations can still be
equal to π for all of n ≥ 4. Therefore, a simple equation of a trapezoidal rule
property can be stated as:
2π
0, n
2π
2( n − 2)π
2( n − 1)π ⎤
⎡ 2
sin (0) + 2 sin 2 (
) + ... + 2 sin 2 (
) + sin 2 (
) =π
⎢
n −1
n −1
n − 1 ⎥⎦
(n − 1) ⎣
(2.1.1),
T (sin 2 (t )) =
for n ≥ 4
π
1028
Sompop Poomjan et al.
2.2 Discussion on m = 2
2π
The integral value of
∫ sin
2
(2t ) dt calculated by trapezoidal rule with starting the
0
least data amount of n = 4, results are stated as :
2π
0, 4
T (sin 2 ( 2t )) =
2π
0,5
T (sin 2 ( 2t )) =
π
4π
8π
12π ⎤
⎡ 2
sin (0) + 2 sin 2 ( ) + 2 sin 2 ( ) + sin 2 (
) =π
⎢
( 4 − 1) ⎣
3
3
3 ⎥⎦
π
4π
8π
12π
16π ⎤
⎡ 2
sin (0) + 2 sin 2 ( ) + 2 sin 2 ( ) + 2 sin 2 (
) + sin 2 (
) =0
⎢
(5 − 1) ⎣
4
4
4
4 ⎥⎦
4π
8π
12π
16π
20π ⎤
sin2 (0) + 2sin2 ( ) + 2sin2 ( ) + 2sin2 ( ) + 2sin2 ( ) + sin2 (
) =π
⎢
(6 −1) ⎣
5
5
5
5
5 ⎥⎦
After using computer programs (such as Microsoft Excel 2007, MATLAB etc.) to
2π
0,6
T (sin2 (2t)) =
calculate
π ⎡
2π
0 ,n
T (sin 2 ( 2t )) by using n ≥ 4, results of the calculations cannot be
constant as π for all n ≥ 4, but they will become to π again when n ≥ 6 .
Therefore, the simple equation of a trapezoidal rule can be stated as :
4π
4( n − 2)π
4( n − 1)π ⎤
⎡ 2
sin (0) + 2 sin 2 (
) + ... + 2 sin 2 (
) + sin 2 (
) =π
⎢
n −1
n −1
n − 1 ⎥⎦
( n − 1) ⎣
(2.2.1), for n ≥ 6 .
2π
0, n
T (sin 2 ( 2t )) =
π
2.3 Discussion on m > 2
After the property of trapezoidal rule had been discovered for m = 1 and 2, a big
lot of trial runs were carried on to verify this property by many computer
programs for m > 2 until it was found that the least data amount ( n ) would
depend on m according to the following equation (2.3.1).
n = 2m + 2
(2.3.1)
Accurate RMS calculations for periodic signals
1029
Therefore, equation (2.2.1) can be improved to be equation (2.3.2) as :
2π
0, n
T (sin 2 ( mt )) =
π
2 mπ
2m( n − 2)π
⎡ 2
⎤
sin (0) + 2 sin 2 (
) + ... + 2 sin 2 (
) + sin 2 ( 2mπ ) ⎥ = π
⎢
n −1
n −1
( n − 1) ⎣
⎦
(2.3.2),
for n ≥ 2m + 2 , or
2π
0, 2 m + 2
T (sin 2 ( mt )) = π
(2.3.3)
3 Experiments for Checking Accuracy of Definite integral
Calculation of
2π
2π
2π
2π
0
0
0
0
2
∫ cos (mt )dt ,
∫ sin(mt )dt ,
∫ cos(mt )dt , ∫ sin(mt ) sin( pt )dt ,
2π
2π
2π
0
0
0
∫ cos(mt ) cos( pt )dt , ∫ sin( mt ) cos( pt )dt and ∫ cos(mt ) sin( pt )dt
by Using
Trapezoidal Rule
2π
As same as the trial runs of
∫ sin
2
(mt )dt , the definite integral values of
0
2π
2
∫ cos (mt )dt
2π
,
0
∫ sin(mt )dt
0
∫ cos(mt )dt
0
2π
2π
2π
0
0
0
∫ cos(mt ) cos( pt )dt ,
2π
2π
,
∫ sin( mt ) cos( pt )dt and
,
∫ sin(mt ) sin( pt )dt
,
0
∫ cos(mt ) sin( pt )dt
are equal to
integral values calculated by the method of Calculus when the appropriate data
amount is also n ≥ 2 m + 2 and m > p .
1030
Sompop Poomjan et al.
4 A Use of Trapezoidal Rule to Calculate RMS Values of Periodic
Signals Constructed from Fourier Series
From the equation (1.1.1), if the RMS value of f (t ) is required to be known, the
integral value of f 2 (t ) between its period will be finished successfully first. See
the calculation process below.
2π
∫
0
2π
f (t ) dt =
2
∫
[( a0 ) 2 + ( a1 cos t ) 2 + ( a2 cos 2t ) 2 + ... + ( aM cos( Mt )) 2 + (b1 sin t ) 2 + (b2 sin 2t ) 2
0
+ ... + (bM sin( Mt )) 2 + 2( a0 a1 cos t + ... + aM bM cos( Mt ) sin( Mt )
+ ... + bM −1bM sin(( M − 1)t ) sin( Mt ))]dt
Because all expanded terms are arranged to be able to calculate the definite
integral values by using trapezoidal rule according to the previous experiment,
therefore the definite integral sign can be changed to trapezoidal rule as:
2π
∫
f 2 (t ) dt = 0, 2 M 2+π2T ([(a0 ) 2 + ( a1 cos t ) 2 + ( a2 cos 2t ) 2 + ... + ( aM cos( Mt )) 2 + (b1 sin t ) 2 + (b2 sin 2t ) 2
0
+ ... + (bM sin( Mt )) 2 + 2( a0 a1 cos t + ... + aM bM cos( Mt ) sin( Mt )
+ ... + bM −1bM sin(( M − 1)t ) sin( Mt ))]
Thus, the definite integral of f 2 (t ) can be stated as :
2π
∫
f 2 (t ) dt = 0 , 2 M2+π2T ( f 2 (t ))
(4.0.1)
0
If the scale and the period are changed to any general periodic function, finally the
RMS value of equation (1.1.1) can be formulated as :
Accurate RMS calculations for periodic signals
f RMS =
1
T
t1 + T
∫
t1
f 2 (t )dt =
t1 + T
t1 , 2 M + 2
T ( f 2 (t ))
T
1031
(4.0.2)
5 A Demonstration of Using Trapezoidal Rule for RMS Value
A created periodic signal of g (t ) = 3.50 + 2.13 sin t + 3.48 cos 7t + 0.25 sin 10t
will be demonstrated to show accuracy of trapezoidal rule. See signal g (t ) in the
fig. 1.
Fig. 1 shows signal g (t ) with period of T = 2π .
From the Calculus integration technique, the RMS value of g (t ) is equal to
4.539262. If n = (10 × 2) + 2 = 22 is used for calculating RMS values by
trapezoidal rule and Simpson’s rule, errors from trapezoidal rule and from
Simpsons’ rule will be 0.000000 and -0.440116 respectively as in table 1.
1032
Sompop Poomjan et al.
Method
Trapezoidal Rule
Simpson's Rule
Data Amount (n)
22
22
RMS Value
4.539262
4.099146
Error
0.000000
-0.440116
Error Percentage (%)
0.000000
-10.736767
Table 1. shows performances of trapezoidal rule which can calculate RMS value
of
g (t ) = 3.50 + 2.13 sin t + 3.48 cos 7t + 0.25 sin 10t
more
accurately
than
Simpson’s rule.
7 Conclusion
An accurate RMS value of a periodic signal comprised of Fourier series can be
calculated by using the simple method of trapezoidal rule with the least data
amount ( n ) which can be determined from the highest harmonic order ( M ) of the
periodic signal according to n ≥ 2M + 2 . From the experiment, trapezoidal rule
was deployed to calculate accurate RMS values of periodic signals. The result of
the experiment indicates that trapezoidal rule can provide more accurate RMS
values than patented Simpson’s rule for periodic signals constructed from Fourier
series.
Accurate RMS calculations for periodic signals
1033
References
[1] Steven A. Lombardi, METHOD AND APPARATUS FOR PROCESSING A
SAMPLED WAVEFORM, United States Patent, Patent No. 5,828,983,
1998.
[2] Mihaela Albu and G. T. Heydt, On the Use of RMS Values in Power Quality
Assessment, IEEE Transactions on Power Delivery, 18(2003), 1586-1587.
[3] Andrzej Konstanty Muciek, A Method for Precise RMS Measurements of
Periodic Signals by Reconstruction Technique With Correction, IEEE
TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT,
56(2007), 513-516.
[4] N. Dharma Rao, M.E., and Prof. H. N. Ramachandra Rao, M.Sc., Solution of
transient-stability problems through the number-series approach, The
Proceedings of the Institution of Electrical Engineers, 111(1964), 775-788.
Received: September 9, 2013
Download