You are on page 1of 4

Term Paper Report on:

Microprocessor Implementation of a Fast and Simultaneous


Amplitude and Frequency Detector for Sinusoidal Signals
INTRODUCTION:
MEASUREMENT of amplitude and frequency of sinusoidal signals has many applications
in power systems in terms of automatic power amplitude gain and frequency control. In
many of these applications, transient conditions occur which make it necessary that the
measurement time interval be minimized.
Conventional techniques for frequency measurement involve counting clock pulses
during a relatively long fixed interval, which can only be as short as one period of the
signal to be measured. Alternating voltage measurement involves rectification of the
signal waveform followed by a filter; also in this case, the measurement time is at least
in the order of 1 s. As a consequence, conventional methods are not suitable for
measuring fast changes in the signal waveform.
If we assume that the waveform is mathematically well defined, as is the case of a
sinusoidal signal, then measurement can take place in a small fraction of a cycle. Some
methods were proposed recently (and for the amplitude measurement, for the
frequency measurement); however, most methods for fast amplitude detection were
restricted by a single input frequency or a narrow range of input frequencies. In the
method presented in this paper, three samples are taken of the waveform, which are
used to calculate both amplitude and frequency digitally. These samples are taken close
together within a fraction of a cycle. A microprocessor controls the computations,
measurement, and ranging circuitry, so that frequency range selection can be made
automatic.
v(t) = Vi sin(wt)
This signal is sampled at:
T=t1, t1+dt and t1+2dt
Vi = Unknown amplitude
W = Radial frequency
T= Time variable

The time interval between samples is dt.


V1 = Vi sin (wt,)
V2 = Vi sin (dt + wdt)
V3 = Vi sin (wt + 2wdt).
Substituting B for wt :
V3 = Vi sin (wt1) cos (2B) + Vi cos (wt1) sin (2B).
Substituting values for V1 and V2 gives
V3 = V1 cos (2B) + 2 (V2 - V1 cos (B)) cos (B).
The solution for cos (B) is
cos (B) = (V1 + V3)/2V2.
Now the above results are used to get the voltage equation :
Vi = [cosec ((V1 + V2)2 - 2(1 + cos (B)) V1*V2]1/2
Note that the three samples can be taken anywhere in the signal waveform; in our
calculation the value of t1 is eliminated. A certain amount of noise (ripple) is then
observed in the result. This noise is a function of the value of V2 within the dynamic
range of the analog-to-digital converter (ADC) and the spacing of the samples relative to
the period of the input signal.
It was experimentally confirmed that noise could dramatically increase for the values
V2 < 0.05 FS where FS = Full Scale value of the ADC.
If B is too small, then the samples are taken too close to each other, so that the
difference between them will be in the order of the quantization step size by the ADC.
This will also cause a large ripple in the output, hence, when the minimum delay is
chosen to be 6 percent of a cycle, then , Bmin = 0.13 rad, and if a frequency occurs so
that 3 is less then 0.13 rad, the sampling interval is increased.
HARDWARE DESCRIPTION
The hardware of the measurement system is designed around an 8085A
microprocessor. The system contains a 12-bit resolution ADC, with a 5-V range. The
256 bytes of RAM are for temporary data storage. Two output ports to two DACs
provide the equivalent signals for the calculated frequency and amplitude of the input
signals. The 8 kbytes EPROM contains look-up tables for the nonlinear functions used in
the computation in addition to the main program and the subroutines. The system
contains a 12 x 12-bit hardware multiplier (MPY112K) for fast multiplication.

SOFTWARE FLOW CHART

VALIDATION
In order to obtain an estimate of the impact of harmonics in the input signal, a
triangular signal was applied from a function generator to a variable bandwidth secondorder (Butterworth) low-pass filter and used the resulting signal as an input signal to
our measurement system.
Theoretical results were obtained by a digital computer simulation of the low-pass filter
and the measurement system. Fourier series expansion of the distorted sinusoid is used
to compute the ripple content in the amplitude and frequency outputs. Obviously the
difference between experimental and theoretical results is due to quantization effects.

CONCLUSION
A fast, simultaneous amplitude and frequency measurement system for low-frequency
sinusoidal signals has been described. The system has shown to provide results, albeit
with the limited accuracy, within a fraction of a cycle of the waveform to be measured.
The system can be developed further to handle waveforms with harmonic distortion; a
more powerful microprocessor can be designed into the system to do necessary
computations.

ANURAG B. SHAH | 711EE3073

You might also like