You are on page 1of 3

Instructions to use the generator tool

PLC_noise.m

1 Instructions
• This is the main file that accumulates the following types of noise-

1. Colored background noise


2. Narrowband noise
3. Periodic impulse noise synchronous with the mains
4. Periodic impulse noise asynchronous with the mains
5. Aperiodic impulse noise

• This file is written as a function that can be called in your custom transceiver
script. Once you introduce the power line channel to your transmitted sig-
nal, call this function to add power line noise.
• This file can also be run as a stand-alone script to examine noise.

• This file provides you with three different options to choose the noise
conditions:
1. Best - lowest practically possible in-home power line noise level
2. Worst - highest practically possible power line noise level
3. Random - a noise level somewhere between the ‘Best’ and ‘Worst’
conditions
• If no option is selected by the user, the “Random” option is chosen by
default.
• An example of how to use this is provided at the beginning of the file in
the comments section.
• Additionally, you edit other noise parameters individually. Please refer to
the respective readme files for more instructions on each of them.
• Note: Ensure compatibility across files while varying individual noise pa-
rameters.

1
2 Noise Generating Procedure
• Time to frequency interconversion parameters are set according to Home-
Plug AV specifications [1]. Specifically,
– Fast Fourier Transform size = 3072
– Sampling frequency = 75 MHz
– Sub-carrier spacing = 24.414 kHz
• The user input for this file determines the level of noise to be generated.
• This noise level is fed to each of the noise generating files.
• The variable ‘num_cyc’ determines the total number of mains cycles for
which the noise is generated. The user may vary this to any value desired.
• The variable ‘freq_mains’ is set to 60. This sets the mains frequency to
60 Hz. This is set as a default, since it is the mains frequency of electrical
signals in North American. In Europe and South Asian countries, this
is typically 50 Hz. This value can be changed accordingly. This value
determines the total number of time domain noise samples that will be
generated. When this code is run as a stand-alone file to examine the
noise, this value will not matter. However, when the user wants to use
this file in a custom transceiver code the user might want to match the
mains frequencies.
• The vector ‘per_sync’ contains the periodic impulse noise synchronous
with the mains cycle that is generated by the function ‘prasad_sync()’.
• The vector ‘per_async’ contains the periodic impulse noise asynchronous
with the mains cycle that is generated by the function ‘prasad_async()’.
• The vector ‘aper’ contains the aperiodic impulse noise that is generated
by the function ‘AperiodicImpulseNoise()’.
• The vector ‘gbn_freq’ contains the PSD of the shaping filter for general-
ized background noise, which is the sum of colored background noise and
narrowband noise, in dBm/Hz.
• This is then converted to dBW/Hz and conjugate flipped to get a real
impulse response of the shaping filter.
• Next, a random white gaussian noise signal is passed through this shaping
filter to obtain the colored generalized background noise. The details and
theory behind this procedure are explained in - [2].
• Finally, the time domain signals of the colored generalized background
noise, periodic impulse noise synchronous with the mains, periodic impulse
noise asynchronous with the mains, and the aperiodic impulse noise are
added to get the overall power line noise.

2
• The time domain signal is plotted as is.
• Additionally, the power spectral density of the signal is also plotted. The
power spectral density is calculated using the Welch method [3] using the
MATLAB function pwelch(). The user can also enter ‘doc pwelch’ in the
MATLAB command window for more details.

• The rest of the steps are commented appropriately in the source code.

References
[1] H. A. Latchman, S. Katar, L. Yonge, and S. Gavette, Homeplug AV and
IEEE 1901: A Handbook for PLC Designers and Users. Wiley-IEEE Press,
2013.
[2] D. Benyoucef, “A new statistical model of the noise power density spectrum
for powerline communication,” in IEEE International Symposium on Power
Line Communications and its Applications (ISPLC), 2003, pp. 136–141.

[3] P. Welch, “The use of fast fourier transform for the estimation of power spec-
tra: A method based on time averaging over short, modified periodograms,”
IEEE Trans. Audio & Electroacoust., vol. 15, pp. 70–73, 1967.

You might also like