Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 44

AGC AND AVR CONTROL OF A MOTOR GENERATOR

SETUP USING MICROCONTROLLER

Project Supervisors:
Prof. Riaz Ahmed Rana
Engr. Syed Muhammad Furqan

Project Members:
ZawarHaseeb L1F14BSEE0002
Muhammad Danish Khan L1F14BSEE0006
Haris Ali L1F14BSEE0009

Session 2014-2018

FACULTY OF ENGINEERING
UNIVERSITY OF CENTRAL PUNJAB
LAHORE, PAKISTAN

1
AGC AND AVR CONTROL OF A MOTOR GENERATOR SETUP USING
MICROCONTROLLER

This project report is submitted to the Faculty of Engineering, University of Central Punjab,
Lahore, Pakistan, for the partial fulfillment of requirements for the degree of Bachelors of
Electrical Engineering.

Approved on

Internal Examiner: Sign:

(Project Supervisor): Name:

Internal Examiner: Sign:

(Project Co-Advisors): Name:

Sign:

Name:

External Examiner: Sign:

Name:

Session 2014-2018

FACULTY OF ENGINEERING
UNIVERSITY OF CENTRAL PUNJAB
LAHORE,PAKISTAN

2
3
ACKNOWLEDGEMENT

WearegratefultoAlmightyALLAH,whogaveusstrengthandprovideduswithalltheresources,
sothatwemaketheirproperuseforthebenefitofmankind.Hekeepsprovidinguswiththeproper guidance
and all the resources to keep helping themankind.

We are thankful to our teachers for their guidance and support. Especially we would like to thank
our project supervisors Prof. RanaRiaz and Engr. Syed Muhammad Furqanand whose
encouragement, guidance and support from initial to final stage has enabled us to complete the
project. Always being available, even at very odd times, listening to our problems and solving
them even at very late night.For their confidence in our abilities, we wish to thank them from our
hearts and wish them successful and a blessed life. Ameen.

We also wish to thank our parents who stood by us throughout this project helping us in any way
possible for them. Their kindness, blessings, advice, love and support helped us through this time
alot.

May ALLAH Almighty Bless all.Ameen

4
Contents
Chapter 1 ..................................................................................................................................................... 7
Introduction ................................................................................................................................................. 7
1.1 Project Introduction: ............................................................................................................................ 7
1.1.1 Industrial Perspective of Project: ............................................................................................. 8
1.1.2 Domestic Usage of the Project: ................................................................................................. 8
1.2 Literature Survey of the Project: .............................................................................................. 8
1.2.1 Starting Point of Technology: ....................................................................................................... 8
1.2.2 Speed Droop & Control through Regulating Unit: ............................................................... 10
1.2.3 Current Status of Technology:................................................................................................ 10
1.3 Problem Statement: ...................................................................................................................... 13
1.4 Methodology of Project: ........................................................................................................... 13
1.5 Description of Block Diagram: .................................................................................................. 14
Chapter 2 ................................................................................................................................................... 16
Hardware Setup and Description ............................................................................................................ 16
2.1 DC Shunt Motor: ............................................................................................................................ 16
2.1.1 Function and Use in Project:................................................................................................... 16
2.1.2Working Principle:.................................................................................................................... 16
2.1.3: Testing of the Device: ............................................................................................................. 17
2.1.4 Symbol & Picture:.................................................................................................................... 17
2.1.5 Rating:....................................................................................................................................... 18
2.2 3-phase Synchronous Generator: .................................................................................................. 18
2.2.1 Function and use in project: ................................................................................................... 18
2.2.2 Working Principle: .................................................................................................................. 18
2.2.3 Testing of Device: ..................................................................................................................... 20
2.2.4 Rating:....................................................................................................................................... 20
2.2.5 Circuit Diagram and Symbol: ................................................................................................. 21
2.3. Micro-Controller: .......................................................................................................................... 21
2.3.1 Function and Use in Project:................................................................................................... 22
2.3.2 Working Principle (Architecture): ......................................................................................... 22

5
2.3.3 Pin Configuration: ................................................................................................................... 22
2.3.4 Testing of Device: ..................................................................................................................... 22
2.4 Variable DC supply: ....................................................................................................................... 22
2.4.1 Function and Use in Project:................................................................................................... 23
2.4.2 Components used: .................................................................................................................... 23
2.4.2 Working Principle: .................................................................................................................. 23
2.4.3 Symbol and Circuit Diagram: ................................................................................................. 24
2.5 Boost Converter Circuits: .............................................................................................................. 24
2.5.1 Function and use in project ..................................................................................................... 24
2.5.2 Electronic Circuit:.................................................................................................................... 25
2.5.3 Calculation: .............................................................................................................................. 26
2.5.4 Testing of component: ............................................................................................................. 29
2.6 Voltage Divider Circuit: ................................................................................................................. 29
2.6.1 Function and Use in Project .................................................................................................... 29
2.6.2 Calculation: .............................................................................................................................. 30
2.6.3 Electronic Circuit:.................................................................................................................... 30
2.6.3 Testing of device:...................................................................................................................... 30
Chapter3 .................................................................................................................................................... 31
Software Description ................................................................................................................................ 31
3.1 Introduction to Software: ............................................................................................................... 31
3.2 Description of Programming Flow Chart:.................................................................................... 36
Chapter 4 ................................................................................................................................................... 37
Integration of Software & Hardware Section ........................................................................................ 37
Chapter 5 ................................................................................................................................................... 40
Results & Conclusions .............................................................................................................................. 40
5.1 Results Obtained: ............................................................................................................................ 40
5.2 Conclusion: ...................................................................................................................................... 40
5.2.1 Implementation Difficulties: ................................................................................................... 40
5.2.2 Recommendations for Future Work: ..................................................................................... 41
5.2.3 Cost Analysis for AGC & AVR: ............................................................................................. 41
Appendix A:............................................................................................................................................... 42
Code for boost circuit ............................................................................................................................... 42

6
Appendix B: ............................................................................................................................................... 43
List for Tables ........................................................................................................................................... 43
Appendix C:............................................................................................................................................... 43
List of Figures............................................................................................................................................ 43
References:................................................................................................................................................. 44
Datasheets: ................................................................................................................................................. 44

Chapter 1

Introduction
1.1 Project Introduction:
Our Project is to make a motor generator setup with AVG (Automatic Voltage
Regulator) and AGC (Automatic Generation Control). In simple words, it is the type of
electricity generation in which both speed of motor and excitation of generator is
controlled automatically according to load. Controlling of both parameters is done by
using simple microcontroller known as ARDUINO.

Why we want to do this project?


We want to do this as our final year project because of following reasons:
i. High design element (we have to design voltage sources, driver circuits,
converters etc.)
ii. Since it is cost-effective and power efficient generation setup so it is very useful
on both domestic and industrial level.
iii. We can implement most of our engineering knowledge in doing this project
because it needs good hardware and software integration. So we can challenge our
coding, designing and problem solving skills.
7
1.1.1 Industrial Perspective of Project:
This is one of those projects which are highly used on industrial scale because generation is the
most important thing of any electrical industry. Combined AVR and AGC controlling technique
is more appropriate generation approach as compared to others because it provides protection as
well as reliability of service. It will prevent frequency variation and voltage fluctuation when
load is suddenly changed. Hence it is used in most of the power stations.
1.1.2Domestic Usage of the Project:
AGC is used in modern hybrid cars. It is used to give different signals to the engine to work
accordingly when brakes are applied or speed is changed.
AVR is commonly used in small generators which are used in homes or offices to avoid
frequency variation.

1.2 Literature Survey of the Project:


1.2.1 Starting Point of Technology:
Ward Leonard Method of Speed Control:
It is the simple DC armature speed control method introduced in 1891 by Henry Ward Leonard.
This system consists of DC motor M1 powered by generation G. Now, the speed of M1 is
controlled through the voltage applied on its armature. It is done by the motor generator setup
same as shown in the figure. As it is applied on both AC or DC system it is widely used to
control the speed of motor
Principle of Ward Leonard Method:
A simple Ward Leonard System can be shown by following figure:

8
Figure 1:Ward Leonard Speed Control

The speed of motor M1 is to be controlled which is powered by the generator G. The shunt field
of the motor M1 is connected across the DC supply lines. Now, generator G is driven by the
motor M2, when the output voltage of the generator is fed to the motor M1 then the motor starts
to rotate. When the output voltage of the generator varies then the speed of the motor also varies.

Advantages of Ward Leonard System:


1. Good to ensure the rated speed from zero to normal
2. Motor can be run with same acceleration and can be controlled on both sides of rotation
3. Speed Regulation is good.
4. Inherent braking property.
Disadvantages of Ward Leonard System:
1. As we need a separate gen-set system so it is very costly solution.
2. Efficiency is not good when it is light loaded.
3. Due to large size it acquires more area.
4. Maintenance required very frequently
5. Noisy system

9
Application of Ward Leonard System:
This is used where wewant a wide and sensitive control of motor speed in both the directions. So
it is usually colliery winders, heavy cranes, electronic excavators, mining machines, steel mills,
paper machines, diesel-locomotives, etc. [1]

1.2.2 Speed Droop & Control through Regulating Unit:


Before introduction of AGC and AVR control of the generating units the power generation plants
are used according to their droop characteristics each unit has its own properties for regulation
the parameters when the load on the system is changed. Although it was a very complex method
to check and synchronize different generating units according to their characteristics but that was
the only option which has to be used at that time to ensure the stability and reliability of system.

This technique of speed control for DC motor was first introduced by Harry Ward Leonard in
1891 known as “Ward Leonard Control”. In the starting of 19th century this technique was
adopted by U.S navy. At that time, this control system provided solution to operate travellator
properly.
The system was widely used in World War 1 for locomotives operation and in World War 2 for
anti-aircraft radars. It was widely used for elevators until thyristordrives became available in
1980’s.
Flywheel is also the modification of “Ward Leonard Control” which is most common thing used
in mechanical systems to store rotational energy.[2]
1.2.3 Current Status of Technology:
This technology is currently used in generator’s which are used in industries for the reliability
of service and in hybrid cars to maintain the speed. But most important use of this technique is in
MAPS (Multi Area Power Systems) in which more than one area is served by one power station
so we have to regulate the voltage according to the load variation and also we have to maintain
the frequency level. To implement AGC and AVR control we use “PID Controllers” and “Fuzzy
Logic Circuits”.

10
Fuzzy Logic Circuits Using PID Controllers:
Fuzzy logic controllers in simple words are the next stage of PID controllers as they are much
faster and reliable than the PID so we use PID controllers along fuzzy logic circuits to enhance
the controlling of system we cannot give an extensive overview on this but we can give an
example to illustrateit. [6]

Figure 2: Simple PID

Figure 3:PID with Fuzzy Controller

11
Figure 4: Results Difference

Where,
PSS=Power system stabilizer model
PID=Proportional Integral Derivative Controller
AGC and AVR Integration:
Now a days AGC and AVR is used frequently where we have generation of power we have to
use them because using both techniques will give the following advantages
 To meet load power requirements both reactive and active at the same time
 Reliability

Figure 5: AGC & AVR Integration

The main reason to implement both loops is because the generating unit will maintain both
desired frequency and output required.[7]

12
1.3Problem Statement:
The problem is to control the speed of the DC shunt motor and excitation of the
synchronous generator in such a way that we get controlled variable output with constant
frequency when load is changed.

1.4 Methodology of Project:


We are going to complete this project by following these steps:
I. To import the motor-generator setup of desired rating.
II. To perform no load and short circuit test of the coupled machine.
III. Designing of two separate DC supplies (includes both designing of driver and
converter circuit).
IV. Designing of load and selection of protection scheme.
V. To buy the sensors and other components of desired rating

Components include
a) Voltage Sensor
b) Frequency Sensor
c) Transistors
d) Resistors
e) Inductors
f) Capacitors
g) Battery
h) WPL Software
i) Connecting Wires
j) LED bulbs for load
k) Fast Recovery Diodes
l) Logic MOSFET’s

VI. Testing of each component separately.


13
VII. To have a PC or laptop which has MATLAB, LABVIEW and WPL software
installed in it.
VIII. Coding for PLC control.
IX. Implementation by integrating hardware and software.
X. Performance testing
XI. To find solutions of issues if any

1.5 Description of Block Diagram:

Figure 6: Block Diagram of AGC & AVR Control

14
 First thing we have to do is to start DC motor and to excite the generator’s field on the
rated speed and rated voltage using variable DC supplies to start the generation process.
 Then speed of shunt motor rotor is measured through tachometer and the signal is given
to the controller by using signal condition circuitry.
 Before transmitting the generated power to the load current, voltage and frequency is
measured through sensors and the signals generated from each sensor is given to the
controller after signal conditioning.
 This whole information is then stored and displayed on the PC.
 By changing the load physically rotor’s speed is changed by which both frequency and
generated voltage is changed.
 To maintain the frequency and to have the desired value of voltage signals are given to
the both DC supplies through the controller. This will change the excitation level of
generator and motors rotor speed accordingly.
 This whole process will maintain the frequency and will also generate the desired output
voltage according to the variation in load.

15
Chapter 2

Hardware Setup and Description

Components of AVR and AGC Controlled Motor Generator Setup


The main components of AGC and AVR controlled motor generator setup are
o DC Shunt Motor: Work as a prime mover to start the synchronous generator.
o Synchronous Generator: To generate desired output to operate load.
o Arduino (UNO R3): For hardware and software integration.
o Tachometer: For measuring the speed of motor.
o Diodes: Used in bridge rectifier circuits for rectification purpose.
o MOSFETS: Used in driver circuits for operating motor.
o Resistors: Used in Voltage divider circuitry for measuring the voltages and for resistive
load.
o Instrumentation Amplifier: To measure the current’s real time values.
o Capacitors: For discharging and charging used in boost converter and for capacitive load.
o Inductor: Used in boost converter and for inductive load.
Let us discuss each component we mentioned here in detail one by one

Explaining the Block Diagram Parts:


2.1 DC Shunt Motor:
2.1.1 Function and Use in Project:
The speed regulation is the main function for which the DC shunt motors are used. We are also
using this type of motor in our project because we need speed control to get desired output when
load varies.
2.1.2Working Principle:
When voltage is applied to the DC shunt motor, because of high resistance of shunt winding, it
draws very low current. Shunt winding generated strong magnetic field because of it has higher
turn ratio. Also another strong magnetic field is generated by armature windings as well as high
current is also drawn by it. The interaction of both magnetic fields tends the motor to rotate. As
both magnetic fields grow stronger the rotational torque is also increase which will result in
increase of motor’s speed.

16
It has feedback mechanism to control its speed. As the armature rotates in a magnetic field, it
induces electricity. The EMF is generated by this action is opposite in direction to, thus limiting
the armature current. So the current through the armature is decreased and speed of the motor is
self-regulated.

2.1.3: Testing of the Device:


The device is tested through two tests:

1) Short Circuit Test

2) Open Circuit Test

By going through two tests we conclude that our motor is running good and it gives the same
results on the rated speed which are given by the specification sheet of motor.

2.1.4 Symbol & Picture:

Figure 7: Motor Symbol

17
Figure 8: Motor Circuit Diagram

Where A1 and A2 are armature brushes and F1 and F2 are field terminals.

2.1.5 Rating:

Table 1: Motor Rating

Power Rating 185 watts


Speed(rpm) 1600
Current Rating 1-1.5 max(4Amps)
Voltage Rating 110

2.2 3-phase Synchronous Generator:


2.2.1 Function and use in project:
It is used to give output for 3 phase loads usually coupled with motor which act as a prime
mover for it. We are using for generating the desired output to drive our loads.

2.2.2 Working Principle:


The working principle of synchronous generator is electromagnetic induction when the
conductor is moved inside the magnetic field the emf is induced in it in generator the conductor
is moved in the permanent magnet as shown in figure

18
Figure 9:Conductors Placed in Magnetic Field

We also know from the law of magnetic induction


𝑉 = 𝐵𝑣𝐿(𝑠𝑖𝑛󠆳𝜑)
whereφ is the angle between conductor and field B
Axis of rotation is a-b and now we will see the different scenarios to know the relation of field and
conductor position

Figure 10: Conductor Perpendicular to Magnetic Flux

Now here is the flux is maximum because they are perpendicular to each other. So we can
conclude that when it is parallel flux is zero and when its perpendicular it is maximum and vice
versa. If we have permanent magnet in three pairs we can have the output for three phase in each
phase the zero crossing is changed hence it is very useful.

Figure 11: Conductor and Flux is Parallel

But in the above figure we have seen that the field and conductor are in parallel to each other the
induced emf is zero and then again it will have the same rotation again and again now if we have
permanent magnets for three armature windings then we have the output as follows.[4]

19
Figure 12: Synchronous Generator Output

2.2.3 Testing of Device:


Again we adopted the same procedure and test our device using two common tests
1)Short Circuit Test
2) Open Circuit Test
Performing both tests gives some deviation from the given data but it was 2-3%
change so which is applicable

2.2.4 Rating:

Table 2: Generator Rating

Power Rating 175 watts


Speed(rpm) 1500 rpm
Current Rating 3 Amps
Voltage Rating 220 volts

20
2.2.5 Circuit Diagram and Symbol:

Figure 13: 3-Phase Equivalent Circuit of Generator

VF is dc field voltage and R is field resistance while LF is the filed inductance


RA and XS is the resistance and inductance for each phase.

Figure 14: Generator Symbol

2.3. Micro-Controller:
Arduino UNO:

21
2.3.1 Function and Use in Project:
We are using Arduino as a micro-controller in our project because it is very easy to use and also
its software is very convenient. The function of Arduino is to integrate the hardware and
software part. We are using this to control the output of our system using coding.

2.3.2Working Principle (Architecture):

Arduino uses Harvard architecture where we have to separate memories one is program code
memory and program data memory. Code storage is in the flash program memory and data
stored in the data memory. The simple Arduino has ability to store 32KB of flash memory
whereas 2KB of SRAM as well as 1KB of EEPROM. Clock speed of ATMEGA is 16MHz[3]

2.3.3Pin Configuration:

Figure 15: Arduino Pin Layout

For schematic of Arduino UNO R3 see appendix C.

2.3.4 Testing of Device:


Arduino is checked by using different pins one by one and using pc giving different commands
through the software.

2.4 Variable DC supply:


In this project we have to use two variable DC supplies separately for AGC and AVR.

22
We made DC supplies using bridge rectifier IC’s to obtain desired value of DC we use a higher
value of current and voltage.
2.4.1 Function and Use in Project:
Bridge rectifiers are used for the smooth rectification of the AC. In our project we are using them
to make two DC supplies for controlling purpose.
2.4.2 Components used:
To make supplies we use the followings.

Table 3: Components for DC Supply

Components Model No
Bridge Rectifier IC KBPC3506

Wires Size 3/29

2.4.2 Working Principle:


The functioning of the bridge rectifier can be demonstrated through the following diagram easily
In the positive cycle D1 and D2 are on the other diodes are off at this point. On the other half
cycle, they are off and the diodes D3 and D4 are on by using this we have a DC at the output.

Figure 16: Bridge Rectifier Operation

23
2.4.3 Symbol and Circuit Diagram:

Figure 17: Symbol of Bridge Rectifier

Figure 18: Circuit Diagram of Bridge Rectifier

For schematic and pin configuration see appendix C.

2.5 Boost Converter Circuits:


2.5.1 Function and use in project
As the output is varied the frequency is dropped and we have to make it stable on the rated value.
So we are using two boost circuits separately for AGC and AVR.
Working Principle:
The principle of boost converter is quiet simple when the switch is ON the inductor is charged
and when the switch ‘S’ is off the charged inductor will give the power to the load diode will
prevent the back flow of power.

The basic principle of a Boost converter consists of 2 distinct states (see figure 2.9):

 In the On-state, the switch S is closed, resulting in an increase in the inductor current;
 in the Off-state, the switch is open and the only path offered to inductor current is through
the fly back diode D, the capacitor C and the load R. This results in transferring the energy
accumulated during the On-state into the capacitor.

24
 The input current is the same as the inductor current as can be seen in figure 2.9. So it is not
discontinuous as in the buck converter and the requirements on the input filter are relaxed
compared to a buck converter.[5]

2.5.2 Electronic Circuit:

Figure 19: Circuit of Boost Converter

Instead of IC we use logic MOSFET in both circuits because handling and integrating of IC is
more difficult as compared to the simple MOSFET.We are using two boost circuits with the
following ratings

Table 4: AGC Boost Circuit Components

Component Rating/Name
Capacitor 5.6µF (200volts)
Inductor 3.3mH (5Amp)
Diode RF150
Logic MOSFET IRFP 4310-Z
Switching MOSFET IRFP 460
Heat Sink With Fan 12V dc

25
Table 5: AVR Boost Circuit Components

Component Rating/Name
Capacitor 180µF (200volts)
Inductor 1.02mH (5Amp)
Diode RF150
Logic MOSFET IRFP 4310-Z
Switching MOSFET IRFP 460
Heat Sink With Fan 12 volts DV

All the data sheets are attached in datasheets sections

2.5.3 Calculation:

Design of Boost Converter for AVR


For this we need
𝑉𝑜 =70V
𝑉𝑖𝑛 =20V
Finding duty cycle 𝑫
𝑉𝑜 1
= eq 2.1
𝑉𝑖𝑛 1−𝐷
Putting the values in equation 2.1
70 1
=
20 1 − 𝐷

𝑫=.0714
As our required current
𝐼𝑟𝑎𝑡𝑒𝑑 = 3.5A
As we know,
𝛥𝐼𝑟𝑎𝑡𝑒𝑑 = 0.2 × 𝐼𝑟𝑎𝑡𝑒𝑑
So,

26
𝛥𝐼𝑟𝑎𝑡𝑒𝑑 = 0.2 × 2.5
𝛥𝐼𝑟𝑎𝑡𝑒𝑑 =0.7A

Finding the value of inductor


Nominal Frequency
𝑓=20Khz
𝑉 ×𝐷
𝐿 = 𝛥𝐼 𝐷𝐶 eq 2.2
𝑟𝑎𝑡𝑒𝑑 ×𝑓

By putting the values, we get


20 × .714
𝐿=
0.7 × 20 × 103

𝑳 = 𝟏. 𝟎𝟐 𝒎𝑯

Finding the value of capacitor

𝐼
𝑟𝑎𝑡𝑒𝑑 ×𝐷
𝐶 = 𝑓×.02×𝑉 eq 2.3
𝑜

By Putting the values, we get

3.5 × .714
𝐶=
20 × 103 × 70

𝑪 = 𝟏𝟕𝟖. 𝟓µ𝑭

Design of Boost Converter for AGC

27
For this we need
𝑉𝑜 =150V
𝑉𝑖𝑛 =50V
Finding duty cycle 𝑫
𝑉𝑜 1
= eq 2.1
𝑉𝑖𝑛 1−𝐷

Putting the values in equation 2.1

150 1
=
50 1−𝐷

𝑫 =0.0667
As our required current
𝐼𝑟𝑎𝑡𝑒𝑑 = 2.5A
As we know,
𝛥𝐼𝑟𝑎𝑡𝑒𝑑 = 0.2 × 𝐼𝑟𝑎𝑡𝑒𝑑
So,
𝛥𝐼𝑟𝑎𝑡𝑒𝑑 = 0.2 × 2.5
𝛥𝐼𝑟𝑎𝑡𝑒𝑑 =0.5A

Finding the value of inductor


Nominal Frequency
𝑓=20Khz
𝑉 ×𝐷
𝐿 = 𝛥𝐼 𝐷𝐶 eq 2.2
𝑟𝑎𝑡𝑒𝑑 ×𝑓

By putting the values, we get


50 × .667
𝐿=
0.5 × 20 × 103

28
𝑳 = 𝟑. 𝟑 𝒎𝑯

Finding the value of capacitor

𝐼𝑟𝑎𝑡𝑒𝑑 × 𝐷
𝐶=
𝑓 × .02 × 𝑉𝑜

By Putting the values, we get

2.5 × .664
𝐶=
20 × 103 × .02 × 150

𝑪 = 𝟓. 𝟓µ𝑭

2.5.4 Testing of component:


We tested both boost circuits separately to get the desired outputs we faced some problem with
the switching MOSFET’s at the starting because they burnt because of heating so we used heat
sinks along with small fans and solved the issue

2.6 Voltage Divider Circuit:


2.6.1 Function and Use in Project
As we know it is used to have some desired voltage at the point by having the combination of
two or more resistors.
We are using voltage divider circuit at the output of generator to give feedback through the
Arduino
As Arduino can only bear 5 volts so we are having a VDR circuit for signal conditioning.

29
2.6.2 Calculation:
As we have to maintain voltages under 5 volts so we are using Vo=3.6 volts
Set R1=1 kΩ
Vo=3.6 volts
Vin=120 volts
Finding R2
Using formula for VDR

𝑅2
𝑉𝑜 = 𝑉𝑖𝑛 × 𝑅 eq 2.4
2 +𝑅1

Putting the values, we get


𝑅2
3.6 = 180 ×
𝑅2 + 1 × 103
R2=47kΩ

We used 2 Watt resistors since the current rating is high


2.6.3 Electronic Circuit:

Figure 20: Voltage Divider Circuit

2.6.3 Testing of device:


We test the circuit various times for the given voltages and it gives the required results
30
Chapter3

Software Description
3.1 Introduction to Software:
We are using Arduino for generating PWM signal to control our switching circuit. Here is a
slight intro about Arduino and PWM signal.

It is an open source controller hardware and software integrated. Arduino can perform many
functions by reading the input. We can use our board to make various outputs by using the
micro-controller programming language. Algorithm depends upon your approach and the wiring
you used. To use it we have to use IDE software.

Arduino is used by students, professionals and others to perform various functions for their
projects daily which includes simple and complex instructions as well.

Arduino was born at the Ivrea Interaction Design Institute as an easy tool for fast prototyping.
All Arduino boards are completely open-source, providing its user the ability to fulfill a set of
instructions according to their needs and adapt accordingly. This is open source and hence used
widely over all the world.

PWM works with progression of DC square wave with zero to one ratio. The on time of PWM can be
very somewhere in 0 to 100%.Now, the varied power is transferred to the load, if it is passed through
the filter the given voltage would be proportional to PWM.

31
Figure 21: PWM Duty Cycle

Arduino IDE is software that carries a text editor for writing code and a series of toolbars to help
refine our code. The codes written in IDE are called as sketches. The sketches are typed in text
editor. Message area gives feedback as to what is happening, it can display errors. The screen
displays text form output by Arduino IDE, including error messages and other related
information. The toolbar buttons permit us to confirm and upload programs or create and save
sketches, and open the serial monitor for further details. Arduino IDE provides software library
from wiring project which give many procedures of common input and output. [9]

32
Figure 22: Software Interface

Arduino UNO is based on ATmega 328P.Contains 14 digital input/output pins out of


which 6 are for PWM and 6 analog inputs also a 16MHz quartz crystal a USB
connection port and the power port on the other side it has small reset button and an
ICSP header. The maximum resolution of its PWM is 10bit such that it can make 1024
intervals in a cycle. If we use 8 bit cycle it will use 256 equal intervals and if we use 4
it will use only 32 intervals. So we can say that Arduino has all the things which a
micro-controller should have.
divide a half sine wave into ‘n’ sections(segments) to generate PWM signals according to the
average value of each section. If T is the time for complete cycle of Sine wave, T/2 is the time
for a half cycle, and T/2n is the time for each section. We update the PWM Values (the number
of intervals constituting the ON-time) after every T/2n time to generate a Sinusoidal PWM for a

33
half cycle. The other half cycle is generated by reversing the order of the sections constituting
the half cycle
I have used 50 Hz frequency in this project. 50 Hz means time period of sine wave will be 20ms
and the time period of half cycle will be 10 ms, which is used for both positive and negative
cycles. But the total time of all pulses should be equal to 10ms (time period of half cycle of sine
wave).

Load the Code to PIC Microcontroller:


 Connect your Arduino using the USB cable.

 Choose Tools→Board→Arduino Uno to find your board in the Arduino menu.

 Open the Arduino software. This shows the menu bar with file, functions, open, save and setting
options.

 You have to choose the serial port on which it is connected

 Now to go to upload button

34
Figure 23: Programming Flow Chart

35
3.2 Description of Programming Flow Chart:
1. First we initialize the variables.
2. Then set the
3. duty cycle.
4. Call the function of the duty cycle.
5. Then increment in the duty cycle.
6. If the duty cycle is less than or equal to 100 percent, then call function of the duty cycle.
Ifnot, then decrement in the duty cycle and then call the function.
7. If the duty cycle is greater than or equal to zero then decrement the duty cycle, if not then call
the function.

Resistive power control circuit is not power efficient so mostly PWM controller circuits are used.
If a PWM signal is passed through a filter, the resultant output is the dc voltage which varies
proportionally with the duty cycle of the PWM.The Arduino is working here for producing for
control signals for driver circuitry. We have two square waves and two level PWM at 180
degrees which are out of phase. For controller to give the desired output it has to be
programmed. This is a simple concept implemented with Arduino. For instance, we have 50Hz
sinusoid with unity magnitude and it is multiplied by impulse train of 5000Hz so we have
complete cycle of sinusoid contains 100 impulses 5000Hz can be produce in the same fashion. [4]

36
Chapter 4

Integration of Software & Hardware Section


The detail of this chapter includes how the software and hardware interact with each other in order to
provide the type of response we require. Our purpose is to vary load on the generator due to which the
voltage and frequency will change which are to be kept constant automatically.

Controller
excitation
equal to set
point ?
(Arduino)
Motor Generator
connected to
excitation excitation
gates of
MOSFETS

AGC boost AVR boost


circuit Keep PWM Vary PAGC circuit
no boost circuit

yes no

stant yes
yes no
Is excitation
Motor equal to set Generator

Is excitation point ?
equal to set
point ?

Voltage and
Frequency Load
37
being
monitored

Figure 24: Process Flow Chart


 The basic purpose is to provide enough excitation to the motor generator set upon load
variation so as to get fixed voltage and frequency on the output end.
 We have two fixed DC sources each connected to motor and generator excitation through
a boost convertor circuit.
 In boost circuits we have used MOSFETS as switches to help provide required excitation
to the inductor and capacitor. The gate of MOSFET is provided with varied PWM signals
from an Arduino which has a feedback from the load side and varies accordingly by
changing duty cycle automatically.
 Similar architecture of control is implemented with the motor excitation. The load end is
monitored with two things; voltage and frequency, feedback of which is given to arduino
that controls motor speed on the basis of frequency variation and generator excitation on
the basis of voltage variation.
 Firstly, we vary the load due to which the frequency and voltage vary and the error signal
is sent back to the Arduino which compares it to the set point value and then varies PWM
width of its output signal by changing duty cycle automatically in order to achieve the
desired excitation from boost convertor circuit.
 The output of Arduino is connected to the gate of MOSFET which switches accordingly
and helps inductor connected ahead generate enough excitation for the motor or generator
to bring the error signal back to zero.

38
Motor-Generator AGC Boost Frequency Meter
Setup Tachometer

AVR Boost Load

Arduino with VDR Circuit Switch Board for Controlling Load

Watt Meter for Output DC- Volt Meter


for Motor Excitation

Figure 25: Real Time Image of Project

39
Chapter 5

Results&Conclusions

5.1 Results Obtained:


This Chapter emphasis on the observations and the results that were obtained while testing
different components of the project. The result includes practical readings of the project and also
covers the implementation difficulties encountered in the project.
By the time we were done with our project, the output of generator was very much stable. Upon
load variation we experienced change in voltage and frequency which was quickly encountered
by the arduino coding and was brought back to normal state with respect to the connected load.

5.2 Conclusion:
Constant and regulated power supply is a very crucial demand. If the power generated is not up
to standards in terms of frequency and voltage, then there could be disastrous results. Our project
helps control both necessary elements in an efficient and cost effective way, for which we used
basic elements like inductors, capacitors, resistors and Arduino. The only expensive thing we
used was the motor generator set.

5.2.1 Implementation Difficulties:

Issues with Motor Generator Set:


Since motor generator set are mechanical in nature there are many factors that can affect their
efficiency. Some of them include,
 Oscillation free DC excitation
 Carbon Brushes
 Motor generator connecting shaft
 Lubricated parts which come in contact while operating

40
Issues with Boost Converter:
Motor and generator both require currents up to 8 amperes initially and then later on decrease to
less than 1 ampere. Due to high initial current the MOSFET of boost convertor circuit gets
heated up quick and even burns at times. To solve this problem, we have used a big heat sink
along with a fan to keep the MOSFET cool enough to operate effectively.

5.2.2Recommendations for Future Work:

1. Better quality filter could be used in order to get oscillation free dc excitation.
2. High tech elements may be used to reduce losses and make controlling more efficient.
3. Fuzzy controllers can also be used instead of the Arduino, as the fuzzy controllers have
adaptive behaviour so they can change the working conditions themselves.

5.2.3 Cost Analysis for AGC &AVR:

Table 6: Cost Analysis

COMPONENT NAME COST


SOURCE DC 3000
BOOST CONVERTER 1000
RECTIFIER 200
TACHOMETER 1000
VOLT-METERS 1000
VOLTAGE SENSORS 1000
MOTOR GENERATOR SETUP 75000
MISCELLENIOUS (NUTS,SCREWS,etc) 5000
MOSFETS,DIODES 3000
FREQUENCY METER 2000
BULBS 1500
SWITCHES AND WIRES 5000
TOTAL 98700

41
Appendix A:

Code for boost circuit


int feedback = A1; //The feedback input is A1
int PWM = 3; //Digital pin D3 por PWM signal
intpwm = 200; //Initial value of PWM width

void setup() {

pinMode(feedback, INPUT);
pinMode(PWM, OUTPUT);
TCCR2B = TCCR2B & B11111000 | B00000001; // pin 3 and 11 PWM frequency of
31372.55 Hz
Serial.begin(9600); //BaudRate
}

void loop() {
float voltage = 440; //We read the value of the potentiometer, which is the desired value
float output = analogRead(feedback); //We read the feedback, which is the real value
//float output1=map(output,0,1023,0,255);
Serial.print (output);
Serial.print (" ");
//If the desired value is HIGHER than the real value, we increase PWM width
if ((voltage > output))
{
pwm = pwm-1;
pwm = constrain(pwm, 54, 254);
}
//If the desired value is LOWER than the real value, we decreaase PWM width
if (voltage < output)
{
pwm = pwm+1;
pwm = constrain(pwm, 54, 254);
}
analogWrite(PWM,pwm); //Finally, we create the PWM signal
Serial.print("\t PWM is = ");
Serial.println(pwm);
//Serial.print("\t Voltage of the given source = ");
//Serial.print(voltage);
//Serial.print("\t Voltage of the feedback is = ");

42
//Serial.print(output);
delay(100);
}

Appendix B:

List for Tables


Table 1: Motor Rating .............................................................................................................................. 18
Table 2: Generator Rating ....................................................................................................................... 20
Table 3: Components for DC Supply ...................................................................................................... 23
Table 4: AGC Boost Circuit Components .............................................................................................. 25
Table 5: AVR Boost Circuit Components............................................................................................... 26
Table 6: Cost Analysis .............................................................................................................................. 41

Appendix C:

List of Figures
Figure 1: Ward Leonard Speed Control ................................................................................................... 9
Figure 2: Simple PID ................................................................................................................................ 11
Figure 3: PID with Fuzzy Controller ...................................................................................................... 11
Figure 4: Results Difference ..................................................................................................................... 12
Figure 5: AGC & AVR Integration ......................................................................................................... 12
Figure 6: Block Diagram of AGC & AVR Control................................................................................ 14
Figure 7: Motor Symbol ........................................................................................................................... 17
Figure 8: Motor Circuit Diagram ............................................................................................................ 18
Figure 9:Conductors Placed in Magnetic Field ...................................................................................... 19
Figure 10: Conductor Perpendicular to Magnetic Flux ........................................................................ 19
Figure 11: Conductor and Flux is Parallel ............................................................................................. 19
Figure 12: Synchronous Generator Output............................................................................................ 20
Figure 13: 3-Phase Equivalent Circuit of Generator ............................................................................. 21
Figure 14: Generator Symbol .................................................................................................................. 21
Figure 15: Arduino Pin Layout................................................................................................................ 22
Figure 16: Bridge Rectifier Operation .................................................................................................... 23
Figure 17: Symbol of Bridge Rectifier .................................................................................................... 24
Figure 18: Circuit Diagram of Bridge Rectifier ..................................................................................... 24
Figure 19: Circuit of Boost Converter .................................................................................................... 25
Figure 20: Voltage Divider Circuit .......................................................................................................... 30
Figure 21: PWM Duty Cycle .................................................................................................................... 32
Figure 22: Software Interface .................................................................................................................. 33
Figure 23: Programming Flow Chart ..................................................................................................... 35

43
Figure 24: Process Flow Chart ................................................................................................................ 37
Figure 25: Real Time Image of Project ................................................................................................... 39

References:
1.(https://www.electrical4u.com/ward-leonard-method-of-speed-control/)
2(.https://en.wikipedia.org/wiki/Automatic_Generation_Control#History)
3.(https://www.elprocus.com/bridge-rectifier-circuit-theory-with-working-operation/)
4(.https://www.elprocus.com/synchronous-generator-construction-and-working/)
5..(https://en.wikipedia.org/wiki/Fuzzy_electronics)
6. (https://www.researchgate.net/figure/Genetic-algorithm-flowchart-III)
7.( https://electronics.stackexchange.com/questions/281776/power-generator-droop-
characterstics)
9.(https://learn.sparkfun.com/tutorials/what-is-an-arduino)
10.(http://www.learnabout-electronics.org/PSU/psu32.php)
11. S. Hayashi, "Auto-tuning fuzzy PI controller", Proc. Int. Fuzzy Systems Association Conf.,
pp. 41-44, 1991.

12. G. K. I. Mann, B.-G.Hu, R. G. Cosine, "Analysis of direct action fuzzy PID controller
structures", IEEE Trans. Syst. Man Cybern. B, vol. 29, pp. 371-388, June 1999.

.13.M. Mizumoto, "Realization of PID controls by fuzzy control methods", Fuzzy Sets Syst., vol.
70, pp. 171-182, 1995.

Datasheets:

44

You might also like