A Microcontroller-Based Variable Voltage Variable Frequency Sinusoidal Power Source With A Novel PWM Generation Strategy
A Microcontroller-Based Variable Voltage Variable Frequency Sinusoidal Power Source With A Novel PWM Generation Strategy
Measurement
journal homepage: www.elsevier.com/locate/measurement
a r t i c l e i n f o a b s t r a c t
Article history: The present paper describes the development of a low cost, microcontroller-based variable
Received 22 April 2011 voltage variable frequency sinusoidal power source, which is the demand of the day for
Received in revised form 12 August 2011 various applications. The power source is developed using MOSFET H-bridge inverter
Accepted 26 September 2011
and with a stand alone LCD display system. The design methodology proposes to utilize
Available online 12 October 2011
a novel concept of generating sinusoidal pulse width modulation signals for the driver cir-
cuit of the inverter. The system proposes to incorporate a ROM-based LUT within the
Keywords:
power source itself for the sinusoidal signal generation with enhanced stability. This low
Variable voltage variable frequency power
source
cost, yet accurate power source has been successfully developed for wide range of voltage
Sinusoidal pulse width modulation commands (30–80 V rms) and frequency commands (40–70 Hz), and their real-life perfor-
Microcontroller mances in voltage wave generation were also found to be quite satisfactory.
MOSFET H-bridge inverter Ó 2011 Elsevier Ltd. All rights reserved.
LCD display
0263-2241/$ - see front matter Ó 2011 Elsevier Ltd. All rights reserved.
doi:10.1016/j.measurement.2011.09.024
60 P.K. Sadhu et al. / Measurement 45 (2012) 59–67
Variable Voltage
230V Opto-isolated Isolation
MOSFET H-bridge Filter Variable Frequency
50Hz Variable DC Source Transformer
AC Output
Stepdown
High-side/Low-
Microcontroller- Transformer and
side Driver
based Voltage Rectifier
Frequency
Control
Fig. 1. The overall block diagram of the VVVF power source developed.
using two-level inverter topology. In recent times, effective details the driver circuit design, Section 6 details the power
instantaneous frequency estimation schemes for a single supply circuit design and Section 7 details the protection
sinusoid [13,14] and for multiple sinusoids have also been circuit design. The performance evaluation is presented in
proposed. In [14], a scheme has been proposed for a porta- Section 8. Conclusions are presented in Section 9.
ble DSP-based instrumentation system where the fre-
quency estimation is carried out on the basis of four
equal spaced samples. However, developments of such fre-
quency estimators are known to be sensitive to deviation
in sampling rate and quantization noise. In [15], an effec-
tive scheme for estimation of quantized multiple sinusoids
was proposed using an iterative approach for optimization
of a nonlinear cost function. However, this efficient scheme
was developed in simulation only, and no real-life imple-
mentation was presented.
The present work describes the development of a
microcontroller-based single phase VVVF sinusoidal power
source employing MOSFET H-bridge inverter. The pro-
posed scheme uses a novel concept of generating suitable
PWM signals, called sinusoidal pulse width modulation
(SPWM) technique, where constant amplitude pulses are
generated with different duty cycles for each period. The
widths of these pulses are suitably modulated to obtain in-
verter output. The scheme is so designed that a read only
memory (ROM)-based look-up table (LUT) is embedded
within the power source itself for the sinusoidal signal
generation within the power source itself. This method of-
fers several advantages such as improved stability and
high-performance control over the generated sinusoidal
signal. The scheme uses two microcontrollers where one
microcontroller is used to generate the proposed variable
frequency sine wave PWM drive and the other microcon-
troller is used for controlling the stand alone LCD display
of the developed real power source. The developed scheme
has been successfully employed for an ac voltage range of
0–100 V rms and a frequency range of 40–70 Hz. The util-
ity of the developed system is aptly demonstrated by cal-
culating the desired performance in terms of total
harmonic distortion (THD) over a wide range of desired
commands.
The rest of the manuscript is organized as follows.
Section 2 describes the overall proposed VVVF power source.
Section 3 details the power circuit design, Section 4 details Fig. 2. An actual photograph of the power source: (a) uncovered view and
the control circuit and display circuit design, Section 5 (b) encased view.
P.K. Sadhu et al. / Measurement 45 (2012) 59–67 61
+5V
Voltage
control
P 7805 +5V
230V +
9V +
50Hz
N
+
Choke + Variable DC
output
-
In5408
4A/800V
+5V
+5V
Offset
adjustment AN0 CCP1 PWM outputs to High-
CCP2 side/Low-side driver
18F2520
8-bit Frequency data
Port B from Display Interface
10 MHz
+5V
From Stepdown
Transformer and
+5V Rectifier
Output Voltage
Frequency Display Scale-factor
AN0 AN1
Control Adjustment
18F2520
2. PIC microcontroller-based variable voltage variable Fig. 3a shows the detailed voltage controller system
frequency (VVVF) power source developed, and Fig. 3b shows the opto-isolated variable
DC source developed which uses its input from the voltage
Fig. 1 shows the overall block diagram of the power controller and provides its output as an input to the MOSFET
source developed, and Fig. 2 shows an actual photograph H-bridge. The scheme employs phase control methodology
of the equipment. The overall instrument comprises design for the Triac firing scheme. The main contribution of this cir-
of five salient blocks: (i) power circuit, (ii) control circuit and cuit module is to provide a design controlled firing delay
display circuit, (iii) driver circuit, (iv) power supply circuit from zero crossing (delayt) calculated as:
and (v) protection circuit. In Fig. 1, the fixed voltage, fixed
frequency (FVFF) ac voltage from the mains is applied to delayt ¼ 10 mS ðK 0 þ K 1 voltage control
a voltage regulator. The regulator is connected with a feed K 2 feed forward signalÞ ð1Þ
forward compensator to maintain the voltage at a desired
level, and then, this voltage is rectified, using a full wave Hence, the firing delay varies as a linear weighted combi-
bridge rectifier, to produce a dc voltage. A MOSFET nation of the voltage control signal and the feed forward
H-bridge inverter, comprising four MOSFETS, is employed signal. Here, K0 determines the minimum output voltage,
to convert this dc voltage into ac again. This conversion i.e., the offset in the firing delay in absence of any voltage
of ac to dc and then dc to ac again is required because it control and feed forward signal. Similarly, K1 influences
is easier to exercise control over dc than ac. The desired the required span of output voltage variation, and K2 influ-
variable frequency is generated by developing a microcon- ences the amount of compensation required.
troller-based system [9] that outputs variable frequency
sine wave PWM drive for the driver circuit of the inverter. 3. The power circuit design
Another microcontroller-based system is developed to dis-
play the output voltage and frequency generated by the A detail schematic description of the power circuit is
power source. The scheme also employs a power supply given in Fig. 4. Here, the FVFF ac power at 230 V, 50 Hz is
circuit which is necessary for providing the initial voltage applied to the voltage regulator with feed forward com-
to the chips and the microcontrollers. pensator such that the output voltage can be controlled
+5V
4.7K /0.25W
+5V
From Output of Control Circuit
Display contrast
4.7K adjustment
11 11 2 3 potentiometer
12 12 (Preset)
16×2 LCD
13 13 Display
14 14 JHD162A 15 +5V
15 6
16 4 5 1 16
at any desired level within the range 0–150 V, in steps of MOSFET. When the driver circuit sends pulse to a particu-
1 V, by a simple resistance potentiometer. The output from lar MOSFET, it immediately turns ON, and when the pulse
the regulator is applied to the full wave bridge rectifier is withdrawn, the MOSFET is turned OFF. This sequence of
through an inductor (i.e. a choke coil) to limit the current switching is so designed that, at a particular switching in-
during switching. The rectifier performs the dc conversion, stant, a pair of MOSFETs (say MOSFET1 and MOSFET4) is in
and at the output, a high value capacitor is connected to ON condition and the other pair (MOSFET2 and MOSFET3)
obtain a smooth, ripple free, dc output. A bleeder resis- is in OFF condition. In the next switching instant, just the
tance is connected in parallel to provide a discharge path reverse happens, i.e., MOSFET2 and MOSFET3 are turned
for the capacitor during off conditions. ON and MOSFET1 and MOSFET4 are turned OFF. Here, each
The output from the rectifier is applied across a MOSFET MOSFET is protected by an R-C snubber circuit. The VVVF
H-bridge inverter, where four n-channel enhancement output from the power source is obtained by tapping the
type MOSFETs are connected in H shape. The switching AC output from the MOSFET H-bridge inverter through
of these MOSFETs is controlled by the driver circuit. The an isolation transformer, which is equipped with a filter
driver circuit sends pulse to the gate and source of each bank in its secondary side.
+5V +12V
100µF/35V
0.1µF/30V
Disc
UF4007
G1
UF4007
0.5 µF/30V
10µF/
18V/1W
Zener
Disc
1 35V
S1
IR2110
From Output of Control Circuit & Display Circuit
0.5µF/30V
Disc
2 10µF/
35V UF4007
G2
10 /0.25W
S2
+5V +12V
100µF/35V
0.1µF/30V
Disc
UF4007
10 /0.25W
G3
UF4007 0.25
0.5µF/30V
18V/1W
10µF/
Zener
Disc
3 35V
0.25
S3
IR2110
0.5µF/30V
Disc
4 10µF/
35V UF4007
G4
2N2222
From 0.25W
S4
Protection Circuit
Shut Down
0.25W
2N2222
+5V
0.25W
4. The control circuit and display circuit design half cycle. The novelty of this module designed lies in
providing an offset to the generation of a sinusoidal voltage
This part of the circuit basically comprises a control step value as a function of the PWM duty cycle look-up
circuit and a display circuit. table (LUT). This offset is instrumental in minimizing the
total harmonic distortion (THD) of the sinusoidal output
due to a finite ON/OFF time of MOSFET switching devices
4.1. Control circuit for a given PWM carrier frequency. A higher offset is re-
quired for higher PWM carrier frequency for a given THD
The design of the control circuit is achieved by using and vice versa. Hence, in this work, it is proposed to calcu-
two PIC18F2520 [10] microcontrollers: one, for managing late the working PWM duty cycle (DPWM_W), for a given
the analog frequency input and the display and the other, step, as:
for production of the PWM pulse. Figs. 5a and 5b show
the two PIC 18F2520 microcontroller-based circuits indi-
DPWM W ¼ Offset þ ðDPWM ðDPWM P ð2 OffsetÞÞ=DPWM P Þ
vidually, which are employed for microcontroller-based ð2Þ
PWM drive and microcontroller-based user interface de-
sign and development, respectively. In the microcontrol- where DPWM P is the peak duty cycle corresponding to the
ler-based PWM drive module designed, CCP1 and CCP2 peak of the sinusoidal voltage. This is selected as less than
are utilized to provide PWM outputs to high-side/low-side 100% to cope with the problem of finite OFF-time of MOS-
driver. Specifically, CCP1 generates the PWM firing signal FET switching devices.
with 64 steps for the positive half cycle, and CCP2 gener- In the overall control circuit, the desired analog fre-
ates the PWM firing signal with 64 steps for the negative quency is input by a resistance potentiometer, and this
Wattmeter
P.C.
Variable Voltage
AC Supply Variable C.C. N1 N2 Vrms V av
230V,50Hz Frequency
Power Source A
Lloyd-Fisher
Magnetic
Square
information is converted to its digital form by using an 5. The driver circuit design
ADC, as shown in Fig. 5b. This digital frequency control
information is transmitted to the other microcontroller, The driver circuit designed is shown in detail in Fig. 7. It
shown in Fig. 5a, that produces the desired PWM pulse is designed to receive input signal from the logic circuit
according to this digital frequency control, which is then and to produce suitable drives for the MOSFETs connected
transmitted to the logic circuit. The microcontroller in in the H-bridge inverter. This driver circuit is designed
Fig. 5b, which is interfaced with the LCD display, receives utilizing the popular chip IR 2110 [11] which has the fol-
a feedback from the ac output of the power circuit, in a re- lowing features:
duced dc form (obtained using a step down transformer
and a half wave rectifier), for display in the display circuit. (i) gate drive supply ranges from 10 V to 20 V,
(ii) under voltage lockout for both channels,
4.2. Display circuit (iii) matched propagation delay for both channels to
simplify use in high frequency applications,
The display circuit comprises JHD162A, a 16 charac- (iv) the outputs produced are in phase with the inputs,
ter 2 row display chip [12]. Fig. 6 shows this circuit used (v) can drive independently high- and low-side refer-
here for display of output ac voltage and frequency. enced output channels,
Fig. 11. DC output vs. line voltage variation for different voltage settings with feed forward compensation. (a) Captured waveform at 150 V (peak to peak)
and 40 Hz, (b) captured waveform at 150 V (peak to peak) and 50 Hz, (c) captured waveform at 150 V (peak to peak) and 60 Hz, (d) captured waveform at
150 V (peak to peak) and 70 Hz, (e) captured waveform at 200 V (peak to peak) and 40 Hz, (f) captured waveform at 200 V (peak to peak) and 50 Hz, (g)
captured waveform at 200 V (peak to peak) and 60 Hz, (h) captured waveform at 200 V (peak to peak) and 70 Hz.
66 P.K. Sadhu et al. / Measurement 45 (2012) 59–67
Fig. 11 (continued)
(vi) the floating channel can be used to drive an N-chan- circuit. Due to this heavy current flow, the protection cir-
nel power MOSFET in the high-side configuration cuit will generate a signal that will be transmitted to the
which operates up to 500 V. shut down fault point of the driver circuit. Then, the driver
circuit will immediately deactivate the drives of the
In IR 2110, the output follows the input signal when the MOSFETs of the power circuit. Fig. 9 shows this protection
shut down signal is low, but the output will be low if the circuit designed.
shut down signal is high.
8. Experimental results
6. Power supply circuit design
The performance of the designed variable voltage
The scheme also utilizes a suitable power supply circuit
variable frequency (VVVF) sinusoidal power source is
that is designed to provide the operating dc power to the
evaluated by utilizing it for a nonlinear load where the
microcontrollers, driver chips, the display chip, op-amps,
source is utilized for Lloyd-Fisher square-based iron-loss
etc. Here, a step down transformer receives the ac power
measurement of magnetic specimens and separation of
from the supply mains and reduces the voltage level. This
iron losses into hysteresis and eddy current losses, utilizing
reduced voltage is rectified by a center tap full wave recti-
wattmeter method. The experimental set up is shown in
fier to obtain dc which is then passed through two dc reg-
Fig. 10. The arrangement is utilized for a voltage range of
ulators, connected in cascade, to obtain both +12 V and
(30–80 V rms) and for a frequency range of 40–70 Hz.
+5 V dc power supply. The circuit is developed using elec-
The figure of merit employed to quantitatively calculate
trolytic capacitors to obtain smooth and ripple free dc
the performance of the system developed is the well-
power supply. This dc power is made available through
known performance index of total harmonic distortion
3-pin relimate connector. Fig. 8 shows the schematic of
(THD). The analysis is carried out where several real-life
this power supply circuit designed.
waveforms are generated under different specified, desired
voltage and frequency commands. The qualities of those
7. Protection circuit design generated waveforms are evaluated by calculating the
THD. The manufacturers and models of the instruments
A protection circuit is designed to protect the main cir- employed in the measurement circuit to carry out these
cuit from several types of fault conditions, namely short experimentations include digital oscilloscope from Agilent
circuit fault, over load fault and over current fault. During Technologies. Fig. 11 shows some sample, generated wave-
fault condition, heavy current will flow through the power forms of the VVVF sinusoidal power source, captured using
P.K. Sadhu et al. / Measurement 45 (2012) 59–67 67
Table 1 and frequency over their respective wide ranges. This pro-
Sample THD evaluations for the power source designed. vides a simple, accurate, easy in operation power source
Sl. no. RMS voltage output (V) Frequency (Hz) THD (%) which is a low cost solution compared to the standard,
1 74.6 50.57 8.8 off-the-self products readily available in the market. Some
2 69.4 44.40 2.8 of the commercially available products include those avail-
3 77.1 53.62 4.0 able from AgilentÒ [16] (6811B AC Power Source/Power
4 77.7 59.42 3.5 Analyzer), California Instruments [17] (251 TL), etc. How-
5 90.2 64.30 3.7
6 90.3 69.20 3.2
ever, each such instrument is a high end equipment that
7 77.9 54.53 2.9 is highly expensive and may not be affordable for people
8 88.1 68.24 3.4 in the research communities or in small industries, purely
9 83.2 65.27 6.2 from the economic point of view. One of the main objec-
10 82.2 65.03 5.6
tives of the present work is to offer them a readymade
11 75.6 50.58 9.0
12 64.9 45.67 5.1 solution, at a much cheaper price. The scheme has been
13 59.0 40.73 3.7 presently developed for generation of single phase ac volt-
14 76.3 50.50 3.5 ages. The future scope of work will concentrate on devel-
15 86.1 60.39 6.3 opment of similar power sources for generation of three
phase voltages.