# Power Factor Improvement plant using AVR Microcontroller | Part:01

### Power Factor:

Power factor is the cosine of the phase difference between voltage & current.

### Power Factor Improvement:

### Why Power factor correction is important???

- P=2KW, Vrms=220V,
**cosθ = 1**, so load is resistive$${I_{rms}} = {{{P_{real}}} over {{V_{rms}}cos theta }} = {{2kW} over {220×1}} = 9.09A$$ - Now P=2KW,Vrms=220 & power factor
**cosθ = 0.6**for inductive load

$${I_{rms}} = {{{P_{real}}} over {{V_{rms}}cos theta }} = {{2kW} over {220×0.6}} = 15.15A$$

SO we can conclude that,

Real power or average power,

$${P_{real}} = {1 over T}int_0^T {p(t)dt} = {1 over T}int_0^T {v(t)xi(t)dt} $$

We know another equation for real power,

$${P_{real}} = {V_{rms}}{I_{rms}}cos theta $$

Equating both of the equation we can easily find power factor,**cosθ **

$$eqalign{

& {P_{real}} = {1 over T}int_0^T {p(t)dt} = {V_{rms}}{I_{rms}}cos theta cr

& cos theta = {{{1 over T}int_0^T {v(t)xi(t)dt} } over {{V_{rms}}{I_{rms}}}} = {{{mathop{rm Re}nolimits} al_Power} over {Apparent_Power}} cr} $$

This is how we determine power factor. So If we know voltage and current signal, it is very easy to obtain power factor from above equation.

### Voltage & Current Signal Sensing:

- We sense current using current transformer model TA21CM-5A/5mA and then read the current signal by ADC0 pin of atmega32 microcontroller. In the simulation, we use current controller current source as C.T(There is no proteus model of our C.T). As turns ratio of C.T is 1:1000, So gain of Current controlled current source would be 0.001.
- Voltage signal will be sensed directly using voltage divider and read the voltage ADC value by ADC1 pin of atmega32

- Our AC signal is +12 to -12V peak to peak. Microcontroller adc can only read voltage from 0v to 5V.
- It cannot read negative voltage.
- A microcontroller cannot read current.

To solve these problems,

- I select voltage divider resistor such a way so that voltage signal peak t to peak value remains within +2.5V to -2.5V
- Then I use a 2.5V dc offset, AS a result voltage signal always remains between 0V to 5V. By this, we can sense clamped AC voltage.
- We use a resistor across current transformer to convert the current into voltage.

### Extracting original signal:

- Then we are converting the ADC value into corresponding voltage value and find the average value of voltage and current.
- So average value of voltage and current are the DC-offset what we added in hardware using voltage divider.
- I think you got the point. To obtain original voltage and current signal we have to subtract average value from the every sample.

see the animation to visualize what is actually doing in the coding section to extract original signal(animation is bit slow 🙁 )

- In the same way, we extract original current signal.

Next part of this tutorial is here:

## Comments

## Leave a Comment