I

advertisement
Machinery Diagnostics and Characterization
Through Electrical Sensing
by
William Joseph Cotta
Submitted to the Department of Mechanical Engineering
in partial fulfillment of the requirements for the degree of
Master of Science in Mechanical Engineering
I
LU
<0)
at the
MASSACHUSETTS INSTITUTE OF TECHNOLOGY
June 2015
@2015 Massachusetts Institute of Technology, All Rights Reserved.
Signature redacted
Author ............
of M echanical..........
Department of Mechanical Engineering
Signature redacted
/10
...............
Steven B. Leeb
Professor
)
Certified by
May 18, 2015
Certified by....
Sign tur''
red
Thesis
Supervisor
..................
~-4-othn Donnal
Doctoral Candidate
Z11
Certified by..Signature
redacted
)
Thesis Supervisor
Peter Lindahl
P9 1st Doctoral Associate
Supervisor
redacted 7esis
Signature
..................
Accepted by
David Hardt
Chairman, Department Committee on Graduate Students
<
2
Machinery Diagnostics and Characterization Through
Electrical Sensing
by
William Joseph Cotta
Submitted to the Department of Mechanical Engineering
on May 18, 2015, in partial fulfillment of the
requirements for the degree of
Master of Science in Mechanical Engineering
Abstract
Two methods of non intrusive sensing and their applications for machinery condition
monitoring, energy score keeping, and human activity are presented here. The first
method uses existing research on Non Intrusive Load Monitoring (NILM) to refine
transient detection methods using image classification techniques. Additionally building on the NilmDB framework, a new framework, TransientDB, is proposed which
collects and stores information about detected transients for use in machine learning
algorithms. Finally the military and civilian applications of NILM developed from
multiple field tests are presented. The second method presented determines the health
of machinery resilient mounts using vibration and voltage sensing, this method was
developed using a multiple lab experiments, and it's utility is demonstrated in field
testing on US Navy ships.
Thesis Supervisor: Steven B. Leeb
Title: Professor
Thesis Supervisor: John Donnal
Title: Doctoral Candidate
Thesis Supervisor: Peter Lindahl
Title: Post Doctoral Associate
3
4
Acknowledgments
Thank you to all of the groups that made this research possible through their collaboration and financial support: The United States Coast Guard, The US Navy Office
of Naval Research, The Grainger Foundation, and the Kuwait-MIT Program. Thank
you to my fellow graduate students, Ryan Zachar, Mark Gillman, Joshua Nation,
Jin Moon, Arthur Chang, and John Donnal for their helpful feedback throughout
the research process. Thank you to Peter Lindahl, our resident post doctoral associate, your technical expertise served as a constant litmus test for various crazy ideas,
helping us develop them into the analysis presented here. I am especially grateful
for the amazing technical expertise of John Donnal and Jim Paris who created the
platform on which much of this research was conducted. To the many Army, Navy,
and Coast Guard installations who collaborated in this thesis, your flexibility and
encouragement is extremely appreciated. The soldiers, sailors, and civilian personnel's knowledge and professionalism were constantly impressive and made our trips
an outstanding success. I am especially grateful for the help of Carlon Brietzke, as
my former supervisor, and now research collaborator, I cannot begin to describe the
value of the leadership lessons and technical expertise you have provided me.
Thank you to the great facilities staff of Cottage Street School. The expertise
of Scott Schertz and Ken Wertz have enabled us to collect over a years worth of
electrical measurements from their school. Thank you to the staff of the Base Camp
Integration Lab at Fort Devens, particularly Bill Singleton and Jesse James, who's
constant support and technical expertise were instrumental in developing the methods
presented here, and opening doors to other Army installations. This has been one of
the longest and most successful installations of our monitoring system.
Thank you to my family and friends who allowed me to endless talk about electrical monitoring and vibration analysis , and my roommates who endured somewhat
frequent interruptions of power, and who were willing participants is various energy
monitoring experiments. Thank you most of all to my parents and sister, who have
provided constant support and encouragement.
5
THIS PAGE INTENTIONALLY LEFT BLANK
6
Contents
Non-Intrusive Sensing. . . . . . . . . . . . . . . . . . . . . . . . . .
18
1.2
Vibration M onitoring . . . . . . . . . . . . . . . . . . . . . . . . . .
18
1.2.1
19
.
.
1.1
. . . . . . . . . . .
.
Non-Intrusive Load Monitoring (NILM)
Continuous Vibration Monitoring Theory
23
Derivation of Transfer Function ..............
. . . . . . . . .
24
2.2
Constructing a VTF
. . . . . . . . . . . . . . . . .
. . . . . . . . .
27
2.2.1
Time Frequency Analysis . . . . . . . . . . .
. . . . . . . . .
27
2.2.2
Voltage Preprocessing from Back EMF Data
. . . . . . . . .
28
2.2.3
Hilbert Transform Speed Extraction . . . . .
. . . . . . . . .
28
2.2.4
Zero Crossing Frequency Extraction . . . . .
. . . . . . . . .
31
2.2.5
Virtual Input . . . . . . . . . . . . . . . . .
. . . . . . . . .
32
2.2.6
Hanning Window Masked Inputs and Outputs . . . . . . . . .
34
2.2.7
Vibration Transfer Function Estimation
.
.
.
.
.
.
2.1
.
. .
. . . . . . . . .
NILM Detection and Identification
3.2
. . . . . . . . . . . . . . .
41
3.1.1
Edge Detection and Thresholding
. . . . . . . . . . . . . . .
41
3.1.2
Peak Detection . . . . . . . . .
. . . . . . . . . . . . . . .
44
. . . . . . . . . .
. . . . . . . . . . . . . . .
47
3.2.1
Data Acquistion . . . . . . . . .
. . . . . . . . . . . . . . .
48
3.2.2
K-means Clustering . . . . . . .
. . . . . . . . . . . . . . .
50
.
Bounded Transient Detection Method
.
3.1
36
41
Transient Clustering
.
3
17
.
2
Introduction
.
1
7
NILM Applications
Joint Readiness TrIaining Center, Fort Polk, LA . . . . . . .
55
4.1.2
Base Camp Integration Lab, Fort Devens, MA . . . . . . . .
56
4.1.3
USCGC Spencer, Boston, MA . . . . . . . . .
.
57
4.1.4
Cottage Street School, Sharon, MA . ..
.
58
. . . . . . . . .
58
.
Energy and Resource Monitoring
..
.
.
.
4.1.1
Electrical Monitoring.....
58
4.2.2
Natural Gas Monitoring . .
61
4.2.3
Water Use Monitoring
. . .
64
.
4.2.1
Human Activity Monitoring.....
4.3.1
65
Crew Fatigue Management on CGC Spencer
65
Condition Based Maintenance . . .
69
.
4.4.1
Fort Polk Warring ECU's
.
. . . . . . . . . .
69
4.4.2
ECU Faults . . . . . . . . .
. . . . . . . . . .
70
.
4.4
55
.
4.3
.................................
.
4.2
Test Sites .......
.
4.1
51
55
.
4
Fuzzy Logic . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
3.2.3
5 Transient Database Framework
73
Introduction . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
73
5.2
Django . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
74
5.3
Interaction with NILM Manager
. . . . . . . . . . . . . . . . . . . .
74
5.4
Models . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
75
. . . .
. . . . . . . . . . . . . . . . . . . .
76
. .
76
76
79
NILM
5.4.2
Transient
.
. . . . . . . . . . . . . . . . . . . .
5.4.3
ClusterObj
.
.
. . . . . . . . . . . . . . . . . . . .
5.4.4
ClusterCenter
. . . . . . . . . . . . . . . . . . . .
5.4.5
TransientGroup
. . . . . . . . . . . . . . . . . . . .
80
5.4.6
KnownTransient
. . . . . . . . . . . . . . . . . . . .
80
5.4.7
OnOffCycle
. . . . . . . . . . . . . . . . . . . .
81
5.4.8
IDDTransient
. . . . . . . . . . . . . . . . . . . .
81
.
.
5.4.1
.
.
.
.
5.1
8
.
"-WA
.11 -
.
81
83
84
5.5.1
Setting Up the TransientDB . . . . . . .
84
5.5.2
Collect Transients . . . . . . . . . . . . .
85
5.5.3
Identify Known Transients . . . . . . . .
87
5.5.4
Clustering and Identification of Transients
89
5.5.5
Upload IDDTransients to NilmDB . . . .
91
.
.
.
.
.
. . . . . . . . . . .
TransientDB Demonstration on USCGC Spencer.
91
Vibration Tests and Results
97
6.1
Hardware used for Speed and Vibration Data Collection
97
6.2
Lab Motor Tests
102
6.2.1
Steady State Tests . . . . . .
105
6.2.2
Spin-down Tests . . . . . . . .
109
6.3
Lab Generator Tests . . . . . . . . .
114
6.4
Fort Devens Generators
. . . . . . .
119
6.5
MCM Tests . . . . . . . . . . . . . .
123
6.5.1
MCM Generator Results . . .
125
6.5.2
MCM ASW Pump Results . .
128
.
.
.
.
.
.
.
. . . . . . . . . . .
.
6
. . . . . . . .
_
Transient Identification using K-Means
Clustering and Fuzzy Logic
5.6
" --
M achine . . . . . . . . . . . . . . . . . .
5.4.10 TransientGroupSimilarity
5.5
I
.
5.4.9
.141W
A Vibration Transfer Function Code
9
131
THIS PAGE INTENTIONALLY LEFT BLANK
10
-.
111,
"I'll,1.
1 11
-,-
6k*
1.
,
List of Figures
Sample NILM location on power distribution grid . . . . . . .
. . .
20
1-2
Example of the extracted envelope of real power . . . . . . . .
. . .
22
2-1
Free Body Diagram of Eccentric Mass Vibrator
. . . . . . . .
. . .
25
2-2
Preprocessing Voltage Sensors . . . . . . . . . . . . . . . . . .
. . .
29
2-3
Extracting Envelope of 5Hz Signal using the Hilbert Transform. . . .
31
2-4
Extracting Envelope of Motor Spindown
. . . . . . . . . . . .
. . .
32
2-5
Clipped Sensor Voltage with Zero Crossings Marked . . . . . .
. . .
33
2-6
Comparison of Voltage Sensor Spectrogram and Extracted Speed Curve 33
2-7
Comparison of Normalized Speed Envelope to Virtual Input
2-8
M asked Input . . . . . . . . . . . . . . . . . . . . . .
36
2-9
Masked Output . . . . . . . . . . . . . . . . . . . . .
37
2-10 Hanning Windows and Masked Inputs and Outputs .
37
.
.
.
.
.
.
1-1
. . .
.
.
.
.
.
34
2-11 Fast Fourier Transform of Masked Inputs and Masked Outputs with
39
2-12 Estimated Vibration Transfer Function . . . . . . . .
39
3-1
Edge detection windows
42
3-2
Fan turning on with convolution with first and second derivatives of
.
.
Envelopes . . . . . . . . . . . . . . . . . . . . . . . .
.
. . . . . . . . . . . . . . . .
43
3-3
Fan Transient on with threshold and transient bounds
44
3-4
Fan Transient on with threshold and transient bounds
45
3-5
Transient Detection Algorithm Flow Chart . . . . . .
46
.
.
.
edge detection windows . . . . . . . . . . . . . . . . .
.
1."
11
3-6
K Means Clustering of Delta Change of 4000 Transients with 20 Cluster
C enters
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
3-7
System cycling and off transient occurring simultaneously.
. . . . . .
53
4-1
Unnamed training FOB on Fort Polk . . . . . . . . . . . . . . . . . .
56
4-2
USCGC Spencer responding to Hurricane Sandy in New York City. .
57
4-3
Daily Power Consumption from Fort Polk
. . . . . . . . . . . . . . .
60
4-4
Heater runs at Fort Polk Forward Operating Base . . . . . . . . . . .
61
4-5
Cottage Elementary School Virtual Sub-Metering Comparison . . . .
63
4-6
Machinery runs and ship operations 0500-1200 . . . . . . . . . . . . .
67
4-7
Machinery runs and ship operations 1200-1800 . . . . . . . . . . . . .
68
4-8
Heater and Air Conditioner repeatedly cycling to maintain thermostat
temperature.. . . . . . . .. . . . . ..
4-9
. . . ..
. . . . . . . . . . . . .
69
Fort Polk ECU AC mode off transients for a (a) healthy ECU and (b)
broken ECU. The increased "noise" in (b) as compared to (a) is due to
additional active loads. . . . . . . . . . . . . . . . . . . . . . . . . . .
70
5-1
TransientDB Models UML diagram . . . . . . . . . . . . . . . . . . .
77
5-2
NILM Installation on engine room ventilation fan control panel, labeled
sensors. .......
5-3
....
..
. .
.. . .......
..
92
..........
NILM Installation on engine room ventilation fan control panel.
. . .
93
5-4 Fan turning on is fast mode, first harmonic of real power of A phase
93
5-5
Fan turning off is fast mode, first harmonic of real power of A phase
94
5-6
Fan turning on is slow mode, first harmonic of real power of A phase
94
5-7
Fan turning off is slow mode, first harmonic of real power of A phase
94
6-1
V IB -P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
98
6-2
Accelerometer and Mounting Block . . . . . . . . . . . . . . . . . . .
99
6-3
Back EMF Zero Cross and Encoder Speeds . . . . . . . . . . . . . . .
100
6-4
Back EMF Sensor Schematic . . . . . . . . . . . . . . . . . . . . . . .
101
6-5
Back EM F Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . .
101
12
Motor Mount Test Platform . . . . . . . . . . . . . . .
102
6-7
Vibration Reducing Mounts used with MMTP . . . . .
103
6-8
Original MMTP with Multiple Subbases . . . . . . . .
.
106
6-9
MMTP with Single Subbase Steady State RMS Response
107
.
.
6-6
108
6-11 Steady State Frequency Response Function . . . . . . .
109
6-12 Steady State FRFs for 10 MMTP Configurations . . . .
110
.
. . . . . . . . . . . . . .
.
.
6-10 FFT at Individual Frequency
.
6-13 VTFs from 10 MMTP Configurations . . . . . . . . . .
..... 111
6-14 Steady State FRF vs. Spin-Down VTF for D60 Imbalanced Configuration 112
6-15 Mounting Method Comparison for D30 Imbalanced FRFs . . . . . . . 113
6-16 Comparison of VTFs for Different Sensor Orientations on MMTP
. .
114
. . . . . . . . . . . . . . . 115
6-18 Day 1 of Testing on Lab Generators . . .
. . . . . . . . . . . . . . . 116
6-19 Day 2 of Testing on Lab Generators . . .
. . . . . . . . . . . . . . . 117
6-20 Impact of Sensor Axis on FRFs . . . . .
. . . . . . . . . . . . . . . 118
.
.
.
6-17 Sensor Mounting on Lab Generators
6-21 Fully Instrumented Generator at Fort Deve is
. . . . . . . . . . . . .
119
. . . . . . . . . . . . . . . 120
6-23 Devens Generators Spin-down FRFs . . .
. . . . . . . . . . . . . . .
121
6-24 Impact of Loosening 8 Bolts on MMTP .
. . . . . . . . . . . . . . .
122
6-25 USS CHAMPION (MCM 4) . . . . . . .
. . . . . . . . . . . . . . .
123
. . . . . . . . .
. . . . . . . . . . . . . . .
124
6-27 MCM Vibration Transfer Functions . . .
. . . . . . . . . . . . . . .
126
6-28 Detailed MCM Vibration Transfer Function Resonances . . . . . . . .
127
6-29 Impact of Placing Vibration Sensor on Top of Generator
. . . . . . .
128
. . . . . . . . . . . . . . .
129
.
6-26 SSDGs on CHAMPION
.
.
.
.
.
6-22 Sensor Placement on Devens Generator .
. . . . . . . . . . . .
.
6-30 MCM ASW Pump
6-31 Results of 8 Spin-Downs of MCM ASW Pu mps
13
. . . . . . . . . . . .
130
THIS PAGE INTENTIONALLY LEFT BLANK
14
NILM model attributes and descriptions. . . . . .
. . .
76
5.2
Transient model attributes and descriptions.....
. . .
78
5.3
ClusterObj model attributes and descriptions.
. . .
79
5.4
ClusterCenter model attributes and descriptions.
. . .
79
5.5
Transient Group model attributes and descriptions.
. . .
80
5.6
KnownTransient model attributes and descriptions
5.7
OnOffCycle model attributes and descriptions . .
. . .
82
5.8
IDDTransient model attributes and descriptions .
. . .
82
5.9
Machine model attributes and descriptions . . . .
. . .
83
5.10 Machine model attributes and descriptions . . . .
. . .
84
.
.
5.1
.
List of Tables
.
.
.
.
81
. . . . . .
85
.
. . . . .
.
; 11 Inputs to the initializeVariables function
5.12 Additional inputs to the initializeVariables( function for known tran.
sien ts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . .
87
Estimated Resonant Frequencies . . . . . . . . . . . . . . . . .
104
6.2
Predicted and Actual Resonant Frequencies and Magnitudes .
... 111
.
.
6.1
15
THIS PAGE INTENTIONALLY LEFT BLANK
16
I - , _W64aWA1 4. _
_ , -
-
11 11
I
11
1
1 11 1 111 11, 1 1
- 1-11
"1 1~ ..1. 7
.. "
11
' -
-
U& I I -
Chapter 1
Introduction
Non-intrusive sensing has great potential to provide accurate energy usage data, identify human activity, and provide essential data for condition based maintenance. Each
one of these three applications are unified in their goal of reducing energy consumption, and reducing costs. This thesis presents two methods of non-intrusive sensing,
the first method uses electrical sensors, and the second uses voltage and vibration
sensors. The first method, Non-Intrusive Load Monitoring (NILM) tracks electrical
loads turning on and off, and targets all three goals. The second method strongly
targets condition based maintenance, in analyzing mount condition using voltage and
acceleration sensors. In the first chapters the theory behind the methods is presented,
and in the later chapters, the results of field tests on multiple military and civilian
installations are explained.
Energy security is a significant issue in the United States, and new technologies
to reduce consumption, and increase efficiency are necessary to solve this problem.
According to the US Energy Information Administration the United States generated 334,851,000 MWh in February 2015 [3]. As a residential consumer, I received
information on my part of that consumption in a two page bill in March 2015. With
advanced smart watches and cell phones which allow for the tracking of every step
a user takes, and every place they visit, it is almost unbelievable that as a energy
consumer I only receive monthly updates. Smart meters can provide much more frequent power information, and as seen in [11], and are an integral part of the future of
17
the power distribution grid. Smart meters only go so far though, Non-Intrusive Load
Monitoring (NILM) provides the modern data driven insights into power consumption
users have come to expect in other aspects of their lives.
1.1
Non-Intrusive Sensing
Non-Intrusive sensing attempts to provide information that current techniques may
provide, but in a less expensive and more easily installable format. Two main cases
are presented in this thesis, electrical and vibration sensing. The electrical sensing
presented in this thesis builds on decades of research beginning with George Hart's
idea for NonIntrusive Appliance Load Monitoring (NALM) in [15].
This idea has
been expanded beyond appliances and is now more commonly known as Non-Intrusive
Load Monitoring (NILM). The focus of this thesis is the real world applications of
current NILM research and the field testing of systems that leverage the low cost of
powerful embedded systems. The second item presented here is vibration monitoring.
Vibration analysis of mechanical systems is a mature field, building on Newtonian
mechanics this thesis presents a novel way to characterize time variant signals by
combining electrical and vibration sensors in a low cost, easily installed module.
1.2
Vibration Monitoring
Vibration analysis is widely used to determine the condition of machinery. As seen
in [16] continuous vibration monitoring systems which draw power from the loads
they are monitoring are being developed for Navy and Coast Guard applications.
This thesis continues the research in [23] in attempting to develop a computationally
efficient method for analyzing time varying vibration signals. The continuous wavelet
transform is widely used in analyzing vibration signals, as seen in [22], but this
method is complex and requires significant computational power to run. Using non
contact voltage sensors developed in [9], the method presented here attempts to reduce
computational complexity, by monitoring the speed through voltage sensors. This
18
eliminates any uncertainty in the speed of the motor at an given time, thus allowing
analysis to be conducted using less complex algorithms such as the one presented in
[12].
1.2.1
Non-Intrusive Load Monitoring (NILM)
A NILM attempts to monitor a single or multiple, and in some cases multiple can
refer to hundreds, of electrical loads to provide the user feedback on the state of the
loads. The state of an electrical load can be simple or complex depending on the
load. In the simplest case, imagine a light bulb connected to a switch, if the switch is
closed the light is on and if open the light is off. More complex loads include variable
frequency drives which allow a motor to be turned at a range of speeds, for these
loads a more sophisticated definition of the state of the load is required. Additionally
a single load such as a space heater with both a fan and heating element can have
multiple component parts which each present a unique electrical signature. The goal
of a NILM is to monitor the state of each machine downstream of the sensors. A
sample electrical distribution network with the loads monitored by the NILM is seen
in Fig. 1-1. There has been significant development in transient detection methods
and monitoring techniques since NILM was first proposed in 1986, including [24, 18].
This thesis builds on image processing techniques, and uses a preprocessing algorithm
developed in [20].
Using only current and voltage sensors NILM attempts to identify all electrical
transients.
Generally there are two approaches to NILM, using low sample rate
data and complex mathematical models to estimate the state of machines, or using
high sample rate data and more intuitive models to estimate the state of machines.
Attempts have been made to develop low cost low sample rate data, with varying
success. Using high sample rate data typically requires more expensive sensors and
data acquisition units. The methods presented in this thesis use high sample rate data,
typically at 8 kHz. The raw current and voltage data acquired is in the form of a sine
wave, which can be difficult for conducting analysis. Instead analysis is conducted
on the extracted envelope of power as determined using the Sinefit Spectral Envelope
19
Figure 1-1: Sample NILM location on power distribution grid
Preprocessor, as seen in [20]. High bandwidth sensing generates large amounts of
data, to manage these datasets in a organized and accessible format NilmDB and
NILM Manager are used. NilmDB and NILM Manager developed by Jim Paris and
John Donnal provide a rapidly deployable framework for managing large data sets
associated with NILM. NilmDB is a time series database that enables users to easily
view data.
Sinefit Spectral Envelope Preprocessor
The analysis methods presented in this thesis utilize current and voltage data that
has been preprocessed utilizing the Sinefit Spectral Envelope Preprocessor presented
in [20]. The Sinefit Spectral Envelope Preprocessor, henceforth referred to as sinefit, extracts harmonic information, and reduces the high sample rate raw data to
approximately 50-60Hz data depending on the line frequency.
20
A full explanation of the implementation of the sinefit algorithm can be found
in [20], but a short explanation is restated here. The sinefit algorithm attempts to
find the harmonic coefficients of the observed data over a single period of current and
voltage signals. The equations for harmonic coefficients are seen in Eqn. 1.1 and 1.2
where
f,
is the sample rate, fo is the zero crossing frequency which is equal to the
line frequency, and N = L, i[n] is the input signal. The multiple of the line frequency
is k, where k =1 for 60 Hz.
2N-1
ak =
2r
N Ei[n] x sin(k( N
n=o
bk =
2 N-127
(1.2)
i[n] x cos(k( N
N
n=O
The implementation of the sinefit algorithm relies on the Discrete Fourier Transform (DFT) seen in Eqn. 1.3. The individual coefficients are computed using Euler's
formula seen in Eqn. 1.4, the results can be seen in Eqns. 1.5 and 1.6.
N-i
Xk
=
F(x[n]) = E x[n]
* e-jk
2
,rr7/N
(1.3)
n==O
e-"' = cos(wt) - jsin(wt)
ak =
2
N imag( Xk)
bk = -real(Xk)
N
(1.4)
(1.5)
(1.6)
Real and reactive power for each harmonic are calculated by multiplying the harmonic
coefficients for voltage and current as seen in Eqn. 1.7. This is repeated for k values
of 1, 3, 5 and 7.
P1 = avi x ail, Q, = bvl x bi
21
(1.7)
1 A (Amps)
U PolkiPlA (Watts)
7500
50
25
2500
0
0 .
V
-25
-25"0
-50
2014 Mar 07 23:46.09
Figure 1-2: Example of the extracted envelope of real power
Assuming voltage remains constant the power should be proportional to the current. An example of current and the extracted spectral envelope of the first harmonic
of real power and the current it was derived from is shown if Fig. 1-2.
Electrical Signature
There are three components that make up the electrical signature of a load turning
on and off. When an electrical loads turn on the voltage is maintained at the utility
voltage (120 Vac in most United States homes) by the electrical supplier, and the
current increases in order to provide the power for. the new electrical load. By measuring current and voltage both real (the power actually consumed by a load) and
reactive (the power transmitted due to phase lag between the current and voltage)
can be computed. If an electric load is nonlinear it can cause harmonic distortion in
the current which then causes harmonic distortion in the voltage, when connected to
a power distribution grid. By tracking the change in both real power, reactive power,
and the harmonic distortion in the signal, as a electrical load turns on and off these
three metrics can be used to characterize an electric load. The combined attributes
of each component are the unique electrical signature for the load.
22
Chapter 2
Continuous Vibration Monitoring
Theory
This chapter was co-written with Ryan Zachar.
Most vibrations measurements are taken at steady state. A sensor is typically attached to a machine via a mounting stud or a magnet for a certain period of time.
Tools such as spectral densities and spectrograms can give vibration levels over a
frequency band, which can be used to perform diagnostic tests. Frequency response
functions (FRFs) offer a more complete picture of a system, and are commonly used
to determine the natural resonance and damping characteristics of a system as well as
the noise transfer paths. Frequency response can be measured in several ways, however two common methods are excitation with an impulse hammer or with a shaker
[5]. In its most basic form, a FRF is a representative of the response of the system,
in this case vibration, to certain frequencies. For rotating machines, an alternative
to these methods exists which requires no excitation force. Every time the machine
spins up or spins down it passes every frequency between 0 and it's operating speed.
The machine becomes it's own network analyzer just by going through its normal
start up and shut down routine. Since the machine is sweeping through an entire
frequency band it will resonate at a certain frequency, or rotor speed, corresponding
to its natural frequency.
23
This research project of vibration sensing during machinery spin-down is an extension of the work originally performed by Chirs Schantz [23]. Vibration measurements
need only be taken during the period the machine is spinning down, and if rotor speed
is known the measurements can be used to create an estimated Frequency Response
Function (FRF). The estimated FRF, hereafter referred to as a Vibration Transfer
Function (VTF), can be used to compare machinery spin-downs to known baselines,
allowing the condition of the machine and its associated hardware to be tracked every
time the machine shuts down. This amounts to near continuous monitoring, since
it does not require human interaction to conduct the test and and the equipment
is always in place on the machine. Ideally the baseline would come right after an
overhaul, when the equipment is known to be in good health. There are two major
trends which can be observed from a VTF. First, as the mounts degrade and their
hardness changes, the resonant peak will shift in frequency. Second, as an imbalance
develops in the rotor the magnitude of the resonant peak will increase, with little to
no shift in the frequency.
2.1
Derivation of Transfer Function
A motor on resilient mounts can be though of as an eccentric mass vibrator connected
to a baseplate by a spring and damper, as shown in Fig. 2-1. The spinning motor
generates a force which is counteracted by the resilient mount. The equation of motion
for a spring mass damper is
mzm(t) + ci.m(t) + kxm(t) = ymrw 2 cos(Wt)
(2.1)
where m is the mass of the motor, Xm(t) is the position of the motor, c is the damping,
k is the spring constant, and pmrw 2 cos(wt) is equal to the force generated by the
spinning motor, Fe(t).
If Eqn. 2.1 is rewritten with acceleration substituted for position, the new equation
r" - -
'-
-MFPPT-
-
-
-
,
-
24
Eccentric Mass Vibrator
w(t)
X(t)
m
k
C
Baseplate
Figure 2-1: Free Body Diagram of Eccentric Mass Vibrator
of motion is
mam(t) + cI
a(t)dt + k
am(t)dt = Fe(t)
(2.2)
where am(t) is the acceleration of the motor. The equation of motion can be transformed into the Laplace domain as
c
k
S
s
Am(s)(m + - +
2)
Fe
(2.3)
where s is used as a Laplace variable, and Am(s) is the Laplace transform of acceleration from Eqn. 2.2. Rearranging variables results in the transfer function from force
imparted on the motor due to the motor spinning, F, to the acceleration which it
causes, Am. This transfer function is
Am
Fe
2(2.4)
ms 2 + cs + k
The damping ratio can be defined as
C
cc
=(2.5)
where c, = 2vk-m. C is observed to be less than .1 for mechanical systems, thus c can
be ignored when operating speeds are away from resonance. At a motor's operating
25
speed, the magnitude of the force transmitted through the mounts to the baseplate
is primarily through the spring and follows Hooke's law,
F = k -x(t)
(2.6)
where k is the spring constant, and x(t) is the amplitude of the position at operating
speed, w, at time t. Position can be replaced by acceleration by using the second
derivative
x(t) = xo + vo(t) + Am(W) )cos(Wt)
(2.7)
x(t) = Am(w)cos(wt)
(2.8)
a(t) = x"(t) = -w 2 Am(w)cos(wt)
(2.9)
a(t) = -x(t)w
x
2
(2.10)
= a(t)
(2.11)
assuming 0 for initial position and velocity (xO = 0 and vo = 0). The force transmitted, F, is harmonic, and for diagnostic purposes the magnitude is the interesting
metric. If k is replaced by mw2, then
jFt =
mw Am
2
(2.12)
where
Am = |a(t)| = max measured acceleration
(2.13)
If the force transmitted through the spring is measured once, it is possible to
estimate the force transmitted compared to a known measurement as the spring
constant changes, which can be caused by a change in mount condition. Estimating
the force transmitted relies on the assumption that the mass of the motor is not
changing, and uses the methods presented in the following sections to calculate the
natural frequency, wn. By measuring the magnitude of the acceleration of the motor at
26
-91111
- 111", , ",
1" . 1.11111
.,
'I WwRw mp,
, I,
, ,
I'll 1111
11
11
operating speed, the change in force transmitted through the mounts can be estimated
using
jFt'j _ JAmW2
|F
|Am~W!
(2.14)
where the variables with prime superscripts indicate current or predicted conditions
and variables without superscripts indicate a baseline. Using this method requires a
reliable baseline condition for all future measurements to be compared to. Continuous vibration monitoring does not attempt to fully characterize a system; instead the
goal is to detect changes in the frequency response, and most importantly the natural
frequency. The following sections demonstrate how a machine can be monitored by
tracking changes in natural frequency using only a single voltage sensor and an accelerometer. The resonant frequency can be calculated using time frequency analysis
of the spin-down period of a machine, which permits the calculation of the change in
force transmitted to the baseplate.
2.2
2.2.1
Constructing a VTF
Time Frequency Analysis
Rotating electrical machines provide a unique opportunity for time frequency analysis of vibrations, since it is possible to measure the rotational speed driving the
motor. The speed of an AC induction machine can be determined through voltage
measurements and knowledge of the pole pairs of the machine. In DC motors, the
speed is directly proportional to the voltage. The method used here for estimating
the transfer function of rotational speed to mount vibration is based on the method
presented by E. Feron et al in [12]. The authors attempt to understand aeroelastic
behavior in an F/A-18 research aircraft by generating a known input vibration in the
wingtips. The modified procedure for evaluation is:
1. Perform the time-frequency analysis of both system inputs and outputs.
2. For each frequency of interest, remove the parts of the output that have not
27
been excited by the input.
3. Obtain estimates of the frequency response using the clean time-frequency representations of the signals.
As outlined in
123], transfer
function estimation through spin down analysis can be
susceptible to noise from other pieces of machinery rotating in the same space. This
method attempts to reduce uncorrelated noise by ignoring vibrations outside the area
corresponding to a windowed input.
2.2.2
Voltage Preprocessing from Back EMF Data
The method begins with 3 raw data streams; 2 voltage and 1 acceleration. The first
step is to extract the speed from a back EMF sensor, which returns 2 voltage streams
obtained through non-contact sensors on the phase lines of a motor or generator as
it spins down. Noise from the environment and other phase lines is inherent in noncontact sensing, and the 2 sensors may have differing voltages as well as background
waveforms which need to be reconciled in order to produce the machine's true voltage.
A polynomial fit of 1 sensor to the other when the machine is off and the voltage is
known to be zero is calculated. The difference between the first sensor and the new
fitted data stream is the true voltage. A more detailed explanation of the non contact
voltage sensor can be found in Chapter 6.
An example voltage plot for the start-up and spin-down of a generator can be seen
in Fig. 2-2a. Zooming in to the area where the machine is off, as shown in Fig. 2-2b,
offers an example of the voltage sensor fitting. Even though the machine is off there
are still 60 Hz waveforms in the raw data, however if the two streams are subtracted
the resulting plot is zero when the machine is off, and an accurate voltage from the
machine when it is on or spinning down.
2.2.3
Hilbert Transform Speed Extraction
A Hilbert transform can be used to extract the spectral envelope of the voltage waveform [16]. Once a motor is disconnected from its power supply, the rotor will continue
28
Back EMF Sensor Readings
AliiEMF1
0.25
0.2
0.15
0.1
0.05
0
0
-0.05
-0.1
-0.15
-0.2
-0.25
-
-
I
100
95
90
85
80
Time (sec)
(a) Voltage Sensor from Start up and Spin Down of 3 Phase Induction Motor
Back EMF Sensor Readings
0.25
-_EMF1
__EMF2
Fitted EMF1
-Difference
0.2[
0.15
0.1
0.05
CM
0
0
-0.05
-0.1
-0. 15
-0.2
64.64
64.65
64.66
64.67
64.69
64.68
Time (sec)
64.7
64.71
(b) Voltage Sensor Fitting
Figure 2-2: Preprocessing Voltage Sensors
29
64.72
64.73
spinning due to the moment of inertia, generating voltage in the stator. The amplitude of the voltage in the stator has a linear relationship to the speed as shown by
V - kmotor
(2.15)
P
where V is the voltage sensor output, P is the number of pole pairs in the motor, W
is the motor speed in Hz, and kmotor is a calibration constant.
A detailed description of using the Hilbert transform to extract a spectral envelope
is given in [16], a summary is provided here. Assuming that the useful content of a
signal appears at the frequency we, and the amplitude of that useful information, A(t),
is assumed to be changing slowly compared to w, so as to be constant, the envelope
can be extracted. In the following example, shown in Fig. 2-3, the enveloping signal
is at 5Hz with an amplitude of 1, yet it is corrupted with 60Hz noise. The signal is
given as
x(t) = sin(5t)
(2.16)
To extract the envelope, an analytic signal is considered,
z(t)
=
A(t)x(wet) + jH(A(t)x(wet))
where t is the time. It is known that H(sin(t))
Hilbert transform, making the analytic signal z(t)
=
(2.17)
-cos(t), where H indicates the
sin(5t) -jcos(5t). If Euler's rela-
tion is used to convert the trigonometric functions to a complex exponential function,
then
z(t) = A(t)ej 5t
(2.18)
Finally, the extracted envelope of the signal is magnitude of the real and imaginary
components of z(t) at any time t,
lz(t)l = JA(t)j
(2.19)
The results for extracting the envelope of the 5Hz signal are seen in Fig. 2-3. An
30
Comparing Signal to Envelope of 5Hz Component of Signal
0.80.60.4-0.2
E
-0.4
-0.6-
Signal sin(5t)*sin(60t)
-0.8- -
Real component of z(t)
Imaginary Component of z(t)
Envelope of 5Hz signal
-1
0
I
I
I
I
0.2
0.4
0.6
0.8
I
1.2
1
Time (Seconds)
I
I
I
1.4
1.6
1.8
2
Figure 2-3: Extracting Envelope of 5Hz Signal using the Hilbert Transform
example of the extracted voltage envelope of a motor spin down is shown in Fig. 2-4.
This envelope can be easily converted to speed in Hz with Eqn. 2.15, using the known
speed at the start to calculate kmoto-.
2.2.4
Zero Crossing Frequency Extraction
In some cases the Hilbert transform is ineffective at extracting speed due to clipping
in the sensor output. Clipping occurs when the voltage exceeds the maximum voltage
the sensor is able to read. The speed, however, is still recoverable by calculating the
frequency of the voltage signal through zero crossings. An example of clipped sensor
output can be seen in Fig. 2-5, with zero crossings marked with red circles. Zero
crossings were estimated through linear interpolation of points on either side of the
zero crossing. The frequency is then determined by taking the inverse of the time
difference between zero crossings. The speed is fitted with an exponential decay to
ensure a smooth speed curve, and verify that the data conforms to the well established
31
Envelope Extraction Using Hilbert Transform
0.2
-
Electric Frequency
Envelope
0.15
0.1
0.05
IllllHIilllllllm
41)
0
3 -0.05
IIIIIIIHH~lllilllllll
-0.1
-0.15
51
52
53
54
55
56
Time (sec)
57
58
59
60
61
Figure 2-4: Extracting Envelope of Motor Spindown
system equation of motion given as
w(t)
Ae-'/7
-
where t = 0 is the start of the spin down,
T
(2.20)
is the moment of inertia divided by the
viscous friction constant, w(t) is the shaft speed of the motor, and A is the operating
speed of the motor. To confirm the validity of the method, the extracted speed curve
is compared to the spectrogram of the voltage sensor in Fig. 2-6.
2.2.5
Virtual Input
The method presented in this section models an electric motor or generator mounted
on resilient mounts as a single degree of freedom spring mass damper with an eccentric
mass vibration, as shown in Fig. 2-1. The equation which governs the motion of the
mass, Eqn. 2.1, is equivalent to single degree of freedom spring mass damper system
experiencing forced vibration, where Fe(t) = pmrw 2 cos(wt). Using extracted speed
and acceleration, the input force and output response are observed can be used to
32
Clipped Sensor Difference With Zero Crossings Marked
-V
oltage Sensors Difference
0 Zero Crossings
8
6
4
2
0
cc
0)
-2
-4
-6
-8
-10
I
I
I
I
0.5
0.52
0.54
0.56
I
I
0.6
0.58
Time (sec)
I
I
1
1
0.62
0.64
0.66
0.68
Figure 2-5: Clipped Sensor Voltage with Zero Crossings Marked
Estimated SDeed ComDare to Spectroaram
-60
N
r
04O
C
U-
20
0
N
2
0
4
6
8
10
Time (sec)
12
14
16
-Fitted
60
20
18
Speed
)'40
U-
0
-I
-
20
0
2
4
6
8
10
Time (sec)
12
14
16
18
20
Figure 2-6: Comparison of Voltage Sensor Spectrogram and Extracted Speed Curve
33
Virtual Input
1.5-
Amplitude Envelope
___Virtual Input
Normalized Speed Envelope
1 I
0.5
0
-0.5
-1.5
0
1
2
3
4
I
6
5
I
7
I
8
1
9
1
10
Time (sec)
Figure 2-7: Comparison of Normalized Speed Envelope to Virtual Input
produce a VTF. In order to create the VTF a virtual signal of the speed envelope
squared is created; this is called the virtual input. According to Eqn. 2.1, the force
generated by the eccentric mass is proportional to speed squared, therefore the original
speed envelope must be squared so that it is proportional to input force. The equation
for the virtual input is
Wvirtual(t) =-2
W(t = 0)2
Cos
t 27r((t)d
( J0
(2.21)
where Wvirtuai is the virtual input and w is the speed at time t. An example of a virtual
input can be seen in Fig. 2-7, with the corresponding speed envelope the virtual input
was derived from. The virtual input provides a clean input signal for Fourier analysis.
2.2.6
Hanning Window Masked Inputs and Outputs
As a motor spins down it acts a frequency sweep, probing all the frequencies from
the operating speed to 0 for resonances. The voltage sensor measures the time varying electric frequency, known as the chirp, generated by the electromagnetic forces
34
-
t-
ik. .
- ................
-WAWMA"
-
-
pushed back through the voltage connectors. Fourier analysis excels at steady state
analysis, however a fundamental problem of using the Fourier Transform for a chirp
is that though the transform is reversible, it is impossible to know at a given time
what the frequency spectrum looks like. Instead, the Fourier Transform provides
the frequency spectrum for the entire window of time. Using a Short Time Fourier
Transform (STFT) can provide small windows which can be analyzed. This allows
for the frequency spectrum to be calculated at smaller windows, and a time frequency
representation of the signal to be created.
A Hanning window is used to mask the input and output of the system in order to
minimize vibration information from adjacent frequencies. The input to the system is
the virtual input described previously, and the output is the acceleration measurement
in g. The center of the window is the frequency of interest, and the width of the
Hanning window is bounded by two parameters, the Nyquist Frequency and the
Rayleigh Frequency. The Nyquist Frequency sets the upper bound for frequencies
which can be observed at half of the sample frequency. The Rayleigh Frequency sets
the lower bound for frequencies which can be observed based on the size of the window
in time. The Rayleigh frequency is equal to
, where T is the length of the time
window. For example, the lowest frequency observable in a 1 second time window is
1 Hz, and the lowest frequency observable in a 0.5 second time window is 2 Hz. The
size of the Hanning window is determined by
n.= f.
where
f,
TW
(2.22)
is the sample frequency. The Hanning window size equation contains the
tunable parameters T for time window length in seconds. The spacing of Hanning
windows is also important, and determined by a tunable overlap parameter, on, which
specifies the overlap between time windows, where 1 is equal to 100% overlap and 0 is
0% overlap. The Hanning windows are then convolved with the inputs and outputs.
As an example, the results of the first Hanning Window convolution for the first
0.25 seconds of the spin down for the input and output are shown in Figs. 2-8 and
35
Virtual Input and Hanning Window
0
-0.5
0
0.5
1
1.5
2
2.5
3
2
2.5
3
Masked Input
0.5
0
-0.5
-1
0
0.5
1
1.5
Time (seconds)
Figure 2-8: Masked Input
Fig. 2-9, respectively. Each Hanning window provides a frequency spectrum for a
known period of time; by using Fourier analysis on each window a time frequency
representation of the motor spin down can be calculated. The Hanning windows as
well as the masked inputs and outputs are shown in Fig. 2-10. For clarity only every
tenth window is shown.
2.2.7
Vibration Transfer Function Estimation
The VTF is calculated by taking the STFT of the masked inputs and outputs. STFT
utilizes the standard Fourier Transform, but allows for Time-Frequency Analysis by
dividing the signal into time windows. Each window is analyzed, providing the estimated response at each frequency in the window. A motor spin-down has an input,
the speed of the motor which is proportional to the force imparted, and an output, the
acceleration of the motor caused by the force from the motor rotating. By dividing
the STFT of the output signal by the STFT of the input signal, the response at each
frequency can be identified. In order to accurately use the STFT in analyzing the
signals, the system must be in steady state or quasi steady state. Since the system
36
Acceleration and Hanning Window
2
1
0
-1
-
-1
I
II
-2
0.5
)
,,I
I
I
3
2.5
2
1.5
1
Masked Output
2
-
-
1
n
H
1 -'lw~v
-
-1
-I
1
0.5
0
2
1.5
3
2.5
-
-2
Time (seconds)
Figure 2-9: Masked Output
Hanning Window Masks
1.
-
0.5
0 1-
0
1
2
3
5
4
Masked input
6
7
8
9
1
2
3
5
4
Masked Output
6
7
8
9
I
I
I
I
5
6
7
8
1
0
0
2
0
I
-20
1
2
3
4
Figure 2-10: Hanning Windows and Masked Inputs and Outputs
37
9
can only have frequencies in the output which exist in the input, the only frequency
content in the output considered valid and not noise is the frequency .content where
the input is non-zero.
Because there is a lag in the acceleration of the motor in
response to speed as the motor spins down, it is not actually in quasi steady state.
To account for this and still allow the method to be used, the STFTs of the
outputs and inputs for each window are calculated. An envelope of all output STFTs
and all input STFTs in calculated, and divided to produce a VTF. The Fast Fourier
Transform (FFT) of a masked input and output are shown in Fig. 2-11. The dashed
lines show the envelope of all of the FFTs of the masked inputs and outputs. Using
these envelopes, the VTF in Fig. 2-12, in blue, is calculated by dividing the output
envelope by the input envelope. With this step, the constraints of a single degree of
freedom are still used, and only frequencies which have been excited can exist. This
method accounts for lag as the motor spins down, allowing any frequency content in
the output that has been excited to be considered valid. If the motor was assumed
to be in pure quasi steady state, and only the straight FFTs of the full output and
input were calculated and divided, then lag would cause extreme values known to be
false, as shown by the orange curve in Fig. 2-12.
38
FFTs of Masked Input and Outputs
Window Input FFT
-Single
Window Output FFT
-Single
Max Envelope Input
Max Envelope Output
600-
500
400
-
C0300
200-
-
100
N
00
~
~N
---
60
50
40
30
20
10
Frequency (Hz)
Figure 2-11: Fast Fourier Transform of Masked Inputs and Masked Outputs with
Envelopes
Compare Vibration Transfer Function to Straight FFT Division
1
0
I
1
1
1
1
1
35
40
45
50
55
-Windowed
STFT (Vibration Transfer Function)
-Straight
FFT
-10-
-0-20
(D
-E
U -30C
0
-40 --
-50-
-50
5
10
15
20
25
30
Frequency (Hz)
Figure 2-12: Estimated Vibration Transfer Function
39
60
THIS PAGE INTENTIONALLY LEFT BLANK
40
.....
1 i
Chapter 3
NILM Detection and Identification
3.1
Bounded Transient Detection Method
The effectiveness of transient detection methods are extremely dependent on the
sample rate at which data is being acquired, with higher sampler rates providing
more accurate results. The method presented here utilizes high sample rates of 2kHz
to 8kHz.
The first step of detecting a transient involves taking raw current and
voltage readings and determining whether either changed. In most cases the voltage
will never remain almost constant at whatever level the power generation provides.
Any significant change due to an electrical load being turned on or off will be visible
in the magnitude of the current.
3.1.1
Edge Detection and Thresholding
The Bounded Transient Detection method leverages research developed for image
classification to identify edges in the sinefit data. The method presented in [6], commonly referred to as the Canny Edge Detector describes how a the first derivative
of a window function convolved with a signal can be used to extract an edge from a
noisy signal.
The most basic example of a Canny Edge Detector uses the first derivative of
a triangular window seen in Fig 3-la. Using the convolution integral in equation
41
"O-_W-9_.M__
-
,
.... . ..
.
3.1. The window is convolved across the entire dataset. One of the main benefits
of this edge detection method is that the output of the convolution is zero except
for transients regardless of the magnitude of the steady state power consumption.
This makes the computationally intensive process of checking data for transients
significantly easier by narrowing the search area for transients. The results of the
convolution between the power data and the edge detection window are seen in Fig
3-2a. The location of the transient is easily visible and as described earlier the output
of the edge detector goes to zero when the fan reaches steady state.
(f + g)(t)
=
T)dT
f (T)g(t -
I
(3.1)
t
Gaussian Window
0.8
0.8
0.60.4-
0.6
0.4
0.2
0.2
-
1.0
-
flangular Window
1.0-
0.0
0.0
First Derivative of Trangular Window
0.04
First Derivative of Gaussian Window
0.10
-
0.03
0.02
0.05
001
0.00
0.00
-0.05
0
10
20
30
40
50
60
70
-
-0.01-002
-0.03
-0.04
-0.101a
0
80
(a) Triangular window and first derivative
of triangular window.
10
20
30
40
50
60
70
80
(b) Gaussian window and first derivative
of gaussian window.
Figure 3-1: Edge detection windows
As Canny showed a triangular window is not the most efficient edge detector, as
it contains a noisy signal which makes determining the exact location of the edge
difficult. Therefore the Gaussian window and the first derivative of the window are
used, and shown in 3-1b. The results of a convolution with the first derivative of the
Gaussian window and the same power data shown previously are seen in Fig 3-2b.
The transient shown in Fig 3-2b presents an interesting problem. The transient
shows an inductive load which has a large inrush current creating a massive power
spike for a short period of time which quickly goes away as the motor reaches steady
state. Low sample rate data on the order of minutes or even seconds between samples
42
Fan 7fansient On
.
14000
Power
Pnwer Convolved with First Derivative
of wiangular Window
Power Convolved with Second Derivative
of Tiangular Window
12000-
10000-
-
8000
8000-
4000-
2000
-
--
---
0-2000 - -
-
-
- -
400 0
--
0.5
1
1.5
Time (s)
(a) Fan transient on convolved with first derivative of triangular window
Fan
15000
Wansient On
Power
Power Convolved with First Derivative
of Gaussian Window
Power Convolved with Second Derivative
of Gaussian Window
-
10000-
5000
---
-IOC ---5000
-100001
0051
1
00.5
1.5
Time (s)
(b) Fan transient on convolved with first derivative of gaussian window
Figure 3-2: Fan turning on with convolution with first and second derivatives of edge
detection windows
would miss this large spike, but using an 8kHz sample rate this spike in power is clearly
visible. Additionally this spike creates two edges, both of which are easily detectable
using the Canny Edge Detector. Instead of trying to combine these two, the edges
are treated as separate events. The events shown here are the inrush current as the
motor spins up and the motor settling to steady state. In detecting transients many
43
methods attempt to group these together, but for our purposes they are considered
two discrete events, one positive transient and one negative transient.
The next step in detecting a transient is peak detection. By applying a threshold
to the output of the edge detector, the search area for transients is narrowed to areas
in the data where adjacent data points are all above the threshold. The transient
detector presented here classifies transients as positive or negative, referring to the
change in power that is detected. This enables the detection and discretization of
two transients that occur very rapidly. In the case of the fan turning on in Fig 3-3
the transparent cyan band centered around zero designates the threshold, which for
this example has been set to 500 watts.
Fan Trensient On
15000
Power
-
Power Convolved with First Derivative
of Tianguler Window
Power Convolved with Second Derivative
of Wiangular Window
--
10000o
5000-
0
-5000-
-10000
0
1
0.5
1.5
'ime (s)
Figure 3-3: Fan Transient on with threshold and transient bounds
3.1.2
Peak Detection
Peaks are easily detected by finding the zero crossing of the second derivative of the
Gaussian window convolved with the data stream. Zero crossings are determined by
finding the two values where the output of the convolution of the data stream and
second derivative switches signs. The peak is then determined to be the closest of the
two values. Knowing the location of the peaks is important, but high precision peak
44
detection is computationally expensive, and provides little increase in the accuracy
of detecting transients. Eliminating the need for accurate peak and zero crossing detection great improves the speed of the transient detector by reducing computational
complexity. Attempts at accurately detecting peaks utilizing the continuous wavelet
transform developed in [101 typically took 50 to 200 times longer than roughly estimating peaks and zero crossings, with marginal increases in accuracy of the peaks,
and no change in the accuracy of the bounds of the transient.
The peak is then used to determine the left and right boundaries of a transient.
The edge detection methods used here were originally developed for image processing.
In image processing it is ideal to designate a single point as the location of an edge,
but for signals in the time domain this is not necessarily true. The length of time it
takes for a transient to occur can be used as an additional metric in the identification
and classification of an electrical transient. Additionally, the data used to classify a
transient is the difference between the start and end of a transient. Therefore merely
detecting an edge is insufficient, instead the extreme values (maximum and minimum)
of the data must also be collected.
The following algorithm is used to determine the bounds of the transients. This
only works for positive values. To overcome this, first and second derivatives of the
System Cycling
-
10000
8000
-Power
Power
Power Convolved with First Derivative
of Gaussian Window
Convolved with Second Derivative
6000
I4000
2000
-4000
- - -00.5
--
- --
1
lime (s)
-
- - -
-
-- -
-
-2000
1.52
Figure 3-4: Fan Transient on with threshold and transient bounds
45
NilmDB power data
Convolve Power Data
-ywith 1 st Derivative ofGasinWdw
Gaussian Window
Use one Phase of
the 7First Harmonic of
Real Power Data/
/Convolved
Data
User Defined
Threshold
Group Points above
Threshold together
--o
Find left bound
where power falls
below threshold
kj
Yes, left bound
found.
Left Bound
Isthe derivative of
Convolved Data zero?.
.
For each group
find the peak
over
until zero
crossing is found.
Left bound is zero
crossing
No, iterate
data
Yes,. right bound
found.
Find right bound
where power falls
below threshold
Isthe derivative of
Convolved Data zero?
f
ight Bound
No, iterate over data
until zero crossing is
found. Right bound is
P. zero crossing
Output left and
right bound
Figure 3-5: Transient Detection Algorithm Flow Chart
46
convolution with data are multiplied by negative one to reverse their signs. In Fig.
3-3 the red circle indicates the beginning of the positive transient and the green
circle indicates the end of the transient. The blue circle indicates the beginning of
the negative transient, and the black circle indicates the end of the transient. The
algorithm accurately detects the boundaries of both transients without overlapping.
The use of the second derivative of the convolution allows the bounds to be pushed
to the edge of the transient without overlapping them. Additionally where there is
not a large value for the second derivative the algorithm merely uses the edge of the
threshold preventing interference from noise.
In tuning the parameters of the transient detector to the systems being monitored,
the threshold can be set at a value of the user's choosing, or set based on the observed
signal to noise ratio of the specific installation.
3.2
Transient Clustering
In machine learning there are two different types of learning based on available data,
supervised and unsupervised learning. The key difference between the two is supervised learning provides labeled data which is used to train a machine learning model,
and unsupervised learning provides no such data. Machine Learning has many applications from image processing to classifying music and picking the next song in a
users playlist. The methods presented in this thesis are heavily adapted from image
processing techniques, but there is a fundamental difference between image processing
and electrical transients, in that images are a two dimensional grid of different color
values, and for video this grid changes in time.
Electrical data is typically presented as two orthogonal dimensions of real power
and reactive power that change in time. The hard part of using image processing
techniques in electrical transient analysis is the fact that there are only two data
points at any given time for an electrical signal, whereas an image can have hundreds
or even millions of pixels to analyze. Using the Sinefit Spectral Envelope Preprocessor
presented in [20], the two dimensions of real and reactive power can be broken out into
47
the different harmonics, providing additional data to distinguish electrical transients.
Additionally with multiphase power systems there is additional information on each
phase, which provides an independent piece to analyze. A common method to analyze
data with two orthogonal dimensions is through clustering. The method presented
here uses clustering techniques commonly used for two dimensional data, and adapts
them to account for the high dimensionality of the data acquired from NILMs.
3.2.1
Data Acquistion
The first step in analyzing electrical data is first finding the areas of interest, which
in the case of machines and devices consuming electricity is the transients on and off.
The transients are detected using the Bounded Transient Detection method described
in 3.1. Once a transient is identified three different metrics are used to define the
transient: the change in power from the beginning of the transient to when the
machine or device reaches steady state, the maximum peak difference in power, and
the minimum peak difference in power.
The purpose of using a Bounded Transient Detection method that defines a start
and end time to a transient is to acquire the delta change in power. Transient data
is defined as the data between the left and right time bounds of a transient. The
transient data is separated into three areas: the pre-transient window, post-transient
window, and the transient window. The pre-transient window is used to find the offset
of the transient from zero. All characteristics of a transient are calculate relative to
the pre-transient window.
Delta Power Change
The delta power change is the difference between the median of the pre-transient
window and the post-transient window as shown in Eqn. 3.2. The variables in Eqn.
3.2 are: PA which is the change in power, ro the median of the post-transient window,
and
z2)
the median of the pre-transient window.
48
(3.2)
PA = XO - i2
The delta power is calculate for real and reactive power of all harmonics provided
to the filter in the NILM Manager interface.
Maximum Peak Power Change
The maximum peak power change, also referred to the as the peak high, is the
difference between the maximum value of the transient window and the median value
of the pre-transient window as shown in Eqn. 3.3. The variables in Eqn. 3.3 are:
Pmax the maximum change in power, max(xi) the maximum value of the transient
window, and
zo
the median of the pre-transient window.
Pmax = max(xi)
(3.3)
-
Minimum Peak Power Change
The minimum peak power change, also referred to as the peak low, is the difference
between the maximum value of the transient window and the median value of the pretransient window as shown in 3.4. The variables in Eqn. 3.4 are: Pmin the minimum
change in power, min(xi) the minimum value of the transient window, and Vo the
median of pre-transient window.
Pmjn = min(x1)
-
o
(3.4)
These three parameters are collected and stored for every phase and harmonic on
real and reactive power the user provides as an input to the filter.
49
3.2.2
K-means Clustering
Once transients are processed and the defining characteristics of delta power, maximum peak power, and minimum peak power are calculated and stored the transients
must be compared to each other to find trends which can then be used to identify individual electrical loads. The algorithm used for comparing transients is the K-Means
Clustering algorithm. The K-means clustering algorithm was originally developed in
Bell Labs by Stuart Lloyd for Pulse-Code modulation, and published in [19]. The
algorithm is a parametric method that is applied to the two dimensional space, also
referred to as the Euclidean plane. The algorithm takes an initial condition of k cluster centers and randomly places them in the two dimensional plane. The algorithm
is a two step process in which data points are first assigned to the nearest cluster by
minimizing the Euclidean distance between the cluster center and the data point. The
equation for Euclidean distance is show in Eqn. 3.6, where m is the cluster center, x
is the data point, and d(m, x) is the Euclidean distance between cluster center and
data point x.
k(n)
IX(n))}
(3.5)
(m(k) - x(k))2
(3.6)
= argmin{d(m(k
n
d(m(k), x(n))
=
The second step of the algorithm is to move the cluster centers so that the center
is located at the centroid of the data points assigned to that cluster center. The
equation for the centroid of a set of m data points is given in Eqn. 3.7.
m(k)
=
(k n
k)X(n)
k
R(k)
R(k) --
(n)
(3.7)
(3.8)
An example of K-means clustering output for 4000 observed transients and k=20
50
.
.
. ..
cluster centers is shown in Fig. 3-6. The black circles indicate the cluster centers and
the red circles indicate the observed transients. The outlying red circles are large
transients which occur infrequently. The large cluster can indicate similar transients,
or a very frequently occurring transient. Systems cycling on and off frequently as
seen in the sinefit processed data in Fig. 3-7 are responsible for the large clusters
as observed in Fig. 3-6. Similar transients can blend together, but by comparing
across three different phases, and using the bounded transient detection method to
separate out transient events into their component parts these similar transients can
be distinguished from each other.
The K-means clustering algorithm is used in the Euclidean plane with the two
dimensions being real and reactive power of the specific characteristic (delta change,
maximum peak, and minimum peak) of the specific harmonic of the specific phase
being examined. For example using the first harmonic of A phase, three clustering
instances would be created for delta, peak high, and peak low change in power.
The number of clustering instances is equal to 3 - P - H, where P is the number of
phases, and H is the number of harmonics being examined. For each phase, harmonic
and characteristic a data point is assigned to a cluster center. The data points are
then compared to each other, and those points containing the same centers for each
clustering instance are assigned to are classified as the same transient. To compare
the data from two transients to each other Fuzzy Logic is used.
3.2.3
Fuzzy Logic
Fuzzy logic was developed by Lofti Zadeh in [27], the key difference between fuzzy sets
and boolean logic is that instead of having a value of True or False for membership,
an item in the set has a value describing how related the item is to the group. This
logic is particularly useful for the example presented here. As previously stated in
Sec. 3.2.2, the number of cluster centers is a required input when using k-means
clustering. The method presented here uses a higher than expected value for the
number of cluster centers. This could cause serious problems as two cluster centers
close together may represent one transient event repeatedly happening. Using fuzzy
51
KMeans Clustering
-. --
4000
-....... .
--
.2
-.. . . . .
.
-
r Centers
..e Cluste
-.
-
-
.
2000
.
Transi ent Data Points
E
7*
0
1
......... . ....
............
-
-00
'U
cc
-2000
-.
........
.......
-4000
-4000
-2000
0
2000
4000
Real Power (Watts)
6000
8000
Figure 3-6: K Means Clustering of Delta Change of 4000 Transients with 20 Cluster
Centers
logic these two centers can be said to be approximately the same.
Fuzzy logic requires two things in order to develop fuzzy sets: the definition of
similarity and a threshold to use when making decisions. Typically the K-means
clustering algorithm is limited in its application to unsupervised learning due to the
required input of the number of cluster centers k. This can be overcome by selecting
a value for k that is larger than the number of clusters expected to be observed.
By doing this some clusters will be divided into two different centers. Remembering
52
10000
9000
8000
7000
6000
03:06:00
03:07:00
03:06:30
03:07:30
03:08:00
03:08:30
03:09:00
Figure 3-7: System cycling and off transient occurring simultaneously.
that the K-means clustering algorithm is used in the Euclidean Plane with the two
dimensions being real and reactive power for each characteristic (delta, maximum
peak, and minimum peak) for each harmonic of each phase of power it is possible
that the same transients will end up in the different but adjacent clusters for each
instance of clustering. To overcome this Fuzzy Logic is used to combine similar groups
together.
Transient Group Similarity
Transient groups are compared for similarity based on their normalized Euclidean
distance of each cluster center multiplied by a weight assigned to the characteristic
as seen in Eqn. 3.11.
=
j(m
-
x)
2
) + (my - xV) 2 )
=
("'+ )2 + (m/x,)2
output = weight *E
53
(3.9)
(3.10)
(3.11)
Application to Transient Identification
As explained in Sec. 3.1 an electrical transient can have multiple defining edges.
Each one of this edges is grouped into a transient cluster. In a perfect world each
transient of a machine turning on or off would be perfectly clustered so that the cluster
center incorporated all variations, but unfortunately this is not true. To overcome
this short coming fuzzy logic is used. When a transient event is identified in the
training data the transient group of the individual transients that compose the event
are identified.
In identifying future transient events, the transients that compose
the event are compared to the groups and placed in the one they most closely match.
Using more cluster centers than is necessary allows the clustering algorithm to account
for outliers due to transients that occur with less frequency.
54
Chapter 4
NILM Applications
There are three primary applications of NILM: energy monitoring, condition based
maintenance, and human activity monitoring. NILMs were deployed to four different
test sites, and from these sites a variety of novel sensing techniques was developed.
4.1
4.1.1
Test Sites
Joint Readiness Training Center, Fort Polk, LA
Fort Polk, LA is an active duty Army post and home to one of the Army's three
Combat Training Centers. This training center has several replica Forward Operating
Bases (FOB) camps used to emulate conditions in current theaters of operation as
seen in Fig. 4-1. Fort Polk's FOB electrical distribution is powered from several
split-phase power lines. As such, not all the laundry, kitchen, shower, or amenities are
powered from the same panels, and cannot all be monitored from the same location.
In the interest of relating energy monitoring to occupant usage trends, two panels
were monitored: one powering three buildings all used as sleeping quarters, and one
powering two headquarter buildings and one sleeping quarter. These two building
types are equivalent in size and major loads, i.e. environmental control units (ECUs)
and lighting systems, but their usage schedules differ.
In addition to the FOBs, Fort Polk also has a Combat Support Hospital (CSH)
55
consisting of modular tents.
generators.
Unlike the FOBs, this unit is powered from mobile
Hospital tolerance for power interruptions is extremely low, so redun-
dancy is incorporated at key facilities through multiple generators and parallel power
distribution.
The functionality of this field hospital mirrors that of a standard hospital. Thus,
the loads are numerous and widely varying in power draw and frequency of use.
The often used loads are ones that are standard to buildings in general, e.g.
the
HVAC system (primary consumer) and lighting systems. Less frequently used loads
include the hospital specific equipment, e.g. x-ray machines and pressurized oxygen
gas systems.
Such loads can draw significant power, but are only operated when
needed by a patient.
One NILM device was installed at this facility and was used
to monitor the intensive care units, operating room, pre-operating room, emergency
room, medical supply tents, specialty ward, laboratory, and the hospital operations.
FOB Warrior
Figure 4-1: Unnamed training FOB on Fort Polk
4.1.2
Base Camp Integration Lab, Fort Devens, MA
Fort Devens, MA houses the Army's Base Camp Integration Lab, a test site for new
technology and a FOB base camp for training Army units.
This facility includes
climate-controlled insulated tents, latrines, showers, laundry, and electric kitchen and
dining facility. This rapidly deployable package, capable of supporting 150 troops, is
powered from two three-phase 120 V, 600 A electrical panels. NILM hardware was
56
Figure 4-2: USCGC Spencer responding to Hurricane Sandy in New York City
installed on both panels in September of 2013 and are currently still active. The
primary power-consuming loads at the base are the HVAC systems, water pumps,
kitchen refrigeration units, and lighting systems.
4.1.3
USCGC Spencer, Boston, MA
The USCGC Spencer is 270' Coast Guard Medium Endurance Cutter commission in
1986. The primary missions of the USCGC Spencer include search and rescue, living
marine resources management, migrant interdiction, and national security. The machinery plant includes twin ALCO V-18 engines for propulsion, and three diesel generators for electrical generation. The ship carries a crew of approximately 100 members,
and maintains a rigorous patrol schedule resulting in approximately 6 months of the
year underway. NILMs were equipped to an machinery space ventilation fan, and
to a panel feeding the auxiliary equipment for one of the ALCO V-18 main diesel
propulsion engines. A picture of USCGC Spencer responding to Hurricane Sandy in
New York Harbor can be seen in Fig. 4-2.
57
4.1.4
Cottage Street School, Sharon, MA
The Cottage Street Elementary School in the Sharon School District of Massachusetts
is actively used by hundreds of students and teachers. Data was collected from this
site in March of 2013. During such winter months, the school's energy expenditures
are dominated by a dual-boiler hot water heating systems. Only one of the boilers
ever operates at a given time, however they are frequently alternated in use for maintenance purposes. While these boilers burn natural gas for heat generation, they have
several electrical based subsystems with signatures detectable by the NILM, including
the draft fan, blend pump, actuators, burner controls and transformer igniter.
At this location, the main service panel was not accessible. Instead, the threephase emergency power sub-panel which services the heating system's electrical components along with the school's communications, kitchen appliances, septic systems,
other loads was monitored. Representing about 25% of the school's total electrical
load, these systems are those deemed necessary even in emergency situations.
4.2
Energy and Resource Monitoring
The most basic function of NILM is electrical monitoring, but by tracking the run
times of machines, the consumption of other resources such as natural gas an water
consumption can also be monitored. Smart meters are being deployed throughout
the electrical distribution grid, and there utility for power companies is essential for
predicting demand response and integrating renewable energy into the grid. An indepth discussion of the application of smart meters can be found in 11].
4.2.1
Electrical Monitoring
The average consumer is provided with a monthly power bill, from the meter that
tracks all electricity flowing into their home. Looking month to month a consumer
can see trends in their bill, and with regular use of an electrical load throughout a
month, they can attribute any change in their monthly bill to that load. For example
58
..........
.........
",",
electrical use rises in the summer with air conditioning, and in the winter with space
heaters. The Federal Energy Regulatory Commission defines smart meters also called
advanced metering as, "metering systems that record customer consumption (and
possibly other parameters) hourly or more frequently, and provides for daily or more
frequent transmittal of measurements over a communication network to a central
collection point", [17]. The NILM hardware presented in this thesis samples at 8kHz,
much faster than the hourly requirements, and when running the NilmDB and NILM
Manager software communicates with the central NILM servers. Thus the hardware
presented here qualifies as a smart meter. The power of smart meters is the ability to
predict electrical usage and price it accordingly. This provides financial incentives to
smooth the overall demand of the grid, and makes it easier to predict when to bring
on and off generating stations.
Power consumption is dependent on many factors, but one of the most readily
available inputs driving power consumption is weather.
Heating, ventilation, and
air conditioning are dominant end uses for electricity and natural gas. According to
the U.S. Energy Information Administration (EIA) in the 2009 Residential Energy
Consumption Survey 41.5% of the end use energy in residential homes is for space
heating. An additional 6.2% is for air conditioning [2]. According to the 2003 EIA
Commercial Building (the most recent available), 30.5% of the end use of electricity
in commercial buildings is for HVAC [1]. Currently smart meters are able to significantly better inform users on how much energy the consume over time, compared
to traditional meters. Using the NILM hardware presented in this thesis as a basic
smart meter, Fig. 4-3 shows the power consumption of single day at a FOB on Fort
Polk. This is graph is useful to a power utility for determining demand response and
for a consumer to track their overall power consumption.
In attempting to reduce power consumption it is important to understand how
environmental inputs impact consumers use of power. Comparing power consumed
with the temperature, it is easy to see the the power consumed is proportional to the
temperature, where an increase in temperature drives a increase in power. This is not
always true, but centers around the thermostat setting for a building. As temperature
59
20000
A Phase Power
B Phase Power
,. 15000
o
10000
5000
04:00
08:00
12:00
16:00
20:00
00:00
Time
Figure 4-3: Daily Power Consumption from Fort Polk
deviates from the thermostat setting power consumption increase.
The reason for using high sample rate data is to provide more information to
consumers.
Instead of just how much power is consumed, it is more useful for a
consumer to know what their power consumption was caused by. All of the previous
features are available for a standard smart meter, but NILM provides the ability to
have appliance level power consumption by tracking the transients. Knowing when an
electrical load turns on and then off, the time between runs can be calculated. This
allows for the creation of a carpet plot, which shows when an electrical load is on.
The bars indicate that a heater is on, and the height indicates the number of heaters
on. Looking at the heater runs, it can be clearly seen that the heater runs are highly
dependent on the temperature. In looking for energy conservation opportunities this
information is much easier to digest and then turn into actionable results.
Data from March 19, 2014, from a section of one of the FOBs in Fort Polk, is
shown in Fig. 4-4.
The temperature data is obtained from the publicly available
Weather Underground API [4]. This image shows the heater run cycles on Fort Polk.
The vertical amplitude and opacity of the columns on the bottom plot indicate the
number of heaters running at any given time.
This image shows how dependent
HVAC systems are on the external temperature. With other loads that do not have
60
such obvious dependancies this image could look very different. A facility manager
would greatly benefit from using this type of image to attempt to develop trends in
their machinery usage, and determine when the best time to take a system offline for
maintenance is, or how external factors will effect maintenance and operational costs.
75
70-
S65
-55
50
C
Figure 4-4: Heater runs at Fort Polk Forward Operating Base
4.2.2
Natural Gas Monitoring
The first example of using the NILM architecture for utility monitoring is estimating
natural gas consumption.
This is done using data gathered from the Cottage Ele-
mentary School to develop virtual natural gas sub-metering for the school's heating
system, which is not directly sub-metered. Nevertheless, information about natural
gas consumption can be inferred from electrical system behavior. Knowing the char-
61
acteristics of the boilers, an estimate of the natural gas consumed by each boiler can
be created by just tracking machinery runs.
This virtual natural gas sub-metering was accomplished through knowledge of the
boilers' operation cycles. Both boilers employ a Gordon-Piatt R-8 Model natural
gas burner with nameplate capacities of 20.80 Ccf/hr (58.9 m 3 /hr) [141. When the
burner's controller calls for heat, the blower fan, which is detected by the NILM,
switches on. Following a 90 second purge cycle and a 10 second burner ignition cycle,
gas is supplied to the burner. When the controller calls for the heat supply to cease,
the gas valves close and the blower fan turns off. Thus, by monitoring the electrical
signature of the blower fan, an estimate of the natural gas usage of the boiler for each
heating call is seen in Eqn 4.1.
VNG
tNG =
(4.1)
QNGtNG
=
toff
-
ton
-
100
(4.2)
In these equations, VNG is the estimated volumetric measure of natural gas used,
ton and toff are the times of the blower fan turn on and turn off transients in seconds,
respectively, and QNG is the nameplate volumetric flow rate of natural gas. tNG then,
is the time of high-rate natural gas flow, i.e. the time that the blower fan is on minus
the 90 second purge cycle and 10 second ignition cycle. A more detailed description
of the boiler operation and transient detection methods employed at this location can
be found in [14].
For validation of this method, the school's main gas meter dial was photographed
at 20 minute intervals so that gas consumption could be compared to the estimates
found using equations 4.1 and 4.2. Fig. 4-5 shows the results of approximately five
days of monitoring from April 27, 2014 to May 2, 2014. During this time, approximately 68 Mcf (1,900 m3 ) of natural gas was consumed. Comparing the two methods
of monitoring gas usage, the coefficient of determination is 0.998 showing the method
to be highly accurate.
62
1600
1400
1200
1000
*0
800
LD
600
z
400
200
-
0
0
10
20
30
40
Time (Hours)
50
NILM Estimate
Actual Meter Reading
60
70
Figure 4-5: Cottage Elementary School Virtual Sub-Metering Comparison
1 63
With a dominant consumer of natural gas such as two large boilers used for heating
a building, the total natural gas usage can be well estimated by tracking just these
machines. This was confirmed by comparing monthly natural gas bills for the Cottage
St School during months in which heating is required to those when it is not. For
example, for the 2012-2013 school year, during the months of September and October,
the natural gas used was less than 32 Mcf (906 m3 ) per month, but during the peak
of heating season, i.e. January through March, natural gas usage increased to around
600 Mcf (17,000 m 3 ) each month. This method of virtual sub metering can be used
to provide more in depth usage information, and allows the NILM to serve as a total
energy use monitor, while still only using electrical sensors.
4.2.3
Water Use Monitoring
The three main utilities consumed by residences are electricity, natural gas, and water.
Typically water pressure for homes is provided through the pressure in the system
by the water company, but on ships and on Army FOBs, water pressure is provided
through pumps. These pumps are designed to turn on when the pressure drops below
a certain level in the system due to consumer demand typically from hygiene facilities
or kitchen facilities. In resource constrained FOBs water is typically trucked in, and
the cost per gallon for transporting water and fuel through hostile territories can be
expensive both in terms of dollars spent, and casualties sustained.
Similar to the way in which natural gas consumption can be estimated, so too
can water consumption. Knowing the run time of the pump and the flow rate when
running, water consumption can be calculated.
At a field test on Fort Devens a
48 hr period of water consumption was tracked, in which 886 gallons of water were
consumed. Volume of water,
Vwater,
consumed is estimated using Eqn. 4.3, where
Qwater is the volume of water per run and Nruns is the number of pump runs completed.
Vwater
=
Qwater ' Nruns
(4.3)
Knowing the pump typically discharges between 10 and 12 gallons per run, and
64
observing 80 runs over the 48 hours, the estimated water consumption is between
800-960 gallons. As with the natural gas monitoring the consumption is not exact,
but provides a close estimate which can be used in projecting future consumption,
and resupply needs.
4.3
Human Activity Monitoring
Tracking the state of electrical machines allows for the analysis of the activity of those
using the machines. Monitoring machines that require users to operate them are the
easiest to infer activity from. With an understanding of the role of a machine in the
environment it operates in, more assumptions can be made.
4.3.1
Crew Fatigue Management on CGC Spencer
The use of controllable pitch propellors on Coast Guard ships requires hydraulic
pumps which provide pressure to the propellor hub. Changing the pressure in the
hydraulic lines which run down the shaft of the propellor and into the hub will cause
a change in pitch. This configuration allows the ships engines to spin at a nearly
constant speed, only increasing engine speed for high hull speeds, preventing excessive
wear on the engines from operating at slow speeds or quickly changing engine speed.
Ships spend most of their time in open water steaming, but some situations such as
moorings, anchoring, small boat deployment and recovery, or helicopter operations,
have a high potential for danger if systems fail and can require decisive action to avoid
damage to the ship or personnel. During these operations the ship sets the Restricted
Maneuvering Doctrine (RMD), which typically requires additional watch standers
and can be an all hands event. These high risk operations require quick maneuvers
and extra redundancy in propulsion systems in the event of failure. Typically Coast
Guard WMECs, such as the USCGC Spencer operate with a single CPP pump on
each shaft. There are three pumps for each shaft, two identical pumps (A and B)
which are rotated daily during normal operations, and a single smaller pump for
each shaft as a backup (C). The goal of the C pumps is in the event of failure, the
65
Conning Officer will not experience any loss of maneuverability while the Engineering
Department diagnoses the casualty and either fixes the casualty or brings the other
pump online.
The C pumps are an example of a characteristic load that can be used to infer
the operations of the ship. The use of the C pumps when RMD is set means that
additional watch standers will be on station. For events such as helicopter operations,
moorings, or emergencies, the entire ship will be at a watch station. These events
interrupt the daily routine of a ship, and when they occur often enough can lead to
higher levels of fatigue. Currently the Coast Guard uses Operation Risk Management (ORM) which requires sailors to personally assess their fatigue levels [25]. This
method is effective, but for an organization who's motto used to be 'You have to go
out, but you don't have to come back,' the personal assessment of sailors committed
to their mission is not the most effective barometer of fatigue [26]. Using characteristic loads to track the time spent in different evolutions can provide a Commanding
Officer with a data driven approach to assess crew fatigue.
Using the data from the NILM verified with ship's logs the following diagrams
in Fig. 4-6 and Fig. 4-7 were created. The start and stop times for machines were
detected and recorded using the transient detection methods presented in Sec. 3.1.
To confirm this data three different sets of ships logs as well as interviews with crew
members were required. The diagram presented here shows a ship that is moored in
the morning as indicated by the white blocks, and turns on the Main Diesel Engines
(MDE) at 0600, red indicates off, green indicates on. This is indicated by the prelube
pump turning off. The prelube pump circulates heated oil through the engine to keep
it warmed up and ready to start, while the engine is off. While in standby status the
ship will maintain these pumps on at all times. The C pumps turning on at 0715,
indicated by the green blocks, indicate the ship is getting underway, this is confirmed
with ships logs which state the time of setting RMD, and taking in mooring lines.
The turning off of these pumps indicates the ship has reached open water, confirmed
with the ship logs recording that RMD has been unset. The information presented
here is available, but not in a convenient form which would allow frequent reports to
66
Time Underway
5:00
5:15
5:30
5:45
6:00
6:15
6:30
6:45
7:00
7:15
7:30
7:45
8:00
8:15
Engine Status
Engine Prelube PumRMD
et
PP u
9:15
9:3
9:45
10:00
10:15
10:3
10:S
11:1
Figure 4-6: Machinery runs and ship operations 0500-1200
be easily generated. This capability of the NILM is an added benefit to the primary
function of energy scorekeeping, but it provides the potential to produce data driven
decision making aids for ORM.
Installing a NILM on the main distribution panel would all for the tracking of
many other loads including small boat davits, and helicopter landing equipment.
Using this information reports such as the one presented here can show the disruption
is a crews normal schedule that could cause increased fatigue. Ships provide a unique
opportunity to conduct his analysis, because they contain an array of mission specific
equipment which when tracked can paint a picture of the operational tempo of a ship.
67
Time |Underway
12:1
|Engine Status
|Engine Prelub Pp|
|RDStCPP Pump
12:45
13:15
13:3
13:45
14:00
14:15
14:3
14:45
15:0
15:15
15:4
16:
16:15
16:45
17:0
17:151
17:3
17:45
Figure 4-7: Machinery runs and ship operations 1200-1800
68
4.4
4.4.1
Condition Based Maintenance
Fort Polk Warring ECU's
An example of condition based maintenance comes from the FOB on Fort Polk on 28
March, 2014. Within the same room, two ECUs were set in opposition to each other,
with one set to heat mode and the other set to cool mode while the building was
unoccupied. As would be expected, during cool evening hours, the machines dueled
over the thermostat, alternating operation every 30 minutes or so depending on the
outside temperature. Fig. 4-8 shows their electrical signatures over an 8-hour period
while the temperature was in the 60s. The energy wasted simultaneously heating and
cooling an empty room for several days is not insignificant. Every hour during this
otherwise idle period costs about 4 kWh total, with the heater expending about 11kW
for 16 minutes and the compressor about 3.3 kW for 24 minutes. This translates into
unnecessary wear on the equipment and from (4.4), over 8 gallons of wasted fuel each
day. Using the NILM to track this user error, excessive energy bills and machinery
wear can be avoided.
Vdiesel =
10
x
1
(4.4)
Pdiesel 77
N Phase A P1
Phase B P1
0
0~
Heater
01:08
02:08
A/C
03:08
04:08
05:08
06:08
07:08
08:08
March 28th, 2014
Figure 4-8: Heater and Air Conditioner repeatedly cycling to maintain thermostat
temperature.
69
4.4.2
ECU Faults
The condition base maintenance functionality of the NILM has the ability to detect
machinery failures. On the morning of March 28, 2014 at Fort Polk, a fault was detected in a wall-mounted ECU. After hours of repeatedly running for 12 minutes, and
remaining off for 20 minutes, the compressor turned on around 0830 hrs and stayed
on for more than 12 hours straight. Then, despite returning to shorter intervals as
before, the supply fan ceased to function. The NILM detected the fault by comparing
the bad ECU (Compressor 1) to a good ECU from the training data. The power consumed by Compressor 1 after the 12-hour runtime was consistently 300 W less than
before. Comparing this to a healthy ECU, the fault resulted in power consumption
dropping from about 3.3 to just 3 kW. This difference is equal to the consumption of
the supply fan. Additionally, a change in the off transient was detected, compared to
the training data, as the fan off signature was missing from all future off transients,
as seen in Fig. 4-9.
Another diagnostic tool used was a comparison of the run times between Compressor 1 and healthy ECUs, which revealed significant differences. Based on the training
data from healthy ECUs, the fan is supposed to turn off one minute after the com-
17
2014 Feb 24 17:47 - 17:50
(a) Healthy ECU On Transient
9SW0
2014 Mar 30 21:25 - 21:28
(b) Broken ECU Off Transient
Figure 4-9: Fort Polk ECU AC mode off transients for a (a) healthy ECU and (b)
broken ECU. The increased "noise" in (b) as compared to (a) is due to additional
active loads.
70
pressor does (around 17:49:10 of Fig. 4-9a). Without the supply fan circulating the
cool air out of the ECU, the room was only cooled through unforced ventilation out of
the ECU, a significantly less effective method. For a 5-hour period, the hottest part
of the day during March 29th, the broken ECU ran for 3.1 hours in intervals ranging
from 7-15 minutes. The normal ECU operated for similar intervals but required only
1.4 hours, less than half the time of Compressor 1. Due to the machinery failure, the
broken ECU used approximately 250% the energy of a normally functioning ECU.
71
THIS PAGE INTENTIONALLY LEFT BLANK
72
Chapter 5
Transient Database Framework
5.1
Introduction
The Transient Database framework (TransientDB) builds upon the work of Jim Paris
and John Donnal in developing NilmDB in [21] and the development of NILM Manager in [8] which allows users to interact with NilmDB. The TransientDB is a rapidly
deployable template that builds on the open-source Python web framework Django
[13]. Django is a mature web framework used by many high traffic popular websites.
Django provides a stable and continually developed interface with SQL databases
as well as the object relational mapping layer for SQL databases, and Apache web
servers. TransientDB models created with Django interact with NilmDB to store
information about transients which can be used to develop new methods of tracking
electrical loads without the burden of rewriting code.
NilmDB provides an excellent method of interacting with time series data both
continuous and discrete. The tools presented in NILM Manager allow a user to interact with extremely large datasets in human comprehendible formats. Additionally
the NILM Manager interface provides low bandwidth functionality to upload user
scripts to a remote machine and process data locally. The remote machine only returns the results to the user. In field tests on remote and austere Army Forward
Operating Bases and deployable US Navy and Coast Guard vessels experience severe
bandwidth restrictions. Using the field trial at Ft. Polk as an example, the local
73
storage and processing of data in a two month field test resulted in less than 1GB
of data transferred over the network per month, per NILM, even with multiple users
accessing and processing data.
NilmDB excels at presenting time series databases, but for developing transient
detection and electrical load monitoring algorithms, the ability to collect and store
information about the time series datasets is essential. Running filters on large time
series datasets is computationally intensive and time consuming. This missing piece is
the inspiration for the TransientDB. Additionally once transients have been collected
and processed they are inserted into the NilmDB as a time series data stream, and
available for further analysis.
5.2
Django
Django is web application framework that is well documented, free, and open source.
The Django framework provides two key utilities which make it perfectly suited tool
to build the TransientDB upon, an Object Relational Mapping which interacts with
models defined as Python classes and SQL databases, and the supporting Python
code for building a web application. As NilmDB is also written in Python and the
NilmDB application programming interface is available only in Python, it is a logical
choice to continue this trend, and consistency in language. The consistent use of
Python leverages the widely available free and open source libraries such as Numpy,
Scipy, Matplotlib, and Scikit-Learn, which provide many of the features available in
much more expensive scientific programs such as Matlab. Additionally the free and
open source Python packages enable the wide scale deployment of NILMs without
the concern of licensing fees.
5.3
Interaction with NILM Manager
TransientDB builds upon the NilmDB and NILM Manager interfaces. Data collection
is designed to be run as a NILM Manager Filter. A NILM Manager Filter is composed
74
.....
........
of two pieces of code which are combined by NILM Manager. The first is the Filter
section, inside of which is the user defined filter function. The filter function receives
the inputs: data, interval, args, insert__function, and state. The data input is the
data pulled from the NilmDB with columns equal to the number of user defined inputs
plus an additional column with index zero for unix timestamps in microseconds. The
number of rows provided is determined by NILM Manager, based on many things
including system resources. The interval input is a tuple with the beginning and
ending timestamp of the data. The insertfunction input allows the filter to output
data to the NilmDB as a Numpy array. It is important to note the the Numpy array
output must have at least one row, and columns equal to the number of outputs, plus
an additional column at index zero for the timestamp. A valid input to the insert
function is seen below:
#
Create unix timestamp
ts = 1429651736000000
#
Create row of zeros
output = np. zeros ((1 ,4))
output[0,0] = ts
#
If the transient
set to 1
output[0,2] = 1
insert
_function
is a turn off the third column is
(output)
The second section of the NILM Manager filter interface is the Initialization tab.
The Initialization tab provides a space to define functions that can be used by the
filter, and to initialize persistent variables which will
5.4
Models
The core of the TransientDB is the object relational mapping of the database. In a
model view controller (MVC) application, the object relational mapping (ORM) maps
different model instances to related models. These relationships allow the application
75
to categorize large data sets and process them from detected transients to grouped
transients, and finally identified transients. A diagram of the models interactions is
provided in Fig. 5-1.
5.4.1
NILM
The NILM model serves as the backbone of the TransientDB. Ideally the TransientDB
is deployed directly on the embedded system running the NilmDB application, but
in the event of data being archived or one embedded system running two instances
of NilmDB, this model serves as the identifying key for the origin of the data. The
NILM model has the attributes seen in Table 5.1.
Attribute Name
name
location
numphases
Description
Character Field, identifying name of NILM installation
Character Field, location of NILM installation
Integer Field, the number of phases the NILM is monitoring typically 2 or 3.
Table 5.1: NILM model attributes and descriptions.
5.4.2
Transient
The Transient model is the main connection between NilmDB and the TransientDB.
Transients are collected from NilmDB using the previously described transient detection methods in Sec. 3.1. A transient is a single instance of a detected edge, and
is defined by the delta change, maximum peak, and minimum peak. The Transient
model has the attributes seen in Table 5.2.
5.4.3
ClusterObj
A ClusterObj is an output of clustering Transient instances and is an instance of a
Scikit-Learn cluster object. Data types such as Numpy arrays and Scikit-Learn cluster
objects cannot be stored in a database. A Python package named pickle is used to
serialize, convert into a format that can be stored, the cluster object. When needed
76
NILM
+ transient-group : <<FK:TransientGroup>>
+ name: CharField
+ harmonic-map : CharField
+ A P1 : CharField
+ AP3 : CharReld
+ A P5 : CharField
+ A_ P7: CharField
+ A_01 : CharField
+ A03 : CharField
+ A 05 : CharField
+ A07 : CharField
+ B P1 : CharField
+ BP3 : CharField
+ B_P5 : CharField
+ B P7 : CharField
+ B 01 : CharField
+ B 03:CharField
+ B 05: CharField
+ B_07 : CharField
+ C P1 : CharField
+ CP3 : CharField
+ C P5 : CharField
+ C P7 : CharField
+ C 01 : CharField
+ C 03 : CharField
+ C 05 : CharField
+ C07 : CharField
+ negative : BooleanField
+ transientlength : SmallintegerField
+ timestamp : BigintegerField
+ dateTime : DateTimeField
+ filterRunTime : DateTimeField
+ idd : BooleanField
lDDTransiaent
+ nilm :<<FK:NILM>>
+ onoff : <<FK:OnOycle>>
+timestamp : BigintegerField <<From Transient>
+ dateTime : DateTimeField
Char~ield
location: Char~ield
+ name :
+
+ nilm :<<FK:NILM>>
+ name : CharField
+ A_1-delta : <<FKClusterCenter>>
+ A 1 peakHigh : <<FKClusterCenter>
+ AjeakLow: <<FKClusterCenter>
KnownTransient
+ nilm : <<FK:NILM>>
ClusterObj
+ name : CharField
+ trO: <<FK:Transent>>
+ tr :<<FKTransient>>
+ tr2 :<<FK:Transent>>
+ tdo : IntegerField
+ td1 : IntegerField
-
+ nilm : <<FK:NILM>>
+ pickled-cluster : FilePathField
+ phase-harmonic : CharField
+ clusterjtype :CharField
+ creationDatelime : DateTimeField
ChlsterCenter
OnOffCycle
+ nilm <<FK:NILMy>
+ nilm <<FK:NILM>>
-
i name : CharField
+ trOg : CharField <<TransientGroup List>>
+ trig : CharField <<TransientGroup List>
+ tr2g : CharField <<TransientGroup List>>
+ tdO high : IntegerField
+ tdO_low : IntegerField
+td 1high : IntegerField
+ td1 low : IntegerField
+ label : CharField
+ clusterobj : <<FKClusterObj>>
+ clustercenterP : FloatField
+ cluster center_ 0: FloatField
i
Relationship not a ForeignKey
Machine
+nilm :<<FK:NlLM>
+ name,: Char~ield
+ on :<<FKOnOffCyle>>
]
TransientGroup
+ num-phases : Inleger~ield
Relationship through ForeignKey
+ A_3_delta : <<FKClusterCenter>
+ A 3peakHigh : <<FKClusterCenter
+ A_3_peakLow: <<FKClusterCenter>
+ A_5_delta :<<FKClusterCenter>>
+ A5peakHigh :<FKClusterCenter
+ A 5peakLow: <<FKClusterCenter>
+ A_7_delta :<<FKClusterCenter>
+ A_7peakHgh :<FKcClusterCenter
+ A_7jeakLow: <<FKClusterCenter>
+ B_1 delta :<<FKClusterCenter>>
+ B_1_peakHigh : <<FKClusterCenter
+ B 1 peakLow: <<FKClusterCenter>
+ B_3 delta : <<FKClusterCenter>
+ B-3 peakHigh : <<FK:ClusterCenter
+ B 3 peakLow: <<FKClusterCenter>
+ B 5 delta :<<FK.ClusterCenter>>
+ B5peakHigh :<<FKClusterCenter
+ B 5_peakLow: <<FK'ClusterCenter>>
+ B_7_delta : <<FK*ClusterCenter>>
+ B_7_peakHigh : <<FK:ClusterCenter>
+ B_7peakLaw: <FKClusterCenter>>
+ C_1_delta :<<FKClusterCenter
+ C_1_peakHigh :<<FKClusterCenter>>
+ CjpeakLow: <<FKClusterCenter>>
+ C_3_delta : <<FKClusterCenter>
.0
(1)
72
CO
+ C_3_peakHigh : <<FK.'ClusterCenter>>
+ C_3_eakLow: <FKClusterCenter>>
+ C_5_delta :<<FK.ClusterCenter>>
+ C_5_peakHigh :<<FKClusterCenter>>
+ C 5jpeakLow:<FKClusterCenter>>
+ C 7 delta : <<FKClusterCenter>>
4
C_7_peakHigh : <<FKClusterCenter>>
+ C_7-peakLow: <<FK:luserCener>>
+ off : <<FKOnOtlCyce>>
+ cycle : <<FKOnORfCycle>>
S
TranhlentGroupSimilarity
+ nilm : <<FK:NILM>>
+ file : FlePathField <<Describes TransientGroups>>
+ negative : BooleanField
I)
-
y
1
.
Transient
+ nilm :<<FK-NILM>>
Attribute Name
nilm
name
PhaseHarmonic
harmonicmap
negative
Description
Foreign Key, links to an instance of the NILM model
Character Field, a descriptive name which is automatically generated as described later
Character Field, contains the collected values for the
phase and harmonic listed. This model is available for
phases A, B, and C, and harmonics P1, P3, P5, P7, Q1,
Q3, Q5, Q7. P indicates real power, and Q indicates reactive power. A sample attribute name is A P1 for A
phase, real power, and first harmonic.
Character Field, describes the order of the number
in the PhaseHarmonic field. Automatically set to
'delta,peakHigh,peakLow'.
Boolean Field, default set to False. Indicates whether or
not the transient recorded is a positive delta change or
negative delta change.
transientlength
timestamp
dateTime
filterRunTime
transient-group
idd
Small Integer Field, indicates the time in sinefit preprocessed samples between the start and end of the transient
as determined by the Bounded Transient Detector.
Big Integer Field, Unix timestamp in microseconds corresponding to the start of the transient, consistent with
NilmDB timestamps.
Date Time Field, automatically generated by converting
the timestamp field to a Python datetime object prior to
saving the model instance.
Date Time Field, time that the filter in NILM Manager
was started.
Foreign Key, links to an instance of a TransientGroup
model
Boolean Field, indicates whether or not the transient has
been used in an IDDTransient instance.
Table 5.2: Transient model attributes and descriptions.
the pickled object can be read and deserialized by the same Python package pickle.
The specific attributes of the pickled clustering instance depend upon the clustering
algorithm used, but for the purposes of this thesis it is assumed that the K-means
clustering algorithm will be used. The K-Means clustering algorithm is explained in
Sec. 3.2. The ClusterObj is stored in a pickled file, and can then be called upon to
predict the cluster center that a new transient will belong to. The purpose of storing
the clustering instance is to assign new transients to cluster centers, without having to
78
rerun the computationally intensive task of clustering the transients. The attributes
of the ClusterObj can be seen in table 5.3.
Attribute Name
nilm
pickledcluster
PhaseHarmonic
clustertype
creationDateTime
Description
Foreign Key, links to an instance of the NILM model
File Path Field, stores the location in the file system of
the pickled cluster. This is automatically generated when
running the clustering.
Character Field, describes the phase (A,B,C) and the
harmonic (1,3,5,7) of the data that was processed in the
clustering instance. An example is: A_1, for A phase
and first harmonic.
Character Field, describes the clustering algorithm used
to cluster the data, for example: KMeans.
Date Time Field, automatically generated when running
the clustering algorithm, stores the date and time that
the model instance was created at.
Table 5.3: ClusterObj model attributes and descriptions.
5.4.4
ClusterCenter
The ClusterCenter model stores an instance of a cluster center from a ClusterObj.
Where a ClusterObj finds the k, typically k = 20, best cluster centers for the data
provided, the ClusterCenter is one on the 20 clusters. The attributes of the ClusterCenter model can be seen in table 5.4.
Attribute Name
nilm
label
cluster obj
clustercenterP
clustercenterQ
Description
Foreign Key, links to an instance of the NILM model.
Character Field, description of cluster, default is 'unknown'.
Foreign Key, links to an instance of the ClusterObj
model.
Float Field, location of the cluster center on the real
power axis.
Float Field, location of the cluster center on the reactive
power axis.
Table 5.4: ClusterCenter model attributes and descriptions.
79
5.4.5
TransientGroup
The TransientGroup model is a collection of cluster centers that linked transients
are all close to. The TransientGroup model serves as the connection between an
observed transient and the cluster centers to which is was assigned during the KMeans clustering. Additionally TransientGroups are used in transient identification.
Instead of reclustering all new transients every time a transient is observed, a new
transient is placed in the closest cluster center.
If a new transient matches any
of the TransientGroups it is added to that group otherwise a new instance of the
TransientGroup model is created. The attributes of the TransientGroup model can
be seen in table 5.5.
Attribute Name
nilm
name
PhaseHarmonicCharacteristic
Description
Foreign Key, links to an instance of the NILM model.
Character Field, automatically generated name for model
instance.
Foreign key, links to an instance of a ClusterCenter
model.
This model has attributes for three phases
(A,B,C), four harmonics (1,3,5,7), and three characteristics (delta, peakHigh, peakLow). An example name is
A_1_delta.
Table 5.5: Transient Group model attributes and descriptions.
5.4.6
KnownTransient
The KnownTransient model is specifically for training data for use in machine learning
models. An instance of the known transient model is created using the train.py file
of the filter library. Instances of the Transient model are edges which are detected
using the Bounded Transient Detection method, but a electric machine or device may
cause multiple edges as it turns on or off. The KnownTransient model accounts for
up to three edges by storing the instance of the Transient model associated with each
edge and the time delay between the edges. The attributes of the KnownTransient
model can be seen in 5.6.
80
Attribute Name
nilm
name
trO
tdO
trl
tdO
tr2
Description
Foreign Key, links to an instance of the NILM model
Character Field, assigned by the user to name the instance. Required naming convention is Machine-event,
such as 'Fan-on'.
Foreign Key, links to the first observed Transient instance.
Integer Field, time delay between the first Transient instance and the second Transient instance.
Foreign Key, links to the second observed Transient instance.
Integer Field, time delay between the second Transient
instance and the third Transient instance.
Foreign Key, links to the third observed Transient instance.
Table 5.6: KnownTransient model attributes and descriptions
5.4.7
OnOffCycle
The OnOffCycle model is used to define a specific machine transient. For example a
light turning on would be one instance of an OnOffCycle model, and the light turning
off would be an additional separate instance of an OnOffCycle. The OnOffCycle class
takes instances of TransientGroups and combines them together with time delays.
The purpose of the time delay is to limit the search area for the next transient.
5.4.8
IDDTransient
The IDDTransient model is used to track the time of Transient instances that have
been identified as a specific time at which an OnOffCycle instance occurred. Additionally this is the model which is used to send information back to NilmDB. The
attributes of the IDDTransient class are listed in Table 5.8.
5.4.9
Machine
The Machine model defines a single machines operation, and connects the different
OnOffCycle models which defines the different transients a machine changing state
will produce. This model is important for tracking the run time of machines, and
81
Attribute Name
nilm
name
trOg
Description
Foreign Key, links to an instance of the NILM model
Character Field, same as the KnownTransient name field.
Required naming convention is Machine-event, such as
'Fan-on'.
Character Field, a list of comma separated TransientGroup names. Similar to the trO field in a KnownTransient, except refers to TransientGroups instead of individual Transient instances. No link with a foreign key is
created, because this would could cause an instance of
this model to be deleted for each time clustering is completed. Deleting a TransientGroup instance would delete
the OnOffCycle associated with it.
tr1g
Character Field, a list of comma separated TransientGroup names, similar to the trl field in KnownTransient.
Character Field, a list of comma separated TransientGroup names, similar to the tr2 field in KnownTransient.
Integer Field, similar to the tdO field in KnownTransient
model, except this provides a low and high bound for the
time delay instead of a single value.
Integer Field, similar to the tdO field in KnownTransient
tr2g
tdO_low
tdOhigh
model, provides the upper bound for the time delay.
tdllow
Integer Field, similar to the td1 field in KnownTransient
model, except this provides a low and high bound for the
time delay instead of a single value.
Integer Field, similar to the td1 field in KnownTransient
model, provides the upper bound for the time delay.
tdlhigh
Table 5.7: OnOffCycle model attributes and descriptions
Attribute Name
nilm
onoff
timestamp
dateTime
Description
Foreign Key, links to an instance of the NILM model
Foreign Key, links to an instance of the OnOffCycle
model
Big Integer Field, the Unix timestamp in microseconds
of the start of the Transient occurring. Consistent with
NilmDB timestamps.
Date Time Field, Python datetime instance of the timestamp, used for human readability.
Table 5.8: IDDTransient model attributes and descriptions
calculating appliance level consumption. Additionally this enables the use of state
tracking in determining whether or not it is likely that a machine transient has oc82
curred based on the previous state of the machine.
Attribute Name
nilm
name
on
off
cycle
Description
Foreign Key, links to an instance of the NILM model
Character Field, a descriptive name of the machine, such
as Heater or Fan.
Foreign Key, an instance of the OnOffCycle class corresponding to the TransientGroups that are characteristic
of the machine turning on.
Foreign Key, an instance of the OnOffCycle class corresponding to the TransientGroups that are characteristic
of the machine turning off.
Foreign Key, an instance of the OnOffCycle class corresponding to the TransientGroups that are characteristic
of the machine cycling. Cycling is typically a very fast
instance of the machine turning on and then off. This
can occur rapidly enough to present a different electrical
signature then the standard on and off instances.
Table 5.9: Machine model attributes and descriptions
5.4.10
TransientGroupSimilarity
TransientGroups are compared for similarity using the fuzzy logic methods outlined in
Sec. 3.2.3. Using fuzzy logic, TransientGroups are given a number which defines their
similarity, a threshold is then defined to determine how closely two transients need to
be in order to be considered equal. The closer the similarity is to 0 the more similar
two transients are. The TransientGroupSimilarity class stores the similarities of all
TransientGroups in a pickled json formatted file, which allows for the easy reloading of
the json object as a Python dictionary. TransientGroupSimilarity instances are either
positive or negative in order to reduce the amount of calculations necessary to develop
the object, and prevent small TransientGroups from being misidentified as positive or
negative. The following table describes the attributes of the Transient GroupSimilarity
class.
83
Attribute Name
nilm
file
negative
Description
Foreign Key, links to an instance of the NILM model
File Path Field, provides the absolute path to the pickled
json file.
Boolean Field, False if the instance stores the similarity of positive TransientGroups, and True if it stores the
similarity of negative TransientGroups.
Table 5.10: Machine model attributes and descriptions
Transient Identification using K-Means
5.5
Clustering and Fuzzy Logic
5.5.1
Setting Up the TransientDB
For any NILM installation where the TransientDB is being used, it is necessary to
clone the git repository for the TransientDB using the following command:
cd
~/
git
clone
gitagit . wattsworth . net : wjcotta/transientDB . git
This git repository should be cloned into the home directory of the user running
the TransientDB. No files in the TransientDB framework require root permissions, and
for security and system stability the files should not be run with the sudo command.
Once the database is initalized by running the commands below the system is
ready to store transient information.
# Move to the home directory
cd ~/
# Change Current Working Directory to transientDB
cd ./transientDB
f Using the Djang manage. py file create the
# instructions to initialize the database
Python manage.py makemigrations transient lib
# Run the instructions and initialize the database
Python manage.py migrate
Listing 5.1: Initializing Database for TransientDB
84
5.5.2
Collect Transients
The first step in the categorizing of electrical data into machine transients is running
a filter in NILM Manager. The filter detects transients and then collects the relevant
peak and delta change data.
This data is then stored in the TransientDB as an
instance of the Transient class. Filters in NILM Manager consist of a filter section
and an initialization section. The initialize section looks for a function initialize(), this
function is available in TransientDB, and currently is empty. The initialize function
serves as a place to create variables stored in a state object, and create functions which
can be run in the Filter tab. Using TransientDB, this is unnecessary, as all essential
functions are available in the local user directory which is added to the Python path.
The filter will not run without an initialize function though, so a function with nothing
in it is import from TransientDB. The initializeVariableso functions brings the global
variables from the NILM Manager filter interface into the TransientDB namespace.
Inputs to the initializeVariables function are seen in Table 5.11.
Input Name
my-vars
Example Input
globals(
TransientDatabase
'FanRoom'
NoiseFloor
250
Definition
This should always be the globals() function output. This
brings the variable names into the TransientDB namespace.
This is the name corresponding to an instance of the
NILM object. If an instance of the NILM class does not
exist with this name, a new instance is created
This is the absolute value of the lowest change in power
the transient detector will use for identifying Transient
instances. Any power change smaller than this will be
ignored.
Table 5.11: Inputs to the initializeVariables function
NILM Manager provides data to the filter code in blocks. The filter function runs
on the block of data given to it, and returns the output as a NilmDB stream, or using
the filter function in TransientDB as transient objects stored in the TransientDB
database. The filter function for the the collecting transients is located in the file
collectTransients.py. The filter works as follows:
1. Overlap data with 60 samples from previous data blocks, and store 60 samples
85
for the next iteration. The goal of this step is to pad the data block with extra
data that can be ignored at the start and end. This provides extra data where
edge effects will occur, which can then be ignored without losing any data in
the data block being examined.
2. The data is passed to the findTransients() function which finds transients using
the first harmonic of real power on all three phases using the transient detection
methods described in Section 3.1.
3. The transients identified are classified as negative or positive, and if they have
not been previously identified are stored in the database using the collectDataAndSave() function.
In order bring run the collect transients filter in NILM Manager the inputs must
be configured with the following naming format: A_P1. The A indicates the first
phase, and the P1 indicates the first harmonic of real power. When running any
filter the first harmonic of real power for each phase (AP1, B_P1, and CP1 for
a three phase system) and the first harmonic of reactive power (A_Qi, BQ1, and
C_Qi) must be provided as inputs. The naming convention is case sensitive, and the
functions will not work with improperly labeled inputs.
In the Filter tab of the user code the following code should be used:
Add the absolute path of the transientDB folder to the
# Python path
import sys
',homei wjcotta,transientDB')
sys .path.append(
R4
# Import, the filter which will run over the data blocks
from filter .run. collectTransients import filter
In the Initialization tab of the user code the following code should be used:
4
Initialize
#
module
the
variables
containing
the
filter
available
in
this
script
in the
code.
initializeVars import initializeVariables
from filter .run.
init ializeV ar iables (globals () , TransientDatabase='FanRoom'
86
NoiseFloor =1000)
Import
the
#
generated
from filter
initialize
function
to
replace
the
user
one.
.run.
initializeVars
import
initialize
This configuration will collect transients and save them as Transient class instances
in the local TransientDB database.
Identify Known Transients
5.5.3
The next step in categorizing electrical data into machine transients is collecting
the training data which defines each instance of a machine turning on, off, or cycling.
This process is very similar to collecting transients, and is done using a filter in NILM
Manager. Identifying known transients uses the same initializeVariables function used
in the previous section for collecting transients, but with slightly different inputs. In
addition to the inputs provided in Table 5.11, the inputs in Table 5.12 are required.
Input Name
machine
Example Input
'Fan'
Definition
This is a string which corresponds the name of the Machine model instance. If a Machine model instance does
not exist with this name a new Machine model instance
name
'on'
is created.
This a string, and the only valid options are: 'on', 'off',
and 'cycle'. Any other input will result in an error. This
determines what attribute the known transient object
will fill in the Machine model.
Table 5.12: Additional inputs to the initializeVariables() function for known transients
When configuring the time window for the known transient it is important to
ensure the only transient in the window is the one being identified.
The transient
should have steady state data before and after the transient. The inputs in the user
code section are very similar to the collect transients, but with a different filter. The
filter located in the train.py file is used. The filter works as follows:
1. Overlap data with 60 samples from previous data blocks, and store 60 samples
for the next iteration. The goal of this step is to pad the data block with extra
87
data that can be ignored at the start and end. This provides extra data where
edge effects will occur, which can then be ignored without losing any data in
the data block being examined.
2. The data is passed to the findTransients() function which finds transients using
the first harmonic of real power on all three phases using the transient detection
methods described in Section 3.1.
3. The transients identified are classified as negative or positive and if they have not
been previously identified are stored in the database using the collectDataAndSave() function.
4. The buildOnOffCycle_ Machine_ Links() function is called. The function steps
are as follows:
(a) The function combines the machine input and the name input with an
underscore and uses this for the OnOffCycle instance name. An example
of an OnOffCycle name is 'Fanon'. If an OnOffCycle with this name does
not exist one is created.
(b) The function takes the machine input the user provided and looks for a
Machine model instance with that name, if one does not exist a new model
instance is created.
(c) The Machine model attribute corresponding to the on, off, or cycle field is
set with as the previously defined OnOffCycle.
5. The function then checks to see if a KnownTransient object exists at the same
time instance, if one does not the transients that occurred in the user set time
window are added to the fields trO, tri, and tr2, as well as the time delays in
between each transient.
In the Filter tab of the user code the following code should be used:
Add the absolute path of the transientDB
88
folder to the
Python path
import sys
#
sys . path. append( '/home/ wjcotta/ transientDB ')
blocks
which will run over the data
# Import the filter
collectTransients import filter
.run.
from filter
In the Initialization tab of the user code the following code should be used:
the variables available in this script
Initialize
code.
# module containing the filter
initializeVars import initializeVariables
.run.
from filter
#
the
TransientDatabase='FanRoom
NoiseFloor=1000, machine='Fan'
,
,
initializeVariables (globals ()
in
name= 'on')
function to replace the
initialize
- generated one.
initializeVars import initialize
.run.
from filter
#j Import
5.5.4
the
user
Clustering and Identification of Transients
and
Once transients have been identified and stored as instances of the Transient class,
training data has been stored as KnownTransient instances, the Transient instances
can be clustered and identified.
The function runClusteringAndId located in the
tests.py file of the transient lib directory runs the clustering algorithm and identifies
transients using the following steps.
Cluster and Group Transients
Transient objects are clustered using the K-Means clustering algorithm described in
Sec. 3.2.2, and implemented using the Scikit-Learn Python libraries. Transient objects are plotted in two dimensions which are real and reactive power. For each phase
the first harmonic of real power is used, and three clustering instances are created.
change
Clustering instances are created for the delta change in power, the peak high
in power, and the peak low change in power. Transients with the same cluster centers for each clustering instance are then grouped together.
89
The transientgroup
attribute of the Transient instances is then changed to reflect membership in the
specific TransientGroup. These groups are compared using Fuzzy logic and the equations described in Sec. 3.2.3. The similarity is determined using Eqn. 3.11. The closer
the value is to 0 the more similar two transient groups are. Clustering is run using
the clusterNILMTransients() function and similarity is calculated using the processGroups() function.
Build OnOffCycle and Id Transients
The next step is to use the KnownTransient instances to build the information for
the OnOffCycle instances created when the training data was acquired. As stated
in Sec. 5.5.3, the KnownTransient model has fields for trO, tri, and tr2, along with
time delays between each transient. The OnOffCycle model mirrors the format of
the KnownTransient model except the trO, try, and tr2, attributes which are filled
with Transient instances are filled with TransientGroup instances. The trg0, trgl,
and trg2 fields are set as the TransientGroups that the trO, tri, and tr2, fields were
assigned to. Then function then checks the similarity of the TransientGroups in the
trg0, trgl, and trg2 fields, and all other TransientGroups. If the similarity falls below
the threshold of 0.001 the similar TransientGroups are also added to the OnOffCycle
field.
Once all the OnOffCycles have been built transients can be identified. Using the
following procedure:
1. For each OnOffCycle the Transient instances in the first TransientGroup, trg0,
are queried from the database.
2. For each Transient instance in trg0, the next Transient in time is identified, i.e.
the Transient with the next higher timestamp.
3. If the next Transient field transientgroup matches trgl, and the difference in
timestamps is less than the time delay, it is recorded as matching.
4. The process is repeated for the next Transient and trg2.
90
5. If all Transients are members of the OnOffCycle's TransientGroups, and are
within the time delay, a new instance of the IDDTransient model is created.
The idd attribute of the Transient objects is changed to True.
5.5.5
Upload IDDTransients to NilmDB
Once the IDDTransients have been created they need to be uploaded to NilmDB.
This is done using the NilmDB Numpy API. The method for outputting transients
is to first create a group with the name of the NILM model instance. Then for each
instance of the Machine model a data stream is created with 3 columns, one for each
transient type (on, off, and cycle) in the Machine model.
5.6
TransientDB Demonstration on USCGC Spencer
Two NILMs were installed on USCGC Spencer on November 17, 2014.
One was
installed on an auxiliary main diesel engine equipment panel, and the other on an
engine room ventilation fan. The sensor installation can be seen in Fig. 5-2 and Fig. 53. The data from the engine room ventilation fan was used to test the TransientDB.
The fan has two modes fast and slow, and was the only piece of equipment being
monitored. Four instances of the KnownTransient model were trained, the fan turning
on in fast mode seen in Fig. 5-4, the fan turning off in fast mode seen in Fig. 5-5 , the
fan turning on in slow mode seen in Fig. 5-6, the fan turning off in slow mode seen
in Fig. 5-7
Over the two month experiment, 148 transients were detected utilizing the bounded
transient detection method. One exemplar of each transient was trained as a KnownTransient instance. The local NILM server was able to run the clustering algorithm
and separated the transients into 49 groups, many of which were extremely similar,
but not exactly the same. Using the fuzzy logic method described in Sec. 3.2.3, the
similar TransientGroup instances were all input into the OnOffCycle, which allowed
them method to accurately disaggregate the loads. The identification functionality
correctly identified all transients, with the exception of gaps in the data, which were
91
~1
I
I
Figure 5-2: NILM Installation on engine room ventilation fan control panel, labeled
sensors.
92
Figure 5-3: NILM Installation on engine room ventilation fan control panel.
A Phase Power
40000
30000
20000
0
10000
08:04:32
08:04-33
08:04:34
08,04:35
08:04:36
08:0437
08 04:38
Time
Figure 5-4: Fan turning on is fast mode, first harmonic of real power of A phase
93
A Phase Power
6000
4000
0
2000
0
06:275
06:27:58
06,28:00
06:28:02
06:28:04
06:28:06
06:28:08
0628:10
062812
06:28,14
06:28:16
0628:18
06:28:20
Time
Figure 5-5: Fan turning off is fast mode, first harmonic of real power of A phase
25100
U APhase Power
I
0
1 DowJ
1
10000
5000
111
4 16:08
14:16 9
14:16IC
14'6:11
14:1612
14:16:13
14:16:14
14:16:15
14-16:16
14:16:17
14:1618
14:16:19
14:16:20
Time
Figure 5-6: Fan turning on is slow mode, first harmonic of real power of A phase
94
M A Phase Power
2500
2000
1500
1000
500
0
-500
07:01:08
0701-10
07:01:09
07:01 11
Time
Figure 5-7: Fan turning off is slow mode, first harmonic of real power of A phase
incorrectly identified as off transients. This is a basic example with only four transient exemplars, but shows the potential of the application. All machine learning was
locally processed on a standard desktop workstation. Future work is required in order
make the application more robust to common errors such as gaps in data, and testing
on embedded systems.
A large scale field deployment of this application is the next step in working
towards a robust transient detection and identification application.
The method
presented here is able to run on an embedded system, but as more transients are
collected the size of the data may prevent it from being analyzed locally. Ideally
averaged transients will act as exemplars, or a period of training data can be used to
run the clustering. Unlike image processing where similar images can have significant
differences, a machine's electrical transients are nearly identical, and are independent
of the steady state power consumption. Averaging together transients or only using
training data, will greatly decrease the computing power required for this application,
and the overall cost.
95
THIS PAGE INTENTIONALLY LEFT BLANK
4
-
96
Chapter 6
Vibration Tests and Results
This chapter was co-written with Ryan Zachar.
The method to create VTFs described in Chapter 2 was applied onto 5 sets of
rotating machines; 2 in the lab and 3 in the field. The systems tested in the lab
include a purpose-built test platform with a coupled DC motor and AC generator as
well as a test stand with two 5 KW generators driven by DC motors. The first field
tests were conducted on nine 60 KW generators at the BCIL. The final 2 field tests
were conducted on board an active MCM in San Diego, CA. The ship's 3 SSDGs and 2
auxiliary seawater (ASW) pumps were tested over a week long period. The equipment,
test setup and results for each experiment set are presented in the following sections.
6.1
Hardware used for Speed and Vibration Data
Collection
A mobile, rugged kit was developed with all of the sensors and tools needed to obtain
the necessary data to create the VTFs. The Vibration Information Box- Portable
(VIB-P) was constructed to deliver high quality sensors to the field in a self contained
case which requires only a laptop and standard outlet to operate. The shell of the
97
VIB-P is a Nanuk 920 locking case with an aluminum plate to provide mounting for
various data acquisition and power supply modules. Underneath the plate is a power
strip for the power supplies and storage for all necessary sensors, cables and other
accessories.
(b) Close in View of VIB-P
(a) VIB-P with Storage Door Open
Figure 6-1: VIB-P
The VIB-P contains 2 Omega® ACC786A single axis industrial accelerometers
and their associated power supplies. These power supplies are each connected to a
LabJack UE9. There are several options for sensor orientation and placement. For
example, the sensors can be mounted on two separate locations of the machine, above
and below one of the machine's mounts, or on two separate axis (such as the x and
y axis). Each accelerometer has a tap which accepts a 1/4-28 stud for mounting.
Since it would be impractical to mount a stud on every machine being tested, an
alternative method of attachment was needed. Magnets are often used in settings
where the sensor will be moved often, however they could not be used on the MCM
because the SSDGs are made of a non-ferrous material. In order to accommodate
this a set of aluminum mounting blocks were machined, each with a hole to accept
a 1/4-28 stud, allowing it to attach to the accelerometer.
The mounting block is
attached to the measurement point via a 3M CommandTM heavy duty mounting strip.
98
Fig. 6-2 shows the accelerometer and it's mounting block.
Figure 6-2: Accelerometer and Mounting Block
The VIB-P also contains a back EMF sensor.
This sensor measures winding
voltages of an electric machine, which can be used to create a virtual input of speed for
the VTF. Although there are other methods to obtain speed from a rotating machine,
a back EMF sensor is the most desirable. Most generators have a tachometer installed
which gives the operator revolutions per minute (RPM) to ensure the machine is
running properly. On US Navy ships some even record this number at a certain
intervals as part of the Integrated Condition Assessment System (ICAS). Nevertheless
accessing this data and integrating it into the vibration sensor system is problematic
and it is unclear if this data is of high enough fidelity to create a VTF. An independent
tachometer could be mounted on the machine to record the spin-down speeds and
be easily integrated into the vibration sensor system, however it is not ideal for a
portable system. Installing and removing an independent tachometer, especially on
a large machine such as a generator, can take considerable time and effort.
A back EMF sensor is the preferred method for gathering spin-down speed because
it is accurate, portable and easy to install in the field. It does not measure the speed
directly, rather it measures the residual voltage as the machine spins down, whose
curve resembles the decreasing speed. In order to use the back EMF sensor, the
steady state operating speed before shutdown must be used as a reference point. The
remaining speeds extracted from the back EMF signal are dependent on the initial
speed given. Fig. 6-3 from [23] shows a demonstration of how the speed estimate
99
determined from zero-crossings of back EMF data compares to the speed obtained
from a shaft encoder.
0
0
U_
2
W,
Back EMF Sensor and Spin-Down Speed
6
Back EMF
- 20
4
Zero Cross Speed
2-.....
Encoder Speed
a.
2
- 15 2
0
10
-2
5
-4
-6
-L
c
12
13
Time (sec)
0
14
Figure 6-3: Back EMF Zero Cross and Encoder Speeds
The back EMF sensor uses differential capacitive sensing to detect the electric
field generated by the phase lines to the motor a generator. Fig. 6-4 is a schematic
of two identical halves of the back EMF sensor.
Three copper plates electrically
connected to a circuit board are zip tied onto the phase lines coming directly off of
the generator. 1 plate connects to the + side of the AD8421 differential amplifier, a
second plate connects to the (-) side of the first AD8421 as well as the (+) side of the
second AD8421, and the third plate connects to the - side of this second amplifier.
The voltages generated on the sensors correspond to the line-line voltages of the
If it is thought of as the the
generator, for example GAVA-B, GBVB-c and GCVC-A.
first, second and third plates reading phases A, B and C respectively then 1 amplifier
would read Ga(VA
-
gain of the amplifier,
VB) and the second would read Ga(VB
VA
is the voltage off of phase A,
VB
-
VC), where Ga is the
is the voltage off of phase
B and Vc is the voltage off of phase C. This method allows any background 60 Hz
disturbances to be subtracted out in further processing.
The back EMF sensor is connected to a power supply via an Ethernet cable,
which outputs the 2 back EMF measurements as
5V signals. Fig. 6-5a shows the
back EMF sensor and Fig. 6-5b shows the sensor leads connected to the phase lines of
of a MCM generator. The 2 vibration and 1 back EMF power supplies connect to a
100
VA+490
V44
2 1 1-
8513
1MO
47kO
22
ref>
1
A
r f 22p F
-
2
99() M 1kO
G42
-8,
.k
L
1 2 .1k O
A
VB
47kW
-
1M
vcM
G
490
VC
-D2
2pF
1kO
AD851
re
2.2piF
12. 1kM
AD8513
--
Figure 6-4: Back EMF Sensor Schematic
LabJack UE9, which converts the analog data into a digital representation with 16-bit
precision. The LabJack is connected to a computer via either Ethernet or USB. A
program called LJStreamUD is available from www. lab jack . com, and offers plug
and play installation on a PC. Data can also be read from the LabJack with a Python
code known as ethstream, created by Jim Paris [21]. The VIB-P proved to be a rugged,
easy to use, all-in-one tool kit for measuring the data needed to construct a VTF both
in the lab and in the field. The following sections describe these experiments.
(a) Back EMF Sensor
(b) Sensor on Phase Lines
Figure 6-5: Back EMF Sensors
101
6.2
Lab Motor Tests
A test stand consisting of multiple motors was constructed in the Laboratory for
Electromagnetic and Electronic Systems (LEES) in order to develop and test the
methods for constructing VTFs. The Motor Mount Test Platform (MMTP) contains
a DC permanent magnet motor with duel couplings.
One end is coupled to a 3
phase induction motor, which emulates a generator, and the other is connected to
a single phase synchronous AC motor, which is disabled so it acts only a flywheel.
The purpose of this flywheel is to add mass to the rotation and extend the spin down
time to a similar length as that of the MCM generators. The MMTP is depicted in
Fig. 6-6. The DC driving motor is in the center, the induction motor is on the right,
and the flywheel is on the left.
Single phase AC
synchronous
motor (flywheel to
extend spin-down)
3
aluminum
s8"
subbase
DC permanent magnet
motor ("Prime Mover")
8 evenly spaced bolts with
swappable vibration
reducing sandwich
mounts
3-phase induction
motor
("Generator")
Connection point to add
an imbalance
Back EMF sensor
installed in motor
terminal box
Industrial vibration
sensor with tapped
connection to
subbase
Figure 6-6: Motor Mount Test Platform
The three machines are mounted onto a single aluminum subbase, which emulates
a subbase typical generator sets are mounted to. The subbase is mounted to a steel
box girder with vibration reducing mounts at eight points. A second shaft coupler is
attached to the induction motor as an attachment point for an imbalance. A 1/4-20
screw fits into the insert for the set screw of the coupling, and washers can be added
to create a mass which will imbalance the machine. This is done to simulate a rotor
102
imbalance, a type of machinery fault, which will appear as an increase in vibration
magnitude at resonance. The MMTP is designed so the mounts can be changed out
easily. The subbase simply needs to be lifted off of the mounts while they are changed
and then set and bolted back down. There are 4 eye-bolts which allow the assembly
to be lifted with a shop crane via a four-leg bridle. The motors never need to be
realigned after initial alignment since they are fixed to the plate and never move.
This is critical as it reduces the chance that a factor other than a mount change or
imbalance would affect the vibration of the machine.
Five commercial vibration dampening mounts of different durometer were used to
emulate a scenario where the mounts stiffness increases or decreases over time. The
mounts were all cylindrical and had the same dimensions: diameter of 3.81 cm and
height of 2.54 cm. Durometer is a measure of hardness often used to describe the
rubber used in vibration dampening mounts. Different scales are used for durometer
depending on the hardness of the material; the A scale is used for softer materials
such as elastomers, while the D scale is used for a harder material such as a plastic.
All mounts used for testing on the MMTP use the A scale. The five mounts had
durometers of 30A, 40A, 50A, 60A and 70A. The mounts are made of silicone which
is sandwiched between two steel plates. There is a 3/8"-16 mounting stud on one end
and a 3/8"-16 insert on the other for mounting to the aluminum subbase and steel
girder. Fig. 6-7 shows the 5 types of vibration reducing mounts used for testing with
the MMTP.
Figure 6-7: Vibration Reducing Mounts used with MMTP
103
An estimated resonant frequency for the system with each mount can be calculated
if the mount properties and system weight are known using the equation
Wf
1
=2w
k
M
(6.1)
where k is the axial stiffness and M is the mass per mount. M is simply the total
mass of the system (57.24 kg) divided by 8 since there are 8 mounts. k is determined
using
k=
(6.2)
L
where A is the cross sectional area of the mount (1.14 x 10-
m), E is Young's
Modulus, and L is the length, or height, of the mount (2.54 x 10-2 M).
The durometer can be converted to Youngs modulus for elastomers in several ways.
Equations exists which exploit a linear relationship between durometer, which is a
hardness measurement, and Young's modulus, which measures stiffness of an elastic
material. Mix and Giacomin present a method for determining a standardized Young's
modulus from the durometer which takes into account different indentation mechanics
in [7]. Their method is applied in a simple to use mobile app, DuromodTM, which easily
converts the durometer to Young's modulus. Table 6.1 shows the estimated resonant
frequencies for each mount durometer.
Estimated Resonant Frequency (Hz)
30A
15.5
40A
18.9
50A
22.8
60A
27.6
70A
34.2
Table 6.1: Estimated Resonant Frequencies
The MMTP is powered by a DC power supply, which connects to the DC motor
that in turn drives the other two machines. The power supply provides constant
voltage, and the operator can vary the voltage to change the operating speed of
the motor. A US Digital E3 shaft encoder delivers real time revolutions per minute
(RPM) to the operator, which can easily be converted to Hz.
Sensors from VIB-P were installed on the MMTP using a 1/4-28 stud and taps
104
in the subbase and steel girder. The three leads from the back EMF sensor were
originally zip tied onto the three phase lines of the induction generator, however
initial tests revealed that the resulting back EMF pick-up was insufficient for reliably
inferring speed. Therefore, the leads were removed from their protective plastic and
wrapped directly on the wire and covered with electrical tape. The entire sensor unit
was sealed in the metal terminal box to minimize background 60 Hz noise. Although
this departs from how the sensors are attached in the field, this was deemed acceptable
based on the small size of the test motor and the fact that even the smallest generators
tested produced large enough back EMF to be distinguishable from 60 Hz interference.
Two test procedures were run on the MMTP: steady state and spin-down. Steady
state tests were used to verify the VTFs produced via the spin-down tests.
The
following 2 sections describe these tests and their results.
6.2.1
Steady State Tests
A actual FRF can be created by running a motor at several steady state speeds
between 0 an its operating speed and measuring the vibration response at each speed.
This FRF can be compared to a VTF created by spin-down analysis to determine
how well the method is estimating vibration levels at known frequencies. Multiple
steady state tests were conducted on versions of the MMTP until consistent results
which agreed with the theory were obtained. The original MMTP, shown in Fig. 68 included two subbases, one for the driving DC motor and a separate plate for
the induction motor. The original MMTP also only had a single power supply and
no automation, meaning the steady state tests were conducted by manually setting
individual voltages and running the MMTP at the desired speeds each for 35 seconds.
The RMS of the last 30 seconds of vibration for each speed was taken, divided by
speed squared and plotted against speed to produce a steady state FRF. These early
steady state tests of the MMTP did not show a clear resonant peak, which led to
a belief that the multiple mounting surfaces were causing the true resonance to be
masked in some way.
Although this demonstrated an interesting phenomenon, it was desired to have
105
Figure 6-8: Original MMTP with Multiple Subbases
only a single resonant peak so as to replicate a field generator as best as possible.
Studying the effects of multiple mounting plates on a coupled machine's resonance is
an area for future study. In order to eliminate the multiple peaks, a single subbase
system was designed and built, as described in the previous section. The first mounts
installed were 50A durometer vibration dampening sandwich mounts with a 5 cm
diameter and 5 cm height. A steady state test was run on this configuration from
speeds 5-60 Hz, and a clear resonance was identified at 28.5 Hz. Fig. 6-9 displays the
steady state RMS vs frequency plot for this configuration.
The presence of a distinct resonant peak in the plot indicated that the MMTP was
robust enough to serve as the base setup for future experiments with minor changes
to the setup and method. The original 50A durometer 5 cm diameter mounts were
substituted by the 5 types of mounts described in the previous section in order to
control every part of the mounting except for the durometer. An automated system to
control the DC power supply and allow steady state FRFs to be generated easier and
more accurately was also incorporated. This automated system included a method
to eliminate the rapid increase in vibration magnitude at low frequencies. FRFs were
generated for 10 MMTP configurations, which were a baseline with each of the 5
mounts with no imbalance and an identical set of tests with a 17g imbalance placed
on the rotor.
The automated steady state Python script interfaces directly with the VIB-P and
106
Steady State Vibration Resonance
I
I
I
I
--*
-116
50A Large Mounts
Reso nant Peak
-
-114
-118
- -120
-122
-
-124
-126
-128
-130
-132
10
15
I
I
I
20
25
30
I
35
Frequency (Hz)
I
i
i
40
45
50
55
60
Figure 6-9: MMTP with Single Subbase Steady State RMS Response
MMTP via a dedicated Linux workstation. The script can be used to command these
speeds, measure the vibration, and create the FRF. After the voltage is commanded
and the motor begins spinning, the script uses a shaft encoder to determine the
speed of the motor. After the next voltage is commanded, the vibration data is read
from the previous speed using ethstream and stored in a temporary file. The first 3
seconds of data is removed to account for the system settling, and the remaining data
is run through a function to determine Welch's power spectral density estimate. This
returns a steady state fast Fourier transform (FFT) for the period of vibration data.
The peak of the power spectral density at a frequency closest to but greater than the
measured speed of the motor is taken as the vibration magnitude at the measured
speed. Fig. 6-10 shows the steady state FFT at an individual frequency, as well as
the measured speed and point estimate for vibration magnitude. This magnitude is
divided by the speed squared and plotted to produce the FRF, shown in Fig. 6-11.
The script controls the MMTP by commanding voltages at certain intervals and time
durations as specified by the user. The voltage commanded is the one outputted by
the first power supply, which must be converted from a 0-60 V voltage to a 0-5 V
107
voltage to drive the large power supply, which will deliver to the motor a voltage
between 0-200V. The factor between voltage commanded to the small power supply
and voltage driven to the motor is 3.33. The motor spins at 60 Hz around 86.6 V,
meaning the maximum voltage set in the script is 26 V. The minimum voltage was
typically set to 5 V, which corresponds to about 11.5 Hz. This is the minimum speed
frequency where useful vibration data was observed. The user can also specify the
time to hold at each voltage, in addition to a built in 5 seconds for each step. A 4
second user specified hold time, for a total of 9 seconds at each voltage, was deemed
adequate.
Steady State FFT
105
104
--
10
0
'10
20
-
40
30
"uency
FFTJ
-- Measured Speed
S*Point Estimate
so
d
(Hz)
Figure 6-10: FFT at Individual Frequency
The results from the 10 MMTP configurations on which the automated steady
state script was run can be seen in Fig. 6-12. The resonant peaks moved in a matter
that was expected.
The mount with the lowest resonant frequency was the 30A
durometer, and the resonant frequency rose as the durometer rose. The magnitude of
the resonant peak also rose when an imbalance was imposed without a significant shift
in resonant frequency compared to the baseline condition with the same mount. The
imbalanced cases actually produced clearer FRFs than the baseline cases, which makes
sense since there is a better signal to noise ratio with higher vibration levels. The
108
Steady State FRF
75-
7065-
w60-
-
55
-
C0-50
D60 Imbalanced Steady State
45-
40-
10
15
20
25
30
35
40
45
50
55
60
Frequency (Hz)
Figure 6-11: Steady State Frequency Response Function
baseline cases often had multiple humps in the data near the resonant frequency, while
the imbalanced cases always had very clear resonant peaks. The primary purpose of
the steady state FRF generation tests was to ensure the mount frequencies changed as
expected and that the estimated FRFs, or VTFs derived from the spindowns produced
similar results. The first part of this is shown in Fig. 6-12, and the second part will
be investigated in the following section.
6.2.2
Spin-down Tests
Testing the impacts of different mounts and imbalances using spin-downs and VTFs
was the primary goal of the MMTP since it most closely matched the tests conducted
on the field motors and generators.
The MMTP configurations run through the
spin-down tests were the exact same as those run through the steady state tests.
Spin-down tests were initially conducted by bringing the DC motor to 3600 RPM
by referencing the encoder reading and adjusting the power supply voltage. After a
stabilization period of at least 5 seconds, the large DC power supply was turned off
at the power switch, so there was no power provided to the motor and it could spin
109
MMTP Steady State Frequency Response Functions
-
70
607C)
-
50
0)
-- D30 Baseline Steady State
---D30 Imrbalanced Steady State
Baseline Steady State
Imbalanced Steady State
D50 Baseline Steady State
D50 Imbalanced Steady State
Baseline Steady State
-D60
- - - D60 Imbalanced Steady State
D70 Baseline Steady State
- - D70 Imbalanced Steady State
-40
.40
- - D40
>-
30
20
5
10
15
20
25
35
30
Frequency (Hz)
40
45
50
55
60
Figure 6-12: Steady State FRFs for 10 MMTP Configurations
down as an open-loop. After 5 seconds in an "off" condition, the power supply was
restarted and the motor brought to 3600 RPM again for a second run. A total of 4
spin-own runs were conducted for each mount/imbalance configuration. A function
was eventually added to the automated steady state FRF generator which included
a spin-down analysis portion.
The spin-down tests on the MMTP produced VTFs which generally agreed with
predictions. As the durometer of the mount increased, so did the resonant frequencies
on the VTF. Table 6.2 contains the resonant frequencies and peak amplitudes. The
resonant frequencies on the VTFs did not match the predicted frequencies derived
based on mount characteristics. One of the possible reasons for this is the MMTP
has several degrees of freedom. Although vibration is only being measured in the
vertical (z) direction, the system is actually moving in the x and y direction, as well
as pitching, rolling and yawing. Since the MMTP is moving in so many directions
it does not agree with a perfect eccentric spring mass damper theoretical system.
Nevertheless as long as the sensor is at the same point and axis, comparisons can
drawn which provide valuable information about the system.
110
30A
40A
50A
60A
70A
Predicted
Freq. (Hz)
15.5
18.9
22.8
27.6
34.2
Baseline
Freq. (Hz)
22.2
26.1
32.7
38.5
44.3
Imbalanced
Freq. (Hz)
21.8
25.6
31.2
36.4
41.4
Baseline
Mag. (dB)
-6.1
-4.8
-5.7
-6.4
-4.5
Imbalanced
Mag. (dB)
5.8
7.14
6.3
5.7
7.3
Table 6.2: Predicted and Actual Resonant Frequencies and Magnitudes
An increase in vibration magnitude at resonance was seen when an imbalance
was applied for each mount. As the durometer became lower, the imbalance also
tended to shift the resonant frequency even lower. Fig. 6-13 shows the VTFs of the
10 MMTP configuration tests. Each configuration has all four spin-downs plotted
in order to see the grouping within the same configuration. During the majority of
each spin-down, and most importantly during the time of resonance, the VTFs for
the same configuration are nearly identical, which inspires confidence in the method
and the control of the experiment.
MMTP Spin Down Vibration Transfer Functions
10 0-
-
-10
___Baseline with Flywheel Coupled Durometer 30A
-- Baseline with Flywheel Coupled Durometer 40A
Baseline with Flywheel Coupled Durometer 50A
-
-30
-
-40--
Baseline with Flywheel Coupled Durometer 60A
Baseline with Flywheel Coupled Durometer 70A
- Imbalanced 17g Flywheel Coupled Durometer 30A
- -Imbalanced 17g Flywheel Coupled Durometer 40A
Imbalanced 17g Flywheel Coupled Durometer 50A
Imbalanced 17g Flywheel Coupled Durometer 60A
- - Imbalanced 17g Flywheel Coupled Durometer 70A
60
55
50
45
40
35
30
Frequency (Hz)
-
10
15
20
25
Figure 6-13: VTFs from 10 MMTP Configurations
The VTFs produced using the spin-down method were also compared to the FRFs
111
produced in steady state tests. Fig. 6-14 shows an example of a steady state FRF
plotted over a spin-down VTF. For this test the motor was run in steady state at
105 frequencies.
Although they are not exact copies of each other, the curves are
very similar and show virtually the same resonant peak. The spin-down VTF may
appear much smoother because the virtual input spans more frequencies than the
steady state FRF. It also has an envelope taken of the response's FFT while only the
pure response is plotted for the FRF. For clarity this is the only comparison shown,
however the FRFs and VTFs for each of the 10 configurations all matched in similar
ways.
75 -
Transfer Function
Comparison Between Steady State FRF and Spin-Down Vibration
7065-
-
60
c 55-
-D60
-60
50 -
Imbalanced Steady State
Imbalanced Spin-Down
45-
40
10
15
20
25
30
35
Frequency (Hz)
40
45
50
55
60
Figure 6-14: Steady State FRF vs. Spin-Down VTF for D60 Imbalanced Configuration
The MMTP was also used to test different sensor configurations. Although the
MMTP is equipped with a mounting stud for the accelerometer, field tests on the
MCM used a mounting block with a CommandTM strip. In order to ensure that the
mounting strip did not affect the measurements, a second accelerometer was mounted
to the subbase using the mounting block to see if it had any effect. A comparison
of FRFs showed no difference in the resonant peak, confirming that the mounting
112
block was an acceptable way to temporarily mount the accelerometers to a machine.
Fig. 6-15 shows the VTFs from the two accelerometers in spin-down tests with 30A
durometer mounts.
Mounting Block Vs. Stud on MMTP
10
m
D30 Imbalanced with Mounting Block
0130 Imbalanced with Stud Mounting
5-
0
0
CU
.- 10
5
-20
10
15
20
25
30
35
40
45
50
55
60
Frequency (Hz)
Figure 6-15: Mounting Method Comparison for D30 Imbalanced FRFs
Tests were also conducted to see the effect of different sensor orientations on the
VTF. For these cases the x-direction can be thought of as being the long dimension
and going lengthwise along the MMTP subbase. The y-direction covers the width,
or short portion, of the subbase.
The z-direction is the direction used for every
test up until this point, and comes out of the subbase. Fig 6-16 shows VTFs for
spin-downs with each sensor orientation. When the sensor is in the y-direction the
resonant peak appears to shift to the left significantly. When it is in the x-direction
there is not a clear resonant peak.
Since the results were so consistent with the
normal mounting orientation it was determined it was acceptable to use this for all
other tests. Nevertheless the vastly different VTFs exposed just how many degrees of
freedom are inherent in the MMTP. Since the vibration reducing sandwich mounts are
flexible, the MMTP is actually free to move in 6 directions, as mentioned previously.
Understanding each of the motions of the MMTP and their impact on VTFs is an
113
area for future study.
Effect of Sensor Orientation on VTF
100-
9080R 70CD
a 060-
> 50
(X-Direction)
-Lengthwise
-Widthwise
(Y-Direction)
-Normal
(Z-Direction)
40-
30
0
10
20
30
Frequency (Hz)
40
1
1
50
60
Figure 6-16: Comparison of VTFs for Different Sensor Orientations on MMTP
The MMTP proved an invaluable test setup for developing, testing and verifying
the method used to construct VTFs. Seeing that the VTFs matched the steady state
FRFs, and that the resonant peak moved as expected was enough to prove that the
method to construct VTFs was suitable to run with other tests on non-purpose built
platforms. There is still much work that can be done with the MMTP. The effect
of a single bad mount, different subbase balancing and external vibrations below
the subbase are just a few possible tests which may lead to interesting results. The
MMTP can also be used to integrate a smaller sensor than those included with the
VIB-P, including those envisioned by the vibration assessment monitoring point with
integrated recovery of energy (VAMPIRE) project.
6.3
Lab Generator Tests
A pair of two 5 KW generators used for DC electric drive research in LEES were
used for concept testing the VIB-P. These were the first generators on which the back
114
EMF sensor was installed, and were an important development tool for the VTF
generation algorithm. Each generator is driven by a belt from 2 DC motors coupled
in parallel. There are no vibration dampening mounts; the generator and motors are
mounted directly to a steel strut, which is bolted to a bench. The two generators are
identical and during normal operation are braced to each other with an aluminum
bar connecting to the top of each. Two accelerometers were mounted 90' to each
other directly on the generator being tested. The z sensor is vertical (coming out of
the bench) and the y sensor is horizontal (lengthwise along the bench). The back
EMF sensor is zip tied onto the 3 phase lines residing in the terminal box on top
of the generator. Fig. 6-17 shows the test setup and sensor placement on 1 of the 2
generators.
Figure 6-17: Sensor Mounting on Lab Generators
There were two periods of testing on the lab generators, conducted on separate
days. For the first day, each generator was run through 3 spin-downs in each of 3
configurations, for a total of 9 spin-downs per generator. The first configuration was
a baseline, where the generator was unaltered from its normal state of operation. The
second configuration involved loosening a single mounting bolt, and the third had a
weight added to the outside of the generator's belt drive, creating an imbalance on the
rotor (the loose bolt was tightened before this test commenced). The system which
runs the generator setup operates by first bringing the generator up to its steady state
115
speed with the field current applied. The operator then turns off the field current
in order to simulate the generator being in a cool down state before finally cutting
power to the DC motors. The spin-down lasts approximately 11 seconds.
The back EMF and vibration data was run through the same VTF generation
method that was used for the MMTP, with the speed extracted from the voltage
difference using the Hilbert transform. Results for individual generators in the first
day of testing showed little difference in VTFs between the configurations. All spindowns with the x-axis sensor had a characteristic resonance at approximately 8.3
Hz. There was a clear difference between the magnitudes at resonance between the
2 generators for each configuration, with generator 2's being higher. There was not
a significant change in resonant frequency or magnitude as the bolts were loosened
or the imbalance added. Since the resonant frequency is consistent between the two
generators and only the magnitude changes, the VTF predicts a possible greater
imbalance in generator 2. Fig. 6-18 shows the combined VTFs of the lab generators
from the first day of testing.
Generators I and 2 Comparison (Day 1)
10-
-510
7
-Gen. 1 Baseline
-- Gen. 1 Imbalance
- -Gen.1 Screw Loose
-Gen. 2 Baseline
Gen. 2 Imbalance
- Gen. 2 Screw Loose
-25
-30-
-0
2
4
6
8
10
Frequency (Hz)
12
14
16
18
20
Figure 6-18: Day 1 of Testing on Lab Generators
The goal of the second day was to force the VTFs within generator data sets to
116
move through more extreme changes due to alterations in mounting and an imbalance.
Since the goal was only to see the effects in the context of one machine, only generator
Instead of only loosening 1 bolt like the first day, all 4 mounting
1 was tested.
bolts were loosened. The weight of the imbalance was also increased significantly.
Finally, the stabilizing bar was removed for all configurations in order to to give the
generator more freedom to move in the destabilizing cases. For day 2 testing, the 5
configurations tested were baseline, 4 bolts loose, heavy imbalance, and baseline with
bar reattached. Results from these tests can be seen in Fig. 6-19. All cases have
nearly the same resonant frequency, however the imbalanced case has a magnitude
which is clearly higher, supporting the theory that and imbalance raises the vibration
magnitude at resonance, but doesn't shift the peak. The 4 bolts loose case did not
shift the resonant frequency, however they did increase the magnitude very slightly.
In the baseline with bar case, the vibration levels during higher frequencies were
much. lower. This makes sense because the stabilizing bar is likely in place to reduce
vibration when the machine is running at steady state.
Generator I (Day 2)
20-
-Baseline
Bar Attached
Imballance
-All
Bolts Loose
15 10
O-o
U)
0C-5-
-10-15-
-20-25'
0
2
8
10
r e6
Frequency (Hz)
12
14
16
1t
2U
Figure 6-19: Day 2 of Testing on Lab Generators
All previous VTFs were generated using vibration data from the vertical ac117
celerometer only.
One of the goals of the lab generator tests was to see if there
were any differences in VTFs if the sensor orientation was different. The VTFs for
day 2's tests were regenerated using the horizontal accelerometer's data and overlaid
onto the VTFs from the vertical sensor, as can be seen in Fig. 6-20. There was no
discernible resonance when the horizontal accelerometer was used, reinforcing the fact
that the vertical sensor was best for future applications.
Vertical and Horizontal Sensor Comparison (Generator 1, Day 2)
30-
Baseline (X)
--- Bar Attached (X)
Imballance (X)
All Bolts Loose (X)
1Baseline (Y)
----Bar Attached (Y)
Imballance (Y)
All Bolts Loose (Y)
20
M
0
20
-30
-40
0
2
4
6
8
10
12
14
16
18
20
Frequency (Hz)
Figure 6-20: Impact of Sensor Axis on FRFs
The lab generator testing had two primary goals: to serve as a systems integration
test for the VIB-P and to assist in the development of the VTF generation algorithm.
The first goal was fully achieved as these tests were the first of the fully functional
VIB-P. The back EMF sensor proved it could pick up the voltage from a generator
during spin-down and reliably estimate the speed. The second goal was partially
achieved. Although reliable VTFs were eventually generated from the data, there
was no shift in resonant frequency observed in any of the tests. Since the generator
was hard mounted, it was not possible to alter the mounting to force a shift other
than loosening the screws, which did not seem to have a significant effect.
118
6.4
Fort Devens Generators
Following successful tests on the lab generator, the VIB-P was brought to the BCIL
for testing on their field generators.
The BCIL is a fully functional, 150 person
deployable base camp used by the US Army for training and to test new technologies.
Its electrical distribution system can be configured to run off of a micro-grid powered
by 18 low noise, field portable generators, each rated at 60 KW. Each generator is
driven at 1800 RPM by a 6 cylinder diesel engine. The generators and diesel engines
are each mounted on a skid and enclosed in a case to protect the components and
allow easy movement. A total of 9 Devens generators were run through a series
of spin-downs.
A fully instrumented Devens generator can be seen in Fig. 6-21.
The back EMF sensor leads were zip tied onto the phase lines on the left side of
the assembly, and the accelerometers were placed in various areas around the prime
mover on the right side. All tested generators were identical and there were no known
issues reported to the test team.
Figure 6-21: Fully Instrumented Generator at Fort Devens
Each generator was run through 3-7 spin-downs.
For each spin-down, one of
the accelerometers was placed on the mounting plate directly attached to the diesel
119
engine and above a rubber vibration reducing mount, as seen in Fig. 6-22.
This
allowed the generators to be compared to each other and verify the consistency of
VTF generation. The other vibration sensor was placed in various locations to allow
comparison between different areas of the generator set and different orientations.
The other areas included the enclosure base, forward mounting plate, and top of the
diesel engine.
Figure 6-22: Sensor Placement on Devens Generator
The Devens generators have a very short spin-down time, roughly only 2 seconds.
The data was first run through the original VTF code which uses a Hilbert transform to determine the spin-down speeds. However the transform fit from the back
EMF data had significant ripple, and was unsuitable for use in the rest of the VTF
generation algorithm. The zero crossing method, which was developed for the MCM
generator spin-downs, was used instead since it was able to produce a smoother, more
realistic curve.
The grouping of VTFs for spin-downs on each individual generator was very consistent. Fig. 6-23 shows the VTFs generated for the first 3 spin-downs of each generator
using the primary sensor, which was above the mounting plate for the diesel generator. 6 of the 9 generators had very similar VTFs; even though there did not appear
120
to be a clear resonace the curves all leveled out around 17 Hz. Each generator had
a vastly different VTF above this frequency, with the magnitudes near the steatdy
state operating speed spanning a range of over 30 dB. The VTF for Generator 14 had
the most significant deviation from the other VTFs and was shifted to the left and
elevated. Since this generator presented the most interesting case, it was investigated
further.
Fort Devens Generator Testing
9
-Generator
9
Generator 10
---Generator 14
21
-Generator
Generator 21
-- Generator 22
-- Generator 23
---Generator 24
10
5 -0
-
--
-Generator 25
W-10
2 -15
0,
-30
1
5
10
20
15
25
30
Frequency (Hz)
Figure 6-23: Devens Generators Spin-down FRFs
One theory for such a shift was that the mounts might not have been tightened
to the proper level. Even though tests on the lab generator did not show a significant
shift when the mounts were loosened, this possibility was still investigated since the
Devens generators have actual vibration reducing mounts. To test the effect of loose
bolts, the 8 bolts connecting the MMTP to it's mounts were loosened. A comparison
of the VTFs between the baseline condition and the loose bolt condition can be seen in
Fig. 6-24. There was no noticeable shift in resonant frequency between the baseline
and loose bolts case, and the magnitudes were identical, making the possibility of
a loose mount causing such a large change in resonance on the Devens generator
unlikely.
121
D40 Baseline vs. Screws Not Torqued
0-
- Baseline
-8
Loose Screws
-5-
-10Co
S-150
.6
0
-25
-30
-35
10
15
20
25
30
40
35
Frequency (Hz)
45
50
55
60
Figure 6-24: Impact of Loosening 8 Bolts on MMTP
The primary goal of the tests on the Devens generators was to test the VIB-P and
VTF generation algorithm on a machine in the field. These were the first machines
tested that were not in the lab, and since there were 9 available for testing the team
was able to see how consistent the machines were with each other. The fact that 2/3
of the machines had identical VTFs validated the test system and associated VTF
generation code. One unique aspect of the Devens generators compared to the other
machines tested was the extremely short spin-down time. It is unknown if the Devens
generators operate on a closed-loop system, where the spin-down is artificially braked,
or an open-loop which would allow a natural spin-down. This may partially explain
why the VTFs were so different at high frequencies and why there lacked a clear
resonance. Investigating the effect of this shorter spin-down on the VTF generation
is an area for future study.
122
6.5
MCM Tests
Testing on in-service MCM generators was the primary motivation for developing the
VIB-P and VTF generation method. Several spin-down tests were conducted on the
USS CHAMPION (MCM 4) between 14-22 February 2015. CHAMPION is a 68 m,
1312 t Avenger class mine countermeasures ship commissioned in 1991. The ship is
designed to hunt mines with sonar and remotely operated vehicles as well as sweep
for mines with an influence sweep cable. Since the ships are designed to operate in a
minefield, there are several design characteristics which make them unique to other
navy ships. Specifically, Douglas fir coated with glass-reinforced plastic is used for
the hull in order to lower the magnetic signature. The machinery is also designed
to have low magnetic and acoustic signatures.
The main engines and SSDGs are
made of non-ferrous materials and have resilient mounts which reduce vibration and
transmitted noise. CHAMPION is depicted in Fig. 6-25.
Figure 6-25: USS CHAMPION (MCM 4)
The SSDG is a 375 KW, 450 Volt, 601 Amp, 3-Phase, 60 Hz, 1800 RPM generator
set. The prime mover is an Isotta-Fraschini 6-cylinder diesel engine. There are 3
SSDGs on each MCM; 1A and 1B are in a forward auxiliary machinery room (AMR)
to the port and starboard of centerline. SSDG 2 is centerline in the main machinery
room (MMR), aft of the AMR. There are 2 electrical buses, with SSDGs 1A and
1B feeding the forward bus and SSDG 2 feeding the aft. Although the buses can
123
be connected, the plant is generally operated with SSDG 2 always on-line feeding
the aft bus, and either 1A or 1B feeding the forward bus. A side view of a SSDG
on CHAMPION can be found in Fig. 6-26a and a front view in Fig. 6-26b. The
generators go through a 5 minute unloaded cool down upon being removed from the
bus before shutting down. The spin-down on an MCM SSDG is about 9 seconds.
(a) SSDG Side View
(b) SSDG Front View
Figure 6-26: SSDGs on CHAMPION
The accelerometers were placed in identical locations on each of the three generators during most their respective tests. One sensor was placed on the subbase directly
above one of the mounts near the forward portion of the diesel engine on the port
side, The other was placed on the ship structure next to the mount on which the first
sensor was placed above. In certain cases one of the sensors was placed on top of the
generator enclosure instead of the ship structure. The back EMF sensor was zip-tied
to the phase lines in the terminal box above the generator, as shown previously in
Fig. 6-5b. Although the back EMF sensor is mostly non-intrusive, it does require
the generator to be "tagged-out", meaning the ship's crew has to mechanically and
electrically isolate the machine, before the terminal box can be opened. Consequently
multiple back EMF sensors were constructed and brought to the ship so each generator could have a back EMF sensor attached for the entire trip, reducing the disruption
124
to the ship's crew and increasing chances to capture spin-down data. The voltage
picked from the phase lines during the initial portion of the spin-down exceeded the
5 V limit of the back EMF sensor, meaning the sensor data clipped, rendering the
Hilbert transform ineffective to extract the speed. The speed was instead extracted
by detecting the zero crossings of the voltage sine wave, as described in Section 2.2.4.
The operating speed of the generator is 1800 RPM, meaning the initial speed must
be set to 30 Hz.
A total of 14 usable spin-downs were measured on CHAMPION; 5 for SSDG 1A, 5
for SSDG 1B, and 4 for SSDG 2. The first 2 spindowns for each generator took place
while the ship was pier-side and on shore power, meaning that none of the generators
were being used to power the ship. There was also minimal other auxiliary equipment
running in the machinery rooms since the ship was not underway. Each generator
was also spun down once more pier-side a few days later, however for each these spindowns the ship was on ship's power, and the generators had been previously loaded.
While underway, SSDG 1A and 1B each had 2 spin-downs measured, and SSDG 2
had 1.
6.5.1
MCM Generator Results
Each spin-down data set was run through the algorithm described in Section 2 to
produce a VTF. Fig. 6-27 shows VTFs for each MCM spin-down, with data taken
from the sensor above the resilient mount. There is consistent grouping within each
generator as well as a clear resonant peak.
The generators also have separation
between each other, exposing the inherent physical differences between the machines.
Generator 1A has a resonance around 18.25 Hz, generator 1B at 19 Hz, and generator
2 at 19.25 Hz. Nevertheless, the aggregate view of all of the generators does not give
a completely clear picture of each test. Some were conducted in-port and others were
underway, when several other pieces of machinery were running.
A more detailed view of the spin-downs for all runs, which focus only at the region
of resonance, can be seen in Fig. 6-28. The first observation that can be made is the
grouping of the two in-port spin-downs for each generator. These were the first tests
125
MCM Generator Vibration Transfer Functions
-
0
_Genenerator 1A
--- Genenerator 1B
----- Genenerator 2
-10
-0
10
20
15
25
30
Frequency (Hz)
Figure 6-27: MCM Vibration Transfer Functions
conducted, and were done on a Saturday while the ship was in-port and on shore
power, meaning there were few crew members on board and very little machinery
running. For each spin-down the crew would start the generator, wait approximately
5 minutes and then put the generator in cool down. Since the generators were never
loaded there was no difference between the generator being "on" or in cool down. As
soon as the first spin-down was complete the process was repeated for a second spindown. While the generators were being spun down there were no other generators
running. In the AMR, where generators 1A and 1B are located, the other machinery
running included an air conditioning (AC) plant as well as a few pumps. In the
MMR, where generator 2 is located, there was only the periodic running of an air
compressor. Although there is some variation between similar generators over the
course of all tests, the consistency within each generator on 14FEB is very good.
This is important because these were the only tests that were able to be conducted
in completely repeatable circumstances. All other generator runs were completed at
moments of opportunity, and the ship's condition varied for each spin-down. Two tests
in the same condition with identical curves for each generator inspire confidence in the
126
method used to produce the VTFs and their applicability to real-world generators.
Comparison of In-Port and Underway Vibration Transfer Functions
-4 -
1A I/P
1AU/W
1B I/P
1BU/W
2 I/P
-.- Gen. 2 U/W
-Gen.
-- Gen.
-Gen.
--- Gen.
-6
- ''---Gen.
~
ca-~
-8 -
.. '
-12
-14
-18-
-201
16
17
19
18
20
21
22
Frequency (Hz)
Figure 6-28: Detailed MCM Vibration Transfer Function Resonances
It was predicted that the underway runs would have higher vibration levels than inport runs, since several additional pieces of equipment, including the main propulsion
diesel engines (MPDEs), were also running. This was the case for SSDGs 1A and IB;
each resonance was slightly higher for the underway case. For SSDG 2, the grouping
was very consistent for all runs except for the 1 underway runs, which was slightly
lower. A more detailed investigation of the steady state data would reveal how much
the external vibration effects the vibration levels above the mounts, and whether this
has a significant impact on the resonance.
There were 3 spin-downs conducted which can be used to compare mount placement on the generator. Fig. 6-29 gives a comparison between one VTF generated
from a sensor placed on top of the generator next to the terminal box, and the other
placed directly above a mount. For each case the overall vibration and resonance was
reduced. The 2 spin-downs for generator 1B had very similar shapes for both mounting locations; however there was a more significant difference in shape and resonance
with the 1A spin-down.
127
-5-A
Comparison Between Sensor Locations on MCM Generators
14FEB Run 1
Gen. 1A 14FEB Run 1
___Gen. 1B 14FEB Run 1
1Gen.
B 14FEB Run 2
--- Gen. 1A 14FEB Run 1 (Top)
-10
Gen. 1B 14FEB Run 1 (Top)
Gen. 1B 14FEB Run 2 (Top)
-15
20
-
-25
-30
I
5
10
20
15
25
30
Frequency (Hz)
Figure 6-29: Impact of Placing Vibration Sensor on Top of Generator
6.5.2
MCM ASW Pump Results
The MCMs two auxiliary seawater (ASW) pumps were also investigated during the
testing period on CHAMPION. The MCM has 2 ASW pumps which operate at 3545
RPM and are driven by a 3-phase AC motor rated at 20 HP. The purpose of the
ASW pumps is to move water from the sea through the ASW cooling system, which
is used to cool systems such as the AC plants. An ASW pump with the vibration
sensors mounted above and below a mount is depicted in Fig. 6-30. The crew had
noted that one of the ASW pumps had recently been overhauled. The last overhaul
of the other ASW pump was unknown, however there were no known issues with it.
Fig. 6-31 shows the resultant VTFs for each of the 8 spin downs.
The VTFs for ASW pumps 1 and 2 are quite different, however both do appear
to have a sort of peak around 45 Hz. The most interesting part of the ASW pump
tests is the dramatic difference between ASW 1 and 2. At the projected resonance of
45 Hz, ASW 2 has a peak about 30 dB lower than ASW 1. The ship's port engineer
confirmed that ASW 2 had been overhauled approximately 1 year prior to the test.
Studying the change of the VTF for ASW 2 over time would potentially show a trend
128
Figure 6-30: MCM ASW Pump
corresponding to degradation of the pump system.
The MCM test demonstrated the feasibility of conducting spin-down vibration
analysis with the VIB-P. The grouping of multiple runs for each machine was very
consistent, and clear trends emerged when comparing machines.
Further tests on
MCM generators, as well as other pieces of rotating machinery, may give additional
insight into the patterns for each machine.
Studying the effects of the machines
location relative to other vibration producing mechanisms would allow a full characterization of an ship's engine room. Finally, being able to diagnose the health of
individual mounts based only on vibrations from a sensor located near the terminal
box would allow further integration with VAMPIRE.
129
MCM ASW Pumps
10-
-ASW
1
0-
-10
CD
-20
0
-
cc
-40-
-50-60
10
15
20
25
30
40
35
Frequency (Hz)
45
50
Figure 6-31: Results of 8 Spin-Downs of MCM ASW Pumps
130
55
60
Appendix A
Vibration Transfer Function Code
function [ virtualinput
, accelx
extractspeed
_ hilbert( data
EMF_1_IDX
I
,...
,EMF_2_IDX
ACCEL_X_IDX
,
ACCEL_Y_IDX
TIMEIDX , . .
DEADTIMEL
,DEADTIME_
SPINDOWNL
,
R, . .
SPINDOWNR, ...
STEADYSTATE_R, . .
STEADYSTATE_L,
RPS
, accel_y
,
plt)
% Step 1: Process EN/IF Data to find the electric
frequency
emf1 = data(: ,EMF_1_IDX) ;
emf2 = dat a (: , EMF_2_IDX) ;
= data(: ,TIMEIDX);
ts
% Find a linear fit between the emf sensors when the motor is
not running
% Use this fit to scale emf2 to emfi, calculate the
difference , the result
% is the EMF without the background "noise"
p = polyfit (emfl (DEADTIMEL:DEAD_TIMER), emf2(DEAD__TIMEL:
DEADTIMER) , 1) ;
emfi
_
fit = emfl*p(1)+p(2)
emf diff = emf2-emflfit;
close
all
131
if plt = 1;
figure
plot (ts , emfl)
hold on
plot (ts , emf2)
plot (ts , emfi fit)
plot (ts , emf_ diff)
legend ('EMF1' , 'EMF2' , ' Fitted EMFI' , ' Diff ')
ylabel ('Voltage (V) ')
xlabel ('Time (sec) ')
title ('Processing Back EMF to Electric Frequency')
fprintf('\t Press [enter]\n')
pause
end
%
%
%
%
%
Step 2: Extract speed envelope from electric frequency
Use hilbert transform to find the envelope of elec freq
process 'too much' so we can remove the ends (+/- ov)
this allows us to remove the startup of the low pass
filter
and the discontinuity at the end for the Hilbert
)
fprintf ('Step 2:
Extract speed envelope from electric
frequency\n')
ov = 300;
elecfreqenv = abs(hilbert(emfdiff(SPIN_DOWN_L-ov:
SPINDOWN -R+ov)) ) ;
low pass (moving average filter
%
elec _ freqenv=filter (ones(200,1) ,200,elecfreqenv);
%
remove the overlap (cuts off the tails so we just have
SPINDOWN
elecfreqenv = elec-freqenv(ov: length (elecfreqenv)-ov-1);
if plt = 1;
Plot envelope extraction routine
%
figure
hold on
size (elec freqenv);
tempts = ts(SPINDOWN_-Iov:SPINDOWNL-ov+s i z e(
elec_ freqenv ,1) -1);
plot (temp_ ts, emf _ d i f f (SPINDOWNL:SPIN_DOWNR));
plot (tempts , elec freqenv) ;
title ('Electric Frequency Envelope Extraction ')
132
legend
(
(
(
'Electric Frequency' ,'Envelope ')
xlabel 'Time (sec) ');
ylabel 'Voltage (V) ') ;
fprintf ('\t
Press [enter]\n')
pause
end
% #/### Step 3: Convert Envelope to speed
% find the mean EMF during steady state at rated RPS
% use the ratio of rated RPS to EF to figure out scaling
% constant to convert elec_ freqenv to speed_env
fprintf ('Step 3: Convert Envelope to speed\n')
STEADYSTATE_L;
STEADYSTATE_R;
ss emf = mean(elec freqenv (STEADY_STATEL:STEADYSTATER));
k = RPS/ss_emf;
speedenv = elecfreq-env*k;
if plt = 1;
%
Plot the motor speed
figure
plot ( ts (SPIN DOWNL:SPINDOWN R) , speedenv);
title ('Motor Speed During Spindown')
xlabel ('Time (sec) ')
ylabel ('Speed (Hz)')
fprintf('\t Press [enter]\n')
pause
end
%%0
%
%
Step 4: Construct virtual input
using speed env construct a virtual
%
algorithm
fprintf ('Step
spindown _ ts =
%
normalize
virtual_ amp =
from speed (I)
input using Chris'
inpu t from speed
(I)\n')
R)-t
s
(SPINDOWNL)
;
t s (SPINDOWNL:SPIN_DOWN_
4:
Construct
virtual
the speed squared
(speed env. 2) ./RPS^2;
virtual__ input = virtual _amp .* sin (cumtra pz (spindownts ,2* pi*
speedenv))
if
plt
%
=
1;
Plot the virtual
input components
133
I
% Normalize the speed envelope to confirm we are getting
% a squared envelope
norm-speed = speed_env./RPS;
figure
hold on
plot (spindown _ts , virtual amp);
plot (spindown_ts , virtual input);
plot (spindown_ts , normspeed);
grid on
t i tle ( ' Building the Virtual Input ')
xlabel ('Time (secs ) ') ;
ylabel ('Virtual Amplitude')
legend ('Amplitude Envelope ','Virtual
Speed Envelope ') ;
fprintf('\t Press [enter]\n')
pause
Input ','Normalized
end
%%
%#// Step 5: Detrend acceleration to remove gravity (0)
%
extract the spindown interval and remove the mean, scale
to g's
%
conversion to g's is 1OOmV/g
fprintf ('Step 5: Convert accelerometer measurements to g (0)\
n') ;
accelx = data (SPINDOWNL:SPIN_DOWN_RACCEL_XIDX);
accel-x = (accelx-mean(accel-x))./0.1;
accely = data (SPINDOWNL:SPINDOWN_R, ACCEL_YIDX);
accel-y = (accely-mean(accely)) ./0.1;
if plt 1;
% Plot the results
figure
hold on
p10 t ( t s (SPIN_DOWNL:SPINDOWN R) , accel x);
p lot ( t s (SPIN_DOWN_L:SPIN_DOWNR) , ac cel _ y);
legend
('Accel
X' , ' Accel Y')
xlabel ('Time (sec) ') ;
ylabel ('Acceleration (g) ')
t i tle ( 'Accelerometer Measurements During Spindown ) ;
fprintf('\t Press [enter]\n');
pause
end
%%0
134
%
////////Step 6:
%
trim
the
fprintf ('Step
L = 4000;
Format outputs
outputs
so we ar e
just looking at spindown range
to the right range\n') ;
6: Trim the inp uts
virtual _ input = virtual_ input
accel-x = accel_x (L:end);
(L: end) ;
accely = accel_y (L:end);
spindown _ ts = spindownts (L: end) ;
spindownspeed_ env = speed_env(L: end);
)
subplot (311)
plot (spindownts , virtualinput , 'g')
title ('Trimmed Inputs to FRF Finder
ylabel ('Virtual Input ')
subplot (312)
plot (spindownts , accelx , 'b
ylabel ('Acceleration X Axis
subplot (313)
plot (spindownts , accel_y , 'k
ylabel ('Acceleration Y Axis
xlabel ('Time (see) ')
fprintf('\t Press [enter]\n
end
function [ virtualinput , accelx , accel_ y
extractspeed zeroX (raw, ...
.
EMF_1_IDX EMF_2_IDX, ..
ACCELX_IDX, ACCELY_IDX
TIMEIDX,
DEAD_TIME_L, DEAD_TIME_R, . .
SPINDOWN_L, SPINDOWN_R, . .
SPINDOWNVALID_L, SPINDOWNVALID_R, . .
FS, RPS,
PolePairs
,
plt ...
%% Step 1: Find EMF Difference
fprintf ('Step 1: Find EMF Difference\n')
emf = raw(: , EMF_1IIDX) ;
emf2
raw (: , EMF_2_IDX) ;
p = polyfit (emfl(DEADTIME
DEAD_TIMER) ,1) ;
emfi
_
L:DEADTIMER),
fit = emfl*p(1)+p(2)
emf diff = emf2-emflfit ;
135
emf2 (DEAD_TIMEL:
if pit
==1;
,
,
figure;hold on;
plot (raw(: , 1) ,emf1) ;
plot (raw(: 1) ,emf2) ;
plot (raw(: 1) ,emfdiff)
grid on
ylabel('EMF Sensor Output (V)')
xlabel('Time (s) ')
title ( 'EMF Fitting ')
legend ( 'EMF' , 'EMF2', 'EMF Difference ')
pause
end
%% Step 2: Only use spindown data from here on
fprintf ( 'Step 2: Only use spindown data from here on\n')
data = raw(SPINDOWN_L:SPINDOWNR,: ) ;
emf_ diff
emf_ diff (SPINDOWNL:SPINDOWNR,:)
ts = data(: ,1) - data (1 ,1) ; % Time with t=0 being the start
of the spindown
%% Step 3: Find Zero Crossings and Convert to Speed Envelope
fprintf('Step 3: Find Zero Crossings and Convert to Speed
Enevelope\n')
% Find Zero Crossings
zerox =
[];
i=1: size (data,1)-1;
if emf _ diff (i ,1)*emf _diff (i +1,1) < 0;
% Look for 2 sequential values where the sign changes
indicating a
% Zero Crossing. From here we just assume the
crossing is linear
% and find the crossing using yzmx+b with 2 known
points
m = (emf_ diff ( i+1,1) - emf diff (i ,1));
b = emf diff(i ,1) - (m*i);
z = -b/m;
zerox = [zerox;z1;
end
.
for
.
end
% Calculate speed using zero crossings on emf
speedz = [0 ,0]; % Initialize speed vector
for i = 1:size (z erox ,1) -1;
% Iterate through the zero crossings
The inverse of the
difference in times between
% 2 succesive zero crossings multipled by (FS/2) is equal
136
%
%
t
t2
z
to speed. We
use (FS/2) , because 2 zero crossings only gives us half
a period of
the waveform.
= zero x(i ,)
zero x(i+1,1);
(FS/2)/(t2
-
tI);
end
speed_z(:,2) = filter (ones(10,1) ,10,speed_z(:,2));
speed z
% Speed Z coll = index of zero crossings
col2 = estimated speed
%
if plt ==;
figure ;hold on;
%
speedz(i ,1) = zero_x(i ,1)
speedz(i,2) = z;
Filter
plot (ts , emf_ diff)
)
scatter(zerox(:,1)/FS,zeros(size (zerox,1) ,1),'r
%ylim ([-10,601)
grid on
title ('Clipped Sensor Difference With Zero Crossings
Marked')
legend ('Voltage Sensors Difference ' ' Zero Crossings ')
xlabel ('Time (seconds)')
ylabel ('Voltage (V) ')
pause
end
%% Step 4: Fit an exponential to the speedz vector
fprintf( 'Step 4: Fit an exponential to the speed z vector\n')
s = SPINDOWNVALID_L;
e = SPINDOWNVALID_R;
zfitdata
= speed_z;
zfitdata
= zfitdata(s
< z-fitdata(:,l)
,:)
zfit
_data
= zfit
_ data(e > zfit
_ data(: ,1) ,:)
data(: ,2)
z_ fit = fit (z-fit data(: ,1) ./FS, zfit
speedzfit
= feval(zfit
, ts (: ,I));
,
'expl ')
speed = speedz_fit ./ PolePairs;
if plt =
1;
figure ;hold on;
plot (speedz(: ,)
plot(ts ,speed_ z
./FS,speedz(: ,2));
fit);
plot (ts , emf _diff ) ;
137
I
ylim ([-10,75])
pause
end
if
pit ==1;
figure
title
('Estimated Speed Compare to Spectrogram')
subplot (211)
spectrogram (emfdiff 4000 ,3000 ,4000 ,4000, 'yaxis ')
ylim ([0 , 70])
)
xlim ([0 ,201
subplot (212)
plot (ts ,speed
z fit)
ylim ([0 ,70])
xlim ([0 ,20])
grid
on
xlabel('Time (s) ')
ylabel('Frequency (Hz)')
pause
end
%% Step 5: Build the Virtual Input
fprintf ('Step 5: Build the Virtual Input\n')
virtualamp = (speed.^2)./RPS^2;
virtual_ input = virtual_ amp .* sin (cumtrapz (ts ,2* pi*speed))
if plt ==1;
norm-speed = speed./RPS;
figure;hold on;
plot (ts , virtual_ amp)
plot ( ts virtual_ input)
plot (ts , normspeed) ;
title ('Building the Virtual Input')
ylabel ('Time (secs ) ') ;
xlabel ('Virtual Amplitude')
legend ('Amplitude Envelope'
'Virtual Input '
Speed Envelope ')
pause
end
%% Step 6: Detrend Accelerations
fprintf ('Step 6: Detrend Accelerations\n')
accel _ x = dat a (:, ACCEL_X_IDX) ;
accel _ x = (accel x-mean(accelx) ./0.1;
accel_ y = data(:,ACCEL_Y_IDX);
= (accel_y-mean(accely)). 0.1;
accely
138
'
Normalized
-
_
.
I I I~~
". .
1
I-W
. ,
k.
-
11' . -
end
function
[ freqrespout j
frf_ function
(
raw, FS, RPS,
PolePairs ,...
DEAD_TIME_L
, DEAD_TIME_R
SPINDOWNL
, SPINDOWN_R
SPINDOWN VALDL,
SPINDOWN_ VAL )_R, . .
plt , speed _extraction method
varargin);
%% Inputs
% raw
Raw data
Sample frequency in Hz, typically (4000).
% FS
Revolutions per second the motor spins at steady
% RPS
state in Hz.
% PolePairs : Number of pole pairs in a motor. An easy way to
determine
this is to look at the operating speed of the
%
motor. A 3600
RPM motor has 1 pole pair , 1800 RPM is 2 pole
%
pairs
Row index when the motor was off , left bound
% DEAD TIMEL
Row index when the motor was off , right bound
% DEAD_TIME R
Row index when the motor starts spinning down
% SPINDOWNL
left bound.
If the sensor output is clipped , the
%
amplitude of the
electric frequency envelope may not drop
%
right away. It is
important to confirm the spin down start once
%
the two emf
sensors have been fitted to each other , and
%
the correct
difference is calculated.
%
% SPINDOWN R : Row index when the motor stops spinning,
right bound.
Zero Crossing, Using the zero crossing
SPINDOWNVALIDL
%
method , an
exponential is fit to the spindown
%
speed envelope
This boundary is a row index used to
%
fit the
.
,,
139
exponential
to the spindown, and is
relative to the
SPINDOWNL value
Typically
.
value
t h is
is between
200-500.
Hilbert Transform,
Using the
hilbert
transform method
,
for speed extraction
index
this
is a row
for a time
when the motor was spinning at steady
.
state
% SPINDOWNVALID_R
corresponding
Row index,
right bound of the
SPINDOWNVALID_L.
: Boolean (0 or 1) flag to indicate whether or not
auxilary plots
showcasing the steps of the method should be
displayed. 0 indicates
no plots
1 indicates plots.
% speed _ extraction_ method : valid options are 'hilbert
or
zeroX
'
'
,
% plt
cIc
%% Round indices
DEAD_TIMEL
DEAD_TIME_R
SPINDOWNL
SPIN_DOWN_R
SPINDOWNVALID_L
SPINDOWNVALIDR
round (DEAD_TIME L) ;
r ound (DEAD_TIMER) ;
round (SPINDOWNL);
round (SPIN DOWNR);
= r ound (SPINDOWNVALIDL)
= r ound (SPINDOWNVALIDR)
%% Verify inputs
try
plt;
catch
plt =0;
end
try
speed _ extraction
method;
catch ;
speed_ extraction_ method = 0;
end
if plt
-
actualfs
1;
=
1/mean(diff(raw(: ,1) ))
140
pause
end
TIMEIDX
=
1;
ACCEL_X_IDX = 5;
ACCEL YIDX = 4;
EMF_1_IDX
= 2;
EMF_2_IDX
= 3;
% Analysis Routine
% 1.) Process EMVIF Data to find
electric
frequency
% 2.) Only use spindown data from here on
% 3.) Find Zero Crossings and Convert to Speed Envelope
% 4.) Fit an exponential to the Speed Envelope and
extrapolate out the
speed
%
% 5.) Construct virtual input from speed envelope
% 6.) Detrend Accelerations
% 7.) Build Hanning Windows
% 8.) Construct the Masked Inputs and Outputs
%% Select Speed Extraction Method
speed extraction _method
=
'zeroX ';
virtual input , accel_x ,accel_ y
raw , ...
extract _speed _ zeroX
(
if
EMF__1_DX, EMF_2_IDX, . .
ACCEL_X_IDX, ACCEL_Y_IDX, . .
TIMEIDX , . .
DEADTIME_L, DEADTIME_R, . .
SPINDOWNL, SPINDOWNR, . ..
SPINDOWNVALID_R, ...
SPINDOWNVALID_L,
FS, RPS, PolePairs , plt ...
elseif
speed_ extraction _ method
, accel-x , accely
virtual _input
(
raw
'hilbert ';
j
extract_ speed_ hilbert
, ...
EMF_1_IDX
, EMF_2_IDX
, ACCEL_YIDX
ACCEL_X_IDX
TIMEIDX , ...
DEADTIMEL
, DEADTMER,.
SPINDOWNL
, SPINDOWNR, ...
SPINDOWNVALID_L, SPINDOWNVALID,_R, . .
RPS
else;
,
plt);
fprintf ('No speed extraction method
to hilbert ') ;
virtual-input , accel_x , accel y I
141
specified
,
defaulting
extract_ speed- hilbert
( raw ,...
EMF_1_IDX
EMF_2_IDX
ACCEL_X_IDX
ACCELY_IDX
TIMEIDX , . .
DEAD_TIME_L
, DEAD_TIME_R,
SPINDOWNL
, SPINDOWN_R,
SPINDOWN_VALIDL, SPINDOWNVALID_R, . .
RPS
, plt);
end
%%y
% Time Frequency Analysis
% Time window and overlap
tw
1; %seconds
ov
0.9; %percent
%Find out how many samples this is and create a hanning
window
ns = round(FS*tw);
%hanwin
[hanning(ns);zeros(length(virtual_ input)-ns,1) ];
hanwin
hanning(ns);
%Calculate the number of windowing intervals given the
overlap
numwins = floor (length(virtualinput )/round (ns*(1-ov))) ;
%Pre alloc ate the time and frequency vectors
mskinput
zeros (length (virtual_ input ) ,num wins) ;
mskoutput
zeros (length (virtualinput) ,num wins);
MSKinput
zeros (length ( virtual_ input ) ,num
wins) ;
MSKoutput
zeros (length (virtualinput) ,num wins);
mFRF = zeros (length (virtualinput ) ,num-wins);
fprintf('---Time Frequency Analysis using Hanning Window STFT
--- \n ') ;
fprintf ('\t constructing masks, please wait . . \n') ;
%now build all the masks
%close all
figure
i=0:num
wins-1
,
%shift the hanning window by 1-overlap % each time
%carefully build them so we start with a hanning window
peak
%don't wrap around (no circshift
even though it ' 5 easy :
P
%1.) Find the center of the hanning window in the main
)
for
142
array
centerpoint
= round(ns*(1-ov))*i;
msk = zeros(length(virtualinput)
,1)
maskstart
_idx = center-point - round(ns/2);
masklength = ns+maskstart idx-1;
han start idx = 0;
han _ end _ idx = ns;
%for the beginning remove the
left
half
of the hanning
window
i f (mask_ start _idx<=0)
hanstartidx
masklength
maskstartidx
end
%for the end
=
= -maskstartidx;
ns-han_ start_ idx;
= 1;
remove
the
right
half
of the
hanning
window
)
if (mask length>lengt h (msk)
hanendidx = ns - (mask_length-lengt h (msk));
masklength = length (msk);
end
%.)
Now add the hanning window to the mask (which
0's)
msk (mask _ start _ idx: mask_length)
= hanwin (han_ start
+1:han_end idx) ;
mskinput (: , i+1) = msk.* virtual _ input;
mskoutput (: , i +1) = msk. * accel _x ;
%plot the results (every 10th window)
if plt ==1;
i f (mod( i ,10)==0)
subplot(3,1,1);
title
hold on
('Hanning Window Masks');
plot (msk)
subplot (3,1 ,2) ; hold on
t i tle ( 'Masked Input ') ;
plot (mskinput(: , i-+1));
subplot (3,1 ,3); hold on
t i t le ('Masked Output ') ;
plot (mskoutput(: ,i+1));
end
end
end
fprintf ('Step 6: Time Window Input and Output\n') ;
fprintf('\t Press [enter]\n');
if plt 1;
143
is
all
idx
pause
end
%now take
the FFT's
of the
input and output
%create a frequency
vector
for
vectors
the x-axis
freq =linspace (0,FS,length(mskinput(:,1)));
%figure out the envelope
for
i=1:num
wins
%only allow
casual
%the current
responses- mask
windowed
input.
Find
frequencies
the maximum
below
frequency
%between RPS and 0
%of the input and zero out everything 15 Hz below
%both the input and output
MSK-input(: , i) = fft (mskinput (:,i));
max freq
round (RPS/FS*length (mskinput(: ,i)));
[Mk] = max(MSKinput(1:max_freq,i));
centerfreq
freq(k);
MSK-output (:, i ) = ff t (msk_output (:,i));
MSKinput( freq <(center _freq -15), i ) =0;
MSK-output( freq<(centerfreq -15) , i)=0;
it
for
-
end
MSK _ output _env=max ( MSK_output, [] , 2)
MSK _input _env max (MSK _input,[] ,2);
if
plt
=
1;
figure;
title
hold on;
('Calculating
FFT masks')
xlabel('Frequency
(Hz)');
ylabel ('Magnitude');
end
if plt
for
=
1;
i =1:num
wins
plot (freq , abs (MSKinput(: , i)))
hold on
plot ( freq , abs (MSK_output (: , i)))
plot(freq ,abs(MSK _output _env),'--');
plot (freq , abs (MSK_inputenv),'--');
if ( i==1)
fprintf ('Step 7: Find the envelopes
') ;
fpr intf
('\
t
[ animation]\n');
144
of the FFT\n
end
legend ('input ','output ')
xlim ([0 ,RPS])
ylim ([0 ,max(abs (MSK _input _env))])
pause (0.2)
hold off
end
end
fprintf ('Step 8: Divide output by input to compute FRF\n')
figure
envFRF=zabs (MSK _output env) . / abs (MSKinputenv);
semilogy ( freq ,envFRF, 'LineWidth' ,2. 0)
xlabel ('Frequency (Hz)')
ylabel ('Magnitude ');
t it le ( 'FRF Estimate')
legend ('FRF')
xlim ([5 ,RPS])
fprintf('\t Press [enter]\n');
if plt = 1;
pause
end
%Provide results from raw FFT division to show the
%benefit of hanning windows- considering short windows
%removes 'noise ' from harmonic frequency excitations spilling
over
fprintf ('Compare to FRF from raw FFT\n');
figure
RAW input = abs ( fft (virtual_input));
RAW output = abs ( f ft ( accel_ x ) ) .7 2;
semilogy(freq ,RAW-output./(RAW-input) ,'LineWidth' ,2.0)
hold on
semilogy (freq ,envFRF, 'LineWidth ' ,2.0)
hold on;
xlim ([5 ,RPS])
ylim ([0 ,5001)
xlabel ('Frequency (Hz)')
ylabel ('Magnitude ');
title ('Comparing Our Estimate to straight FFT division ') ;
legend ('Straight FFT' , 'Windowed STFT')
fprintf('\t All Done\n')
145
%
% Continuous Wavelet Transform
close all
scales = [1/FS:1/FS:120/FS]
scales = 1./scales;
pfreq = scal2frq(scales , 'db4',1/4000)
cf vi = cwt(virtualinput , scales , 'db4')
= cwt(accel_x , scales , 'db4')
cf _accel
figure
ts , pfreq ,mag2db( abs (cf _vi)) ,'LineStyle
contourf (spindown
' 'none ') ;
colormap ('default ')
axis tight
grid on;
xlabel ('Time
(s) ')
ylabel ('Approximate
('Continuous
Frequency');
colorbar
title
Frequency
Wavelet
(Hz) ');
Transform with Time
vs
contourf (spindown ts , pfreq ,mag2db(abs(cf _ accel))
LineStyle ','none');
colormap ('default ')
axis tight
,
figure
grid on;
xlabel ('Time
(s) ');
ylabel ('Approximate
t it 1 e ('Continuous
Frequency ');
colorbar
Frequency
Wavelet
(Hz) ');
Transform
with Time vs
%figure
%sur f (spindown-ts , pfreq , cf _ accel. ^2, ' LineStyle ','none');
146
-
I'll
-
-I-
frf = abs(cfaccel)./abs(cfvi);
surf (spindownts , pfreq ,mag2db( frf)
pause
freq_
end
,
.1
'LineStyle ' ,'none');
respout = [freq',mag2db(env_FRF)];
147
.1.
.........
THIS PAGE INTENTIONALLY LEFT BLANK
148
Bibliography
[1] Commercial buildings energy consumption survey. Technical report, US Energy
Information Administration, 2003.
[2] Residential energy consumption survey. Technical report, US Energy Information
Administration, 2009.
[3] Us energy information administration, May 2015.
[4] Weather underground historical weather api, May 2015.
[5] Anders Brandt. Noise and Vibration Analysis: Signal Analysis and Experimental
Procedures. John Wiley and Sons Ltd, Chichester, UK, 2011.
[6] John Canny. A computational approach to edge detection. Pattern Analysis and
Machine Intelligence, IEEE Transactions on, PAMI-8(6):679-698, Nov 1986.
[7] ASTM Standard D2240. Standard Test Methodfor Rubber Property Durometer
Hardness. ASTM International, West Conshohocken, PA, 2010.
[8] John Sebastian Donnal. Home nilm: a comprehensive energy monitoring toolkit.
Master's thesis, Massachusetts Institute of Technology, 2013.
[9] J.S. Donnal and S.B. Leeb. Noncontact power meter. Sensors Journal, IEEE,
15(2):1161-1169, Feb 2015.
[10] Pan Du, Warren A Kibbe, and Simon M Lin. Improved peak detection in mass
spectrum by incorporating continuous wavelet transform-based pattern matching. Bioinformatics, 22(17):2059-65, Sep 2006.
149
[11] H. Farhangi. The path of the smart grid. Power and Energy Magazine, IEEE,
8(1):18-28, January 2010.
[12] E. Feron, M. Brenner, J. Paduano, and A. Turevskiy. Time-frequency analysis
for transfer function estimation and application to flutter clearance. Journal of
Guidance, Control, and Dynamics, 21(3):375-382, 2015/04/16 1998.
[13]
Django Software Foundation. Django (version 1.8). Computer Software.
[14] M.D. Gillman, J.S. Donnal, J. Paris, S.B. Leeb, M.A.H. El Sayed, K. Wertz, and
S. Schertz. Energy accountability using nonintrusive load monitoring. Sensors
Journal, IEEE, 14(6):1923-1931, June 2014.
[15] G.W. Hart. Nonintrusive appliance load monitoring. Proceedings of the IEEE,
80(12):1870-1891, Dec 1992.
[16] Christopher Schantz Jin Moon Steven B. Leeb Jim Paris Andrew Goshorn Kevin
Thomas Jayme Dubinsky Robert Cox John Donnale, Uzoma Orji.
Vampire:
Accessing a life-blood of information for maintenance and damage assessment.
American Society of Naval Engineers Proceedings, 2012.
[17] David Kathan. Assessment of demand response and advanced metering. Technical report, Federal Energy Regulatory Commission, December 2012.
[18] S.B. Leeb, S.R. Shaw, and Jr. Kirtley, J.L. Transient event detection in spectral envelope estimates for nonintrusive load monitoring. Power Delivery, IEEE
Transactions on, 10(3):1200-1210, Jul 1995.
[191 S. Lloyd. Least squares quantization in pcm. Information Theory, IEEE Transactions on, 28(2):129-137, Mar 1982.
[20] J. Paris, J.S. Donnal, Z. Remscrim, S.B. Leeb, and S.R. Shaw.
The sinefit
spectral envelope preprocessor. Sensors Journal, IEEE, 14(12):4385-4394, Dec
2014.
[21] James Paris. Ph. D. PhD thesis, Massachusetts Institute of Technology, 2013.
150
[22] Z.K. Peng and F.L. Chu. Application of the wavelet transform in machine condition monitoring and fault diagnostics: a review with bibliography. Mechanical
Systems and Signal Processing, 18(2):199 - 221, 2004.
[23] Christopher Schantz. Ph. D. PhD thesis, Massachusetts Institute of Technology,
2014.
[24] S.R. Shaw, S.B. Leeb, L.K. Norford, and R.W. Cox. Nonintrusive load monitoring and diagnostics in power systems. Instrumentation and Measurement, IEEE
Transactions on, 57(7):1445-1454, July 2008.
[25] United States Coast Guard. Commandant Instruction 3500.3 Operational Rish
Management, NOV 1999.
[26] William Wells. Semper paratus: The meaning. United States Coast Guard Historian's Office, 2006.
[27] L.A. Zadeh. Fuzzy sets. Information and Control, 8(3):338 - 353, 1965.
151
Download