0% found this document useful (0 votes)
23 views45 pages

Pro Power Factor

Automatic power factor correction devices are useful for improving the efficient transmission of active power in electrical systems. When inductive loads are connected, the power factor lags and electric suppliers may charge penalties if it drops below 0.97. Microcontroller-based automatic power factor correction systems can control capacitor banks to maintain the power factor within limits by measuring line voltage and current. This improves system efficiency by reducing power losses and equipment heating while allowing additional loads to be connected without overloading components. The project aims to design a PIC microcontroller-based power factor controller to enable single-phase capacitor banks to follow load changes and maintain an optimal power factor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views45 pages

Pro Power Factor

Automatic power factor correction devices are useful for improving the efficient transmission of active power in electrical systems. When inductive loads are connected, the power factor lags and electric suppliers may charge penalties if it drops below 0.97. Microcontroller-based automatic power factor correction systems can control capacitor banks to maintain the power factor within limits by measuring line voltage and current. This improves system efficiency by reducing power losses and equipment heating while allowing additional loads to be connected without overloading components. The project aims to design a PIC microcontroller-based power factor controller to enable single-phase capacitor banks to follow load changes and maintain an optimal power factor.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Automatic Power Factor Correction

CHAPTER- 1

INTRODUCTION
Power factor is the ratio of true power or watts to apparent power or volt-amps.They are
identical only when current and voltage are in phase then the power factor is 1.0. The power
in an ac circuit is very seldom equal to the direct product of the volts and amperes. In order to
find the power of a single phase ac circuit, the product of volts and amperes must be
multiplied by the power factor. Ammeters and voltmeters indicate the effective value of amps
and volts.

The Automatic Power factor Correction device is a very useful device for improving efficient
transmission of active power. If the consumer connect inductive load, then the power factor
lags, when the power factor goes below 0.97(lag) then the Electric supply company charge
penalty to the consumer. So it is essential to maintain the Power factor below with in a limit.
Automatic Power factor correction device reads the power factor from line voltage and line
current, calculating the compensation requirement switch on different capacitor banks.

The advantages of using the microcontroller is the reduction of the cost and also the use of
extra hardware such as the use of timer RAM and ROM can be avoided. This technology is
very fast so controlling of multiple parameters is possible; also the parameters are field
programmable by the user.

The project titled “Automatic Power Factor Correction” was developed to enable operation
single phase capacitor bank to control follow load change. The operation of present single
phase capacitor bank was not able to operate base of current change according the increase or
reduction load. Because the present system could not detect load rating that changed, the
operation inefficient and power factor correction not be optimum.

The power factor is expressed in decimal or percentage. Thus power factors of 0.8 are the
same as 80 percent. Low power factor is usually associated with motors and transformers. An
incandescent bulb would have a power factor of close to 1.0. With low power factor loads, the
current flowing through electrical system components is higher than necessary to do the
required work. These results, in excess heating, can damage or shorten the life of equipment.

Disadvantages of Low Power Factor


1. Increased authorities cost since more current has to be transmitted,and this cost is directly
billed to consumers on maximum demand kVA systems.
2. Causes overloaded generators, transformers and distribution lines within a plant, resulting
in greater voltage drops and power losses, all representing waste, inefficiency and needless
wear and tear on industrial electrical equipment.

AAiT SECE Page 1


Automatic Power Factor Correction

3. Reduces load handling capability of the plants electrical system.Most electrical supply
authorities have changed to kVA demand systems from the inefficient kW demand system.
Consumers are now billed and penalized for their inefficient systems according to the
apparent power being used. In future, consumers will be penalized for plants with PF below
predetermined value.

Improving Power Factor


The most practical and economic power factor improvement device is the capacitor.As stated
previously, all inductive loads produce inductive reactive power (lagging by a phase angle of
90°).Capacitors on the other hand produce capacitive reactive power,which is the exact
opposite of inductive reactive power. In this instance, the current peak occurs before the
voltage peak, leading bya phase angle of 90°. By careful selection of capacitance required, itis
possible totally cancel out the inductive reactive power whenplaced in circuit together.

Fig 1.1: power factor improvement


Cosϕ1 is the kVA used before Power Factor Improvement equipmentwas added to the
network.
Cosϕ2 is the kVA used after Power Factor improvement equipmentwas added to the network.

To prevent the continual flow of reactive current back and forthbetween the load and power
station, a capacitor, which is in effect areactive current storage device, is connected in parallel
with the load.The reactive current supplied by the power station and used for themagnetic
force when the load is switched on does not now return tothe power station but instead flows
into the capacitor and merelycirculates between the latter and the load. Consequently the
distributionlines from the power station are relieved of the reactive current.Capacitors can
therefore be utilized to reduce kVA and electricalcosts.
Improved power factor results in:
1. Reduced kVA charges
2. Improved plant efficiency
3. Additional loads can be added to the system
4. Reduced overloading of cables, transformers,switchgear, etc.
5. Improved starting torque of motors
6. Reduce fuel requirements to generate power due to lower losses.

AAiT SECE Page 2


Automatic Power Factor Correction

1.1Statement of theProblem

In an electric power system, aload with a low power factor draws more current than a load for
the with a high power factor for the same amount of useful power transferred. The higher
currents increase the energy lost in the distribution system, and require larger wires and other
equipment. Because of the cost of larger equipment and waste energy, electrical utilities will
usually charge a higher cost to industrial or commercial customers where there is a low power
factor. Aload with power factor of 1.0 result in the most efficient loading of the supply and a
load with PF of less than pre-set value will result loss in power system.

1.2Objective

Power factor correction (PFC) is a technique of counteracting the undesirable effects of


electric loads that create a power factor that is less than one. Power factor correction may be
applied either by an electrical power transmission utility to improve the stability and
efficiency of the transmission network or correction may be installed by individual electrical
customers to reduce the costs charged to them by their electricity supplier. This thesis defines
the PIC (programmable interface controller) based power factor controller and various aspect
of PIC (programmable interface controller) based power factor controller. The main core of
this work is to design a PIC (programmable interface controller) based power factor
controller. This system will be able to control the power factor of linear load.

1.3 Scope of the project

In order to achieve this project objective, the following scopes has been covered:
 Single phase capacitor bank (220V, 50Hz).
 This project will also apply microcontroller Peripheral Interface Controller PIC18F458
by using programming language C.
 This project has been developed to construct capacitor bank control by changing load
current.

AAiT SECE Page 3


Automatic Power Factor Correction

Chapter-2

Project methodologies

We have single phase lines of 220V, 50 Hz that can be supplied to the load. But the
microcontrollers we have used take a small value of analog quantity. So, we use current
transformer(CT) and voltage transformer (VT) to measure and reduce the current and voltage
respectively. To improve and control the power factor we have to use the bank of capacitors
which are connected in parallel with varying load. These capacitors are connected
to/disconnected from the system by using Relays as switch which are controlled by
microcontroller. The overall system requires only one PIC chip, a few power electronic
component components and a bank of capacitor.

AAiT SECE Page 4


Automatic Power Factor Correction

CHAPTER-3

LITERATURE REVIEW

3.1Power FactorDefinition

For a DC circuit the power is P =VI and this relationship also holds for the instantaneous
power in an AC circuit. However, the average power in an AC circuit expressed in terms of
the rms voltage and current is

= ∅eq.3.1
Where, ∅is the phase angle between the voltage and current and the additional term is called
the power factor. Power factor triangle is shown in figure 3.1.

Z
=
X

Φ
R

Fig 3.1: power factor triangle

From the phasor diagram for AC impedance, it can be seen that the power factor is R/Z. For a
purely resistive AC circuit, R/Z and the power factor = 1.

3.2 Instantaneous Power

As in DC circuits, the instantaneous electric power in an AC circuit is given by P= VI where


V and I are the instantaneous voltage and current. The instantaneous voltage and current is
shown in figure 3.2.
Since
= sin & = sin( − ) eq.3.2

AAiT SECE Page 5


Automatic Power Factor Correction

Fig3.2: instantaneous voltage and current


Then the instantaneous power at any time t can be expressed as
= sin sin − eq.3.3

After using trigonometric identity:


sin( − ) = sin cos − cos sin eq.3. 4
the power becomes:
= cos − sin sin cos eq.3.5
Averaging this power over a complete cycle gives the average power.

3.3Average Power
Normally the average power is the power of interest in AC circuits.
= cos − sin sin cos eq.3.6
Since the expression for the instantaneous power is a continuously varying one with time, the
average must be obtained by integration.Averaging over one period T of the sinusoidal
function will give the average power. The second term in the power expression above
averages to zero since it is an odd function of t, theaverage of the first term is given by

= cos = cos eq.3.7

Since the rms voltage and current are given by


= …………………………………………eq.3.8

= ………………………………………….eq.3.9

The average power can be expressed as
= cos eq.3.10

Average Power Integral


Finding the value of the average power for sinusoidal voltages involves the integral

= cos = cos
2

The period T of the sinusoid is related to the angular frequency w and angle ‘∅’ by
2
=

AAiT SECE Page 6


Automatic Power Factor Correction

=2

= eq.3.11

Using these relationships, the integral above can be recast in the form:
∫ = 1/2 eq.3.12

3.4 Phase and Phasor


hasor Diagram
When capacitors or inductors are involved in an AC circuit, circuit, the current and voltage do
notpeak at the same time. The fraction of a period
period difference between the peaks expressed in
degrees is said to be the phase difference.
difference The phase difference is<= 90 degrees. It is
customary to use the angle by which the voltage leads the current. This leads to a positive
phase
se for inductive circuits since current lags the voltage in an inductive circuit. The phase is
negative for a capacitive circuit since the current leads the voltage. The phase relation is often
depicted graphically
ly in a phasor diagram.

Fig 3.3: phase diagram


Phasor Diagrams
The reference for zero phase is taken to be the positive
po x-axis
axis and is associated with the
resistor since voltage and current are in phase.
se. The length of the phasor is proportional to the
magnitude de of the quantity represented, and its angle represents its phase
ase relative to that of the
current though the resistor.
sistor. The phasor diagram for the RLC series current shows in figure 3.4

Fig3.4: Phasor diagrams for the relationships between


between current and voltage in (a) the resistor,
(b) the inductor, and (c) the capacitor, of a series RLC circuit.

AC response of Inductor,
nductor, Capacitor and Resistor

AAiT SECE Page 7


Automatic Power Factor Correction

Inductor
An inductor with AC supply and Phasor diagram which shows the phase angle between
current and voltage are shown in figure 3.5. In case of inductor voltage lead current by 90°.
The voltage across an inductor leads the current because the Lenz’ law behavior resists the
buildup of the current, and it takes a finite time for an imposed voltage to force the buildup of
current to its maximum.

Fig 3.5: inductor and its phase diagram

Capacitor
A capacitor with AC supply and phasor diagram which shows the phase angle between
current and voltage are shown in fig 1.6. In case of capacitor voltage lag current by 900. The
voltage across a capacitor lags the current because the current must flow to build up charge,
and the voltage is proportional to that charge which is built up on the capacitor plates.

AAiT SECE Page 8


Automatic Power Factor Correction

Fig 3.6: capacitor and its phasor diagram


Resistor
A resistor with AC supply and phasor diagram which shows the phase angle between voltage
and current are shown in fig 3.7. For ordinary currents and frequencies, the behavior of a
resistor is that of a dissipative element which converts electrical energy into heat. It is
independent of the direction of current flow and independent of the frequency. So we say that
the AC impedance of a resistor is the same as its DC resistance.

Fig 3.7: Resistor and its phase diagram

AAiT SECE Page 9


Automatic Power Factor Correction

3.5 Needs of Power Factor Controller


Power factor correction (PFC) is a technique of counteracting the undesirable effects of
electric loads that create a power factor that is less than one. Power factor correction may be
applied either by an electrical power transmission utility to improve the stability andefficiency
of the transmission network or correction may be installed by individual electrical customers
to reduce the costs charged to them by their electricity supplier.

Description
An electrical load that operates on alternating current requires apparent power, which consists
of real power plus reactive power. Real power is the power actually consumed by the load.
Reactive power is repeatedly demanded by the load and returned to the power source, and it is
the cyclical effect that occurs when alternating current passes through a load that contains a
reactive component. The presence of reactive power causes the real power to be less than the
apparent power, and so, the electric load has a power factor of less than 1.
The reactive power increases the current flowing between the power source and the load,
which increases the power losses through transmission and distribution lines. This results in
operational and financial losses for power companies. Therefore, power companies require
their customers, especially those with large loads, to maintain their power factors above a
specified amount (usually 0.90 or higher) or be subject to additional charges. Electrical
engineers involved with the generation, Transmission, distribution and consumption of
electrical power have an interest in the power factor of loads because power factors affect
efficiencies and costs for both the electrical power industry and the consumer’s. In addition to
the increased operating costs, reactive power can require the use of wiring, switches, circuit
breakers, transformers and transmission lines with higher current capacities.

Power factor correction attempts to adjust the power factor of an AC load or an AC power
transmission system to unity (1.0) through various methods. Simple methods include
switching in or out banks of capacitors or inductors which act to cancel the inductive or
capacitive effects of the load, respectively. For example, the inductive effect of motor loads
may be offset by locally connected capacitors. It is also possible to effect power factor
correction with an unloaded synchronous motor connected across the supply. The power
factor of the motor is varied by adjusting the field excitation and can be made to behave like a
capacitor when over excited.

Non-linear loads create harmonic currents in addition to the original AC current. The simple
correction techniques described above do not cancel out the reactive power at harmonic
frequencies. So, more sophisticated techniques must be used tocorrect for non-linear loads.

Industry characteristic
PFC is desirable because the source of electrical energy must be capable of supplying real
power as well as any reactive power demanded by the load. This can require larger, more
expensive power plant equipment, transmission lines, transformers, switches, etc. than
wouldbe necessary for only real power delivered. Also, resistive losses in the transmission

AAiT SECE Page 10


Automatic Power Factor Correction

lines mean that some of the generated power is wasted because the extra current needed to
supply reactive power only serves to heat up the power lines.

The electric utilities therefore put a limit on the power fac factor
tor of the loads that they will
supply. The ideal figure for load power factor is 1, (that is, a purely resistive
istive load), because it
requires the smallest current to transmit a given amount of real power. Real loads deviate
from this ideal Electric motor loads are phase lagging (inductive), therefore requiring
capacitor
pacitor banks to counter this inductance .Sometimes, when the power factor actor is leading due
to capacitive loading, inductors (also known as reactors in this context) are used to correct the
power factor. In the electricity industry, inductors are said to consume reactive
re power and
capacitors are said to supply
ply it, even though the reactive power iss actually just moving back
and forth between each AC cycle.

Electricity utilities measure reactive power used


used by high demand customers and charge higher
rates accordingly. Some consumers install power factor correction
tion schemes at their factories
to cut down on these higher costs.

3.6 Types of power factor corrector


co
Generally, there are threetypes
types of technique are used to correct the power factor these are:
ar

3.6.1 Passive PFC


This is a simple way of correcting the linear load by using capacitor banks. It is not as
effective as activee PFC switching the capacitors into or out of the circuit
cuit cau
causes harmonics,
which is why activee PFC or a synchronous
synch motor is preferred.But
But considerable development
of power electronics is encouraging the replacement of synchronous compensators with static
systems for the control of the reactive power such as for example TSC (thyristor switched
capacitors) and TCR (thyristor controlled rea
reactors).. These are an electronic version of the
reactive power compensation systems based on electromechanical components in which,
however, the switching of the various capacitors is not carried out through the opening and
closing of suitable contactors, but
but through the control carried out by couples of antiparallel
thyristors.

Fig 3.8: passive power factor correction for linear load

AAiT SECE Page 11


Automatic Power Factor Correction

3.6.2Active PFC
An active power factor corrector (active PFC) is a power electronic system that controls the
amount of power drawn by a load in order to obtain a Power factor as close as possible to
unity. In most applications, the active PFC controls the input current of the load so that the
current waveform is proportional to the mains voltage waveform (a sine wave).Some types of
active PFC are: Boost, Buck and Buck-boost. Active power factor correctors can be single-
stage or single-stage and it is the most effective and can produce a PFC of0.99 (99%).

3.6.3Synchronous motor
On industries, inductive reactive load are predominant. Theseare usually low size or low
speed induction motors. Such loadsrequire considerable portion of reactive power(kVAr)
asmagnetization current.

Other than applying bank of capacitors to supply the powersupply with reactive power,
synchronous motors are normallyused for such purpose.Power factor of synchronous motors
can be easily controlledas they are fitted with an independent excitation source. Thisway,
power factor can be increased without generating reactivepower (motor with PF=1.0) or
generate required reactive power(motor with PF=0.0).

Fig3.9: synchronous motor for power factor corrector

3.7 Capacitive power factor correction (CPFC)


Capacitive Power Factor correction is applied to circuits, which include induction motors as a
means of reducing the inductive component of the current and thereby reduce the losses in the
supply. There should be no effect on the operation of the motor itself. An induction motor
draws current from the supply, which is made up of resistive components and inductive
components. The resistive components are: Load current and Loss currents and the inductive
components are: Leakage reactance and Magnetizing current. Figure 1.8 is showing relations
between magnetizing current, motor current and work current.

AAiT SECE Page 12


Automatic Power Factor Correction

Fig 3.10: showing relation between magnetizing current motor and work current

The current due to the leakage reactance is dependent on the total current drawn by the motor,
but the magnetizing current is independent of the load on the motor.
In the interest of reducing the losses in the distribution system, power factor correction is
added to neutralize a portion of the magnetizing current of the motor. Typically, the corrected
power factor will be 0.92- 0.95. Some power retailers offer incentives for operating with a
power factor of better than 0.9, while others penalize consumer with a poor power factor.
These are many ways that this is metered, but the net result is that in order to reduce wasted
energy in the distribution system the consumer will be encouraged to apply power factor
correction.
Power factor correction is achieved by the addition of capacitors in parallel with the
connected motor circuits and can be applied at the starter, or applied at the switchboard or
distribution panel. The resulting capacitive current is leading current and is used to cancel the
lagging inductive current flowing from the supply.

3.8 Different types of capacitive power factor correction

Different types of capacitive power factor correction are

 Bulk correction
 Static correction
 Solid-state soft starter

Bulk correction
The Power factor of the total currentsupplied to the distribution board is monitored by a
controller which then switches capacitor banks. In a fashion to maintain a power factor better
than a preset limit. (Typically 0.95) Ideally, the power factor should be asclose to unity as
possible. There is no problem with bulk correction operating at unit; however correction
should not be applied to an unloaded or lightly loaded transformer. If correction is applied to
an unloaded transformer, we create a high Q resonant circuit between the leakage reactance of
the transformer and the capacitors and high voltage can result.in figure 1.12 bulk correction
using capacitor bank is shown

Fig 3.11: Bulk correction using capacitor bank

AAiT SECE Page 13


Automatic Power Factor Correction

Static correction
As a large proportion of the inductive or lagging current on the supply is due to the
magnetizing current of induction motors, it is easy to correct each individual motor by
connecting the correction capacitors to the motor starters. With static correction, it is
important that the capacitive current isless than the inductive magnetizing current of
theinduction motor.

In many installations employing static power factor correction, the correction capacitors are
connected directly in parallel with the motor windings. When the motor is Off Line, the
capacitors are also Off Line. When the motor is connected to the supply, the capacitors are
also connected providing correction at all times that the motor is connected to the supply. This
removes the requirement for any expensive power factor monitoring and control equipment.
In this situation, the capacitors remain connected to the motor terminals as the motor slows
down. An induction motor, while connected to the supply, is driven by a rotating magnetic
field in the stator that induces current into the rotor. When the motor is disconnected from the
supply, there is for a period of time, a magnetic field associated with the rotor. As the motor
decelerates, it generates voltage out its terminal at a frequency which is related to its speed.

It is better practice to use two contactors, one for the motor and one for the capacitors. Where
one contactor is employed, it should be up sized forthe capacitive load. The use of a second
contactor eliminates the problems of resonance between the motor and the capacitors. Static
correction is shown in figure3.12.

Fig 3.12: Static correction using capacitor

Solid state soft starter


Static Power Factor correction capacitors must not be connected to the output of a solid-state
soft starter. When a solid-state soft starter is used, a separate contactor must control the
capacitors. The capacitor contactor is only switched on when the soft starter output voltage
has reached line voltage. Many soft starters provide a “top of ramp” or ‘“bypass contactor
control” which can be used to control the PFC capacitor contactor. If the soft starter is used
without an isolation contactor, the connection of capacitors close to the input of the soft
starter can also cause damage if they are switched while the soft starter is not drawing current.

AAiT SECE Page 14


Automatic Power Factor Correction

The capacitors tend to cause transients to be amplified resulting in higher voltage impulses
applied to the SCR’s of the soft starter, and due to the energy storage of capacitors, the energy
behind the impulses is much greater. In such installations, it is recommended that the
capacitorsbe mounted at least 50 meters from the soft starter. The elevated the impedance
between the soft starter and the capacitors reduces the potential for damage to the SCR’s.
Switching capacitors, Automatic bank correction etc. will cause voltage transients and these
transients can damage the SCR,’s of Soft Starters if they are in the off state without an input
contactor. The energy is proportional to the amount of capacitor being switched. It is better to
switch lots of small amounts of capacitance than few large amounts. Power factor controller
solid-state soft starter is shown in figure 3.13.

Fig3.13: power factor controller solid-state soft starter

3.9Disadvantage of CPFC and its solution

Capacitor selection
Static Power factor correction must neutralize no more than 80% of the magnetizing current
of the motor. If the correction is too high, there is a high probability of over correction which
can result in equipment failure with severe damage to the motor and capacitors.
Unfortunately, themagnetizing current of induction motors varies considerably between
different motor designs. The magnetizing current is almost always higher than 20% of the
rated full load current of the motor, but can be as high as 60% of the rated current of the
motor. Most power factor correction is too light due to the selection based on tables which
have been published by a number of sources.

Harmonics
Harmonics are undesired signals which are present in electricalnetworks that have a frequency
multiple of the fundamental:as they overlap they create a new distorted wave shapewhich is

AAiT SECE Page 15


Automatic Power Factor Correction

no longer sinusoidal.Most modern factories are making increasing use of modernpower


electronics. A feature of semi-conductor controlleddevices and drives is to generate a high
content of harmonicsin the mains. The result is that resonance occurs which leadsto dangerous
excess currents which overload capacitors,cables, fuses and especially contactors.
Harmonics do not originate from power generators but areproduced by non-linear loads which
can be divided into threemain groups:
• Loads with variable impedance i.e. arc furnaces, fluorescentlighting, etc.
• Loads with saturated magnetic circuits i.e. reactors, saturationtransformers, induction
furnaces, etc.
• Loads that make use of semi-conductor devices i.e. staticrectifiers, static frequency
converters, static uninterruptiblepower supplies, static induction regulators.

Non-linear loads are therefore typical harmonic generators. Harmonic currents are load
independent and are caused bythe harmonic generator which is dependent on the phaseangle
of the power supply. The frequencies occurring formmultiples of the mains rated frequency,
since impedance ofthe line system rises during increased frequency (whereas theimpedance of
capacitors falls). The harmonic current flowthrough capacitors installed in the vicinity of the
harmonicgenerator.

AAiT SECE Page 16


Automatic Power Factor Correction

Chapter4

Hardware and Software configuration


4.1 Description of complete system

Data Acquisition

Data acquisition means acquiring the data and processing it as per the requirement so as to
suit the controller. Here we have analog data which require converting into the digital form.
For this purpose we have used an ADC.

Microcontroller unit

A microcontrollerunit or MCU is a specialized type of digital computer used to provide


automatic sequencing or control of a system. It defers from ordinary digital computers in
being very small, with several dedicated pins for input or output of a digital signals and
limited memory. The simplest type of signal understood by a microcontroller is a discrete
voltage level: either “high”(approximately +V)or “low” (approximately ground) measured at
specified pin on the chip.

Switch

Switches are mechanical or electrical device used to make or break the current in the system.
Due the progressions throughout the past many years, the switch devices have been changed
from manually operating to automatically controlled switches due to technological
improvements.

Source
AAiT SECE Page 17
220V, 50 Hz
Automatic Power Factor Correction

Capacitor bank

R-L load
Data Microcontroller Switch
Acquisition

Fig 4.1: Block diagram of Automatic PFC

4.2 Circuit Description


The circuit diagram consists of mainly four units which constitute for the perfect operation of
the circuit.
1. Voltage & current measurement unit
2. Phase detector unit
3. Relay driver
4. PIC ‐microcontroller unit

 The Ac supply is connected to the resistive and inductive load


 Current transformer (CT) is connected series with line, and potential transformer (PT)
is connected parallel with supply line.
 CT & PT are used to step down the voltage and current level for phase detector.
 The outputs of CT & PT are given as input for phase detector.
 The phase detector, here, is an XOR Gate.
 XOR detects the point where the voltage and current crosses zero in either direction.
And, it produces an impulse with the width a proportional of the phase shift between
the voltage and the current sensor outputs.
 By using this waveform we can find out power factor of the line, hence power factor
iscos Ø, angle between the voltage and current waveform is Ø.
 For the calculation of reactive power also, we give the output of the current sensor to
the microcontroller. Since the microcontroller measures the current using ADC port, it
requires some time delay two measure the next signal until it saves the previous
measured value. For purpose of simplicity for taking caring of time delay, we simply
use a rectified and filtered current signal for the input of the ADC of microcontroller.
AAiT SECE Page 18
Automatic Power Factor Correction

 Designed capacitor connected parallel to load through relay, if the relay energized by
microcontroller it will switch on the capacitor parallel with load, if relay de energized
it will remove the capacitor from the load.
 When the resistive load is on the power factor will be near to unity so the PIC-
microcontroller doesn’t energize the relay coil.
 When the inductive load is on the power factor decrease now the error will be more in
PIC- microcontroller so PIC energizes the relay coil in order to compensate the
excessive reactive power.
 16×2 LCD module is connected with port C of the PIC-microcontroller.
 We can get the calculated values of reactive power, the phase shift, the line
current,and the load voltage and power factor from LCD display.

compensator capacitor R-L load


R1
current sensor
7.9

RV1

7.9

SW1
voltage sensor
SW -ROT-6

C4 C2 C1 C3
188.79mH 241.06mH 276.18mH 0.4014H
Q=4.15 Q=4.788 Q=11.019 Q=10.968

L1 L2 L3 L4 L5 L6
150.56mH 0.9354H
Q=12.813
Q=6.78

a.Power circuit

AAiT SECE Page 19


Automatic Power Factor Correction

5V 12V

U5 U1
13 15 9
CURRENT FROM SENSOR

OSC1/CLKI RC0/T1OSO/T1CKI COM


R1 1
MCLR/VPP RC1/T1OSI
16 1
1B 1C
16 RL1
17 2 15 12V
BR1 RC2/CCP1 2B 2C
2 18 3 14
2k RA0/AN0/CVREF RC3/SCK/SCL 3B 3C
3 23 4 13
RA1/AN1 RC4/SDI/SDA 4B 4C
4 24 5 12
RA2/AN2/VREF- RC5/SDO 5B 5C
5 25 6 11
RA3/AN3/VREF+ RC6/TX/CK 6B 6C
VSINE C3 6
RA4/T0CKI RC7/RX/DT
26 7
7B 7C
10
10uF 7
RA5/AN4/SS/LVDIN
14 19 ULN2002A
RA6/OSC2/CLKO RD0/PSP0/C1IN+
20
RD1/PSP1/C1IN-
33 21
RB0/INT0 RD2/PSP2/C2IN+
SK202L5 34 22
RB1/INT1 RD3/PSP3/C2IN-
35 27
RB2/INT2/CANTX RD4/PSP4/ECCP1/P1A
36 28
RB3/CANRX RD5/PSP5/P1B
U3 37
RB4 RD6/PSP6/P1C
29
38 30
RB5/PGM RD7/PSP7/P1D
39
C1 40
RB6/PGC
8
RB7/PGD RE0/RD/AN5
9
RE1/WR/C1OUT/AN6
10
RE2/CS/C2OUT/AN7
20pF
COMPI
X1 PIC18F458
VOLTAGE FROM SENSOR

C2 CRYSTAL

U2 5V

20pF
VSINE U4 RV1

COMPI
5.0K DESC="TRIMPOT 5.0K OHM 6MM SQ SMD"
XOR_2

10
11
12
13
14
1
2
3

4
5
6

7
8
9
VSS

VEE

RS

D0
D1
D2
D3
D4
D5
D6
D7
VDD

RW
LCD2
LM032L

b. control circuit

Fig 4.2: circuit diagram of the system

Potential Transformer

The standards define a voltage transformer as one in which "the secondary voltage is
substantially proportional to the primary voltage and differs in phase from it by an angle
which is approximately zero for an appropriate direction of the connections.

This, in essence, means that the voltage transformer has to be as close as possible to the
"ideal" transformer. In an "ideal" transformer, the secondary voltage vector is exactly opposite
and equal to the primary voltage vector, when multiplied by the turn’s ratio.

In a "practical" transformer, errors are introduced because some current is drawn for the
magnetization of the core and because of drops in the primary and secondary windings due to
leakage reactance and winding resistance. One can thus talk of a voltage error, which is the
amount by which the voltage is less than the applied primary voltage, and the phase error,
which is the phase angle by which the reversed secondary voltage vector is displaced from the
primary voltage.

LCD Display

The suggested circuit is quite simple. The display, data and control lines are connected to the
printer port lines. The read/write (RW) line is tied low to fix the display in the write mode.

AAiT SECE Page 20


Automatic Power Factor Correction

The Enable (E) and the Register Select (RS) lines are tied to two of the parallel port control
lines. Liquid crystals solidify under low temperature (below the storage temperature range)
leading to defective orientation or the generation of air bubbles (black or white). To minimize
the performance degradation of the LCD modules resulting from destruction caused by static
electricity etc., exercise care to avoid holding the following sections when handling the
modules Exposed area of the printed circuit board, Terminal electrode sections.

Relay Driver and Relay

The relay driver (ULN2003A) is used to amplify the output current from the microcontroller
to rise up the magnitude in the range of capable to actuate the relays. Mostly, microcontroller
does not exceed 20mA output. Therefore, the relay has a purpose of amplifying this current to
the value enough for the relay. This value is mostly up to 400mA.

When a current flows through the coil of the relay, the resulting magnetic field attracts an
armature that is mechanically linked to a moving contact. The movement either makes or
breaks a connection with a fixed contact. When the current to the coil is switched off, the
armature is returned by a force approximately half as strong as the magnetic force to its
relaxed position. Usually this is a spring, but gravity is also used commonly in industrial
motor starters. Most relays are manufactured to operate quickly. In a low voltage application,
this is to reduce noise. In a high voltage or high current application, this is to reduce arcing.

Fig 4.3: relay

Microcontroller PIC 18F458


Suits well to perform these tasks because of its following feature:
It has built in 10-bit Analog-to-Digital Converter module (A/D) with fast sampling rate
approximately 0.632 MHz and good linearity. It has high current sink/source (25 mA) for
digital input/output. It has 3 external interrupt pins and four timer modules namely. Timer O
module: 8 bit/ 16-bit timer/counter with 8-bit programmable prescale; Timer1module: 16-bit
timer/counter;Timer2 module with 8-bit timer/counter with 8-bit period registers (time-base
for PWM); Timer3 module: 16-bit timer/counter. One major reason for selecting 18P458 is its
library support for interfacing multimedia card (MMC) drivers. A single command is required
to write or read any data from MMC.

Contactor

AAiT SECE Page 21


Automatic Power Factor Correction

A contactor is an electrically controlled switch used for switching a power circuit, similar to a
relay except with higher current ratings. A contactor is controlled by a circuit which has a
much lower power level than the switched circuit.
Contactors come in many forms with varying capacities and features. Unlike aacircuit breaker,
a contractor is not intended to interrupt a short circuit current. Contactors range from those
having a breaking current of several
several amperes to thousands of amperes and 24 V DC to many
kilovolts. The physical size of contactors ranges from a device small enough to pick up with
one hand, to large devices approximately a meter (yard) on a side.

Fig4.4: contactor
A basic contactorr will have a coil input (which may be driven by either an AC or DC supply
depending on the contactor design). The coil may be energized at the same voltage as the
motor, or may be separately controlled with a lower coil voltage better suited to control by
programmable controllers and lower
lower-voltage pilot devices.

Clock Generator Oscillator


Even though the microcontroller has built in oscillator, it cannot operate without external
components which stabilize its operation and determine its frequency (operating speed of the
microcontroller). Owing to the fact that it is almost impossible to make oscillator which
operates sterilely over
ver a wide frequency range, the microcontroller
micro must know which crystal
is connected in order that it can adjust the operation of its internal
ernal electronics to it. That is
why all programs used for chip loading contain an option for oscillator mode selection. selecti
Depending on which elements are in use as well as their frequencies, the oscillator
oscillat can be run
in four different modes: LP-Low
LP Power Crystal; XT-Crystal/Resonator;
/Resonator; HS-High
HS speed
Crystal/Resonant RC-Resistor/Capacitor.
Resistor/Capacitor. Different types of oscillator are:

I. Quartz resonator

II. Ceramic resonator

III. RC oscillator

IV. External oscillator

In our work, we have used quartz crystal oscillator in in XT mode because quartz crystal is
used for frequency stabilization, the built in oscillator operates at very precise frequency,

AAiT SECE Page 22


Automatic Power Factor Correction

which is independent from changes in temperature and voltage power supply as well. This
frequency is normally labeled on the microcontroller package.

Apart from the crystal, in this case the capacitors Cl and C2 must be also connected as per
scheme below. Their capacitance isnot of great importance,therefore, the values provided in
the table 2.1 should be consider as a recommendation rather than a strict rule.

Fig 4.5: Quartz resonator

Mode Frequency C1,C2


LP 32KHz 33pF
200KHz 15pF
200KHz 47-68pF
XT 1MHz 15pF
4MHz 15pF
4MHz 15pF
HS 8MHz 15-33pF
20MHz 15-33pF

Table 4.1: Quartz capacitor and frequency relation

Reset

Fig 4.6: reset pin


Reset circuit is shown in figure above supply is given at pin1 and one switch is attached with
it so that when we press it, the pin 1 is reset.it is used to reset the program. It is also an
interrupt having highest priority.

Capacitor Banks
Generally used capacitors for power factor controller are: LKT type power factor correction
capacitors: C and CB Type capacitor modules: SBA Type – Automatically Controlled
Capacitor Modules; SBC Type - Statically Controlled Capacitor Modules
AAiT SECE Page 23
Automatic Power Factor Correction

4.3Software development environment


4.3.2 Introduction to mikro C

MikroC is a powerful,feature rich development tool for PIC controllers. It is designed to


provide the user with the easiest possible solution for developing applications for embedded
systems,without compromising performance or control. MlkroC provides a successful match
featuring highly advanced Integrated Development Environment, American
NationalStandards Institute compliant compiler, broad set of hardware libraries,
comprehensive documentation,and plenty of ready-to-run examples.

MikroC allows quickly develop and deploy complex applications. For programming PIC with
mlkroC C source code is first written using the highly advanced Code Editor, the included
mlkroC libraries are used to speed up the development: data acquisition. Memory, displays
and conversion function. Functions are used to monitor program structure,variables, and
functions in the Code Explorer.MlkroC generates commented, human-readable assembly and
standard HEX compatible with all programmers. The program is finely inspected with flow
and debugs executable logic with the integrated Debugger. MlkroC IDE has Seven different
part through which we can make the projects.

4.3.3 Algorithm and programming

An algorithm is developed to make PIC read the inputs and respond accordingly.There are
two parts of programmingis related to counter,which is initialized through the
timer0interrupt.Second is the main part of the program in which signal is taken by the PIC and
gives the appropriate response to the controlling schemes.

Algorithm for phase angle Detection:

Step-1:- Microcontroller started on interrupt mode.

Step-2:-INTX0 is enabled.

Step-3:-INTX0 get the pulse generated by the XOR.

Step-4:-Assign the interrupt pin for rising edge.

Step-5:-When the interrupt flag rises up, initialize timer0.

Step-6:-Reassign the interrupt pin to falling edge.

Step-7:-When the interrupt flag rises up, stop the timer from counting.

Step-8:- Reassign the interrupt pin to falling edge to make ready for the next circle of the
signal.

Step-9:-Time counted by timer0 calibrated as 0-5ms = 0-90 degree.

AAiT SECE Page 24


Automatic Power Factor Correction

Step-10:-Calibrated data is converted from HEX to BCD, then to ASCII for display on LCD.

LCD Initialization
MlkroC provides a library for communicating with commonly used LCD (4-bit interface). We
have to designate port with LCD as output, before using any of the following library
functions. MikroC provides the user with seven library routines used for LCD. These are
tabulated us Table [mikroC manual].
Sr.No Command Work
1 Lcd_Config For configuring the LCD
2 Lcd_Init For Initializing the LCD at any port
3 Lcd_Out Print text to LCD at user define position
4 Lcd_Out_Cp Print the text at next position
5 Lcd_Chr Print the character at user define position
6 Lcd_Chr_Cp Print the character at next position
7 Lcd_Cmd Use for giving any command to LCD

After initialization we can display the output using some command like, LCD_Out (row no.
column no., ‘text’) or LCD_char_cp- (‘character’).

Analog to digital conversion


The whole procedure takes place in A/D converter module which has the following features:
the converter generates a 10-bit binary result using the method of successive approximation
and stores the conversion results into the ADC registers (ADR.ESL and ADRESH): there are
8 separate analog inputs; the A/D converter allows conversion of an analog input signal to a
10-bit binary representation of that signal; by selecting voltage references Vref- and Vref+,the
minimal resolution or quality of conversion may be adjusted to various needs

Chapter 5

Design

In this project, we use a hall-effect current sensor which has a good sensing performance or
accuracy up to ten amps without distortion and we want to work on a voltage value of
222Volt which is a value corresponding to a single phase line-to-ground voltage. To vary the
resistance value in the circuit, we have one variable resistance in serious to the other fixed
resistor. Merely for the sake of demonstration using the campus’ available resistors, we would
like to use the heater in the lab.

Therefore, our restriction factors are the following:

| | = 1 − 10

= 7.9 − 15.8 Ω

AAiT SECE Page 25


Automatic Power Factor Correction

| | = 222

.68 − .85

Available Inductance for R-L load for Testing


compensator capacitor R-L load
R1
7.9

RV1

7.9

SW1
SW-ROT-6

C4 C2 C1 C3
188.79mH 241.06mH 276.18mH 0.4014H
Q=4.15 Q=4.788 Q=11.019 Q=10.968

L1 L2 L3 L4 L5 L6
150.56mH 0.9354H
Q=12.813
Q=6.78

Fig 5.1: power circuit

Inductor L1 L2 L3 L4 L5 L6
L(H) 150.56m 188.79m 241.06m 276.18m 0.4014 0.9354
Q 6.78 4.146 4.788 11.019 10.968 12.813
Rint(Ω) 6.976 14.298 15.812 7.874 11.87 22.935
Table 4.1: load variation

Where: =

5.1Impedance Analysis
We intend to improve power factor from having 0.65-0.85 to 0.95. Therefore, by using those
inductors we are going to find resistors in series to bring a load with the intended power factor
range.

In the lab, in order to have resistor value in hundreds range to use as a load; we have to limit
the current below its rating.But large resistors have small current rating about 1.3A. For this
purpose, we give small power factor for large inductances, then the whole impedance does not
get small and flow large current through it. Similarly, if we select small inductance for larger
PF values, they need larger resistance then totally the impedance becomes big enough to
minimize the current.

Let = 0.65, = 935.4 , = 22.935Ω

AAiT SECE Page 26


Automatic Power Factor Correction

100 ∗ 0.9354
= = = 251.35Ω
tan(cos ) tan(cos 0.65)

= − = 251.35 − 22.935 = 228.418Ω

∗ 0.65 ∗ 222
= = = = 0.574
251.35
Now, using this value of inductance only, it is possible to create load of different PF in the
intended range by varying the resistor value. But as the PF of the load increases the required
external resistance increases together. This further decreases the current of the load to be
detected less than 0.5A which is difficult to the current sensor to have undistorted output.

For this reason, we will achieve PF from to 0.65 up to 0.72 by this inductor.

let = 0.72, = 935.4 , = 22.935Ω

100 ∗ 0.9354
= = = 304.88Ω
tan(cos ) tan(cos 0.72)

= − = 304.88 − 22.935 = 281.945Ω

∗ 0.72 ∗ 222
= = = = 0.524
304.88
So, to achieve the next PFs in the load, we should check with the next large inductance.

let = 0.73, = 401.4 , = 11.497Ω

100 ∗ 0.4014
= = = 134.69Ω
tan(cos ) tan(cos 0.73)

= − = 134.69 − 11.497 = 123.196Ω

∗ 0.73 ∗ 222
= = = = 1.2
134.69
We can use this inductor value as a load inductor to achieve PF till value of 0.85 without
violating our practical limits by varying the external resistor.

let = 0.85, = 401.4 , = 11.497Ω

100 ∗ 0.4014
= = = 203.477Ω
tan(cos ) tan(cos 0.85)

= − = 203.477 − 11.497 = 191.98Ω

∗ 0.85 ∗ 222
= = = = 0.93
203.477

AAiT SECE Page 27


Automatic Power Factor Correction

But, when we come to use the other lower inductances in the lab to use as a load, the circuit
will experience large current which is greater than the current rating of the load resistor. Even
at larger PF at which large resistance required and lower current flows, the current still
exceeds our resistor current rating (i.e. 1.3A).

let = 0.85, = 276.18 , = 15.812Ω

100 ∗ 276.18
= = = 140Ω
tan(cos ) tan(cos 0.85)

∗ 0.85 ∗ 222
= = = = 1.34 > 1.3( ℎ )
140
As a conclusion, we use only two inductor values from the six available inductors in the lab as
the following power factor ranges.

L=0.9354H for 0.6 ≤ ≤ 0.72

L=0.4014H for 0.6 ≤ ≤ 0.85

5.2 Compensative capacitors


As mentioned above, we use only the first large two inductors and to find the reactive power
range in the circuit; we can take at the two ends of PF value for the two capacitor.

At PF=0.65, = sin(cos ) = 222 ∗ 0.574 sin(cos 0.65) = 96.837

At PF=0.71, = sin(cos ) = 222 ∗ 0.524 sin(cos 0.71) = 83.169

At PF=0.73, = sin(cos ) = 222 ∗ 1.2 sin(cos 0.73) = 182.07

At PF=0.85, = sin(cos ) = 222 ∗ 0.927 sin(cos 0.85) = 108.44

We want to correct into PF=0.95. So, if we find the reactive power left in the circuit for the
above for points of cases after the power factor is corrected to 0.95, we get the following
results.

= tan(cos )

= ∗ ∗ tan(cos )

= 0.3287 ∗

At PF=0.65, = 0.3287 ∗ 222 ∗ 0.574 ∗ 0.65 = 27.23

At PF=0.72, = 0.3287 ∗ 222 ∗ 0.524 ∗ 0.72 = 27.53

At PF=0.73, = 0.3287 ∗ 222 ∗ 1.2 ∗ 0.73 = 63.92

At PF=0.85, = 0.3287 ∗ 222 ∗ 0.9273 ∗ 0.85 = 57.516

AAiT SECE Page 28


Automatic Power Factor Correction

If we take maximum reactive power before any correction 200VAR >182.07VAR (at
PF=0.72) and also at minimum is 25VAR, we can find the number of capacitors in
parallel for compensation as follow.

2 = ; Where n is number of parallel capacitors.

200
= log = log = log 8 = 3
25

Now, we can find the value of the capacitor.

25
= = = 1.6
∗2 222 ∗ 2 ∗ 50

= = 1.6

=2 = 3.2

=4 = 6.4

5.3 RC Filter and Non-inverting Amplifier Design

The value of the resistance and the capacitor can be found by simple formula as follow.

R * C >> 1 / f

Where:

R-load = the resistance

C = value of capacitor in Farads

f = the ripple frequency - this will be twice the line frequency a full wave rectifier is used.

For simplicity further, let us take the value of the resistor to be equal to standard value.

That is, = 100 Ω

Then, ≫ ∗

1

2 ∗ 50 ∗ 100
≫ 0.1
Take =1

Since, with load varies at maximum up to 4.5 amp, the sensor output voltage should be
amplifier is similar range. This is because to give the microcontroller for measurement

AAiT SECE Page 29


Automatic Power Factor Correction

approximately the same value of current is the load. So that, at the microcontroller uses it for
reactive power calculation.

By using the load resistance and load, we can collect the data for the current sensor results as
follow.

Our lab taken data

Input (amp) Output (mVpeak) Ratio


1 25 40
2 60 33.33
3 90 33.33
4 125 32
Table 5.2: current sensor output

Where, =

By taking the average of the ratio, we can fix the amplification of the post amplified which
put after the sensor output to the controller.

40 + 33.3 + 33.3 + 32
= = 34.65
4
In order to maximize the value get from the current sensor, we use non -- --inverting amplifier.
So, closed loop-voltage
voltage gain for the non-inverting
non inverting amplifier circuit shown below
,
= +
− ,
= = +

Fig 5.2: non-inverting amplifier

Generally, the open loop given by

=1+

AAiT SECE Page 30


Automatic Power Factor Correction

So from the above measured average loop gain (i.e. 34.65) the value of resistor and are
1K and 79 k ohm respectively.

5.4 Design of Harmonic Filter


Recent advancements in the field of electronic computing have shown its effects in every
aspect of life. Use of computers for Design and Analysis has reduced the time, energy and
resources required to be spent using conventional methods
methods involving manual calculations. LC
filter in parallel works the filtering action by the principle of getting short circuit at the
harmonic frequency to divert the current from flowing through the load.

Causes of Harmonics

Industrial electronic devices


es and non-linear
non linear loads are the major cause of harmonic generation.
As the current drawn from the supply no longer remains sinusoidal thus the resultant
waveform is made up of a number of different waveforms of different frequencies.
frequencies

Effects of Harmonics

Harmonics
armonics are a major cause of power supply pollution lowering the power factor and
increasing electrical losses. This results in premature equipment failure and higher rating
requirement for equipment.

Harmonic Filter

A harmonic filter is a device used to ‘filter out’ components of different harmonic order from
reaching and harming the load thus the name ‘harmonic filter’.

Fig 5.3: Passive PFC with filter

Generally the sum of even harmonics is less than 1% of fundamental component thus they are
not considered also 3rd, 5th and 7th order harmonics constitute about 97% of harmonic Thus
it is most economically suitable to design harmonic filters for these components
components as these can
reduce the pollution level well below the desired limit and being economically justified .

Design

AAiT SECE Page 31


Automatic Power Factor Correction

Constraint: =1000 Watt, Pf0=0.75, Pf1=0.95

=≫ = tan(cos ( ))

= 1000 tan(cos (0.75))

= 881.92

⟨− cos ( )
→=

1000⟨− cos (0.75)


→=
0.75
= 1333.33⟨−41.4

220
→= = = 36.3⟨41.4
→ 1333.33⟨−41.4

=≫ = 36.3 cos 41.4 = 27.2Ω

= 36.3 sin 41.4 = 24Ω

24
=≫ = = = 0.0764
314.16

Fig 5.4: power factor improvement after adding capacitor

= = 881.92

= 1000[tan cos 0.75 − tan cos 0.95]

= 553.23

− =

1
=ℎ

AAiT SECE Page 32
Automatic Power Factor Correction

=

220
=≫ = = 87.49Ω
553.23

=

87.49 ∗ 2.86
= = 42.12Ω
5.94
42.12 ∗ 9
= = 47.39Ω
8
1
= = 67.17μF
314.16 ∗ 47.39
87.49 ∗ 1.79
= = 26.36Ω
5.94
26.36 ∗ 25
= = 27.46Ω
24
1
= = 116.17μF
314.16 ∗ 27.46
87.49 ∗ 1.29
= = 19Ω
5.94
19 ∗ 49
= = 19.396Ω
48
1
= = 164.1μF
314.16 ∗ 19.396
.
= =≫ = = = 5.27Ω

5.27
= = 0.0168
314.16
27.46
= = = 1.09Ω
5 25
1.09
= = 3.496
314.16
19.396
= = = 0.396Ω
7 49
AAiT SECE Page 33
Automatic Power Factor Correction

0.396
= = 1.26
314.16

CHAPTER-6

Power factor correction process is a real time application in which a very fast and accurate
reaction is needed. For this reason, the study and the project must be a feasible one. But the
hardware implementation is a very complicated.

As any engineering research, we follow the testing of the theoretical power factor correction,
especially passive capacitor correction in our project, by starting from simulation of different
circuit parts of the project.

6.1 Simulation results

The following are those results from the simulation by Proteus and Mat-Lab.

AAiT SECE Page 34


Automatic Power Factor Correction

a) The current sensor output in the Oscilloscope

b) the different signals in the circuit


Fig 6.1: the display output of the oscilloscopes in fig 3.2

On the figure 6.1 (b) above, the four different signals have their own representation of
important property of the circuit. The signal in yellow colour refers to the output of the
rectifier that makes ready the read current to theADCport of the PIC with high accuracy. The
other two signals that are in red and blue are the out puts of the comparators for the
corresponding inputs, current and voltage from the sensors. These comparators get the zero
crossing of both current and voltage sinusoidal signals and generate square wave as shown in
the oscilloscope.

Lastly, the green signal shows a very important signal for the calculation of power factor
between the line current and the supply voltage. This signal is from the XOR after comparing
the two comparators outputs.

AAiT SECE Page 35


Automatic Power Factor Correction

Fig 6.2: the LCD display of different calculated values out of the PIC

The 2x16 LCD display shows four measured and calculated values of electrical quantities.
This quantities’ display can be used as indicator in industry in time of running power factor
sensitive machine and other huge manufacturing processes. The quantities in the display are
reactive power, power factor, the current of the line or the load, and the phase shift between
the current and the voltage.

Fig 6.3: the comparison of the current signal before and after harmonic filter
The above figure is the simulation result from Mat-Lab for the harmonic filter. As shown, the
first scope displays the current signal after the harmonic filter. So it is pure sinusoidal. But in
the second scope, the signal is a summation of a number of third, fifth, and seventh harmonic
of the fundamental frequency.

6.2 Lab experiment results

AAiT SECE Page 36


Automatic Power Factor Correction

Fig 6.4: physical implementation of automatic PFC

Implementing the simulation circuit and getting the same result as the simulation is not mostly
happen. This is because, in the lab and physical implementation, all components have their
own working conditions such as current rating, voltage rating, and temperature of the
surrounding and other different constraints.

As examples of different physical constraints that we have come across are the followings.
The first one is the shortage in getting the large enough value of resistance in the lab for R-L
load usage. All high resistors, in ranges of 100 ohms, with 220V and above voltage rating
have low current rating which is not greater than 1.3A. But our simulation had line current up
to 5Amp.

Also, finding exact values of capacitors for compensation at the 220V and above voltage
rating is another difficult. We so have in the lab at that voltage rating only two values of
capacitors that are 12μF and 40μF. Therefore, to meet the values of the designed
compensating capacitors, we take parallel and series combinations of those two capacitors for
each designed compensating capacitors.

CHAPTER -7
7.1 Conclusion and Recommendation

AAiT SECE Page 37


Automatic Power Factor Correction

This thesis gives more reliable also user friendly controller and makes to store to real time
action taken by the microcontroller.

It can be concluded that power factor correction techniques can be applied to the industries,
power systems and also households to make them stable and increase efficiency of the system
as well as the apparatus. The use of microcontroller reduces the overall costs. Due to use of
microcontroller multiple parameters can be controlled and the use of extra hard wares such as
timer, RAM, ROM and input output ports reduces. Care should be taken for overcorrection
otherwise the voltage and current becomes more due to which the power system or the
machine becomes unstable and the life the capacitor reduces.

In our hardware implementation work, we faced different problems. The first one of all is the
lack of components or electric equipment at the intended current or other ratings; such as
resistors having a current rating greater than 1.3 Amp.

The other thing that can be mentioned as a difficult is lack a background knowledge on
microcontroller and programing languages.

Therefore, we propose the following recommendations for the better future works taking our
experiences.

To get rid of difficult for students in lab usage of components, it is better the institute prepare
more lab components at different and large ratings. Also, we suggest the course Interfacing
should be given to all electrical streams to have a background knowledge.

7.2 Future Work


As we understand, power factor correction is somewhat challenging project due to the
existence of harmonic in the system. Even if it is challenging in this single phase system, we
will try to upgrade power factor correction in three phase system.

AAiT SECE Page 38


Automatic Power Factor Correction

CHAPTER-8
Reference

1. PIC18F458 data sheet, microchip.


2. Programming of PIC Micro-Controller for Power factor correction
3. H. Sadat, “Power System Analysis”, Mc Graw Hill.
4. J. E. Miller (1982). “Reactive Power Control in Electric System” New York: Wiley
5. B.C. Kok, C. Uttraphan, and H.H. Goh(2009). “A Conceptual Design of
Microcontroller-Based Power Factor Corrector Circuit “pursued in
practicalapplications
6. Ying-Tung Hsiao (2001). “Design of Filters for Reducing Harmonic Distortion and
Correcting Power Factor in Industrial Distribution Systems”

AAiT SECE Page 39


Automatic Power Factor Correction

Appendix I
It.No. Item Description Quantity Unit Price Total Price (birr)
1 PIC18F458 1 300 300
2 LCD 2 180 360
3 Rectifier Diode 4 5 20
4 Capacitor 5 5 25
5 Relay 5 50 250
6 Relay Driver 1 39 39
7 Crystal Generator 1 30 30
8 Op-Amp 1 20 20
Total 1044

AAiT SECE Page 40


Automatic Power Factor Correction

Appendix II

 C source code for the PIC for calculation of power factor and other output functions:
#include"built_in.h"
// Lcd pinout settings
sbit LCD_RS at RC2_bit;
sbit LCD_EN at RC3_bit;
sbit LCD_D7 at RC7_bit;
sbit LCD_D6 at RC6_bit;
sbit LCD_D5 at RC5_bit;
sbit LCD_D4 at RC4_bit;

// Pin direction

sbit LCD_RS_Direction at TRISC2_bit;


sbit LCD_EN_Direction at TRISC3_bit;
sbit LCD_D7_Direction at TRISC7_bit;
sbit LCD_D6_Direction at TRISC6_bit;
sbit LCD_D5_Direction at TRISC5_bit;
sbit LCD_D4_Direction at TRISC4_bit;
double phaseShift,pf=0,currentReal;
unsigned current,reactivePower,change=0;
int k=0,i=0,j=0,cnt;
int Switch;
void ShowLDC(int x, int y, unsigned int adcvalue) // functon to display on the LCD
{
unsigned char car;
car = adcvalue / 1000;
LCD_Chr(x,y,48+car);
adcvalue=adcvalue-1000*car;

AAiT SECE Page 41


Automatic Power Factor Correction

car = (adcvalue / 100);


LCD_Chr_CP(48+car);
adcvalue=adcvalue-100*car;
car = (adcvalue / 10);
LCD_Chr_CP(48+car);
adcvalue=adcvalue-10*car;
car = adcvalue;
LCD_Chr_CP(48+car);
}
void interrupt() { //when any interrupt occurs it is called
k++; //determing interrupt is for the rising or the falling edge
if(INTCON.INT0IF)//checking to the rising or falling edge in the interrupt pin RB0
{
INTCON.INT0IF=0;//clearing the interrupt pin for the next interrupt
if(k==1) //if the interrupt is for the rising edge
{
TMR0L=0; //initializing timer0=0
T0con.TMR0ON=1; //starting the timer
INTCON2.INTEDG0=0;//assigning the interrupt pin for falling edge
}
if(k==2) //if the interrupt is for rising edge
{
T0con.TMR0ON=0; //tmer0 control register, stoping the timer to get time difference
INTCON.INT0IF=0; //clearing the interrupt pin for the next interrupt
INTCON2.INTEDG0=1;//assigning the pin for rising edge
cnt=TMR0L;//assigning the the count to a variable

k=0;
}
}

AAiT SECE Page 42


Automatic Power Factor Correction

}
void main()
{
ADCON1=0x80;//all analogue
ADCON0<6>=0;
ADCON0<5>=0; //<ADCS1:ADCS0> assigning for adc speed to be FOSC/2
T0CON = 0x85;// enables T0, Set TMR0 in 8bit mode, assign prescaler to 1:256
TRISA=0xFF;//initializing portA as input
TRISB=0xFF;
TRISD=0x00;//initializing portD as output
TRISC=0x00;
LCD_Init();//lcd initialization with portC
Lcd_Cmd(_Lcd_CURSOR_OFF);//clear the cursor that out by default
Lcd_Cmd(_Lcd_Clear);//ready the LCD to display
LCD_Out(1,1,"Q=");//displaying stirng on LCD
LCD_Out(1,9,"I=");
LCD_Out(2,1,"Fi=");
LCD_Out(2,10,"PF=");
INTCON=0x90;//enable all unmask interrupts,,disable timer0 interrupt, enable portB interrupt
INTCON2.INTEDG0=1;//as initial assigning the interrupt pin for rising edge
while(1)
{
TMR0L=0;// Timer0 initial value
current=ADC_read(1);//get adc value from channel1
delay_ms(1);
currentReal=current/4-current/32;//to change to 100 times multiple of real value from adc
value(0-1023)
phaseShift=cnt*1.154;//changing the count to angle value
pf=cosE3(phaseShift);//round(cos(phseShift)*1000)
reactivepower=sinE3(phaseShift)*currentReal*0.00222;//reactive power is VIsin(phase)

AAiT SECE Page 43


Automatic Power Factor Correction

ShowLDC(1,4,reactivePOwer);//calling show LCD function to display reactive power at row1


and column5
ShowLDC(2,5,phaseShift);
ShowLDC(2,13,pf);
ShowLDC(1,13,currentReal);
Switch=reactivepower/29.23;//to have a step compansation at each 29.23VAR
if(Switch%2==1)
j=(Switch+1)/2;
else
j=Switch;
PORTD=j;//set the out put the modules of the reactive power to 50
delay_ms(20000);//to take another power factor correction if the load is changed within 5
second
PORTD=0;
}
}

AAiT SECE Page 44


Automatic Power Factor Correction

Appendix III
Pin diagram

AAiT SECE Page 45

You might also like