Communication over the power lines have been going on for a while without really understanding the power line as a medium. We have with this thesis tried to better understand and even explain some of the problems which occur with the power lines as a communication medium. Parameters we focused on were the impedance and the noise and how they changed with different frequencies. To do the measurings we had to design and build our own measuring equipment. Basically this was an A/D-converter, some filters and a computer. Collected data was later analysed in a computer, using a FFT. We investigated the following four different power grids, an office, a suburb area, a block of flats and a special constructed power grid.
Our results showed that the impedance increased for higher frequencies. Connecting a load generally decreased the impedance. Typical values for a normal power grid is between 1
and 10
for the frequencies between 9-250 kHz. Most of the time the background noise can be approximated with white noise with N0 / 2 = 10-12 Vp2 / Hz. Connected loads contribute with additional noise.
An estimate of the maximum possible bit rate is determined by Shannon’s capacity theorem. The channel is then approximated as an ideal AWGN channel, additive white Gaussian noise. With our results we determined Shannon’s limit to 4 Mbit/s. Bit rates for some different signal constellations were determined. One alternative we found was 128-QAM with a bit rate of 2.8 Mbit/s.
TABLE OF CONTENTS
1 Introduction
1.1 Description of the problem
1.2 Purpose
1.3 Limitation of the thesis
1.4 Audience
1.5 Disposition
2 Pilot study
2.1 Earlier research
2.2 Measurement principles
2.2.1 Basic measuring
2.2.2 Handhold digital memory oscilloscope
2.2.3 Digital memory oscilloscope
2.2.4 Data acquisition card
2.2.4.1 Sampling rate
2.2.4.2 Multiplexing
2.2.4.3 Number of bits
2.2.4.4 The installed computerboard
2.2.4.5 Software
2.3 Simulation of different sample parameters
2.3.1 Number of samples
2.3.2 Number of bits
3 Preparation for the measurings
3.1 Filter design
3.1.1 Antialiasing filter
3.1.2 Highpass filter
3.1.3 Total solution of the noise filter
3.2 Impedance measurement
3.2.1 Idea
3.2.2 Frequency content
3.2.3 Construction of the impedance measuring equipment
3.2.4 Sampling and calculation of the impedance
3.3 Software in the Pascal language
3.4 Verification of the measuring equipment
3.4.1 The equipment for measuring the noise
3.4.2 The equipment for measuring the impedance
4 The controlled power grid
4.1 Construction of the power grid
4.2 Limitations of measuring
4.3 Background noise of constructed power grid
4.3.1 Background noise
4.3.2 Contribution of noise from different loads
4.4 Impedance measurements
4.4.1 Measuring the impedance of the power grid without any loads
4.4.2 Power grid with a vacuum cleaner as a load
4.4.3 Power grid with a drilling machine as a load
4.4.4 Power grid with a hot-plate as a load
5 Ordinary power grids
5.1 Office with many computers connected
5.1.1 Measuring the impedance
5.1.2 Measuring the noise
5.2 Power grid in a suburban area
5.2.1 Measurements of the impedance
5.2.2 Measuring the noise
5.3 Block house area
5.3.1 Measuring the impedance
5.3.2 Measuring the noise
5.3.3 Impedance and noise in the evening
5.4 Summary of the results
6 Bit rates
6.1 The channel capacity
6.2 Different signal constellations
7 Summary
References
Appendix 1
Appendix 2
Appendix 3.1
Appendix 3.2
Appendix 4
Appendix 5
Appendix 6
Our problem was to design an equipment to measure the impedance and the noise in the power grid for all frequencies between 10 to 250 kHz. With this equipment we were supposed to analyse the communication possibilities for some different power grids.
The purpose of this Master thesis was to investigate and describe the low voltage power line as a communication medium.
Because of different standards for communication the frequency band is limited to 9-455 kHz. We focused on the impedance and the noise in a short time analysis. The different environments for this analysis were also limited. We chose to measure four different power grids, three distribution grids and one with no loads. Our three distribution grids were an office environment, one in a suburban area and one in a block house area.
The primary audience is personnel involved in Sydkraft’s IDA-project, working with communication over the power lines. But hopefully also, an audience with interest and knowledge in communications will find this thesis interesting.
Our project was divided into three parts. First we investigated what has been done in this area earlier and what kind of equipment to use. In the second part we designed the measuring equipment and measured some power grids. The third part was to analyse the collected data.
To better understand the power grid as a communication medium we performed a pilot study to see what has been done earlier. An investigation how to construct a reliable equipment to measure both impedance and noise was also done.
We started to find out as much as possible about the power line as a medium. Books, magazines and internet were examined. The results from previous investigations did not contain the information we needed. Though, some basic results showing typical values of noise and impedance was found. One study divided the power lines in three subdivisions, namely home, office and industry. Communication over the power lines has been going on for a while but most of the research have been done on the high voltage lines. This grid can not be compared with the low voltage power lines because the low voltage grid is changing all the time. Imagine how often you are switching on or off an electronic equipment. Every event cause a change of the loads and noise contribution.
Most of the examinations over the low voltage power lines, investigated only the interference from the harmonics of the 50 Hz signal. These interference exists for frequencies up to 1 kHz but we wanted to examine the frequency band between 9 kHz to 455 kHz. These harmonics can be neglected, because in the frequency band of interest these harmonics are effectively attenuated.
To determine the channel, we considered some different methods. One of them was using a dynamic signal analyser, oscilloscope and a function generator. The second alternative was using a handhold oscilloscope from Fluke or Techtronix. The third alternative was using a digital memory oscilloscope. Finally we considered using a DAQ-card to sample the signal and store the samples in a memory and then do a FFT-analysis.
Our first idea how to determine the channel, was using a dynamic signal analyser. Advantages with this equipment is in particular its well defined accuracy. A dynamic signal analyser is using a 12 bits vertical resolution which equals approximately 96 dB (Appendix 1). Further advantages are all the built-in functions e.g. FFT calculation, average calculation and several different trig options. Using a dynamic signal analyser also gives the user the option to determine the transfer function, but to do this the analyser needs two channels. When using two channels the sample rate at each channel decreases with a factor two, (see 2.2.4.2 multiplexing). It means that you only can use half of the frequency span. This is the greatest limitation when using a dynamic signal analyser. One problem is that our goal was to determine how noise and impedance depend on the frequencies up to 500 kHz and the best analyser could reach 100 kHz in the transfer function mode and 200 kHz in the noise level mode.
The input range to a digital signal analyser are typical maximum 30 V. To protect the equipment and the inputs from the 50 Hz signal as well as the high voltage peaks, some filters are necessary. This matching equipment has to be analysed and well defined so that a compensation later in the analyse can be done.
Our first idea was to use a function generator and an oscilloscope to analyse the channel. In that way we could determine the attenuation between two nodes relatively easy. From the oscilloscope we also could get the delay between the transmitted and the received signal. Even though this is a simple test it gives a lot of useful information about the channel. Unfortunately this method can not be used when there is high voltages in the power grid.
A more sophisticated voltage meter is the handhold digital oscilloscope. It is a little sample oscilloscope that is easy to move. It gets the power supply from an internal battery, which means that the instrument is not connected to any ground. One of our ideas was using this kind of instrument as an A/D-converter. Both Fluke and Techtronix have these kind of digital memory oscilloscope, Scopemeter respectively Techscope. There are no obvious differences between them.
The basic idea was using the instrument as an A/D-sample-and-hold equipment. The instrument was supposed to sample very fast and store the data into an internal memory. After we had filled the memory we should have transferred the data to a hard disc in a PC. Later in the PC we could analyse the data.
These oscilloscopes are designed to handle the high voltage that exists on the power lines. This means that when we are using a Scopemeter or a Techscope we can measure in a safe way. Both the instruments could also sample fast enough, up to 10 MSa/s. It also seemed easy to transfer the data from the instrument to the computer while the instruments were using a RS-232 interface and the software were based on Windows and DOS. To make a safer connection, there was a possibility to use an optical interface. That means that no galvanic connection between the instrument and the computer exists.
The main reason why we did not choose this method was that the sample rate was not adjustable and the frequency resolution with such a high sample rate became too low. Another limit was the low vertical resolution, both instruments samples with only 8 bits which corresponds to about 48 dB (Appendix 1). A rule of thumb for a good FFT-analysis is using at least 12 bits vertical resolution. As well as the vertical resolution the internal memory limits the accuracy. The instruments internal memory varied from 512 samples (Fluke) to 2500 samples (Techtronix). More samples give a better frequency resolution, see Table 2.1. Antialiasing filters must always be used when using a digital data collection method. Since there were no possibilities to change the sample rate in the instruments, the frequency resolution became too low.
Instead of using a simple handhold oscilloscope, we thought of using a digital memory oscilloscope but we soon realised that the problem with the low vertical resolution remained. Memory oscilloscope was not the solution of the problem.
The supply of DAQ-cards that fulfilled our requirements were very limited. DAQ-cards with a sample rate of 1 MSa/s or higher are rare.
Basically a DAQ-card consists of a sample-and-hold circuit and an A/D-converter. But these cards usually also have other features as D/A-conversion and a number of digital in- and outputs. In our application with a high sample rate, the vertical resolution is limited to a 12 bits vertical resolution, but with a lower sample rate, such as 50 kSa/s, 16 bits vertical resolution is not unusual, e.g. soundblasters.
This parameter determines how often conversions can take place. A faster sampling rate gives more points in a given time interval and can therefore form a better representation of the original signal. To properly digitise this signal for analysis the Nyquist sampling theorem implies that we must sample with at least more than twice the rate of the maximum frequency component existing in the signal.
A common technique for measuring several signals with a single A/D-converter is multiplexing. The A/D-converter samples one channel, switches to the next channel, samples it, switches to the next channel, and so on. Because the same A/D-converter is sampling many channels instead of one, the effective rate of each individual channel is inversely proportional to the number of channels sampled. As an example, a card sampling at 1 MSa/s on two channels the effectively sample rate at each individual channel will be 500 kSa/s.
The number of bits that the A/D-converter uses to represent the analogue signal is the resolution. The higher resolution, the higher the number of divisions the amplitude range must be broken into, and therefore the detectable voltage change becomes smaller. For example a 3 bit converter divides the amplitude into 23, or 8 divisions. Clearly, the digital representation is not a good representation of the original analogue signal since information has been lost in the conversion. However, by increasing the resolution to 16 bits the number of codes from the A/D-converter increases from 8 to 65536, and one can therefore obtain an extremely accurate digital representation of the analogue signal if the rest of the analogue input circuitry is designed properly.
The range refers to the minimum and maximum voltage levels that the A/D-converter can quantize. Multifunction DAQ boards offer selectable ranges so that the board is configurable to handle a variety of different voltage levels. The range, resolution, and gain available on a DAQ board determines the smallest detectable change in voltage. As an example, a board with 12 bits and a voltage range of 0.625 V can detect signals down to 0.625 V / 4096 levels = 0.15 mV. This change in voltage represents 1 LSB, Least Significant Bit, of the digital value. However detecting such a small signal requires an almost noise free environment. Computers, switched power supplies and filters usually contribute with noise, this equals loosing one or two bits in accuracy.
The installed computerboard usually communicate via the ISA-bus. But considering the bandwidth of the ISA-bus, approximately 800 kHz, compared to the sampled data rate at 1 MHz the ISA-bus is not fast enough. To properly save all the data the computerboard need to have access to a fast internal memory. Depending on what computerboards are used, the size of the memory varies a lot. Some computerboards even have internal connections to external memory. To make a proper FFT it takes approximately 1-2 kSa. The sampled data is usually saved as two 8-bits word. This means that 1 kSa equals 16 kbit = 2 kbytes.
DAQ hardware without software is useless. The majority of DAQ applications use driver software. Driver software is the layer of software that directly programs the registers of the DAQ hardware, managing its operation and its integration with the computer resources. Driver software hides the low-level, complicated details of hardware programming, providing the user with an easy-to-understand interface.
To find out more about how important different sample parameters are in a FFT-analysis we tried to make a realistic model of our A/D-converter, sample circuit and FFT. To simplify the problems some M-files, subprograms, in the calculation program MatLab was written.
Basically we made a sampled signal in a M-file to MatLab and used these data to make a FFT-analysis. In this program a lot of parameters could easily be changed. In this way we could investigate which parameters were important and in what way.
Some particular parameters were of special interest e.g. how many samples, what sample rate and how many bits would be necessary. We also wanted to study which frequencies would be possible to detect with the given parameters.
So the questions to be answered were: How good could the FFT-analysis be, given the number of samples? Is 512 samples enough? How many percent of a sinusoidal signal do we have to sample to make a good frequency estimate? Is 8 bits vertical resolution enough?
To get an idea of how many consecutive samples it takes to make a good FFT-analysis we wrote a program in MatLab. In this program it was easy to change our sample length and sample rate. Basically this program make a signal consisting of one or several frequencies. The signal was discretized in time and stored into an array. The next step was to do the Fourier transform, the result was then visualised by plotting both the amplitude and the phase.
Our conclusion was that higher sample rate decreases the resolution in frequency between the samples. When sampling with a high sample rate under a short period the low frequency signals almost appears like a DC-level.
Ratio Resolution / number of samples
|
Number of samples |
Sample rate |
Resolution |
Test frequency band |
|
512 |
1 MSa/s |
5 kHz |
0-500 kHz |
|
4096 |
1 MSa/s |
500 Hz |
0-500 kHz |
|
512 |
200 kSa/s |
1 kHz |
0-100 kHz |
|
2048 |
200 kSa/s |
200 Hz |
0-100 kHz |
|
4096 |
200 kSa/s |
100 Hz |
0-100 kHz |
Table 2.1
The resolution is the distance between two discernible discrete frequencies, or more correctly it takes one lower value between two higher values to see the higher values. Distance between two dots in the frequency plane = sample rate / number of samples. According to Nyquist sampling theorem it is possible to analyse frequencies up to the half sample rate, this equals the frequency band.
Conclusion: 512 samples with a sample rate at 1 MSa/s fulfil our requirements for our analysis. But if a higher resolution is wanted for the frequency it takes more samples, see Table 2.1.
To simultaneously detect signals, with both low and high amplitude, it takes a certain number of bits. A bigger difference between the two signals in amplitude, the more bits are needed to detect the small signal. When we added two sinusoidal signals with different frequencies and amplitudes we found that it was possible to detect a 1000 times lower signal in amplitude, which equals approximately 60 dB. Worth mentioning is also that when the frequency difference between the two signals is small it gets harder to detect a signal with low amplitude.
This analysis is made with float numbers. The real instrument has 8 or 12 bits vertical resolution so the result above shows the best case. To use all the bits in an efficient way and to get a good accuracy, the strong low frequency signal should be removed. The easiest way to do this is using a highpass filter.
We wanted to estimate how many levels the signal had to be divided into to do a proper FFT. The lowest value of bits was 8, it represents approximately 48 dB (Appendix 1). If we truncated a signal with peak-to-peak value of 2, into two decimals. It equals log2 (2 / 0.01) = 7.6 bits. This represents approximately 8 bits. The difference between a float number and this truncated value in the Fourier transform was hard to see. So the conclusion was that 8 bits are enough. But more bits give a better resolution and are therefore necessary if a signal with low amplitude should be possible to detect together with a signal with a high amplitude.
Conclusion: Some kind of high- and lowpass filters are necessary to maintain the resolution so that all bits can be used efficiently.
For our measurements we needed to have a controlled situation to better understand the power grid. This power grid should also behave like a normal distribution grid. The only way to have this kind of grid, was to build our own grid. To make it possible to sample the values into a computer, an interface was needed as mentioned above. These special interfaces are not available on the market so we build them ourselves. A few lines in Pascal was needed to store the samples in a suitable way from the DAQ-card.
Since the vertical resolution is not infinite and the fact that some equipment are designed for low level signals, an interface between the power line and the rest of the equipment is necessary. A highpass filter to eliminate the 50 Hz signal was needed. When sampling a signal, it is also necessary to use an antialiasing filter to prevent interference from higher frequencies. We realised that ordinary RC-filters were not efficient enough, so we designed filters of higher order. These filters had to have a good amplitude function but we did not care so much about the phase function. Only the absolute values were interesting for us. Because of our two different measurements, noise level and impedance, we needed two different antialiasing filters with cut-off frequencies around 500 kHz and 250 kHz respectively.
An antialiasing filter is a lowpass filter which is used to attenuate all signals above a given frequency. In our case we have chosen the given cut-off frequency just below half the sampling rate, which is the maximum frequency when aliasing is not allowed.
Our ambition was to make a filter with a small attenuation and a small ripple in the passband. The filter was also supposed to change fast from the pass- to the stopband in which it should have a large attenuation.
Our demands on the filter were, having a passband up to 450 kHz, with a maximal ripple of 5.0 % and an attenuation of at least 40 dB for frequencies above 600 kHz. The demands on the second filter were the same, but the given cut-off frequency was now set to 240 kHz instead of 450 kHz.
To fulfil these demands we had to use filters with higher orders than five. There are several well known standard filters which have the possibility to fulfil our demands. The different filters were Bessel, Butterworth, Cauer and Chebychev. Bessel is the only one of these that have linear phase but it has a very slow change from pass- to stopband. Butterworth is a filter type with no ripple in the passband but a relatively fast change from stop- to passband. Cauer is the filter with the fastest change form pass- to stopband, but it has a little bit more ripple in the passband than the other filters. The Chebychev-, Butterwoth- and Cauerfilter all belong to the Chebychevfamily. All filters described above are well tabulated in filter handbooks, where the demands on the ripple, the attenuation and the change from pass- to stopband are well declared. In these handbooks you also find the circuit schedule of the filters with the values of the components normalised by frequency and input resistance.
Choosing a 7:th order Cauerfilter fulfilled our demands good. When calculating the real values of the components we had to denormalise the given values from the table in a handbook of filter synthesis. Following formulas were used:
![]()
![]()
Where const.k is the normalised value of the components for Lk and Ck from the handbook, and
is the given cut-off frequency in rad / s.
To be able to change the parameters easy we wrote a M-file in MatLab. It calculates the values of the components and plots the transfer function of the filter (Appendix 2). Other configurations of filters were examined, but finally a Cauer filter of 7:th order with a parallel structure was chosen, see Figure 3.4. This filter has an attenuation of 50 dB in the stopband and a small ripple close to the cut-off frequency. This ripple is not a problem when aliasing in this area makes this frequency band useless.
When the program had delivered the calculated values of the components, available component values were chosen. Using the real component values instead of the calculated values did not change the transfer function significantly.
The highpass filter is used to attenuate the strong 50 Hz signal and other low frequency signals. These low frequencies are not of any interest for us. The demand on the fast attenuation between pass- and stopband is not as hard as it is for the lowpass filter. The stopband should begin at 100 Hz and the passband at 9 kHz. On the other hand the filter attenuation had to be at least 60 dB. The components in this filter must also be constructed to handle the high voltages. A filter was chosen with the same methods as when we chose the lowpass filter. A Butterworth filter of 3:rd order was a good choice for us.
To get the real values for the filter components we had to denormalise the tabulated values and do a frequency transform. The formulas below were used:
![]()
![]()
When the transform was done the filter was ready. The filter has the same structure as the lowpass filter, but the capacitors are changed to inductors and vice versa (Appendix 2).
To protect the filter and the DAQ-card against high voltage peaks, we put a varistor and a transient diode on the input of the filter. The main purpose of the transient diode is to cut the high voltage peaks very quickly. The varistor should take care of the energy in the high peaks. The transient diode cuts at 400 V and the varistor at 250 V.
After this protection the highpass filter was implemented. The input impedance of the highpass filter equals the input impedance for the entire filter. According to our prestudy 2.1, the grids are low ohmic. A high input impedance on the filter implies that the filter does not interfere with the grid. We could then get the correct data values into the DAQ-card. But since the inductor value in the highpass filter is depending on the input resistance we had to choose it to 100
. This choice was made to find an inductor with a resonance frequency above the frequency band of interest. To make a better protection against peaks a transient diode was used in parallel with the output resistance of the highpass filter. This transient diode cuts at
18 V.
The filter used when measuring the noise

Figure 3.1
To have a good match between the high- and the lowpass filter, the input resistance of the lowpass filter was chosen to 1 k
. This is 10 times the output resistance of the highpass filter. The DAQ-card has a 10 M
input resistance and the output resistance of the lowpass filter is 1 k
. This makes also a good match between the filter and the DAQ-card. The total filter should have an attenuation of 4 times in the passband. If a further attenuation is needed a voltage divider could be applied.
To determine the impedance of the power grid a reliable method must be used. One method is to measure both the current into and the voltage over the power grid at the same time.
The main idea was to measure the voltage and the current to determine the impedance with Ohms law.
![]()
To be able to determine the current, we measured the voltage over a known resistance, also called a shunt resistance, see Figure 3.2. This method gives the impedance between the phase and the zero as it looks from the connection node, the wall socket. It does not give the impedance between two different points in the power grid. Furthermore the equipment will only give the absolute impedance.
Principle circuit

Figure 3.2
As we want to measure the impedance from 10 kHz to 250 kHz we need a signal containing all the frequencies in this band. Our first idea was to use white noise containing all frequencies with the same amplitude. The amplitude does not have to be exactly the same for all frequencies. But it is still important that the signal contains all frequencies so that the impedance could be determined for all frequencies. After an investigation of different noise generators and their power capacity over a larger frequency band we came to the conclusion that it was too much power to put out on the power grid. The power for white noise is
N0
BW, where N0 / 2 is the power density spectrum for white noise and BW is the bandwidth.
We had to find another signal source containing all the frequencies we were interested in. A signal which fulfilled these requirements is the Chirp function. This function contains a sinusoidal signal with constant amplitude with the frequency increasing linearly with the time. This function exist in almost every function generator as a swept sinusoidal. The Fourier transform for the Chirp function is:

X(F) is evaluated numerically (Appendix 3.1). The result of the numeric evaluation showed that the Fourier transform of the Chirp function contains all frequencies in the sweep. An additional analysis of the Chirp function was also made in the mathematical program MatLab. First a sampled Chirp function was constructed in an array. After that we used the FFT-function in MatLab on the array. As the result we received the absolute amplitude of the FFT. An inverse FFT was then done to show that the Fouriertransform was correct (Appendix 3.2).
The shunt resistance, which is used to determine the current, should be in the same area as the measured impedance. A prestudy gave us a hint that the impedance of the power grid should be in the range from a few ohms to a couple of hundred ohms. After trial-and-error we found that 12
would be a good choice.
PL-30

Figure 3.3
As an interface to the power grid we used three PL-30 from Echelon. The PL-30 have no ripple in the passband according to the transfer function (Appendix 5), this implies that the
PL-30 can be used as a highpass filter. They should protect the measuring equipment and the function generator from the power grid. The PL-30 work as a highpass filter and attenuate the large 50 Hz signal. Two of the PL-30 was used to protect the two different inputs to the DAQ-card and the third one was used between the power grid and the function generator.
To create a reference between low logic ground on the DAQ-card and the signal ground we used a 10 k
pull up resistance.
Antialiasing filter for measuring the impedance

Figure 3.4
Using the DAQ-card’s A/D-converter and a few lines of software in the Pascal language the samples from the two channels was stored in a suitable way on a floppy disc. A file with necessary information about how the sampling was done was also stored on the disc.
The main idea of the analyse program was to calculate the frequency spectra for the two channels corresponding to voltage and current. The result of dividing the absolute value of the voltage spectra with the absolute current spectra is the absolute impedance in the frequency plane. To get the current spectra we must first divide the voltage over the shunt resistor with its value. In our case 12
.

See Figure 3.2 and Figure 3.5.
To visualise the result we plot the impedance spectra vs. frequency, e.g. Figure 3.5. On the impedance axis we use logarithmic scale and on the frequency axis we use linear scale to make it easy to study the results (Appendix 4).
Schedule for the impedance measuring equipment.

Figure 3.5
The program in Pascal is used to control the DAQ-card and to store the sampled values in a correct way so the values later could be analysed in MatLab (Appendix 6).
To have confidence in the measuring equipment, it is necessary to verify the equipment. We have verified the equipment with some different tests.
The first simple test we did with the interface was sending a sinusoidal signal through the interface and measured both the input and the output signal. In this way we could study the attenuation as well as the phase delay depending on the frequency. The attenuation is tabulated below:
Noise filter
|
Frequency [kHz] |
Attenuation |
|
0.1 |
1313 |
|
0.5 |
265 |
|
5 |
7.3 |
|
10.2 |
4.7 |
|
15 |
4.4 |
|
50 |
4.3 |
|
300 |
4.4 |
|
400 |
4.6 |
|
500 |
17 |
|
750 |
130 |
Table 3.1: Cut-off frequency 460 kHz
After approval of the electric safety of the interface, we sent a 230 V, 50 Hz signal into the filter and measured a 55 mV on the output. This correspond to an attenuation of approximately 4200 times. The input impedance was measured to 21.7 k
at 50 Hz.
As mentioned above, the final step was to build the interface into a metal box. According to Faraday’s cage this will minimise the distortion of the outside noise.
The last step was to determine a sinusoidal signal with an oscilloscope and then measure the same signal with our equipment. The result corresponded in both amplitude and frequency. This implies that our equipment does not change the information.
The impedance verification was done with two separate tests. In the first one we determined the impedance for some different known loads, e.g. a resistor and a lowpass filter. The result was very good and the error was estimated to less than 10 %.

Figure 3.5
We also tried some other loads, for example capacitors and filters. The accuracy for these loads were also in the 10 % range.
The other test was to determine the same load measured in two different nodes in a grid. First we measured the impedance for the grid alone and then the grid with the load connected. These two results made it possible to calculate the impedance of the load. Comparing the impedance of this load measured in different nodes and having the same result indicated an accurate equipment.
To have a controlled object to measure is almost a prerequisite to be able to properly understand what we measure. Still, this constructed grid have to be as similar to an ordinary power grid as possible. In this controlled grid we were able to connect and disconnect different loads and study the results.
Our controlled power grid consisted of five cables each of them having a length of 100 meter. The cable was of type SE-N1XV-U4G10 (Appendix 7). The five cables was connected together with five connection centrals. To connect the first cable to the ordinary power grid we used a high power interface called Variac.
To make the grid similar to a distribution grid in a suburb, we constructed it with three phases, a zero and an additional cable as a protected earth according to TN-C-S System. At the connection centrals it was possible to measure all three phases, connect loads and add noise. To minimise interference between the cables, we put the cables so that the minimum distance between them were 1 meter.
To easily get a view of the difference between the measuring we had to limit the number of different measuring objects. For instance only one of the three phases were measured. Further we only studied what happened when we connected the loads and the measuring equipment in the same connection node when we did the impedance measuring. But for the noise measuring we focused more on what effect the distance between the load and the measuring node caused. We also limited the number of different loads to understand each load better. The power grid was under our measuring always 500 meters long and connected to the ordinary power grid.
For our safety the ground error switches were never disconnected.
We started to investigate the level of the background noise for the power grid without any loads. We also did a study of how the noise from the different loads interfered with our constructed power grid.
The background noise was determined in the five different connection nodes. The characteristic shape in the frequency plane all looked the same. The strongest noise, with a peak value of 10-3 V , was in the frequency band up to 100 kHz. The noise level over 100 kHz was approximately 5
10-3 V. We could also detect some characteristic spikes at 60, 120, 180 and 240 kHz reaching up to 10-2 V, see Figure 4.1.

Figure 4.1
The different loads used in this test was a vacuum cleaner, an electric drilling machine with variable speed and an electric hot-plate. Their power consumption were 700 W, 490 W and 2000 W respectively.
We started to analyze the noise from the vacuum cleaner. In the first measuring the vacuum cleaner was connected in the same node as the measuring equipment. For frequencies lower than 100 kHz the noise level increased with up to 50 times the background noise, over 100 kHz we could not detect a higher noise level than the background noise. When we moved the vacuum cleaner to another connection node, we observed that the noise contribution decreased the further away the vacuum cleaner came. After 400 meters the noise was attenuated with 10 dB so the noise level was only approximately 5 times higher than the ordinary background noise for frequencies up to 100 kHz.
The electric drilling machine was analysed in the same way. Generally the noise level for the electric drilling machine was lower than for the vacuum cleaner. One reason for this can be that the drilling machine was idling with no torque.
To have the same condition for all of our measurings with the hot-plate we let the hot-plate warm up a couple of minutes before we started to use it in our measurings. The noise from the hot-plate was very low compared to the background noise. Obviously the hot-plate does not contribute with much noise.
The constructed power grid was used to determine the impedance for the grid itself and the power grid with different loads connected.
The impedance was determined in the five different connection nodes of the power grid. Basically the impedance varied between 5
and 300
. Generally the impedance increased the closer the end of the line the measuring was done.

Figure 4.2
Generally the impedance was lower with a vacuum cleaner connected to the power grid for frequencies above 50 kHz. The absolute impedance for the grid with the vacuum cleaner connected varied between 1
and 100
. We have determined the impedance for the power grid itself and for the power grid with the vacuum cleaner connected, see Figure 4.3. When using the formula below it is possible to determine the impedance for the vacuum cleaner alone.
![]()
The formula gives the impedance as a function of the frequency. To calculate the impedance for the connected load, Ztot and Zgrid must be known as complex values. The measuring equipment described above, only gives the absolute value of the impedance.

Figure 4.3
Another test with the vacuum cleaner was to see how the impedance depended on the distance. We first determined the impedance when the load and the measuring equipment was connected in the same node. Then the vacuum cleaner was moved 300 meters away and we measured the impedance again. The result was that the impedance from the vacuum cleaner interfered less the further away it was form the measuring node.
The analysis of the drilling machine was done in exactly the same way as for the vacuum cleaner. Generally, the result was similar to the vacuum cleaner. The impedance for the drilling machine connected to the power grid was between 0.5
and 100
. However the total impedance for the drilling machine and the grid was a little bit lower than for the vacuum cleaner.
In the same way as for the other loads, the measuring was done for the hot-plate. The impedance for the power grid with the hot-plate connected varied between 5
and 40
.
The power grids are designed to transport energy to all the electric equipment connected to the electric distribution grid. However the wires can also be used to transport information. We have chosen to investigate three different grids. The first grid was in an office where many computers are connected, the two others were distribution grids for a suburb and a block house area.
This office is a room with ten to twenty different computers connected to the power lines. It is one of Sydkraft Mätteknik’s computer rooms located in Sege. Previous test, performed by others, has showed that communication in this room often fail.
We decided to measure every wall socket in the room. The nine different wall sockets was all spread over the three phases. The impedance was very low, it varied between 0.5
and
10
, see Figure 5.1. From the characteristics of the different phases it was possible to determine to which phase the nine wall sockets were connected.

Figure 5.1
The noiselevel was very low for most of the mesurings. The noise was at the same level as the background noise for the controlled power grid.
In Ronneby, Enersearch have a testsite for communication over the power lines in a suburban area. This area consist of ten terrace houses with approximately 50 homes. We were only able to test nodes in the 10 kV / 400 V transformer and in the connection nodes into the houses. Unfortunately we could not perform any tests inside the buildings. There were also some connection nodes where we could not connect our measuring equipment to. The measuring was done in a weekday between 9 AM to 4 PM. During this period the power consumption was relatively low because there were not so many loads connected.
The number of houses connected in each connection node varied between two and five. We measured all phases in each connection node. The impedance in this area varied from 1
up to 12
. There were also some connection nodes with no houses directly connected where the impedance varied between 2
and 20
. Figure 5.2 shows a typical result and Figure 5.3 shows a statistical result for the grid in Ronneby.

Figure 5.2
All of our results indicates that the impedance increased for higher frequencies. This trend was also observed from the measuring of the constructed power grid with no loads. Thus, this trend may have to do with the characteristics of the cable. Some typical similarities could in some cases be observed for the different phases. We also found that the impedance was more irregular at the end of the cable. This could be due to the matching of the end of the cable or the long distance from the transformer.
The average impedance from the results in Ronneby have been calculated for ten different frequencies. As noted before the trend is that the impedance increase for higher frequencies. Minimum, maximum, average and a 90-% average from Ronneby have been plotted in the diagram below.

Figure 5.3
An approximation of the noise in all our measurings is to compare the noise with white noise. Although for lower frequencies, up to 50 kHz, the noiselevel is a little bit higher. Some characteristic peaks can also be detected in the different measurings. The peaks occurs with a period of 60 kHz. In most of our measurings the noiselevel was around 5
10-4 Vp but occasional measuring showed a noiselevel at 10-3 Vp. Some peaks were as high as 10-2 Vp.
The most important difference between these results and the results of the background noise from Sege were that peaks occurred in Ronneby.
In a block house area in the south of Sweden, Sydkraft communicates over the power lines. There have been some communication problems in this area and maybe we could find the problem. We were only able to measure in the node where the cable from the transformer splits up to the four different centrals for further distribution to the apartments and in these four centrals, see Figure 5.4. Besides the measuring in these nodes at a weekday afternoon, we also did a series of measurings in the split central the same evening, 7.00 PM to 9.20 PM.
Principal schedule over the grid

Figure 5.4
The impedance increased with the frequency and varied between 0.5 to 15
. Some of the impedance measures however were a little bit more irregular. These results were similar to the results from the suburban area in Ronneby. Compare Figure 5.3 from Ronneby with Figure 5.5 from the block house area.

Figure 5.5
The noise level of the background noise was generally much higher here than in the suburban area or the controlled power grid. A noise level up to 5
10-2 V was nothing unusual. We also discovered peaks, with top values up to 0.1 V, for the frequencies 60, 120, 180 and 240 kHz. In Ronneby similar peaks were detected. In some of the measurings, bursts were detected, these signals could probably be signals from the installed communication equipment.
Sydkraft have had some problems when communicating in this grid during previous evenings. We decided to measure both impedance and noise with an interval of 10 minutes between 7.00 PM and 9.20 PM.
The impedance did not change much during the evening. The range of the impedance was between 0.5
to 10
. The background noise was also relatively constant and varied between 5
10-3 V and 10-2 V.
Our results showed that the impedance increased for higher frequencies, see Figure 5.3 and Figure 5.5. The impedance generally decreased when different loads were connected to the power grid. Typical values for normal distribution power grids are between 1 and 10
, for frequencies between 9-250 kHz. Most of the time the background noise can be approximated with white noise with a N0 / 2 = 10-12 Vp2 / Hz. A higher noise level for frequencies up to 75 kHz could also sometimes be observed. Connected loads contribute with more noise.
Using our results, we did an estimation of an upper limit of the information bit rate. This limit for the channel is determined by Shannon’s capacity theorem.
Available bandwidth in Europe is approximately 100 kHz and in Japan and the US it is 400 kHz. The noise of the power grid often looks like white noise. From our results in chapter 4 and 5 the noise level was estimated to 10-3 V in average. To determine N0, the following formula is used:
![]()
Using the European bandwidth gives a N0, 100 kHz = 10-11 V2 / Hz and using the 400 kHz bandwidth gives N0, 400 kHz = 2.5
10-12 V2 / Hz.
Maximum allowed transmitted power is regulated in the standards for communication over the power lines. According to the Swedish standard, which is the same as the European standard, SS-EN 50 065-1 the maximum allowed voltage depends on the frequency. To simplify the calculations the maximum allowed voltage was approximated to 120 dB (
V) = 1 V.
According to our results in chapter 4 and 5 the impedance usually varies between 0.5 to 10
. A maximum allowed transmitted power can now be determined.
![]()
Let us now assume Ptrans = 1 W and the attenuation of the channel to 30 dB. Using 30 dB attenuation gives a Prec = 1 mW. Shannon’s channel capacity can now be determined with the formula below, assuming that the channel is modelled as an additive white Gaussian noise channel.
![]()
With a bandwidth of 400 kHz the maximum bit rate for this channel is 3.99 Mbit / s and with a bandwidth of 100 kHz the maximum bit rate is 1 Mbit / s. Note that these numbers are the maximum bit rates that are possible to achieve. However we do not know what signal constellation that should be used to achieve this.
For the following calculations, a bit error probability of at most 10-5 is used which is a common value. This indicate that maximum 1 bit of 100 000 is allowed to be incorrect on the average. Assume also that the channel is an AWGN channel. The different signal constellations we have considered are M-PAM, Pulse Amplitude Modulation, M-PSK, Phase Shift Keying, M-FSK, Frequency Shift Keying and M-QAM, Quadrature Amplitude Modulation. M indicates how many different signal alternatives that are used.
Bit rate [kbit/s]
|
M |
2 |
4 |
8 |
16 |
32 |
64 |
128 |
256 |
|
M-PAM |
100 |
200 |
300 |
400 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
|
M-PSK |
100 |
200 |
300 |
400 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
|
M-FSK |
100 |
100 |
75 |
50 |
31 |
19 |
11 |
6 |
|
M-QAM |
100 |
200 |
300 |
400 |
500 |
600 |
700 |
Ps > 10-5 |
TABLE 6.1: Bandwidth=100 kHz
Bit rate [kbit/s]
|
M |
2 |
4 |
8 |
16 |
32 |
64 |
128 |
256 |
|
M-PAM |
400 |
800 |
1200 |
1600 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
|
M-PSK |
400 |
800 |
1200 |
1600 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
Ps > 10-5 |
|
M-FSK |
400 |
400 |
300 |
200 |
125 |
75 |
44 |
25 |
|
M-QAM |
400 |
800 |
1200 |
1600 |
2000 |
2400 |
2800 |
Ps > 10-5 |
TABLE 6.2: Bandwidth 400 kHz
From Table 6.1 and 6.2 it is obvious that 128-QAM has the highest bit rate. Theoretically, it is possible to achieve a transmission of 2.8 Mbit/s given a bandwidth of 400 kHz. With the European bandwidth of 100 kHz a maximum bit rate of 700 kbit/s is possible. To achieve a higher bit rate it is necessarily to increase the signal to noise ratio, otherwise the bit error probability will be too high. These bit rate values indicates the case when using a low noise level and a moderate attenuation. If the noise level increases and the received signal power decreases, the bit rate will fall dramatically. With a noise level at 10-2 V and a bandwidth of 100 kHz the maximum bit rate decreases to 100 kbit/s. Note that in Table 6.1 and 6.2 the bit rate, and the bit error probability, decrease with an increase of M for M-FSK. This is one of the differences between bandwidth efficient signal constellations e.g. M-PAM, M-PSK and M-QAM and the power efficient signal e.g. M-FSK.
The purpose of this thesis was to examine the power lines as a communication medium. However this was much more extensive than possible could be done in this thesis. As mentioned before, we have limited our measures to only determine the noise and the impedance. In a more extensive investigation other quantities should also be determined. For example, measure the attenuation between two different nodes in the power grid. In communication, the attenuation is of great importance to know how much of the transmitted power that can be received in the receiver. Furthermore, our results are based on a few number of measures. More reliable statistical results can be achieved by increasing the number of measures. These results might indicate if different layouts of the power grid are of importance. However, our results indicates some important characteristics of the noise and the impedance. By a simplified channel model we estimated the maximum bit rate to 4 Mbit/s when using a bandwidth of 400 kHz. This is the same bandwidth efficiency as when using a normal telephone line and a computer modem. Furthermore, differences between communicating at the same phase or between two different phases should also be more thoroughly investigated.
A great advantage using the power grid as a communication web is that this web already exists. The expensive installation can therefore be avoided. Today, no one for sure knows what exactly the web is going to be used too. The producers of electric power is really interested in the opportunity to control different loads, via the power grid. A smoother power consumption can therefore be achieved and the high peak values be avoided. Other interesting features can be house alarms and digital intercom phones in a building. More future ideas such as two-way communication, sending e-mail or short messages can be a reality. The limit is of course the limited bit rate. So, using the power lines for digital TV might be more a dream than a realistic future.
"RF Impedance of United States and European Power Lines" J. A. Malack, J. R. Engström, IEEE Transaction on Electromagnetic Compatibility, Februari 1976.
"Modern Elektrisk Mätteknik del 2", L. Grahm, H-G Jubrink, A. Lauber, Bokförlaget Teknikinformation, the 6:th edition, the first printing 1994.
"Digital Signal Processing", J. G. Proakis, D. G. Manolakis, second edition, Macmillan 1992.
"Våglära och optik", G. Jönsson, Teach Support 1991.
"Analoga kretsar och signaler", I. Claesson, P. Eriksson, B. Mandersson, G. Salomonsson, Studentlitteratur 1993.
"Handbook of Filter Synthesis", A. I. Zverev, John Wiley and Sons Inc. 1967.
"Basic Circuit Analysis" ,Cunningham, Stuller, International student edition, Houghton Mifflin Company 1991.
"Föreläsning i funktionsteori", S. Spanne, Department of Mathematics at Lund Institute of Technology, the first edition, the third printing 1993.
"University Physics" H. D. Young, Extended version with modern Physics, eighth edition, Addison-Wesley Publishing Company 1992.
"Elektroniska apparater", S. Benda, Studentlitteratur 1993.
"Informationsteori- grundvalen för (tele-)kommunikation", R Johannesson, Studentlitteratur, the third printing 1993.
"An introduction to digital communications", G. Lindell, Department of Information Technology at Lund Institute of Technology 1995.
The error eq is allowed to be within ± 0.5 LSB, Least Significant Bit. This is equivalent with:
-T < t < T
The entire signal range is 2A.
The number of bits M gives 2M levels, thus 1 LSB = 2A / 2M .
The power in the quantization error, Pq :

Signal power, Px :
![]()
Definition:
![]()
![]()
This implies that the SQNR, Signal-to-Quantization Noise Ratio, increases approximately 6 dB for every bit added to the word length, that is, for each doubling of quantization level.
M-file for Matlab.
Highpass filter
% Highpass filter to stop the powerful 230 V signal
% Butterworth filter of the third order
clear; % Clear all the previous variables
F0=3000; % F0 is the cutoff frequency in Hz
wr=2*pi*F0; % wr is the cutoff frequency rad / s
Rin=100; % Inputresistance in ohm
Rout=100; % Outputresistance in ohm
f=[20:50:100e3]; % Frequency array in Hz
w=2*pi*f; % Frequency array in rad / s
% Normalised the tabulated values
L1=1;
C2=2;
L3=1;
% Calculated highpass component values
C1hp=1./(L1*wr*Rin)
L2hp=Rin./(C2*wr)
C3hp=1./(L3*wr)
% Real values
C1hp=150e-9;
L2hp=3.3e-3;
C3hp=39e-6;
% Help equations
i1=1./(Rin+1./(j*w*C1hp)+(j*w*L2hp.*(1./(j*w*C3hp)+Rout))./(Rout+1./(j*w*C3hp)+j*w*L2hp));
i3=i1.*(j*w*L2hp)./(j*w*L2hp+1./(j*w*C3hp)+Rout);
% Transfer function
H=i3*Rout;
% Draw the amplitude of the transfer function
figure(1);
subplot(2,1,1);
loglog(f,abs(H)); % Plot the values in both frequency and amplitude in a logarithmic scale
grid; % Grid
title('Butterworth page 312 HP-filter.');
% The same as the previous plot with a close-up for low frequencies
subplot(2,1,2);
loglog(f,abs(H));
grid;
axis([7.5e3 20e3 1e-1 0.6]);
title('Frequency 7500 20000 Hz.');
Lowpass filter
% Cauer filter from the Handbook of Filter Synthesis page 269-271, 7:e order, 5 % ripple
% With an in- and output impedance of 1 k
.
clear; % Clears all the previous variables
Rin=1e3; % Input resistance in ohm
F0=240e3; % F0 is the cutoff frequency in Hz
Rout=1e3; % Output resistance in ohm
w0=2*pi*F0; % w0 is the cutoff frequency in rad / s
f=[100:100:800e3]; % Frequency array in Hz
w=2*pi*f; % Frequency array in rad / s
% Calculated values of the lowpass filter
C1=0.70604/(R*w0);
C2=0.12870/(R*w0);
L2=1.24840*R/w0;
C3=1.30666/(R*w0);
C4=0.61962/(R*w0);
L4=0.94449*R/w0;
C5=1.17466/(R*w0);
C6=0.49026/(R*w0);
L6=0.88129*R/w0;
C7=0.45029/(R*w0);
% Real component values for the cutoff frequency, 460 kHz
C1=220e-12;
C2=47e-12;
L2=470e-6;
C3=470e-12;
C4=220e-12;
L4=330e-6;
C5=390e-12;
C6=180e-12;
L6=330e-6;
C7=150e-12;
% Real component values for the cutoff frequency, 240 kHz
%C1=470e-12;
%C2=82e-12;
%L2=1000e-6;
%C3=820e-12;
%C4=390e-12;
%L4=680e-6;
%C5=820e-12;
%C6=330e-12;
%L6=680e-6;
%C7=270e-12;
% Impedance values
z0=Rin;
z1=1./(j*w*C1);
z2=(j*w*L2).*(1./(j*w*C2))./((j*w*L2)+(1./(j*w*C2)));
z3=1./(j*w*C3);
z4=(j*w*L4).*(1./(j*w*C4))./((j*w*L4)+(1./(j*w*C4)));
z5=1./(j*w*C5);
z6=(j*w*L6).*(1./(j*w*C6))./((j*w*L6)+(1./(j*w*C6)));
z7=(1./(j*w*C7)*R1)./(1./(j*w*C7)+R1);
% Parallel impedance
z8=z5.*(z6+z7)./(z5+z6+z7);
z9=z3.*(z4+z8)./(z3+z4+z8);
z10=z1.*(z2+z9)./(z1+z2+z9);
% Help equations for the transfer function
i0=1./(z10+z0);
i1=i0.*(z2+z9)./(z1+z2+z9);
i2=i1.*z1./(z2+z9);
i3=i2.*(z4+z8)./(z3+z4+z8);
i4=i3.*z3./(z4+z8);
i5=i4.*(z6+z7)./(z5+z6+z7);
i6=i5.*z5./(z6+z7);
i7=i6;
% Transfer function
H=i7.*z7;
% Plot the phase and amplitude
figure(2);
subplot(2,1,1);
semilogy(f,abs(H)); % Plot the amplitude in logarithmic scale vs. frequency in linear scale
grid; % Grid
title('Cauer filter 7:e order.');
% The same plot as the previous plot with a close-up for low frequencies
subplot(2,1,2);
semilogy(f,abs(H));
axis([200e3 270e3 0.1 0.5]);
grid;
title('200-270 kHz.');
The function fchirp
function fun=fchirp(t); % The name of the function is fchirp
global F s k % Global variables
fun=cos(2*pi*t.*t*k).*exp(-i*2*pi*F(1,s+1)*t); % The definition of the Furierfunction
M-file for numeric calculation of fchirp
clear;
global F s k;
numbsamp = 20;
samplefreq = 100e3;
sampletime = numbsamp/samplefreq;
k=5e7;
topfreq=100e3;
t=[0:1/samplefreq:sampletime]; % time array
h=cos(2*pi*t.*t*k);
figure(1);
plot(t,h);
F=[0:topfreq/numbsamp:topfreq];
I=ones(1,(numbsamp+1));
for s=0:1:numbsamp
I(1,s+1)=quad8('fchirp',0,sampletime);
end;
figure(2);
plot(F,abs(I));
% Written by Henrik Nilsson and Jonas Norberg May the 17:th 1996
% Reads the samples from an extern file and calculates the FFT and plots the FFT
clear;
% Reads the Setup values into the program
setup=fopen('c:\regler\exjobb\daq\data\d0829\onechan\setupa.dat');
S=(fread(setup, 5, 'long'))';
fclose(setup);
Range=S(1,1);
Offset=S(1,2);
NumbChan=S(1,3);
Rate=S(1,4);
NumbSamp=S(1,5)/NumbChan;
% Reads the sampled values into the program
DataFile1=fopen('c:\regler\exjobb\daq\data\d0829\onechan\d0829a.dat');
DataVek1=(fread(DataFile1, NumbSamp, 'ushort'))';
fclose(DataFile1);
% Make a frequency and a time array
FreqVek=[0:(Rate/(NumbSamp-1)):Rate];
TimeVek=0:1/Rate:(NumbSamp-1)/Rate;
% Adjust the offset
DataVek1=(DataVek1-(Offset))*Range/4096;
% Filter attenuation
DataVek1=DataVek1*4.4;
% Calculate the FFT
FFTVek1=(fft(DataVek1)/(NumbSamp/2));
FFTVek1(1,1)=0;
% Plot the signal
figure(1);
clf;
subplot(2,1,1);
plot(TimeVek,DataVek1);
grid;
title(Signal into the DAQ-card.');
ylabel('Volt');
xlabel('Time');
% Plot the FFT
subplot(2,1,2);
semilogy(FreqVek,abs(FFTVek1));
axis([9e3 450e3 0.98*abs(min(FFTVek1)) 1.05*abs(max(FFTVek1))]);
grid;
title('FFT of the signal above.');
ylabel('Volt');
xlabel('Frequency, 9-450 kHz.');
{ Written by Jonas Norberg and Henrik Nilsson }
{ Updated August the 21:st 1996}
program OneChan;
uses Crt, cb; { Universal Library procedures and declarations }
type
Filetype1 = file of word; { In this type the samples are stored}
Filetype2 = file of longint; { In this type the setup values are stored}
var
Outfile : Filetype1;
Setup : Filetype2;
Range,Offset : Longint:
Options,K : Integer;
ULStat : Integer;
f,s : Longint;
ReadNumb : Longint;
MemPoint : Longint;
FROMHERE : Longint;
Status : Integer;
CurCount : LongInt;
LastCount : LongInt;
CurIndex : LongInt;
PortNum : Integer; { Tells which port that is used}
ADData : Array [0..8191] of Word; { In this array the samples is stored}
ChanTags : Array [0..8191] of Word; { This array indicates which channel the samples belong to.}
label Endder;
label ERROR;
const
BoardNum :Integer = 0;
MEMBOARD :Integer = 5;
SampChan :Integer = 0;
LowChan :Integer = 0; { Lowest channel that are sampled}
HighChan :Integer = 0; { Highest channel that are sampled }
NumbChan :Longint = 1; { Number of channels that are sampled}
NumbSamp :LongInt = 10000; { Number of samples that are sampled }
Rate :LongInt = 1000000; { Sample rate }
CBRange :Integer = BIP5VOLTS; { Input range}
RevNum :Single = 3.3; { Declares the version of Universal Library}
begin
ClrScr;
cbDeclareRevision(RevNum);
ULStat := cbErrHandling (PRINTALL, STOPALL);
ULStat := cbMemReset(MEMBOARD); { Resets the MEGA-FIFO}
if ULStat <> 0 then
goto ERROR;
Assign(Setup,'a:\exjobb\data\d0827\onechan\setupa.dat'); { Open a file to write the setup values in}
rewrite(Setup);
Assign(Outfile,'a:\exjobb\data\d0827\onechan\d0827a.dat'); { Open a file to write the sampled values in}
rewrite(Outfile);
if CBRange = BIP5VOLTS then
begin
Range := 10;
Offset := 2048;
end;
write(Setup,Range);
write(Setup,Offset); }
write(Setup,NumbChan);
write(Setup,Rate);
write(Setup,NumbSamp);
close(Setup);
writeln(`The initial values have now been saved.');
Options := EXTMEMORY;
ULStat := cbAInScan (BoardNum, LowChan, HighChan, NumbSamp, Rate, CBRange,
ADData[0], Options);
if ULStat <> 0 then
goto ERROR;
writeln (The sampling is now finished.');
f:=0;
s:=0;
MemPoint := 0;
ReadNumb := 8192;
FROMHERE := 0;
while NumbSamp > MemPoint do
begin
if NumbSamp < MemPoint + 8192 then
ReadNumb := NumbSamp - MemPoint;
ULStat := cbMemRead (MEMBOARD, ADData[0], FROMHERE, ReadNumb);
ULStat := cbAConvertData (BoardNum, ReadNumb, ADData[0], ChanTags[0]);
writeln(MemPoint,' samples are now saved in the file. ');
for K := 0 to ReadNumb - 1 do
begin
f := f + 1;
if (ChanTags[K] = SampChan) then
write(Outfile,ADData[K])
else
begin
writeln(ChanTags[K],' ',ADData[K],' ',s);
s:=s+1;
end;
end;
MemPoint := MemPoint + 8192; {Update the counter }
FROMHERE=FROMHERE +8192; {Update the counter }
writeln;
end;
if (s > 0) or (f <> NumbSamp) then
begin
writeln(`Error have occurred.');
writeln(s,' elements are wrong.');
writeln(NumbSamp - f,' returns was not done.');
end;
Close(Outfile);
writeln('Finally the program is done, press any key.');
sound(500);
delay(600);
nosound;
ERROR:
if ULStat <> 0 then
Writeln(`Error.');
repeat
until keypressed;
nosound;
The ground cable SE-N1XV-U 4G10 is produced by Ericsson Cables AB. This cable is normally used between the 10 kV transformer and the house’s fusebox.
The cable is manufactured according to Svensk Standard, SS IEC 228. The marking of the Cable follows the standard CENLEC SS 424 17 02.
A brief explanation of the marking on the cabal we used:
SE - The cable is manufactured in Sweden.
N - National standard.
1 - Mark voltage U0 / U = 0.6 / 1 kV
X - Ethylene plastic is used for the isolation, PEX.
V - PVC casing.
U - Massive round conductor.
4G10 - 4 conductors with a 10 mm2 area, with at least one of the wires marked with green/yellow paint.