Sie sind auf Seite 1von 37

FUZZY ENERGY REGULATOR PROJECT REPORT 2010

for sale
ABSTRACT

kerala Energy meters are used to indicate and/or record the


amount of energy consumed by a circuit. It has a great deal of importance when used for
kozhikode contact:
metering applications at home.
vimalramp@gmail.com
The proposed project takes care of the energy consumption in a house, and helps the
user to keep the energy bills at a predefined value on a per month basis. The monitor
keeps track of the usage, and switches off some low priority devices when the usage has
gone high.

A set of fuzzy rules decides the enabling /disabling of a set of devices. Devices are
categorized in 5 priority levels, and the activation of these sets are controlled by the fuzzy
logic rules.

The project uses a PIC microcontroller (16F873/16F73) for the implementation of the
logic. . Energy metering chip type AD7755/7751 is used for converting the energy
consumed to pulses recognizable by the microcontroller.

The energy IC takes the input from the energy meter , process it and provides a
pulsated output .The frequency of the pulsated output is propotional to the energy
consumed by the user. More the energy consumed more will be the frequency of the
output.By counting these pulses the energy consumed can be determined .

The fuzzy rules designed by the user are implemented using programmers .The
programmer can be connected to the IC and can be programmed either in assembly
language or in mikro c.

1
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

INTRODUCTION
Regulation of energy has been of great concern
today.In the world of automation and artificial intelligence ,usage of energy can be easily
regulated .Regulating the usage automatically is always an appreciated task.The project
emphasizes on developing an energy regulator based on artificial intelligence technique
known as Fuzzy logic.Here we regulate the energy usage by priority switching of
devices.We have divided the main power line to four using four switches consisting of
relays and transistors.The four lines are then switched according to the fuzzy rules which
can be decided by the user.The rules can be altered or modified according to the
preferences of the user.Once it has been programmed the user does not have to intervene
with the device.

The early approach on regulating the energy was using the


microprocessor which was programmed in ordinary programming method and did not
include implementation of intelligence.It was named Prepaid Energy Meters , provided a
revolutionary approach in the field but failed to provide an efficient method of
regulation.In this juncture the implementation of intelligence to the regulator became
necessary , Fuzzy logic being of the most efficient method of artificial intelligence based
on ‘operator knowledge’ has been found to be an apt method .

One of the primary objectives of an engineer is to endeavor


to deliver the best product or most efficient services at the lowest cost to the end user.
This system was found to meet the expected results.

2
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

BLOCK DIAGRAM

Controller
Display

AD 7755/51

Energy Metering Relay

(Switching)

Current Voltage
Transform Transform
er er

Power line

Poepower Line

3
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

ADE 7755 -ENERGY METERING IC

The ADE7755 is a high accuracy electrical energy


measurement IC. The part specifications surpass the accuracy requirements as quoted in
the IEC 1036 standard.

The only analog circuitry used in the ADE7755 is in the ADCs and reference circuit. All
other signal processing (for example, multiplication and filtering) is carried out in the
digital domain. This approach provides superior stability and accuracy over extremes in
environmental conditions and over time.

The ADE7755 supplies average active power information on the low frequency outputs,
F1 and F2. These logic outputs can be used to directly drive an electromechanical counter
or interface to an MCU. The CF logic output gives instantaneous active power
information. This output is intended to be used for calibration purposes or for interfacing
to an MCU.

4
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

The ADE7755 includes a power supply monitoring circuit on the AVDD supply pin. The
ADE7755 remains in a reset condition until the supply voltage on AVDD reaches 4 V. If
the supply falls below 4 V, the ADE7755 resets and no pulse is issued on F1, F2, and CF.

Internal phase matching circuitry ensures that the voltage and current channels are phase
matched whether the HPF in Channel 1 is on or off. An internal no load threshold ensures
that the ADE7755 does not exhibit any creep when there is no load.

The ADE7755 is available in a 24-lead SSOP package.

The energy metering IC ADE 7755 , provides a pulsated output of the power. This IC has
two inputs both of which are voltage inputs , hence to have the power output the input
current has to be converted to equivalent voltage by using the current transformer.The
both input voltages are then converted into digital signals by the ADC’s .Next a phase
correction circuit corrects the phase difference between current and voltage which is
further passed through a high pass filter to remove any ripples or noise.Now by using a
multiplier both input voltages are multiplied and power output is produced.This power
output is then converted into frequency by using a Digital to frequency Converter, and this
frequency provides the measurement of the power consumed.

5
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

FEATURES:

• High accuracy, surpasses 50 Hz/60 Hz IEC 687/IEC 1036


• Less than 0.1% error over a dynamic range of 500 to 1
• Supplies active power on the frequency outputs, F1 and F2
• High frequency output CF is intended for calibration and supplies instantaneous
active power

• Synchronous CF and F1/F2 outputs


• Logic output REVP provides information regarding the sign of the active power
• Direct drive for electromechanical counters and 2-phase stepper motors (F1 and F2)

6
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

PIC MICROCONTROLLER

PIC is a family of Harvard architecture microcontrollers


made by Microchip Technology, derived from the PIC1640 originally developed by
General Instrument's Microelectronics Division. The name PIC initially referred to
"Peripheral Interface Controller". It is available in different configurations viz 8bit,16
bit,32 bit

PICs are popular with developers and hobbyists alike due to their low cost, wide
availability, large user base, extensive collection of application notes, availability of low
cost or free development tools, and serial programming (and re-programming with flash
memory) capability.

PIC 16F73

It is a low cost 16 bit microcontroller available for general purpose uses. It has an inbuilt
ADC within it , but not used in the project.Features are listed below.

7
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Microcontroller Features:

• High performance RISC CPU.

• Only 35 single word instructions to learn.

• All single cycle instructions except for program branches which are two-cycle.

• Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle.

• Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes of Data


Memory (RAM).

• Interrupt capability (up to 12 sources).

• Eight level deep hardware stack.

• Direct, Indirect and Relative Addressing modes.

• Processor read access to program memory.

• Power-on Reset (POR).

• Power-up Timer (PWRT) and Oscillator Start-up Timer (OST).

• Watchdog Timer (WDT) with its own on-chip RC oscillator for reliable operation.

• Programmable code protection

• Power saving SLEEP mode

• Selectable oscillator options

• In-Circuit Serial Programming(ICSP) via two pins.

8
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Peripheral Features:

• Timer0: 8-bit timer/counter with 8-bit prescaler.

• Timer1: 16-bit timer/counter with prescaler, can be incremented during SLEEP via
external crystal/clock.

• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler.

• Two Capture, Compare, PWM modules

- Capture is 16-bit, max. resolution is 12.5 ns

- Compare is 16-bit, max. resolution is 200 ns

- PWM max. resolution is 10-bit.

• 8-bit, up to 8-channel Analog-to-Digital converter.

• Synchronous Serial Port (SSP) with SPI (Master mode) and I2C(Slave).

• Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI).

• Parallel Slave Port (PSP), 8-bits wide with external RD, WR and CS controls (40/44-pin
only).

• Brown-out detection circuitry for Brown-out Reset (BOR).

9
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

PIN DIAGRAM

PIN DESCRIPTION

Ø MCLR-(pin 1)

PIC16F7X devices have a noise filter in the MCLR Reset path. The filter will detect and
ignore small pulses. It should be noted that a WDT Reset does not drive MCLR pin low.
The behavior of the ESD protection on the MCLR pin has been altered from previous
devices of this family. Voltages applied to the pin that exceed its specification can result
in both MCLR Resets and excessive current beyond the device specification during the
ESD event. For this reason, Microchip recommends that the MCLR pin no longer be tied
directly to VDD.

Ø RESET

The PIC16F7X differentiates between various kinds of RESET:

10
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Ÿ Power-on Reset (POR)


Ÿ MCLR Reset during normal operation
Ÿ MCLR Reset during SLEEP
Ÿ WDT Reset (during normal operation)
Ÿ WDT Wake-up (during SLEEP)
Ÿ Brown-out Reset (BOR)
Some registers are not affected in any RESET condion. Their status is unknown on POR
and unchanged n any other RESET. Most other registers are reset to a RESET state” on
Power-on Reset (POR), on the MCLR and WDT Reset, on MCLR Reset during LEEP,
and Brown-out Reset (BOR). They are not affected by a WDT Wake-up, which is viewed
as the resumption of normal operation. The TO and PD bits are set or cleared differently
in different RESET situations, as indicated

Ø PORTA –(pin 2 to 7)and the TRISA Register-

PORTA is a 6-bit wide, bi-directional port. The corresponding data direction register is
TRISA. Setting a TRISA bit (= ‘1’) will make the corresponding PORTA pin an input
(i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRISA bit
(= ‘0’) will make the corresponding PORTA pin an output (i.e., put the contents of the
output latch on the selected pin).

Reading the PORTA register reads the status of the pins, whereas writing to it will write
to the port latch. All write operations are read-modify-write operations. Therefore, a write
to a port implies that the port pins are read, the value is modified and then written to the
port data latch.

11
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Ø GND –(pin 8)

Provide Ground to it.

Ø OSC1/CLKIN-(pin 9)

Oscillator crystal input/external clock source input

Ø OSC2/CLKOUT-(pin 10)

Oscillator crystal output. Connects to crystal or resonator in Crystal

Oscillator mode. In RC mode, the OSC2 pin outputs CLKOUT

which has 1/4 the frequency of OSC1, and denotes the instruction

cycle rate.

Oscillator:- CRYSTAL OSCILLATOR/CERAMIC RESONATORS In XT, LP or HS


modes, a crystal or ceramic resonator is connected to the OSC1/CLKIN and
OSC2/CLKOUT pins to establish oscillation. The PIC16F7X oscillator design requires the
use of a parallel cut crystal. Use of a series cut crystal may give a frequency out of the
crystal manufacturers specifications. When in HS mode, the device can accept an external
clock source to drive the OSC1/CLKIN pin.

OSCILLATOR TYPES:

The PIC16F7X can be operated in four different oscillator modes:

Ÿ LP Low Power Crystal


Ÿ XT Crystal/Resonator
Ÿ HS High Speed Crystal/Resonator
Ÿ RC Resistor/Capacitor

12
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Ø PORTC and the TRISC Register(pin 11 to 18)

PORTC is an 8-bit wide, bi-directional port. The corresponding data direction register is
TRISC. Setting a TRISC bit (= ‘1’) will make the corresponding PORTC pin an input
(i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRISC bit
(= ‘0’) will

make the corresponding PORTC pin an output (i.e., put the contents of the output latch on
the selected pin).

PORTC is multiplexed with several peripheral functions PORTC pins have Schmitt
Trigger input buffers. When enabling peripheral functions, care should be taken in
defining TRIS bits for each PORTC pin.

Ø Vss(pin 19)
Ground reference for logic and I/O pins
Ø Vdd(pin 20)
Positive supply for logic and I/O pins
Ø PORTB and the TRISB Register(pin 21 to 28)

PORTB is an 8-bit wide, bi-directional port. The corresponding data direction register is
TRISB. Setting a TRISB bit (= ‘1’) will make the corresponding PORTB pin an input
(i.e., put the corresponding output driver in a Hi-Impedance mode). Clearing a TRISB bit
(= ‘0’) will make the corresponding PORTB pin an output (i.e., put the contents of the
output latch on the selected pin).

Each of the PORTB pins has a weak internal pull-up. A single control bit can turn on all
the pull-ups. The weak pull-up is automatically turned off when the port pin is configured
as an output. The pull-ups are disabled on a Power-on Reset.

13
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

CORE ARCHITECTURE

Typical microcontroller device and its different subunits

The PIC architecture is distinctively minimalist. It is characterized by the following


features:

• Separate code and data spaces (Harvard architecture)


• A small number of fixed length instructions
• Most instructions are single cycle execution (4 clock cycles), with single delay
cycles upon branches and skips.
• A single accumulator (W), the use of which (as source operand) is implied (i.e. is
not encoded in the opcode).
• Data space mapped CPU, port, and peripheral registers

14
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

• A fairly small amount of addressable data space (typically 256 bytes), extended
through banking.
• All RAM locations function as registers as both source and/or destination of math
and other functions.
• A hardware stack for storing return addresses
• The program counter is also mapped into the data space and writable (this is used
to implement indirect jumps).

Unlike most other CPUs, there is no distinction between memory space and register space
because the RAM serves the job of both memory and registers, and the RAM is usually
just referred to as the register file or simply as the registers

15
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

VOLTAGE TRANSFORMER
Transformers (sometimes called "voltage transformers") are
devices used in electrical circuits to change the voltage of electricity flowing in the circuit.
Transformers can be used either to increase the voltage (called "stepping up") or decrease
the voltage ("step down").

The principle of electromagnetic induction is what makes transformers work. When a


current flows through a wire, it makes a magnetic field around the wire. Also, if a wire is in
a magnetic field that is changing, a current will flow in the wire. In a transformer, a wire
brings a current in one side. That current makes a magnetic field, which in turn produces a
current in a wire on the other side of the transformer. The second current flows out of the
transformer.

16
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Both wires in a transformer are actually wrapped in a coil around an iron core. The iron
core is immersed in an insulating oil bath which does not conduct electricity well. The
coils of wire are not physically connected. One wire has more turns in its coil than the
other wire. The different numbers of coils in the two wires causes the voltage and current
in each wire to be different from the other wire. By designing the transformer with just the
right number of coils in each wire, electrical engineers can control exactly how much the
transformer changes the voltage from the incoming to the outgoing wire.

Transformers only work with AC (alternating current) circuits. Since the AC current on the
"incoming" wire is constantly changing, the magnetic field it creates changes too. The
changing magnetic field is what forces current to flow in the "outgoing" wire.

Transformers are passive devices - they don't add power. A high voltage and low current
exits the transformer carrying almost the same amount of power along the transmission
lines that the incoming low voltage and high current did. Transformers are very efficient.
Under normal conditions they transmit about 99% of the power that enters them (about
1% of the power is lost as heat).

17
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

CURRENT TRANSFORMER
A current transformer raises or lowers the
current of an AC circuit in a predictable manner dependent on the ratio between the
windings. For example, a 100:1 ratio current transformer, 100 amps flowing throw the
primary transformer winding will result in a current of 1 amp through the secondary
winding. According to Ohm's Law, power is conserved; therefore, the effect of a current
transformer on voltage is inverse to its effect on current.

A current transformer consists of primary and secondary coils of wire wrapped around a
core, usually made of steel or a nickel alloy. Transformer windings are electrically
insulated from each other and from the core. The winding connected to the power supply is
called the primary winding. The transformer winding in which current is induced is called
the secondary winding.

As current passes through the primary winding, an electromagnetic field is produced which
induces a current in the electrically isolated secondary winding.The number of coils in a
winding determine the amount of current and voltage in the circuit. By altering the coil
ratio between the primary and secondary winding, a current transformer can alter the
current, either stepping it up or down, while conserving power.

18
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Metering Functions of a Current Transformer

Current across the secondary winding of a transformer is directly proportional to the


current across the primary winding. Direct measurement of current across the second
winding allows an indirect calculation of the current conducted across the primary
winding. Measurements may be used for calculating energy usage in power supply billing

The most common design of CT consists of a length of wire wrapped many times around a
silicon steel ring passed over the circuit being measured. The CT's primary circuit therefore
consists of a single 'turn' of conductor, with a secondary of many hundreds of turns. The
primary winding may be a permanent part of the current transformer, with a heavy copper
bar to carry current through the magnetic core. Window-type current transformers are also
common, which can have circuit cables run through the middle of an opening in the core to
provide a single-turn primary winding. When conductors passing through a CT are not
centered in the circular (or oval) opening, slight inaccuracies may occur.

Current transformers used in metering equipment for three-phase 400 ampere


electricity supply

Shapes and sizes can vary depending on the end user or switchgear manufacturer.
Typical examples of low voltage single ratio metering current transformers are either ring

19
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

type or plastic moulded case. High-voltage current transformers are mounted on porcelain
bushings to insulate them from ground. Some CT configurations slip around the bushing of
a high-voltage transformer or circuit breaker, which automatically centers the conductor
inside the CT window.

The primary circuit is largely unaffected by the insertion of the CT. The rated
secondary current is commonly standardized at 1 or 5 amperes. For example, a 4000:5 CT
would provide an output current of 5 amperes when the primary was passing 4000
amperes. The secondary winding can be single ratio or multi ratio, with five taps being
common for multi ratio CTs. The load, or burden, of the CT should be of low resistance. If
the voltage time integral area is higher than the core's design rating, the core goes into
saturation towards the end of each cycle, distorting the waveform and affecting accuracy

20
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

ENERGY METER
An electric meter or energy meter is a device that measures the amount of electrical
energy consumed by a residence, business, or an electrically-powered device.

Electric meters are typically calibrated in billing units, the most common one being the
kilowatt hour. Periodic readings of electric meters establishes billing cycles and energy
used during a cycle.

In settings when energy savings during certain periods are desired, meters may measure
demand, the maximum use of power in some interval. In some areas, the electric rates are
higher during certain times of day, to encourage reduction in use. Also, in some areas
meters have relays to turn off nonessential equipment.

The most common unit of measurement on the electricity meter is the kilowatt hour,
which is equal to the amount of energy used by a load of one kilowatt over a period of one
hour, or 3,600,000 joules. Some electricity companies use the SI megajoule instead.

Demand is normally measured in watts, but averaged over a period, most often a quarter
or half hour.

Reactive power is measured in "Volt-amperes reactive", (varh) in kilovar-hours. By


convention, a "lagging" or inductive load, such as a motor, will have positive reactive
power. A "leading", or capacitive load, will have negative reactive power.

Volt-amperes measures all power passed through a distribution network, including


reactive and actual. This is equal to the product of root-mean-square volts and amperes.

Distortion of the electric current by loads is measured in several ways. Power factor is the
ratio of resistive (or real power) to volt-amperes. A capacitive load has a leading power

21
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

factor, and an inductive load has a lagging power factor. A purely resistive load (such as a
filament lamp, heater or kettle) exhibits a power factor of 1. Current harmonics are a
measure of distortion of the wave form. For example, electronic loads such as computer
power supplies draw their current at the voltage peak to fill their internal storage elements.

Electricity meters operate by continuously measuring the instantaneous voltage (volts) and
current (amperes) and finding the product of these to give instantaneous electrical power
(watts) which is then integrated against time to give energy used (joules, kilowatt-hours
etc.). Meters for smaller services ( such as small residential customers) can be connected
directly in-line between source and customer. For larger loads, more than about 200 amps
of load, current transformers are used, so that the meter can be located other than in line
with the service conductors

Three-phase electromechanical induction meter, metering 100 A 230/400 V supply.


Horizontal aluminum rotor disc is visible in center of meter

22
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

As in the block diagram, the meter has a power supply, a metering engine, A processing
and communication engine (i.e. a microcontroller), and other add-on modules such as
RTC, LCD display, communication ports/modules and so on.

The metering engine is given the voltage and current inputs and has a voltage reference,
samplers and quantisers followed by an ADC section to yield the digitised equivalents of
all the inputs. These inputs are then processed using a Digital Signal Processor to
calculate the various metering parameters such as powers, energies etc.

23
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

The largest source of long-term errors in the meter is drift in the preamp, followed by the
precision of the voltage reference. Both of these vary with temperature as well, and vary
wildly because most meters are outdoors. Characterizing and compensating for these is a
major part of meter design.

The processing and communication section has the responsibility of calculating the
various derived quantities from the digital values generated by the metering engine. This
also has the responsibility of communication using various protocols and interface with
other addon modules connected as slaves to it.

RTC and other add-on modules are attached as slaves to the processing and
communication section for various input/output functions. On a modern meter most if not
all of this will be implemented inside the microprocessor, such as the Real Time Clock
(RTC), LCD controller, temperature sensor, memory and analog to digital converters.

24
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

REAL TIME CLOCK


A real-time clock (RTC) is a computer clock (most often in the form of an integrated
circuit) that keeps track of the current time. Although the term often refers to the devices
in personal computers, servers and embedded systems, RTCs are present in almost any
electronic device which needs to keep accurate time.

RTC is used by the microcontroller to make out the season and time of the day for
switching purposes. Although keeping time can be done without an RTC,using one has
benefits:

• Low power consumption (important when running from alternate power)


• Frees the main system for time-critical tasks
• Sometimes more accurate than other methods

A GPS receiver can shorten its startup time by comparing the current time, according to
its RTC, with the time at which it last had a valid signal.If it has been less than a few
hours then the previous ephemeris is still usable.

An RTC Module

25
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

FUZZY LOGIC

WHAT IS FUZZY?

Fuzzy logic is a problem solving control system methodology that was invented
by Lofti Zadeh a professor at the University of California at Berkley. It has proven to be
an excellent choice for many control system applications since it mimics human control
logic. It can be built into anything from small hand-held products to large computerized
process control systems. It is imprecise but very descriptive language to deal with input
data more like human operator.

Fuzzy logic (FL) offers several unique features that make it a particularly good
choice for many control problems. These include:
It is inherently robust since it does not require precise, noise free input, and can be
programmed to fail safely if a feedback sensor quits or destroyed. The output control is a
smooth control function despite a wide range of input variations .FL controller processes
user-defined rules governing the target control system, therefore it can be modified and
tweaked easily to improve or drastically alter system performance for the better.
FL has no limited inputs feedback and control outputs. It is also not necessary to
measure or compute rate of change parameters in order for it to be implemented, any
sensor data that provides some indication of a system’s action and reaction is sufficient.
This allows the sensor to be inexpensive and imprecise thus keeping the overall cost and
complexity low. FL control nonlinear systems that would be difficult or impossible to
model mathematically. This opens doors for control systems that could normally be
deemed unfeasible for automation

26
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

A fuzzy control system is a control system based on fuzzy logic-a mathematical


system that analyzes analog input values in terms of logical variables that takes on
continuous values between 0 and 1, in contrast to classical or digital logic ,which
operates on discrete values of either 0 or 1(true or false)

FUZZY SETS
FL deals with problems that have fuzziness or vagueness , unlike other methods
like classical theory which is based on Boolean logic where a particular object or variable
is either a member of a given set (logic 1) or not (logic 0). Fuzzy logic problem is an
input/output, static, nonlinear mapping problem through a main box as shown in figure 1

The input information is defined in the input space, it is processed in the main box
and the solution appears at the output space. The main box is a fuzzy system or any
other method e.g. expert system, neural network or a general mathematical system that
can give a desired output.

27
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

The input variables in a fuzzy control system are in general mapped in to by sets of
membership functions. This set is known as fuzzy sets. The process of converting crisp
input values to a fuzzy value is called “fuzzification”.

MEMBERSHIP FUNCTIONS (MF)

The MF is a graphical representation of the magnitude of participation of each


input. It associates a weighting with each of the inputs that are processed, define,
functional overlap between inputs and ultimately determines and output response. The
fuzzy variables has values that are expressed by the natural language for instance English.
A membership curve defines how the values of fuzzy variable in a certain region
are mapped to a membership value μ (or degree of membership) between 0 and1. A stator
temperature of a motor for example, as a fuzzy variable can be defined by the qualifying
linguistic variables as cold, mild or hot, where they are represented by a triangles or
straight line segment membership function. Figure 2 shows the features of membership
function.

MF can have different shapes like triangular, trapezoidal, two sided Gaussian,
generalised bell, sigmoid-right, sigmoid-left, difference sigmoid, product sigmoid,
polynomial-Z, polynomial-Pi and polynomial-S. Triangular and trapezoidal types are the

28
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

mostly used MF as shown in figure 3, which can be symmetrical or asymmetrical. MF can


be represented by mathematical functions, segmented straight lines (for triangular and
trapezoidal) and look-up tables.

FUZZY RULES

Fuzzy controllers are based on set of rules defined by the user.


Given “mappings” of input variables into membership functions and truth values, the
microcontroller then makes decisions for what action to take based on these set of
“rules”.

Usually these rules are of the form : If time of the day is ‘noon’ AND the
season is ‘summer’ AND usage is ‘normal’, THEN switch on the devices in ‘group 1’.

All the rules that apply are invoked, using the membership functions and truth values
obtained from the inputs to determine the result of the rule. This result in turn will be
mapped into membership functions and truth value containing the in the output

29
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

variable. The results are combined to give a specific answer (crisp). This procedure is
known as “defuzzyfication”.

5. FUZZY SYSTEMS

Fuzzy system consists of a formulation of the mapping from


a given input set to and output using fuzzy logic, which consists of the following five
steps.
Step 1:Fuzzification of input variables, defining the control objectives
and criteria
Step 2: application of fuzzy operators (AND, OR, NOT) in the IF (antecedent) part of the
rule. Determine the output and input relationships and choose a minimum number
of variables for input to the fuzzy logic engine.
Step 3:Implication from antecedent to the consequent (THEN part of the rule) for the
desired system output response for a given system input conditions.
Step 4:aggregation of the consequents across the rules by creating fuzzy logic membership
functions that define the meaning (values) of input/output terms used in the rule.
Step 5: defuzzification to obtain a crisp result.

The following example shows how the above five steps can be implemented in a non
technical environment for a restaurant tipping where food and service are the inputs fuzzy
variable (0 -10 range) and tip is the output variable (0-25% range). The input variable
service is represented by three fuzzy sets poor, good, and excellent which corresponds to
curved MFs. While variable food is represented by two fuzzy sets bad and delicious this
corresponds to straight-line MFs. The output variable tip is represented by three sets

30
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

cheap, average, and generous which correspond to triangular MFs. Three rules are
developed as shown in figure 4.

Figure 4 .fuzzy inference system

Consider a simple feedback controller. A fuzzy set is defined for the input error variable
‘e’.
LP: large positive
SP: small positive
ZE: zero
SN: small negative
LN: large negative

If the error ranges from -1 to +1, with the analog- to- digital converter, the input variable’s
fuzzy set can be described very simply.

31
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

Figure 5 .Fuzzy controller

Based on this set and set of rules we can precisely control the system.

6. FEATURES

In fuzzy there is no need for a mathematical model unlike in classical sets. So it can
control nonlinear systems that difficult or impossible to model mathematically. Fuzzy
logic has the advantage that the solution to the problem can be cast in terms that human
operators can understand, so that their experience can be used in the design of the
controller. This makes it easier to mechanize tasks that are already successfully
performed by humans.

32
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

FUZZY RULES
Usually these rules are of the form :

If time of the day is ‘noon’ AND the season is ‘summer’ AND usage is
‘normal’, THEN switch on the devices in ‘group 1’.

Before that certain fuzzy sets are defined:

1) SEASONS

Summer (SU)
Winter (WI)
Autumn (AU)
Spring (SP)
2) TIMINGS
Morning (MOR)
After Noon (AF)
Evening (EVE)
3) USAGE
Nil (NIL)
Normal (NOR)
High (HIG)
Extreme (EX)
4) DEVICES
Lights (D1)
Fans (D2)
Tv (D3)

Other (D4)

33
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

USAGE TIME SEASON A/M D1 D2 D3 D4

NIL DC DC DC 1 1 1 1

NOR DC DC DC 1 1 1 1

HIG MOR SUM A 0 1 1 1

HIG MOR WIN/SP/AU A 1 1 1 1

HIG AF SUM A 0 1 1 1

HIG AF WIN A 0 0 1 1

HIG AF AU/SP A 0 1 1 1

HIG EVE SUM A 1 1 1 1

HIG EVE WIN A 1 0 1 1

HIG EVE AU/SP A 1 1 1 1

HIG NIG SUM A 1 1 1 1

HIG NIG WIN A 1 0 1 1

HIG NIG AU/SP A 1 1 1 1

EX MOR SUM A 0 1 0 0

EX MOR WIN A 0 0 0 0

EX MOR AU/SP A 0 0 0 0

EX AF SUM A 0 1 0 0

EX AF WIN A 0 0 0 0

EX AF AU/SP A 0 0 0 0

EX EVE SUM A 1 1 0 0

EX EVE WIN A 1 0 1 0

EX EVE AU/SP A 1 0 1 0

EX NIG SUM A 1 1 0 0

EX NIG WIN A 1 0 0 0

EX NIG AU/SP A 1 0 0 0

34
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

CIRCUIT DIAGRAM

35
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

ENERGY REGULATION

The energy regulation is carried out with the help of Relays.Here we use 12 volt solid
state relay.The whole housing circuit is divided into four lines. Here in this project we
have divided the resources into four categories

• Lights

• Fan

• Tv

• Others

Each line has a corresponding relay, acting as a switch. This relay is


controlled by the PIC 16f73 microcontroller.The fuzzy rules are fed into the
microcontroller as per the user.Hence the PIC IC switches these relays “ON” and
“OFF” based on these rules.The pattern of these switching depends on various other
factors like usage,season,time etc.Thus by switching these lines “ON” and “OFF”
the energy consumption gets regulated to an extend.

For the regulation of energy the PIC IC needs to read the energy from the main
power line.This is done with the help of energy metering IC ADE 7755.The ADE
IC takes the input from the current transformer and from the voltage
transformer.One input is thus current and other the voltage .These signals are then
processed and multiplied by a multiplier giving the power output.The power output
is in the form of pulses.The frequency of these pulses are propotional to the energy
consumed and are thus read by the microcontroller.The PIC IC measures the season
and time using a real time clock.

36
FUZZY ENERGY REGULATOR PROJECT REPORT 2010

CONCLUSION
The fuzzy logic Energy regulator controls the energy
consumption of house/factory by switching between various devices.The number of
factors on which the switching can be done is designed according to the need of the
user.Hence the device being flexible can satisfy the needs of the consumer effectively and
efficiently.This automated control thus reduces the strain of turning of each and every
light/fan for energy consumption.

Proper design and implementation of the regulation


system can indeed decrease the overall consumption; especially the smartcard based
solutions seem to be very promising.The energy regulators based on artificial intelligent
techniques will surely dominate for the future.

37

Das könnte Ihnen auch gefallen