Power Measurements: Simulations and Measurement*

advertisement
Int. J. Engng Ed. Vol. 21, No. 1, pp. 26±32, 2005
Printed in Great Britain.
0949-149X/91 $3.00+0.00
# 2005 TEMPUS Publications.
Power Measurements: Simulations and
Measurement*
JACK DENTON
Purdue University, Department of Electrical and Computer Engineering Technology, West Lafayette,
IN 47907-2021, USA. E-mail: denton@purdue.edu
ELAINE COONEY
Department of Electrical and Computer Engineering Technology, Indiana University Purdue University
Indianapolis, Indianapolis, IN, USA
A laboratory exercise was developed employing RMS voltage and power measurements for nonstandard waveforms. The purpose was to educate the student in the method of RMS and power
measurement calculations beyond the common sinusoidal waveforms and to reinforce the practice
of `know your equipment'. The waveform used was a damped sinusoid and was implemented in a
LABVIEW VI developed for generating output voltage signals from input formulas using a data
acquisition module. The RMS measurements were investigated using MATLAB, oscilloscopes,
digital multi-meters and a second LABVIEW VI. The student analyzed the resulting data and a
discussion of various discrepancies ensued.
capabilities when used and understood properly. It
is human nature to become complacent with
measurements that are consistently correct in
repeated applications, especially so when only the
same or similar signals are used, such as with the
sinusoidal signals previously mentioned.
The prime components of the educational objective are to teach and reinforce the proper methods
to calculate and measure power and RMS
voltages. The use of various benchtop measurement instruments and analyzing the resulting data
reinforce these objectives. The large variation in
results due to the measurement methods and
algorithms built in to the instruments causes the
student to consider the proper measurement
methods. A key feature of this laboratory experiment is educating the student by highlighting
measurement discrepancies in such a way as to
show how approximations of the instrumentation
yield improper results and how proper analysis is
required for accurate data acquisition.
The lab experiment presented in this paper
starts with analytical RMS voltage and power
calculations of a complex signal using MATLAB,
setting a theoretical baseline for the data being
collected. The complex signal is generated by a
LabVIEW VI, which is experimentally measured
using benchtop digital multi-meters (DMMs) and
an oscilloscope on a load. The experimental data
of the oscilloscope is downloaded into a second
MATLAB program that computes the exact solution for the RMS voltage on the data. The
experiment continues with a second LabVIEW
VI that computes in real time the exact analytic
solution for average power and RMS voltage. All
results and discrepancies are collected and
discussed.
INTRODUCTION
ROOT MEAN SQUARE (RMS) measurement
and calculations are quite complex when one
begins to consider noise, phase, and accuracy of
the signal [1] or RMS power measurements [2].
Some basic methods of determining the RMS
current of a signal are the heat method, the
graph method, the multiply and sum method and
the math rule method [3±5]. The heat method
employs equating the heat generated in a resistor
from the unknown current and matching that heat
in a second resistor using a test DC current. The
remaining three methods are variations on a theme
by determining the RMS calculation using graphical techniques, A/D conversion, and analytical
mathematics. This paper uses analytical mathematical techniques.
Two common problems that arise during the
course of studying applied electrical engineering
are that the RMS value of any signal defaults to
0.7071 times the magnitude of the signal, and that
the results from laboratory measurement equipment are inviolate. The first problem stems from
the fact that all the waveforms used in the beginning level courses are purely sinusoidal signals,
which has an RMS value of 0.7071 times the
magnitude of the signal, and this gets extended to
all waveforms regardless of complexity. The
second problem exists due to human nature as
well as the nature of modern test equipment.
Modern test equipment is highly feature-laden
and, at the push of a function button, analysis
is automatically computed and displayed. The
equipment has excellent features and measurement
* Accepted 4 August 2004.
26
Power Measurements: Simulations and Measurements
27
Fig. 1. MATLAB script file to compute the RMS value of a user-defined function.
EXPERIMENT
The laboratory experiment started with the
calculation of the analytical RMS value of the
signal function using MATLAB. The mathematical equation of the waveform was analyzed for
theoretical RMS voltage and power using standard
mathematical techniques, which were implemented
using MATLAB. The equation to compute the
RMS value of a voltage waveform v…t† was [5],
s
…T
Vrms ˆ 1=T
v2 …t† dt
…1†
0
The voltage waveform used in this experiment (2)
was a damped sinusoidal function and was repeatedly outputted for a period of 0.5 seconds. The
output of the voltage waveform was implemented
using a LabVIEW VI on a data acquisition (DAQ)
module and will be described later.
v…t† ˆ 5eÿ10t cos…2100t†
…2†
The theoretical computation for the voltage waveform v…t† was implemented using the MATLAB
script file shown in Fig. 1. A skeleton script file was
available to the students, as they were novices in
MATLAB programming. They were required to
input the repetitive signal period and equation into
the provided MATLAB script file and add a final
line to calculate the power.
The computation from the MATLAB calculation yielded the theoretical RMS value of the
waveform, which was 1.1182 volts. Using this
result, the power delivered to a 1000
load was
calculated using (3) and was found to be 1.3 mW.
The results from all the methods were collected
and compared (Table 1).
Pˆ
2
VRMS
R
…3†
The next step was to generate the actual output
voltage waveform. The waveform, being nonstandard, could not be easily generated using an
arbitrary waveform generator or other conventional benchtop equipment. A VI from the
LabVIEW library was modified and redesigned
to generate a voltage waveform that was placed
on a 1000
load. The LabVIEW VI, called
`Formula_Wave.vi', generates a repetitive output
voltage from an inputted formula using a DAQ
(National Instruments Model 6040E). The
program `Formula_Wave.vi' is included, along
with a description of its operation. The front
panel with the outputted waveform is shown in
Fig. 2.
The RMS voltage was measured on the output
voltage waveform using the benchtop oscilloscope
and two different digital multi-meters and the
resulting power was calculated. Additionally, the
oscilloscope data was downloaded and analyzed
by a second MATLAB program that calculated
the RMS voltage and power values. The
MATLAB file required the student to enter the
period of the signal, the oscilloscope data file, and
a line to calculate the power. The MATLAB
program calculated the exact solution of the
RMS voltage as outlined in equation (1) using
numerical integration. The MATLAB script file
used to analyze the oscilloscope data is shown in
Fig. 3. Typical measured and calculated values are
shown in Table 1.
Table 1. Typical measurement data of VRMS and resulting power calculation
VRMS (volts)
Power (mW)
Error (%) from Theory
MATLAB
Theory
Oscilloscope
MATLAB
Data
DMM
#1
DMM
#2
1.118
1.249
0
3.060
9.360
273
1.123
1.300
0.5
0.150
0.022
98
0.873
0.760
28
28
J. Denton and E. Cooney
Fig. 2. Formula_Wave.vi front panel outputting v…t† ˆ 5eÿ10t cos…2100t†
Finally, another LABVIEW VI (Average_
Power_&_RMS_Voltage.vi) was developed to
measure and calculate the RMS voltage and average
power in real time and continuously from the VI
outputting the repetitive signal. A simultaneous
output and measurement was performed on the
load and a current sense resistor. The circuit setup
is shown in Fig. 4. The VI continuously calculated
the RMS voltage and average power and displayed
the result along with the signal. The formula used to
calculate the average power is indicated in equation
(4), where v(t) and i(t) are the instantaneous voltage
and current, respectively. A display of the front
panel for the `Average_Power_&_ RMS_Voltage.
Fig. 3. MATLAB script file to compute the RMS voltage and power from downloaded oscilloscope data.
Power Measurements: Simulations and Measurements
29
Fig. 4. DAQ (model #6040E) circuit connections used to simulate 1000
load for the `Average_Power_&_RMS_Voltage.vi'.
vi' with a single cycle of the measured waveform and
calculated data is shown in Fig. 5.
…T
v…t† i…t†dt
…4†
Pave ˆ 1=T
0
The circuit in Fig. 4 simulated a load of 1000
and introduced a sense resistor to determine the
current using differential voltage measurement
techniques. This prompted a discussion of the use
of a current sense resistor and differential measurements. The crux of the discussion for the current
sense resistor was to use a low-value resistance in
order not to unnecessarily perturb the signal or
drop too much voltage. Also, to ease measurement
and calculation, a value of 1 ohm proved useful.
Ohm's law is V ˆ IR, and for R ˆ 1
, this leaves
V ˆ I. Differential voltage measurements were
discussed in comparison to ground-referenced
measurements for improved accuracy and reduction
in noise.
The students analyzed the resulting RMS
voltages and power data for all the methods and
a discussion of various discrepancies was required.
The methods employed to measure or calculate
RMS voltage by the bench-top measurement
equipment was investigated and how its `assumptions' about signals can be problematic. The
resulting measured and calculated RMS voltages
data indicated that the MATLAB theoretical
Fig. 5. Average_Power_&_RMS_Voltage.vi front panel plotting the output for v…t† ˆ 5eÿ10t cos…2100t† and measuring the average
power and RMS voltage.
30
J. Denton and E. Cooney
calculation was the baseline for data comparison.
The two DMMs measured the voltage signal using
a `true RMS measurement'; however, it was found
that this was `true' only for sinusoidal signals.
DMM measurements on any other signal type
required the use of a `correction factor' (CF).
However, the typical CF presented in the DMM
operation manuals was for square, triangle and
ramp wave, and a note indicating that more
complex signals would require the user to determine the CF. The RMS voltage measurement
technique that the oscilloscope used was not
evident even from the manufacturer's instrument
manual, but was discovered to measure the RMS
value of the first peak encountered on the oscilloscope screen, regardless of repetition, damping or
other possible waveform complexities. It was also
determined that the oscilloscope took the RMS
value to be 0.7071 of the encountered peak, thus
again assuming a sinusoidal signal. The data waveform that the oscilloscope measured was downloaded into a MATLAB program that numerically
calculated the exact RMS solution on the data.
The resulting calculated data was only 0.5%
from the theoretical, indicating that the oscilloscope signal and data were correct, but the oscilloscope internal RMS function was limited in its
application.
LABVIEW VI
Two LABVIEW VIs were developed for this
laboratory experiment: one to create and output
a complex waveform from the DAQ 6040E card,
and the second to measure the power dissipated by
a component.
The program Formula_Wave.vi' (see Fig. 2) was
an adaptation of the VI `Formula Waveform
Example.vi' that was shipped as an example VI
with LabVIEW. The example VI allowed the user
to enter a formula, vary the frequency, amplitude,
and offset of the signal, and change the sample rate
and number of samples per waveform. It plotted
the resulting waveform. Added to this existing VI
was the code necessary to output the calculated
signal to the DAQ card, including calls to Analog
Output Configure (`AO Config.vi'), Analog
Output Write (`AO Write.vi'), Analog Output
Start (`AO Start.vi'), and Analog Output Clear
(`AO Clear.vi') (See Fig. 6). The `AO Start.vi' is
configured for continuous output, so the waveform output was repeated until the `Stop' button
was pressed on the front panel.
The other LabVIEW VI written for this project
is `Avg_Power_&_RMS _Voltage.vi'. The front
panel can be seen in Fig. 5, and the programming
diagram in Fig. 7. This VI used the analog input
Fig. 6. LabVIEW programming diagram for `Formula_Wave.vi'.
Power Measurements: Simulations and Measurements
31
Fig. 7. Programming diagram for `Avg_Power_&_RMS_voltage.vi'.
channels of the DAQ 6040E card in differential
mode to measure the voltage across the load, and
the voltage across a current sense resistor. The
voltages were formatted in arrays that contain
5000 samples. The load voltage waveform was
converted to a single RMS voltage value, using
the `Basic Averaged DC-RMS for 1 Chan.vi', and
displayed. The sense voltages were converted to
current by dividing by the `Sense Resistor in Ohms'
control value, which was set by the user before
running the VI. The current values were multiplied
by the load voltages to calculate the instantaneous
power. The load voltage, current, and instantaneous power were presented on a waveform graph.
The instantaneous power was then numerically
integrated over one set of samples, and divided
by the number of samples in the period. The result
was the average power over one set of 5000
samples. This process was repeated continuously
until the `Stop' button was pressed.
CONCLUSIONS
The laboratory experiment reintroduced the
concept of RMS voltage and power measurements
to the students, with the addition of utilizing a
complex non-standard waveform. The method of
comparing the widely deviating results of various
measurement instruments required the student to
evaluate the various methods of the instrumentation measurement methods and calculations. The
basic limitations of the instrumentation corresponded to the limitations that the student had
prior to the laboratory experiment. The learning
outcome objective of this laboratory experiment
was for signal waveform power measurements and
calculations, which was teamed with introducing
an engineering awareness of instrumentation
operation and limitations. Up to this point in the
students' experience, experimental procedure
would yield the same answers as theory. Of
course, the proper procedure and knowledge of
equipment operation will always yield the `correct'
answer, but the idea that the instruments can be
`wrong' comes a quite a surprise to the students.
This laboratory experiment highlighted the
importance of measurement and equipment knowledge by challenging the experience that the
students held previously. The students responded
with questions regarding the possibility of other
measurements being incorrect, such as oscilloscope
32
J. Denton and E. Cooney
FFT measurements performed in a previous
experiment. The students were challenged one
last time, with the question `How do you know
that the LabVIEW and MATLAB programs are
correct?' and who wrote them, how, and what
assumptions were made in the programs.
The use of MATLAB and LabVIEW was critical for the objectives of the laboratory experiments. It allowed the use of a complex nonstandard waveform that was essential to the lab
operation. It allowed for quick and accurate calculations. This alleviated, from the student viewpoint, the difficulty of calculations. The student
was allowed to reflect on the ramifications of the
problem.
This lab experiment can be adjusted for a variety
of objectives. The output could be a conventional
waveform (sine, square, triangle, etc.) and the
RMS voltage and power can be compared and
contrasted and CF calculated. The RMS measurements and calculations can be forced to be `incorrect' by changing the period of the repeating
waveform in the calculations and VIs, and the
erroneous results can be compared to the correct.
Noise can easily be added to the LabVIEW analysis, and the resulting effects can be analyzed.
REFERENCES
1. C. Thomsen and S. Shearman, For RMS measurements, accuracy depends on speed and noise, R&D
Magazine (retrieved 10 September 2003 from: http://www.rdmag.com/features/0202ni16.asp).
2. E. Persson, Making and interpreting power measurements on arc lamps and ballasts, Application
Notes, Nicollet Technologies Corp., 2002 RadTech Proceedings (2000) (retrieved 10 September 2003
from: http://www.nictec.com/articles/articles-list.html).
3. D. Lancaster, Tech musings, May 1997 (1997) (retrieved 9 September 2003 from www.tinaja.com).
4. W. E. Ott, A new technique of thermal RMS measurement, IEEE Journal of Solid-State Circuits,
9(6) (1974), pp. 374±380.
5. W. H. Hayt, Jr., and J. E. Kemmerly, Engineering Circuit Analysis, third edition, McGraw-Hill, New
York (1978), pp. 342±352.
John Denton is an Associate Professor in Electrical and Computer Engineering Technology
in the Purdue University, School of Technology in West Lafayette, Indiana. He received his
Ph.D. in Electrical Engineering from Purdue University in 1995. His areas of interest and
expertise are analog electronics, RF electronics and electronic materials.
Elaine Cooney is an Associate Professor in Electrical and Computer Engineering Technology at the Purdue School of Engineering & Technology at Indiana University Purdue
University Indianapolis. She received her B.S.E.E. from General Motors Institute and
M.S.E.E. from Purdue University in West Lafayette. Her areas of expertise include analog
electronics, electronics manufacturing and test engineering. Professor Cooney's current
research interests include laboratory instrumentation and control, both in the local and
remote teaching environments.
Download