You are on page 1of 94

Power Line Carrier Communications

Electrical Engineering Final


Year Project

Domestic Power Line Carrier


Communications

Author: Glenn Platt


Supervisor: Dr. Brian Cook

A thesis submitted in partial fulfilment of the requirements for the degree of Bachelor of
Engineering in Electrical Engineering at The University of Newcastle, Australia.

20th October, 1999.

1
Power Line Carrier Communications

Abstract
With the rapid growth of home networks, there is an ongoing need for an economical and
reliable communications system that can be implemented in any building. I investigate the
applicability of power line carrier communications techniques to home networking
communications. The investigation is both theoretical and practical, with a detailed report
on all aspects of power line carrier communications given before a working power line link
between two computers is designed and tested. Topics covered include feasible applications
of power line carrier communications, currently available power line carrier devices and the
impact of international standards on such devices. The power line channel is discussed at
length, with emphasis on noise and disturbances, attenuation, channel modelling and signal
coupling. Monte Carlo simulations are performed to evaluate different modulation schemes,
and a number of suggestions made as to implementing a reliable power line carrier
communications system. Lastly, the design, construction and testing of a working system is
performed and the results detailed.

i
Power Line Carrier Communications

Contributions

My work on this project has included:

Ÿ Literature research examining all aspects of power line carrier communications (PLCC)
systems. Technical journals, internet resources and communications texts were searched for
information applicable to PLCC systems.
Ÿ Presentation of results of literature research in thesis. Topics covered include history of
PLCC techniques, current devices and applications, as well as applicable regulatory
standards. Technical issues such as the challenges faced by PLC communications, an
exploration of modern communications strategies suited to improving the performance of
PLCC systems, and considerations unique to PLCC systems have been addressed.
Ÿ Detailed computer simulation and modelling to test modulation methods in a high-noise,
variable phase-change environment. The writing and execution of in-depth MATLAB code
for performing this simulation.
Ÿ Applying the conclusions of theory research in the design and computer simulation of a
power line carrier communications system. Determining how to practically implement the
theoretical recommendations made. Designing this system and implementing in the electrical
circuit simulation software Electronics Workbench. Comparing system performance against
performance goals.
Ÿ The novel application of well-known communications methods, modified appropriately,
for an elegant “engineering solution” to a difficult problem- how to implement an FSK
spread-spectrum communications system, when dedicated off the shelf components are
unavailable.
Ÿ The design, construction of testing of circuit schematics to implement the PLCC system
from computer simulation. Detailed parts searches to find appropriate devices, appropriate
calculations and design issues to implement these parts correctly.
Ÿ The wire-wrap final implementation of two power line carrier communications modems,
used to connect two personal computers through a power line communications link.

ii
Power Line Carrier Communications

Ÿ The writing and testing of software, in Visual Basic, to control the PLCC modems and
demonstrate the communications system in a “home automation” role.
Ÿ Completing an internet site and giving a seminar on power line carrier communications,
as per the project requirements. The completion of seven progress reports.

Signed: ………………………………….
Glenn Platt
Countersigned:…………………………………
Dr. Brian Cook- Project Supervisor

iii
Power Line Carrier Communications

Acknowledgments

The success of this project can be attributed to the help of a number of people.

Firstly, I would like to thank my project supervisor, Dr Brian Cook, for his support and
technical advice during the course of the project.

Warm thanks goes to my family and friends who have provided support during the
challenges, and understanding of my many hours spent at University.

Lastly, recognition should go to my fellow project students. The people I have spent 90%
of my life with this year, your help and support has far outweighed the distractions. Thanks
fellas!

iv
Power Line Carrier Communications

Table of Contents

Abstract .................................................................................................................. i

Contributions ........................................................................................................ ii

Acknowledgments ............................................................................................... iv

Chapter One- Introduction ................................................................................... 1


1.1 Motivation..................................................................................................................................... 1
1.2 Project Aims.................................................................................................................................. 1
1.3 Outline of Report. .......................................................................................................................... 2
1.4 Uses of Power Line Carrier Communications- The Home Network ................................................ 3

Chapter Two- Focus on Power Line Carrier Communications ......................... 6


2.1 Synopsis ........................................................................................................................................ 6
2.2 Domestic Power Line Carrier Systems Currently In Use................................................................. 6
2.3 Power Line Carrier Challenges ...................................................................................................... 7
2.4 Power Line Channel Models ........................................................................................................ 13
2.5 Available Bandwidth ................................................................................................................... 14
2.5 Chapter Two Conclusions............................................................................................................ 16

Chapter Three- The PLCC Device: Practical Issues. ....................................... 17


3.1 Synopsis ...................................................................................................................................... 17
3.2 Modulation Methods.................................................................................................................... 17
3.3 The Coupling Network ................................................................................................................ 22
3.4 Error Control Methods................................................................................................................. 25
3.5 Recommendations for Error Control in the Power Line Carrier Environment............................... 26
3.6 Chapter Three Conclusions.......................................................................................................... 27

Chapter Four- Practical Implementation........................................................... 28


4.1 Synopsis ...................................................................................................................................... 28
4.2 Practical Goals............................................................................................................................. 28
4.3 Theory into Practice..................................................................................................................... 29
4.4 Implementing the Two Layer System........................................................................................... 34
4.5 Testing Layer One ....................................................................................................................... 38
4.7 Miscellaneous Devices................................................................................................................. 43
4.8 Results and Outcomes of the Practical Implementation ................................................................ 44

Chapter Five- Conclusions and Extensions ..................................................... 46


5.1 Conclusions ................................................................................................................................. 46
5.2 Extensions ................................................................................................................................... 47

References .......................................................................................................... 49

Glossary of Terms ................................................................................Glossary-1

v
Power Line Carrier Communications

Appendix A- Circuit Schematics and Descriptions ....................................... A-1


A-1 FSK Modulation Circuit ........................................................................................................... A-2
A-2 FSK Demodulation Circuit ....................................................................................................... A-2
A-3 Spread-Spectrum Modulator ..................................................................................................... A-3
A-4 Spread-Spectrum Demodulator ................................................................................................. A-4
A-5 Spread-Spectrum Carrier Generator.......................................................................................... A-4
A-6 Coupler Network ...................................................................................................................... A-5
A-7 Variable Gain Stage.................................................................................................................. A-6
A-8 Frequency Hopping Control...................................................................................................... A-7
A-9 RS-232 Driver/Receiver............................................................................................................ A-7

Appendix B- Component Selection Calculations .......................................... B-1


B-1 XR-2206 Calculations................................................................................................................B-2
B-2 RC-2211N Calculations .............................................................................................................B-2

Appendix C- Oscilloscope Hardcopies........................................................... C-1


C-1 FSK System Measurements....................................................................................................... C-2
C-2 Spread-Spectrum System Measurements. .................................................................................. C-2

Appendix D- System Software Flowcharts..................................................... D-1

Appendix E- Coupler Testing Methods............................................................E-1


E-1 Introduction ...............................................................................................................................E-2
E-2 Methods.....................................................................................................................................E-2
E-3 Results- Coupler Comparison Tests............................................................................................E-2
E-4 Results- Coupling Network Distance Tests.................................................................................E-3

Appendix F- Electronics Workbench Simulation Model.................................F-1

Appendix G- MATLAB Code for Modulation Scheme Comparisons ............ G-1

Appendix H- Device Data Sheets..................................................................... H-1

vi
Power Line Carrier Communications

Chapter One- Introduction

1.1 Motivation

In recent times there has been a large growth in the number of small communications
networks in the home or office. Cash registers, burglar alarms, computers and their
peripherals all rely on small interconnected networks. A number of networking technologies
are aimed purely at implementing these small home networks. Many remain costly, overly
limited, or difficult to install in pre-existing buildings. One communications medium is often
overlooked for implementing such networks, and that is the power line.

Power line carrier communications refers to the concept of transmitting information using
the mains power line as a communications channel. This project is motivated by an interest
in the applicability of power line carrier communications techniques towards home
networking.

Power line carrier techniques would appear to be an economical and user-friendly method
of installing a home network in any building. This project explores such a claim,
investigating the challenges of using the power lines for communications, possible methods
for overcoming these challenges, and finally details the research, design and construction of
a working power line carrier communications system.

1.2 Project Aims

The project aims to thoroughly explore the theoretical and practical aspects of power line
carrier communications (PLCC) techniques. To this end, a number of specific goals were
proposed at the start of the project:

Ÿ To gain a detailed knowledge of the challenges faced by PLCC techniques- why they
are not a widespread communications method.

1
Power Line Carrier Communications

Ÿ To investigate the applicability of modern communications methods towards


improving power line carrier communications.
Ÿ To research, simulate, design and build a working PLC communications system.

This last aim was expanded into a number of technical goals. Specifically, I aimed to design
and construct a power line carrier communications system that could be used for the
automation of various appliances in the home. Such a device could be used to turn
appliances on and off, or for applications such as burglar alarms and baby intercoms.

After progressing through the initial implementation stages, I became confident in extending
these initial practical goals further. The initial goals would only require a relatively slow
data rate and simple system design. Extending these goals, I aim to design and implement a
power line carrier communications system that connects two personal computers across the
power line. Specific goals for this system are:

Ÿ The computers should be able to transfer data across the average suburban house,
using the power lines as their only tether.
Ÿ Data transfer will occur at a minimum baud rate of 1200 baud.
Ÿ The data link will be “transparent” to the end user. That is, although the computers
are connected through power lines, as far as the end user is aware, they could be
connected by a dedicated communications line link.
Ÿ The system will be demonstrated in a multi-media role. Representative of home-
networking technologies, the computers will be capable of actual data transfer (PC to
PC) as well as controlling external appliances.

1.3 Outline of Report.

This thesis can be divided into two separate sections. The first section details the theoretical
aspects of power line carrier communications. The history of PLCC techniques is covered,
as are future possible applications of PLCC methods. Challenges faced by PLCC methods
and regulatory standards are discussed, current domestic PLCC systems are briefly
explored. A detailed explanation of the technical design considerations of a PLCC system is

2
Power Line Carrier Communications

provided. Issues such as modulation methods, error control and coupling networks are
discussed. Considerable time has been spent simulating the performance of different
modulation techniques in the PLCC environment, and these results are presented. Lastly, a
number of conclusions are made as to how to implement a reliable power line carrier
communications system.

The second section of the thesis covers the design, building and testing of a working PLC
communications system. Following on from the recommendations made in the theory
section, I discuss how such recommendations were practically implemented, the devices
used and results obtained.

The appendices section of this thesis contains in-depth technical information not suitable for
the main body of the report. Appendix A details the individual circuits used to construct a
PLCC modem, and Appendix B the calculations performed in arriving at these circuits.
Appendix C has a number of oscilloscope print-outs at various points in the modem circuit,
giving evidence of correct operation. Appendix D contains the flowcharts for the system
software, Appendix E details coupler networks, and Appendix F shows the model used for
circuit simulation. Appendix G contains a listing of the MATLAB code used in a
comparison of modulation techniques and, finally, Appendix F the data sheets for a number
of devices used.

1.4 Uses of Power Line Carrier Communications- The Home Network

PLCC techniques have traditionally been used either by electrical utilities for control and
monitoring of their distribution networks, or for simple home automation systems. With
rapid growth in home networks, PLCC methods are a flexible way to implement low cost,
reliable and widely accessible networks in the domestic environment.

The phrase “home network” refers to a communications network that joins a diversity of
electrical appliances and systems. Such networks are growing rapidly, with market growth
driven by a number of factors:

3
Power Line Carrier Communications

Ÿ Multiple PC homes. During 1997, approximately 35% of American homes had more
than one PC [24], with this number expected to reach 61% by 2000. With multiple
PC’s, home networking becomes necessary for the exchange and sharing of information
(for example shared internet access). Consequently, PC-PC connectivity is expected to
rise dramatically as multiple-PC homes proliferate.
Ÿ Intelligent appliances are becoming more common. The interconnection of such
intelligent devices leads into the “smart home”, where efficiency is maximised and
comfort levels increased.
Ÿ The ongoing sales of consumer devices requiring interconnection within the home.
Appliances such as security systems, baby monitors, intercoms and multiple room
entertainment systems all rely on dedicated communication links for operation.

Current technologies that could implement such home networks include:

Ÿ Radio frequency communications links. Although they allow for untethered device
control and are very flexible, radio frequency communications links are currently too
expensive to be viable for the average home user.
Ÿ Phone line networking. Using the phone lines in a house for the communications
channel, phone line networking is affordable and high-performance. The major limitation
of phone line networking is the number of phone jacks in a house, together with their
positioning. Many houses only have two phone jacks, and they are not in convenient
positions.
Ÿ Traditional wiring schemes. Traditional wiring schemes (coaxial cable, unshielded
twisted pair) are low cost and high performance. They are a very practical way of
implementing a home network in a new home under construction. Yet traditional wiring
schemes are not suitable for retro-fitting a home network to an existing building. Major
building work is required to install traditional network wiring in an existing building, the
alternative being unsightly cable strung around walls.
Ÿ Power line carrier communications. Using the power lines in a house as the
communications channel, PLCC techniques have the potential to economically install a
home network into any building, new or old, and connect any room in that building that

4
Power Line Carrier Communications

has a power point. Currently available PLCC devices remain slow and simple, and the
challenges faced in PLC communications make these devices unsuitable for the home
network. The applicability of modern communications techniques to improving the
performance of PLC communications is an ongoing area of research, with new home
networking devices expected soon [1].

In lieu of the problems and limitations facing other home networking techniques, this
project explores the applicability of power line carrier techniques towards home
networking.

5
Power Line Carrier Communications

Chapter Two- Focus on Power Line Carrier


Communications

Challenges, Current systems and Modern Techniques

2.1 Synopsis

Power line carrier (PLC) communications is an area of research that has been studied for
many years, although it has never reached the mainstream of communications research
activities. Commercial systems have been difficult to implement and simple in capability.
More recent research has focused on solving many of the problems facing PLC
communications using the latest communications technologies, with new high-speed devices
soon to reach the market.

This section of the thesis gives an overview of current PLCC systems and standards, details
the challenges limiting the capacity of current systems, and explores the modern
communications methods applicable to PLC methods. Focus is given to low voltage (<1
kV) PLC technologies. That is, those that are applicable for domestic home network use.

2.2 Domestic Power Line Carrier Systems Currently In Use.

PLC communications is a well-known and reasonably common method of communication in


domestic households. In fact, it is estimated that over 4 million homes in America employ
PLC communication methods [1]. However, such methods are fairly simple in design,
employed mostly for home-automation purposes. There are a number of systems
commercially available for such home automation purposes. The most popular PLC
communication systems are:

Ÿ CEBus, or Consumer Electronics Bus. CEBus is based on the concept of Local Area
Networks (LAN’s), for the home. CEBus gives protocol standards for RF, twisted pair,
PLC and a number of other home networking methods. The CEBus PLC standard
specifies that a binary digit is represented by how long a frequency burst is applied to

6
Power Line Carrier Communications

the channel. For example, a binary ‘1’ is represented by a 100 microsecond burst, whilst
a binary ‘0’ is represented by a 200 microsecond burst. Consequently, the CEBus
transmission rate varies with how many ‘0’ characters, and how many ‘1’ characters are
transmitted. The CEBus standard specifies a language of object oriented controls
including commands for volume up/down, temperature up one degree, etc. CEBus is a
commercially owned protocol, and thus attracts registration fees.

Ÿ X-10. In terms of sheer popularity, X-10 is the de-facto world standard for home
automation [7]. Originally proposed in 1978, X-10 is a simple home-automation
standard that includes addressing mechanisms to individually identify appliances. X-10
simply provides the technical specifications of how a device should place a signal onto
the power line. Using the zero crossing point of the mains carrier for synchronisation,
the presence of a 120 kHz signal burst at the zero crossing indicates the transmission of
a binary one, whilst the absence of the 120 kHz signal indicates a binary zero. X-10
contains a detailed addressing scheme to prevent device clash. Devices contain two
addresses- a house (dwelling) address, and then an individual device address. A typical
X-10 transmission would include a start code, house address, device address, and then
function code (such as ON, OFF, etc.). The X-10 system is limited in that it does not
easily provide for two-way communications, and is very slow, although adequate for
simple home automation tasks.

It can be seen that the currently commercially available PLC communication systems are
low capacity, relatively simple systems designed primarily for home automation. A number
of modern high capacity systems have been developed or are being developed in the
research domain, but none have seen commercial realisation. Testing of a number of
proposed systems is ongoing, with commercial production expected soon. [1]

2.3 Power Line Carrier Challenges

Power lines and their associated networks are not designed for communications use. They
are a hostile environment that makes the accurate propagation of communication signals
difficult. Noise levels are often excessive, and cable attenuation at the frequencies of interest

7
Power Line Carrier Communications

is often very large. Important channel parameters such as impedance and attenuation are
time varying in unpredictable ways. The biggest challenges faced in PLC methods are:

2.3.1 Noise and Disturbances

Common causes of noise on electrical power networks include corona discharge, lightning,
power factor correction banks and circuit breaker operation. On the low voltage network,
much of this noise is filtered by medium/low voltage transformers, so the most common
interference in low voltage domestic networks can be attributed to the various household
devices and office equipment connected to the network.

Noise and disturbances on the electrical power network can be generally classified as
follows: [1]

(i) Waveshape disturbances


These include:
a. Over-voltages, both persistent (>2 seconds) or surges (<2 seconds).
b. Under-voltages, both persistent or surges.
c. Outages.
d. Frequency variations.
e. Harmonic Distortions.

ii) Superimposed disturbances


These include:
a. Persistent oscillations, either coherent or random.
b. Transient disturbances, both impulse and damped oscillations.

Waveshape disturbances are usually of little effect on PLC systems. Transceivers are usually
robust enough to cope with minor over-voltage and under-voltage disturbances. Naturally,
in the case of (i)(c), total line outages will make information transmission impossible. Yet
the outage of a piece of distant equipment will not effect the performance of a domestic
PLC system. Harmonic disturbances can be a major source of disturbance, yet these occur

8
Power Line Carrier Communications

at frequencies below those designated for PLC communications by statutory authorities1.


Frequency variations can cause major problems in PLC systems, as many simple systems
rely on the mains carrier (50Hz sine wave) for synchronisation between transmitter and
receiver. Frequency variation in this wave will cause transmission error. Modern systems
overcome this obstacle by avoiding reliance on the mains carrier for synchronisation.

On the medium voltage network, class (ii) noise is attributed to large factories with
extensive plant or machinery, and industrial users with poorly filtered appliances. On the
low voltage network, a number of household appliances are most often responsible for
superimposed disturbances.

Vines et al [3] further categorise type (ii) noise as:

A. Noise having line components synchronous with the power system frequency;
B. Noise with a smooth spectrum;
C. Single event impulse noise, and;
D. Non synchronous noise.

A. Noise having line components synchronous with power system frequency.


The usual source of this noise (hereafter called Type A noise) are triacs or silicon controlled
rectifiers (SCR’s), found domestically, for example, in light dimmers or photocopiers. The
spectrum of this noise consists of a series of harmonics of the mains frequency (50Hz).

There are three ways to combat this kind of noise: [1]

• As the frequency spectrum of class A noise is regular, successful communication


may be possible with modulation schemes that avoid, or have nulls, at these
frequencies.
• Filter these noise components out using accurate notch filtering.

1
See Section 2.5.1

9
Power Line Carrier Communications

• Considering the time domain representation of class A noise, a noise pulse can be
expected at equal intervals. Using fairly simple time division multiplexing
schemes and error correction, unwanted effects can be minimised.

B) Noise with a smooth spectrum.


Noise with a smooth spectrum (hereafter called type B noise) is generally caused by
universal motors. A result of the commutation process in motor powered appliances such as
blenders and vacuum cleaners, this noise has a flat spectrum in the frequency ranges used by
PLC systems. Thus it can be modelled as band limited white noise.

A characteristic of many of the appliances that contain universal motors is that they are
often used for a short period of time. Thus, PLC systems that do not have to function in real
time can avoid this noise by operating at a time when the noise is absent. Conversely, real
time systems must be able to cope with type B noise.

C) Single event impulse noise.


Single event impulse noise (type C noise) is primarily due to switching phenomena-
lightning, the closing of contacts, etc. Type C noise disturbs the whole frequency band for a
short amount of time, and is often modelled as an impulse disturbance due to the relatively
short times involved. Experience with impulse noise in other communications environments
shows that type C noise can be overcome by error correcting codes.

D) Non synchronous noise.


Non synchronous noise (type D noise) is characterised by periodic components that occur at
frequencies other than harmonics of the mains frequency. Major sources of type D noise
include television and computer monitors. The scanning and synchronisation signals in such
appliances cause noise components at known frequencies- for example, interference from a
PAL system television set is at 15734kHz and associated harmonics. Different standards of
television and computer scanning have different radiated noise components. The solution to
minimising such interference is to avoid data transmission at 15734kHz and associated

10
Power Line Carrier Communications

harmonics, and to use a modulation scheme that is frequency diverse, thus avoiding
potential type D noise at any unforeseen frequencies.

So far a qualitative description of noise on the low voltage network has been given.
Quantitative values of noise for various common appliances can be found in Table 2.1. With
an understanding of the noise inherent on domestic power networks, various suggestions
can be made for the development of a PLC communications system:

• Appropriate error correcting codes should be implemented to cope with noise types
A, B and C.
• To avoid type D noise, television line frequency and harmonics should be avoided
when modulating the signal onto the channel- no signal information should be
transmitted at these frequencies.
• Some kind of frequency diversity (for example frequency hopping) should be
implemented to cope with interference at unknown frequencies.

Table 2.1. Measured amplitude and duration characteristics of noise from common household
appliances.

Electric Apparatus Amplitude (mV) Duration (µs)


Average Standard Average Value Standard
Value Deviation Deviation
(Single pulse)
Electric Oven 329.2 431.2 1015.8 505.2
Iron 369.3 585.8 760.2 347.9
(Periodic pulses)
Television monitor 197.2 311.3 722.4 34.3
Light dimmer 670.8 1199.3 140 7.5
(Continuous
pulses)
Vacuum cleaner 1457.5 2155.5 Always ---
Dryer 87.9 119.7 105.3 56
Table based on data given by G. Marubayashi and S. Tachikawa, “Spread Spectrum Transmission on
Residential Power Line", IEEE Conference on Spread-Spectrum Techniques, January 1996, pp1082-1086.
[11]

11
Power Line Carrier Communications

2.3.2 Power Line Channel Impedances and Attenuation.

The characteristic impedance of an unloaded power cable can be obtained by a standard

R + jωL
distributed parameter model, and given by Z = .
G + jωC

L
At the frequencies of interest for PLC communications, this approximates to Z = ,
C
where L and C are the line impedance and capacitance per length. Malack and Engstrom
[22] list the characteristic impedance of the cables used for power transmission as ranging
from 70-100 Ohms.

Unfortunately, a uniform distributed line is not a suitable model for PLC communications,
since the power line has a number of loads (appliances) of differing impedances connected
to it for variable amounts of time. Thus, it can be seen that the channel impedance is a
strongly fluctuating variable that is difficult to predict. Measured impedance models of
common electric apparatus are presented in Table 2.2. As can be seen, impedance values
vary greatly. As mentioned, the overall impedance of the low voltage network results from a
parallel connection of all the network’s loads, so the small impedances will play a dominant
role in determining overall impedance. Overall network impedances are obviously very
difficult to predict. Schaap [5] quotes figures of 0.1-2Ω for low voltage networks. Dostert
[21] claims a power line impedance of 2-150Ω, whilst Malack and Engstrom [22] list
results of 0-80Ω. Clearly, channel impedance is very low. This presents significant
challenges when designing a coupling network for PLC communications. Maximum power
transfer theory states that the transmitter and channel impedance must be matched for
maximum power transfer. With strongly varying channel impedance, this is very difficult.
The PLCC system designer must suffice with designing a transmitter and receiver with
sufficiently low output/input impedance (respectively) to approximately match channel
impedance in the majority of expected situations. See the model section of this report for
more information on this area.

Communications signal attenuation in the power line environment is high. Straightforward


channel attenuation combines with impedance mismatching problems to give very large

12
Power Line Carrier Communications

Table 2.2, Impedance models for common electric apparatus.


Apparatus Impedance model
25.3mH

Refrigerator
1.11nF

11k

Incandescent lamp
185

Foot warmer 5uH


27

Table based on data given by G. Marubayashi and S. Tachikawa, “Spread Spectrum Transmission on
Residential Power Line", IEEE Conference on Spread-Spectrum Techniques, January 1996, pp1082-1086.
[11]

attenuation levels. Schaap[5] lists attenuation levels of 100dB/km over the low voltage
network. Obviously, over distances of even hundreds of metres, repeaters may be required,
but remain unnecessary for intra-building use.

2.4 Power Line Channel Models

With channel parameters that vary with time, load and frequency, an accurate model of the
power-line communications channel is very difficult to determine.
The inherent inaccuracy of such models makes their applicability limited, yet two distinct
model topologies are generally accepted as being reasonable representations of the PLCC
channel.

Dostert [21] proposes the circuit-type model shown in figure 2.1. Onunga et al propose the
channel model in figure 2.2. Here, the filter response H(f,t) varies to reflect the change in
electrical loads, while A(t) represents fading, and is often periodic. The factor B represents
the fading level of the noise relative to the signal.

It should be noted that in both models, all elements are time dependant, in a way that is
largely uncertain.

13
Power Line Carrier Communications

.
Input impedance 1 Coupling impedance Input impedance 2

Zc(t)
ZI1(t) ZI2(t)
In1(t) In2(t)

Noise sources at the inputs

Figure 2.1, Dostert’s Power Line Channel Model [21]


Noise, n(t)

Channel
Transmitted signal x(t) Received signal, r(t)
Filter
H(f,t)

Attenuation A(t) B

Figure 2.2, Onunga’s Channel Model [23]

2.5 Available Bandwidth

It is often asked what is the bandwidth available to the PLCC designer. Bandwidth in the
power line communications environment is not limited by physical capabilities of the line.
Rather, regulatory authorities limit the available bandwidth. So to prevent radio
interference, other device interference and other such contentions, standards exist limiting
the bandwidth available for communications purposes on the power line. The available
bandwidth depends on the country of use, ranging from 350kHz, to ~50kHz. The limiting
standards are covered below

2.5.1 Regulatory Standards for Power Line Carrier Communications.

Various standards exist that provide regulations on the operating specifications of PLC
systems. The standards were designed with consideration for such things as providing for
maximum multiple-user efficiency, and avoiding interference with ripple control systems
such as street lighting, off-peak water system control and other PLC devices. CENELEC,
the E.E.C’s electrical standardisation body, provide the most rigorous standard of all those

14
Power Line Carrier Communications

on PLC communications, and gives the specification to which most devices are designed to
meet.

CENELEC’s standard EN50065 “Low voltage mains signalling” gives regulations on key
parameters such as frequency range, signal power and so on.
The standard allows for PLC communication systems to operate in the frequency band 3-
148.5kHz, avoiding interference with ripple control systems at the lower boundary, and
interference with long wave (LW) and medium wave (MW) radio broadcasts by posting the
upper boundary. CENELEC then divide this band into further categories:

• The band from 3-95kHz, or A-Band, is allocated for electrical utility use, for
such things as automated meter reading and customer load control.
• The range from 95-148.5kHz, comprising the B, C, and D bands is reserved for
end-user applications. These three bands are primarily differentiated by
regulations in protocols for each band. B band, from 95-125kHz requires no use
of access protocol for establishing communications. Thus, it is possible for two
systems to transmit simultaneously on the B band, and therefore messages to
collide. This band is designed for use in applications such as baby-monitors and
intercoms.
• The C band, from 125-140kHz requires an access protocol to be used by devices
transmitting at this range. This protocol is aimed at making simultaneous
transmission of messages highly improbable. Thus, different systems may
cohabit, but only one transmitter can operate at any one time. Specifications are
given for access protocol frequencies, and so on. Applications for devices
operating in this band would be such things as intra-building computer
communications.
• The D band (140-148.5kHz) is similar to the A band in that it requires no access
protocol, and thus message collision is possible.

CENELEC EN50065 also specifies interference immunity requirements for PLC


communication systems, both for immunity to interference from other PLC systems, and

15
Power Line Carrier Communications

interference from system noise. Again, the standard is split up into utility and end-user
categories. Test methods for determining such immunity are given.

Lastly, EN50065 specifies such things as communication protocols (in line with OSI2 layers
1 {physical layer} and layer 2 {data link layer}), equipment impedance (avoiding excessive
signal attenuation due to multiple PLC devices of low impedance on one network), and
filter specifications for carrier removal, etc. CENELEC specifies the maximum transmitted
power from a PLC device should not exceed 500 mW.

Other statutory authorities list similar specifications. In Europe, Deustche Bundespost


specifies one channel of 30-146 kHz. In America and Japan, only MW or AM broadcasts
need be considered. These start at 535 kHz, with intermediate frequencies of typically 455
kHz. Thus, American PLC communication systems often operate in the band 100-450 kHz.
Part 15 of the American FCC’s Rules and Regulations lists PLC communications systems as
“Restricted Radiation Devices”, and as such there are very few applicable regulations on
them, nor do they require licensing or registration. [4]

2.5 Chapter Two Conclusions

Many challenges face power line carrier communications. The power line was never
intended for communications purposes, and challenges such as strong interference, varying
attenuation and impedance have limited current PLC devices to simple home-automation
use. However, with careful thought many modern communications techniques, such as
spread-spectrum methods, can be applied to overcome these challenges. Lastly, the PLCC
system designer is limited in the bandwidth available for communications not by physical
properties of the power line, but by regulatory standards imposed by governing bodies.
Aside from these challenges, a number of unique issues exist when trying to communicate
across a power line, a medium never intended for communications use. These issues are
covered in Chapter Three.

2. OSI (or more correctly, ISO-OSI): International Standards Organisation- Open System Interconnect. A
general model of data communications systems that segregates functionality into seven layers: physical,
link, network, transport, session, presentation and

16
Power Line Carrier Communications

Chapter Three- The PLCC Device: Practical Issues.

3.1 Synopsis

In designing any communications system, a number of salient design issues must be


addressed. Modulation techniques, transmission methods and so on must be selected to give
suitable performance in the communications environment of choice. Power line carrier
communications possesses some unique design issues of its own.

3.2 Modulation Methods

Various choices of modulation methods are available for digital transmission, including
Digital Amplitude Modulation, Quadrature Amplitude Modulation, Phase Shift Keying and
Frequency Shift Keying. Due to the often severe attenuation characteristics of the PLC
channel, the best modulation options for PLC communications are Frequency Shift Keying
and Phase Shift Keying, both schemes being robust yet simple. More complex proprietary
PLCC modulation schemes are being developed, but these remain beyond the scope of this
project.

Frequency Shift Keying.


Frequency shift keying (FSK) modulation is a form of FM modulation where the frequency
of the carrier wave is varied by the binary input stream. As the binary input signal changes
from a logic 0 to a logic 1, and vice-versa, the FSK output shifts between two frequencies:
a mark or logic 1 frequency and a space, or logic 0 frequency. An FSK waveform is shown
in figure 3.1.

17
Power Line Carrier Communications

Figure 3.1, Diagram of FSK operation

The general expression for a binary FSK signal is:


 v (t )∆ω  
v(t ) = Vc cos  ω c + m t 
 2 
where: v(t) = binary FSK waveform
Vc = peak unmodulated carrier amplitude
ωc = radian carrier frequency
vm(t) = binary digital modulating signal
∆ω = change in radian output frequency
We see that the carrier amplitude, Vc, remains constant with modulation, however the
± ∆ω
output carrier radian frequency shifts by an amount . This frequency shift is
2
proportional to the amplitude and polarity of the binary input signal. In addition, the rate at
which the carrier frequency shifts is equal to the bit rate of the binary input signal.

Phase shift keying.


Phase shift keying (PSK) modulation is a form of phase modulation where the phase of the
carrier wave is varied by the binary input stream. With binary phase shift keying two output
phases are possible, carrier frequency remaining constant. One output phase represents a
logic 1 and the other a logic 0. As the digital input signal changes state, the phase of the
output carrier shifts between two angles that are 180 degrees out of phase. Such a

18
Power Line Carrier Communications

waveform is shown in figure 3.2. Mathematically, phase shift keying is represented as:
output = (sin ω a t ) × (sin ω c t ) where ωa is the fundamental frequency of the binary

modulating signal, and ωc is the frequency of the unmodulated carrier.

Higher bandwidth PSK schemes exist, where the binary stream is represented by up to 16
different phase variations, but these systems were deemed unsuitable due to complexities in
their implementation.

It is a difficult problem to determine which modulation scheme, FSK or PSK is more


suitable to power line carrier applications. In deciding between the advantages and
disadvantages of each scheme, the PLCC designer must continuously keep in mind the
hostile environment of PLC communications. To choose which scheme is best suited to
PLCC techniques, I performed rigorous mathematical computer simulations, comparing the
performance of PSK and FSK modulation schemes in varying environments of noise and
phase shift, the two parameters that will adversely affect the performance of a modulation
system.

Comprehensive MATLAB code was written to evaluate the performance of the two
systems. Simulation was performed on a purely mathematical, analytical basis, using Monte-
Carlo techniques. The MATLAB code uses the fundamental equations that describe the
behaviour of FSK and PSK systems to simulate their performance. Random noise is added
to the “modulated” signal, and the input data to the modulation/demodulation system
compared to the output data. Using this technique, the probability of bit-error in the
received output is determined. The code allows for the user to specify both phase-error and
Signal to Noise Ratio (SNR) of the communications channel. Simulation is performed over
a large number of iterations, and graphs produced comparing the system’s (received) bit
error rate to signal to noise ratio, for a large number of phase-delays. The code for these
simulations is included in Appendix G.

19
Power Line Carrier Communications

Figure 3.2, Diagram of PSK operation.

Focussing on best case and worst case phase delay simulations, we see large differences in
the performance of the two modulation methods. Observing the graphs in figure 3.5, we see
that for a low phase delay channel, both systems have similar performance, PSK being more
slightly more reliable than FSK.

Yet if we look at the graphs for a high-phase delay channel, we find, significantly, that PSK
becomes totally unreliable, with error probability approaching 100%.

Phase delay in the PLC channel is expected and unpredictable. The reliable performance of
FSK with any reasonable amount of phase delay makes it the modulation scheme of choice
for PLCC techniques.

20
Power Line Carrier Communications

Figure 3.3 Simulation results for comparison of FSK and PSK modulation in a channel with low phase
delay. We see that in this case, PSK has a lower probability of error in low noise situations, FSK the better
performer in high noise situations.

Figure 3.4. Simulation results for comparison of FSK and PSK modulation in a channel of high phase
delay. We see that in this case, PSK totally fails- error probability approaches 100%.

21
Power Line Carrier Communications

3.3 The Coupling Network

There are a number of ways to couple a communications onto the electrical power network.
Two main categories exist:

Ÿ In the case of differential mode coupling, the line, or active wire, is used as one
terminal, and the neutral wire as the second terminal. In cases where a neutral line is not
present (high voltage networks), the ground line acts as the second terminal.
Ÿ In common mode coupling, the line (active) wire and neutral wires are used
together, forming one terminal, and the ground wire serves as the second terminal. The
reader may think this coupling mode impossible, due to the connection of neutral and
ground wires at the transformer. In practice, the inductance between points of coupling
and the short-circuit point is large enough to allow signal transmission. However,
problems exist in using common mode coupling in the presence of earth leakage
protection devices, and certain countries do not allow common mode coupling because
of the perceived dangers to customers.

Considering the physical implementation of the coupling, two methods are possible:

Ÿ The first method is capacitive coupling. A capacitor is responsible for the actual
coupling.
Ÿ Alternatively, inductive coupling may be used. An inductor is used to couple the
communications signal onto the power network. Inductive coupling provides a physical
separation between power network and communications network, making it safer to
install.

Another challenge in designing a power line coupling network is obtaining a suitable


frequency response of the coupler. In the receive direction, it is desired that the coupling
device possess a band-pass characteristic, blocking 50Hz mains voltages, and passing
signals at the carrier frequency. In the transmit direction we wish for the coupler to possess
high-pass properties, passing the communications signal unattenuated. Such a network
should also be impedance matched to the power line for maximum power transfer. Meeting

22
Power Line Carrier Communications

all these requirements concurrently becomes very difficult. The ultimate coupler network
design becomes a compromise between the different characteristics for receive and transmit
direction, plus impedance.

Focussing on using an inductive coupling method (for safety reasons), the most common
coupler topology is shown in figure 3.5 (next page).

This method is based on two principles:

1. A value of Ceq that has sufficient impedance to block the 50 Hz power frequency.
2. Resonance between the coupling capacitor Ceq and the primary winding inductance L1 to
give a suitable low characteristic impedance.

The shortcomings of this topology involve use of the iron-core transformer. The effective
inductance of this core is difficult to measure, and can change in a non-linear fashion,
altering the characteristics of the coupling network.

Roy and Abraham [2] list an alternate coupler topology, given in figure 3.6. Here, a large
coupling capacitance (Ceq=0.5uF) is used to couple the signal onto the transmission line.
Giving a low transceiver input impedance, the major drawback of this approach is that it
results in significant carrier frequency loss (quoted as up to 20dB).

Given the significant losses faced using the second coupler topology, I believe the first
topology to be superior. By altering this topology slightly, using a double-secondary
transformer, the coupling network’s characteristics can be made less dependant on the
inductance of the transformer. This modified design is shown in figure 3.7. In having two
secondaries, the coupler network can be designed with a general wide-band, slow roll-off
response. Such a response means that transformer inductance is less critical, and coupler
performance less affected by inductance changes. This wide-band response can be modified
on the secondary side of the transformer, by designing further filter networks on each
secondary. On the receiver secondary, the wide-band response is improved to a narrow-

23
Power Line Carrier Communications

band response so as to pass carrier frequencies only. On the transmitter secondary, a wide-
band response is desirable for transmitter filtering, and thus left as-is.

To power line

Coupling Capacitor

Figure 3.5, General (common) PLC coupler topology.

To power line

C1 C2

Ceq

Figure 3.6, Abraham & Roy’s alternate coupler topology [2]

Ceq T?

Torroidal Transformer

Figure 3.7, Double-secondary coupler topology

24
Power Line Carrier Communications

3.4 Error Control Methods

Error control methods for any communications system can be divided up into two
categories: error detection and error correction.

3.4.1 Error Detection Methods

Error detection is the process of monitoring received data and determining when a
transmission error has occurred. Error detection methods do not identify which bit (or bits)
is in error, only that an error has occurred. The most common error detection techniques
are:

• Redundancy. Redundancy involves transmitting each character twice. If the same


character is not received twice in succession, a transmission error has occurred.
• Echoplex. Echoplex is used in data communications systems where human
operators enter data manually from the keyboard. Each character received at the
receiver is resent to the transmitter for the operator to confirm that character
was actually transmitted. A problem with Echoplex is that if transmission error
occurs between the receiver resending to the transmitter, necessitating an
unnecessary retransmission.
• Exact-count encoding. With exact count encoding, the number of ones in each
character is the same. The receiver counts the number of ones in a character, and
if this total does not equal the preset value, then an error has occurred.
• Parity checking. In parity checking, a single bit (the parity bit) is added to each
character to force the total number of “1” s in a character to be either odd (odd
parity) or even (even parity). Parity techniques fail when an even number of bits
are in error, making it possible to miss a large number of errors. However, parity
methods are simple and easy to implement.
• Checksum. A checksum is the least significant byte of the arithmetic sum of the
data transmitted. Transmitter and receiver both perform summing operations on
the data transmitted, with the checksum appended to the end of a data message
at transmission. If the receiver checksum does not equal the transmitter

25
Power Line Carrier Communications

checksum, an error has occurred. Checksum techniques detect 95% of errors,


but are more computation intensive than parity methods.
• Cyclic redundancy checking. Cyclic redundancy checking uses a division
operation on the transmitted sequence, appending the remainder of the division
operation to the message transmitted. At the receiver, this same division process
occurs. If the result of the receiver division process is other than zero, an error
has occurred. CRC error checking methods detect approximately 99.95% of
errors, but are very computation-intensive.

3.4.2 Error Correction Methods

The two most common methods of error correction are:

• Retransmission. Here, an error is detected and the receiver automatically


requests for the message to be retransmitted. This method is often referred to as
ARQ, or Automatic Request for Retransmission. ARQ techniques are simple,
but can be hindered by the overhead involved with acknowledgments and repeat
requests.
• Forward Error Correction (FEC). FEC techniques detect and correct errors at
the receiving end without calling for retransmission. With FEC, a number of bits
are added to the message. These extra bits are coded in a way that allows for a
certain number of errors per message to be detected and corrected. FEC
techniques increase message overhead by the addition of these bits, and are
relatively computation-intensive.

3.5 Recommendations for Error Control in the Power Line Carrier


Environment

The decision as to which error control methods to use in a PLC communications system
depends on the complexity of the system designed. The optimal solution is to use FEC error
detection and correction methods to cope with the majority of errors, and then CRC and
ARQ detection and correction methods to cope with errors missed by FEC. However, such

26
Power Line Carrier Communications

a system would be complex to implement. A less complex system with moderate


performance would be straight ARQ techniques, with cyclic redundancy checking to detect
errors, or for simpler systems, straight parity checking and ARQ.

3.6 Chapter Three Conclusions

In designing any communications system a number of decisions exist as to modulation


methods, channel and so on. Power line carrier communications has a number of its own
unique issues to be considered. After comprehensive computer simulation, it was found that
Frequency Shift Keying is the most suitable modulation scheme in an environment of
unpredictable phase shift. The coupling network used to couple a signal onto the power line
is the result of an unhappy compromise between desired impedances and frequency
responses, yet I have suggested a two-secondary coupler design that minimises the
compromises made. Lastly, error control is best done using combined FEC and ARQ
methods, the economical alternative being ARQ methods alone. Chapter Four details how
all these theory suggestions were implemented in a working power line carrier
communications system.

27
Power Line Carrier Communications

Chapter Four- Practical Implementation

Designing, Building and Testing a working Power Line


Carrier Communications System

4.1 Synopsis

This chapter details the practical implementation of a working power line carrier
communications system. Detailing my original practical goals for the project, it is discussed
how these have been extended into a more elaborate and complex system. I explain the
methods used to practically implement the system design recommendations made in the
theory section of this thesis. The devices chosen and circuits used are covered. Lastly, I
report on the results of testing the individual sections of my system, the problems
encountered and how they were solved.

4.2 Practical Goals

The original goals for this project were “Software and hardware implementation of a PLCC
system, to a level where multiple nodes exist, for use in control of electrical appliances- e.g.
stage lighting”; with a possible extension: “If the above is successful, investigate extension
of the scheme to a level where it can be used for transmission of data between computers
(albeit at a low baud rate)”.

After progressing through the research and theory stages of the project into initial
implementation stages, I became confident I would be able to extend the project goals to a
system that implemented a data link between personal computers. To this end, the practical
implementation component has focussed on building a serial link between two PC’s, using
domestic power lines as the transmission medium. I have aimed for a baud rate of 1200
baud, believing this a realistic goal and reasonable extension of the original project proposal.

To implement the serial link I designed two separate power line carrier communication
“modems” (Where in this context “modem” refers to the total PLCC system-
modulator/demodulator, coupling network, and so on.) Each modem plugs into the serial

28
Power Line Carrier Communications

port of a host computer and is controlled by a special-purpose communications program I


have written. The modems allow for half-duplex communication of whatever data the user
desires. The following sections of this report detail the practical implementation process of
these modems.

4.3 Theory into Practice

The theory section of this report suggests a number of modern communications methods
and techniques that lend themselves to reliable performance of a power line carrier
communications device in a hostile channel. Modulation, error control and coupling
methods were all suggested that are practical to implement and give suitable performance.
Practical aspects of each consideration are detailed below.

4.3.1 Spread-Spectrum Modulation System

We know that for reliable performance a PLC communications system should be frequency
agile, using spread-spectrum techniques to avoid frequency bands where excessive
interference exists. Also, considering reliability and ease of implementation, FSK is the
modulation scheme of choice. My original approach to practically implementing such a
scheme was to design an FSK, spread-spectrum communications integrated circuit,
implemented on an Altera programmable logic device, after finding no pre-made devices
available.

Progressing through the initial stages of designing such a system I gradually understood the
difficulties of this task. Implementing a digital system that works reliably in such a time-
varying environment as the PLC environment is very difficult. Timing issues are complex,
and I struggled for many hours trying to find solutions.

I soon realised a better engineering solution than attempting to design a communications


system in one chip, from the most basic of levels. By using ready-made components in
conjunction with the “clever” application of common communications methods, I was able
to reach a solution that was realistic, without sacrificing system performance.

29
Power Line Carrier Communications

I proposed to implement the communications system on two layers. The first layer is the
FSK modulation scheme. Methods of FSK modulation and demodulation are relatively
straightforward and widely implemented. By the judicious application of frequency-
synthesisers and phase-locked loops, one can construct an FSK modulation/demodulation
scheme from ready-made components.

After FSK modulation, the system comprises a second level of processing- the spread
spectrum scheme. I realised that well-known Amplitude Modulation (AM) techniques can
be modified to shift the frequency of the FSK waveform, creating a reliable frequency-
hopping scheme. Spread-spectrum demodulation can be performed by again modifying well-
known AM techniques. The block diagram of such a two-layer method is shown in Figure
4.1.

Detailing Layer Two of the scheme, by multiplying the FSK waveform with a carrier of
preset amplitude, the FSK waveform is “stepped up” to this new carrier frequency. This
process is represented in the frequency domain in figure 4.2. By altering the frequency of
this carrier, we can in effect “hop” the FSK waveform to whatever frequency we like.

Layer 1 Layer Two Layer Two Layer One


FSK S-Spectrum S-Spectrum FSK
Modulation Modulation Demodulation Demodulation

PLC channel
Coupling Coupling
network network

Figure 4.1, Block diagram of proposed two-level FSK/Spread-Spectrum power line


carrier communications system

30
Power Line Carrier Communications

-fFSK fFSK -fc fc -fc-fFSK -fc+fFSK


fc-fFSK fc+fFSK
-fc fc
Figure 4.2, Frequency domain diagram of frequency-hopping process using
convolution (multiplication) techniques.

Frequency-hopping demodulation is performed by a similar process. The frequency-hopping


(received) waveform is multiplied by the same carrier as in modulation, and then low pass
filtered to obtain the original FSK waveform.

Complying with the FCC and (proposed) CENELEC standards, I have chosen the following
bands of operation for the system.

Table 4.1 Frequency bands of operation of my spread-spectrum system.


f0(kHz) f1(kHz) fcarrier(kHz)
95 110 80
114 130 100
135 150 121

To evaluate the performance of my proposed design, I performed a number of computer


simulations using the software package Electronics Workbench. Unlike the earlier
MATLAB simulations, Electronics Workbench (EWB) is a graphics-based electrical circuit
simulation package. EWB has circuit models for FSK modulators, multipliers and other IC’s
that allowed rapid simulation of my system design. The model used for EWB simulation is
included in Appendix F. Results of circuit simulation suggested that my proposed PLCC
system will work correctly in practice. Graphs of the spread-spectrum system operation are
shown in figures 4.4 and 4.5.

31
Power Line Carrier Communications

New New
carrier carrier Binary output
Binary input stream
stream

FSK Low Pass FSK


modulator Filter demodulator
PLC channel

FSK waveform FSK waveform


Amplitude-modulated
waveform, at new carrier
frequency

Figure 4.3. Conceptual diagram of spread-spectrum frequency hopping system

Figure 4.4. Electronics Workbench simulation of spread-spectrum modulator operation. The heavy line is
the input to the modulator, and the thin line is the output from the modulator, at the new carrier frequency.

32
Power Line Carrier Communications

Figure 4.5. Electronics Workbench simulation of spread-spectrum demodulator operation. Input to the
demodulator is the –5 to +5 volt waveform, the output being the 0 to +/-5 volt wave. This output is low-pass
filtered to obtain the original FSK signal.

It should be noted that the applicability of the computer simulations of my PLCC system is
limited. In the computer model, I was unable to completely simulate the true behaviour of
the power line channel. I could simulate variable channel phase delay, but was very limited
in what types of noise and interference I could include in simulation. Although the PLCC
system appears to work in computer simulation, the system’s performance in an actual
practical power line environment, with all the time-varying parameters of such a channel,
can only be ascertained in real life tests.

4.3.2 Coupler Networks


As detailed in the theory section, a line with characteristic impedance Z0 is ideally connected
to a communications system with impedance Z0 at both ends. Z0 for a power line ranges
from 0-150Ω 3, so the respective impedance of the receiver and transmitter sections of a
PLCC system should be in a similarly low range. Concurrently, in the receive direction a
coupler network should possess band-pass characteristics at the carrier frequency, and
wide-pass characteristics in the transmit direction.

33
Power Line Carrier Communications

My original intention was to take advantage of a coupler network used in a previous year’s
PLCC project. However, on measuring the performance of this previous network it did not
perform satisfactorily. Both my PLCC system and the past system use the same carrier
frequencies, yet at this carrier frequency, the previous coupling network had an attenuation
of 20dB. A Bode frequency response plot of this network is shown in figure 4.7. I
considered the attenuation of this coupler is too great- surely a better design could be
achieved.

I believe the previous coupler’s performance to be poor because its design is an attempt to
obtain the desired the two desired frequency responses and impedance all at once, with a
single secondary transformer. The compromise necessary is too great.

Using the coupler topology shown in figure 3.7, (detailed in section 3.3 of this report) I was
able to greatly improve the performance of the coupling network. Details of the
construction of this topology are found below, in section 4.4.2.

4.4 Implementing the Two Layer System

The communications system relies on the application of a number of integrated circuits for
implementing the two layers of system operation. Suitable devices were found after a
laborious search of IC manufacturers and their components.

Each section of the system was prototyped on a breadboard before the more permanent
construction of a wire-wrap board. Each circuit was constructed in duplicate, giving two
complete modems for the communications link.

The following section of the report details the construction and testing of the individual
modem sections.

3
See section 2.3.2, Power Line Attenuation and Impedance.

34
Power Line Carrier Communications

4.4.1 FSK scheme


Fundamental to the operation of the FSK scheme is the application of two integrated
circuits, one for FSK modulation, the other for FSK demodulation.

FSK modulation is performed by the application of a Voltage Controlled Oscillator (VCO)


IC, the XR-2206. A voltage controlled oscillator produces an AC waveform, output
frequency directly proportional to the DC input voltage. By using the binary waveform as
the input to the VCO, we can vary the frequency of the output sinusoid, giving FSK
modulation. The system is designed to operate at a mark (“1”) frequency of 30kHz, and a
space (“0”) frequency of 15kHz. The circuit for this section is shown in Appendix A, and
component selection equations are shown in Appendix B.

Building and testing this circuit proved relatively straightforward. Using a square-wave
input stream (representing a constantly varying 0-1-0 binary waveform) for testing, mark
and space frequencies were confirmed, as well as general speed and stability. I found that
with individual chips, although I used the same external components, operation frequencies
were slightly different (by 1-5kHz), so some “tuning” was necessary to obtain identical
performance from each modem. The FSK modulator performed reliably up to very high
input frequencies- an input stream of 20kHz was modulated successfully.

FSK demodulation is performed by the application a Phase Locked Loop (PLL) IC. A phase
locked loop attempts to maintain frequency lock with its input waveform. When the input
waveform changes frequencies, an error signal occurs at the phase locked loop, causing it to
also change frequencies, attempting to again match the input frequency. By carefully tuning
the phase locked loop to the middle of our FSK mark and space frequencies, we can use its
error signal for FSK demodulation. Again, circuits for this section can be found in Appendix
A, and calculations in Appendix B.

Testing the FSK demodulation section involved passing an FSK input into the demodulator,
and tuning the phase locked loop parameters until a stable binary output was obtained.
Specifically, a square wave was passed into the FSK modulator section, producing an FSK

35
Power Line Carrier Communications

output. This output was passed directly to the demodulator section, and the demodulator
output compared to the overall input. Initially, demodulated output did not represent system
input particularly well! I found that for reliable performance of the demodulation section,
considerable time was required tuning various phase locked loop parameters, such as centre
frequency and damping coefficients. Eventually, reliable performance was obtained, and I
was able to input a square wave into the communications system, with the output observed
as a stable square wave of identical frequency. A copy of the oscilloscope screen for this
test is shown in figure 4.6.

Figure 4.6 Oscillogram of FSK modulation system input (top waveform) and FSK demodulation system
output (bottom waveform). Note the time lag between waveforms.

36
Power Line Carrier Communications

4.4.2 Coupling Network.

The actual coupler schematic is shown on page A-5. The schematic follows the basic
topology detailed in section 4.3.2. The torroidal transformer used in the coupling device is
hand wound on a ferrite-torroid. Unfortunately, I was unable to source any useful torroid
parameters, so transformer design (number of turns, etc) was largely empirical, based on
similar transformers and trial and error. The transformer secondaries have different turns
ratios. Primary to receiver secondary is a 2:1 ratio, doubling the input voltage to the high-
impedance receiver front end. Transmitter secondary to primary is a 1:1 turns ratio, to drive
the low-impedance power line.
Frequency response tests of the new coupler network were performed, and the results
showed significantly better performance than the previous network. Test methods of the
coupler networks are detailed in Appendix E. Graphs of the results are shown in figure 4.7.

Frequency Response of Old Coupler.


0
Attenuation(dB)

-50

-100

-150
100 1000 10000 100000 1000000
Frequency (rad/s)

Frequency Response of Re-Designed Coupler.


50
Attenuation(dB)

-50

-100

-150
100 1000 10000 100000 1000000
Frequency (rad/s)

Figure 4.7. Frequency response of old and new coupler networks. Note strong resonance of old network, and
much improved performance of new network.

37
Power Line Carrier Communications

Further testing of the coupling network and power line channel was then completed by
transmitting a sine wave through the coupler into one power point, and observing the
received sine wave at various power outlets, different distances away from the transmitter. I
found attenuation to vary considerably with distance, with a change of up to 90% on
different sides of the building. For test details see Appendix E.

4.5 Testing Layer One

After successfully constructing and individually testing a PLCC-FSK communications


system and coupling network, I believed it prudent to test the total system performance at
this level before moving on to constructing the spread-spectrum system. The spread-
spectrum level is simply a layer that fits “over the top” of Layer One, the FSK and coupling
system. Ideally, this first layer should perform adequately by itself, the spread-spectrum
layer simply improving Layer One performance under the influence of interference.

I decided to initially test the overall Layer One system by using the same input square wave
(from a function generator) as mentioned before. This square wave was modulated into an
FSK waveform, passed through the coupling network onto the power line. On the other
side of the room, the second coupler network passed the received signal through to the FSK
demodulator, and this demodulator output was observed on an oscilloscope. Initial test
results were promising, however I encountered a number of problems:

• The FSK modulator did not have sufficient current capacity to drive the low
impedance coupler network. During this testing stage, I solved this by using an off
the shelf power amplifier. Later, a dedicated amplifier circuit was designed to solve
this problem- see section 4.7.
• As noted above, attenuation varied greatly over small changes in distance. Thus, as I
changed the distance between transmitter and receiver, I was often either saturating
the FSK demodulator with the received signal, or alternatively, received signal
amplitude was insufficient for reliable demodulation- there seemed no happy middle
point. To rectify this problem, I implemented a variable gain amplifier, detailed in
section 4.7 of this report.

38
Power Line Carrier Communications

• As the FSK waveform underwent the rapid transition between mark and space
frequencies, the power line channel would “ring”, with a number of persistent
oscillations before settling down to one frequency. This ringing caused the phase
locked loop to fall out of frequency lock, giving unreliable output. By increasing the
damping of the PLL I was able to obtain a reliable output, but at the expense of
system speed. I am still able to obtain the aimed-for system speed of 1200Baud (in
fact, I exceeded it- see below), but it should be noted this ringing places a definite
ceiling on the maximum achievable baud rate using FSK modulation.
• When disconnecting the coupling network from mains power (switching off/pulling
out of power point), at times a large voltage spike would occur at the receiver.
Unfortunately, this spike destroyed two demodulator IC’s before I noticed it. Most
probably the result of a back-EMF style spike, the 30V Zener diodes I initially used
for spike protection were passing too large a voltage into the receiver front end,
destroying the demodulator IC. By using Zener diodes of a lower voltage I was able
to shunt excessive spikes to ground.

After solving the above problems, I was able to confirm successful operation of Layer One.
A 1200kHz square wave was transmitted onto the power line at one end of the room, and at
the other end of the communications system output was a similar 1200kHz square wave.

The next step in testing was to evaluate the performance of the PLCC communications link
between two computers, transferring actual data. After designing and constructing an RS-
232 driver for the modem (see section 4.7), each modem was connected to the serial port of
a computer, the computers on opposite sides of the room. For evaluation purposes, a
commonplace terminal communications program was used to send text from one computer
to another.

The PLCC link performed excellently. At 1200 baud, approximately 1 character in 100
(whilst transmitting a constant character stream) was in error. Increasing the baud rate, at
2400 baud (double my goal), approximately one character in twenty was in error, whilst at
9600 baud (eight times my system goal), one character in ten was in error.

39
Power Line Carrier Communications

It should be restated that this performance was without any error correction or spread-
spectrum strategies. With robust error correction and spread-spectrum operation to avoid
excessive interference, I believe the PLC communications system will far exceed the initial
goals set for it.

4.6 Implementing Layer Two- Enhancing the Performance of Layer One


After ascertaining the reliable and better-than-expected performance of Layer One, the basic
PLCC communications system, I felt confident in moving on to implementing Layer Two of
my design, the spread-spectrum system. Layer Two is designed to enhance the performance
of the basic communications system under excessive interference, enabling the system to
recognise and avoid frequency bands where interference exists.

4.6.1 Spread-Spectrum (Frequency-Hopping) Scheme.

Each functional section of the spread-spectrum layer, shown in figure 4.3, is implemented
with off the shelf components. The spread-spectrum carrier is supplied by voltage controlled
oscillator chip, the ICL8038.

Multiplication is performed by the MC1496 IC. This chip is used in a suppressed-carrier


amplitude modulation role. In suppressed carrier AM, the carrier frequency (fc) shown in
figure 4.2 is not transmitted, giving greater transmission efficiency, as we do not transmit
unwanted information.

Building and testing of these modulation/demodulation stages was successful. The function
generator IC that supplies the variable frequency carrier performed reliably, with no
problems encountered. Testing the modulator/demodulator circuit, few problems were
encountered. Initial testing was performed using laboratory function generators to supply
both modulator and carrier frequencies. The only problem encountered was with respect to
input voltages to the modulator IC. In order to keep the internal transistors of the
modulator IC biased correctly, special care must be taken to limit the voltage of the carrier
and modulator waveforms around 60 mVrms and 300 mVrms, respectively. After ensuring this
limitation is met, the spread-spectrum modulation/demodulation system worked reliably.

40
Power Line Carrier Communications

After satisfactorily checking the performance of the spread-spectrum system in


modulating/demodulating a sine wave of constant amplitude, Layer Two was then tested
using an FSK waveform from Layer One. Again, a square wave was FSK modulated, and
passed onto the spread-spectrum modulation stage. After spread-spectrum demodulation,
the resultant wave was FSK demodulated, and the output observed on an oscilloscope.
Various oscilloscope results of this test are shown in Appendix C. Figure 7 shows the FSK
modulation and spread-spectrum circuits performing as desired.

Figure 4.7. Oscillogram of spread spectrum modulation system operation. The top waveform is the input to
the FSK modulator. The bottom waveform is the corresponding FSK waveform, but at “hopped” up to a
higher frequency. (This frequency is too high to appear as individual waveforms on display- it appears as
one constant black section)

41
Power Line Carrier Communications

4.6.2 Performing the Frequency-Hop


Frequency-hopping is achieved by varying the frequency of the carrier input to the spread-
spectrum modulator chip. This frequency is directly proportional to the input voltage at the
voltage controller oscillator.

To initiate a frequency-hop, the local computer generates a pulse on the RDY line of the
RS-232 port. This pulse is used to clock a serial shift register, which gives a binary pulse
that shifts down the register outputs with each clock signal. This binary “number” is passed
onto a crude digital to analog converter, the output of which is a DC voltage proportional
to the input binary value. This DC voltage is used to control the output frequency of the
VCO. The block diagram for this scheme is shown in figure 4.4. The circuit and devices
used to perform this control operation is detailed in Appendix A, section 8.

This frequency-hopping control hardware of my system has been tested successfully, in the
same method used to test the frequency hopping (spread-spectrum)
modulation/demodulation hardware. Using a square wave for modulation/demodulation
evaluation purposes, the carrier frequency of the VCO was altered by supplying pulses to
the shift register. As the software section of the project has not been completed, these
pulses were supplied manually, instead of from the serial port of the computer. So long as
the frequency at modulator and demodulator VCO’s was very similar, the frequency hop
process occurred successfully, transparent to the modulation/demodulation process.

Shift- Digital
Host Register To Analog
Computer Converter

Digital pulse, commanding a


shift in frequency
4-bit binary “number”, DC voltage, goes to VCO,
proportional to desired carrier directly controlling output
frequency carrier frequency

Figure 4.4. Block diagram of frequency-hopping control system

42
Power Line Carrier Communications

4.6.3 Controlling the Frequency-Hopping System- System Software

Synchronising each modem so that they both attempt operation in the same frequency band
requires careful consideration in such a project. Synchronisation is controlled by the
protocol software I have written. This software constantly evaluates the number of received
errors, and reacts in accordance with how many errors are encountered.

When a certain number of errors is reached, the software initiates a frequency-hop


operation, first signalling the remote modem to hop to the next frequency band. This hop
command is acknowledged by the remote modem, after which both computers signal their
respective modem to hop to the next frequency band.

The protocol software for this project is being written in Visual Basic. At the time of
writing, this software has yet to be completed. No significant problems have been
encountered thus far, and it is anticipated that successful protocol operation will confirmed
seen in the near future.

4.6.4 Error Checking and Correction

Reviewing section 3.4, the best options for error control in the PLC environment are FEC in
conjunction with ARQ methods, or, the less complex straight ARQ correction and detection
methods. I believe that at the baud rates I am using, and with the error results shown in
testing Layer One, straight ARQ techniques will suffice. I have chosen to use parity
checking for the error correction method. Parity checking is easy to implement, and Visual
Basic has ready-made parity-checking routines supplied. The error detection, and
subsequent correction methods are closely associated with the frequency hopping control
software, and are being written concurrently. A block diagram of this software is shown in
Appendix D.

4.7 Miscellaneous Devices

The PLC modem contains a number of devices necessary for system operation, however
they do not perform any significant communications role. These devices are necessary for

43
Power Line Carrier Communications

interfacing the modem to the host computer, current drive roles, and voltage gain stages.
Specifically:

• An RS-232 driver circuit was constructed to interface the modem to the host
computer’s serial port. The serial port uses +15V to represent a binary “1” and –
15V to represent a binary “0”. The RS-232 driver circuit converts these voltages
to and from the +5V and 0V binary representations suitable for the rest of the
modem. The circuit is based on a dedicated IC, the MAXIM RS-232 line driver
IC.
• A basic amplifier circuit was constructed to drive the low impedance coupler
network at the transmit end of the modem. The amplifier is a basic class AB
power amplifier configuration. That is, two transistors are used for amplification,
with a diode junction added to bias these transistors correctly. Such a
configuration is not overly complex, yet does not have the non-linearity
problems of simpler designs.
• A variable gain amplifier circuit was constructed at the receive end of the
modem. It was found that the input signal to the modem varied greatly with
distance- from 1V to 20 V over a distance of a few rooms. The input end of the
modem cannot cope with such large variations, so a variable gain stage was
constructed to give a constant input to the demodulation stages. This variable
gain stage uses a feedback process to control a variable gain operational-
amplifier. This basic control loop ensures that the output of the op-amp is
constant at a preset voltage.

All three circuits are presented in Appendix A, where schematics and a discussion of circuit
operation can be found. Each circuit was individually tested and all perform to specification.

4.8 Results and Outcomes of the Practical Implementation

The implementation of a practical power line carrier communications system has been
successful. A system has been built and tested that transmits data from one computer to

44
Power Line Carrier Communications

another, at a baud rate in excess of 2400 baud. Following this, work has been successful on
improving the performance of this system by adding spread-spectrum capabilities to it. The
overall integration of this spread-spectrum operation with the original system has yet to be
tested, with work soon to finish on the software component of the device. However, I have
tested the individual components of the spread-spectrum system, and confirmed that they
work successfully with manual control. The addition of software control to this section is
progressing well, with no problems encountered. Thus, no further problems are anticipated
in achieving overall integration of the software and hardware aspects of the total
communications system.

45
Power Line Carrier Communications

Chapter Five- Conclusions and Extensions

5.1 Conclusions

This project has been a very successful one, with all project aims and goals met, and some
exceeded. A successful power line carrier communications link has been constructed, the
result of detailed research, design and simulation procedures.

Addressing the individual project goals, a number of conclusions can be made for each one:

After detailed research, I have gained an in-depth knowledge of the issues facing power line
carrier communications. These issues, technical and general have been presented in the
theory sections of this thesis. I introduced possible uses for PLC techniques, primarily for
home automation purposes. Current power line carrier systems are very simple and not
suitable for home networking. With this in mind, the focus of the project was to discover
why these systems remain simple, how they can be improved, and if PLC techniques are
truly feasible for home networking communications.

Theory research listed a number of considerable challenges facing PLC communications,


including power line interference, variable attenuation and time varying characteristics. In
meeting these challenges, for optimal performance a power line carrier communications
system should be frequency diverse (using spread-spectrum techniques), possess robust
error control techniques, and careful consideration needs to be given to design issues such
as the coupling network.

Following on from the conclusions and recommendations of the theory research, I have
constructed a working power line carrier communications link between two personal
computers. Considerable time was spent laying the groundwork for this practical stage -
different proposals were considered as to how to implement theory suggestions in a
practical way. Eventually, a novel solution was proposed, that modified well-known
communications techniques to achieve spread-spectrum performance, from easily available
devices- the “Two Layer” scheme. Comprehensive computer simulations were performed to

46
Power Line Carrier Communications

predict the performance of my chosen solution(s). Finally, after in-depth parts searches, the
different sections of a working power line carrier communications system were constructed
on a wire-wrap board. The PLCC system was used successfully to transfer data between
two personal computers at a baud rate of 2400-9600 baud, over double the project goals.
Work is ongoing on improving the reliability of this link by achieving the total integration of
the suggested “Two Layer” scheme into one complete system. Individual sections have all
been completed and tested, and spread-spectrum modulation/demodulation has been tested
successfully. The system awaits testing of the control software before I can declare it totally
complete.

Lastly, after theory research, practical experimentation and implementation I can conclude
that power line carrier communications are a viable method of implementing a home
network. Many challenges exist, limiting the capability of current systems. Yet with the
judicious application of modern communications methods such as spread-spectrum
techniques, power line carrier systems can be designed that are robust, flexible and high-
speed. With research ongoing, and a number of commercial devices expected to soon reach
the market, there is no other method as flexible and economical as power line carrier
communications for implementing a home network in any building.

5.2 Extensions

This project has built and established a working power line carrier communications system.
Currently, the system works reliably at a baud rate of 2400 baud. With the theoretical and
practical work done during this project, the groundwork has been laid for future projects to
improve the performance of the power line carrier system. There are a number of areas that
can be explored:

• Investigate the application of more advanced modulation methods than


frequency shift keying. From the shortlist of modulation methods chosen,
frequency shift keying was shown to have the best performance for PLC
communications. Yet during experimentation, the sudden frequency change of
FSK caused a “ringing” of the power line channel, limiting the maximum
frequency of transmission (and thus data rate). Recently, much more advanced

47
Power Line Carrier Communications

modulation methods such as Differential Code Shift Keying [25] promise to


solve the limitations faced by FSK modulation techniques.
• Investigate the possibility of data compression techniques for improving the
performance of the PLC link. Such methods would possibly involve including a
microprocessor system with the PLCC modem. Similar methods are used for
improving the performance of phone line modems greater than 9600 baud.
• Following on from the last suggestion, take the burden of error control away
from the host PC, and implement the error control system through a
microprocessor on the modem itself.
• Develop a robust addressing scheme so multiple PLCC modems can coexist
within close proximity of each other without interference.

48
Power Line Carrier Communications

References

[1] Hendrik C Ferreira and Olaf Hooijen, “Power Line Communications: An Overview”,
Transactions of the S.A Institute of Electrical Engineers, September 1995
[2] K. C. Abraham and S. Roy, “A Novel High-Speed PLC Communication Modem”, IEEE
transactions on Power Delivery, Vol. 7, No. 4, October 1992.
[3] R.M Vines, H.J Trussel, L.J Gale and J.B O’Neal, “Noise on residential power
distribution circuits,” IEEE Transactions on Electromagnetic Compatibility, Vol. EMC-27,
No.1, Feb 1995, pp 6-12.
[4] D.M. Monticelli and M.E. Wright, “A Carrier Current Transceiver IC for Data
Transmission Over the AC Power Lines.”, IEEE Journal of Solid-State Circuits, Vol SC-17,
No.6, December 1982.
[5] L Schaap, “The ROBCOM System”, Proceedings of the Workshop on Communications
over Power Lines, AJ Han Vinck, O Hooijen, Eds, Essen, ISBN 9074249-05-1, Germany,
May 25, 1994, Part V.
[6] J Newbury, “Communication Requirements and Standards for Low Voltage Mains
Signalling”, IEEE Transactions on Power Delivery, Vol 13, No. 1, January 1998.
[7] G Kelly, “Home Automation: Past, Present & Future”, Electronics Australia, February
1997.
[8] J Newbury, “Power Communication Developments and International Standards”, IEEE
Transactions on Power Delivery, Vol 12, No. 2, April 1997.
[9] M. Karl and K. Dostert, “Selection of an Optimal Modulation Scheme for Digital
Communications over Low Voltage Power Lines”, IEEE, 1996.
[10] T. Waldeck and K. Dostert, “Comparison of Modulation Schemes with Frequency
Agility for Application in Power Link Communications Systems”, IEEE Transactions on
Power Delivery, 1996, Vol 7, No. 4, pp821-825.
[11] G. Marubayashi and S. Tachikawa, “Spread Spectrum Transmission on Residential
Power Line", IEEE Conference on Spread-Spectrum Techniques, January 1996, pp1082-
1086.
[12] “Designing Systems with the IC/SS Power Line Carrier Chipset”, National
Semiconductor Application Note 919, January 1994.

49
Power Line Carrier Communications

[13] C. Ladas, “Spread Spectrum adapts to Networking on the AC Power Line”, Wireless
System Design Archives, Penton Publishing, November 1997.
[14] D. Raphaeli and E. Bassin, “A Comparison between OFDM, Single Carrier, and
Spread Spectrum for High Data Rate PLC”.
[15] R. Evans, “Line Carrier Link for Home Automation-1”, Electronics Australia
Magazine, November 1997, pp60-67.
[16] R. Evans, “Line Carrier Link for Home Automation-2”, Electronics Australia
Magazine, December 1997, pp70-74.
[17] W. Tomasi, “Electronic Communications Systems, Fundamentals Through Advanced,
Third Edition”, Prentice Hall International, 1998.
[18] M.H. Horenstein, “Microelectronic Circuits and Devices, Second Edition,”, Prentice
Hall, 1996.
[19] D. Moutin, “Power Line Carrier Communications”, University of Newcastle Electrical
Engineering Project Report, November 1998.
[20] Nortel Communications Pty Ltd. web site, http://www.nortel.com
[21] K. M. Dostert, “Frequency-hopping spread-spectrum modulation for digital
communications over electrical power lines”, IEEE Journal on Selected Areas in
Communications, vol 9, no 3, May 1990, pp700-710.
[22] J. A. Malack and J. R. Engstrom, “RF Impedance of United States and European
Power Lines”, IEEE Transactions on Electromagnetic Compatibility, vol. EMC-18, no. 1,
February 1976, pp. 36-38.
[23] J. Onunga and R. W. Donaldson, “Distribution line communications using CSMA
access control with priority acknowledgments”, IEEE Transactions on Power Delivery, vol.
4, no. 2, April 1989, pp 878-881.
[24] “The Role of Power Line Communications in the Networked Home.” Eitan
Einwohner, ITRAN communications limited web site, http://www.itran.com
[25] “The Advantages of Differential Code Shift Keying Applied to CEBus”, ITRAN
communications limited web site, www.itran.com
[26] J. G. Proakis and M. Salehi, “Contemporary Communications Systems Using
MATLAB”, PWS Publishing Co. 1998.

50
Power Line Carrier Communications

Glossary of Terms

AC
Alternating Current. Electrical power transmission method where the current and voltage
waveforms vary periodically about the zero-crossing mark. In the context of this project
refers to the 240V mains power voltage.

Amplitude Modulation (AM)


A modulation technique where an input waveform is used to modulate the amplitude of the
carrier waveform.

ARQ
Automatic Request for Retransmission. An error control method in data communications.
See Section 3.4.2.

ASCII
American Standard Code for Information Interchange. A widely used representation of
letters, numbers, special characters and control characters in binary form.

Baud Rate
The measure of data transmission speed for communication systems. More specifically, the
number of signal pulses per second- in common usage, the number of bits per second.

Bit Error Rate (BER)


The fraction of received bits that are in error, usually expressed as a negative power of ten.
For example a BER of 10e-6 would mean that one bit in every million is incorrect. A
common measure of a communication system/scheme’s effectiveness.

Byte
A group of eight bits.

Carrier
A single frequency signal whose characteristics are varied in a time dependant way to
transmit information.

Channel
The medium over which a communications signal is passed. In radio communications the
channel is air (more correctly, radio waves), in power line carrier communications the
channel is the power line.

CEBus
Consumer Electronics Bus. A home-networking standard. See theory section for details.

CENELEC
European Economic Community standards body.

Glossary- 1
Power Line Carrier Communications

Coupling Network/Device
An electrical circuit which connects two other circuits, often with different characteristics,
together. In this project, coupling network refers to the circuit which connects the
communications system to the power line.

CRC
Cyclic Redundancy Checking. An error detection method in data communications. See
Section 3.4.1.

DCE
Data Communications Equipment. A class of communications equipment specified in the
standard RS-232C. A modem is typically referred to as DCE. A DCE must be connected to
Data Terminal Equipment (DTE), it cannot be connected to another DCE.

Demodulation
The reverse process of modulation. See modulation.

DTE
Data Terminal Equipment. Another class of communications equipment specified in RS-
232C. Typically a computer or terminal. A DCE cannot be directly connected to another
DCE, with the use of a null-modem adaptor.

Error Correcting Code


A coding scheme for data transmission that contains enough redundant information so that
errors can be detected and corrected without retransmission.

EWB
Acronym for Electronics Workbench. An electrical circuits simulation software package.

Frequency Agility
The ability of a communications system to change its carrier frequency often.

Frequency Hopping
A communications technique where transmission carrier frequencies are changed regularly.

FSK
Frequency Shift Keying, a modulation technique where a “1” is represented by one
transmitted frequency and “0” another.

Impedance
A measure of an electrical circuit’s response to alternating currents, analogous to resistance
for direct currents.

Impulse Noise
An unwanted electrical signal of very short time duration.

Glossary- 2
Power Line Carrier Communications

IC
Integrated Circuit. A complex electronics circuit that has been constructed on one single
silicon chip. Greatly simplifies the construction of electronic devices by minimising the
number of discreet components used.

Jamming
Disrupting the operation of electrical systems by generating electromagnetic energy that
interferes with desired signals.

LED
Light Emitting Diode. Used as an indicator on electronics equipment.

LSB
Least Significant Bit.

Mark Frequency
The frequency that represents a binary “1” in FSK modulation schemes.

Modulation
Varying some characteristics of a signal in a time dependant way to transmit information.

Null Modem
An adaptor that allows one DCE to connect to another DCE. See also DCE.

OSI (ISO-OSI)
International Standards Organisation- Open System Interconnect. A general model of data
communications systems that segregates functionality into seven layers: physical, link,
network, transport, session, presentation and application.

Outage
Refers to when the power supply to an individual dwelling fails or is disconnected.

Overvoltage
In the context of this project, the case where the mains voltage at a power point is greater
than the system standard. (In Australia 240 Volts.)

Packet
A block of information of limited length, typically consisting of a header and data section. In
packet communications, a message is broken up into different packets which are transmitted
and verified separately.

PLC
Power Line Carrier. See PLCC.

Glossary- 3
Power Line Carrier Communications

PLCC
Power Line Carrier Communications. A communications technique where electrical power
distribution lines are used to carry communications information.

PLL
Phase locked loop. See circuit theory textbook!

Protocol
The agreed-upon procedures that govern communications on a network.

PSK
Phase Shift Keying, a modulation technique where the change between a “1” and a “0” is
represented by changing the phase of a carrier signal.

RS-232C
An Electronic Institute of American (EIA) standard that governs digital serial
communications. It specifies signal functions, voltage levels, and pin-assignments.

Signal to Noise Ratio (SNR)


The ratio of signal strength to noise level in a communications system.

Space Frequency
The frequency that represents a binary “0” in FSK modulation schemes.

Spread Spectrum
An electronic communications technique where the signal is deliberately spread over a wide
range of frequencies, rather than being confined to a narrow frequency band.

Undervoltage
In the context of this project, the case where the mains voltage at a power point is less than
the system standard. (In Australia 240 Volts.)

White Noise
Random electrical signals spread uniformly in frequency throughout the spectrum.

X-10
A home-automation standard. See theory section for details.

Glossary- 4
Power Line Carrier Communications

Appendix A-Circuit Schematics and Descriptions

A- 1
Power Line Carrier Communications

A-1 FSK modulation circuit


VCC

5.1k XR-2206
1 16
1 16
FSK Output
2 15
50k 2 15
XR-2206
3 14
3 14
FSK
4 13 200
VCC 4 13
100nF Modulator
5.1k 5 12
0.1uF 1uF 5 12
10uF
6 11
6 11 1uF
680 7 10
7 10
330 8 9
8 9

Modulator input

With 680 and 330 Ohm resistors


and 100nF capacitor,
F0=14705 Hz, F1=30303 Hz.

The FSK modulation circuit is based around the Exar devices XR-2206 function generator IC. This IC is a
multi-purpose voltage controlled oscillator, particularly useful for FSK modulation applications such as this.
The IC requires a minimum number of external components. The resistors at pins 7 and 8 combine with the
capacitor at pin 6 to determine the mark and space frequencies of the device. Calculations for these
component values are shown in Appendix B. The voltage divider on pin 3 is used to adjust the shape of the
sine wave output of the device.

A-2 FSK Demodulation Circuit

VCC

0.1uF
RC2211 2.2nF
1 14 18k 5k
1 14 5k
2 RC2211 13
FSK Input 2 13
0.1uF 3 FSK 12
3 12
4 Demodulator 11
4 11
0.1uF
5 10 27k
5 10
6 9
6 9
470pF
5.1k 7 8 100k
7 8

1pF 82pF
510k

CAP

1pF for 2400 baud operation.

FSK demodulation is performed using the Raytheon Devices RC-2211N IC. This IC is based around a phase
locked loop topology. Critical external components are those shown on pins 8 and 13. These components set

A- 2
Power Line Carrier Communications

such parameters as PLL centre frequency, damping coefficient and gain. Component selection calculations
are shown in Appendix B.

A-3 Spread-Spectrum Modulator

Modulating signal input- 300mVrms

10uF
+
+
25uF
50k
10k 1 14
1 14
10k 1k 2 ICL8038
MC1496 13
2 13
12Vdc
3 Waveform
Balanced 12 3k
3 12
4 Generator
Modulator/ 11 0.1uF
4 11 Carrier input- 60mVrms
10k 5 Demodulator 10
5 10
100 100 3k 6 9 51
6 9
7 8
0.1uF 7 8
+
DSB/SC output
0.1uF 25uF 820 1.3k

1k

Spread-spectrum modulation and demodulation is performed using the MC1496 IC from National
Semiconductor. This IC performs DSB-SC modulation and demodulation. External components are
responsible for ensuring that the transistors internal to the IC are biased correctly for linear operation.
Component selection followed the suggestions given on the device data sheet. The potentiometer on pin 1 is
for carrier-null adjustment, in obtaining true suppressed-carrier modulation.

A- 3
Power Line Carrier Communications

A-4 Spread-Spectrum Demodulator

0.1uF
1 14
DSB input 1 14
100 2 ICL8038
MC1496 13
2 13 1uF
3 Waveform
Balanced 12 1k

+
3 12 AF output
4 Generator
Modulator/ 11 0.1uF
4 11 Carrier input- 300mVrms 0.005uF 0.005uF
10k 5 Demodulator 10
5 10
1k 1k 3k 6 9 51
6 9
7 8
0.005uF 7 8
12Vdc

0.1uF 820 1.3k 3k

1k

This circuit is a slight modification of the spread-spectrum modulator circuit. See section A-3 for details on
this circuit.

A-5 Spread-Spectrum Carrier Generator

1 14
1 14
2 ICL8038 13
Sine out 2 13
81k
3 Waveform 12
3 12
330 4 Generator 11
4 11
VCC 330 5 10
5 10
6 9 0.1uF
VCC 6 9
7 8
7 8 Freq-modulator in
0.1uF
820k

The spread-spectrum carrier circuit is based on an EXAR ICL8038 function generator IC. Based on a small
number of components, this IC generates a triangle, sine and square wave, frequency proportional to input

A- 4
Power Line Carrier Communications

voltage and external component selection. The resistor and capacitor on pin 8 determine the natural
frequency of the circuit, whilst the resistors on pins 4 and 5 determine wave shape.

A-6 Coupler Network

VZ=10V VZ=10V

1nF
1:1:2
S? To transmitter
100mA 47nF
Active
FUSE1 C1
GND

Neutral
1nF
To receiver
TRANS1

VZ=10V VZ=10V

This power line coupler network follows the topology detailed in the section 4.3.2 of the thesis. Diodes are
added for spike protection, preventing excessive voltages from reaching the front-end of the receiver
module. A fuse has been included for over-current protection, and power switch added. The whole coupling
network has been housed in a plastic box to protect the user from 240V mains potential.

A- 5
Power Line Carrier Communications

A-7 Variable Gain Stage

1k

0.1uF 82 1.5k

IC2
+15V +15V
1 8 1 8
LM318 LM318
2 7 2 7
OP-AMP OP-AMP
3 6 3 6
4 5 4 5
-15V +5V -15V
IC3
1k

100 50
IC1
1k +7V +7V
POT1 1 14
1 14
2 CLC520 13
2 13
-5V 3 Voltage 12 1k
Vin 3 12
+5V
182 4 Controlled 11
4 11
50 10k 5 OP-AMP 10
5 10
50 6 9
6 9
1k
POT2 C? 7 8
CAP 7 8
10k -7V -7V

-5V

The variable-gain section of the modem is based on a CLC520 variable gain op-amp. The output of the
CLC520 is passed to a further gain stage, at IC2, an op-amp in non-inverting amplifier configuration. After
amplification, the signal is rectified and passed to an inverting integrator circuit (IC3- another basic op-amp
configuration). When the total circuit output voltage is too high, the integrator output ramps down, reducing
the gain of the CLC520 and thus Vout. If the output is too small, the integrator ramps up, increasing the
gain and thus output voltage. Pot1 sets the desired output voltage level, whilst Pot2 is to minimise the effect
of DC offsets.

A- 6
Power Line Carrier Communications

A-8 Frequency Hopping Control

+5 Reference voltage
1 2 1 16
1 16
+5
2 15
74LS04 2 15
74LS194
3 14
3 14
4-bit
4 13 NPN
4 13
Shift
5 12
5 12
Register
6 11
6 11 To RDY
+5 NPN
7 10
7 10
8 9
8 9

NPN

1k 1k

To VCO

1k 3k 1k

Frequency hopping control is based around a shift register and crude digital to analog converter circuit. The
shift register is clocked by pulses from the host PC. Each clock pulse causes a “1” level on to move down
the output pins, shifting serially. When four pulses are received, meaning a “1” at bit four, this “1” level is
inverted and used to manually reset the shift register. The shift register output lines are used to drive a basic
digital to analog converter setup. When an output line is high, it turns on the corresponding transistor,
causing current to flow through the voltage divider circuit on the transistor emitter. Each voltage divider is
different, meaning a different output voltage that depends on which line of the shift register is “1”. This
output voltage is passed to the ICL8038 IC, being directly proportional to the frequency of the carrier wave.

A-9 RS-232 Driver/Receiver


1uF

1uF +5V 1uF


1 16
1 16
2 15
2 15
MAX232
3 14
3 14 RS-232 output
1uF RS232
4 13
4 13 RS-232 input
Driver/
5 12
5 12 TTL output
1uF Receiver
6 11
6 11 TTL input
7 10
RS-232 output 7 10 TTL input
8 9
RS-232 input 8 9 TTL output

A- 7
Power Line Carrier Communications

The RS232 line driver circuit is based on the Maxim devices MAX232 IC. It is based completely on the
circuit schematic suggested in the IC data sheet.

A- 8
Power Line Carrier Communications

Appendix B-Component Selection Calculations

B- 1
Power Line Carrier Communications

B-1 XR-2206 Calculations

1 1
Now F1 = and F2 = . So with a base of F1=15kHz and F2=30kHz,
R1C R2C

1 1
15kHz = 30kHz =
R1C R2 C
R1C = 6.67 *10 −5 R2 C = 3.33 * 10 −5
R1 = 667Ω R2 = 333Ω

Using a 100nF capacitor and choosing practical resistor values, R1=680Ω and R2=330Ω we
find this gives F1=14705Hz and F2=30303Hz

B-2 RC-2211N Calculations

f0 =
(14705 + 30303)
1) PLL centre frequency 2
f 0 = 22504 Hz

2) Choose R0=20kΩ (18kΩ with 5kΩ potentiometer)

3) Finding C0:
1
F0 =
R0 C 0
1
22504 =
20 * 10 3 * C 0
C 0 = 2.22 * 10 −9

4) Finding R1:

B- 2
Power Line Carrier Communications

 F0 
R1 = R0  
 (F1 − F2 ) 
 22504 
R1 = 20 * 10 3 
 15598 
R1 = 28.85 *10 3

R1=27kΩ in series with a 5kΩ potentiometer

5) Find C1, using a damping coefficient of ξ=0.5:

C0
C1 =
4
C1 = 0.555 *10 −9

in practice, use a 470pF capacitor in parallel with an 82pF capacitor.

6) Find Cf, using a baud rate of 2400 baud.

3
Cf =
BaudRate
3
Cf =
2400
C f = 1.25 * 10−12
C f ~ 1 pF

B- 3
Power Line Carrier Communications

Appendix C- Oscilloscope Hardcopies

C- 1
Power Line Carrier Communications

C-1 FSK System measurements

Figure C-1. Shows operation of FSK modulation circuit The square wave is a function generator input to the
circuit, the sinusoidal wave the modulator output.

C-2 Spread-Spectrum System Measurements.

Figure C-2. Shows operation of spread-spectrum modulator circuit. The top waveform is an FSK input to
the circuit, the bottom waveform the output of the spread-spectrum modulator.

C- 2
Power Line Carrier Communications

Figure C-3. Shows operation of FSK and spread-spectrum modulator circuits. The top waveform is the input
to the FSK modulator. The bottom waveform is the corresponding output of the spread-spectrum modulator.

Figure C-4. Shows operation of total spread-spectrum system. The top waveform is the FSK input to the
spread-spectrum modulator. The bottom waveform is the output of the spread-spectrum demodulator, ready
to be passed to the FSK demodulator.

C- 3
Power Line Carrier Communications

Figure C-5. Shows operation of overall FSK modulation and spread-spectrum systems The top waveform is
the input to the FSK modulator. The bottom waveform is the output of the spread-spectrum demodulator,
ready to be passed to the FSK demodulator.

C- 4
Power Line Carrier Communications

Appendix D- System Software Flowcharts

D- 1
Power Line Carrier Communications

Transmitter flowchart:

Start

Read in 20 characters
from keyboard

Transmit characters

Wait for
acknowledgment

No
Retransmit 20 Message
characters received
ok?

Yes
Hop
command No
received? End
No message?
Yes
Yes
Transmit frequency hop
acknowledgment Stop

Send hop command

D- 2
Power Line Carrier Communications

Receiver Flowchart:

Start

Read in 20 characters

Check parity of 20
characters

Yes
Erase 20 characters Parity
Error?

No
Request
No
retransmission of 20
characters. Send characters on to
Update error counter. screen/control device

Error count
threshold No
exceeded? End
No message?
Yes
Yes
Transmit frequency hop
request Stop

Hop request
acknowledged?
No
Yes

Send hop command to


hardware

D- 3
Power Line Carrier Communications

Appendix E- Coupler Testing Methods

E- 1
Power Line Carrier Communications

E-1 Introduction

The following tests were used to determine the performance of the coupling networks
detailed in this project. A comparison of new and old couplers was performed, as was a
distance test of the new coupler network.

E-2 Methods

Coupler comparison- using a sine-wave sourced from a laboratory function generator as the
signal source, this signal was passed to the receive section of the coupling network. The
resultant output signal of the receive coupler was measured for magnitude and phase shift.

Distance tests- using the new coupler, a sine wave was transmitted through the coupler
network onto the power line, and the output sine wave at different power points throughout
the building measured.

E-3 Results- Coupler Comparison Tests

Old Coupler:

Input Frequency Input Voltage (V) Output Voltage (V) Phase Shift (degrees)
(kHz)
0.05 22 0 0
1 22 0 0
7 22 0.64 ~180
8 22 0.84 ~180
10 22 1.73 ~180
12 22 3 ~180
12.5 22 10 ~180
15 22 2 0
20 22 0.84 0
30 22 0.6 0
40 22 0.54 0
60 22 0.52 0
80 22 0.52 0
100 22 0.52 0

New Coupler:

Input Frequency Input Voltage (V) Output Voltage (V) Phase Shift (degrees)
(kHz)
0.05 7 0
1 7 0.136
2 6.96 0.364 Not measured

E- 2
Power Line Carrier Communications

5 6 2.04
10 3 5.56
12 2.96 5.8
15 2.84 7.08
25 4.68 13.9
50 7.36 17.2
100 8.4 18.2

E-4 Results- Coupling Network Distance Tests

Transmitting a 20Vpk sine wave @ 40kHz:

Position Received Voltage(V)


Other side of desk 40
Other side of room 30
Other side of building 2.8
Opposite side of building 1

E- 3
Power Line Carrier Communications

Appendix F- Electronics Workbench Simulation Model

F- 1
Power Line Carrier Communications

The model above was used to simulate the FSK modulation and spread-spectrum operation
of my proposed system. The model shown is a “top level” model. Each block in the above
model (for example the FSK block & DAC block) represents a more complex circuit that
performs the individual operation of that circuit (for example FSK modulation and digital to
analog conversion).

F- 2
Power Line Carrier Communications

Appendix G- MATLAB Code for Modulation Scheme


Comparisons

G- 1
Power Line Carrier Communications

% Program FSKcomparPSK.
%
% Performs Monte Carlo simulation of binary FSK vs. binary PSK modulation schemes.
%
% Output is two 2-dimensional matrices, simulated_biterror_FSK and simulated_biterror_PSK,
% corresponding to a Frequency Shift Keying system and Phase Shift Keying system
% respectively. The rows of each matrix correspond to various values of phase error, columns correspond
% to varyious values of Signal to Noise Ratio (SNR).
%
% Calls functions BinaryFSK and BinaryPSK, which perform simulation of actual communications
% system.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Glenn Platt. May 1998.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clf
clear
simulated_snr_dB=0:0.5:10; %Vector of SNR values to simulate at
N=1000; %Number of simulations to run
samples=500; %Number of samples to take per time interval
Tb=1; %Time interval
count=0;

for phase_error=0:0.1:1
phase_shift=phase_error*pi;
count=count+1;
for counter=1:length(simulated_snr_dB) %Calculates simulated probability of error, using Monte Carlo analysis
simulated_biterror_FSK(count,counter)=BinaryFSK(simulated_snr_dB(counter),N,samples,Tb,phase_shift)
simulated_biterror_PSK(count,counter)=BinaryPSK(simulated_snr_dB(counter),N,samples,Tb,phase_shift)
end;

end;

save('FSKcomparPSKnew.mat');

G- 2
Power Line Carrier Communications

% Function BinaryFSK
%
% Performs Monte Carlo simulation of Binary Frequency Shift Keying modulation system.
%
% Requires: snr_dB: received(input) signal to noise ratio in decibels
% N: number of Monte Carlo simulations to perform
% samples: Number of samples to take per time period
% Tb: length of time interval
% phase_shift: PLL phase estimation error
%
% Returns: biterror, the probability of bit error for given signal to noise ratio
%
% Calls gngauss.m, a function that calculates a Gaussian distributed random variable.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Glenn Platt. May 1999.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function biterror=BinaryFSK(snr_dB,N,samples,Tb,phase_shift);

Eb=1;
f0=50000; %Space frequency('0')
f1=1.05*f0; %Mark frequency('1')
biterror=0;
t=0:Tb/(samples-1):Tb %Vector of sample times for calculations
SNR=10^(snr_dB/10); %Converts signal to noise ratio from dB to decimal scale per bit
sigma=sqrt(Eb/(2*SNR)); %Noise variance
for count=1:N; %Sets up a vector of random input data
temp=rand;
if temp<0.5;
data(count)=0;
else
data(count)=1;
end;
end;

actual0=cos(2*pi*f0*t); %Simulates what is actually transmitted for a '0' input


actual1=cos(2*pi*f1*t); %Simulates what is actually transmitted for a '1' input
PLL0=cos(2*pi*f0*t+phase_shift); %Simulates output of PLL at '0' branch, including a phase estimation error
PLL1=cos(2*pi*f1*t+phase_shift); %Simulates output of PLL at '1' branch, including a phase estimation error
PLL0s=sin(2*pi*f0*t+phase_shift); %Quadrature of PLL0 (sine)
PLL1s=sin(2*pi*f1*t+phase_shift); %Quadrature of PLL1 (sine)

for count=1:N; %For given SNR, performs Monte Carlo simulation N times
noise=gngauss(sigma); %Calculates a random noise variable, mean 0, variance sigma
for noise_add=1:samples %Adds noise to received signal.
if abs(actual0(noise_add))>0.0010;
snrprelim=abs(actual0(noise_add))/abs(noise); %Scales magnitude of noise realtive to Signal to Noise ratio(SNR)
adjust=SNR/snrprelim;
SNR;
snr=actual0(noise_add)/(1/adjust*noise);
end;
actual0(noise_add)=actual0(noise_add)+((1/adjust)*noise);
actual1(noise_add)=actual1(noise_add)+((1/adjust)*noise);
end

if data(count)==0 %Performs correlation process: If a zero transmitted, correlator output=


correlator0(1)=PLL0(1)*(actual0(1)); %received input for a zero, plus noise, multiplied by output
correlator1(1)=PLL1(1)*(actual0(1)); %of PLL at each branch.
correlator0s(1)=PLL0s(1)*(actual0(1));
correlator1s(1)=PLL1s(1)*(actual0(1));
else
%Same for a one transmitted, except multiply by received input for a one, plus noise
correlator0(1)=PLL0(1)*(actual1(1));
correlator1(1)=PLL1(1)*(actual1(1));
correlator0s(1)=PLL0s(1)*(actual1(1));
correlator1s(1)=PLL1s(1)*(actual1(1));
end;

for int_count=2:samples; %Continues correlation process, including integration

G- 3
Power Line Carrier Communications

if data(count)==0;
correlator0(int_count)=correlator0(int_count-1)+(PLL0(int_count)*(actual0(int_count)));
correlator1(int_count)=correlator1(int_count-1)+(PLL1(int_count)*(actual0(int_count)));
correlator0s(int_count)=correlator0s(int_count-1)+(PLL0s(int_count)*(actual0(int_count)));
correlator1s(int_count)=correlator1s(int_count-1)+(PLL1s(int_count)*(actual0(int_count)));
else
correlator0(int_count)=correlator0(int_count-1)+(PLL0(int_count)*(actual1(int_count)));
correlator1(int_count)=correlator1(int_count-1)+(PLL1(int_count)*(actual1(int_count)));
correlator0s(int_count)=correlator0s(int_count-1)+(PLL0s(int_count)*(actual0(int_count)));
correlator1s(int_count)=correlator1s(int_count-1)+(PLL1s(int_count)*(actual0(int_count)));
end;
end;

r0=correlator0(samples)^2+correlator0s(samples)^2; %Performs square law detection operation.


r1=correlator1(samples)^2+correlator1s(samples)^2;
maximum=max([r0 r1]);

if r1==maximum %Decision process to work out whether '0' or '1' sent


output=1; %Decided based on threshold criterion of which correlator
else
%output is of greatest magnitude.
output=0;
end;

if output~=data(count) %If what it was decided was sent is not equal to what was
biterror=biterror+1; %actually sent, increase the error counter.
end

end

biterror=biterror/N; %Probability of error for N bits transmitted

G- 4
Power Line Carrier Communications

% Function BinaryPSK
%
% Performs Monte Carlo simulation of Binary Phase Shift Keying modulation system.
%
% Requires: snr_dB: received(input) signal to noise ratio in decibels
% N: number of Monte Carlo simulations to perform
% samples: Number of samples to take per time period
% Tb: length of time interval
% phase_shift: PLL phase estimation error
%
% Returns: biterror, the probability of bit error for given signal to noise ratio
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Glenn Platt. May 1999.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function biterror=BinaryFSK(snr_dB,N,samples,Tb,phase_shift);

Eb=1;
f0=50000; %Space frequency('0')
biterror=0;
t=0:Tb/(samples-1):Tb; %Vector of sample times for calculations
SNR=10^(snr_dB/10); %Converts signal to noise ratio from dB to decimal scale per
bit
sigma=sqrt(Eb/(2*SNR)); %Noise variance

for count=1:N; %Sets up a vector of random input data


temp=rand;
if temp<0.5;
data(count)=0;
else
data(count)=1;
end;
end;

actual0=cos(2*pi*f0*t+(2*pi*0)); %Simulates what is actually transmitted for a '0' input


actual1=cos(2*pi*f0*t+(2*pi*0.5)); %Simulates what is actually transmitted for a '1' input
PLL0=cos(2*pi*f0*t+(2*pi*0)+phase_shift); %Simulates response of PLL at '0' branch-
including a phase estimation error
PLL1=cos(2*pi*f0*t+(2*pi*0.5)+phase_shift); %Simulates response of PLL at '1' branch-including a
phase estimation error

for count=1:N;

%For given SNR, performs Monte Carlo simulation N times

noise=gngauss(sigma); %Calculates a random noise variable, mean 0, variance sigma


for noise_add=1:samples
if abs(actual0(noise_add))>0.0010; %Adds noise to received signal.
snrprelim=abs(actual0(noise_add))/abs(noise); %Scales magnitude of noise relative to Signal to Noise
Ratio(SNR)
adjust=SNR/snrprelim;

G- 5
Power Line Carrier Communications

SNR;
snr=actual0(noise_add)/(1/adjust*noise);
end;
actual0(noise_add)=actual0(noise_add)+((1/adjust)*noise);
actual1(noise_add)=actual1(noise_add)+((1/adjust)*noise);
end

if data(count)==0

%Performs correlation process: If a zero transmitted, correlator


%output=received input for a zero, plus noise, multiplied by
correlator0(1)=PLL0(1)*(actual0(1)); %output of PLL at each branch
correlator1(1)=PLL1(1)*(actual0(1));
else
%Same for a onetransmitted, except multiply by received input
for a one, plus noise
correlator0(1)=PLL0(1)*(actual1(1));
correlator1(1)=PLL1(1)*(actual1(1));
end;
for int_count=2:samples; %Continues correlation process, including integration
if data(count)==0;
correlator0(int_count)=correlator0(int_count-
)+abs(PLL0(int_count)*(actual0(int_count)));
correlator1(int_count)=correlator1(int_count-
)+abs(PLL1(int_count)*(actual0(int_count)));
else
correlator0(int_count)=correlator0(int_count-
)+abs(PLL0(int_count)*(actual1(int_count)));
correlator1(int_count)=correlator1(int_count-
)+abs(PLL1(int_count)*(actual1(int_count)));
end;
end;
maximum=max([correlator0(samples) correlator1(samples)]);
if correlator1(samples)==maximum %Decision process to work out whether '0' or '1' sent
output=1; %Decided based on threshold criterion of which correlator
else %output is of greatest magnitude.
output=0;
end;
if output~=data(count) %If what it was decided was sent is not equal to what was
biterror=biterror+1; %actually sent, increase the error counter.
end;

end

biterror=biterror/N; %Probability of error for N bits transmitted

G- 6
Power Line Carrier Communications

% Program FSKcomparPSK_plotting.
%
% Performs graphical presentation of the output of MATLAB file FSKcomparPSK.m
%
% Input is file FSKcomparPSK_plotting.m, containing two 2-dimensional matrices
% simulated_biterror_FSK and simulated_biterror_PSK.
%
% Output is individual graphs showing error probability of Phase Shift Keying anf Frequency Shift
% Keying communications methods with varying Signal to Noise Ratios (SNR's). Each graph corresponds
% to a different value of phase error for the demodulator.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Glenn Platt. May 1998.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clf;

load FSKcomparPSKnew1.mat

for counter=1:3;
subplot(3,1,counter)

plot(simulated_snr_dB,simulated_biterror_FSK(counter,:),simulated_snr_dB,simulated_biterror_PSK(count
er,:),':');
xlabel('SNR');
ylabel('Bit error probability');
end

legend('FSK','PSK');
figure
for counter=4:6;
subplot(3,1,counter-3)

plot(simulated_snr_dB,simulated_biterror_FSK(counter,:),simulated_snr_dB,simulated_biterror_PSK(count
er,:),':');
xlabel('SNR');
ylabel('Bit error probability');
end
legend('FSK','PSK');
figure
for counter=7:9;
subplot(3,1,counter-6)

plot(simulated_snr_dB,simulated_biterror_FSK(counter,:),simulated_snr_dB,simulated_biterror_PSK(count
er,:),':');
xlabel('SNR');
ylabel('Bit error probability');
end
legend('FSK','PSK');
figure
for counter=10:11;
subplot(3,1,counter-9)

G- 7
Power Line Carrier Communications

plot(simulated_snr_dB,simulated_biterror_FSK(counter,:),simulated_snr_dB,simulated_biterror_PSK(count
er,:),':');
xlabel('SNR');
ylabel('Bit error probability');
end

legend('FSK','PSK');

G- 8
Power Line Carrier Communications

function [gsrv1,gsrv2]=gngauss(m,sgma)
% [gsrv1,gsrv2]=gngauss(m,sgma)
% [gsrv1,gsrv2]=gngauss(sgma)
% [gsrv1,gsrv2]=gngauss
% GNGAUSS generates two independent Gaussian random variables with mean
% m and standard deviation sgma. If one of the input arguments is missing
% it takes the mean as 0, and the standard deviation as the given parameter.
% If neither mean nor the variance is given, it generates two standard
% Gaussian random variables.
if nargin == 0,
m=0; sgma=1;
elseif nargin == 1,
sgma=m; m=0;
end;
u=rand; % a uniform random variable in (0,1)
z=sgma*(sqrt(2*log(1/(1-u)))); % a Rayleigh distributed random variable
u=rand; % another uniform random variable in (0,1)
gsrv1=m+z*cos(2*pi*u);
gsrv2=m+z*sin(2*pi*u);

G- 9
Power Line Carrier Communications

Appendix H- Device Data Sheets

H- 1

You might also like