Optical Monitoring of Pollution on
Porcelain MV Transformer
Bushings
Filipe A.T. Fernandes (604623)
Supervisors: Professor John Van Coller and Mr Nishal Mahatho (Eskom)
A dissertation submitted to the Faculty of Engineering and the Built Environment,
University of Witwatersrand, Johannesburg, in fulfilment of the requirements for the
degree of Master of Science in Engineering.
Johannesburg, 2019
i
Declaration
I declare that this dissertation is my own unaided work. It is being submitted to the degree
of Master of Science in Engineering to the University of the Witwatersrand,
Johannesburg. It has not been submitted before for any degree or examination to any other
University.
....................................................................................................................................
(Signature of Candidate)
………19th……. day of ……………May…………… year ………2020………….
ii
Publications
2021 – Optical Monitoring of Pollution on MV Transformer Bushings – South African
Institute of Electrical Engineers (SAIEE) – African Research Journal (ARJ): Special
Issue 1.
2020 January – Optical Monitoring of Pollution on MV Bushings – South African
Universities Power Engineering Conference (SAUPEC), Cape Town.
2019 August – Optical Pollution Monitoring of Bushings – Fifth Eskom Power Plant
Engineering Institute (EPPEI) Student Workshop, Eskom Academy of Learning.
2019 January – A Case for Optical Pollution Monitoring of Bushings - South African
Universities Power Engineering Conference (SAUPEC), Bloemfontein.
2018 August – Optical Pollution Monitoring of Bushings – Fourth Eskom Power Plant
Engineering Institute (EPPEI) Student Workshop, Eskom Academy of Learning.
iii
Abstract
This research aimed to optically monitor the dry pollution level on porcelain MV
transformer bushings and determine the possible leakage current should the dry polluted
surface be critically wetted. The research involved the implementation of an image
capturing system with appropriate image processing. Preliminary image capture of four
artificial levels of salt deposit pollution: clean, light, medium and heavy was successfully
achieved. The percentage level of surface pollution was found using image binary
thresholding. A Reflectance Transformation Imaging (RTI) array was designed and
implemented. It facilitated the virtual reconstruction of the imaged surface, yielding 26
different processed images. Twenty trials were conducted, each with a measured leakage
current and Equivalent Salt Deposit Density (ESDD) measurement. A loose exponential
relation was found between ESDD and leakage current. Each trial had a minimum of 250
dry surface images associated with it. A regression model, transfer learning convolutional
neural network (CNN) was implemented based upon the AlexNet image classification
CNN. The regression model was trained using 70% of the image data acquired in the
trials and validated on the remainder. Several iterations of the CNN were tested with
varying data organisation in order to ascertain the highest level of accuracy. The final
CNN had a relative RMSE of 0.3 mA for a predictive range of 0.1 mA to 10 mA. The
standard methods used to classify pollution types and severity are presented. The
dynamics governing bushing flashover under polluted conditions is discussed. The actual
pollution level and type is quantified using ESDD and Non-Soluble Deposit Density
(NSDD). Image segmentation and border extraction are described as a preliminary proof-
of-concept. RTI is described as a more robust method of image processing. With a
saliency mapping resolution of approximately 100 μm, the feature recognition between
salt deposits and bushing surface is more readily attained using RTI.
iv
Dedication
For Mom and Dad – Thanks for always being there for me through the years of my
university education. Your love and support have brought me through many tough times
and I would not be where I am today without you two. All my love.
v
Acknowledgements
I would like to thank Professor John Van Coller for all his guidance and patience with
me. He has made my Honours and Masters years a great and memorable experience.
I would like to extend my gratitude to Eskom and the EPPEI programme for their
financial and academic peer support.
vi
Table of Contents
Declaration ............................................................................................ i
Publications ..........................................................................................ii
Abstract .............................................................................................. iii
Dedication............................................................................................ iv
Acknowledgements .............................................................................. v
Table of Contents ..............................................................................vii
List of Figures ....................................................................................vii
List of Tables ....................................................................................... ix
Glossary of Terms and Abbreviations .............................................. x
Introduction ............................................................................... 1
Problem Specification ............................................................... 4
Literature Review ..................................................................... 9
Methodology ............................................................................ 22
Results ...................................................................................... 46
Conclusion ............................................................................... 62
References .......................................................................................... 63
Appendix A – Arduino Code ............................................................ 66
Appendix B – RTI Calibration......................................................... 77
Appendix C – CNN MATLAB Code ............................................... 80
Appendix D – Laboratory Trials Data ............................................ 83
Appendix E – Regression CNN Training ........................................ 85
vii
List of Figures
3.1 Basic Principal of RTI Image Capture Array (elevation φ) . . . . . . . 17
3.2 CNN basic architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.1 Method block diagram illustrating overall implementation of image
capture and reconstruction, real pollution level dynamics, and their
interactions in their neural network . . . . . . . . . . . . . . . . . . . . . . . .
22
4.2 Schematic diagram of AC leakage current test circuit . . . . . . . . . . 26
4.3 Laboratory test setup for leakage current measurement . . . . . . . . . 28
4.4 μCAM-III demo program used for preliminary image capture . . . . 30
4.5 AutoCAD RTI lighting array solid wire frame . . . . . . . . . . . . . . . . 31
4.6 Image Capture System Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.7 RTI LED Array Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.8 RTI Array (foreground) and Controller (background) . . . . . . . . . . 34
4.9 RTI Builder Selection of Calibration Sphere Area . . . . . . . . . . . . . 37
4.10 RTI Builder Prediction of Calibration Sphere Boundaries (Edge
Detection) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
4.11 Specular Reflection Highlight Detection (red cross) . . . . . . . . . . . 38
4.12 Blended Output of all the Detected Specular Reflections . . . . . . . . 38
4.13 Positioning of RTI array on the top rib of the test insulator . . . . . . 40
4.14 AlexNET CNN architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.1 Leakage Current vs. ESDD with loose trend line . . . . . . . . . . . . . . 48
5.2 Example Set of RTI Images for a Single Trial . . . . . . . . . . . . . . . . 49
asd
viii
5.3 Training Progress of Modified AlexNet CNN for SPS
Classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
51
5.4 Regression Model AlexNet CNN Architecture . . . . . . . . . . . . . . 53
5.5 Training Progress of Modified AlexNet Regression CNN for
Leakage Current Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
5.6 Training Progress of Modified AlexNet Regression CNN for
Leakage Current Prediction in the Ranges of 0.1 mA to 1 mA . .
56
5.7 Training Progress of Modified AlexNet Regression CNN for
Leakage Current Prediction in the Ranges of 1 mA to 10 mA . .
57
5.8 Validation Sample of Smaller Order Leakage Current Prediction
Illustrating Input Image, Associated Leakage Current and
Predicted Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
5.9 Validation Sample of Larger Order Leakage Current Prediction
Illustrating Input Image, Associated Leakage Current and
Predicted Leakage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
B.1 Visualisation of Calibration Position Vectors . . . . . . . . . . . . . . . 79
E.1 Training Progress of Modified AlexNet Regression CNN on all
Image Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
86
E.2 Training Progress of Modified AlexNet Regression CNN on
Image Data Larger than 10 kB . . . . . . . . . . . . . . . . . . . . . . . . . .
87
ix
List of Tables
4.1 Preliminary Images with Binary Thresholding . . . . . . . . . . . . . . . . 36
4.2 Image Rendering Options for PTM and RTI Fitters . . . . . . . . . . . . . 41
4.3 Type A pollution severity ESDD rating for long rod insulator . . . . . 44
5.1 Training data extracted from measurement data showing leakage
current and associated ESDD with SPS classification . . . . . . . . . . .
47
5.2 Example Set of Processed RTI Images for a Single Trial . . . . . . . . . 50
B.1 Calibration Data for RTI Array LED Position Vectors . . . . . . . . . . 77
D.1 : Measured and Calculated Laboratory Data . . . . . . . . . . . . . . . . . . 84
x
Glossary of Terms and Abbreviations
Abbreviation/Term Description
AI Artificial Intelligence
BPNN Back-propagated Neural Network
BRDF Bidirectional Reflectance Distribution Function
CNN Abstract Convolutional Neural Network
DMD Discrete Modal Decomposition
ESDD Electrolytic Soluble Deposit Density
HV High Voltage
NN Neural Network
NSDD Non-soluble Deposit Density
RTI Reflectance Transformation Imaging
RMSE Root Mean Square Error
SPS Site Pollution Severity
1
Chapter 1
Introduction
Effective insulation of HV equipment and transmission lines is vital for the un-
interrupted supply of energy to the customer. Prevention of bushing flashovers can avert
circuit breaker operations and hence interruption of supply.
The majority of monitoring methods regarding transformer bushings are reactive-
based, meaning action is taken only once the bushing has flashed over [1]. This method
relies upon trial and error, requiring bushings to be dimensioned specifically based upon
environmental data, if available. If a transformer bushing suffers a flashover this could
imply inadequate bushing clearances, inadequate specific creepage distance (form factor)
or a poor choice of bushing material [2]. The mean-time-to-flashover correlates closely
with pollution build up. Maintenance of expensive equipment should not be reactive-
based.
By following a more proactive approach to pollution monitoring, potential
bushing flashover can be forewarned. This is beneficial to utilities in that maintenance
and potential countermeasures can be effectively and efficiently made before a flashover
occurs. Instead of routinely shutting down transformers and spending unnecessary
resources on inspecting substation equipment, an automated method of inspection linked
to a central control station can be implemented. This ensures that call-outs or supply
interruptions are made only under critical maintenance circumstances.
Chapter 1. Introduction 2
Presented is a method of optically detecting the type and level of pollution on the
surface of porcelain MV transformer bushings. The determining of pollution type and
level alone is insufficient to evaluate the likelihood of bushing flashover. Flashover is
more probable under wetted surface conditions. As such, the detection algorithm should
infer the leakage current under wetted conditions, based upon readings of dry or partially
wetted (due to the ambient humidity) pollution levels. Ideally, site leakage current
measurements should be evaluated against the imaged pollution levels to evaluate the
need for bushing cleaning. Thus, any optical readings made in terms of dry pollution type
and level must be made relative to measured leakage current values under critically
wetted conditions. A more complicated algorithm could be implemented for pollution
that is already wetted so as to predict whether further wetting would result in leakage
currents increasing to a point of flashover. Measuring humidity would increase the input
information to the algorithm, thus allowing better prediction as to how much more
moisture would be required for flashover.
Chapter 2 provides an overview to what the objective of the research is,
highlighting the hypothesis, research question, requirements and scoping associated with
the implementation of the imaging system. Chapter 3 contains the literature survey. The
methods of insulator dimensioning are presented in Section 3.1, to understand how
bushings are selected for a particular site. Section 3.2 provides background into the two
types of pollution that occur. Section 3.3 details the three main environments concerned
with site pollution severity, providing reasoning for the specific pollution monitoring
requirements of the project. Thereafter, the mechanisms governing flashover across
polluted bushings are presented, to better understand the aim of the research. Section 3.5
illustrates the standard method used to measure bushing surface pollution numerically in
terms of conductivity and mass, important in controlling test samples. Sections 3.6 and
Section 3.7 detail the two imaging techniques used for surface reconstruction and feature
extraction. Section 3.8 presents a brief background into convolutional neural networks,
the main tool for leakage current prediction.
Chapter 4 describes the research methodology in detail pertaining to the steps
required in obtaining training data and the details regarding the design of the monitoring
Chapter 1. Introduction 3
system. The method and test circuit used for leakage current measurement is presented in
Section 4.1. The following section describes the design and implementation of the image
capture system, where the specifications for the RTI array are presented along with the
associated control circuitry. Section 4.3 describes the imaging methods used for binary
segmentation, as a preliminary proof-of-concept. The imaging techniques implemented
for the monitoring system are illustrated in Section 4.4, where details regarding the
methods for RTI reconstruction are presented. Section 4.5 describes the neural network
architecture implemented, offering insight into how transfer learning is used to benefit
the rapid implementation of the monitoring system.
Chapter 5 presents the performance results of the monitoring system. In this
chapter, a consolidated table of the trials conducted is presented. A relationship between
ESDD and leakage current is drawn and its validity discussed. Several iterations
pertaining to different CNN architectures are presented and the systematic improvement
of predictive accuracy discussed. A conclusion is drawn on the success of the monitoring
system in Chapter 6 along with recommendations for improvement of the design and
potential future work.
4
Chapter 2
Problem Specification
2.1 Hypothesis
An optical method of monitoring pollution levels on porcelain MV transformer
bushings can determine the type and level of surface pollution and predict the leakage
current if the surface pollution were to be wetted, thereby indicating how close the
bushing is to flashover. Furthermore, this method of optical monitoring could reduce
the need for testing of MV transformer bushings that are in service.
2.2 Research Question
How effective would a method of optical detection be in remotely monitoring
the pollution levels on the surface of transformer bushings relative to measured
leakage current and how would this method compare with existing methods of
pollution monitoring?
Chapter 2. Problem Specification 5
2.3 Rationale
The local utility has a long track record in dealing with industrial pollution, in
particular for a coal-fired power station HV yard. However, over the past few years,
renewables have started to appear as a significant portion of South Africa’s power
production [3]. They could be located close to the sea and hence are subject to marine
pollution. One such example is the Sere Wind Farm, located on the coast of the
Western Province, South Africa. Owing to its geographical location and proximity to
the Tormin mineral sands mine, this site is prone to bushing flashover. This site in
particular has suffered flashover in the past due to marine and industrial pollutants
deposited on the surface being critically wetted.
It would be ideal if the monitoring of transformer bushings, particularly those
prone to high pollution levels, could be done without the need for inspection call-outs.
The research forewarns of possible flashover under wetted conditions by monitoring
the dry pollution on porcelain MV transformer bushings.
2.4 Requirements and Success Criteria
The aim of this research was to develop a method of optically imaging
pollution levels on the surface of porcelain MV transformer bushings. The pollution
types were not restricted to only dry pollution types. The type (marine or desert) and
level of dry pollution had to be measured and related to a leakage current value
correlating to the same pollution type and level under wetted conditions. The leakage
current was the relative gauge used to assess the severity of the surface pollution, the
methods of which are described in Section 8 of SANS 60815-1 – Evaluating Site
Pollution Severity (SPS) [2]. Humidity levels at dawn are a major threat to porcelain
bushings. The ambient humidity together with high dry pollution levels are the main
contributor to high leakage currents experienced on polluted bushings. The leakage
Chapter 2. Problem Specification 6
current can be thought of as the probability of flashover. The imaging system thus
inferred how close the bushing was to flashover.
The success of this research depended on the effectiveness of the implemented
method and design, in that the following criteria had to be met:
An optical method must be safe.
Desert and marine pollution must be identified.
The levels of surface pollution must be measured by the imaging method.
By analysing the dry pollution level, the imaging system must estimate the
leakage current that would flow if the surface pollution were to be wetted to
the extent that flashover could occur (critically wetted).
Measurement of the SPS must allow warning of probable flashover, notifying
maintenance staff that cleaning is required.
Secondary success criteria would include the expansion of the optical methods
to transmission line insulators. If the insulators are polymeric this would require the
benchmarking and comparison of flashovers occurring on insulators reaching their
end of life (at approximately 40 years of service). This would be a precautionary
action, emphasising the monitoring of the insulator until it were to be replaced. This
would determine how effective the insulator could possibly be without its
hydrophobic properties.
2.5 Constraints
The research did not have strict constraints governing the complexity or cost
of providing a solution. It however had scoping that focused on the intended solution.
Firstly, only outdoor porcelain type bushings were considered as these are the types
installed at the Sere Wind Farm, (further detailed in Chapter 3.3 – Site Pollution
Severity). Secondly, again relating to the location, only marine and desert pollution
Chapter 2. Problem Specification 7
were considered, needing to be identified and differentiated. Thirdly, only medium
voltage levels were considered.
In order to ensure repeatability of the experimental design, various factors had
to be considered. Due to the varying lighting conditions during daytime, the bushing
surface would only be imaged at night under well-defined artificial lighting using a
dome-shaped LED array, implemented for the RTI. The image resolution was fixed at
640x480 which coincided with the reported resolution of the camera implemented in
this monitoring system. The resolution was fixed to avoid mismatched data sets and
potential errors that could arise therefrom. The images used for the monitoring system
were that of an artificially polluted bushing, to better control what types of pollutants
were present on the bushing surface and their levels. The methods of artificially
polluting bushings are outlined in SANS 60815-1 [2]. The rib dimensions of the
bushing used in this investigation were fixed to that of a typical 33 kV porcelain
bushing for a wind farm step-up transformer. All measurements were made on the
same bushing. The measurements of leakage current were conducted in a lab under
controlled conditions (within a dark-room to emulate night-time conditions).
With regard to the AI aspect of the imaging system, the aim was to effectively
estimate the leakage current under critically wetted conditions within an acceptable
range of certainty. The AI method should effectively produce this result with relative
simplicity, without having to assess and compare more complicated and advanced
methods of AI. In this regard, an Abstract Convolutional Neural Network (CNN) was
used to extract certain feature maps from the input images and ultimately estimate the
leakage current therefrom. The combination of image feature extraction and a working
neural network structure ensured the highest chances of prediction accuracy. The
network used would not be built from the start, but rather transfer learning was used
(based on a prebuilt, pre-trained CNN) owing to the limited amount of data initially
available. This form of AI was the chosen technique to output the quantitative measure
of the ESDD, along with the associated leakage current, for the general case (whilst
remaining within the constraints illustrated above).
Chapter 2. Problem Specification 8
In order to fully realise the effectiveness of the implemented CNN as much
data characterising the captured images had to be extracted. Maximising the image
input data ensured that the output predictions were as accurate as possible. Image data
extraction had to include parameters of coverage (surface area of the bushing that
contains pollution), area ratio (the ratio between polluted and clean bushing surface
area), eccentricity (the relative circularity of pollutant particles), shape factor (the
shape and grouping of pollutants on the bushing surface), reflectance (relative
specularity of pollutants) and saliency (the surface topology of the bushing).
9
Chapter 3
Literature Review
3.1 Insulator Selection and Dimensioning
In practice, bushings dimensioned for use in areas with predicted high levels of
surface pollution follow three main approaches as described in SANS 60815-1 [2]: past
experience; measure and test; and measure and design. The approach based on past
experience is usually the primary method used in bushing dimensioning. Here,
experience from existing sites is applied to nearby sites or sites with similar conditions.
The other two approaches entailing measurement, testing and design require time and
resources [4]. When site conditions are different these methods have to be considered.
Alternatively, if the first approach is to be followed (in which experience need be
gathered), an increase in flashover rates can be expected.
Measurement and testing requires first that the SPS be either measured or
accurately estimated. A variety of suitable bushings are then selected and tested in a
laboratory under various criteria, described in IEC 60507 [5], so as to verify their
viability at field sites. As mentioned earlier, this approach requires further resources and
expenditure than the first approach as testing requires several bushings to be considered
on a trial and error basis. Finally, similar to the second approach, measurement and
design also requires SPS evaluation. However, instead of running trials on existing
bushings, a new bushing is designed to cater for the field site pollution requirements [4].
This method, while surpassing the other two in dimensioning bushings for new field
Chapter 3. Literature Review 10
sites, requires the most resources in both design and manufacturing of a completely new
bushing [4].
3.2 Pollution Types
The environmental conditions in which bushings have to operate will change their
performance characteristics. As explained by CIGRE Taskforce 3.04.01 [6], flashover
related to pollution across insulators may arise as a result of two main types of pollution:
Type A and Type B.
Type A pollution refers to any solid pollution with soluble or non-soluble
components. This is the dry component of surface pollution. Soluble pollution describes
both high and low solubility salts deposited on the bushing surface that can form a
conductive layer when wetted. These arise most commonly in coastal environments,
where the vast majority of soluble pollution is fast dissolving salts deposited on the
surface by sea spray-wind and fog. The severity of this form of pollution is quantified
using the Equivalent Salt Deposit Density (ESDD), described further in Chapter 3.5 –
Conventional Measurement of ESDD and NSDD. The non-soluble components of
Type A pollution that are of importance include sand and dust. These non-soluble
components can serve as a binding layer for soluble pollution and can also contain
conductive particles. The severity of this form of pollution is quantified using the Non-
Soluble Deposit Density (NSDD), described further in Chapter 3.5 – Conventional
Measurement of ESDD and NSDD.
Type B pollution refers to liquid electrolytic pollution with sparse non-soluble
components. This type of pollution is most commonly found in coastal areas where salt
fog is deposited on the bushing surface. Furthermore, the ambient humidity leads to
surface wetting of Type A pollution described previously, yielding a combination of
Type A and Type B pollution.
Chapter 3. Literature Review 11
3.3 Site Pollution Severity
It is important to consider the environment that characterises the type of pollution
in an area. The various measurements of SPS depend on the type of pollution present in
the region.
3.3.1 Desert Type Environments
This type of environment is generally described as having areas of sandy soil and
periods of dry conditions. In these regions, the dominant pollution type is airborne low
solubility salts present in the surrounding sandy soil, combined with high NSDD Type A
pollution. Often, wetting by dew will increase the likelihood of bushing flashover.
3.3.2 Coastal Type Environments
These areas near the coast are affected by rapid build-up of Type B pollution
from wind, fog and ocean spray. The extent of the environment depends on the natural
topography of the area, extending up to 50 km inland in some cases. Over extended
periods a Type A soluble pollution layer can be formed from the evaporation of Type B
pollution.
3.3.3 Industrial Type Environments
Industrial areas are prone to both Type A and Type B pollution. Normally, this
form of pollution arises from heavy particles forming a deposit on the bushing surface.
Type A pollution contains low solubility components such as gypsum. Type B pollution
includes high conductivity particulates such as coal or dissolved nitrogenous and
sulphurous gases.
Chapter 3. Literature Review 12
The three environments described above apply to the Sere Wind Farm, located in
the north-western fynbos biome in the Western Province, South Africa. The area has
small shrubs growing in sandy types of soil and is not subject to much rain, thus
categorising the area as a desert type environment. The site extends about 10 km inland,
to a maximum elevation of approximately 120 m, thus susceptible to both the Type A
and Type B pollution of a coastal type environment. The Tormin coal mine is located
almost 2 km from the closest turbine at the Sere Wind Farm. Tormin is a coastal
mineral-sands mine harvesting coal from mineral rich coastal sand deposits. The area is
thus prone to Type B industrial pollution, pertaining to high conductivity particulates.
As illustrated above, the Sere Wind Farm is prone to a mixture of Type A and
Type B pollution from the desert, coastal and industrial environments. The interactions
between each of the environmental pollution types increases the dynamics of the surface
pollution. For example, the ocean spray of Type B coastal pollution could critically wet
already deposited desert and industrial Type A pollution. Furthermore, dew, occurring
in a desert environment could in turn critically wet coastal and industrial Type A
pollution.
3.4 Pollution Flashover Mechanisms
As described in Annex B of SANS 60815 [2], the flashover mechanisms across
insulators can be divided into six parts. These parts describe flashover for a hydrophilic
surface with Type A surface pollution deposits. A hydrophilic surface when wetted
forms a complete electrolytic film along the surface of the bushing, compared to
hydrophobic surfaces that tend to form an incomplete layer of droplets. Considering MV
for this research, the arc propagation may complete several cycles of extinction and re-
ignition before complete flashover occurs. Furthermore, the rib dimensions of the
bushing itself may also worsen the flashover performance of the bushing by potentially
shorting some sections of the bushing. The six phases are described as follows:
Chapter 3. Literature Review 13
1. A bushing is coated first with a layer of Type A pollution. Under dry
conditions the layer has very low conductivity, thus requiring the bushing
to thereafter be critically wetted before flashover may occur.
2. Critical wetting occurs from various sources. Firstly, moisture absorption
occurs as a result of high relative atmospheric humidity (>75%), coupled
with similar ambient and bushing surface temperatures. Condensation
forms on the bushing surface when its temperature is less than the dew
point, usually occurring at dawn. Finally, rain may either wash the surface
or assist in breakdown by shorting sections across the ribs of the bushing.
3. Once the surface is polluted and wetted, leakage currents begin to flow. The
heating effect of the leakage current forms dry bands at the narrowest point
along the bushing.
4. The formation of dry bands breaks the conduction path of the leakage
current.
5. A surge in leakage current occurs when the line-to-earth voltage across the
dry bands is substantial enough to cause air breakdown, where the bridged
arcs are in series with the wetted portions of the bushing.
6. Flashover will occur if the bridged arcs are sustained long enough and the
resistance of the wetted surface is low enough such that more and more of
the surface is bridged by arcs. The subsequent decrease in series resistance
will eventually bridge the entire bushing, causing a phase-to-earth fault.
The flashover process is dependent upon the interaction between the insulator
material properties, pollution layer, wetting conditions and applied voltage. Flashover is
more probable at higher leakage current levels and as such is dependent upon the surface
resistivity. The surface resistivity of a uniformly polluted distribution is found using the
form factor (Ff) described as a surface integral in (1).
Chapter 3. Literature Review 14
𝐹𝑓 = ∫𝑑𝑙
𝑝(𝑙)
𝐿
0
l is the length of the partial creepage distance and p(l) is a function that describes
the insulator width as 2πr(l).
3.5 Conventional Measurement of ESDD and NSDD
Annex C of SANS 60815 describes the methods required to determine both the
ESDD and NSDD on bushing surfaces [2, 7]. The ESDD measurement is made based
upon a saline solution whose salt component is the soluble pollution on the bushing
surface. It is described as the relation between salinity (Sa) volume per bushing surface
area of collected pollutants (A), as illustrated below in (2).
𝐸𝑆𝐷𝐷 = 𝑆𝑎𝑣𝑜𝑙
𝐴
Sa is the salinity of the solution (kg/m3), V is the volume of distilled water used
to prepare the solution (cm3) and A is the bushing surface area from which pollutants
have been collected (cm2). Sa is described as a function of volume conductivity at 20 °C
(σ20), illustrated below in (3).
𝑆𝑎 = (5.7𝜎20)1.03
𝜎20 = 𝜎𝜃[1 − 𝑏(𝜃 − 20)]
The volume conductivity at 20°C (S/m) is described in (4), where: θ is the
solution temperature (°C); σθ is the volume conductivity at θ°C (S/m); and b is a factor
dependant on θ, the calculation of b is illustrated in Clause 7 of IEC 60507 [5].
(3)
(4)
(1)
(2)
Chapter 3. Literature Review 15
In determining NSDD, non-soluble pollutants are filtered out of solution, dried
and weighed. NSDD (mg/cm2) is determined using (5) below.
𝑁𝑆𝐷𝐷 = 1000(𝑊𝑓 −𝑊𝑖)
Wf is the combined weight of filter paper and pollutants (g), Wi is the initial
weight of filter paper without pollutants (g) and A is the bushing surface area from
which pollutants have been collected (cm2).
3.6 Image Segmentation and Border Extraction
With the pollution types, discussed in Section 3.3 – Site Pollution Severity, and
the methods used to quantify the type and level of pollution on bushings, discussed in
the previous section, certain methods of image data capture are considered. The first,
described in this section, relates to 2D image data used for the purpose of defining a
preliminary measure of pollutant coverage on the bushing surface, illustrated further
in Section 4.3 – Image segmentation. The implemented method of image capture,
Reflectance Transformation Imaging (RTI), considers the bushing surface and the
pollutants present as a 3D data-source, discussed further in the following section.
As described by Wang et al. [8], it is possible to determine the level of
hydrophobicity on the surface of non-ceramic transformer bushings using imaging
techniques. Wang et al. describe a method of binary thresholding images and the use
of the Canny operator for edge detection. From this image processing, four parameters
are used to describe the hydrophobic grade of each image: water area ratio (average
ratio between water droplet area and dry surface), water coverage (overall area of
water on the surface), shape factor (the shape and grouping of water droplets on the
surface) and eccentricity (relative circularity of the water droplets). These parameters
form part of the input layer of a four-layer probabilistic neural network. The four
imaging parameters of 140 samples are passed through the trained neural network,
upon which each image is assigned one of seven hydrophobic grades, along with a
percentage of certainty.
(5)
Chapter 3. Literature Review 16
The technique of parametrising captured images may allow for estimation of
the quantity of pollution and to an extent the pollution type. To the latter end, the
eccentricity may be used to determine the shape of the pollutants, thereby assessing
what type of pollution is present. However, in order to truly determine the shape of
pollutants, a higher order of magnification is required, not just a macroscopic view of
the surface. The overall quantity of surface pollution may be determined by the area
ratio and coverage.
3.7 Reflectance Transformation Imaging
As previously mentioned, RTI is a method of representing raw image data as three
dimensional image data. Although mostly focused primarily for use in the evaluation of
artwork and the examination of archaeological specimens [9, 10], this imaging method
has shown promise in the engineering field, as illustrated by Coules et al. where RTI was
used in the visual analysis of mechanical components that had failed (fatigue cracks and
ductile tearing) [11]. RTI is used to represent the surface saliency of objects. An RTI
image set has to be obtained of the surface in question. The RTI image set consists of
images of the surface under varying illumination from different light sources, but imaged
from a fixed viewpoint. Thus, each image in the set (normally 40 images per set)
represents the surface imaged from a particular lighting source/position vector relative to
a fixed viewpoint. Figure 3.1 represents the arrangement of an RTI array, using the actual
illumination position vectors used in this research. Further detail pertaining to the
implementation of the RTI array is discussed in Section 4.2 – Image Capture System and
in Section 4.4 – Image RTI Processing.
It is noted that the viewpoint must be orthogonal to the surface in order to achieve
the highest accuracy of surface saliency reconstruction. If the surface is slanted, shadow
artefacts arising from the varying illumination would accentuate certain angles (those in
the opposite orientation to the plane) and diminish angles orientated in the same direction
to the plane.
Chapter 3. Literature Review 17
On a pixel level, each image in the RTI image set represents the subject pixel of
the surface under a certain illumination condition. The incident light direction vector of
the particular illumination condition is used to derive a continuous function for each of
the RGB values of the pixel in question. Thus, in mapping each of the subject pixels
(consisting of the same relative pixel in each image), the saliency of the imaged surface
is captured.
Various techniques exist for the saliency mapping of imaged surfaces, such as
the Bidirectional Reflectance Distribution Function (BRDF) [12]. However, as
Pitard et al. explain [13], these techniques are complex and time-consuming to
implement. As such, Pitard et al. propose a novel method of saliency mapping used
for RTI. In order to reconstruct the saliency map, each pixel is imaged orthogonal to
the surface at varying lighting positions as required. As such each pixel to be
represented by an nth dimensional set of values, with each corresponding to a set of
illumination values. The angular reflectance of each pixel is interpolated using three
methods, with the most recent, Discrete Modal Decomposition (DMD), proving to be
the most resolved [14].
FIGURE 3.1: Basic Principal of RTI Image Capture Array (elevation φ) [11]
Chapter 3. Literature Review 18
Pitard et al. are able to reconstruct saliency to a resolution of 1.25 μm in width
and 58.32 μm in depth, with visibility of 65% [13]. As such, the shape and
arrangement of pollutants on the surface are more accurately represented. This is of
importance in differentiating between clumps of coal, desert dust, and crystalline salt
formations. The shape and eccentricity, described in the previous section, is resolved
to approximately 100 μm. This increased resolution facilitates a more accurate data
set representation and a better probabilistic outcome from the neural network in
determining pollution type.
Another technique, developed by Malzbender et al., is Polynoimal Texture
Mapping (PTM) [15]. Following the same requirements of each pixel being
represented by an nth dimensional set of values corresponding to a set of illumination
values, PTM models the luminance of each pixel as a biquadratic function of the
projection of the position vector of the illumination source in question. Finally,
Hemispherical Harmonics (HSH) differs only in the method of representing the pixel’s
luminance relative to the lighting vector. As Gautron et al. explain, HSH maps the
functions of each pixel to a 2nd or 3rd order Legendre polynomial, hemispherical in
basis [16]. These techniques, pertaining to the software-based solvers used to realise
the surface reconstructions, are further discussed in Section 4.4 – Image RTI
Processing.
3.8 Convolutional Neural Networks
Neural networks are a powerful tool used in Artificial Intelligence (AI) consisting
of three distinct layers: input, hidden and output. Neural networks are trained in
probabilistic prediction or supervision. Various methods exist when considering
implementation and learning of the neural network. As described by Oukrich et al. [17],
one such technique is the Back-Propagation Neural Network (BPNN). This method
functions in linking the various hidden layers to the input and output layers by means of
weighted set-values. The gradient of a loss function is used to update error values which
Chapter 3. Literature Review 19
in turn are used to update the weighted set values within the network. A predefined
threshold is set for the number of iterations the network is back propagated, dependent
on the accuracy required. Once complete, the neural network is considered trained, with
respect to that data set.
When dealing with image input data, traditional fully-connected neural networks
loose predictive accuracy when complex images with several spatial and temporal
dependencies are considered. It would seem logical that one only need flatten the image
matrix to a Nx1 vector and use that as the input to a BPNN. However, as Cireşan et al.
explain [18], doing so would not only overlook spatial pixel dependencies within the
image, but also increase the hidden units in the BPNN to extremely large quantities (for
a 640x480 image – 307,2k hidden units, resulting in 95’000 million parameters). Thus,
in order to make better use of computational power, areas of the image are addressed on
a per-turn basis. This is known as image convolution. A kernel or filter, of a certain matrix
dimension is passed over the image matrix, much the same as graphical convolution of
functions. The output of the convolution of the kernel and image matrix are feature maps.
The feature maps extract high-level features, those spatial and temporal dependencies.
The extent of feature extraction, and type, is dependent on the size, weighting and stride
pattern (how the kernel is multiplied along the image matrix) of the kernel. In order to
reduce the spatial size further, pooling is done on the various feature maps obtained from
the convolution. Pooling of the feature maps is done either as a mean of values of a region
or as a maxima of values of a region. The process of convolution (obtaining feature maps)
and pooling (selecting certain features from the feature maps) is repeated two to three
times, depending on how the neural network is engineered. The output from the entire
convolution process is then flattened (i.e. Nx1 matrix where N is the total number of
output elements, for example a 3x3 matrix is expressed as a 9x1) such that the values are
fed to the traditional fully-connected back-propagated neural network described earlier.
The overall topology of a CNN is expressed in a simplified diagram in Figure 3.2.
Chapter 3. Literature Review 20
as
As image based deep-learning problems often require vast amounts of data,
transfer learning is used as a preliminary approach. Transfer learning can be described as
a method of re-purposing and existing neural network architecture that has been
previously trained and shown to have a high level of accuracy in its predictive ability,
relative to what the neural network is targeting as the output (e.g. classifying certain
images such as architecture or animals, or fitting a regression line to predict a certain
floating-point value such as angle of slant in images of handwritten numbers). The pre-
trained neural networks used for transfer learning thus already have predetermined set-
weights in the various nodes that offer the greatest predictive accuracy for the relevant
task. It is especially useful in the initial stages of a project, where limited data is
available [19]. Large volumes of image data are required to not only train the neural
network, but to also engineer weights and topologies of kernel convolution layers [18].
By implementing transfer learning the overall time required to design a new CNN
topology is reduced. It can also be beneficial to use an existing CNN topology and adapt
part of its structure to meet the particular requirements of a different deep-learning
problem [19]. Furthermore, as transfer learning networks are pertained networks, some
of the potential feature maps already identify key spatial dependencies that may be useful
in a new deep-learning problem (edge detection, clustering). This pertains to the pre-
processing images require in a CNN topology. In order to adapt these networks to new
deep-learning problems, changes to the last few layers of the network, including the
FIGURE 3.2: CNN basic architecture [13]
Chapter 3. Literature Review 21
output layers, are made. The changes range from structural topology changes, to weight
bias changes. Once the network has been modified to meet the new requirements, it is re-
trained (using back-propagation and an error loss-function) on the data pertaining to the
new problem. The re-training slightly adjusting weights within the CNN to suit the
predictive requirements of the new deep-learning problem.
22
Chapter 4
Methodology
Figure 4.1 illustrates the methodology for the research. The various
components of the system are divided into three main sub-components. Each of the
various components was implemented separately following an iterative process.
Iterations were implemented to ensure expected functioning of each separate
component.
FIGURE 4.1: Method block diagram illustrating overall implementation of
image capture and reconstruction, real pollution level dynamics, and their
interactions in their neural network
Pollute Bushing
Leakage current measurement
ESDD & NSDD
Pollution Level
Leakage Current Value & Certainty
Pollution Level Detection
Neural Network
RTI Data Acquisition
Visual Saliency Estimation
Image Acquisition
Image Segmentation
Image Border Extraction
Feature Extraction
Imaging & Reconstruction
Ground Truth
Chapter 4. Methodology 23
The implementation of the optical monitoring is highlighted in further detail:
1. Initially, ESDD type pollution was considered (NaCl).
2. A dome-shaped LED array was built around the camera, with the camera
being oriented vertically and located at the peak of the dome (required
for the RTI to function properly). The LED array functioned as a well-
defined artificial light source, improving future repeatability.
3. RTI and greyscale images were obtained of a polluted bushing on the top
shed, the reasoning of which is explained in Section 4.1 – Leakage
Current Measurement and Section 4.5 – Neural Network Architecture.
The bushing itself and the camera positioning however did not change.
The images of the polluted surface were needed to test whether the
relevant image capture methods were working correctly.
4. Once the image data was acquired, the relevant image feature extraction
techniques were tested: coverage, area ratio, eccentricity, shape factor
and reflectance. With the imaging system operational, it was then
correlated with measured pollution levels.
5. With a functional image capture and feature extraction system,
laboratory measurements began with varying levels of NaCl. Five
different salinity ranges were considered along the ESDD scale as
illustrated in SANS 60815-1 [2]. A total of 20 trails across the entire
range were made.
6. The bushing was first cleaned as per SANS 60815-1 [2].
7. A saline solution of known concentration (0.2 kg/m3) was prepared and
applied (via spray) to the bushing.
8. Whilst the bushing was still wetted, a leakage current measurement was
made (described in more detail in Section 4.1 – Leakage Current
Measurement).
9. The bushing was left to dry and was then imaged using the RTI array
(described in more detail in Section 4.5 – Image RTI Processing).
Chapter 4. Methodology 24
10. The pollutants were then washed off into a solution and the ESDD value
obtained. It was noted that SANS 60815-1 [2] measures the ESDD before
application of the pollutant to the bushing. As it is a destructive
measurement, a post-critical-wetting measurement is required for higher
accuracy. It is this post-polluting measurement that was used as the true
ESDD.
11. The particular NaCl pollution level was now characterised by two
measurements of ESDD (prior and post application), two dry pollution
image sets (RTI and greyscale totalling a minimum of 41 images per trial)
and a leakage current under critically wetted conditions.
12. The NaCl solution concentration was increased and Steps 7 through 11
were repeated until no more NaCl dissolved (22.5 kg/m3). At this point,
instead of measuring leakage current straight after the application of the
solution, the surface was left to dry before another application of the
saline spray.
13. Step 12 was repeated until the ESDD scale in SANS 60815-1 [2] was
adequately sampled (~20 points along the axis). This was to ensure full
representation of the scale and the effect of ESDD level on leakage
current. It also ensured that the neural network had sufficient data sets to
be trained and sufficiently varying data sets to be tested (i.e. training data
different from testing data.)
14. With the actually measured values obtained in Step 11, AI was used to
predict ESDD and leakage current from the image features alone. As each
set of images had an actual ESDD and leakage current measurement,
those served as the actual values used for training the CNN. The neural
network was trained on 70% of the acquired data set, and tested for
classification accuracy with the remaining 30%.
Further work could include:
15. The process will revert to Step 5, with a combination of ESDD and
NSDD.
Chapter 4. Methodology 25
16. Each level of ESDD acquired in Steps 7 through 11 will be paired with
five fixed levels of NSDD (fixed non-soluble mass of desert sand).
NSDD is limited to 5 levels to reduce the overall dimensionality of the
samples acquired (150).
17. Optimisation of the system to increase the certainty of the CNN and the
series of NSDD values.
18. Once the monitoring system is proven and making predictions with a
suitable level of certainty, the hardware aspects related to field
implementation are considered (i.e. remote implementation over a
wireless network).
19. Two image capture devices are set up on two separate bushings (camera
and LED array), where the image data is sent to a central computer where
each data set of each device is passed through the locally trained and
optimised NN.
20. The output data is then presented in a GUI that will also monitor the
operation of the devices and control the scheduling of image capture for
each device.
4.1 Leakage Current Measurement
In order to relate the detected pollution (from the imaging system) to the
measured pollution (from the artificially polluted ESDD and NSDD levels), a leakage
current measurement under critically wetted surface conditions was required.
Zhao et al. describe a method for flashover voltage prediction based on leakage
current [20], similar to what is required for this research. Zhao et al. artificially
polluted a bushing with ESDD type pollution and measured the leakage current using
a test setup similar to that illustrated in Figure 4.2 [20]. The value of leakage current
is calculated from the voltage of the two series connected non-inductive resistors: a
50 Ω resistor for smaller leakage current measurement and a 2 Ω resistor for larger
leakage current measurement.
Chapter 4. Methodology 26
In the Zhao et al. setup, the important parameter of critical wetting is
controlled for 100% humidity at 10°C in an artificial fog chamber [20]. However,
Shiny and Prakash provide an alternative to the fog chamber to control critical wetting
by constantly spraying the surface with fine mist between U50 tests [21]. This method
simplifies the overall experimental setup and was deemed sufficient in capturing the
leakage currents relevant to the scope of this research. The method of prediction
served the purpose of supplying the data required for training the neural network,
where a known level of ESDD was paired with a measured leakage current.
Figure 4.2 depicts the test circuit implemented, based upon the setup by
Zhao et al. [20]. The circuit was slightly modified from the original, and its
application altered. The voltage applied to the 240V/33kV transformer was controlled
using an auto transformer. This was done to ensure that all leakage current tests were
conducted at the same phase rated voltage of the bushing, for a single phase-to-earth
of 33𝑘𝑉
√3. In the setup by Zhao et al., increasing voltage is applied until breakdown was
reached [20]. Even though the HV transformer made available had an atypical rating
of 40kV open load, the decision to conduct the leakage current measurements at the
phase voltage was three-part in nature. Firstly, the insulator itself was rated at
33kVphase, thus using the equivalent line voltage would yield a potential of √3 × 33𝑘𝑉
across the bushing. Hence, to get the equivalent line rating of the bushing (phase-to-
FIGURE 4.2: Schematic diagram of AC leakage current test circuit
Chapter 4. Methodology 27
earth), 33𝑘𝑉
√3 was used as the maximum applied voltage during tests. Secondly, in order
to ensure stability of the voltage applied, the transformer was not operated under full
load conditions (i.e. at full rated voltage), to ensure there was still enough headroom
for current supply at the desired phase-to-earth voltage (33𝑘𝑉
√3). The use of the auto
transformer ensured that the voltage supply to the HV transformer was adequate to
both maintain the voltage potential across the bushing, and maintain the leakage
current while the bushing was under polluted and wetted conditions. (It is noted that
initial tests were done at 33kV phase-to-earth and they yielded excessively high
leakage currents for a bushing under non-polluted conditions. Once polluted with
ESDD rated more severe than light, the measured leakage current plateaued, reaching
the current limiting value of the current limiting resistor.) Finally, the aim of the
research was to forewarn the possibility of flashover (i.e. at what level of ESDD, and
by extension the leakage current, did the measured leakage current exceed the
acceptable standards in SANS 60815 [2]). Thus, conducting tests above rated voltages
would prove unnecessary for the scope of the research. Furthermore, the
implementation of the neural network was such that it required a narrow range of
leakage current values (within the same order of magnitude) to provide accurate
predictions based on dry ESDD images of the bushing surface. This phenomenon is
explained in Section 4.5 – Neural Network Architecture and illustrated in
Section 5 – Results.
The current limiting resistor was measured using a Fluke 107 multimeter and
had a value of 780kΩ ±0.4%. Current limiting was necessary in order to firstly, ensure
leakage current values were within a useable range as described above and illustrated
in Figure 5.1: Leakage Current vs. ESDD with loose trend line, and secondly, to
ensure the HV transformer was not operated under excessively high currents, should
the bushing have flashed-over. The leakage current measurement resistance was
measured in the same way with a value of 63.7Ω ±0.1%, slightly higher than that in
Figure 4.2. This equivalent resistance was achieved by placing several carbon
composition resistors in parallel. The type of resistors used and the configuration
thereof was chosen to decrease the parasitic inductance and increase the power rating,
respectively. It was assumed that the overall parasitic inductance was too small to
Chapter 4. Methodology 28
affect voltage measurements across the leakage current measurement resistance.
Furthermore, the bushing was placed in the centre of a cut out metal plate that served
the role of the tank of a transformer. The base of the bushing was coupled to the
ground plate. The ground plate was connected in series with the leakage measurement
resistance before being earthed. This was considered enough parasitic capacitance to
counteract any parasitic inductance present within the leakage current measurement
resistance.
The device used to measure the voltage applied to the bushing was a
MajorTECH MT-883 multimeter (V1 in Figure 4.2). The multimeter was connected
to a Fluke 80K-40 HV probe (1000:1) which was hooked to the top copper coupling
of the insulator in the laboratory setup illustrated in Figure 4.3. The figure however
shows the probe hooked, along with the earth-stick, to the HV output of the
transformer (this was a safety measure during non-operation). During testing, the auto
transformer was increased gradually from 0V until the reading on V1 was 33𝑘𝑉
√3. This
voltage was maintained for five seconds to observe the maximum peak in leakage
current, measured as a voltage across the leakage current resistance using a Fluke 107
multimeter (V2 in Figure 4.2). A period of 5 seconds was chosen to be long enough
to observe the maximum (i.e. worst possible) leakage current that could flow under
FIGURE 4.3: Laboratory test setup for leakage current measurement
Chapter 4. Methodology 29
the particular polluted conditions before surface heating would dry the wetted
pollution. The ammeter (A in Figure 4.2) was an analogue Taylor Model 50. This was
an initial validation precaution to ensure the sampling rate of the digital multimeter
(V2 in Figure 4.2) was high enough to detect any peaks in leakage current. The
ammeter served as a visual aid rather than a measurement device and in reality was
connected after the leakage current measurement resistance. It was however omitted
from the circuit in the tests used as part of the data-set for the neural network.
4.2 Image Capture System
A preliminary image capture system was implemented using 4D Systems’
μCAM-III. In order to capture images for preliminary analysis of the various imaging
techniques, the pre-programmed on-board capture system of the camera and a serial
data cable were used. An illustration of the image capture interface (supplied as a
demo program by 4D Systems [22]) and the respective settings used for preliminary
image capture is shown in Figure 4.4.
Various images were captured to represent four sets of different pollution
levels (clean, light, medium and heavy) at three different locations on the bushing
(top, middle and bottom). The images were used as the basis for a proof-of-concept
of image segmentation, as illustrated in Table 4.1 and discussed further in
Chapter 4.4 – Image Segmentation. Finally, in order to avoid shadow and reflective
artefacts in the captured images, but still ensure sufficient image saturation, the
camera was used in mid-to-late afternoon lighting. Ultimately, implementation of an
integrated lighting source was required for the RTI saliency mapping described in
Chapter 3.7 – Reflectance Transformation Imaging in order to realise the full scope
of the project.
Chapter 4. Methodology 30
The implemented image capture system for bushing surface analysis was
comprised of 4D Systems’ μCAM-III mounted in an RTI array. The AutoCAD design
of the array is illustrated in Figure 4.5, which was used to then 3D-print the structure.
The RTI array was designed based on an arched dome with a diameter of 100 mm.
Arches were used instead of a solid dome so as to prevent shielding the imaging area
from environmental pollution. Normally, RTI arrays are designed as solid domes to
eliminate interference from external light sources. However, with an open-arched
dome, external light sources would affect the saliency reconstruction. To minimise
this effect, imaging would only occur at night.
FIGURE 4.4: μCAM-III demo program used for preliminary image capture [17]
Chapter 4. Methodology 31
The array had eight arches with five white surface-mount LEDs
(Bivar SM0805) on each arch, thus translating to 40 image samples per surface
reconstruction. The LEDs selected were small enough to fit on the arches of the array
and each had a sufficiently low power rating (maximum 78 mW) such that a minimum
of 5 LEDs could run simultaneously off the microcontroller without loss of average
luminosity. Five LEDs were required for illuminating the surface evenly for images
used with binary thresholding techniques, discussed further in the following section.
The reduced power consumption per LED avoided the need for additional power
circuitry to supply the LEDs thereby reducing the size and complexity of the
implemented image monitoring system. At full intensity each LED had a high
luminosity (55 mcd) and wide viewing angle (130°). This ensured even lighting of the
bushing surface, relative to the LED in the array that had been turned on during the
RTI image capture sequence. Details pertaining to the RTI image capture and
processing are discussed further in Section 4.5 – Image RTI Processing.
The controller used for the monitoring system was the ATMega2560. This
particular microchip was selected owing to the number of PWM ports available for
the LED array control aspect of the monitoring system, and the large number of digital
I/O ports required for image data communication. Figure 4.6 illustrates the
configuration of the controller, camera and LED array. It is noted that while only 9
digital I/O ports were utilised for the implemented monitoring system, a more robust
FIGURE 4.5: AutoCAD RTI lighting array solid wire frame
Chapter 4. Methodology 32
version of the system would require wireless communication so the need for extra I/O
ports was warranted.
During laboratory testing, commands were relayed to the controller via the
SoftwareSerial protocol from a computer. The code used to program the
microcontroller can be found in Appendix A. Seven commands exist that were input
by the user. These commands are listed as follows:
0. Wake Command – Sends a message to activate the camera if it is
unresponsive (camera module sleep mode activated after 10 minutes of
idling)
FIGURE 4.6: Image Capture System Schematic
Chapter 4. Methodology 33
1. Sync Command – Synchronises the camera for communication with the
microcontroller (set to minimum of 9600 baud to mitigate data loss).
2. Initialise Command – Sets default initialisation parameters for the
camera to return 640x480 jpeg images.
3. Packet Command – Set camera to transfer 512 bytes per packet for jpeg
image transfer to microcontroller.
4. Snapshot Command – Order camera module to store 640x480 jpeg image
in buffer.
5. Request Command – Request sizing parameters of buffer stored image
(how many packets to expect) and proceed to transfer image data to
microcontroller.
6. Auto Command – Have the microcontroller automatically execute
commands 2 through 5 for each of the LED light sources in the RTI array
(the microcontroller will sequentially turn on each of the 40 LEDs in the
array, capturing and storing an image of the bushing surface for each).
7. Lights On Command – Turns on the 5 LEDs surrounding the closest to
the camera for an overall illumination of the bushing surface (legacy
option for the capture of images for use with binary thresholding
techniques).
8. Lights Off Command – Turns off the aforementioned 5 LEDs.
For the RTI image set, the controller sequentially turned on the LEDs in the
array and communicated with the μCAM-III to capture and store each image on a
memory card, as illustrated in the list above by Command 6 (Auto Command). The
LED array was controlled with PWM in order to vary lighting intensity so as to
minimise unwanted surface reflection and specularity. The LED array is configured
as shown in Figure 4.7. Trials with several smaller sample sets at different lighting
intensities showed that a PWM of 50% yielded the least number of visible reflectance
artefacts in the reconstructed surface map of a clean surface. For the binary
segmentation image, each LED closest to the camera on each arch (5 in total) was
turned on with a PWM of 30%, again chosen to have the least reflectance artefacts on
Chapter 4. Methodology 34
a clean bushing surface. The constructed RTI array and controller are illustrated in
Figure 4.8.
FIGURE 4.7: RTI LED Array Configuration
FIGURE 4.8: RTI Array (foreground) and Controller (background)
Chapter 4. Methodology 35
4.3 Image Segmentation
The means of attaining a preliminary evaluation of pollution severity was
obtained following the parameterisation techniques briefly described in Chapter 3.6 –
Image Segmentation and Border Extraction. The difference in grayscale intensity
between the background bushing surface and the foreground pollutants under
observation lends itself well to a binary converted image based upon a predetermined
threshold. From this, a pixel count between the background (0) and the foreground (1)
of the binary image, would indicate the percentage of pollution coverage on the
surface of the bushing. From the saturation of the captured images in Table 4.1, a
binary greyscale threshold of 0.8 yielded the most useful results.
From the single image captured (using 5 LEDs as lighting the lighting source),
described in Chapter 4.2 – Image Capture System, MATLAB’s im2bw function was
used. The four captured images in Table 4.1 were processed in which the resultant
image, pixel count, and relative percentage covering was illustrated. The binary image
threshold method was a crude estimation of the pollution level. However, it did offer
an overall evaluation of the severity, as seen by the sizeable percentage difference
between the sample images in Table 4.1. Thus, the technique served as a proof-of-
concept, in terms of overall pollution severity estimation.
The image segmentation technique had to be accompanied by a more accurate
evaluation. Chapter 3.7 – Reflectance Transformation Imaging, describes surface
saliency reconstruction that can be used to define the shape of pollutants and thus the
type and surface covering percentage of each pollutant. This increases the amount of
input data to the convolutional neural network, in order to ensure a higher AI
predictive accuracy.
Chapter 4. Methodology 36
TABLE 4.1 – Preliminary Images with Binary Thresholding
4.4 Image RTI Processing
A requirement for the RTI imaging technique, described in Section 3.7 –
Reflectance Transformation Imaging, is knowing the vector locations of the light
sources relative to the camera. Cultural Heritage Imaging (CHI) provide open-source
software called RTI Builder that allows the lighting positions to be calculated from
the reflected light on a sphere [23].
The process began by placing a shiny black marble in the centre field-of-view
of the RTI array. Commands 1 and 6, described in Section 4.2 – Image Capture
System, were sent to the controller to obtain the set of 40 images representing each of
the lighting positions. The 40 images of the sphere were then imported as a new
project in the RTI Builder software. On one of the images, a section of area was user
defined to contain the calibration sphere, as illustrated in Figure 4.9. The program was
then given the command to Detect Spheres, where the centre and radius of the
calibration sphere in each image was found through edge detection using the Hough
Transform. As illustrated in Figure 4.10, the program did its best to predict the centre
of the calibration sphere and highlight its boundaries.
Chapter 4. Methodology 37
sdfsd
FIGURE 4.9: RTI Builder Selection of Calibration Sphere Area [18]
FIGURE 4.10: RTI Builder Prediction of Calibration Sphere Boundaries
(Edge Detection) [18]
Chapter 4. Methodology 38
Once ensuring the calibration sphere was correctly identified and centred in
each image, the program was then given the command to do Highlight Detection,
where the specular reflection of the LED on the calibration sphere was automatically
identified for each image. The program placed a little dot on the point it predicted was
the centre of the specular reflection detected. However, owing to the importance of
having a true and accurate calibration file pertaining to this RTI array, each image had
to be checked to ensure the Highlight Detection dot was as centred on the specular
reflection as possible. This is illustrated in Figure 4.11. The program outputed a
combined image file with all the specular reflections it detected, placed on a single
calibration sphere, shown in Figure 4.12.
Finally, once all the aforementioned steps and precautions were taken in
identifying all the required parameters on the calibration sphere, the program could
then execute the HSH Fitter [23] to generate a .lp calibration file. The calibration data
was interpolated from the position vectors of the reflected light on the imaged sphere
to the position vectors of the light sources on the RTI array. This yielded a calibration
file specific for the RTI array used to capture the image set. Within this file are the
FIGURE 4.11: Specular Reflection
Highlight Detection (red cross)
FIGURE 4.12: Blended Output of all the
Detected Specular Reflections
Chapter 4. Methodology 39
normalised position vector co-ordinates for each of the LEDs in the designed RTI
array. This calibration file was set as the default when running the RTI Processor,
which was used for saliency mapping the imaged bushing surface, provided the
camera’s position and orientation remained the same relative to the arches of the
array [24]. The position values obtained for the calibration of the implemented RTI
array are found in Appendix B.
The RTI Processor program, designed by Pawlowicz [24], functions as a front-
end to command line plugins that used the 40 images captured of the bushing surface,
along with the lighting positions calibration data, to create RTI and PTM files. The
RTI files were created by the HSH Fitter software, provided as open-source by the
Cultural Heritage Imaging Organisation [23]. The PTM files were created by the PTM
Fitter software that is not open source but still made freely available by HP Labs [25].
As explained by Pawlowicz [24], both pieces of software fit a certain polynomial to
the lighting curve at each pixel. RTI files (having the best fit) use Legendre
polynomials to fit the curve, while PTM files (having more image processing
functionality with the RTI Viewer software [23]) use binomial quadratics to fit the
curve.
As described by the steps outlined in the beginning of the methodology, the
ESDD and leakage current were obtained for each trial. Likewise, each trial required
a set of images corresponding to the ESDD and leakage current measured for that
particular trial. Step 9 of the methodology, pertaining to RTI image capture is further
explained. Once the bushing had been artificially polluted and the leakage current
measured under wetted conditions, the bushing was left to dry for at least 24 hours.
This is the time required to elapse for salt crystals to fully form. Following drying,
the RTI array was carefully placed such that the top surface of the first shed of the
insulator was imaged.
The positioning of the array is depicted in Figure 4.13. The lens of the camera
in the array was focused to ensure that the central area of the image was in greatest
focus. This was due to the surface being imaged at an angle. The image data set
Chapter 4. Methodology 40
*Photo could not be obtained due to COVID-19 lockdown. Refer to Figure 4.3, the array was placed on the top of the
bushing, where the red wire from the current limiting resistor would be connected.
(comprising of 40 RTI images and one thresholding image) was acquired using the
commands described in Chapter 4.2 – Image Capture System. The images that the
controller had stored on the SD card were transferred to a computer for the image
processing herein discussed to be done. For each of the trials at least two sets of RTI
images were taken with slightly different focal points on the image. This was in an
attempt to increase data quantity and variation for training of the neural network.
For each set of RTI images, the reconstruction of the saliency image map from
the 40 varying lighting images, using both RTI Fitter and PTM Fitter programs, was
visualised using RTIViewer, as supplied by the Cultural Heritage Imaging
Organisation [23]. The RTIViewer application served as part of the image processing
tools used in the monitoring system. A total of 26 processed images were created from
the RTI image reconstruction. These post-processed images, highlighting certain
features within the RTI image reconstruction, were used as part of the training and
validation data for the neural network.
The predictive ability of the monitoring system was highly dependent on the
specific variation and accurate feature representation of the image data it used. The
various types of filtered images obtained from the RTI Viewer are indicated in
*FIGURE 4.13: Positioning of RTI array on the top rib of the test insulator
Chapter 4. Methodology 41
Table 4.2. It is noted that the PTM Fitter has two options, the first, LRGB fits the
polynomials only to the luminosity values of the pixels, while RGB fits polynomials
to the red, green and blue channels of each pixel to account for any possible colour
changes with lighting angle. Furthermore, the RTI Fitter has two options, 2nd and 3rd
order Legendre polynomial fitting.
4.5 Neural Network Architecture
Section 8 of SANS 60815 [2], illustrates the non-linear relationship between
the NSDD and ESDD pollution severity levels. This relationship is important to note
as the interaction between electrolytic soluble materials and non-solubles yields a
unique characteristic. Excessively high levels of non-soluble pollution curtail the
conductive effects of the soluble electrolytic pollutants, thus decreasing the net
pollution severity. This relationship must be considered so as to avoid over-fitting for
the optical detection of pollution and subsequent erroneous prediction of leakage
current.
Initially, it was decided that the image processing and the neural network based
prediction would be addressed as two individual sub-systems. However, following
TABLE 4.2: Image Rendering Options for PTM and RTI Fitters
Chapter 4. Methodology 42
further background research relating to imaging based deep-learning problems, the
option of integrating part of the image processing with the neural network was
implemented. As discussed in Chapter 3.8 – Convolutional Neural Networks, a CNN
is most often used for image based deep-learning problems.
A CNN was implemented in MATLAB using transfer learning and the Deep
Network Designer. The implemented CNN was based off the AlexNet which was
designed by Krizhevsky et al. as a classification network [26]. Its basic structure is
highlighted in Figure 4.14. It was comprised of 8 learned layers, the first five being
convolutional layers and the following three fully-connected. As Krizhevsky et al.
explain [26], AlexNet was trained on a subset of the ImageNet database. The subset
used to train AlexNet comprised 1.2 million training images with 1000 different
categories.
As the sample size of ESDD polluted bushing surface images and leakage
currents was limited, using transfer learning was beneficial in terms of training time
and accuracy, as explained previously in Chapter 3.8 – Convolutional Neural
Networks. In order to adapt AlexNet for the purposes of leakage current prediction for
the optical monitoring system, several aspects pertaining to the original neural
network had to be considered. Firstly, the input to the network was constrained to a
fixed image resolution of 256x256. Thus, all the images captured by the RTI array,
and any subsequent processed images had to be augmented to meet the input
parameters of the neural network. The augmentedImageDatastore function
was used to rescale the 640x480 images to the required dimensions. The data store
contained all the images captured, with a label indicative of the measured leakage
current associated to each image.
The transfer learning of the AlexNet took place in two parts. Initially, the
network remained a classification type CNN, with captured images from trials being
categorised in ranges of pollution severity (E1 – E7). Once the network worked as a
classifier of discrete values of ESDD range, the network was then modified to a
regression type and retrained to predict a continuous value of leakage current. Thus,
Chapter 4. Methodology 43
the images of the dry pollutants on the first shed were linked to the reality of a leakage
current flowing for an entirely wetted bushing of a particular ESDD. As the neural
network was making a prediction based on ESDD (yielding a leakage current) the
image of the first shed was sufficient representation of the visual appearance of a
particular ESDD, and by extension, a leakage current (point 3 in the methodology of
Chapter 4 – Methodology).
As per Section 8 of SANS 60815 [2], seven distinct regions of pollution
severity are outlined. The scale depicting the ranges of ESDD severity, extracted from
SANS 60815, is illustrated in Table 4.3. The pollution rating ranges from very light
(E1) to very heavy (E7). As a first iteration to the transferred learning CNN, each of
these levels served as an output prediction of the neural network. The last fully-
FIGURE 4.14: AlexNET CNN architecture
Chapter 4. Methodology 44
connected layer of the CNN was changed to seven categorical outputs. The CNN still
behaved as a classification type model, similar to its original architecture. The
reasoning in initially maintaining similar architecture with minimal alteration of the
original model, was to verify the CNN’s viability in transfer learning for the intended
application of optical monitoring, as described in Chapter 2 – Problem Specification.
For the classification solution, each of the images was placed into one of the seven
pollution severity categories, depending on the measured amount of ESDD. Due to
the non-linear relation of NSDD and ESDD, two sub-regions within medium and
heavy pollution levels account for the seven total levels, including light pollution.
The regression model CNN predicted a continuous value of leakage current.
For this architecture, the final fully-connected layer was replaced with a singular
output layer, such that the value it predicted was a continuous number. The input data
used for training was also different from the classification CNN. The data store
mentioned earlier contained all the images captured, with a numerical label indicative
of the measured leakage current associated to each image. The regression model CNN
was used as part of the monitoring system and the code associated with its
implementation is found in Appendix C.
The augmented data store, with the resized images, was split into three subsets.
From the main dataset, 70% of all images and labels were randomly selected as part
of the training subset. A further 10% were selected for validation, with the remaining
20% used in testing. The model was trained using adaptive moment estimation in mini
batches of 10 data samples each, for a maximum of 5 epochs. These learning
parameters were used owing to the nature of the problem. As Kingma and Lei Ba
explain [27], adaptive moment estimation is well suited to learning problems whose
TABLE 4.3: Type A pollution severity ESDD rating for long rod insulator [2]
Chapter 4. Methodology 45
parameters are large and have sparse gradients. In this case, leakage currents ranged
from ~0.2 mA to ~6 mA. This is important to note as only 20 samples along the ESDD
scale were related to a leakage current. Increased sampling would be required to
increase predictive accuracy and offer a truer representation of the relationship
between leakage current and ESDD. Furthermore, owing to the stochastic nature of
flashover itself, it was prudent to use a solver that accounted for less tightly related
variables.
46
Chapter 5
Results
The success of the monitoring system was dependent on its ability to predict
the leakage current from the imaged dry pollution on the surface of a porcelain type
insulator. As outlined in the previous chapter, certain steps had to be followed in order
to implement the monitoring system. The first to be discussed are the results obtained
from the artificial polluting of the bushing. This phase of the implementation required
the measurement of the leakage current of the polluted bushing under critically wetted
conditions. Each leakage current measurement was accompanied with a measurement
of ESDD that was conducted once imaging of the dry surface was complete. The
measurement of ESDD followed the standards set out in SANS 60815, discussed in
Chapter 3.5 – Conventional Measurement of ESDD and NSDD. When measuring the
leakage current, the methods described in Chapter 4.1 – Leakage Current
Measurement were followed.
Table 5.1 illustrates the measured leakage current under critically wetted
conditions and the related ESDD measurement. The full table of results, illustrating
measured salinity readings of the solution and measured voltages is illustrated in
Appendix D. The results in Table 5.1 are part of the input learning data to the neural
network. As such, in order to better translate the relation between ESDD and leakage
current, the results are plotted graphically in Figure 5.1.
Chapter 5. Results 47
In Figure 5.1 there is evidence of an exponential relation between the level of
ESDD and the leakage current flow under critically wetted conditions. However, when
plotting the data in Figure 5.1, certain anomalies were considered. A large outlier
corresponding to Trial 3 had to be removed. Other outliers, however not as severe,
corresponded to Trial 5 and Trail 6. The reason the outliers began to occur after
~0.3 mg/cm2 is due to the stochastic nature of flashover. The leakage current values
recorded were not average values of current flowing over time, but rather were
indicative of the maximum peak current recorded during a particular trial. The trials
that were considered outliers had increased rates of minor arcing, thus yielding an
increased leakage current. This phenomenon was important to note as it began to occur
TABLE 5.1: Training data extracted from measurement data showing leakage
current and associated ESDD with SPS classification
Chapter 5. Results 48
around and above 0.3 mg/cm2. According to SANS 60815, this value corresponds to
a Heavy SPS rating of ESDD. It is at this point that the threshold was set for
unacceptable levels of ESDD pollution as past this point chances of arcing increase
greatly.
For each trial, after polluting the bushing and measuring leakage current under
critically wetted conditions the bushing was left to dry for a minimum of 24 hours
before imaging took place. The methods pertaining to image capture are highlighted
in Chapter 4.2 – Image Capture System. For each trial, a minimum of two sets of RTI
images were taken. On average, each trial had approximately 270 images, inclusive
of processed images. An example image set obtained by the RTI array is illustrated in
Figure 5.2. The image set was processed, following the methods described in
Chapter 4.4 – Image RTI Processing, in order to obtain the saliency map of the
surface and other feature image renderings. An extract of the processed images is
illustrated in Table 5.2.
As previously explained, several image renders were output from both the RTI
and PTM based reconstructions. These images served to increase the quantity of
feature data that was used to train the CNN. As these images contained the largest
amount of feature data, only the processed images were used to test the fully trained
FIGURE 5.1: Leakage Current vs. ESDD with loose trend line
Chapter 5. Results 49
CNN. The most important image renders were the Default – featuring a 2D
reconstruction of the surface under varying lighting; Specular Enhancement –
featuring exaggeration of light reflected off the facets of the salt crystals on the
bushing surface; and Normals Visualisation – featuring the surface normals of the
reconstructed saliency map encoded in false colour.
With the captured and processed images, leakage current and ESDD, all the
data necessary for the neural network to be trained was available. The first iteration
of the CNN remained a classification model, using the SPS levels from Table 4.3 as
the categories. The image data was sorted into folders corresponding to the Class in
Table 5.1 each trial belonged to. The imageDatastore function labeled each
image E1 – E7, depending on which folder it was in. Figure 5.3 illustrates the training
progress of the preliminary CNN configured as a classification model which is
described in Chapter 4.5 – Neural Network Architecture.
The classification CNN worked subjectively well with minimal tuning of
weights and biases. The modification to the original AlexNet came with the
replacement of the final fully-connected layer, where it was altered to have seven
outputs. Furthermore, the learning rate bias was set higher in the last few layers (fully-
connected layers) in order to facilitate more rapid training of the new CNN, while
preserving the pre-trained feature recognition benefits of transfer learning.
FIGURE 5.2: Example Set of RTI Images for a Single Trial
Chapter 5. Results 50
sdf
TABLE 5.2: Example Set of Processed RTI Images for a Single Trial
Chapter 5. Results 51
df
FIG
UR
E 5
.3:
Tra
inin
g P
rog
ress
of
Mo
dif
ied
Ale
xNet
CN
N f
or
SP
S C
lass
ific
ati
on
Chapter 5. Results 52
The validation accuracy of the trained CNN was 97.62%. Even though this is
considered a high level of accuracy, it is important to note that during the training,
there were several iterations that deviated largely from the predicted values. This was
due to the presence of very dark images in the training batch. These images formed
part of the RTI sets, but due to the positioning and angle relative to the bushing
surface, they appeared very dark. An example of this is seen in the last two rows of
the third and fourth columns in the example RTI image set in Figure 5.2. In the
regression model CNN, only a single value was being predicted per image that was
passed through the network, in comparison to simply classifying it into a categorical
bin. Thus, in terms of data preparation, it was important to remove the images that
skewed the prediction data in order to increase its predictive accuracy. Finally,
changing the length of the training period did little to improve overall accuracy of the
model. At times, it even resulted in a greater deviation from the loss function. Thus,
remaining with 10 samples per iteration over 5 epochs was both the standard duration
for most transfer learning models [19], and the best option for this particular use case.
To configure the CNN to a regression model, the final fully-connected layer
had to be replaced. It had to be configured such that it only outputted a single
continuous value. The new regression model CNN is illustrated in Figure 5.4. While
it is similar to that of Figure 4.14, the output block was changed to be of a Regression
type. This was important for training and validation purposes, so that the solver
understood what type of ground truth accompanied each image. In this case, the error
was reported as a relative RMSE value. The images for the regression CNN were
placed in folders labelled with the associated measured leakage current from
Table 5.1. The imageDatastore function stored each image with a numerical
value corresponding to the leakage current measured for the trial the image belonged
to. The image data used in the classification CNN and the regression CNN was the
same. The difference arose from what type of label (categorical or numerical) each
image was given. Figure 5.5 illustrates the training progress of the final CNN
configured as a regression model, described in Chapter 4.5 – Neural Network
Architecture.
Chapter 5. Results 53
The validation RMSE of the regression CNN was 0.3822 mA. The low RMSE
obtained was due to the data selection that was made before the CNN was trained. As
before, any images that were too dark to discern any surface characteristics were
omitted. This corresponded to any images being smaller than ~10 kB in size. This
brought the total number of training images down from 4960 to 4580. The resultant
improvement in RMSE was from 0.7930 mA for the full image set, down to
0.5861 mA for the data set containing no images less than 10 kB in size. The training
progress reports for the two aforementioned iterations are found in Appendix E.
Reducing the size of data set by 8 % improved the RMSE by 26 % on a single training
session. This illustrates how important data organisation is for deep-learning.
FIGURE 5.4: Regression Model AlexNet CNN Architecture
Chapter 5. Results 54
asdasd
FIG
UR
E 5
.5:
Tra
inin
g P
rog
ress
of
Mo
dif
ied
Ale
xNet
Reg
ress
ion
CN
N f
or
Leak
ag
e C
urr
en
t P
red
icti
on
Chapter 5. Results 55
The training progress in Figure 5.5 was the second cycle of training of the
CNN from a previous RMSE of 0.5861 mA, yielding the 0.3822 mA RMSE. This
illustrated the importance of maintaining the adjusted weights from previous learning
sessions. How accurately the CNN was able to predict leakage current was dependent
on how diverse and on how much data was available to train on. In order to decrease
the RMSE further, additional data organisation was done. The trials were separated
by the order of magnitude of the leakage current value.
Two separate CNNs were trained, illustrated in Figure 5.6 and Figure 5.7. In
Figure 5.6, the CNN was trained on 2700 images that were within the leakage current
range of 0.1 mA to 1 mA. In this iteration of the regression CNN, the gradients
between ground truth values used to train the CNN were not as sparse when compared
to training the CNN on the full range data set. By narrowing the predictive focus to a
certain range of leakage current the predictive accuracy was increased, resulting in a
relative RMSE of 0.09308 mA.
In Figure 5.7, the CNN was trained on 1880 images. The leakage current range
considered was between 1 mA and 10 mA. The reported RMSE was 0.5449 mA. It is
interesting to note that this value for RMSE is close to that of Figure 5.5, where the
entire range of leakage current was considered. This illustrates that the CNN was
trained to predict larger values of leakage current with more relative accuracy than
smaller values of leakage current. Figure 5.8 illustrates the predictive accuracy of the
smaller order of magnitude CNN (Figure 5.6 – 0.1 mA to 1 mA). Figure 5.9 illustrates
the predictive accuracy of the larger order of magnitude CNN (Figure 5.7 – 1 mA to
10 mA).
Chapter 5. Results 56
asdasd
FIG
UR
E 5
.6:
Tra
inin
g P
rog
ress
of
Mo
dif
ied
Ale
xNet
Reg
ress
ion
CN
N f
or
Leak
ag
e C
urr
en
t P
red
icti
on
in
th
e R
an
ges
of
0.1
mA
to
1 m
A
Chapter 5. Results 57
asdasd
FIG
UR
E 5
.7:
Tra
inin
g P
rog
ress
of
Mo
dif
ied
Ale
xNet
Reg
ress
ion
CN
N f
or
Leak
ag
e C
urr
en
t P
red
icti
on
in
th
e R
an
ges
of
1 m
A t
o 1
0 m
A
Chapter 5. Results 58
asdasd
FIGURE 5.8: Validation Sample of Smaller Order Leakage Current Prediction
Illustrating Input Image, Associated Leakage Current and Predicted Leakage
FIGURE 5.9: Validation Sample of Larger Order Leakage Current Prediction
Illustrating Input Image, Associated Leakage Current and Predicted Leakage
Chapter 5. Results 59
5.1 Discussion
As illustrated previously in Figure 5.1, an exponential trend line was centred
at 0.3 mg/cm2 ESDD and 1 mA leakage current. The value of ESDD corresponded to
the beginning of the Heavy SPS rating. As such, this was considered the point of
criticality, where any ESDD measurement above the threshold was considered too
high, translating to the need for bushing cleaning. ESDD readings above 0.3 mg/cm2
would most likely yield leakage currents in excess of 1 mA. Thus, the predictive
accuracy of the full range regression CNN is sufficient in estimating the leakage
current. Any prediction above 1 mA is considered critical in terms of ESDD pollution
severity.
The measurement data acquired to show the relationship between ESDD and
leakage current was sufficient enough to develop preliminary models. However, in
order to improve the overall resilience of the monitoring system to a wide variety of
ESDD pollution severities, further trials must be conducted. It is noted that Trial 13
illustrates the leakage current under no bushing pollution conditions and no critical
wetting. Should a relative measurement of leakage current be necessary, this trial
would serve as that reference. Furthermore, with respect to the 1 mA threshold
explained earlier – while the majority of high level ESDD did have leakage currents
in excess of 1 mA, there were still trials that showed high levels of leakage current
for lower levels of ESDD. Whether this phenomenon would imply causality for
flashover is unknown.
Possible reasoning for the discrepancy in leakage current measurement is due
to two anomalies. Firstly, the stochastic nature of flashover, and the mechanisms
leading to the event of flashover could account for spikes in leakage current
measurements, where parts of the bushing surface were shorted by arcs. Secondly,
when considering a steady-state leakage current that is higher for similar readings of
ESDD, the reasoning is systematic in nature. In this case, the method used to critically
wet the bushing surface is under question. It is previously stated in Chapter 4.1 –
Leakage Current Measurement, that the most reliable way to ensure uniform critical
Chapter 5. Results 60
wetting is to conduct measurements with the polluted bushing placed in a well
regulated humidity chamber. This would ensure that minor discrepancies of leakage
current measurements between similar ESDD conditioned trials are minimised.
Spraying the surface with saline solution is a suitable option for initial relations to be
identified. However, over a protracted range of measurements it would be prudent to
maintain as many variables as constant as possible.
The monitoring system worked well in predicting the leakage current for a
bushing polluted with light to heavy levels of ESDD pollution. It is possible to expand
the system to include NSDD pollution however it is predicted that the estimation of
leakage current by the CNN would be within similar ranges, as if only ESDD were
concerned. This is alluded to by the fact that limiting the image source data by orders
of magnitude (Figure E.1 – full data range of 0.1 mA to 10 mA and Figure 5.7 –
ranging from 1 mA to 10 mA) had little effect in improving prediction resolution, with
both having a relative RMSE of ~0.5 mA.
It would be possible to expand the monitoring system to be used with other
porcelain MV bushings. As 11 kV and 22 kV bushings have similar circumferential
dimensions (differing only in clearance height), the system could be translated for use
with these bushings with no changes to the AI component of the system. The leakage
current values obtained for various pollution levels on the 33 kV bushing would most
likely be similar for the same levels of pollution on the lower voltage rated bushings
(lower voltage but also smaller surface resistance). As the CNN used the ESDD as the
predictive indicator for leakage current, provided the bushing material is the same,
the system can be used on other porcelain MV bushings. Were the system to be used
on other bushings, for example polymeric type bushings, bushings with substantially
different dimensions or disk insulators, then new images would have to be captured
and related leakage currents be measured in order to increase the predictive ability of
the CNN. Several tailored CNN could be trained on data pertaining to a particular type
of insulator, and selected depending on which type of insulator the system is
monitoring. Finally, in order to fully realise the extended scope of the research, each
monitoring system could be modularised and connected remotely over a wireless
Chapter 5. Results 61
network to a central computer where computation and translation of the data could be
done and presented to the technician.
62
Chapter 6
Conclusion
By implementing a method of optically monitoring pollution severity of
bushings, this research aimed to avoid the current methods of reactive based
maintenance related to the management of bushing flashover. There were three main
components that constituted the implementation of the monitoring method:
measurement of artificial pollution levels and related leakage currents; imaging of
surface pollutants; and data consolidation in the form of image feature extraction
understandable by the neural network. The presented method required imaging of the
bushing surface using an RTI array in order to determine the severity of the pollution
present. As leakage current is the most important indicator of probable flashover, a
correlation between the imaged surface of dry pollution was made with measured
leakage current values for critically wetted conditions. The implemented monitoring
system was successful in predicting the leakage current from images of dry ESDD
pollution on the surface of an insulator. The RTI array captured 40 images per set
which were combined and processed to form a saliency reconstruction of the surface.
Twenty-six additional image renders were yielded from the image processing
technique. The implemented regression model CNN used transfer learning for the
majority of the image feature extraction. The CNN was trained on trial data
comprising of RTI images and measured leakage currents. The CNN had a predictive
accuracy described by a relative RMSE of 0.5449 mA for a leakage current range of
1 mA to 10 mA.
63
References
[1] M.M. Islam, G. Lee, and S.N. Hettiwatte, “A review of condition monitoring
techniques and diagnostic tests for lifetime estimation of power transformers,”
Springer-Verlag, Berlin Hiedelberg, 2017.
[2] SABS. SANS 60815-1 – “Selection and dimensioning of high-voltage insulators
intended for use in polluted conditions,” 1st Edition, SABS Standards Division,
2009.
[3] Department of Energy, Republic of South Africa. “Renewable Energy
Independent Power Producer Procurement Programme,” May 2013.
[4] CIGRE WG C4.303. “Outdoor insulation in polluted conditions: Guidelines for
selection and dimensioning – Part 1: General principles and the AC case,” CIGRE
Technical Brochure N° 361-2008.
[5] IEC. IEC 60507 – “Artificial pollution tests on high-voltage ceramic and glass
insulators to be used on AC systems,” 3rd Edition, International Electrotechnical
Commission, 2013.
[6] CIGRE Taskforce 33.04.01. “Polluted insulators: A review of current
knowledge,” CIGRE brochure N° 158-2000.
[7] CIGRE Taskforce 33.04.03. “Insulator pollution monitoring,” Electra 152m,
February 1994.
[8] Q. Wang, Y. Huang, X. Mo, W. Lai, H. Dong, Y. Yang, J. Liu, J. Huang, and
Y. Sun, “The Hydrophobic Detection of Transformer Composite Insulator
Bushing Based on Digital Image Processing Technique,” IEEE International
Conference on High Voltage Engineering and Application (ICHVE), 2016.
[9] L. MacDonald, M.F. Guerra, R. Pillay, M. Hess, S. Quirke, S. Robson, A.H.
Ahmadabadian, “Practice-based comparison of imaging methods for visualization
of toolmarks on an Egyptian scarab,” 6th International Conference on Image and
Signal Processing, pp. 239–246, 2014.
References 64
[10] H. Mytum, J.R. Peterson, “The application of Reflectance Transformation
Imaging (RTI) in historical archaeology,” Hist. Archael., 52 (2), pp. 489–503,
2018.
[11] H.E. Coules, P.J. Orrock, C.E. Seow, “Reflectance Transformation Imaging as a
tool for engineering failure analysis,” Engineering Faliure Analysis, Vol. 105,
pp. 1006–1017, November 2017.
[12] F.E. Nicodemus, J.C. Richmond, J.J. Hisa, J.W. Ginsberg, and T. Limperis,
“Geometrical considerations and nomenclature for Reflectance, Institute for Basic
Standards,” National Bureau of Standards, Washington, 1977.
[13] G. Pitard, G. Le Goïc, A. Mansouri, H. Favrelière, M. Pillet, S. George, and J.Y.
Hardeberg, “Reflectance-based surface saliency,” IEEE International Conference
on Image Processing (ICIP), 2017.
[14] G. Pitard, A. Le Goïc, H. Favrelière, S. Samper, S.F. Desage, and M. Pillet,
“Discrete Modal Decomposition for surface appearance modelling and
rendering,” SPIE Optical Metrology, Vol. 9525, pp. 952523–952533, 2015.
[15] T. Malzbender, D. Gelb, H. Wolters, “Polynomial Texture Maps,” Palaeontol.
Electron., 5 (4), pp. 1–9, 2002.
[16] P. Gautron, J. Krivanek, S. Pattanaik, K. Bouatouch, “A novel hemispherical basis
for accurate and efficient rendering,” Eurographics Symposium on Rendering,
pp. 321–330, 2004.
[17] N. Oukrich, A. Maach, S.E. Mabrouk, and K. Bouchard, “Activity recognition
using back-propagation algorithm and minimum redundancy feature selection
method,” 4th IEEE International Colloquium on Information Science and
Technology, pp. 818–823, 2016.
[18] D.C. Cireşan, U. Meier, J. Masci, L.M. Gambardella, and J. Schmidhuber, “High-
Performance Neural Metworks for Visual Object Classification,” Technical
Report No. IDSIA-01-11, January 2011.
[19] K. Weiss, T.M. Khoshgoftaar, and D. Wang, “A survey of transfer learning,”
Journal of Big Data, 3:9, 2016.
[20] S. Zhao, X. Jiang, Z. Zhang, J. Hu, and L. Shu, “Flashover Voltage Prediction of
Composite Insulators Based on the Characteristics of Leakage Current,” IEEE
Transactions on Power Delivery, Vol. 28, No. 3, July 2013.
References 65
[21] G. Shiny, N.B. Prakash, and R. Madavan, “Effect of Combination of Pollutants
on the Performance of the Bushing,” International Conference on Energy Efficient
Technologies for Sustainability (ICEETS), pp. 315–319, 2016.
[22] 4D Systems, “Serial Camera Module μCAM-III demo,” vers. 1.1, March 2019.
[23] Cultural Heritage Imaging, 2002 – 2019, http://culturalheritageimaging.org.
[24] L. Pawlowicz, “Affordable Reflectance Transformation Imaging Dome,”
hackaday.io, May 2016.
[25] T. Maltzbender, D. Gelb, and H. Wolters, “Polynomial Texture Maps,” Hewlett-
Packard Laboratories.
[26] A. Krizhevsky, I. Sutskever, and G.E. Hinton, “ImageNet Classification with
Deep Convolutional Neural Networks,” Advances in neural information
processing systems, 25(2), January 2012.
[27] D.P. Kingma, and J.L. Ba, “Adam: A Method for Stochastic Optimization,”
International Conference on Learning Representations, 2015.
66
Appendix A
Arduino Code
The code used to program the Arduino ATMega2560 controller is presented.
The user may input commands to choose what functions the controller must execute.
The controller is responsible for PWM switching control of the RTI array, serial
communication with the μCAM-III module, and data storage.
1 #include <SoftwareSerial.h>
2 #include <SD.h>
3 #include <SPI.h>
4
5 SoftwareSerial uCAMSerial(15, 14); //Rx3, Tx3
6
7 int value = 0;
8 int leg_GRN_BLK = 12; // the PWM pin the LED is attached to
9 int leg_WHT_BLK = 11; // the PWM pin the LED is attached to
10 int leg_BLU_BLK = 9; // the PWM pin the LED is attached to
11 int leg_BLK_WHT = 8; // the PWM pin the LED is attached to
12 int leg_RED_GRN = 7; // the PWM pin the LED is attached to
13 int leg_RED_ORN = 6; // the PWM pin the LED is attached to
14 int leg_BLU_RED = 5; // the PWM pin the LED is attached to
15 int leg_WHT_RED_BLK = 3; // the PWM pin the LED is attached to
16
17 int gnd_BLU_WHT = 25;
18 int gnd_RED_BLK = 27;
19 int gnd_ORN_GRN = 29;
20 int gnd_GRN = 31;
21 int gnd_WHT_RED = 33;
22
23 int i = 0;
24 int j = 1;
25
26 int packetNum;
27
28 byte SYNC[6] = {0xAA, 0x0D, 0x00, 0x00, 0x00, 0x00};
29 byte uCAMRx[6];
30 byte uCAMRx2[6];
31 byte uCAMRx3[512];
32 byte SDBuff[506];
33 byte ACK_SYNC[6] = {0xAA, 0x0E, 0x0D, 0x00, 0x00, 0x00};
34 byte INITIAL[6] = {0xAA, 0x01, 0x00, 0x07, 0x07, 0x07}; //Set image capture
to JPEG 640x480
35 byte ACK_INITIAL[6] = {0xAA, 0x0E, 0x01, 0x00, 0x00, 0x00};
36 byte PACKET[6] = {0xAA, 0x06, 0x08, 0x00, 0x02, 0x00}; //Set package size to
512 bytes
37 byte ACK_PACKET[6] = {0xAA, 0x0E, 0x06, 0x00, 0x00, 0x00};
Appendix A. Arduino Code 67
38 byte SNAPSHOT[6] = {0xAA, 0x05, 0x00, 0x00, 0x00, 0x00}; //Order camera to
hold JPEG in buffer
39 byte ACK_SNAPSHOT[6] = {0xAA, 0x0E, 0x05, 0x00, 0x00, 0x00};
40 byte GETPIC[6] = {0xAA, 0x04, 0x01, 0x00, 0x00, 0x00}; //Request snapshot
picture
41 byte ACK_GETPIC[6] = {0xAA, 0x0E, 0x04, 0x00, 0x00, 0x00};
42 byte DATA_GETPIC[6] = {0xAA, 0x0A, 0x01, 0x00, 0x00, 0x00};
43 byte ACK_ID[6] = {0xAA, 0x0E, 0x00, 0x00, 0x00, 0x00}; //First Package ID
44 byte ACK_ID2[6] = {0xAA, 0x0E, 0x00, 0x00, 0x01, 0x00}; //First Package ID
45 byte ACK_ID3[6] = {0xAA, 0x0E, 0x00, 0x00, 0x02, 0x00}; //First Package ID
46 byte ACK_ID4[6] = {0xAA, 0x0E, 0x00, 0x00, 0x03, 0x00}; //First Package ID
47
48 int CSpin = 53; //Chip Select pin.
49 File myFile;
50
51 //byte byte0;
52 //byte byte1;
53 //byte byte2;
54 //word imgSize;
55 //int numPack;
56
57 // the setup routine runs once when you press reset:
58 void setup()
59 {
60
61 // Open serial communications and wait for port to open:
62 Serial.begin(9600);
63 Serial3.begin(9600);
64
65 pinMode(leg_GRN_BLK, OUTPUT);
66 pinMode(leg_WHT_BLK, OUTPUT);
67 pinMode(leg_BLU_BLK, OUTPUT);
68 pinMode(leg_BLK_WHT, OUTPUT);
69 pinMode(leg_RED_GRN, OUTPUT);
70 pinMode(leg_RED_ORN, OUTPUT);
71 pinMode(leg_BLU_RED, OUTPUT);
72 pinMode(leg_WHT_RED_BLK, OUTPUT);
73
74 Serial.println("Goodnight moon!");
75
76 // set the data rate for the SoftwareSerial port
77 uCAMSerial.begin(9600);
78
79 pinMode(CSpin,OUTPUT);//Required by the SD library?
80 Serial.print("Initializing SD card...");
81
82 if (!SD.begin(4))
83 {
84 Serial.println("initialization failed!");
85 while (1);
86 }
87 Serial.println("initialization done.");
88 }
89
90 void callGround()
91 {
92 for(j = 1; j < 6; j++)
93 {
94 if(j == 1)
95 {
96 pinMode(gnd_BLU_WHT, OUTPUT);
97 digitalWrite(gnd_BLU_WHT, LOW);
98 Serial.println("j=1");
99 delay(1000);
100
101 callSNAPSHOT();
102 delay(1000);
103
104 packetNum = callGETPIC(); //NOTE: Camera will wait here till data is sent
105 callDATA(packetNum);
106 delay(1000);
107
108 pinMode(gnd_BLU_WHT, INPUT); //Turn off the light
109 }
Appendix A. Arduino Code 68
110 if(j == 2)
111 {
112 pinMode(gnd_RED_BLK, OUTPUT);
113 digitalWrite(gnd_RED_BLK, LOW);
114 Serial.println("j=2");
115 delay(1000);
116
117 callSNAPSHOT();
118 delay(1000);
119
120 packetNum = callGETPIC(); //NOTE: Camera will wait here till data is sent
121 callDATA(packetNum);
122 delay(1000);
123
124 pinMode(gnd_RED_BLK, INPUT); //Turn off the light
125 }
126 if(j == 3)
127 {
128 pinMode(gnd_ORN_GRN, OUTPUT);
129 digitalWrite(gnd_ORN_GRN, LOW);
130 Serial.println("j=3");
131 delay(1000);
132
133 callSNAPSHOT();
134 delay(1000);
135
136 packetNum = callGETPIC(); //NOTE: Camera will wait here till data is sent
137 callDATA(packetNum);
138 delay(1000);
139
140 pinMode(gnd_ORN_GRN, INPUT); //Turn off the light
141 }
142 if(j == 4)
143 {
144 pinMode(gnd_GRN, OUTPUT);
145 digitalWrite(gnd_GRN, LOW);
146 Serial.println("j=4");
147 delay(1000);
148
149 callSNAPSHOT();
150 delay(1000);
151
152 packetNum = callGETPIC(); //NOTE: Camera will wait here till data is sent
153 callDATA(packetNum);
154 delay(1000);
155
156 pinMode(gnd_GRN, INPUT); //Turn off the light
157 }
158 if(j == 5)
159 {
160 pinMode(gnd_WHT_RED, OUTPUT);
161 digitalWrite(gnd_WHT_RED, LOW);
162 Serial.println("j=5");
163 delay(1000);
164
165 callSNAPSHOT();
166 delay(1000);
167
168 packetNum = callGETPIC(); //NOTE: Camera will wait here till data is sent
169 callDATA(packetNum);
170 delay(1000);
171
172 pinMode(gnd_WHT_RED, INPUT); //Turn off the light
173 }
174 }
175 }
176
177 void printLOG(byte *a)
178 {
179 for(int i = 0; i < 6; i++)
180 {
181 Serial.print(a[i], HEX);
182 Serial.print(" ");
183 }
Appendix A. Arduino Code 69
184 }
185
186 void printLOG2(byte *a)
187 {
188 for(int i = 0; i < 512; i++)
189 {
190 Serial.print(a[i], HEX);
191 Serial.print(" ");
192 }
193 }
194
195 void fillSDBuff(byte *a)
196 {
197 for(int i = 0; i < 506; i++)
198 {
199 SDBuff[i]= a[i+4];
200 }
201 }
202
203 void clearSDBuff(byte *a)
204 {
205 for(int i = 0; i < 506; i++)
206 {
207 SDBuff[i]= 0;
208 }
209 }
210
211 void clearuCAMRx3(byte *a)
212 {
213 for(int i = 0; i < 512; i++)
214 {
215 uCAMRx3[i]= 0;
216 }
217 }
218
219 void printSDBuff(byte *a)
220 {
221 for(int i = 0; i < 506; i++)
222 {
223 Serial.print(a[i], HEX);
224 Serial.print(" ");
225 }
226 }
227
228 String generateFiles()
229 {
230 //derived from code found at http://forum.arduino.cc/index.php?topic=57460.0
231 String fileName = String();
232 String message = String();
233 unsigned int filenumber = 01;
234 while(!filenumber==0)
235 {
236 fileName = "file_";
237 fileName += filenumber;
238 fileName += ".txt";
239 message = fileName;
240 char charFileName[fileName.length() + 1];
241 fileName.toCharArray(charFileName, sizeof(charFileName));
242
243 if (SD.exists(charFileName))
244 {
245 message += " exists.";
246 filenumber++;
247 }
248 else
249 {
250 File dataFile = SD.open(charFileName, FILE_WRITE);
251 message += " created.";
252 dataFile.close();
253 filenumber = 0;
254 }
255 Serial.println(message);
256 }
257
Appendix A. Arduino Code 70
258 return fileName;
259 }
260
261 void saveSDBuff(byte *a, String fileName)
262 {
263 myFile = SD.open(fileName, FILE_WRITE);
264
265 // if the file opened okay, write to it:
266 if (myFile)
267 {
268 Serial.print("Writing to ");
269 Serial.print(fileName);
270 Serial.print("...");
271
272 for(int i = 0; i < 506; i++)
273 {
274 myFile.write(a[i]);
275 }
276 // close the file:
277 myFile.close();
278 Serial.println("done.");
279 } else
280 {
281 // if the file didn't open, print an error:
282 Serial.print("error opening ");
283 Serial.print(fileName);
284 Serial.println(".");
285 }
286 }
287
288 boolean array_cmp(byte *a, byte *b)
289 {
290 int n;
291
292 // test each element to be the same. if not, return false
293 for (n=0;n<6;n++)
294 {
295 if (a[n]!=b[n])
296 {
297 return false;
298 }
299 }
300
301 //ok, if we have not returned yet, they are equal :)
302 return true;
303 }
304
305 int callSYNC(int maxTry)//maxTry = 30 Begin synchronisation with camera Command 1
306 {
307
308 int tries;
309
310 for (tries = 1; tries < maxTry; tries++)
311 {
312 Serial.print("Sync atempt ");
313 Serial.print(tries);
314 Serial.print(".\n");
315 Serial.print("Ping with SYNC: ");
316 printLOG(SYNC);
317 Serial.print("\n");
318
319 Serial.print("Waiting for response ACK:");
320 printLOG(ACK_SYNC);
321 Serial.print("...\n");
322
323 Serial3.write(SYNC, 6);
324 Serial3.readBytes(uCAMRx, 6);
325
326 printLOG(uCAMRx);
327 Serial.print("...\n");
328
329 if(array_cmp(uCAMRx, ACK_SYNC)) //are the values equal
330 {
331 Serial3.readBytes(uCAMRx, 6);
Appendix A. Arduino Code 71
332 if(array_cmp(uCAMRx, SYNC)) //are the values equal
333 {
334 Serial3.write(ACK_SYNC, 6);
335
336 Serial.print("Success!\n");
337 printLOG(ACK_SYNC);
338 Serial.print("recieved.\n");
339 printLOG(uCAMRx);
340 Serial.print("recieved in ");
341 Serial.print(tries + 5);
342 Serial.print("ms.\n");
343
344 Serial.print("Ping with ACK: ");
345 printLOG(ACK_SYNC);
346 Serial.print(".\n");
347
348 Serial.print("Camera Ready!\n");
349
350 return tries; //Synchronisation Successful
351 }
352 }
353 else
354 {
355 Serial.print("Sync atempt failed. ");
356 printLOG(ACK_SYNC);
357 Serial.print("not recieved.\n");
358
359 delay(5 + tries); //pause between tries
360 }
361 }
362
363 return 0; //Synchronisation falied
364 }
365
366 int callWAKE() //Wake camera Command 0
367 {
368 Serial.print("Ping with SYNC: ");
369 printLOG(SYNC);
370 Serial.print("\n");
371
372 Serial.print("Waiting for response ACK:");
373 printLOG(ACK_SYNC);
374 Serial.print("...\n");
375
376 Serial3.write(SYNC, 6);
377 Serial3.readBytes(uCAMRx, 6);
378 printLOG(uCAMRx);
379 Serial.print("...\n");
380 Serial3.readBytes(uCAMRx, 6);
381 printLOG(uCAMRx);
382 Serial.print("...\n");
383
384 Serial3.write(ACK_SYNC, 6);
385 Serial.print("Reply ACK:");
386 printLOG(ACK_SYNC);
387 Serial.print("\n");
388
389 Serial.print("Ready!");
390 Serial.print("\n");
391
392 return 0;
393 }
394
395 int callINITIAL() //Set image capture to JPEG 640x480 Command 2
396 {
397 Serial.print("Ping with INITIAL: ");
398 printLOG(INITIAL);
399 Serial.print("\n");
400
401 Serial.print("Waiting for response ACK:");
402 printLOG(ACK_INITIAL);
403 Serial.print("...\n");
404
405 Serial3.write(INITIAL, 6);
Appendix A. Arduino Code 72
406 Serial3.readBytes(uCAMRx, 6);
407 printLOG(uCAMRx);
408 Serial.print("...\n");
409
410 Serial.print("Received ");
411 printLOG(ACK_INITIAL);
412 Serial.print(".\n");
413
414 Serial.print("Initialisation 640x480 JPEG Successful!");
415 Serial.print("\n");
416
417 return 0;
418 }
419
420 int callPACKET() //Set package size to 512 bytes Command 3
421 {
422 Serial.print("Ping with PACKET: ");
423 printLOG(PACKET);
424 Serial.print("\n");
425
426 Serial.print("Waiting for response ACK:");
427 printLOG(ACK_PACKET);
428 Serial.print("...\n");
429
430 Serial3.write(PACKET, 6);
431 Serial3.readBytes(uCAMRx, 6);
432 printLOG(uCAMRx);
433 Serial.print("...\n");
434
435 Serial.print("Received ");
436 printLOG(ACK_PACKET);
437 Serial.print(".\n");
438
439 Serial.print("Package size set to 512 Bytes Successful!");
440 Serial.print("\n");
441
442 return 0;
443 }
444
445 int callSNAPSHOT() //Order camera to hold JPEG in buffer Command 4
446 {
447 Serial.print("Ping with SNAPSHOT: ");
448 printLOG(SNAPSHOT);
449 Serial.print("\n");
450
451 Serial.print("Waiting for response ACK:");
452 printLOG(ACK_SNAPSHOT);
453 Serial.print("...\n");
454
455 Serial3.write(SNAPSHOT, 6);
456 Serial3.readBytes(uCAMRx, 6);
457 printLOG(uCAMRx);
458 Serial.print("...\n");
459
460 Serial.print("Received ");
461 printLOG(ACK_SNAPSHOT);
462 Serial.print(".\n");
463
464 Serial.print("JPEG held in buffer Successful!");
465 Serial.print("\n");
466
467 return 0;
468 }
469
470 int callGETPIC() //Request snapshot picture Command 4
471 {
472 unsigned long imgSize = 0;
473 unsigned long numPack = 0;
474 unsigned long byte0 = 0;
475 unsigned long byte1 = 0;
476 unsigned long byte2 = 0;
477
478 Serial.print("Ping with GETPIC: ");
479 printLOG(GETPIC);
Appendix A. Arduino Code 73
480 Serial.print("\n");
481
482 Serial.print("Waiting for response ACK:");
483 printLOG(ACK_GETPIC);
484 Serial.print("...\n");
485
486 Serial3.write(GETPIC, 6);
487 Serial3.readBytes(uCAMRx, 6);
488 printLOG(uCAMRx);
489 Serial.print("...\n");
490 Serial3.readBytes(uCAMRx, 6);
491
492 Serial.print("Received ");
493 printLOG(ACK_GETPIC);
494 Serial.print(".\n");
495
496 Serial.print("Snapshot requested Successful! Data to follow.");
497 Serial.print("\n");
498
499 Serial.print("DATA: ");
500 printLOG(uCAMRx);
501 Serial.print("...\n");
502
503 byte0 = uCAMRx[3]; //The last packet will have this many bytes
504 byte1 = uCAMRx[4];
505 byte2 = uCAMRx[5];
506
507 Serial.println(byte0);
508 Serial.println(byte1);
509 Serial.println(byte2);
510
511 if(byte2 == 1)
512 {
513 imgSize = byte0 + 256*byte1 + 65536;
514 }
515 else
516 {
517 imgSize = byte0 + 256*byte1;
518 }
519 Serial.println(imgSize);
520 numPack = imgSize/506;
521 Serial.println(numPack);
522
523 //if(byte0 > 0) //Rounding up
524 //{
525 numPack++;
526 Serial.println(numPack);
527 //}
528
529 return numPack;
530 }
531
532 int callDATA(int a) //Request snapshot picture Command 4
533 {
534
535 //myFile = SD.open("test.jpeg", FILE_WRITE);
536
537 String fileName = generateFiles();
538
539 int finVal = 0;
540
541 for(int i = 0; i < a; i++)
542 {
543 ACK_ID[4] = i;
544
545 Serial.print("Request packet ");
546 Serial.print(i);
547 Serial.print(" : ");
548 printLOG(ACK_ID);
549 Serial.print("\n");
550
551 Serial3.write(ACK_ID, 6); //Send first package ID
552 Serial3.readBytes(uCAMRx3, 512);
553 //printLOG2(uCAMRx3);
Appendix A. Arduino Code 74
554 Serial.print("\n");
555 fillSDBuff(uCAMRx3);
556 //printSDBuff(SDBuff); //Data to be written (packet without ID, Data
Size and Verify code)
557
558 //myFile.write(SDBuff, 506);
559 saveSDBuff(SDBuff, fileName);
560
561 Serial.print("\n");
562 clearSDBuff(SDBuff);
563 clearuCAMRx3(uCAMRx3);
564
565 finVal++; //Increment counter for final packet number
566 }
567
568 ACK_ID[4] = finVal;
569
570 Serial.print("Final marker ");
571 Serial.print(finVal);
572 Serial.print(" : ");
573 printLOG(ACK_ID);
574 Serial.print("\n");
575 Serial3.write(ACK_ID, 6); //Send terminating package ID
576
577 return 0;
578 }
579
580 void loop()
581 {
582 if(Serial.available()>0)
583 {
584 value = Serial.read();
585 delay(50);
586
587 if(value == '6')
588 {
589 for(i = 1; i < 9; i++)
590 {
591 if(i == 1)
592 {
593 analogWrite(leg_GRN_BLK, 50);
594 Serial.println("i=1");
595 callGround();
596 delay(1000);
597 digitalWrite(leg_GRN_BLK, LOW);
598 }
599 if(i == 2)
600 {
601 analogWrite(leg_WHT_BLK, 50);
602 Serial.println("i=2");
603 callGround();
604 delay(1000);
605 digitalWrite(leg_WHT_BLK, LOW);
606 }
607 if(i == 3)
608 {
609 analogWrite(leg_BLU_BLK, 50);
610 Serial.println("i=3");
611 callGround();
612 delay(1000);
613 digitalWrite(leg_BLU_BLK, LOW);
614 }
615 if(i == 4)
616 {
617 analogWrite(leg_BLK_WHT, 50);
618 Serial.println("i=4");
619 callGround();
620 delay(1000);
621 digitalWrite(leg_BLK_WHT, LOW);
622 }
623 if(i == 5)
624 {
625 analogWrite(leg_RED_GRN, 50);
Appendix A. Arduino Code 75
626 Serial.println("i=5");
627 callGround();
628 delay(1000);
629 digitalWrite(leg_RED_GRN, LOW);
630 }
631 if(i == 6)
632 {
633 analogWrite(leg_RED_ORN, 50);
634 Serial.println("i=6");
635 callGround();
636 delay(1000);
637 digitalWrite(leg_RED_ORN, LOW);
638 }
639 if(i == 7)
640 {
641 analogWrite(leg_BLU_RED, 50);
642 Serial.println("i=7");
643 callGround();
644 delay(1000);
645 digitalWrite(leg_BLU_RED, LOW);
646 }
647 if(i == 8)
648 {
649 analogWrite(leg_WHT_RED_BLK, 50);
650 Serial.println("i=8");
651 callGround();
652 delay(1000);
653 digitalWrite(leg_WHT_RED_BLK, LOW);
654 }
655 }
656 }
657 if (value == '1') //maxTry = 30 Begin synchronisation with camera Command 1
658 {
659 callSYNC(30);
660 }
661 if (value == '0') //Wake camera Command 0
662 {
663 callWAKE();
664 }
665 if (value == '2') //Set image capture to JPEG 640x480 Command 2
666 {
667 callINITIAL();
668 }
669 if (value == '3') //Set package size to 512 bytes Command 3
670 {
671 callPACKET();
672 }
673 if (value == '4') //Order camera to hold JPEG in buffer Command 4
674 {
675 callSNAPSHOT();
676 }
677 if (value == '5') //Request Snapshot picture Command 5
678 {
679 packetNum = callGETPIC(); //NOTE: Camera will wait here till data is sent
680 callDATA(packetNum);
681 }
682 if(value == '7') //Turn top circumf of lights on
683 {
684 analogWrite(leg_GRN_BLK, 30);
685 analogWrite(leg_WHT_BLK, 30);
686 analogWrite(leg_BLU_BLK, 30);
687 analogWrite(leg_BLK_WHT, 30);
688 analogWrite(leg_RED_GRN, 30);
689 analogWrite(leg_RED_ORN, 30);
690 analogWrite(leg_BLU_RED, 30);
691 analogWrite(leg_WHT_RED_BLK, 30);
692
693 pinMode(gnd_BLU_WHT, OUTPUT);
694 digitalWrite(gnd_BLU_WHT, LOW); //Turn on the lights
695
696 }
697 if(value == '8') //Turn top circumf of light off.
698 {
699 digitalWrite(leg_GRN_BLK, LOW);
Appendix A. Arduino Code 76
700 digitalWrite(leg_WHT_BLK, LOW);
701 digitalWrite(leg_BLU_BLK, LOW);
702 digitalWrite(leg_BLK_WHT, LOW);
703 digitalWrite(leg_RED_GRN, LOW);
704 digitalWrite(leg_RED_ORN, LOW);
705 digitalWrite(leg_BLU_RED, LOW);
706 digitalWrite(leg_WHT_RED_BLK, LOW);
707
708 pinMode(gnd_BLU_WHT, INPUT); //Turn off the lights
709 }
710 }
711 }
77
Appendix B
RTI Calibration
The position vectors of the light sources in the RTI array are necessary in order
to calculate the orthogonal normal for each pixel of the saliency reconstruction. The
calibration position vectors are unique to this particular RTI and is dependent on the
camera orientation, relative to the LED lighting sequence. The lighting sequence is
described in the Arduino code of Appendix A (lines 587 – 655). A visualisation of the
position vectors listed in Table B.1 is illustrated in Figure B.1. Each pivot point on
the surface illustrated in Figure B.1 represents the position of an LED in the RTI array.
Number of Images 40
x y z
-0.19269659 0.38683176 0.9017922
-0.27608934 0.66554254 0.6934175
-0.30739304 0.8486838 0.4304014
-0.3387415 0.92352325 0.17988603
-0.34606388 0.9314726 0.11224358
0.14804314 0.37764886 0.9140375
0.32460698 0.62399626 0.7108157
0.35484293 0.8035059 0.47797987
0.3928411 0.8924984 0.22163592
0.40281844 0.91474766 0.031209946
TABLE B.1: Calibration Data for RTI Array LED Position Vectors
Appendix B. RTI Calibration 78
0.37939978 0.13432392 0.9154304
0.65144646 0.23029669 0.7228976
0.8309564 0.3062681 0.46444735
0.92073506 0.3169897 0.22751807
0.94246477 0.32331076 0.085031
0.41595057 -0.25330895 0.8733955
0.62655354 -0.32982713 0.70614785
0.76346916 -0.39916432 0.5077231
0.8618827 -0.46884564 0.19324085
0.8707832 -0.47709772 0.11880401
0.07792439 -0.38232 0.9207384
0.178718 -0.61564785 0.7674878
0.2520881 -0.848508 0.46528032
0.28214908 -0.9287489 0.24045236
0.27755782 -0.95947915 0.04859466
-0.22412229 -0.3843872 0.8955533
-0.36014935 -0.6608621 0.658448
-0.429824 -0.82922983 0.35725236
-0.45232946 -0.8746341 0.1743939
-0.45364493 -0.8894815 0.05503568
-0.39949727 -0.087511204 0.91254795
-0.6879534 -0.2016659 0.69717354
-0.87947816 -0.28155154 0.3837277
-0.938435 -0.32217053 0.12468287
-0.9481228 -0.31253535 0.05817903
-0.44718313 0.18938163 0.8741635
-0.65133876 0.30712116 0.69385475
-0.81964505 0.37016344 0.43721962
-0.87370497 0.37434143 0.31065753
-0.9063811 0.38801134 0.16709456
Asdasd
Appendix B. RTI Calibration 79
asdasd
FIGURE B.1: Visualisation of Calibration Position Vectors
80
Appendix C
CNN MATLAB Code
The code used to implement the regression model CNN is presented. The code
is based off the MATLAB tutorial Convert Classification Network into Regression
Network. The implementation of the CNN uses transfer learning with the AlexNet as
the model neural network. The original CNN is modified from being a classification
model to a regression model by altering the last layers of the architecture. Image data
is stored and organised in preparation for training of the CNN. The image data is
augmented (resized) to match the input of the CNN. The training options for the new
CNN are configured (10 samples per iteration for 5 Epochs using adaptive moment
estimation solver) and the model is trained.
1 % %%%%%%%%%%%%%%%%%%%%%%%%%%%Create the CNN
2 % layers = [
3 % imageInputLayer([227 227 3],"Name","data")
4 % convolution2dLayer([11 11],96,"Name","conv1","BiasLearnRateFactor",2, ...
5 % "Stride",[4 4])
6 % reluLayer("Name","relu1")
7 % crossChannelNormalizationLayer(5,"Name","norm1","K",1)
8 % maxPooling2dLayer([3 3],"Name","pool1","Stride",[2 2])
9 % groupedConvolution2dLayer([5 5],128,2,"Name","conv2", ...
10 % "BiasLearnRateFactor",2,"Padding",[2 2 2 2])
11 % reluLayer("Name","relu2")
12 % crossChannelNormalizationLayer(5,"Name","norm2","K",1)
13 % maxPooling2dLayer([3 3],"Name","pool2","Stride",[2 2])
14 % convolution2dLayer([3 3],384,"Name","conv3","BiasLearnRateFactor",2, ...
15 % "Padding",[1 1 1 1])
16 % reluLayer("Name","relu3")
17 % groupedConvolution2dLayer([3 3],192,2,"Name","conv4", ...
18 % "BiasLearnRateFactor",2,"Padding",[1 1 1 1])
19 % reluLayer("Name","relu4")
20 % groupedConvolution2dLayer([3 3],128,2,"Name","conv5", ...
21 % "BiasLearnRateFactor",2,"Padding",[1 1 1 1])
22 % reluLayer("Name","relu5")
23 % maxPooling2dLayer([3 3],"Name","pool5","Stride",[2 2])
24 % fullyConnectedLayer(4096,"Name","fc6","BiasLearnRateFactor",2)
25 % reluLayer("Name","relu6")
26 % dropoutLayer(0.5,"Name","drop6")
27 % fullyConnectedLayer(4096,"Name","fc7","BiasLearnRateFactor",2)
Appendix C. CNN MATLAB Code 81
28 % reluLayer("Name","relu7")
29 % dropoutLayer(0.5,"Name","drop7")
30 % fullyConnectedLayer(1,"Name","fc","BiasLearnRateFactor",10, ...
31 % "WeightLearnRateFactor",10)
32 % regressionLayer("Name","regressionoutput")];
33
34 %%%%%%%%%%%%%%%%%%%%%%%%%%Freeze wieghts of initial layers
35 %layers(1:22) = freezeWeights(layers(1:22));
36
37 %%%%%%%%%%%%%%%%%%%%%%%%%%Plot the layers
38 %plot(layerGraph(layers));
39
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%Load pre-trained network
41 net = alexnet;
42
43 %%%%%%%%%%%%%%%%%%%%%%%%%%%Read in the data
44 imds = imageDatastore('Data_set_regression_no_black_big_range', ...
45 'IncludeSubfolders',true,'LabelSource','foldernames');
46
47 %%%%%%%%%%%%%%%%%%%%%%%%%%%Convert categorical labels to double
48 [g,gN] = grp2idx(imds.Labels);
49 gN(g);
50 ydouble = str2num(cell2mat(gN(g)));
51 imds.Labels = ydouble/10000;
52
53 %Splits data randomly into two subset image data stores
54 n = numpartitions(imds);
55 indices = randperm(n);
56 st = round(0.7 * n);
57 imdsTrain = subset(imds, indices(1:st));
58 imdsValidation = subset (imds, indices(st+1:n));
59
60 %%%%%%%%%%%%%%%%%%%%%%%%%%%Remake Training Data to Table of aumented images
61 % Define the image files as cell arrays
62 filename = [imdsTrain.Files];
63 % Define the target values
64 value = [imdsTrain.Labels];
65 % Create a table data
66 tbl = table(filename, value);
67 % Data Augmentation (Resize Images)
68 augimdsTrain = augmentedImageDatastore([227,227, 3],tbl);
69
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%Remake Validation Data to Table of aumented images
71 % Define the image files as cell arrays
72 filename = [imdsValidation.Files];
73 % Define the target values
74 value = [imdsValidation.Labels];
75 % Create a table data
76 tbl = table(filename, value);
77 % Data Augmentation (Resize Images)
78 augimdsValidation = augmentedImageDatastore([227,227, 3],tbl);
79
80 %%%%%%%%%%%%%%%%%%%%%%%%%%%Display 4 sample training images with ground
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%truth values
82 idx = randperm(numel(imdsTrain.Files),4);
83 figure
84 for i = 1:numel(idx)
85 subplot(2,2,i)
86 %I = readimage(imdsTrain,idx(i));
87 [I, info] = readimage(imdsTrain,idx(i));
88 imshow(I)
89 %label = imfinfo(imdsTrain,idx(i));
90 %title(string(label) + ", " + num2str(100*max(probs(idx(i),:)),3) + "%");
91 title("Measured Leakage Current: " + string(info.Label) + " mA");
92 end
93
94 %%%%%%%%%%%%%%%%%%%%%%%%%%Specify training options
95 miniBatchSize = 10;
96 valFrequency = floor(numel(imdsTrain.Files)/miniBatchSize);
97 options = trainingOptions('adam', ...
98 'MiniBatchSize',miniBatchSize, ...
99 'MaxEpochs',5, ...
100 'InitialLearnRate',3e-4, ...
101 'Shuffle','every-epoch', ...
Appendix C. CNN MATLAB Code 82
102 'ValidationData', augimdsValidation, ...
103 'ValidationFrequency',valFrequency, ...
104 'Verbose',false, ...
105 'Plots','training-progress');
106
107 % options = trainingOptions('adam',...
108 % 'InitialLearnRate',0.001, ...
109 % 'ValidationData', augimdsValidation,...
110 % 'Plots','training-progress',...
111 % 'Verbose',false);
112
113
114
115
116 %%%%%%%%%%%%%%%%%%%%%%%%%%%Train network
117 trainedNet = trainNetwork(augimdsTrain, layers_1, options);
118
119 %%%%%%%%%%%%%%%%%%%%%%%%%%%Test performance of network by evaluating
120 %%%%%%%%%%%%%%%%%%%%%%%%%%%accuracy on validation data
121 YPred = predict(trainedNet, augimdsValidation);
122 %accuracy = mean(YPred == imdsValidation.Labels)
123
124 %%%%%%%%%%%%%%%%%%%%%%%%%%%Calculate prediction error between prdeicted
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%leakage current and actual leakage current
126 predictionError = imdsValidation.Labels - YPred;
127
128 %%%%%%%%%%%%%%%%%%%%%%%%%%%Set threshold to 0.5mA and calculate number of
129 %%%%%%%%%%%%%%%%%%%%%%%%%%%predictions within threshold
130 thr = 0.5;
131 numCorrect = sum(abs(predictionError) < thr);
132 numImagesValidation = numel(imdsValidation.Labels);
133
134 accuracy = numCorrect/numImagesValidation
135
136 %%%%%%%%%%%%%%%%%%%%%%%%%%%Use RMSE to measure difference between predicted
137 %%%%%%%%%%%%%%%%%%%%%%%%%%%and actual leakage current
138 rmse = sqrt(mean(predictionError.^2))
139
140 %%%%%%%%%%%%%%%%%%%%%%%%%%%Display four sample validation images with predicted
141 %%%%%%%%%%%%%%%%%%%%%%%%%%%labels and predicted probabilities.
142 idx = randperm(numel(imdsValidation.Files),4);
143 figure
144 for i = 1:4
145 subplot(2,2,i)
146 I = readimage(imdsValidation,idx(i));
147 [I, info] = readimage(imdsValidation,idx(i));
148 imshow(I)
149 label = YPred(idx(i));
150 title("Measured Leakage Current: " + string(info.Label) + " mA" + ...
151 newline + "Predicted Leakage Current: " + string(label) + " mA");
152 end
83
Appendix D
Laboratory Trials Data
The results obtained in the laboratory trials, where ESDD and leakage current
are measured, are presented. The value of leakage current is derived from a
measurement of voltage over a known resistance. ESDD is calculated from the
conductivity, volume, and temperature of the resultant solution used to wash the
artificially polluted bushing. Values in Table D.1 that were obtained through
measurement are shaded in blue. All other values arise from calculation (or are
constants in calculations). The equations and constants used to calculate the ESDD
are described in Chapter 3.5 – Conventional Measurement of ESDD and NSDD.
Values that are used in Table 5.1 are double-bordered in Table D.1.
Appendix D. Laboratory Trials Data 84
asd TABLE D.1: Measured and Calculated Laboratory Data
85
Appendix E
Regression CNN Training
The training progress graphs for two iterations of the implemented regression
CNN are presented. It is important to organise the training data for neural networks
to learn on, such that it does not cause any skew in the prediction model. Figure E.1
illustrates the training progress on all the image data, including black images.
Figure E.2 illustrates the training progress on image data excluding images with a file
size smaller than 10 kB.
Appendix E. Regression CNN Training 86
asda
FIG
UR
E E
.1:
Tra
inin
g P
rog
ress
of
Mo
dif
ied
Ale
xNet
Reg
ress
ion
CN
N o
n a
ll I
mag
e D
ata
Appendix E. Regression CNN Training 87
asdasd
FIG
UR
E E
.2:
Tra
inin
g P
rog
ress
of
Mo
dif
ied
Ale
xNet
Reg
ress
ion
CN
N o
n I
mag
e D
ata
Larg
er
than
10
kB