Professional Documents
Culture Documents
APPROACH TO WIRE
DIAGNOSTICS
A DISSERTATION PRESENTED TO
THE FACULTY OF THE SCHOOL
OF ENGINEERING
KENNEDY-WESTERN UNIVERSITY
BY
ERIC BECHHOEFER
Abstract............................................................................................................................ii
The Problem.............................................................................................................ii
Method......................................................................................................................ii
Findings....................................................................................................................iii
Chapter 1: Introduction ................................................................................................ 1
Importance of the Study ........................................................................................ 1
Purpose of the Study .............................................................................................. 3
Overview of the Study............................................................................................ 4
Problem Statement ................................................................................................. 4
Rationale of the Study/Developing a Hypothesis............................................... 7
Scope of Study......................................................................................................... 8
Definition of Terms................................................................................................ 8
Chapter 2: Review of Related Literature ................................................................... 14
Introduction........................................................................................................... 14
Signal Integrity....................................................................................................... 16
General Notes on High Performance Oscilloscopes........................................ 19
Wire Diagnostics within the Telecommunications Industry............................ 20
Application of TDR for Telephone.................................................................................... 20
Application of TDR in Cable Access Television (CATV) ............................................... 21
Application of TDR in Broadcast ....................................................................................... 22
Application of TDR in Local Area Networks (LAN)....................................................... 22
Application of TDR to Digital Subscriber Line (DSL) Technologies ............................ 23
TDR in Geological Sciences and Civil Engineering ......................................... 24
Application of TDR Monitoring of Ground Water Levels.............................................. 25
Application of TDR for Monitoring Landslide Activity................................................... 25
Modeling of TDR Waveforms in Geological Sciences..................................................... 26
Technologies and Patents: SWR vs. FDR vs. TDR.......................................... 27
TDR Patents.......................................................................................................................... 27
Alternative to TDR: Standing Wave Reflectometry (SWR) ............................................. 28
Alternative to TDR: Frequency Domain Reflectometry (FDR)...................................... 30
Time vs. Frequency Domain Measurement Tools............................................................ 32
Basic Circuit Analysis for Transmission Lines .................................................. 34
The Circuit Model................................................................................................................. 34
Connection Constraints........................................................................................................ 35
Kirchhoff’s Current Law............................................................................................... 36
Kirchhoff’s Voltage Law ............................................................................................... 37
Thevenin and Norton Equivalent Circuits.................................................................. 38
The RC and RL Circuit......................................................................................................... 40
The Step Response for a First-Order Circuit.............................................................. 42
The Series RLC Circuit.................................................................................................. 48
2
Understand the Transmission Line..................................................................................... 50
The Transient Response of a Transmission Line ....................................................... 51
Properties of Electromagnetic Waves................................................................................. 58
Derivation of the Analytical Expression of Cable Attenuation....................................... 62
The Inverse Scattering Problem: Removing Multiple Reflections .................. 63
The Standardized Wave Equation................................................................................ 66
Standardizing Reflection and Transmission ................................................................ 69
Pulse and Waveform Generation for TDR ....................................................... 75
Step Recovery Diode Properties................................................................................... 75
Dynamic Characteristics of the SRD ........................................................................... 78
Design of SRD Pulse Sharpening Circuits .................................................................. 80
Parametric Classification ...................................................................................... 85
Probability Laws.................................................................................................................... 85
Parameters of Distributions................................................................................................. 87
Parameter Estimation of a Distribution ............................................................................. 88
Hypothesis Testing and Linear Transformations.............................................................. 90
Hypothesis Testing ............................................................................................................... 93
The Software Engineering Process..................................................................... 96
Software Requirements......................................................................................................... 96
Summary of Chapter 2 ....................................................................................... 100
Chapter 3: Methodology ........................................................................................... 102
Describe the Approach ...................................................................................... 102
Database of Study ............................................................................................... 104
Comment on Validity of Data........................................................................... 106
Comment of Originality and Limitation of Data ............................................ 107
Summary of Chapter 3 ....................................................................................... 109
Chapter 4: Data Analysis........................................................................................... 110
Customer Requirements..................................................................................... 110
American Airlines (AA)...................................................................................................... 110
Naval Air Systems Command............................................................................................ 111
Naval Sea System Command (NAVSEA)........................................................................ 111
General Maintainer Comments ......................................................................................... 112
The Attenuation Model...................................................................................... 112
Estimation of a Wire Transfer Function .......................................................................... 113
Example Wire Attenuation ................................................................................................ 115
The Purpose of Modeling the Wire Transfer Function.................................................. 118
The Inverse System............................................................................................................. 119
Example of Wire Normalization....................................................................................... 120
Length Varying Filter.......................................................................................................... 122
Implementation of the Inverse Scattering Algorithm..................................... 124
Event Detection.................................................................................................. 126
Converting from Voltage to Reflection Coefficients...................................... 128
3
Event Classification ............................................................................................ 130
Building the Notional Library............................................................................................ 132
Wire Diagnostics Functional Specifications..................................................... 133
General Design Goals and Overview............................................................................... 134
Subsystem Requirements: Wire Test Characteristics ...................................................... 135
Low Level Information ...................................................................................................... 137
New Wire Test .................................................................................................................... 138
Edit A Current Wire Test................................................................................................... 138
Run the Current Wire Test ................................................................................................ 138
Intelligent Systems: Wire Diagnostic Algorithms............................................................ 139
Characteristic Calculations ................................................................................................. 141
Cable Equalization .............................................................................................................. 141
Inverse Scattering................................................................................................................ 142
Event Detection .................................................................................................................. 142
Parametric Classifier ........................................................................................................... 143
Functional Requirements ................................................................................................... 144
Application Example.......................................................................................... 144
Examples of Analysis Algorithms Performance.............................................................. 146
Functional Prototype.......................................................................................... 149
Wire Diagnostic Prototype Screen Shots ......................................................................... 150
Chapter 5: Summary, Conclusions and Recommendations.................................. 153
Some Problems ................................................................................................... 156
Remarks on Test Technology............................................................................ 158
Bibliography ............................................................................................................... 163
A Wire Diagnostic Screen Shots: Opening Screen....................................... 167
B Wire Diagnostic New Test.......................................................................... 168
C Wire Diagnostics New Test: Wire Characteristics.................................... 169
D Wire Diagnostics Save Test......................................................................... 170
E Wire Diagnostics Run Test ......................................................................... 171
F Wire Diagnostics Overall Test Results ...................................................... 172
G Wire Diagnostics Viewable Test Results ................................................... 173
H Wire Diagnostics Event Table.................................................................... 174
I Wire Diagnostics View Waveform Graph ....................................................... 175
J Wire Diagnostic Search View............................................................................ 176
K Wire Diagnostics Analysis Listing.............................................................. 176
4
Figure 6 Empirical vs. Attenuation Model..................................................................................... 117
Figure 7 Example of Wire Normalization ..................................................................................... 121
Figure 8 Library of Event Types..................................................................................................... 133
Figure 9 Algorithmic Example: RG58 ........................................................................................... 147
Figure 10 Algorithmic Examples: 30-Ohm Coaxial ..................................................................... 148
5
Abstract
The Problem
In aviation and the aircraft industry in general, electricity and the wire system that carry
components such as, flaps, elevator, rudder and landing gears, the propulsion systems
such as the engine fuel control and avionics such as radios or flight control systems.
While these major aircraft components have well understood maintenance practices
and procedures, relatively little is know about the diagnostic of wiring systems. This is
problematic in that as aircraft fleet around the world age, maintenance associated with
wiring is increasing while safety is decreasing. This need to deal with aging aircraft
wiring requires a new method to diagnose problem electrical systems and to potentially
Method
ii
The review of literature provides a background of the need for wire diagnostics of
aging aircraft and an evaluation of the current state of the technology. The research
The method used for this study is both the Historical/Case Study Method and the
Experimental Method. Data was collected to evaluate the current market condition
and competing products that can diagnose wire faults. Once that analysis was
complete, research was conducted to address the short falls of the current products.
The research was the technical lead in new product development, with the intent of
Findings
currently available can satisfactorily address all elements of wire diagnostics, leaving
space for companies to enter this market. Of the numerous technologies available, the
iii
performance and cost. Based on this methodology, hardware and software
dispersion, detection of wire events (connectors, opens, shorts and faults) and finally
parametric classification of events. The final system was released as a prototype for
iv
Chapter 1: Introduction
Importance of the Study
system unto itself. Yet incidents such as the TWA crash in 1996 and the more recent
Swissair crash in 1998 focus our attention on wiring systems. Only recently has the
aviation. On February 12, 1997, the White House Commission for Aviation Safety and
Security issued a report to President Clinton identifying aging wiring as a safety issue in
aviation. This commission recommended that three federal agencies: the Federal
Aviation Administration (FAA), the Department of Defense (DOD) and the National
Aeronautics and Space Administration (NASA) expand their aging aircraft program to
research initiatives and partnerships with the aviation industry have been initiated to
The issue of wire is not small. A typical wide body airplane has more than 150 miles
of wiring. While most aircraft wire damage does not pose a threat to safety, data from
a two year old Air Line Pilots Association (ALPA) study, reported in Air Safety Week,
suggest that there were 1.5 service difficulty reports (SDRs) specifically associated with
wiring, the wire harnesses and connectors per week in the first 10 months of 1999.
1
The armed services within the DOD conduct accident investigation to determine the
cause of wire-related mishaps. These organizations have well defined techniques for
investigating such mishaps and the information gained during safety and engineering
investigation provides invaluable insight into the cost associated with a mishap. The
U.S. Navy has estimated that 2 million man-hours are expended annually for the repair
of wire.
The average age of aircraft within the civilian and military fleet will continue to rise,
with corresponding increases in maintenance cost. Despite this increasing cost, aging
wiring is not well understood. The term “aging wire” will be defined as wire exhibiting
mechanical, chemical, thermal and electrical stress. These stresses are often induced by
diagnosis wiring problems can be extremely difficult, resulting in poor readiness and
excessive downtime.
In trouble shooting a system (including aircraft built-in-test (BITE) or tests run within
the line replaceable unit (LRU)), it is usual for fault indications to be within the LRU.
2
Wire repairs on the aircraft line or in the field can be difficult to verify since there are
few effective tools available to the maintainer. As a result, the time to diagnose and
repair electrical equipment is one of the leading causes of low mission aircraft
a system.
Any given aircraft could have several hundred insulation breaks extending to the
feasible because, as the wire ages, it becomes stiff. Dismantling the bundle or
connector can generate additional collateral damage and a greater safety hazard.
The purpose of this study is to: evaluate the system requirements necessary to diagnose
wire faults and then to design a marketable wire diagnostics system. The system (e.g.
maintenance tool) that is designed will be used as the basis for a new product line that
can assist both military and civilian customers with maintaining flight readiness in an
3
Overview of the Study
diagnostics test tool. Interviews with potential customers, such as: American Airlines
maintenance facilities, U. S. Navy Science and Technology Wire Group, and U.S.
Naval Shipyard were used to establish design goals for the device. An evaluation of
selected (TDR), functional requirements for software and hardware were determined
developed to improve the performance of the test equipment over that available to
Problem Statement
The National Transportation Safety Board (NTSB) has identified wiring as a potential
cause of the TWA Flight 800 fuel tank explosion. As a result of the NTSB finding, the
FAA initiated a study of the condition of aging aircraft wiring under the guidance of
4
inspection phase of the ATRAC study evaluated the wire condition of five retired
commercial aircraft. This involved three tasks: detailed visual inspection of the wire
expected that visual inspection would find most of the wire defects and that NDT
testing would verify all defects that had been identified during visual inspection.
However, NDT found a large number of defects had gone undetected using the visual
inspection. This was not unexpected, as the findings of many studies to evaluate visual
inspection is the least effective means of finding defects when compared with other
Visual inspection of wiring is the only technique currently used in both commercial
and military aircraft to monitor the condition of wire. Given the results of the
ATSRAC study (the results of the inspection are reported in the Transport Aircraft
Intrusive Inspection Project Final Report: An Analysis of the Wire Installations of Six
most faults are going undetected. In fact, it can be assumed that many wire defects go
undetected under normal operations and are found only after a system failure or
5
Maintenance personnel indicated that electrical problems (particularly intermittent
faults) often result in the unnecessary replacement of good line replaceable units
(LRU), at great cost and prior to wring being considered as the possible cause.
Additionally, once wire is identified as the potential problem, diagnosing the problem
and evaluating the effectiveness of the repair is time consuming and difficult.
Obviously, needlessly testing and replacing boxes only lowers readiness and drives up
operational cost.
To effectively manage aging aircraft and address the issues of wire maintenance, a new
type of wire diagnostics tool is needed. An effective wire diagnostics tool could result
in more effective diagnosis and repairs of wire system defects, improved aircraft
readiness and most importantly, safety. Improved inspection techniques, given a wire
diagnostic tool, could identify precursor faults prior to defect and allow condition
The ideal wire diagnostics tool should be portable and have a short set up time
6
• Identify soft faults, such as nicks, crimps, chafes and bad splices,
Fleets of both commercial and military aircraft will continue to age and as a result, the
cost and readiness of these fleets will be adversely affected. Therefore, new techniques
must be developed to quickly and economically diagnose and identify wiring faults.
speed) at low cost allows the rapid prototyping and development of tools that will
assist in identifying the type and location of a fault. Additionally, with advanced signal
predict the future condition of wire harness. Given this advancement in technologies,
What is the best technology to implement in a wire diagnostics test set? Give a test
technology, what are the limiting performance factors? What signal processing
algorithms can be employed to improve the capability of the tool. Finally, what
information management paradigms can be used to manage the test information and
limit maintenance personnel interpretation of the test results? This research will look
at: the technologies available, develop the hardware and software requirements,
7
examine digital signal processing techniques to improve performance of a system, and
Scope of Study
The potential for large cost savings and improvement in fleet readiness by the
this need, research was conducted by interviewing aviation and industrial maintenance
personnel on the specific problems associated with trouble shooting and repairing
wire. The researcher conducted an exhaustive literature search of books, articles and
Based on this literature, hardware and software design requirements were developed
and implemented. The prototype wire diagnostics tool was tested and its performance
evaluated. The researcher developed the test tool as technical lead of Goodrich Fuel
Definition of Terms
fiber optic) by sending a pulsed signal into the conductor, then examining the reflected
pulse. Wiring and insulation anomalies will have different capacitance and inductance
than the nominal wire, which causes a change in the local characteristic impedance.
8
This change in characteristic impedance will scatter in the pulsed signal; reflecting
some small part of the signal energy. By measuring the time delay, the precise location
of the anomaly is known while the polarity of the anomaly can be used to determine
waveform into the wire under test. A reflected waveform is returned from the wire
termination. The two signals add to a standing wave at the receiver. The peaks and
nulls of the standing wave give information on the length and terminating load of the
wire.
comprises splitting an input signal to the cable under test and to a mixer, then sending
the reflected input signal back to the mixer to generate a mixed signal where the high
information regarding impedance and length of the cable under test. This operation is
performed a number of times at different frequencies, and the digitized signals are
used to determine the impedance and length of the cable under test.
9
Current - is a measure of the flow of electrical charge. It is the time rate of change of
the charge passing a given point in a circuit. The physical dimensions of current are
passing from point A to point B, the voltage between and A and B is defined as the
produced by a voltage. Electrostatics shows that a uniform electric field exits when a
voltage is applied across two metal plates, the simplest form of a capacitor. When the
separation difference is small compared with the dimension of the plates, the electric
field is proportional to the electric charge on the plates divided by the permittivity of
the dielectric and area of the plates. The relationship between electric charge and the
voltage applied across the plates is the capacitance C of the capacitor. The unit of
capacitance is the farad (F). Wires have a capacitance per unit length on the order of a
few pF (10-12).
Inductor - is the dual circuit element to the capacitor involving the time variation of
the magnetic field produced by a current. Magnetostatics indicate that a magnetic flux
10
surrounds a wire carrying an electric current. When the wire is wound into a coil, the
lines of flux concentrate along the axis of the core. In a linear magnetic medium, the
flux is proportional to both the current and the number of turns in the coil. The
magnetic flux intercepts or links the turns of the coil. This flux linkage is proportional
to the flux and the number of turns in the coil. The proportionality constant is the
inductance L of the coil and the unit is a henry. A wire has an inductance of a few µH
(10-9).
phasor) is: V = ZI, where Z is called the impedance of the element. This is analogous
to Ohm's law in a resistive circuit. Wires and cables have characteristic impedances
that relate to the wires capacitance per unit length, inductance per unit length and the
Reflection coefficient is the ratio between the reflected energy (voltage) and the
incident voltage. The relationship is non zero where an anomaly exits in a wire, i.e.
where the impedance at a distinct point changes from the wire characteristic
11
Dispersion occurs as a high frequency signal passes down a wire, the inductance and
capacitance of the wire act as a low-pass filter on the signal. The characterization of
the filtering effect is the transfer function (which relates an input and response at
different points in the wire or circuit) of the wire and relates to length. The effect of
the transfer function is to attenuate the high frequency components and disperse the
problem space for the desired performance of the tool. This requirements document
preferences, system engineer desires and puts them into once place as a talking paper
for the over design goal of the product. This document specifies the function that the
Digital Signal Processing - all waveforms are analog. While many signal processing
operation (such as filtering and amplifying) can be done with analog devices, digitizing
12
the waveform allows more powerful analysis to be performed. Digitizing an analog
signal requires sampling the waveform at high speed and converting the analog value
into an integer value. For a given maximum frequency (e.g. Nyquist frequency),
sampling must occur at twice the frequency. For example, with a TDR step pulse of
200 pico-seconds (10-12 seconds), the Nyquest frequency is 5 Gigahertz and the
program for the analysis of electronic circuits. D.O. Peerson and L.W. Nagel at the
distributed as public domain software and quickly proved to be a very useful tool for
integrated circuits allows engineers to produce their circuits faster and more
competitively.
13
Chapter 2: Review of Related Literature
Introduction
The need for a tool for wire diagnostics has been show in Chapter 1. The aerospace
researcher, working as the system engineer at an aerospace company, was assigned the
task of developing a system methodology for a product to meet the market demand of
helicopter power train components, indicated that there are many aspects of the
problem.
For example, there is the test hardware technology that is to be used. Other than
aspects of performance (e.g. can a technology find hard and soft faults), can the
technology be implemented? What is the cost per unit production? What are the
form factor, power consumption and hazard to the cable under test? Are active
patents held on that particular technology? If a patent is held, will the Assignee license
the technology?
Once the technology is chosen, there are a series of software issues. What algorithms
with the user interface to provide information? What is experience level of the user?
14
Does the software need to provide decision support or is the user sophisticated
Finally, there is the management of the information itself. Test tools in general, a
multi-meter for example, provide a snap shot view of the device under test. Yet, many
systems, wire included, have a history and a dimension of time involved in the analysis
that cannot be captured in a single look. It is entirely conceivable that a wire could
have a detectable anomaly, from corrosion or a splice, which does not require a
maintenance action. However, if the aircraft operator could trend over time and
observed the fault propagating, it may then be advisable, at the next scheduled phased
maintenance, to replace the harness. This changes the current paradigm of the
operator from reactive to on-condition maintenance practices and can reduce cost and
tracking and is performed on most major aircraft components (engines, drive train).
product documentation, and the U. S. Patent office for information regarding signal
integrity, transmission line theory, TDR, SWR and FDR. Most of the information
15
• Testing of signal integrity in high frequency circuits,
properties.
Signal Integrity
As digital systems pursue higher clock and data rates in computers, communications,
video and network systems, anything that affects the signal rise time, pulse width,
timing or noise content can impact reliability. In order to ensure signal integrity, test
Mismatches and variations can cause reflections that decrease signal quality. Stated
simply, signal integrity is the circuit design and layout issues that arise as a result of
analog characteristics of high-speed digital signals. These issues include cross talk,
EMI, ground bounce, impedance, terminations, etc., that become critical factors when
One method for quantifying signal integrity, through measuring impedances is TDR.
generators.
16
For example, Tektronix’s TDS 8000 Sampling Oscilloscope with 80EO4 TDR
generates a 17 ps rise-time pulse. This instrument has been designed for test and
Typically, the components and other etched circuit boards have impedance-controlled
microstrip and stripline transmission lines. Over the span of these transmission lines,
devices, connectors and other interruptions (such other inductive transmission lines)
capacitors and transmission lines; in practice it is desirable to design the system in such
A high performance TDR waveform will show the effect of all the reflections created
by these impedance mismatches. The time domain nature of TDR allows correlation
of the impedance trace with the PCB layout, a virtual road map of the device under
test. This allows the engineer to evaluate the PCB impedance mismatches against a
nominal design or test the current design to identify areas that could result in degraded
performance (Corey).
17
TDR evaluation of power supplies is particular effective in reducing EMI (electro-
the characteristic impedance drops. On high frequencies applications, this causes high
currents densities on the board. These in turn the resulting magnetic fluxes that
effectively turn the microstrip into a radiation source. The resulting electromagnetic
radiation affects all surrounding transmission lines as radiated noise, which increases
One aspect in the control of signal integrity is improvement of design and modeling
tools. Essentially, the interconnects on the PCB become transmission lines and
The consequences of poor modeling results in jitter and eye diagram degradation
(losses and crosstalk on the interconnects). The resulting distortion and switching
error are often difficult to correct and result in significant hardware design delays.
aspects of the model differ from reality. The accuracy and assumptions of the
analytical tool, the material properties of the device under test, and the component
18
manufacturing tolerances all contribute to errors. By accurately measuring the true
impedance, analytical models can be validated. With validated models, the hardware
engineer can cut development time and be assured that hardware specifications are met
with little breadboard testing. Software, such as TDA Systems IConnect (R) is one
Higher performance oscilloscopes are precision instruments that are not suitable for
the environment encountered on aircraft flight lines or in aircraft hangers. The cost of
one of these tools is extremely high: sixty thousand dollars is common when taking
into account the test probes and stand. However, they also incorporate the power of a
system, which allows the oscilloscope to perform higher levels of processing and some
limited management of data as flat files. This processing can perform digital signal
one type of normalization as a standard feature. With the normalization software built
into the oscilloscope, additional applications or converters are not needed to enhance
19
Normalization can be used to remove oscilloscope response, step aberrations, cable
attenuation, signal dispersions loss, and the effects of multiple reflections (“Improving
No single industry has benefited more from wire diagnostics techniques than the
SWR, and FDR available to test cable installation. Companies such as Riser Bond
Instrument, Bicotest Ltd, and Eclipse Industry provide portable test units for testing a
number of wire and cable applications. These units are typically limited to determining
the length to an open or short over long distances. The step function (e.g. bandwidth )
are much slower than those available for signal integrity products. It is not uncommon
for units to have 5 ns, 10 ns, 25 ns rise times vs. 35 ps to 200 ps seen in the high
which would be problematic when used where the termination is voltage sensitive
The largest number of twisted pair problems is related to moisture intrusion into the
cable. TDR has been shown to assist the maintainer in identifying this type of fault
and the fault location. Water within twisted pair affects the signal as an increased local
20
capacitance. Water seeps into the conductor through pinholes in the plastic insulator
around the conductors. Water in a multi-paired, non-flooded cable may be several feet
wide, although the distance of the fault is not accurate as the water affects the velocity
of propagation.
While it is possible to find point of damage, it is still necessary to locate where the
water actually entered the cable - the entry point may not be within the span of where
the water is located. If the entry point is not found, it may be possible to locate the
damage by using the cable sheath as ground and a wire close to the sheath as the
conductor.
When cable signal becomes intermittent or fails altogether, TDR becomes the
diagnostic tool of choice. With coaxial cable impedance, mis-match is almost always
associated with a fault, splice, or connector. Simple by checking this distance from the
terminal station to the source, and from the source to termination, corroded splices or
TDR is often used to map existing cables from a pedestal to a subscriber. This may be
necessary when new construction indicates that the current identity of a cable is not
21
accurate. A cable technician can use TDR to get length information on the various
cables and use that information to verify the identities of the cables.
TDR is used as a preventative maintenance tool for broadcast tower transmission lines.
A broadcast transmission line is made of rigid elements that are bolted together. The
point where the sections are connected wears and deteriorates. The center conductors
Due to thermal expansion, the center conductor will wear against the solid connection
sleeve. This can generate small copper filings to drop onto the spacer below the
connection. Over time, these filing will create an RF power path to the transmission
cable sleeve and ground. The path to ground will cause momentary power shorts to
ground and loss of output power. This deterioration is readily visible on the TDR
waveform and can become the basis of condition based maintenance practice. The
cost of refurbishing the copper bullets is low compared to the damage resulting form
TDR is one of the easiest and most accurate ways to qualify copper cabling for data
communications. As LANs proliferate, TDR has become the standard method for
verifying and maintaining LAN cabling systems. LAN topology can consist of a
22
number of connectors, taps, and terminations. This can lead to a number of potential
defects, such as opens, shorts, mis-terminations, frays, kinks, etc. Any of these faults
Category 5 UTP cable, this cannot alleviate a poor installation. Poor installation will
almost guarantee system errors and early saturation. Locating cable near air condition
fans motors, compression, or higher current devices will cause excessive noise.
will cause signal loss and low noise margin. Other practices, such as striping wiring
TDR can test both the backbone and LAN segments. While length can also be tested,
high performance TDR can be used to look at the quality of the cable within in a few
meters of the wall plate or patch panel. Impedance changes caused by excessive cable
striping and re-twisting can easily be identified and fixed. This can be used to repair
High bandwidth demand for access to the Internet is a rapidly growing. DSL
23
base of twisted pair cabling in place. For the telephone company to use its pre-existing
subscriber line, a set of twisted pair cables extending from a central office to the
customer, needs to be tested for performance. Use of TDR allows a single port
measurement from a central office port rather than a two-port test from a central
The TDR performs topology identification of a given subscriber loop from the central
office. The details of the identified subscriber loop are then used to simulate the two-
port transfer function between the different nodes. The transfer function is then used
TDR techniques have been used extensively in geological sciences and civil
• Injection of a high voltage TDR signal into the ground to evaluate the
volumetric soil water content and bulk soil electrical conductivity (Feng et
al.).
24
• Implantation of a coaxial cable within an unstable substrate, which when
An air dielectric coaxial cable is inserted into an existing riser pipe. The outer
conductor of a hollow coaxial cable is separated from the inner conductor by a thin,
spiral plastic. This allows air to fill the remaining space. The separation allows water
to flow into the air space between the two conductors. The presence of water acts as
short due to the large difference in dielectric constant between water and air. The
short causes the reflected voltage going to zero. The depth of the water is easily
calculated as the velocity of propagation, multiplied by time, and then divided by two.
As the air-water interface moves up and down between the inner and outer
conductors, the location of the voltage drop shifts proportionally. By sampling over
25
Coaxial cables are grouted into a boar hole in a test site. Data from the TDR is
analyzed from a number of different cables. The length and amplitude of the
reflections indicates the severity of the instability. For a cable in shear, a voltage
proportion to the shear deformation. A distinct negative spike occurs just before
failure. After failure, the cable is open. For cables in tension, the waveform reflection
is a subtle, trough-like voltage signal that increases in length as the cable is further
deformed (e.g. an increase in capacitance resulting form the dielectric material being
One aspect of TDR in geological sciences that is of particular interest is the concept of
scattering and multiple reflections. When using TDR systems, it is common that
multiple reflections occur as a result of the TDR signal being scattered between two or
reflections initiated much research activity in numerous and disparate fields of study,
is just one type of measurement error that can distort a TDR measurement (Gladwell).
26
Technologies and Patents: SWR vs. FDR vs. TDR
TDR Patents
There is no explicit patent for TDR that limits a company from building and selling
improvement in the way TDR are used can have an issued patent. One patent of
interest for the aviation industry is United States Patent 6,442,498, “Apparatus and
The patent covers a technique for testing an entire wire harness. In the aviation
industry, this has large implications. A typical wire harness has a number of wires -- up
to one hundred. Additionally, it is difficult to determine the return path of the wire.
Without a return path, the wire under test acts as an antenna instead of a circuit. It is
impossible to diagnose shorts under these circumstances. Thus, using typical TDR test
The patents innovation was, via a number of controllable, low capacitance and
shielded relays, to connect an analog to digital converter and TDR pulse generator to a
wire in the harness. The device then sequentially grounds all of the other wires in the
harness. By doing this, the inventor was able to determine whether the wire under test
27
was shorted, and if not shorted, find a wire that was most coupled. Normally, wires
are terminated under high impedance and act as an open, thus it is not possible to
explicitly define the return path. However, the TDR signal will induce voltage in a
wire that is physically close. Typically the closest, most inductively coupled wire is the
return path. For a high impedance termination, grounding the inductively coupled
With the return path found, the time delay to the peak voltage or short is determined.
The time delay is converted to distance and the distance for the wire under test is
compared to a database of nominal wire lengths. A test of the new distance made to
the nominal wire length (from the database) and if in absolute distance has changed by
The invention claims explicitly two improvements: the ability to test a harness and the
management of test information. Saving a nominal cable as parameters and using this
historic data to identify potential wiring faults against a recent maintenance test is a
One type of non-intrusive cable testing technique other than TDR is SWR. Under a
contract by NASA, and subject to provisions of the National Aeronautics and Space
28
Act of 1958, this new technique was invented as an apparatus for determining the
The NASA space shuttle uses a number of signal conditions, which converts a number
of signals into a format compatible with the orbiter telemetry, display, and data
required to remove the cable to verify that the cables are not the source of the fault.
Once the cable is removed, all signal conditioners and systems, which had wires
passing through the cables connectors, have to be tested when the cable is
generators and analog to digital converters where not yet available with sufficient
bandwidth to test relatively short distances (a few meters). Currently, this is not an
issue as TDR systems are commercially available with pulse rise times on less that 100
ps - a distance of less than an inch). In view of the foregoing need, SWR was
invented.
29
The SWR test set has a numerically controlled variable frequency oscillator to generate
a sinusoidal test signal, which is applied across a reference resistor to the cable under
the applied signal is swept in increments over a range of frequencies during the test.
The root mean square voltage (RMS) generated at the signal injection point in
response to the applied test signal is analyzed to determine the frequency at which the
voltage is nearly zero (e.g. the null). This indicates that the reflected signal from the
discontinuity is approximately 180 degrees out of phase form the injected signal. This
wavelength from the injection point. If the circuit is shorted, the null occurs at
approximately one half wavelengths down the cable. Typical sinusoidal frequencies
range from 10 KHz to 50 MHz. Currently, SWR tools are manufactured and sold by
need of cable testing, the desire for a practical (meaning relatively inexpensive and
TDR is that the equipment required to perform the analysis is expensive and bulky.
Additionally, SWR could be considered, but is generally less accurate and nearly as
30
expensive. A smaller and less expensive (due to the nature of the components utilized)
technique is desired.
FDR is based on single frequency radar or stepped frequency radar. A sinusoidal wave
directional coupler. From there, the input signal goes to a mixer as a test or reference
signal. The second path for the input signal is into the cable under test. The reflected
signal is then split using the directional signal and then received by the mixer; and a
combined output signal is then read from the mixer and sent to an analog to digital
converter. Because a mixer is a frequency multiplier, the combined output signal has
three components: the input signal, the sum of the input signal and the reflected signal,
and the difference of the input signal and the reflected signal. Because the input signal
is equal to the reflected signal, the difference is a direct current signal, while the sum of
The operation of anti-aliasing filtering, within the analog to digital filter, automatically
removes the high frequency components. This leaves only the direct current
component, which has a magnitude relating to the electrical length and the load. This
Fast Fourier Transform (FFT) on the buffered signal. The maximum magnitude of
the FFT determines the number of cycles of the direct current signal. Given the
31
number of cycles, the bandwidth of the sampling range, and the velocity of wave
propagation, the length can be found. Once the length is known, calculation of
impedance at the length can be calculated. Low impedance is indicative of a short, and
The low frequencies and commonality of the components required to build the test
system, allows a low cost - on the order of twenty dollars in parts. FDR systems are
As noted, TDR measure reflected and transmitted voltage to provide the maintainer a
map of the impedance mis-match over the cable. Frequency domain devices, such as
FDR, give a measure voltage vs. frequency instead of time. This mapping of voltage
and frequency is mapped into a scattering parameter, S. S-parameters are a ratio of the
reflected or transmitted wave voltage to the incident wave voltage. The notation is:
Where the S11 and S21 parameters are frequently referred to as reflection and
32
The relationship between voltage in frequency and time domain is the Fourier
readily apparent that the relationship between TDR reflection and transmission
FDR measures both real and imaginary parts of the signal vs. frequency, while TDR
measures voltage vs. time. The duality of the equations clearly shows the one to one
relationship between FDR and TDR. All information about the frequency domain is
However, the maintainer lives and works in the time domain. For the maintainer,
TDR offers well know advantages, such as its intuitive, visual operation. The visual
nature of TDR comes from the time domain transient measurements, where each
a connector or fault. While multiple reflections can obscure the correlation between
physical hardware, these can be removed leaving the true impedance profile.
of design cost, a high performance TDR will be more expensive that an FDR system
solely because the frequencies are so much higher. Stray capacitances, even a few
33
pFarads, will degrade rising edge performance. Additionally, the higher frequency
software cost will be lower because less processing of the signal is required to display
magnetic behavior of the wire when subject to a change in voltage and current.
cuts, chafes, crimps, opens, and shorts on a wire, it is necessary to understand the
transmission line as a circuit. A review of basic signal analysis is developed with the
that is treated as a separate entity. A two terminal device is described by its i-v
characteristics; e.g. the relationship between the voltage across and current through the
device. Most real world devices are non-linear, but linear models are used that
approximate the dominant behavior of the device. The linear resistor elements are:
v = iR or i = Gv
34
Where R and G are positive constants that are reciprocally related:
R = 1/G
This is collectively known as Ohm’s law. The parameter R is called resistance and has
units of ohms, Ω. The parameter G is called conductance with units of siemens. The
power associated with the resistor can be found from p = vi. Using the relationship v
p = i2R.
Note that the parameter R is always positive, indicating that the power is positive.
Connection Constraints
The laws governing circuit behaviors are based on the work of Gustav Kirchhoff.
The Kirchhoff’s laws are derived from conservation laws applied to the circuit.
Effectively, the laws describe the element voltages and currents behavior when devices
constraints. These constraints are based only on circuit connections and are not
dependent on the specific devices in the circuit. Kirchhoff’s laws use the following
definitions:
35
• A loop is a closed path formed by tracing through an ordered sequence of
However, it is important to realize that a node is not confined to a point, but includes
all the zero resistance wire from the point to each element.
instant.
In forming the algebraic sum of currents, the current reference direction associated
with each device must be taken into account. If the current reference direction is into
the node, then the convention is to assign a positive sign to the corresponding current
in the algebraic sum. If the reference direction is away from the node, the assignment
The sum of the currents entering a node equals the sum of the currents
leaving a node.
There are two algebraic signs associated with each current in the application of KCL.
First is the sign given to a current in writing a KCL connection equation. The sign is
36
determined by the orientation of the current reference direction relative to a node.
The second sign is determined by the actual direction of the current relative to the
reference direction. The actual direction is found by solving the set of KCL equations.
Finally, since the circuit is a closed system, the following general principal applies:
The current equations are written with N-1 nodes that contain all the independent
connection constraints that can be derived from KCL. To write these equations, one
node is selected as the reference or ground node, and then KCL equations for the N-1
The algebraic sum of all the voltages around a loop is zero at every
instant.
There are two signs associated with each voltage. The first is the sign given the voltage
when writing the KVL connection equation. The second is the sign determined by the
actual polarity of a voltage relative to its assigned reference polarity. The actual
polarities are found by solving the set of KVL equations. For a more detailed
description of Kirchhoff’s Laws see The Analysis and Design of Linear Circuits.
37
Thevenin and Norton Equivalent Circuits
electrical and electronic systems, so special analysis methods are used to handle them.
source and the other as the load. If the signal being produced by the source circuit is
delivered to the load circuit, then the source-load interaction at the interface is one of
Thevenin and Norton equivalent circuits are valuable tools for dealing with circuit
interfaces. The conditions under which these equivalent circuits exist can be stated as a
theorem:
The equivalence requires the source circuit to be linear, but places no restrictions on
The Thevenin equivalent circuit consists of a voltage source (vT) in series with a
resistance (RT). The Norton equivalent circuit is a current source (iN) in parallel with a
resistance (RN). The two circuits have the same i-v characteristics, since replacing one
38
by the other leaves the interface signals unchanged. To derive the equivalency
conditions, simple apply the KVL and Ohm’s law to the Thevenin equivalent circuit to
v = vT - i RT
Next, applying KCL and Ohm’s law to the Norton equivalent circuit yields its i-v
i = iN - v/RN
v = iNRN - iRN
The Thevenin and Norton circuits have identical i-v relationships. Comparing these
RN = RT
iNRN = vT
Thus, both the Thevenin and Norton equivalent circuits are related by the source
necessary to find both equivalent circuits. Once one of is found, the other can be
four parameters (vT, RT, iN, RN ) and given the before noted relationship, only two
39
It is common in circuit analysis to use the short-circuit current and open-circuit voltage
to specify Thevenin and Norton circuits. It can be shown that when the load is an
open circuit, the interface voltage is equal to the Thevenin voltage, e.g. v = vT. Since
there is no voltage across RT when i= 0. Similarly, it can be shown that when the load
is a short circuit, the interface current equals the Norton current i = iN since all the
RC and RL circuits contain linear resistors and a single capacitor or a single inductor.
the resistor and sources by their Thevenin and Norton equivalent circuits. Examining
the RC circuits first, note that the Thevenin equivalent source is governed by the
constraint:
The subscript (t) is used to indicate the values of these variables, and can change with
i(t) = C dv(t)/dt.
40
This produces the equations governing the RC series circuit. The unknown variable is
the capacitor voltage v(t), which determines the amount of energy stored in the RC
circuit.
Note that this is a first-order linear differential equation with constant coefficients.
The equation is first-order because the first derivative of the dependent variable is the
because is depends on the fixed circuit parameters. The signal vT(t) is the Thevenin
equivalent of the independent source which is driving the circuit. The input to the
circuit is v(t) and the circuit response is the capacitor voltage vT(t)..
The dual problem to the RC circuit is the RL circuit. The Norton equivalent source in
v(t) = L di(t)/dt
By combining the element and source constraints, the differential equation for the RL
circuits is now:
The response of the RL circuit is also a first-order linear differential equation with
constant coefficients. The dependent variable is the inductor current. The circuit
41
parameters enter as the constraint product GNL, and the driving forces are represented
by a Norton equivalent current iN(t). Thus, the unknowns are the inductor current,
which is the state variable and determines the amount of energy stored in the RL
circuit.
It was noted that the RL circuit is the dual of the RC circuit. What this means is that
When interchanged with each other, this converts the RC equations into the RL
equations. Because of this duality behavior, one set of equations can be used to
These circuits are first-order circuits because they are described by a first-order
differential equation. Any circuit containing a single capacitor or a single inductor, and
thorough understanding of the first-order circuit is needed. When the input to the RC
42
vT(t) = Vau(t).
Where u(t) is the unit step function, the circuit differential equation then becomes:
RT C dv/dt + v = Vau(t)
It must be noted that the step response is a function of v(t) which satisfies this
differential equation for t >= 0 and meets the initial condition v(0). As noted, u(t) is
the unit step such that u(t) = 1 for t >= 0. We can now write:
The natural response, vN(t), is the general solution when the input is set to zero. The
natural response is the physical characteristic of the circuit and does not depend on the
form of the input. The forced response, vF(t), is the solution when the input is the step
The general solution for the natural response, with the input set to zero, can be written
as:
RT C dvN(t)/dt + vN(t) = 0.
43
This is a homogeneous equation because the right side is zero. The classical approach
exponential form:
vN(t) = Kest,
where the constants K and s are to be determined. If the exponential is a solution, then
it must satisfy the differential equation RT C dvN(t)/dt + vN(t) . Substituting the trial
solution yields:
RT C Ksest + Kest = 0.
Kest( RT C s + 1) = 0.
The exponential function est cannot be zero for all t. The condition K = 0 is the trivial
RT C s + 1 = 0
This is the circuit characteristic equation, as its roots determine the attributes of vN(t).
The characteristic equation has a single root at s = -1/RT C . Thus, it has been shown
This is the general solution of the homogeneous equation because it contains the
arbitrary constant K, which cannot be evaluated from the initial conditions. The initial
conditions applies to the total response, and as of yet, the forced response still needs a
solution. For the forced response, the solution needs to satisfy the equation:
44
RT C dvF(t)/dt + vF(t) = VAt for t>= 0.
This means that the linear combination of vF(t) and its derivative equal a constant VA
for t >= 0. Setting vF(t) = VA satisfies this condition as dvF(t)/dt = dVA/dt = 0. Now
It is now possible to combine the force and natural responses, such that we obtain:
it can be show that the general solution for the step response is:
This assignment requires that K = (V0 - VA), which when substituted back into the
45
Step Response for the RC Circuit
0.9
V
0.8
,
e
g
a 0.7
t
l
oa
V 0.6
g
n 0.5
i
c
r
o 0.4
F
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7
Time Constant, RC
The RC circuit step response begins at the initial condition and is driven to its final
voltage, which is the amplitude of the step function input. This is an exponential
waveform with a time-constant that is the circuit time-constant, τ = R*C. The circuit
Noted earlier, the RL circuit is the dual of the RC circuit. As such, the development of
its response follows a similar pattern. The Norton equivalent input is a step function
46
GNLdi(t)/dt + i(t) = IA t >= 0.
The solution to this equation is again found by superimposing the natural and forced
components. The natural response is the solution of the homogeneous equation and
takes the same form as the dual for the RC natural response, namely;
Where K is a constant to be determined from the initial condition once the full and
Setting iF = IA satisfies the equation since dIA /dt = 0. Now, combining the forced and
The initial condition forces K = I0 - IA , so the step response of the RL circuit is:
The RL circuit step response has the same form as the RC circuit step response. At
t=0, the initial value of the response is i(0) =I0 , as required by the initial condition.
47
Note, that for an RC or RL circuit, the step response input drives the state variable
from an initial value to a final value determined by the amplitude of the step function
applied at t = 0; the time needed to transition from the initial condition to the final
condition is always approximately 5 times the circuit time constant. The first order
Building on the RC and RL circuits, the series RLC circuit is now developed. It will be
shown that the general model for the transmission line is a number of RLC elements
The series RLC circuit is a class of second order circuits containing two energy storage
elements that cannot be replaced by a single element. They are sometimes called
second-order circuits because the circuit differential equation involves the second
In the series RLC circuit, the inductor and capacitor are connected in series. The
circuit that has a voltage source, resistor, inductor, and capacitor connected in series.
48
The Thevenin equivalent of the source and resistor produces the KVL constraint:
v + RTi = vT.
Applying KVL around the loop containing the inductor and capacitor yields:
v = vL + vC.
As noted earlier, the i-v characteristics of the inductor and capacitor are:
vL = L di/dt,
i = C dvC /dt.
Given this, there are now four independent equations with four unknowns: i, v, vL, and
vC . This set of equations provides a complete description of the dynamics of the series
RLC circuit. It is now possible to find the circuit response by deriving a circuit
One must use the circuit state variable as solutions variables because they are
continuous functions of time. In the series RLC circuit there are two state variables:
the capacitor voltage vC(t) and the inductor current i(t). Deriving a single equation in
vC(t) is a substitution into the inductor voltage and KVL constraint of the inductor and
These substitutions eliminate the unknowns except for vL and vC. To eliminate the
49
Substituting this result into a single equation results in:
This is a KVL equation around the loop of the series RLC circuit, where the inductor
and resistor voltages have been expressed in terms of the capacitor voltage. This is a
order equation because the highest order derivative is the second derivative of the
dependent variable vC(t). The coefficients are constant because the circuit parameters
L, C and RT do not change. The Thevenin voltage is always a known driving force,
This is the values of the capacitor voltage and inductor current at t = 0. The second-
order differential equation characterizes the response of the series RLC circuit in terms
of the capacitor voltage. Once the solution of the capacitor voltage is found, it is
possible to solve for every other voltage or current, including the inductor current,
Generally speaking, there are two models of the transmission line: Lossless and Lossy.
capacitance. However, the lossy transmission line model can take into account the
series resistance and dielectric conductance that is present in transmission lines where
50
loss is significant. The lossy transmission line model would be appropriate in
modeling propagation in earth, water, or other media where loss is large. Without loss
of generality, when working with copper or aluminum core wire, the model will be
The inductance and capacitance per unit length, respectively, will designate as Ld and
Cd. There are two conditions that can be used to describe the transmission line
response. The first is that one end to the line may be suddenly switched to a source,
and the voltage and current at any point on the transmission line are then a function of
time. This is the transient response of the transmission line and it requires a model of
Alternatively, one end of the transmission line may be switched to a sinusoidal source.
The voltage and current at some point on the line can be analyzed once a steady state
has been reached. This type of problem is best addressed by constructing a line model
in the frequency domain. The first modeling method is the most appropriate method
Consider the lossless transmission line that is switched to a direct current (dc) source.
The conditions on the line at a time dt after the connection of the source, when the
51
source voltage has penetrated a distance dx into the line can now be described. The
capacitance of the energized segment of the line Cd dx has charged to a voltage of VA,
DC
i = dQ/dt = Cd dx VA /dt = Cd VA u.
Where u is the velocity of propagation along the line of the disturbance caused by line
being switched to the source. The flow of the current establishes a magnetic flux Φ,
Φ = Ld dx i = Ld Cd VA u..
Faraday’s Law states that the rate of change of the flux must equal the line voltage, e.g.:
VA = dΦ /dt = Ld Cd VA u2.
u = ( Ld Cd )-1/2.
Substituting the velocity of propagation back into the equation for current on the line
gives:
i = Cd VA ( Ld Cd )-1/2.
52
= VA ( Ld Cd )-1/2
iR = VA, or i = VA/R
Z0 = ( Ld Cd )1/2
with units of Ohms (Ω). When a driving voltage propagates along a line, there is an
associated current pulse, namely, i = VA/Z0. Given this, until a condition on the line
Further analysis of the transmission line requires the establishment of a voltage and
current convention. The velocity of propagation u will be taken at going to the right,
X
Voltage
Va
I = Va/Zo Current
53
Now consider the moment when the voltage and current pulses travel the length of
the line and encounter an open-circuit termination. The current at the open-circuit
must be zero. This means that a current pulse must be initiated at the termination,
traveling toward the source with a magnitude of - VA/Z0 so that the line current is
progressively forced to zero. When the pulses reflected from the open circuit
termination arrive at the source end, the voltage along the entire length of the line is V’
+ VA, and the current is zero. This occurs at a time 2τ following the switching of the
source, where τ is the travel time of the pulses from the source to the termination and
conserved. At the end of the 2τ period, the energy stored on the line is associated with
VA (VA/Z0)2τ
These two expressions are equal, and by substituting Z0 and τ in terms of the line
parameters give V’ = VA .
This is an important finding, as it indicated that the voltage pulse incident on an open
circuit at the termination is equal to twice the voltage associated with the incident
54
pulse. To distinguish between the incident and reflected pulses, subscripts i and r will
be used, respectively. The incident and reflected pulses at the open-circuit just
described are:
It is useful to note that for an observer at the end of a line toward which the pulse Vi
is traveling, a Thevenin equivalent circuit can replace the line. Here the voltage source
is equal to the open-circuit voltage (show to be 2Vi) with impedance equal to the input
impedance of the line (show to be Z0 earlier). This is a valid description of the circuit
regardless of the actual line termination, provided that Vi does not change due to
reflections from other parts of the network to which the line is connected.
Additionally, this implies that the Thevenin equivalent circuit is valid for a period equal
to τ, the transit time of the line, and must be updated whenever a new incident pulse
arrives.
circuit when calculating the voltage on a line terminated with a resistance value of R.
First one must define the voltage and current pulses as Vi and Vi/Z0, incident at the
termination. Now it line is Replaced by its Thevenin equivalent, and connecting the
V = R/(R + Z0 ) 2Vi.
The voltage reflected and traveling away from the termination is now:
55
Vr = V-Vi = (R-Z0 )/(R+Z0 )Vi.
The ratio of the difference and sum of impedances is called the reflection coefficient,
and is used extensively in many systems, such as: elastic pressure waves, plane sound
ρ = (R-Z0 )/(R+Z0 ).
Note that for an open-circuit where R goes to infinity, ρ = 1, and, for a short-circuit, R
goes to zero and ρ = −1. In the special case where R = Z0 , ρ = 0. In this case, the
energy.
In the case where the termination is an inductor, the behavior of an inductor when not
under steady state (e.g dIi/dt not equal to zero) is subject to Faraday’s Law. The
voltage across the inductor is equal to the time rate of change of flux linkage.
VL(t) = LdIi(t)/dt.
The time derivative means that the voltage across the inductor is zero unless the
current is time varying. Under DC excitation, the current its constant and VL = 0. In
other words, the inductor acts as a short circuit. The inductor is a dynamic element
because only a changing current produces a non-zero voltage. Thus, in the case of Vi
Vr = (R-Z0)/(R+Z0 )Vi.
56
Rearranging terms, we have:
(R-Z0)/(R+Z0 )= Vr /Vi = ρ,
and finally,
LdIi(t)/dt / Vi = ρ(t).
This model shows that an inductor termination gives a positive value of ρ while the
When the circuit has a capacitive termination, the circuit is the dual of the inductor-
q(t) = Cvc(t).
To express the circuit behavior in terms of voltage and current, this equation is
dq(t)/dt = d(Cvc(t))/dt.
Where C is a constant and ic(t) is the time derivative of q(t), which establishes the
ic(t) = Cdvc(t)/dt.
This means the current is zero when the voltage across the capacitor is constant, and
ic(t) = 0, Vr = ic(t)Z0, = 0.
57
The capacitor is another dynamic element because the current is zero unless the
voltage is changing. Therefore, once the voltage is steady state, the capacitor acts like
In a complex system where there are a number of lines, each with of different lengths,
place. The voltage and current anywhere in the network consists of a superposition of
When studying classical behavior of electromagnetic fields, Maxwell equations are used
(see Heald and Marion). Maxwell’s equations predict the existence of electromagnetic
waves. In free space or in a dielectric, the vector fields must satisfy a simple wave
attenuation of the field. To describe electromagnetism, there are five vector fields that
are used:
58
When the medium has a conductivity σ, the wave electric field drives a current that
J = σE
It is common to assume that there is not other free charge or current present and that
the medium is linear, homogenous, and isotropic. Maxwell’s equation then reduces to:
div E = 0
div B = 0
Where the three properties of the medium (σ, ε, µ conductance, the dielectric
constant and the dipole constant) enter the Ampere-Maxwell law, but nowhere else.
Note, the notation grad, div and curl are vector differential operators. The gradient
∆ F = grad F = Σ e ∂F/∂x.
div F = Σ ∂F/∂x.
The curl of a vector F is defined by the cross product of the gradient with the vector
F:
By taking the curl of each of the curl equations in turn and making the appropriate
59
∆2E - 4πσµc2 ∂E/∂t - εµc2 ∂2E/∂t2 = 0
These equations have the form of the standard wave equations to which the non-zero
conductance has added a term proportional to the conductance, σ, and the first-order
time derivative. When the conductance is relatively low, it can be shown that the
added term causes the wave to damp or attenuate as it propagates. In the limit of high
conductivity, the term involving the second order time derivative becomes negligible
When considering the solution for the plane waves that vary harmonically in time, the
following results:
grad D = σ.
This is used to derive the differential equation that will determine the penetration of
For transmission lines with high conductance, the displacement current is small when
compared with the current i, such that ωε is much less than σ. Now, taking the
differential of the electric field equation, and substituting the dialectic displacement
∆2E = -jωµσE.
60
Similar analysis can be performed on the magnetic field and current density resulting in
the following:
∆2B = - jωµσ B,
∆2J = - jωµσ J.
Given the last three differential equations, consider the example of a plane conductor
of infinite depth, and no filed variation along the width or length. The topology will
become important in the analysis of conductors with limited topology (e.g. a wire),
because the depth over which appreciable field are concentrated is small. It is
important to note that any field variation along the surface, due to edge effects or
curvature, are small compared with the penetration into the conductor and are ignored.
Taking the uniform field just described, the electric field becomes (see Yoho):
where:
τ2= -jωµσ.
The term δ will be used extensively, as the quantity is called the skin depth, or the
δ = (2/ωµσ).5 meters.
61
The complete solution to the differential equation (in terms of the exponential), results
in the solution for plane waves that vary harmonically in time and space:
E = Ee x = Ee x e jx .
−τ − /δ − /δ
Both the magnetic field and current density are governed by the same differential
B = Be x e jx ,
− /δ − /δ
J = Je x e jx .
− /δ − /δ
It is evident that the magnitude of the fields and current density decrease exponentially
important result allows the modeling of the attenuation of high frequency wave
the surface. The depth of penetration is a function of the skin depth, namely: δ =
δ = 1/ (fπµσ).5.
For a round conductor (e.g. coaxial cable or twisted pair), with a conductor radius of r,
and a uniform current distribution of the conductive skin, the resistance per unit
62
R(f) = 1/(2r) (uf/µσ).5
the limit of the length of wire section x approaches zero, a voltage pulse of magnitude
dVi(x) = Ii(x)R(f)dx,
dVi(x) = (Vi(x)/Zo)R(f)dx.
Solving for the differential equation with respect to length x of the wire, gives the
Sadok):
!( R ( f ) )
Zo X
A( f , Z o , X ) = e .
It has been shown that when there is a mismatch in characteristic impedance, some
small amount of energy is reflected from the discontinuity. Where there are a number
of these mismatches close to each other on the transmission path, their reflections
interact and generate a number of reflection artifacts. These artifacts corrupt the
measured waveform and make analysis of the true impedance of the transmission path
difficult.
63
The process of determining the true transmission line impedance from the measured
to solve found in any field that studies waves. Some examples include the study of
lines (electrical engineer), and the wave behavior of matter (quantum mechanics).
layered media is relatively easy to solve. This is the case for lossless transmission lines,
waves in an elastic medium, and sound waves in a tube. In each case, there is a pair of
coupled first-order partial differential equations that govern two-state variables. For
sound, it is particle velocity and vertical force; for electricity, it is current and voltage;
and for pressure waves it is elastic velocity and pressure. In each case, it can be shown
that if the material parameters (area of a cross - section, density and elastic constants,
or inductance and capacitance) are constant, then all the state variables are governed by
the 1-D wave equation. By simple examples, it will be shown what happens when a
The analysis will be conducted in terms of seismological pressure waves following the
procedure outlined in Inverse Problems in Scattering, but the conclusions readily apply
64
to other systems. Consider a medium with a discontinuity at a depth of l consisting of
parameters Δ0, c0 prior to l and Δ1, c1 after the discontinuity. The displacement and
At time t = 0, the entire medium is quiescent and p(x,0) = w(x,0) = 0. Now consider
the medium for x>l, for which p,w are given. This implies that f1(x) = g1(x) = 0 for x >
l. If g1(x) = 0 when x>l, then g1(w-c1t) is 0 for all x,t. This means that there is only a
right moving wave, f1(w-c1t) in the portion x>l. As time progresses, the argument x-ct
becomes zero or negative when at x = 0, such that f0(w-cot) will not be forced to be
zero. Similarly, x+ct, which is positive, may exceed l, so that g0(w+cot) need not be zero.
Consider now that a right moving wave enters the medium at x = 0 at time t = 0 with
speed c0. This wave will travel through the medium until it reaches l. At this point,
which means:
g0(l+cot) = (Z0 -Z1)/(Z0 +Z1) f0(l-cot) and f1(l-c1t) = 2 Z0/(Z0 +Z1) f0(l-cot).
65
After the appropriate substitution:
x + cot = l+co(t+(x-l)/co),
x - c1t = l-c1(t+(l-x)/c1).
This significant result indicates that the first position, [0,l] there is the original incident
right moving wave (given by the first term) and a reflected waved given by the second
term. Since f0(x) is zero for positive arguments, this reflected wave will not arrive at x
= a in [0,l] until the argument 2l-a- cot becomes zero at time t = (2l-a)/co. In other
words, there is no reflected wave at x = a until the incident wave has had time to travel
from 0 to l and back, a total distance of 2l-a. This illustrates the fundamental concept
of causality. For waves moving in a one dimensional medium with speed c, a cause or
disturbance at x0, t0 can have no effect at x1 until t1 > t0, at which a wave starting at x0
at t0 reaches x1.
The equations governing plane waves in various mediums are all described by similar
66
involve solutions in which the waves travel with some speed c. The squares of the
At any position x on the transmission line, there will be a local value of the wave
speed, c(x). When the wave moves from x to x + dx, the time taken is;
d = dx/c(x).
x
" = ! du / c(u ).
0
This time ς will be defined at the travel time. With this definition, it is possible to
transform the equations with independent variables of ς,t instead of x,t. This allows
∂p/∂ = -Z ∂w/∂t;
∂p/∂t = -Z ∂w/∂ .
Having reduced the equations to standard form, refer back to the original pressure
wave relationship:
67
which refer to Z. There is a down-moving wave and an up-moving wave. The down-
moving wave is p = Zw, while for the up moving wave is p = -Zw. Consider combining
these equations into Zw +/-p instead of p,w. In a down-moving wave, Zw+p is non-
zero and Zw-p is zero. For the up-moving wave, the dual of this will be true. Let one
Let
η( ) = Z( )½.
Then define
where D and U represent the down and up moving waves. It can now be shown that
by making a substitution into the differential equations ∂p/∂ = -Z ∂w/∂t and ∂p/∂t =
-Z ∂w/∂ , that:
These equations show that when Z is constant, k = 0, and the two equations become
decoupled. The physical meaning of decoupling D and U is that the two waves do not
interact as long as k = 0. When Z changes, the D and U waves will interact, causing
68
reflection. It is the interaction that must be de-convolved in the inverse scattering
problem.
governing waves to be reduced to standard form. In this standard form, the medium
formulation was provided in terms of down and up moving waves. Using these
developed.
some dx, 2dx .... positions; the medium is called a Goupillaud medium. The analysis
of the waves medium requires two situations: as the waves travel along a part where Z
is constant, and as the wave crosses a discontinuity. Over the distance traveled ,
which is a member set of [(i-1)d, id] where Z is constant, the waves are separated into a
D( ,t) = f( -t),
U( ,t) = f( + t).
69
The downward moving wave is just above the discontinuity at id at any given time t
must have departed from (i-1)d at the instant t - d. The wave has traveled without any
D(id-,t) = D[(i-1)d+,t-d].
The value of D[(i-1)d+,t-d] at the instant prior to t-d, is obtained from D[(i-1)d+,t], by
executing the delay operator d. The delay operator has the defining property of
changing any function of time, f(t), into its value at the instant t-d. Therefore:
df(t) = f(t-d),
D(id-,t) = dD[(i-1)d+,t].
The same argument applies to the upward moving wave such that:
U(id-,t) = d-1U[(i-1)d+,t].
The downward and upward wave equations can now be combined into the matrix
equations:
This is the first of two equations that describes the evolution of the waves. It shows
that the D,U waves travel without change of shape when the characteristic impedance,
70
The second equation states that w, p is continuous across a discontinuity in Z,
therefore:
Together, these equations, with the appropriate substitutions, completely describe the
It is important to understand the duality between the D, U waves and p, w. The D,U
waves maintain their shape where Z is constant and are disturbed when they cross a
discontinuity. Conversely, p, w change there shape while traveling in the medium and
These basic equations can now be combined to obtain separate pairs equations
η(id-) = ηi-1,
η (id+) = ηi.
&( ( '1 #
Hi = 1 $ !.
2 ( ' ( '1 "
%
Then
71
& D(id ', t )# & w(id ', t )#
$U (id ', t ) ! = H i'1 $ p (id ', t ) ! ,
% " % "
and
To obtain the second evolution equation for w, p, the inverse of the evolution transfer
This equation describes how the p, w waves change as they travel in the region between
(i-1)d and id, where Z = Zi-1. A similar equation for the downward and upward wave
can be built to describe how the waves interact as they pass through the discontinuity
This important equation is the result needed to define the ith reflection coefficient
ρi = (Zi-1-Zi)/(Zi-1 + Zi),
τi = (1-ρi2)½.
Then,
&1 ' )i #
( i = H i H i''11 1 $ .
* i % )i 1 !"
72
The matrix Φ describes how the D, U waves interact as they cross the discontinuity,
ι
and is called the transfer or chain scattering matrix. The downward and upward
This equation expressed quantities below one discontinuity in terms of those at the
previous one within a medium. This means that it is possible to obtain quantities at
future. This is a non-causal relationship, and the evolution equation, which is based
on, is therefore non-causal as well. In order to obtain a causal relationship, one must
rearrange the evolution equations. Temporally, the suffix i is dropped on σ and τ as:
Di + - τUi = σ dDi-1,
Di = σ dDi-1 - Ui.
73
The second causal relationship can now be solved in term of Ui-1, namely:
&) '* i #
( = (i = $ i ,
%' * i ) i !"
Note that this is the casual evolution equation: the D waves move down such that it
will reach id+ after (i-1)d+. The U waves moves up such that it reaches id+ before (i-
1)d+. The derived evolution equations for waves in a Goupillaud medium allow for
the derived difference equations. This will be the basis for algorithms constructing
waves in a medium from a given initial and boundary data. The essential characteristic
point ς = id at any time t depends only on the input at the times t, t-d, t-2d, etc. This is
true whatever the form of the input, whether it is continuously varying, a series of
peaks, or steady state. In particular, this means that the response at time t = nd will
depend only on the inputs at time nd, (n-1d), ...,d,0. For a more complete description
see Bruckstein and Kailath. For higher dimension inverse scattering problems see
74
Pulse and Waveform Generation for TDR
There are a number of ways to generate signals with rise times in the nanosecond
range, such as programmable logic, clock devices, etc. However, to generate rise times
in the pico-second (ps) range, other techniques must be employed, specifically, the
Step Recovery Diode (SRD). Hewlett Packard commercially introduced the SRD and
one of its major applications as in pulse shaping and waveform generation (Hewlett
Packard).
The SRD is a charge-controlled switch. For example, when charge is inserted into the
diode by forward bias, the diode appears as a low impedance device. When the charge
is being removed, the diode continues as a low impedance device until all the charge is
removed, at which point it snaps to a high impedance device. The ability of the SRD
to store charge and to change impedance levels quickly can be used for generating
The SRD is a two terminal P-I-N junction whose static (DC) characteristics are similar
to the usual p-n junction diode. However, the dynamic characteristic is different. The
most distinguishing feature of the SRD is the very abrupt dependence of its junction
impedance upon its internal charge storage. This storage of charge occurs as a result
75
of the non-zero recombination time of minority carriers that have been injected across
The charge stored under forward bias can be obtained from the charge continuity
equations:
where
QF = IF τ(1-e-tf/ ).
τ
Where QF is the stored charge from the forward current, IF is the forward charging
current and tf is the length of time the forward current IF is applied. If tf is long
If a constant reverse current is now used to remove stored charge on the SRD, then
ts is the time required to deplete the stored charge and Ir is the reverse current supplied
76
understanding to the charge flow of the SRD. While idealized, they are useful in
Given this, if a forward biases SRD is suddenly reversed-current biased, it will first
appear as a very low impedance (less then 1 Ohm) until the stored charge is removed.
At that point, the impedance will suddenly increase to its normal high reverse
impedance. This effectively stops the flow of reverse current. The impedance
transition takes generally less than 1 nanosecond. Many SRD have transitions times
Due to charge storage during forward conduction, the SRD impedance remains low,
short-circuiting the source by a time designated as ts. The time, called the storage time,
is measured between the 50% points of the reverse current waveform, or equivalently,
between the 50% point of the output waveforms obtained with and without the diode
in the circuit. The storage phase ends when the stored charge is removed and the SRD
suddenly becomes an open circuit causing output of the voltage source to be applied
to the load. The fall time of the SRD reverse current, tr, which also equals the rise time
of the voltage on the load, is called the transition rise-time. This time is a function of
77
For a given pulse amplitude and source resistance, ts, can be adjusted by varying IF to
be many times greater than tr.. Therefore, the output rise-time of the circuit can be
many times smaller than the rise-time of the drive waveform. In practice, a 10-
nanosecond circuit can be easily sharpened to 300 picoseconds with one SRD, and to
Errors in the resulting waveform can result from package parasitics, and the
dependence of diode dynamic characteristics on both the circuit and the operating
conditions. The waveform could have ramping, rounding, overshoot, and ringing. To
determine what gives rise to the various parasitic effects, one must consider the
The first parasitic effect is the voltage drop of the diode under the forward bias,
namely:
VF = φ + IF RS.
This voltage φ is typically .7 to .8 volts. The steady state voltage will not appear in a
circuit where the SRD is capacitively coupled to the load. The second effect is the
voltage spike, VL. This is the result of the rapid change of current through the package
VL = LP (di/dt).
78
For a typical package inductance of 4 nH and a reverse current of 400 mA occurring in
10 nanoseconds, VL = 4 nH x .4A/10ns = .16 volts. For faster current fall times, i.e.,
when sharpening a 1-nanosecond rise-time pulse, the voltage would be 1.6 volts and
may not be negligible. In this case, a SRD package with a smaller inductance should be
used. Because of the SRD fast transition rise-time specification, they are generally
packaged in a low inductance package. For example, the Metalics SRD used in the
prototype unit was a low capacitance and inductance package - it measured only 3 mm
The third parasitic effect is the voltage plateau, VP. This is caused by the reverse
current component flowing through the dynamic series resistance RS of the SRD
VP = (IP +IR)RS.
For the circuit conditions used in the previous example, the plateau voltage is: VP =
410 mA x .4 Ohms = .16 volts, and is generally negligible. The transition time, tr, is
dependent on SRD design, circuit constraints, and the level of stored charge. The
tr = (tt2 + tRC2)1/2,
where tt is the intrinsic SRD transition time and tRC is the circuit (RC controlled) rise
time. The SRD intrinsic transition time is dependent on the level of stored charge and
SRD design. The circuit controlled rise-time is dependent on the diode reverse biased
79
capacitance and the equivalent circuit resistance in parallel with it. The 10% - 90%
where Req is the equivalent resistance consisting of the parallel combination of the
The last parasitic effect that can be observed is the over-shoot and ringing waveform.
This is due to a damped resonance of the SRD and package capacitance, with the
package and stray circuit inductance, excited by the high frequency components of the
rapidly changing SRD current. This effect can be minimized by reducing stray circuit
Transmission
50 Ohms
Line
Va
Pulse
SRD
Generator
The basic function of a pulse sharpening circuit is to convert a slow-rise time or fall-
time input pulse into a faster rise-time or fall-time output pulse. A variety of SRD
80
circuits can be configured to perform such a function, depending on the detailed
requirements. One of the simplest circuits of this type is the restive source and load
SRD test circuit. Besides being simple, this circuit also lends itself well to illustrating
the fundamental design principles that are used in more complicated circuits. The
design usually starts with knowledge of the input waveform, the desired output
waveform, and the source and load resistances. Assume the following design
specifications:
Input Waveform
Pulse-Width: 50 ns
Rise-Time: 10 ns
Fall-Time: 10 ns
Repetition Rate 10 kHz
Peak Open Circuit Voltage 20.5 volts
Peak Loaded Output Voltage at 50 Ohms 10 volts
Source Resistance 50 Ohms
Output Waveform
Rise-Time less than 300 ps
Load Resistance 50 Ohms
Peak Load Voltage 10 Volts
First, the proper SRD must be selected. Since clipping of the output amplitude is not
desired, the breakdown voltage of the diode must be great than 10 volts. This value is
well within the limits of any available SRD. Because the transition time of the diode is
dependent on the stored charge, one must next determine the minimum stored charge
that is required. The storage time should be equal to or slightly great than ½ the input
ts = ½ tr1.
81
If ts < ½ tr1, the SRD will transition prior to completion of the input rise-time and only
a portion of the rise time will undergo sharpening. If ts >> ½ tr1, then there will be a
greater delay and the output rise-time will be slower since the transition time of the
The amount of peak reverse current switched by the SRD must equal the current step
It is assumed that the IF RS drop in the forward biases diode will be small. Thus, by
making ts = ½ tr1 the reverse current waveform through the SRD is essentially
triangular.
The stored charge that is removed by the reverse current is the area under the curve.
This suggests that any SRD used in this circuit must store at least 2000 pC. From the
design specification, the rise-time of the circuit must be less than 300 ps. The SRD
transition time is related to the circuit rise-time, namely tr = (tt2 + tRC2)1/2. At the
minimum, tr = 2.2 Req CVR. Assuming that the circuit blocking capacitance C is large,
then the equivalent resistance of Req shunting the SRD capacitance CVR during
transition is:
82
Req = RS RL/(RS +RL) = 50 x 50/100 = 25 Ohms.
Since this is the resistance used during SRD test, the required SRD can simply be
Having selected the SRD, one must now determine the forward bias current, the
required input pulse amplitude, and the effects of the series resistance and package
inductance on the output pulse shape. The forward current is obtained from:
The inductive spike at the start of the output pulse, due to the package inductance, will
then be approximately 4 nH. Assuming the source has a linear rise-time, then:
The plateau voltage VP following the inductive spike is due to the series resistance RS
of the SRD. For a typical SRD, a RS of .5 Ohms could be expected, such that:
As noted, for SRD packages with larger inductances, one must check if the leading
edge will exhibit an overshoot and ringing. Calculation of the exact leading edge shape
is much easier with a properly line-mounted SRD since the line is know to be resistive
83
for a certain amount of time (the round trip travel time of the wave to reach the first
discontinuity). Assuming that the diode switches instantaneously, the leading edge of
where 1/(LS CVR ).5 is the ringing frequency and ZO /4 ( CVR /LS ).5 is the damping
factor. For a notional SRD with 4 nH LP and CVR = 4 pF, the damping factor is :
Which, for a ring frequency of 1/(LS CVR ), gives a peak overshoot of approximately 2
volts. To complete the design, one must additionally investigate the stability of the
leading edge (jitter) and repetition rate limit of the circuit. Jitter will occur if tS is not
constant. Since tS = τIF /IR, jitter will occur due to variation in τ, amplitude changes in
either bias supply or input pulse. For short-term variations, τ is effectively constant.
Ripple or noise in the bias supply and/or input pulse will produce a proportional
change in tS. For a 1% peak to peak amplitude change in either bias supply or input
Maximum repetition rate will be limited due to the time required to build up the stored
charge in the SRD after each pulse. The charge buildup in the SRD was given as QF =
IF τ(1-e-tf/ ). For a 5% variation in QF and a nominal lifetime of 200 ns, the minimum
τ
84
With a 50 ns pulse, the maximum repetition rate will be 1.54 MHz. Note, that for
capacitively coupled circuits, the capacitors used in the circuit will generally impose a
more severe limit on the maximum repetition rate. This completes the design and
built that eliminate some the problems encountered. However, for the design
requirements of a TDR system, the general SRD pulse sharpening circuit is adequate.
Parametric Classification
The final aspect of the wire diagnostics design is the classification of a detected event
number of potential solutions. However, we will focus the design on statistical pattern
which is concerned with grouping a test sample into a separation function. The
following definitions are defined to build the mathematics used in the separation
Probability Laws
X = [ x1 , x2 ,..., xn ]T ,
85
P( x1 ,...xn ) = Pr{x1 ! x1 ,..., xn ! xn } .
P( X ) = Pr{X ! X } ,
defined as:
or
! n P ( X)
P( X ) = .
!x1 ...!xn
L
p( X ) = ! Pi pi ( X ) ,
i =1
Pi pi ( X )
P(! i | X ) or qi ( X ) = .
p( X )
86
Parameters of Distributions
common parameter is the expectation vector, more commonly know as the mean:
M = E{ X } = ! Xp( X )dX
.
mi = ! xi p ( x)dx = ! xi p ( xi )dxi
The description of the variance and the relationship of variances between one set and
where S is the auto correlation matrix. Sometimes it is more convenient to use cii=σ i, 2
87
The Normal distribution is commonly used to model real world data. It is defined as:
1
N x ( µ , ") = exp{! 1 d 2 ( x)} ,
(2# ) n/2
"
1/ 2 2
where:
d 2 ( x) = ( X ! M ) T " !1 ( X ! M ) .
When working with experimental data, it is rare that the distribution is known
explicitly. Because of this, one must estimate the parameters. Estimation of these
parameters introduces errors and bias, which must be accounted for. Let Y be a
times, the function of Y can be too complex to derive experimentally; therefore, the
N
µ̂ y = 1 y .
N! k =1
k
N
VAR( µˆ y ) = 1 E{( y k " mk ) 2 } = 1 ! y2 .
N#
k =1
N
By extension, then:
88
The sample mean and sample autocorrelation function will then be, respectively:
N N
mˆ = 1
N " X k , Sˆ = 1
k =1
N"
k =1
X k X k , E{mˆ } = m, COV (mˆ ) = 1 ! .
N
Note, that the estimator for the mean and autocorrelation are unbiased and consistent.
E{mˆ y } = E{ y} = " ij! i! j . In most applications, however, the means are not known,
y = ( xi ! mˆ i )( x j ! mˆ j ),
then by extension,
N N
"ˆ = 1 # ( xk ! mˆ )( xk ! mˆ )T = 1 {( xk ! m) ! (mˆ ! m)}{( xk ! m) ! (mˆ ! m)}T ,
N k =1
N#
k =1
N
=1 (x ! mˆ )( xk ! mˆ )T !(mˆ ! m)(mˆ ! m)T .
N# k =1
k
Now that we have defined the matrix representation of covariance, we take the
expectation:
89
The expected value of covariance is similarly a biased estimator. To eliminate the bias,
define the sample covariance matrix as:
N
#ˆ = 1 ( xk " mˆ )( xk " mˆ ) T ,
N " 1!
k =1
comparing the sample to two or more known classes. Given two classes or events,
Two of these conditions result in errors. A type I error is made when one rejects Ho,
when in fact Ho is true, which is a false alarm. A type II error is made when one
There is always a trade off between type I and type II errors, and ideally a system
would attempt to minimize both. One way to minimize these errors would be to make
the separation between the two distributions as large as possible, perhaps by using a
90
transformation. Given the probability laws, it will be shown that such a
Y=ATX,
where
The covariance of this linear transformation will be, following standard rules for the
linear transformation of variance is:
d y2 = (Y ! m y )T " !y1 (Y !m y ),
= ( X ! m x )T AA !1" !x1 ( AT ) !1 AT ( X ! m x ),
T
= ( X ! m x )T " !x1 ( X ! m x ),
= d x2 .
Note that distance is invariant under any non-singular linear transformation A. Now,
define a function Z = X-M, (e.g. a shift), so that d z2 ( z ) = Z T " !1 Z (this distance is the n
dimensional distance between two distributions). In order to minimize a type I error,
some Z is need to be found that maximizes the distance function, subject to the side
91
constraint that ZTZ = I. Using standard Lagrange multiplier to find the local extrema
(e.g. the maximum):
# {Z T " !1 Z ! µ ( Z T Z ! I )} = 2" !1 Z ! 2 µZ .
#Z
" ! #I = 0 . This is very significant - there exits a simple solution to this problem. λ
n matrix (e.g. a covariance matrix), there are n real eigenvalues (λ1…λn) and n real
ΣΦ=ΦΛ,
subject to:
Φ Φ=Ι,
Τ
92
Given this, we will use Φ as the transformation matrix A, Y = Φ X, at which point
Τ
# y = " T # x " = ! . This is important in that Λ is diagonal (no cross correlation - the
variance of Y is now independent). This now allows the matrix to be broken down
Theta is now the angle between the two vectors X and φi, and yi is the projection of X
onto φi. Practically speaking, this defines the principal components of the distribution
as a new, orthogonal coordinate system where the eigenvalues are the variance of the
Hypothesis Testing
wire is a fault, such as a short or open. The event is composed of attributes, which are
reflection coefficients are a random vector in which we desire to determine with class
of events it belongs. We are interested if the detected event is from the class of shorts,
opens, connectors, etc. While there may be any number of event classes, there is no
loss in specificity when developing the notation for two classes (consequently, it will be
show that for a n class problem, there are n-1 degrees of freedom).
We will define the random vector X as the reflection coefficients associated with a
93
!1
q1 ( X ) <> q2 ( X ) .
!2
!1
The notation <> means that if ω1 is greater than choose set 2, or if ω2 is less than,
!2
can be computed using Bayes theorem, as qi = PipI(X)/p(X), where p(X) is the mixed
!1
P1 p1 ( X ) <> P2 p 2 ( X ) .
!2
p1 ( X ) !1 P2
l( X ) = <> .
p 2 ( X ) ! 2 P1
The likelihood ration is the basic quantity in hypothesis testing. The value P2/P1 is the
threshold value. In many cases, it will be easier to calculate the minus log likelihood
ratio such that the decision rule becomes (e.g. now called the discriminate function):
!1
P1
h( X ) = " ln l( X ) = " ln p1 ( X ) + ln p 2 ( X ) <> ln .
!2 P2
94
Given the decision rule and the optimal transformation, we will assume that pi(X), is
the reflection coefficients associated with event i, are normal with expected vectors Mi
and covariance matrix Σi . This can be done without loss of generality because any
h( X ) = # ln l( X ),
1 1 1 " !1 P
= ( X # M 1 ) T "1#1 ( X # M 1 ) # ( X # M 2 ) T " #21 ( X # M 2 ) + ln 1 <> ln 2 .
2 2 2 " 2 ! 2 P1
AT # 1 A = I , AT # 2 A = " and AT ( M 2 ! M 1 ) = L.
The information matrix of the classes under test, ("1!1 ! " !21 ) !1 is transformed to a
1 1 1 P
h( X ) = Y T #!1Y ! [(!" !1 L) T ]Y + [! LT " !1 L ! ln " ! ln 2 ] .
2 2 2 P1
95
For the wire events, the covariance of the event classes is approximately the same, so
that the log likelihood ratio test for classification becomes significantly easier. The new
model is now a linear vs. quadratic problem. The simplified model is now:
2 P1
This is the parametric classifier. The classifier is run by testing the hypothesis, Ho , no
fault, vs. the n-1 alternative hypothesis that the event is a fault. The event with the
largest positive value is the most likely event. If all scores are less than zero, the Null
hypothesis is not rejected and there the detected event is not a fault.
maintenance of that software until the end of its useful life. Given this, there is a
primary path in the development process that should be accomplished prior to the first
line of code being written. Briefly, the process should entail the following (Davis).
Software Requirements
This includes analyzing the software problem at hand and concludes with a complete
96
Others also call it the functional description, functional requirements and
specifications.
The preliminary design decomposes the software system into its actual constituents
the resulting design are small enough so that an individual can have a good conceptual
grasp of the function. In practice, this suggests functionality that will map into 50 to
200 lines of code. Each of these code modules is documented in terms of its inputs,
outputs and functions. This is followed by a detailed design, which defines and
documents algorithms for each module in the design that will be realized as code.
Once the detail design is complete, the design is transformed into a computer–
algorithms into a high level language (e.g. writing the algorithms into C), followed by
converting the high level language into machine language (e.g. compiling).
Following coding, the testing process in used to uncover and removes logical and
programming error. This is done in unit test. Unit tests purpose is to ensure that each
as-built module behaves according to its specification defined during detailed design.
On complete of unit test, the software undergoes integration testing. This ensures that
the set of modules behave as well when integrated as they did as independent tested
97
the design tree defined during preliminary design. Thus, purpose of integration testing
System testing is then used to check that the entire, fully integrated software system
delivery, production and deployment. At this point, the software and hardware are
It is inappropriate to wait until the testing stage to determine how testing will be done.
System test planning assesses how the software will conform to the requirements. It
includes the development and documentation of test plans and procedures, and might
include the full-scale development of a test environment to run the actual system.
Another critical purpose of software system test planning is to thoroughly examine the
not it has been written in a manner that makes it possible to verify that the software
98
Additionally, an integration test plan is generated, which documents plans and
apply during the detailed design, coding and unit test process in order to
This activity might spawn a software development effort of its own to create test
harness and scaffolding software (e.g. software used to test or temporarily join a
In general, the cost of requirements is around five percent of the total development
effort. Preliminary design will account for fifteen percent of the time, while detailed
design, coding, and unit testing will take taking sixty-five percent. The remaining
fifteen percent of development time will be used by integration and system test. Given
that five percent of the development cost is tied up in requirements, why are
requirements done in the first place? Essentially, there is a great deal of empirical
evidence to support the hypothesis that: The later in the development life cycle that a software
99
In the early 1970s, three companies, GTE, TRW, and IBM performed independent
studies to determine the relative cost of repair for a software error. All three
companies were unaware of the studies being researched by the other two, but they all
reached roughly the same result. Basically, if one arbitrarily assigned a unit cost to the
effort of detecting and repairing an error during the coding stages, it was found that
the cost to detect and repair an error during the requirements stage was between a fifth
and tenth as much, and the cost to detect and repair an error during maintenance
phase was twenty times a much. All together, this implies a cost saving ratio of 200 to
Summary of Chapter 2
The reference material cited in Chapter 2 gives the background information needed to
conduct the research of wire diagnostics. Essentially, the laws governing the behavior
of circuits were reviewed so that a transmission line theory could be developed and
developed. Together, the transmission line models and inverse scattering models allow
The determination of what type of detected event is made using statistical processes.
A review of basic statistics and statistical pattern recognition now allows the complete
100
101
Chapter 3: Methodology
The study methodology combines the Historical/Case Study Method to gather user
preferences and desires for a wire diagnostics system, with the Experimental Method
to design and build the hardware, software, and algorithms for such a product. A
review of literature provides background of the need for wire diagnostics of aging
aircraft, and an evaluation of the current state of the technology. Interviews with
As an entry point into the study, an extensive literature review was conducted into
wiring problems. A number of articles released by the FAA and NASA (Hall, et al)
indicated the need for improved maintenance practices addressing wire and the wire in
aging aircraft. Additionally, the Review of Federal Programs for Wire System Safety
(Lane, 2000) gives a listing of all interagency research into wire and wire related issues.
102
From this, a basic knowledge of the problem scope was developed, to include the
Potential customers were selected and then interviewed to determine their individual
wire needs. Goodrich has a number of relationships with various air carriers (such as
A search of the exiting products was then conducted. This included evaluation of the
Bicotest Ltd, and Eclipse. High-end test equipment, such as the Tektronix TDS 8000
was rented to evaluate the upper limits of performance available from a TDR system.
While in the process of evaluating the TDS 8000, a number of test data files where
compiled on various wire and cable types. Tests were conducted with different lengths
of cable, connectors, and fault types. These files where saved for model and algorithm
using the Microsoft Visual C++, with the target platform being the Windows CE
operating system.
tool from Intusoft. Once modeling was finished, the hardware was build on a
breadboard using Metelics MMD 830-E28X Step Recovery Diodes and MHS-40,02-
103
G2sX Hybrid Schotkey high conductance diodes. Performance measure of the pulse
shaping circuit where made by a Tektronix TDS 7404, 4Ghz bandwidth, 20 Gs/s
oscilloscope with a P74240 4.0 Ghz test probe. The test probe had a capacitance of
1.0pf and a resistance of 20K Ohms. For the prototype hardware, the oscilloscope
Database of Study
The research is primarily concerned with diagnosing wire associated with fuel tank
harnesses. Goodrich Fuels and Utility Systems builds a number of fuel systems found
on commercial aircraft (such as the Boeing 727, 737, 747, 767, 777 models, Airbus 340,
and a number of other aircraft) and military aircraft (such as the F-16, B-1B, B-2, etc.).
As such, the research made available a number of wire times and harnesses to
experiment with.
For the initial test, coaxial cable such as RG-58 and ECO 185059D were used. ECO
185059D is a coaxial cable use in the C-130 fuel system. It has a characteristic
and an inner conductor diameter of .032 inches (32 AWG). This is an ideal wire to test
as it has closely matched impedance to the nominal 50 Ohms cable used as the test
harness.
For single-core wire, the researcher experimented with a tank harness removed from
the wing tank of a Boeing 727. This tank wire was particularly difficult to test and
104
represents worst case, as the wire has a characteristic impedance of 67 Ohms (a large
fraction of the test energy is reflected away from the wire), is old and has numerous
faults. Additionally, these tank wires are not shielded and are not mounted within a
harness, per say. This wire type is run along aluminum stringers and frames,
periodically held in place with a clamp, to the tank probe. Any time the wire runs close
capacitive inductance.
Tank harnesses are not terminated in a large resistive load, which would be typical of a
switch or load coil. The fuel system estimates the quantity of fuel by measuring the
capacitance of the fuel probe, which is dependent on the height of the fuel. Thus, the
termination acts as a capacitive short. Typical capacitive loads associated with a fuel
probe are on the order of 120 pf. To simulate the proper termination, the tank
A number of data files were generated from various experiments. These flat files were
which samples 500 points with selected time scales form 2 ps to 1 microsecond.
Experiments were typically run at a sample rate of 2 x 10-10 seconds. Data from the
oscilloscope board had a sample rate of 2.5 GHz, or 4 x 10-10 seconds. For a sample
length of 1024, this gives a maximum test range of approximately 140 feet.
105
Comment on Validity of Data
interpretation. The researchers bias cannot but color his appraisal of user
specification, wants and desires. Additionally, the researchers evaluation of the current
market and product offers from other commercial vendors will be tainted by his
The market for aviation wire diagnostics, being relatively new, has no metrics to
evaluate the cost or benefit to a customer. Thus, while the cost of design and
production can be quantified, it is difficult to establish the benefit to the customer, and
therefore, a sales price. Since this is a new product with few entrants, the customer in
many cases does not know what the tool should do, how to appropriately use it, or
even if it is useful. While there is a tacit desire in the aviation community to address
mechanical systems, is extending this paradigm to wire systems. Many of the same
maintenance issues apply, and as such, the validity of the model should be similar. The
assumptions, based on user tacit knowledge and combined with prior experience in the
106
In terms of the physical aspect of the engineered product, it is simply a matter of
testing to prove the validity. The removal of inverse scattering artifacts can be tested
for, visually, by comparing the processed to raw waveforms. The model assumptions
for attenuation will be tested against physical cable, with measurements being taken
with the Tektronix TDS 8000 or Tektronix TDS 7404 oscilloscope. The frequency
Fault detection will be evaluated by using seeded faults on a test cable (such as
algorithms will be run on real-world harnesses. Many of the test data points will be
potentially be used on a wet tank (e.g. tank with fuel or fuel vapors in it), which will
While TDR is not a new test procedure, it is believed that the system design approach
domain application notes, yet the design is original because it supports a specification
While the inverse scattering phenomena, has been solved, it has not been integrated
107
functionality to support the larger system question of making the measured waveform
dispersion effects, is new. The filter is a convolution matrix where the filter
coefficients are a function of the inverse attenuation of the signal. This filter applies
the gain and signal compression that corrects the dispersion of the TDR pulse, due to
the skin effect attenuation in the wire. While adaptive filters are a known technology –
this is the first application of a distance varying filter, to the researchers knowledge.
Statistical pattern recognition is a field of study that is in the process of maturing. The
waveform data and track wire condition over time, is new. The functionality is
technically available, even if one stores the data on a text flat file. But, to actively
108
Summary of Chapter 3
This chapter briefly reviews the methodologies, materials, and validity of the wire
diagnostics study. After review of literature, interviews with potential customers, the
research developed the functional requirements for a wire diagnostics test set.
build a breadboard for test and evaluation, while Matlab® was used to prototype the
algorithms.
Software was then developed using Microsoft CE, based on function requirements and
software requirements. A prototype system was developed which was testing against
seed fault data. The test wire used was commercial aviation cable used for fuel
systems.
Certain aspects of the study, individually, are not new. The significance of the study is
that through the integrations of a number of technologies, a new system approach was
109
Chapter 4: Data Analysis
This is the compilation of experimental results, analysis, and design of the wire
diagnostics tool. Initial requirements were built from customer interviews, followed by
Customer Requirements
the intent was for a commercial product, interactions with potential customers were
used to gage the difficulty of the wire problem and establish what the user would want
in a product.
A technical review of the wire diagnostics development effort was held with AA
depot-level maintenance executives on May 8th, 2002. AA confirmed that there are
maintenance system. It was agreed that once a prototype unit has been built, AA
110
Naval Air Systems Command
Project engineers with the Science and Technology group, Wiring System Branch,
Naval Air System Command were briefed on the development of a wire diagnostics
system on May 20th, 2002. This group has been one of the major initiators of research
and development in aging aircraft. One of their primary concerns is wiring and
methods to detect wire faults. The Wiring Systems Branch had recently awarded a
contract for a wire diagnostics device to CM Technologies, and voiced the need for a
particular interest to this group was the need to test a multi-wire harness. It was noted
that no commercial product has been offered to test an entire harness, where the
number of industrial application exist. One of particular of interest was a large, heavy
lift crane. NAVSEA stated that large industrial cranes have a number of electrical
contacts and wire harnesses that must be working in order for the crane to operate.
When a crane fails, it may require a maintainer to work in some very awkward
111
positions (300 feet up on a boom, for example). For this reason, whatever test
All the potential customers acknowledged that aging wire is a serious problem. For
aviation application, there will be a need for a wire diagnostics system that can test a
number of wires within a harness. To successfully do this, the system must be able to
automatically find a return path for the wire under-test. A test unit should be portable
As noted, the TDR signal is a step-pulse with a short rise-time. This equates to a high
frequency component within the TDR signal, which due to the properties of the
transmission line, is attenuated and dispersed in time. In order to correct for this
behavior, an inverse filter is required that is matched to the transmission line transfer
!( R ( f ) )
Zo X
A( f , Z o , X ) = e ,
where:
112
R(f) = K/(r) (f).5.
To validate this model, the frequency response of the RG 58 coaxial cable and ECO
185059D coaxial cable (a 30 Ohm wire used on the C-130) was estimated and
The transfer function for any system is completely characterized by its impulse
from a Dirac function – a perfect impulse. However, the TDR system generates a step
response, from which an impulse response can be calculated by taking the derivative
with respect to time. This numerical estimation will be close to the actual impulse
response, if both the sampling rate and step generator rise-time is a small fraction of
the circuit time constant, RC. The Tektronix TDS-8000 oscilloscope was set up to
generate pulse with rise-time and sampling rate of 2 x 10-10. The wire under-test had a
suggests that any measurement made over 1 meter satisfies the time constant
requirements.
The model of the transfer function is a finite impulse response (FIR) filter. This
model was chosen instead of the infinite impulse response (IIR) filter, because when
there is no change in impedance, the wire is purely feed forward. This means that the
filter order of the A coefficients is 1 (e.g. A(eiw) = 1). The filter order for the B
113
coefficients was set at 50. This value was used because, for wire lengths of less than
300 feet, the dispersion of the signal will not exceed 10-9 seconds (or about 25
larger order filters. Note: the transfer function is the ratio of the difference equations
coefficients:
H(eiw) = B(eiw)/A(eiw).
Since the filter is an FIR filter with A(eiw) = 1, the transfer function:
H(eiw) = B(eiw).
Additionally, the time domain impulse response is the time difference of the step
response (e.g. the derivative with respect to time). The best estimator of the transfer
function H(eiw) will then be the Fourier transform of the impulse response,
H(eiw) = FFT(b).
The transfer function, in the Fourier domain, is the frequency response of the wire for
a given distance and characteristic impedance. The transfer function frequency ranges
from 0 to π radian, where π is the Nyquest frequency (half the sampling rate). Given
114
Example Wire Attenuation
The step function of a RG58 coaxial cable was taken using a 200 ps rise-time pulse of
0.25 volts. The length of the cable was 5 meters, with a 1-meter test harness. The
impulse response was calculated by taking the difference between successive time
In order for the frequency response to be estimated from impulse response b, the
coefficients must be calculated from the unit step. The step function used for the
115
measurement was a voltage step of 0.25 volts, which must be scaled appropriately such
that it is a unit (e.g. 1 volt) response. This requires the minimum voltage (0.25) be
subtracted from the waveform, then the resulting waveform be divided by the
Vs(t) = Vm(t)/max(Vm(t)).
The frequency response can now be estimated from the Fourier transform of dVs, and
116
Figure 6 Empirical vs. Attenuation Model
The modeled transfer function is a surprising good match with the empirically
calculated transfer function. In general, the modeling error is less than five percent.
This was observed at a number of different length wires (0.25 to 5 meter RG48, and
0.25 to 4.5 meter 30 Ohm coax). Since the attenuation model is based on Maxwell
equations, error could be attributed to the test measurement or set up. For example,
the test connection is a BNC connector, with could add additional dispersion to the
signal. For the purposes of the study, it will be assumed that the error introduced in
model is acceptable.
117
The Purpose of Modeling the Wire Transfer Function
The transfer function of a wire acts to attenuate the high frequency component of the
pulse, as shown (see figure 6.). This is in fact a low pass filter. The effect of the filter
is to cause dispersion or stretching of the step function. This has two deleterious
First, any system must be able to detect an event. Since the attenuation is both a
function of wire length and frequency, as the length of the wire increases, the
attenuation of the high frequency components increases. Recall that any change in
following the second order differential equation (see The Series RLC circuit). The
RLC circuit-step response, and the corresponding reflected voltage, is driven by dv/dt.
Thus, as the length of the cable increases, with the corresponding increase in step
response time (with a corresponding decrease in dv/dt), the system becomes less
fault or connector, needs to become larger relative to the system noise, in order to be
detected. However, if some methodology were devised to correct for the attenuation,
then the probability of detection of an event could be constant for each point on the
wire.
118
Second, any detected event must be classified as a type of event, such as connector,
noisy wire, or a fault. The method of event classification is based on a statistical type
to the detected event. Without some method of equalization, the pattern classifier
would need a different set of a priori prototype for different lengths of wire. This
simply is not practical. Instead, based on the model of attenuation, some method is
needed that take into account the wire length at a particular measurement, and applies
the correct amount of gain for each frequency to “neutralize” the attenuation.
For an linear, time-invariant system with a given transfer function H(eiw), the
corresponding inverse system is defined to be the transfer function Hi(eiw) such that if it
H(eiw) Hi(eiw) = 1.
This implies that the frequency response of the inverse system, if it exist, is
Hi(eiw) = 1/H(eiw).
Equivalently, the log magnitude, phase, and group delay of the inverse system are
negatives of the corresponding functions for the original transfer function. Not all
systems have an inverse, such as the ideal low pass filter. However, since there is high
119
frequency content in any wire, the inverse system does exist for the wire transfer
function.
h[n]*hi[n] = δ[n].
This states that the convolution of the wire transfer function with the inverse wire
transfer function is the unit impulse. This means that the inverse wire transfer
function, when convolved with the TDR waveform, will correct for the high-
wire, for any length, simply by taking the real part of the inverse FFT of the inverse of
Given the step function and derived impulse response of the RG58 coaxial cable, the
derived method for normalization will be tested. The attenuation model generates a
modest error term, typically less than 5%, which will not significantly affect the results.
The time-domain inverse system, hi[n], is calculated by taking the inverse Fourier
120
transform of the one over the attenuation. The attenuation model, in the frequency
Most of the information in the time-domain is in the first few points, and since the
convolution operator is an order n2 operation, only the first 50 points are used. The
convolution of the inverse system with the RG58 impulse and step response should
result in the unit impulse response δ[n], and the unit step response. Note that the
error does results in some mismatch. However, a significant portion of the high
121
frequency content is restored, with the result being that the normalized impulse
response is very close to ideal, while the original response has less than ½ the energy
The calculation of a normalization filter was shown to be effective in correcting for the
attenuation in the step signal at a specific wire length. This suggests that the filter must
be applied to each distinct sampled point on the wire. For example, sampling at 2
GHz means that at there is a voltage measurement taking each 2 inches on the wire.
at each measured point. Normal filtering, such as convolution in FIR filters, does not
The operation of convolving two finite-length signals (e.g. the waveform and the time
(McClellan et. al.). Interpretation of the convolution sum in this way leads to the
whose first row are all zeros except for the first element, and whose first column has
zeros in the last p-1 elements. The first p elements are the filter coefficients, b:
122
&b 0 0 0#
$0 b 0 0!!
H =$
$0 0 b 0!
$ !
%0 0 0 b"
The convolution of the waveform x[n] and h[n] can be done by making one of the
signals the non-zero part of the first column, and the other signal be a vector the
y = Hx.
In the length-varying filter, the filter coefficients, b, are defined for each measured
point on the wire (as per the attenuation model). Thus, each column of H is the gain
filter for the length-measured index i for n measure point, resulting in the following
convolution matrix:
&b1 0 . . 0#
$0 b 0 !!
$ 2
H =$. . .!
$ !
$. . .!
$% 0 0 . . bn !"
The concept of this convolution matrix allows the correct filter to be applied to each
measured point, resulting in true wire equalization. Again, the point of equalization is
to increase the signal to noise, which improve fault detection. Additionally, this allows
123
Implementation of the Inverse Scattering Algorithm
was developed to model the effects of multiple reflections. Additionally, the equation
that describes how the p ,w waves change as they pass through a discontinuity between
It is assumed that (w0,2j, p0,2j)N measurements are known. The causal condition now
gives:
124
So that
Z0 = η02 = p0,0/w0,0.
With the causal condition that Ui,I = 0, all that is required is to compute the γ’s is:
γI = Ui-1,i+1/Di-1,i-1.
This relationship, with the evolution equations, allows the development of the Layer
Peeling Algorithm. The listing that follows is a Matlab© implementation (Note that
N = length(Vmes);
Vref = Vmes-Vin; %This is a vector assignment
Z(1) = Zo; %Initialize Based on Wire Characteristic Impedance
Zr(1) = Zo;
L = N*2+2;
D = zeros(L,L); %Initialize the Upward and Downward Wave Matrix
U = zeros(L,L);
125
for j = i:EN,
jj = j+1;
D(ii,jj) = (D(i,j) - (ii)*U(i,j+2))/ (ii);
U(ii,jj) = (- (ii)*D(i,j) + U(i,j+2))/ (ii);
end
end
for i = 1:N,
Z(i+1) = Z(i)*(1+ (i))/(1- (i));
Zr(i+1) = Zo*(Vin+Vref(i))/(Vin-Vref(i));
Vref(i) = (Z(i+1)-Zo)/(Zo+Z(i+1))*Vin + Vin;
end
The output of the calculation is the true impedance Z and the true reflected voltage,
Vref.
Event Detection
Once the wire has been equalized for attenuation loss in the rise-time of the step
function, and after the multiple reflections have been removed, events need to be
This can be a: connector, cut, nick, crimp, damage to the insulation due to age, or
An event, once identified, will be passed to the classifier to identify the type of event.
Thus, the issue is to balance probability of detection with the probability of false alarm.
It must be noted that no system will have perfect detection; the objective of detection
should then be to have as low a probability of false alarm, all the while maintaining an
126
There are a number of issues that need to be resolved for successful event detection.
First, the wire has noise resulting from electromagnetic interference. This, coupled
with the Analog to Digital conversion (for example, the A/D converter might only
have 10 bits, giving rise to 1024 distinct measured voltages), will lead to sampling
noise. Secondly, the wire itself is not perfectly loss less, which means that the
measured voltage will fall slightly with length. Third, when testing a wire, the
Thus, simply assigning voltage thresholds will not adequately distinguish between wire
properties (such as low or high characteristic impedance) and true events, such as
connectors or a cut. Two methods where developed to for successful event detection.
First, the derivative dv/dt, must be taken. Taking the time difference of the voltage
waveform gives:
This removes the effect of wire loss and changes in characteristic impedance due to
coupling. Since these events results in small changes in voltage vs. time, the derivative
is approximately zero. Secondly, a good threshold must be established such that when
the absolute value of the waveform derivative exceeds this, an event is detected.
127
A threshold can be established by calculating the standard deviation of the waveform
The wire under-test is connected to the test set via a test harness. The test harness is a
nominal 50-Ohm coaxial cable with known length, which is perfectly suited for
generating the threshold statistics. The threshold statistic is three times the standard
deviation of the test harness waveform derivative, which gives a false alarm rate of
.002, or 2 in 1000 events. An event is then defined by any waveform absolute value
that exceeds this threshold statistic. This is not the absolute false alarm rate, as the true
rate is also a function of the classification engine and will typically be less (e.g. less than
2 in 1000). Note that within classification engine that was used, the null hypothesis is
that the wire is noisy. In this case, the event is not reported. Finally, the waveform is
Reflection coefficients are the ratio of incident voltage to reflected voltage. However,
there are some subtleties that must be taken into account in this simple conversion.
Foremost, if the wire under-test is not 50 Ohms, then the incident voltage will not be
the typical value of one half the step voltage. It would be possible to calculate the
incident voltage if the wire characteristic impedance was known, but this is one of the
parameters that is being tested. Instead of using incident voltage, settled voltage is
128
used. Settled voltage is the incident voltage normalized for changes in characteristic
The settled voltage is the voltage after the test harness, but prior to the end of the wire
under-test. Note, that in most cases the termination of a wire under-test is either high
impedance (voltage goes to the step voltage and the reflection coefficient goes to 1), or
the wire is shorted (impedance and voltage goes to zero and the reflection coefficients
goes to –1). This is an issue since the end of the wire is not known, which makes it
In order to estimate the end of the wire, two heuristic procedures were developed.
Since it is rare that a wire will have a matched impedance termination, the maximum
absolute difference is taken between the incident voltage and the waveform. Since the
waveform is generally in either of two states, open or shorted, the index of the
distance, the index of the maximum derivative just prior to this point is chosen to be
Now that a wire termination has been identified, the settled voltage is estimated by
taking the median of the voltage waveform between the start of the wire under-test to
estimated wire termination. The median is used because there may be faults or other
129
events that could bias the results. The median is less susceptible to outliers and other
error (such as an incorrect termination point) than the mean. With the settled voltage
= Vmeasured/Vsettled,
Event Classification
Once the events have been detected on the wire, those events must be classified. The
statistical pattern recognition algorithm takes an event, and sequentially tests the event
against the null hypothesis. The null hypothesis is an event with reflection coefficient,
, of zero (e.g. a normal wire). The alternative hypotheses are those events listed in a
notional library, which represent the total potential set of events that would be
detected. The event type that is selected is the event with the maximum score of the
sequentially tested hypothesis. This will be the maximum likely fault type.
There is only one notional library, which requires that the waveforms be normalized,
corrected for multiple reflections, and converted to reflection coefficients using the
130
The use of settled voltage is critical in order to have only one notional library. For
example, if the incident voltage were used instead of the settled voltage, a 30-Ohm
characteristic impedance wire would have a reflection coefficient of - .2. Any event
detected on this wire would, without using the settled voltage, be interpreted as a
short.
The libraries consist of a set of potential events, such as connectors, terminations, and
faults. The faults fall under two categories: Inductive faults and capacitive faults.
Inductive faults relate to damage to the insulation due to cuts, nicks and breaks. They
are called inductive faults because the local wire inductance is larger than the nominal
and the local capacitance increases. This causes a drop in the wire characteristic
impedance.
Terminations fall under four basic categories: open, short, inductive short and
capacitive short. An open termination could reflect a switch, high impedance load, or
characterized as a fault. Inductive shorts and capacitive shorts could reflect various
hardware terminations, such as a fuel probe and can be used for fault classification.
For example, for a wire supplying a fuel probe, any termination other than a capacitive
131
short would be a fault. These fault classification would be part of an a priori library
The notional library represents sets of event types that would be encountered in that
wire type. Ideally, one would over time sample a number of wires types and annotate
the associated event with each measurement. For example, the set of measurements
would include normal and faulted wires. The faults would be classified by severity and
type (e.g. termination types, connectors, etc.). From these identified types, mean
values and covariance would be calculated. This would then become the notional
library.
In practice, since faults are relatively rare, modeling tools such as SPICE could be used
to build different fault types, and statistics could be taken from these. For
development purposes, this was done, and the following non-fault events were used:
Line, Connector Type 1, Connector Type 2 and Connector Type 3. Five fault events
where developed: Short Type 1, Short Type 2, Inductive Fault Type 1, Inductive Fault
Type 2 and Capacitive Fault Type 1. Four termination events where developed: Open
1, Open 2, Capacitive Short, and Inductive Short. See Figure 8 for the notional rho
132
Figure 8 Library of Event Types
Based on the maintainer input and the research completed, a Wire Diagnostic Rapid
Prototype (WDRP) system function specification was developed. The purpose of the
WDRP is to build a user-friendly device to test the condition of a cable or wire. The
test set is based on Time Domain Reflectometry (TDR) technology, where changes in
the wire characteristic impedance are measured as reflection from a fast rise-time
electrical pulse. The sign and shape of the reflection are indicative of opens, shorts,
connectors and various types of faults. The location of reflections are calculated from
133
the time delay, which is converted to wire length based on the velocity of propagation.
Algorithms within the application will interpret and display pertinent information to
the user and interface with an electronic maintenance manual to expedite maintenance
practices.
• The WDRP design shall be easily adaptable to work with multiple airframe
files).
• The WDRP functional design shall allow for easy adaptation to newly designed
The WDRP has six basic functionalities based on the wire characteristic:
134
• Add a new wire type (e.g. a learn mode),
action.
• Call an intelligent system, which consist of the algorithms for wire diagnostics.
When condition based maintenance techniques are applied to a new wire or cable, each
wire in the cable has a number of characteristics that are integral to evaluating the wire
• Date of configuration,
• Wire definitions:
135
o Which sub-part within the cable (e.g. wire pair a. and ah., for example),
o The type of wire (e.g. coaxial, twisted pair, single core, etc.). Note: for
a twisted pair, the return path should be just the same as the forward
path. The tool should keep track of twisted pair return path, such that
when the return path is loaded, the user does not have to re-enter
configuration data.
o Termination.
• Wire definitions which could have default values or maintainer entered values;
136
o System noise (the standard deviation of the voltage in the wire under-
test),
The state of the wire is the lengths and event of the wire at the time of the test and the
raw waveform data. A wire has a total length and relative length between n number of
events.
An event is something that is detected, be it the end of the wire, a connector, a tap, or
a fault (e.g. open, short, abrasion, or crimp). Configuration consists of the baseline
state, and each subsequent state (total length, the number and type of events and the
length of wire between events). A fault is either a change in state (e.g. lengths, open,
• Edit test,
• View test,
137
• Compare test to baseline,
When a new wire is entered for test, information must be taken so that the wire can be
uniquely identified, such as the system, harness, wire within the harness, type of wire
(e.g. twisted pair) and test voltage (default test voltage to 1 v.). VOP, characteristic
to be entered by the maintainer as this information can be determined from the test.
The results of the test definition can be saved as Baseline data, or saved as the current
The user may need to edit a selected wire, such a changing the name and saving at a
different wire. Additionally, the user may wish to update the VOP, changing the type
from coaxial to twisted pair, etc. This function would be used to allow a wire to be
The user's primary interest is in testing a wire. The user shall be able to test a wire and
save the results (e.g. making a new wire and learning it, then setting the baseline wire
138
state), or open a wire from the wire database, test and update the state of the wire.
The test consists of activating the step-pulse generator, sampling the wire n number of
times to reduce system noise (based on the total length of the wire), processing the raw
wave form data and displaying test results. The test result shall include:
of test.
The test results shall allow symbolic display and comparison to the baseline.
The WDRP has a number of algorithms to enable the maintainer to identify faults
139
o Calculate the characteristic impedance, inductance and capacitance per
unit length,
impedance changes),
The cable equalization and the parametric classifier require configuration data
filters to match the wire transfer function at each discrete point in the wire (e.g.
140
of tables, where each table is an event type, such as termination, open, short,
connectors, taps, and faults. Each table fault table has reflection coefficients
Characteristic Calculations
• Inputs
• Output
o Characteristic impedance
Cable Equalization
The cable equalization function corrects attenuation and dispersion of the high-
frequency components in the TDR signal due to the length of the cable:
• Inputs
141
o Raw voltage waveform array
• Output
Inverse Scattering
• Inputs
• Output
Event Detection
The event detection algorithm returns an array of n indexes that indicate an event on
the wire that was not associated with process noise. The event detection algorithm is a
• Inputs
142
o Corrected waveform array
• Outputs
Parametric Classifier
The parametric classifier takes in each detected event, and compares the event to a
library of faults and returns the best fitting fault identification. This is performed on
• Inputs
o Index of event
• Output
143
Functional Requirements
These functional specifications are now used to design the applications. All functions
within the application must test back to the functional requirements. As noted earlier,
the function requirements allow software design to be more efficient. The efficiency
comes from identifying problems early in the design, instead of fixing software bugs or
Application Example
The wire diagnostics prototype application was designed based on a number of factors.
Maintainer input from the user community dictated a compact, portable form factor.
For this reason, a Pocket PC was chosen at the target platform. The Pocket PC has a
number of intrinsic functions that makes this a desirable platform. The Pocket PC has
power.
Another benefit of using the Pocket PC is that the Microsoft CE Visual C++
integrated development environment (IDE, now called the compiler) has a number of
database capability. The compiler has a native XML (extended markup language)
database that allows that all the wire characteristics to be stored with relative ease.
simplifies the design of user interface to a simple matter of adding the visual
144
components the application form instead of object characteristic to the forces resource
file directly.
functions. This allows data taken by the Pocket PC test tool to be downloaded and
stored on a desktop computer for further analysis. Note, that one of the functional
requirements, along with storing detected events, was to store the raw waveform. This
allows historic waveforms to be tested for changes in events and characteristics over
time.
The Pocket PC allows the use of a PCMCIA device. Initially, it was planned that the
step generator and analog to digital converter (together called the TDR card) would be
designed and packaged in the PCMCIA form factor. This would allow for a very
compact test tool. Early in the TDR card design, it was found that a company, CM
It was decided to use this commercially available card instead of developing the TDR
card in-house.
generated by the Tektronix TDS 8000 oscilloscope. Once the algorithms were
functioning in Matlab©, the algorithms where coded into C++ using Microsoft Visual
C++ and tested against the Matlab© functions. The analysis algorithms were built
into a Component Object Model (COM) object, which allows the same software to be
145
built, run and tested on the Pocket PC and a standard Windows© desktop PC. COM
applications, and between clients and servers through clearly defined interfaces.
Interfaces provide a way for clients to ask a COM component which features it
supports at runtime. To provide additional features for a component, one simply adds
an additional interface for those features. This was done in order to ease the software
Algorithmic testing was performed primarily on RG58 coaxial cable and 30-Ohm
coaxial cable. As an example, a RG58 coaxial cable with a length of 3.25 m was
connected to a 10 cm cable with a 1 mm cut through the insulating jacket. Note, that
the braided ground of the cable was not cut. The termination of the 10 cm cable was
open. The algorithms correctly identified the connectors, and more importantly,
detected the cut as an inductive fault and the termination as an open. The algorithm
calculated the cable characteristic impedance as 49.47 Ohms vs. the published 47
146
Figure 9 Algorithmic Example: RG58
The cable was sampled 32 times, which is equivalent to a 12 dB gain. Additionally, the
As a second example, a 30-Ohm coaxial cable was tested. This wire was a 4 m cable
147
Figure 10 Algorithmic Examples: 30-Ohm Coaxial
This is an interesting example in that there is a large impedance mismatch between the
step generator (50 Ohm) and the wire under-test. If the waveform were not
coefficient of zero.
There were five events detected on the wire. The first event does not reject the null
hypothesis – indicating noise on the cable. The second and third events were detected
148
as inductive faults and should be considered false alarms. Because of the large
impedance mismatch, much of the energy from the TDR pulse was reflected prior to
entering the wire under-test. This suggests that for wires where there is a large
impedance mismatch, a larger number of samples should be used to account for the
energy lost in reflection, and corresponding smaller signal to noise ratio (SNR) on the
wire under-test. The fourth event detected on the line was correctly identified as a
connector and the short (fifth event) was correctly identified. The calculated
Functional Prototype
populating configuration data, executing the analysis algorithms and displaying results.
As noted, it was decided to use a CM Technologies TDR card vs. developing the TDR
card in-house. However, licensing issues between CM Technologies and the research
The device driver allows the application to control the TDR card and record test
information. The device driver where not available, as noted, so there was no way to
control the TDR card, or gather test data. This meant that waveform data could not
be recorded in real-time. As a result, the research used time and voltage from the
149
Tektronix TDS 8000, loaded into the Pocket PC, as test data. Screen shots of the
application are now presented in the Appendix to better explain the functionality.
The initial application screen displays the manufacture name and allows the selection
of various functions to run the Tool. These functions are: New, Edit, Run and View
Result (Appendix A). A New test allows the maintainer to enter test definitions, such
as system identification, the system serial number, and the test name.
A New test guides the maintainer in uniquely identify the cable by name, part number,
wire identification within the cable, and the wire type. The edit boxes are drop-down;
selectable text entries that automatically filter subordinate text boxes. For example, the
system ID might have F16 and F15 aircraft. Once F16 is selected, only data associated
with F16 is carried in the drop-down edit boxes for System Serial Number, Test
Name, Cable Name, etc. As the maintainer selected System Serial Numbers, only data
associated with both F16 and that selected serial number are available for Test Name
and any other subordinate test box. This method allows the maintainer to quickly and
Additional data, such as Test Parameters, are added by scrolling to the bottom of the
New Test page. Test Parameters include Velocity of Propagation, Test Length,
Voltage, and Samples. Velocity of Propagation is based on the wire type (e.g. coaxial,
twisted pair, solid core). The core diameter is the diameter of the wire conductor.
150
Test Length and Voltage would normally be left to default values. In some application
it would be important to control the TDR voltage and sampling rate. For example,
when testing a wire over 300 feet in length, a higher voltage and lower sampling rate
would be used. The Samples edit box commands the TDR card in the number of
sample that would be used for signal averaging (Appendix C). Once all characteristics
of the new test have been entered, the maintainer can save the Test, Reset (clear) the
test, or Run the test. Running the test automatically saves the test (Appendix D).
Once the test has been saved, the application triggers the TDR hardware and collects
the waveform data. The maintainer has indications of the test progress with the help
of a bar tumbler that rotates while that portion of the test is completed. This is similar
to the “hour glass” which desktop users observe when the computer is busy. The test
box holds the identification of the wire that is undergoing a test. Once the waveform
data is collected, the application calls the analysis engine, and notifies the maintainer
when the analysis is finally complete. Currently, the analysis takes approximately 20
Once the test is complete, the Over All Test Window is displayed (Appendix F). This
window displays the wire test identification and the over all test results. If there is a
fault, application indicates the distance down the wire from the connector. There are a
number of types of faults: hard faults and soft faults (associated with state change).
Hard fault are defined as a short or improper termination (open when it should be a
151
capacitive short, for example). A soft fault occurs when the current test changes from
the baseline states. This could occur if the termination changed, the length of the wire
changes, or the calculated characteristic impedance changes. Specific test views are
The parameter table lists the current test and baseline test parameters. The baseline
parameters are set the first time the wire is tested, and allows the maintainer to view
how the wire is changing over time. The parameters table has the time and date of the
tests, calculated impedance, inductance, capacitance and noise. As the wire degrades
over time, the characteristic impedance will increase (due to insulation degradation)
The event table (Appendix H) lists the baseline events and the current test detected
events. The event relative and absolute distance is given, along with the event type.
Any fault types are annotated with a warning mark. Additional maintenance
information will be available if the maintainer selects the fault. Note in this vies (see
Appendix H), the current test events have changed from the baseline test. Those
events that are different will generate a fault. In this example, the inductive fault has
changed to a short, resulting in a fault indication. The event graph view would display
the same information, but graphically, and with symbols to identify different types of
events.
152
The maintainer can view the raw and normalized waveforms in the graph view
(Appendix I). This allows the maintainer to visually see changes in a test over time and
analyze the waveform. While the test tool was designed to improve the fault detection
process by removing the requirement for maintainer evaluation, it was felt that having
Finally, the tools have a search capability; such that the maintainer can load and view
any historic data simply by using the drop-down edit boxes. The application gives an
red, from green. This color-coding gives indications that the operation of search is
A wire diagnostics system was developed based on TDR technologies. The system
• Equalize the wire for losses in high frequency signal content as a result of wire
length,
153
• Classify events as connectors, termination types, or faults.
whereby software manages the data and provides the maintainer “on condition”
indicators. These indictors result when soft faults, such as change in length,
impedance or events, are detected. The system has been designed so that hard faults,
The central design issue of the research was the need for a test system that enables
multiple reflections occur any time there is more than one change in impedance on the
wire. Any machine pattern recognition algorithm would then attempt to classify these
Other environmental issues arise from the attenuation of the test signal, high-
frequency content. This causes the TDR step-function to be stretched in time, which
results in two adverse conditions. The first adverse effect is that the shape of an
equalize for wire length, templates required for pattern recognition would be length
dependent, resulting in a complex and large library of events and faults. Secondly, the
stretching of the signal causes the rate of change of voltage associated with a fault to
154
become smaller. The means that event detections become less effective as the wire
length increases.
Maxwell’s equation, which governs the electrostatic behavior of currents, was used to
model the attenuation as a function of frequency and length. This allowed the
construction of the gain filter that was matched to the frequency attenuation at any
given length. This Finite Impulse Response (FIR) filter compresses the signal to the
nominal zero meter distance and equalized the wire. This allows the use of a library
that is length independent. Additionally, the signal compression increases the signal to
noise ratio and allows for a fault detection, irrespective of wire length.
Event detection was based on the concept of a Constant False Alarm Detection
(CFAR). The derivative of the equalized waveform was taken with respect to time and
the standard deviation of this waveform was calculated. A false alarm rate of 0.002
was used to set a detection threshold (based on a Gaussian distribution), 2.8 multiplied
by the standard deviation of the derivative of the waveform. Any waveform index
In order to improve event detection, the waveform must be averaged to reduce system
noise. System noise is reduced by three dB for every doubling of the number of
samples taken for the average. A gain of fifteen dB is readily available when averaging
155
Events were classified using a hypothesis testing technique, which was shown to be
mathematically optimal. This technique tested the null hypothesis, that the wire had
no fault, against the alternate hypothesis, which was the set of all faults. The algorithm
depends on the mean value and covariance of each fault index. The library can be
derived from modeling or from empirical measurements and represents the reflection
A database system was derived such that waveform, parameters, and events for each
test were stored for time-series analysis. At the conclusion of a test, the maintainer can
view the current test result and could compare these results against a baseline. The
maintainer always has the option to view the raw and processed TDR waveform. Due
to the time domain nature of the waveform, it becomes a simple matter to correlate
The algorithms developed for the wire diagnostics system were tested on a number of
wire types. The algorithm can successfully identify: different types of connectors;
various faults, such as capacitive fault or inductive faults; and different types of
terminations.
Some Problems
Initially, the wire diagnostics test tool design required a PCMCIA format for the step
generator and the analog to digital converter. A commercially available TDR card
fitting this requirement was found, and it was decided to proceed with the study using
156
this hardware. However, no Windows CE drivers had yet been developed for this
device, which would have enabled the software to communicate with the card on the
Pocket PC platform. After four weeks of negotiations with the vendor, it was decided
that it would not be advantageous to build the drivers for the vendor. At this point,
driver development was stopped (the vendor would not directly give the researcher the
Initial design work was started on to build a TDR card in-house. While it is a trivial
manner to generate a 100 ps step function, it became apparent that there were a
number of engineering issues that needed to be overcome. Foremost was the design
1.5 GHz.
Commercially available 1.0, 2.0, 2.5 and 3.0 Gsps analog to digital converters was
found. The problem was that at this data rate, there is no RAM fast enough to simply
clock down the real-time data rates, such as using programmable logic (FPGA) to
rates in the gigahertz sample range. These alternative techniques have their own
technical difficulties, such as the need for a jitter-free clock. It was felt that it was
157
beyond the scope of the study to overcome these technical issues, as it did not
Time Domain Reflectometry (TDR) was chosen over Standing Wave Reflectometry
(SWR) or Frequency Domain Reflectometry (FDR) as the technology for the study. It
was apparent that the simplicity of the step-function generation, ease of manual
interpretation, and high resolution made this the best choice. Additionally, it is a
However, the difficulty of hardware design work in the gigahertz range suggests that
one of the other technologies may be easier and cheaper to implement as a commercial
product. Certainly there will be technical challenges in using one of the frequency
domain techniques, but they may be easier to overcome than the issue of real-time
sampling at 3.0 Gsps. The researcher recommends additional effort be spent on these
other techniques to see if the fault detection and identification capability is similar to
Time domain reflectometry has two limiting performance factors. The first is the issue
of data acquisition. It has been noted that there are some technical challenges in
sampling at 3.0 GHz and getting the data into RAM. Additionally, for a portable unit,
the power consumption of the Analog to Digital (CMOS) device is high. Typically,
one finds these devices draw 4.5 amps at 5 volts. When implementing the system in a
158
compact, battery-powered device, a number of power management approaches would
have to be implemented.
For example, a capacitor would store charge that would be released once the analog to
digital device was switched on. Once the device had reached operating voltage, the
step recovery diode would trigger, an acquisition would be sampled, and the device
switched off. The powered operational time of one acquisition cycle (e.g. duty cycle)
would be on the order of microseconds. Only in this manner could any meaningful
The second issue regards limitation imposed by the effect of Maxwell’s equations.
There is simply no way to get around the skin effect, which attenuates the high
frequency component of the TDR pulse. At some length, the high frequency
component has been attenuated below the level of noise, such that any gain applied is
only amplifying noise. Thus, there is a particle limit beyond which small events cannot
be detected. The current design has a maximum usable distance of approximately 140
feet. It is believed that this is within the practical limit of small event detection.
The application of advance signal processing algorithms, such as: inverse scattering,
length variable filtering, and statistical pattern recognition, make this a unique product
offering. On a recent visit the meet with personnel from the Air Force Research
Laboratory at Wright-Patterson Air Force Base (January 13th, 2003), the researcher was
159
told that this is the only product that does any type of automated decision-making or
analysis.
from signal averaging of the waveform, with selectable gain in the higher frequencies
these signal-processing algorithms greatly improve the utility of the wire diagnostics
The use of a database to hold wire state information allows the maintainer to treat the
harness as a system instead of a commodity. This allows the use of “Parts Life
This is a large paradigm shift from current maintenance practices, but could have
significant cost savings as the fleet of aircraft age and wiring becomes more
problematic.
If the FAA mandates wire inspection on aging aircraft, or certain aircraft types within
the fleet, this may be an alternate means of compliance. The following case could be
made on a harness that has been regularly tested: by trending historic data and
This would be a huge success in wire diagnostics, and would save the operator literally
160
It must be noted that this type of FAA credit is not given without extensive
documentation and historic proof. In order for the certification to be granted, years of
data would need to be taken on a number of aircraft. This is the goal of a wire
Perhaps most significant is the simple display of information to the maintainer. The
test systems use of a scrollable list to record and display all detected events reduces the
training burden of maintenance personnel. All faults are identified and presented,
This will result in a number of significant cost savings. Initially, the number of spare
line replaceable units (LRUs) required will drop significantly. The current maintenance
practices for intermittent calls for LRU to be pulled and replaced instead of any wire
intermittent faults is not the LRU, but the wire. By correctly identifying the wire as the
issue, all of those excess replacement actions will disappear, which would reduce the
Other significant cost savings will result in reducing the manning and aircraft
the number of aircraft that are mission capable. Based on the researches military
aviation experience, rarely, if ever are all the aircraft allotted to a squadron are mission
ready. Currently, it may require nine aircraft to maintain six mission ready aircraft. If
161
electrical problems can be identified more effectively, the benefit could be such that
only eight aircraft are required to maintain six mission ready aircraft.
Similarly, for maintenance crew, a squadron may require 300 personnel to maintain six
out of nine mission ready aircraft. However, if electrical faults could be identified
more effectively, the squadron may be able to deploy with only 250 personnel. The
key is that providing a reliable method of wire diagnostics will improve maintenance
tool. The signal processing and warehousing of data could allow for the development
162
Bibliography
Bishop, Paul. Signal Fidelity & Jitter, Tektronix Measurements Seminar, October 2002.
Davis, Alan M., Software Requirements, Objects, Functions and States. New Jersey,
Prentice Hall PTR, 1993.
163
Dowding, et al., “Recent Advancements in TDR Monitoring of Ground Water Levels
and Piezometric Pressures,” Proceeding of the 2nd North American Rock Mechanics
Symposium, NARMS, Jun. 1996.
Feng, W., Lin, C. P., Deschamps, R.J., and Drnevich, V.P, “Theoretical Model of a
multisection time domain reflectometry measurement system,” Water Resources
Research, Vol. 35, No. 8, Aug. 1999, 2321-2331.
Furse, et. al., “Low-cost, compact, frequency domain reflectometry system for testing
wires and cables,” World Intellectual Property Organization, WO02/068968 A2, Sep.
2002
Hall, R., and Brown, M., “U.S. Air Force Aging Aircraft Wiring Implementation Plan,”
The 6th Joint NASA/FAA/DoD Conference on Aging Aircraft, Jul 2002.
Heald, Mark A., Marion, Jerry B., Classical Electromagnetic Radiation. Fort Worth,
Harcourt Brace College Publishers, 1995.
Hewlett Packard, “Pulse and Waveform Generation with Step Recovery Diodes,”
Application Note 918, Oct. 1984.
Johnson, David H., White, Edward L., D’Angelo, Johseph J., Dicks, Dwayne, and
Decker, Adam L., “Wiring system Diagnostic Techniques for Legacy Aircraft”
164
Kane, William F., “Development of a Time Domain Reflectometry System to Monitor
Landslide Activity:” Final Report, FHWA, CA TL-96, June 1996.
Krigel, H.,Y., “Apparatus and method for determining the integrity of cables and
wiring harnesses”, United States Patent 6,442,498, Aug 2002.
Lane, Neal. Review of Federal Programs for Wire System Safety, Final Report,
National Science and Technology Council, Committee on Technology, Wire System
Safety Interagency Working Group, November, 2000.
McClellan, James, et al. Computer-Based Exercises for Signal Processing Using Matlab
5. New Jersey, Prentice Hall, 1998.
Oppenheim, Alan V., Schafer, Ronald W., Discrete-Time Signal Processing. New
Jersey, Prentice Hall, 1989.
Thomas, Roland E., Rosa, Albert J., The Analysis and Design of Linear Circuits, New
Jersey, Prentice Hall, 1998.
Sadok, Mohktar, Ph.D., “Pre-emphasis Equalization for Cable Loss Mitigation in Wire
Diganostics,” Goodrich Engineering Note, Vergennes, VT 2002.
165
Staffer, George H. Jr., “Spice up the development of a step recovery diode frequency
mutiplier,” RFDesign.com, Jun. 1999, 16-22.
TDR Tutorial and Riser Bond TDR Product Review, Granite Island Group, 21
October 2002, <http://www.tscm.com/riapplan.html>
Ware, J.A., Aki, K., “Continuous and Discrete Inverse Scattering Problems in a
Stratified Elastic Medium. I Plane waves at Normal Incidence,” J. Acout. Soc. Amer.
45, 911-921, 1968.
166
A Wire Diagnostic Screen Shots: Opening Screen
167
B Wire Diagnostic New Test
168
C Wire Diagnostics New Test: Wire Characteristics
169
D Wire Diagnostics Save Test
170
E Wire Diagnostics Run Test
171
F Wire Diagnostics Overall Test Results
172
G Wire Diagnostics Viewable Test Results
173
H Wire Diagnostics Event Table
174
I Wire Diagnostics View Waveform Graph
175
J Wire Diagnostic Search View
/////////////////////////////////////////////////////////////////////////////
// CWireTest
STDMETHODIMP CWireTest::SetValues(float dt, float vop, float diameter, float vin, float maxFreq, short numPts,
short startIdx, short eventLength)
{
DT = dt;
VOP = vop;
NUMPTS = numPts;
DIAMETER = diameter;
VIN = vin;
176
MAXFREQ = maxFreq;
STARTIDX = startIdx;
EVENTLEN = eventLength;
CalcDist();
return S_OK;
}
//---------------------------------------------------------------------------
return S_OK;
}
//---------------------------------------------------------------------------
int maxIdx,maxDidx,minIdx,minDidx;
float maxDv,maxV,minDv,minV,vin;
vector<float> dVmeas;
vin = VIN*(float)0.5;
dVmeas.diff(Vmeas);
Vmeas.max_with_index(maxV,maxIdx,STARTIDX);
Vmeas.min_with_index(minV,minIdx,STARTIDX);
dVmeas.max_with_index(maxDv,maxDidx,STARTIDX);
dVmeas.min_with_index(minDv,minDidx,STARTIDX);
if (maxV-vin> vin-minV){
ENDIDX = maxDidx; //Open
}
else{
ENDIDX = minDidx; //Short
}
//---------------------------------------------------------------------------
vmeas.setvect (Vmeas,size);
CalculateZo(vmeas);
Vmeas = vmeas.getvect();
return S_OK;
}
177
//---------------------------------------------------------------------------
void CWireTest::CalculateZo(vector<float> &Vmeas){
// Calculate the characteristic impedance of the wire under test
// Inputs
// Vmeas :vector of voltage measurements
// vin :drive voltage
// startIdx :length of harness from configuration
// endIdx :rough estimate of end of wire
// Outputs
// Zo :estimate of characteristic impedance
float vSettled,ZoU,U;
vector<float> v;
v.resize(Vmeas.length());
v = Vmeas;
vSettled = v.median(STARTIDX,ENDIDX);
ZO = (float)50.0*vSettled/(VIN-vSettled);
U = SPD_LIGHT*VOP;
ZoU = ZO*U;
CAP = (float)1./ZoU;
INDUCT = ZO/U;
}
//---------------------------------------------------------------------------
STDMETHODIMP CWireTest::InverseScattering(short size, float *Vmeas)
{
//Pointer Implementation of the Loss Model
vector<float> pVmeas;
pVmeas.setvect(Vmeas,size);
InverseScattering(pVmeas);
Vmeas = pVmeas.getvect();
return S_OK;
}
//---------------------------------------------------------------------------
void CWireTest::InverseScattering(vector<float> &vmes){
// Glad Inverse Scattering Aglroithm
// glad(vmeas, vin, Zo,vref)
// Inputs
// vmeas :vector of measured voltage
// Outputs:
// vref :corrected reflected voltage
int i,ii,j,jj,n,l,EN;
vector<float> r;
vector<float> s;
image<float> DU;
float Z1,Z2;
float vin = VIN*(float).5;
float thres;
thres = (float)0.9999;
n = vmes.length();
l = n*2+2;
178
DU.resize(l,l);
r.resize(n+1);
s.resize(n+1);
VREF = vmes;
VREF -= vin;
Z1= ZO;
EN = n*2-1;
for(i = 0; i < n;i++){
ii = i+1;
r(ii) = DU(ii+2,i)/DU(i,i);
if(r(ii) > 1)r(ii) = thres;
if(r(ii) < -1)r(ii) = -thres;
s(ii) = (float)sqrt((float)1.0-r(ii)*r(ii));
for(j = i; j <EN; j++){
jj = j+1;
DU(ii,jj) = (DU(i,j) - r(ii)*DU(jj+2,i))/s(ii);
DU(jj+1,ii) = (-r(ii)*DU(i,j) + DU(jj+2,i))/s(ii);
}
}
for(i = 0; i < n; i++){
Z2= Z1 * (1+r(i))/(1-r(i));
VREF(i) = (Z2-ZO)/(ZO+Z2)*vin + vin;
Z1 = Z2;
}
}
//---------------------------------------------------------------------------
STDMETHODIMP CWireTest::LossModel(short size, float *Vnorm)
{
//Pointer Implementation of the Loss Model
vector<float> vnorm;
vnorm.setvect(Vnorm,size);
LossModel(vnorm);
Vnorm = vnorm.getvect();
return S_OK;
}
//---------------------------------------------------------------------------
void CWireTest::LossModel(vector<float> &Vnorm){
//Calculates the frequency attenutation based on cable length, diameter
//Output
//distance normalized voltage
L2 = FIRLEN/2;
n = DIST.length();
179
B.resize(n,n+(int)L2+1);
bi.resize((int)L2+1);
tmpfreq.resize(NUMFRQPNT);
freq.linspace(0,MAXFREQ,NUMFRQPNT);
freq.vsqrt();
dZ = (float)DIAMETER*ZO;
bi(0) = b((int)L2);
for (j = 1; j <= L2; j++){
bi(j) = b(L2+j)*2;
}
bsum = bi.sum();
bi /= bsum;
ConvMatrix(B,VREF,Vnorm);
}
//---------------------------------------------------------------------------
STDMETHODIMP CWireTest::Convert2Rho(short size, float *Vnorm)
{
vector<float> v;
v.setvect (Vnorm,size);
ConvertToRho(v);
Vnorm = v.getvect();
return S_OK;
}
//---------------------------------------------------------------------------
void CWireTest::ConvertToRho(vector<float> &V){
// converts from voltage to reflection coefficients
// Inputs
// startIdx :start of wire under test:
// endIdx :end of wire - estimate
// Input/Outputs
// V :vector of normalized voltages
int i,cnt,len;
float vSettled;
vector<float> v;
len = ENDIDX - STARTIDX;
v.resize(len);
cnt = 0;
for(i = STARTIDX; i< ENDIDX; i++){
v(cnt) = V(i);
cnt++;
}
vSettled = v.median ();
RHO.resize(V.length());
180
RHO = V;
RHO.offset(vSettled,vSettled);
}
//---------------------------------------------------------------------------
STDMETHODIMP CWireTest::EventDetection(int size)
{
// Performs statistical Event Detection
// Inputs
// vnorm :Normalized voltage measuremetns
// startIdx :Start Indx of Wire Under Test (e.g. Harness length)
// runlength :minimum detection length
// Output
// event :vector of detected events
int i,n,cnt;
float m;
vector<float> drho;
vector<int>idx;
vector<int>didx;
m = 0.;
drho.diff(RHO);
//estimate the noise
for(i = 0; i < STARTIDX; i++)m += (float)pow(drho(i),2);
//n = dv.length();
cnt = 0;
m = (float)NOISE * (float)NOISEMULT; //set the threshold
for(i = STARTIDX; i < ENDIDX; i++){//Find the events
if(fabs(drho(i))>m) cnt++;
}
if(cnt > size) cnt = size;
idx.resize(size);
cnt = 0;
for(i = STARTIDX; i < ENDIDX;i++){
if( fabs(drho(i)) > m && cnt < size ){
idx(cnt) = i;
cnt++ ;
}
}
didx.diff(idx);
n = didx.length();
cnt = 0;
for(i = 0; i < n; i++){
if (didx(i)> EVENTLEN)cnt++;
}
EVENT.resize(cnt);
cnt = 0;
for(i = 0; i < n; i++){
if(didx(i)> EVENTLEN){
EVENT(cnt) = idx(i+(int)1);
cnt++;
}
}
return S_OK;
181
}
//---------------------------------------------------------------------------
STDMETHODIMP CWireTest::Classifier(short libLength, short numCol, float *Lib, float *covin, short size, int
*typeEvent, float *distance)
{
//The Lib array is a matrix that runs by row over all columns,
//e.g lib(col,row) = Lib(row*numCol + col);
image<float> lib;
vector<float> cov;
vector<int> event;
vector<float> dist;
int i,j, numRow;
numRow = libLength/numCol;
lib.resize(numCol,numRow);
cov.setvect(covin,numCol);
event.setvect(typeEvent,size);
dist.setvect(distance,size);
Classifier(lib,cov,event,dist);
covin = cov.getvect();
typeEvent = event.getvect();
distance = dist.getvect();
return S_OK;
}
//---------------------------------------------------------------------------
void CWireTest::Classifier(const image<float> &Lib,
vector<float> &covin,
vector<int> &typeEvent,
vector<float> &distance){
// Performs the classification by calling LHyp
// Inputs
// rho :vector reflection coefficients
// Lib :matrix of libaries in colum, row order. Each Row is an event type
// covin :vecotr of inverse covaraince - from configuration
// Outputs
// typeEvent :vector of event types
// distance :vector of distance to event;
numEvent = EVENT.length();
nRho = RHO.length();
lenLib = Lib.width();
numLib = Lib.height();
crtRho.resize(lenLib);
crtLib.resize(lenLib);
score.resize(numLib);
182
Ho.resize(lenLib);
Hi.resize(lenLib);
}
//---------------------------------------------------------------------------
float h,dotm1,dotm2,dotx;
vector<float> m2m1;
vector<float> m1ci;
vector<float> m2ci;
m2m1 = m2;
m2m1 -= m1;
m2m1 *= covin;
m1ci = m1;
m2ci = m2;
m1ci *= covin;
m2ci *= covin;
dotm1 = (float)m1ci.dot_product(m1);
dotm2 = (float)m2ci.dot_product(m2);
dotx = (float)m2m1.dot_product(crtEvent);
h = dotx + (float)0.5*(dotm1-dotm2);
return h;
}
//---------------------------------------------------------------------------
183
STDMETHODIMP CWireTest::Zo(float *z)
{
*z = ZO;
return S_OK;
}
//---------------------------------------------------------------------------
STDMETHODIMP CWireTest::Capacitance(float *cap)
{
*cap = CAP;
return S_OK;
}
//---------------------------------------------------------------------------
return S_OK;
}
//---------------------------------------------------------------------------
return S_OK;
}
//---------------------------------------------------------------------------
void CWireTest::ConvMatrix(image<float> &B, const vector<float> &A,vector<float> &C)
{
// implements the a matrix convolution, a length varying FIR filter
// Inputs
// B :Convolution Matrix
// A :vector of measurements
// Outputs
// C :filtered measuremetns
int i, j, col;
float tmp;
col = B.width();
//C.resize(col);
for (i = 0; i < col; i++){
tmp = 0;
for(j = 0; j < col; j++) tmp += B(j,i)*A(j);
C(i) = tmp;
}
}
//---------------------------------------------------------------------------
void CWireTest::CalcDist(){
// generate a distance vector based on velocity of propagation and sample rate
// Input/Output
// dist :vector of distance
int i;
float C;
DIST.resize(NUMPTS);
C = SPD_LIGHT * VOP * DT * (float)0.5;
184
for(i = 0; i<NUMPTS; i++) DIST(i) = ((float)(i+1))*C;
}
//---------------------------------------------------------------------------
#ifndef __WIRETEST_H_
#define __WIRETEST_H_
/////////////////////////////////////////////////////////////////////////////
// CWireTest
class ATL_NO_VTABLE CWireTest :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CWireTest, &CLSID_WireTest>,
public IDispatchImpl<IWireTest, &IID_IWireTest, &LIBID_WIREANALYSISLib>
{
public:
CWireTest()
{
}
DECLARE_REGISTRY_RESOURCEID(IDR_WIRETEST)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CWireTest)
COM_INTERFACE_ENTRY(IWireTest)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
// IWireTest
public:
STDMETHOD(Noise)(float *nos);
STDMETHOD(Inductance)(float * induct);
STDMETHOD(Capacitance)(float * cap);
STDMETHOD(Zo)(float * z);
STDMETHOD(Classifier)(short libLength,short numCol,float *Lib,float *covin,short size, int *typeEvent,float
*distance);
STDMETHOD(EventDetection)(int size);
STDMETHOD(Convert2Rho)(short size, float *Vnorm);
STDMETHOD(LossModel)(short size, float *Vnorm);
STDMETHOD(InverseScattering)(short size, float *Vmeas);
STDMETHOD(CalculateZo)(short size, float *Vmeas);
STDMETHOD(RoughEndOfWire)(short size, float *Vmeas);
STDMETHOD(SetValues)(float dt,float vop, float diameter, float vin, float maxFreq,short numPts,short
startIdx,short eventLength);
private:
vector<float> RHO;
vector<float> DIST;
vector<float> VREF;
vector<int> EVENT;
185
float DT,VOP,DIAMETER,VIN,MAXFREQ,EVENTLEN,ZO,CAP,INDUCT,NOISE;
int STARTIDX,ENDIDX,NUMPTS;
};
#endif //__WIRETEST_H_
// ============================================================================
// Project : Wire Diagnostics Prototype
//
// CSCI :
//
// P/N :
//
// CSC :
//
// File Name : Vector.cpp
//
// ============================================================================
//
// Purpose:
//
//
// Notes:
//
// ============================================================================
//
// Revision History
// $Log::$
//
// Rev 1.0 Dec 11 2002 15:29:34 ebechhoe
//Initial revision.
//
// Rev 1.2 Dec 09 2002 09:03:10 ebechhoe
//Udated the vector class to copy a pointer array, fixed bug in Test Analysis in the CalculateZo method
//
// * Rev 1.0 Nov 16 2002 16:22:48 ebechhoefer
// * Initial revision.
//
//
//
// ============================================================================
//---------------------------------------------------------------------------
#include "stdafx.h"
#include "vector.h"
//---------------------------------------------------------------------------
186
template <class T>
vector<T>::vector (int size)
{
s=size;
if (s) {vect=new T [size];
for (int i=0;i<size;i++) vect[i]=0;
}
else vect=NULL;
}
//---------------------------------------------------------------------------
template<class T>
vector<T>::vector(const vector &rhs)
{
s=rhs.length();
vect = new T [s];
for (int i=0; i<s; i++) vect[i]=rhs(i);
}
//---------------------------------------------------------------------------
template <class T>
void vector<T>::resize (int newsize)
{
int i;
T* newvec=new T [newsize];
if (!newvec) {
//cout<<"Memory allocation error in vector::resize, newsize="<<newsize<<endl;
//exit(1);
//throw xMemory();
}
for (i=0; i<newsize; i++) {
if (i<s && vect) newvec[i]=vect[i];
else newvec[i]=0;
}
if (vect) delete [] vect;
vect=new T [newsize];
for (i=0;i<newsize;i++) vect[i]=newvec[i];
s=newsize;
delete [] newvec;
}
//---------------------------------------------------------------------------
template <class T>
void vector<T>::getmem(int width)
{
s=width;
if (vect) delete [] vect;
vect=new T [s];
if (!vect) {
//cout<<"Memory allocation error in vector::getmem, s="<<s<<endl;
//exit(1);
//throw xMemory();
}
for(int i=0; i<s; i++)
vect[i] = 0;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::operator /= (T a)
{
if (a!=0)
for (int i=0;i<s;i++) vect[i]/=a;
else {
//cout<<"Attempting /0 in vector::operator /= (). Exiting."<<endl;
187
//exit(1);
//throw xDivide();
}
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::operator += (const vector<T>& a)
{
if (a.length() != s) {
//cout<<"Cannot add (+=) two vectors of different lengths! Exiting..."<<endl;
//exit(1);
//throw xDim();
}
for (int i=0;i<s;i++) vect[i]+=a(i);
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::operator -= (const vector<T>& a)
{
if (a.length() != s) {
//cout<<"Cannot subtract (-=) two vectors of different lengths! Exiting..."<<endl;
//exit(1);
//throw xDim();
}
for (int i=0;i<s;i++) vect[i]-=a(i);
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::operator *= (const vector<T>& a)
{
if (a.length() != s) {
//cout<<"Cannot multiply (*=) two vectors of different lengths! Exiting..."<<endl;
//exit(1);
//throw xDim();
}
for (int i=0;i<s;i++) vect[i]*=a(i);
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::operator /= (const vector<T>& a)
{
if (a.length() != s) {
//cout<<"Cannot divide (/=) two vectors of different lengths! Exiting..."<<endl;
//exit(1);
//throw xDim();
}
for (int i=0;i<s;i++) {
if (a(i)!=0) vect[i]/=a(i);
else {
//cout<<"Attempting /0 in vector::operator /=. Exiting..."<<endl;
//exit(1);
//throw xDivide();
}
}
return *this;
}
//---------------------------------------------------------------------------
template <class T>
188
vector<T>& vector<T>::operator = (const vector& a)
{
if (a.length() != s) {
delete [] vect;
s=a.length();
vect=new T [s];
}
for (int i=0;i<s;i++) vect[i]=a(i);
return *this;
}
//---------------------------------------------------------------------------
template <class T>
T vector<T>::vmax()
{
T max=vect[0];
for (int i=1;i<s;i++) if (vect[i]>max) max=vect[i];
return max;
}
//---------------------------------------------------------------------------
template <class T>
T vector<T>::vmin()
{
T max=vect[0];
for (int i=1;i<s;i++) if (vect[i]<max) max=vect[i];
return max;
}
//---------------------------------------------------------------------------
template <class T>
void vector<T>::min_with_index(T& min_value, int& index, int start)
{
T min=vect[start];
int local_index=start;
start++;
for (int i=start;i<s;i++)
{
if (vect[i]<min)
{
min=vect[i];
local_index = i;
}
}
min_value = min;
index = local_index;
}
//---------------------------------------------------------------------------
template <class T>
void vector<T>::max_with_index(T& min_value, int& index,int start)
{
T min=vect[start];
int local_index=start;
start++;
for (int i=start;i<s;i++)
{
if (vect[i]>min)
{
min=vect[i];
local_index = i;
}
}
min_value = min;
index = local_index;
}
189
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::demean ()
{
double m=mean();
for (int i=0;i<s;i++) vect[i]-=m;
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::blank ()
{
for (int i=0;i<s;i++) vect[i]=0;
return *this;
}
//---------------------------------------------------------------------------
template <class T>
double vector<T>::magnitude ()
{
double mag=0;
for (int i=0;i<s;i++) mag+=(vect[i]*vect[i]);
mag=sqrt(mag);
return mag;
}
//---------------------------------------------------------------------------
template <class T>
double vector<T>::mean ()
{
double mean=0;
for (int i=0;i<s;i++) mean+=vect[i];
mean/=(double)(s);
return mean;
}
//---------------------------------------------------------------------------
template <class T>
float vector<T>::median (int start, int end)
{
int n, n2;
float m;
if(end == 0) end = s;
n = end-start;
n2 = n/2;
quickSort(start,end-1);
if (n%2 == 0) m = (vect[n2-1]+vect[n2])*(float).5;
else m = vect[n2];
return m;
}
//---------------------------------------------------------------------------
190
{
float product=0;
for (int i=0;i<s;i++) product*=vect[i];
return product;
}
//---------------------------------------------------------------------------
template <class T>
float vector<T>::variance ()
{
float variance=0,m=mean(),dif;
for (int i=0;i<s;i++) {
dif=m-vect[i];
if (dif<0) dif*=-1;
variance+=dif;
}
variance/=(float)(s);
variance*=variance;
return variance;
}
//---------------------------------------------------------------------------
template <class T>
double vector<T>::angle_between(vector<T>& b)
{
int i;
double ang,maga=0,magb=0,summ=0;
if (s!=b.length()){
//cout<<"Warning: taking the angle between vectors of different length..."<<endl;
//cout<<"newy len = "<<s<<", kept len = "<<b.length()<<". Exiting..."<<endl;
//exit(1);
//throw xDim();
}
for (i=0;i<s;i++){
maga+=(vect[i]*vect[i]);
magb+=(b(i)*b(i));
summ+=(vect[i]*b(i));}
maga=sqrt(maga);
magb=sqrt(magb);
maga*=magb;
if (maga!=0) {
summ/=maga;
if (summ>=1.0) summ=1.000;
if (summ<= -1.0) summ=-1.000;
ang=acos(summ);}
else ang=0;
return ang;
}
//---------------------------------------------------------------------------
template <class T>
double vector<T>::dot_product(vector<T>& b)
{
int i;
double sum=0;
if (s!=b.length()){
//cout<<"Warning: taking the dot product between vectors of different length..."<<endl;
//cout<<"newy len = "<<s<<", kept len = "<<b.length()<<". Exiting..."<<endl;
//exit(1);
//throw xDim();
}
for (i=0;i<s;i++)
sum+=(vect[i]*b(i));
return sum;
}
191
//---------------------------------------------------------------------------
template <class T>
double vector<T>::project_onto(vector<T>& b)
{
double ang=angle_between(b);
double mag=magnitude();
double proj=mag*cos(ang);
return proj;
}
//---------------------------------------------------------------------------
template <class T>
double vector<T>::distance_from(vector<T>& b)
{
double ang=angle_between(b);
double mag=magnitude();
double proj=mag*sin(ang);
return proj;
}
//---------------------------------------------------------------------------
/*template <class T>
vector<T>& vector<T>::mean_vector(sequence<T>& a)
{
blank();
int i,j,k;
for (i=0;i<a.width();i++){
for (j=0;j<a.height();j++){
for (k=0;k<s;k++){
vect[k]+=a(i,j,k);
}
}
}
*this/=(T)(a.width()*a.height());
return *this;
} */
//---------------------------------------------------------------------------
/*template <class T>
vector<T>& vector<T>::sigma_vector(sequence<T>& a)
{
blank();
int i;
if (s!=a.length()) {
cout<<"vector and sequence don't match in sigma_vector! Exiting."<<endl;
exit(1);
}
for (i=0;i<a.length();i++) vect[i]=sqrt(a[i].variance());
return *this;
} */
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::real_FFT()
{
void four1(double* data,int nn, int isign);
int sz=2,i;
while (sz<s) sz*=2;
double* data = new double [2*sz];
for (i=0;i<2*sz;i++){
if ((i/2)<s && (i%2)==0){
data[i]=(double)(vect[i/2]);
}
else{
data[i]=0;
}
192
}
four1(data-1,sz,1);
resize(2*sz);
for (i=0;i<s;i++) vect[i]=(T)(data[i]);
delete []data;
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::FFT(bool INV)
{ //Performs the complex FFT, where the input is in real/imaginary pairs
//(e.g. even are real, odds are imaginary)
//returns the complex FFT
int sz=2,i,j,j1;
while (sz<s/2) sz*=2;
float* RealIn = new float [sz];
float* ImagIn = new float [sz];
float* RealOut = new float [sz];
float* ImagOut = new float [sz];
for (i=0;i < sz;i++){
j = i*2;
j1 =j+1;
if (j1 < s){
RealIn[i]=(float)(vect[j]);
ImagIn[i]=(float)(vect[j1]);
}
else{
RealIn[i]=0.;
ImagIn[i]=0.;
}
}
fft(sz,INV,RealIn,ImagIn,RealOut,ImagOut);
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::IFFT()
{ //Performs the complex IFFT, where the input is in real/imaginary pairs
//(e.g. even are real, odds are imaginary)
//returns the complex FFT
FFT(1);
return *this;
}
//---------------------------------------------------------------------------
193
template <class T>
vector<T>& vector<T>::mag_FFT()
{
//void four1(double* data,int nn, int isign);
int sz=2,i;
while (sz<s) sz*=2;
double* data = new double [2*sz];
for (i=0;i<2*sz;i++){
if ((i/2)<s && (i%2)==0) data[i]=(double)(vect[i/2]);
else data[i]=0;
}
four1(data-1,sz,1);
for (i=0;i<s;i++) {
vect[i]=(T)(sqrt(SQR(data[2*i])+SQR(data[2*i+1])));
}
delete []data;
return *this;
}
//---------------------------------------------------------------------------
template <class T>
vector<T>& vector<T>::real_IFFT()
{
//void four1(double* data,int nn, int isign);
int i,sz=2;
while (sz<s) sz*=2;
double* data = new double [sz];
for (i=0;i<sz;i++){
if (i<s){
data[i]=(double)(vect[i]);
}
else{
data[i]=0;
}
}
four1(data-1,sz/2,-1);
resize(sz/2);
for (i=0;i<s;i++) vect[i]=(T)(data[i])/((double)(sz/2));
// for (i=0;i<s;i++) vect[i]=(T)(data[i*2])/((double)(sz/2));
delete []data;
return *this;
}
//---------------------------------------------------------------------------
template <class T>
void vector<T>::four1(double* data,int nn, int isign)
{
int n,mmax,m,j,istep,i;
double wtemp,wr,wpr,wpi,wi,theta;
double tempr,tempi;
n=nn << 1;
j=1;
for (i=1;i<n;i+=2) {
if (j>i) {
SWAP(data[j],data[i]);
SWAP(data[j+1],data[i+1]);
}
m=n >> 1;
while (m>=2 && j>m) {
j -= m;
m>>=1;
}
194
j+=m;
}
mmax=2;
while (n>mmax) {
istep=mmax << 1;
theta=isign*(6.28318530717959/mmax);
wtemp=sin(0.5*theta);
wpr=-2.0*wtemp*wtemp;
wpi=sin(theta);
wr=1.0;
wi=0.0;
for (m=1;m<mmax;m+=2) {
for (i=m;i<=n;i+=istep) {
j=i+mmax;
tempr=wr*data[j]-wi*data[j+1];
tempi=wr*data[j+1]+wi*data[j];
data[j]=data[i]-tempr;
data[j+1]=data[i+1]-tempi;
data[i]+=tempr;
data[i+1]+=tempi;
}
wr=(wtemp=wr)*wpr-wi*wpi+wr;
wi=wi*wpr+wtemp*wpi+wi;
}
mmax=istep;
}
}
//---------------------------------------------------------------------------
template <class T>
vector<T> operator + (const vector<T>& v1, const vector<T>& v2)
{
vector<T> v(v1.length());
v=v1;
v+=v2;
return v;
}
//---------------------------------------------------------------------------
template <class T>
vector <T> operator - (const vector<T>& v1, const vector<T>& v2)
{
vector<T> v;
v=v1;
v-=v2;
return v;
}
//---------------------------------------------------------------------------
template <class T>
vector <T> operator * (const vector<T>& v1, const vector<T>& v2)
{
vector<T> v;
v=v1;
v*=v2;
return v;
}
//---------------------------------------------------------------------------
template <class T>
vector <T> operator / (const vector<T>& v1, const vector<T>& v2)
{
vector<T> v;
v=v1;
v/=v2;
195
return v;
}
//---------------------------------------------------------------------------
/*
ifstream& operator>>(ifstream& FileIn, vector<bool>& rhs)
{
int size, depth;
bool *input;
size = rhs.length();
FileOut.write ((char* )&size,sizeof(int));
depth = sizeof(bool);
FileOut.write ((char* )(&depth),sizeof(int));
output = rhs.getvect();
FileOut.write((char*)output,(size*sizeof(bool)));
return FileOut;
}
*/
//---------------------------------------------------------------------------
template<class T>
void vector<T>::insertSort(long lb, long ub){
T t;
long i, j;
if(lb < 0 || ub >= s){
//throw xDim();
}
/**************************
* sort array a[lb..ub] *
**************************/
for (i = lb + 1; i <= ub; i++) {
t = vect[i];
/* Shift elements down until */
/* insertion point found. */
for (j = i-1; j >= lb && vect[j]>t; j--)
vect[j+1] = vect[j];
/* insert */
vect[j+1] = t;
}
return;
}
//---------------------------------------------------------------------------
template<class T>
long vector<T>::partition(long lb, long ub){
T t, pivot;
long i, j, p;
196
/*******************************
* partition array a[lb..ub] *
*******************************/
/* select pivot and exchange with 1st element */
p = lb + ((ub - lb)>>1);
pivot = vect[p];
vect[p] = vect[lb];
return j;
}
//---------------------------------------------------------------------------
template<class T>
void vector<T>::quickSort(long lb, long ub){
long m;
/**************************
* sort array a[lb..ub] *
**************************/
while (lb < ub) {
/* quickly sort short lists */
if (ub - lb <= 12) {
insertSort(lb,ub);
return;
}
/* partition into two segments */
m = partition (lb,ub);
/* sort the smallest partition */
/* to minimize stack requirements */
if (m - lb <= ub - m) {
quickSort(lb, m - 1);
lb = m + 1;
} else {
quickSort(m + 1,ub);
ub = m - 1;
}
}
}
//---------------------------------------------------------------------------
template<class T>
void vector<T>::quickSort(){
long m,lb,ub;
lb = 0;
ub = s-1;
/**************************
* sort array a[lb..ub] *
197
**************************/
while (lb < ub) {
/* quickly sort short lists */
if (ub - lb <= 12) {
insertSort(lb,ub);
return;
}
/* partition into two segments */
m = partition (lb,ub);
/* sort the smallest partition */
/* to minimize stack requirements */
if (m - lb <= ub - m) {
quickSort(lb, m - 1);
lb = m + 1;
} else {
quickSort(m + 1,ub);
ub = m - 1;
}
}
}
//---------------------------------------------------------------------------
template<class T>
vector<T>& vector<T>::linspace(float d1, float d2, int n)
{ // Linearly spaced vector.
//LINSPACE(X1, X2, N) generates N points between X1 and X2.
int i;
resize(n);
for(i = 0; i < n-1; i++){
vect[i] = d1 + i*(d2-d1)/((float)floor(n)-1);
}
vect[n-1] = d2;
return *this;
}
//---------------------------------------------------------------------------
template<class T>
vector<T>& vector<T>::hamming(int n)
{ // Linearly spaced vector.
//LINSPACE(X1, X2, N) generates N points between X1 and X2.
int i, m, n_1;
float r,x,h, pi2 = (float)M_PI*(float)2.0;
if(s != n) resize(n);
r = (float)fmod(n,2);
if (r == 0) m = n/2;
else m = n/2+1;
n_1 = n-1;
198
int i,j,re,im, npt, nbrk, nint, nb, ne;
float inc, dt,real,imag, h;
vector<float> a(10);
vector<float> freq;
vector<float> H;
vector<float> HC;
vector<float> rad_imag;
vector<float> wind;
vector<float> HR;
vector<float> HI;
nbrk = aa.length();
nint=nbrk-1;
++npt; //Length of [dc 1 2 ... nyquist] frequencies.
nb = 0;
H(0)=aa(0);
for(i= 0; i < nint; i++){
ne = (int)floor(freq(i+1)*npt);
for(j = nb; j<ne; j++){
if( (nb+1) == ne) inc = 0.;
else inc = ((float)(j-nb))/((float)(ne-nb-1));
h = inc*aa(i+1) + (1 - inc)*aa(i);
H(j) = h;
}
nb = ne;
}
dt =(float) 0.5* nn;
199
re = (npt-1)*4 - j;
im = re+1;
HR(re/2) = HC(j);
HI(re/2) = -HC(j+1);
//HC.print();
HC.IFFT(); // Symmetric real series.
return *this;
}
//---------------------------------------------------------------------------
template <class T>
unsigned vector<T>::NumberOfBitsNeeded ( unsigned PowerOfTwo )
{
unsigned i;
if ( PowerOfTwo < 2 )
{
// fprintf (
// stderr,
// ">>> Error in fftmisc.c: argument %d to NumberOfBitsNeeded is too small.\n",
// PowerOfTwo );
exit(1);
}
return rev;
}
//---------------------------------------------------------------------------
template <class T>
void vector<T>::fft(
200
unsigned NumSamples,
int InverseTransform,
float *RealIn,
float *ImagIn,
float *RealOut,
float *ImagOut )
{
unsigned NumBits; /* Number of bits needed to store indices */
unsigned i, j, k, n;
unsigned BlockSize, BlockEnd;
if ( InverseTransform )
angle_numerator = -angle_numerator;
/*
** Do simultaneous data copy and bit-reversal ordering into outputs...
*/
/*
** Do the FFT itself...
*/
BlockEnd = 1;
for ( BlockSize = 2; BlockSize <= NumSamples; BlockSize <<= 1 )
{
float delta_angle = angle_numerator / (float)BlockSize;
float sm2 = (float)sin ( -2 * delta_angle );
float sm1 = (float)sin ( -delta_angle );
float cm2 = (float)cos ( -2 * delta_angle );
float cm1 = (float)cos ( -delta_angle );
float w = 2 * cm1;
float ar[3], ai[3];
ai[2] = sm2;
ai[1] = sm1;
201
ai[2] = ai[1];
ai[1] = ai[0];
k = j + BlockEnd;
tr = ar[0]*RealOut[k] - ai[0]*ImagOut[k];
ti = ar[0]*ImagOut[k] + ai[0]*RealOut[k];
RealOut[j] += tr;
ImagOut[j] += ti;
}
}
BlockEnd = BlockSize;
}
/*
** Need to normalize if inverse transform...
*/
if ( InverseTransform )
{
float denom = (float)NumSamples;
//---------------------------------------------------------------------------
template<class T>
vector<T>& vector<T>::vinv()
{ // vector inverse
for(int i=0;i<s;i++){
if(vect[i] != 0){
vect[i] = 1/vect[i];
}
else{
vect[i]=0.;
}
}
return *this;
}
//---------------------------------------------------------------------------
template<class T>
vector<T>& vector<T>::conv(const vector<T>& aa)
{ // convolution or FIR filter
int sa, i, sz;
sa = aa.length();
sz = 2;
202
double* RealInAA = new double [sz];
double* ImagInAA = new double [sz];
double* RealOutAA = new double [sz];
double* ImagOutAA = new double [sz];
delete []RealIn;
delete []ImagIn;
delete []RealOut;
delete []ImagOut;
delete []RealInAA;
delete []ImagInAA;
delete []RealOutAA;
delete []ImagOutAA;
return *this;
}
//---------------------------------------------------------------------------
template<class T>
vector<T>& vector<T>::diff(const vector<T>& aa)
{ // calculate the derivative
int sa,i;
sa = aa.length();
resize(sa-1);
for (i = 0; i < sa-1; i++) vect[i] = aa(i+1)- aa(i);
return *this;
}
//---------------------------------------------------------------------------
template<class T>
vector<T>& vector<T>::offset(float shift,float scale)
{ // shift and scale the vector
for (int i = 0; i < s; i++) vect[i] = (vect[i]-shift)/scale;
return *this;
}
//---------------------------------------------------------------------------
// ============================================================================
203
// Project : Wire Diagnostics Prototype
//
// CSCI :
//
// P/N :
//
// CSC :
//
// File Name : Vector.h
//
// ============================================================================
//
// Purpose:
//
//
// Notes:
//
// ============================================================================
//
// Revision History
// $Log::$
//
// Rev 1.0 Dec 11 2002 15:29:36 ebechhoe
//Initial revision.
//
// Rev 1.2 Dec 09 2002 09:04:08 ebechhoe
//setVect allows copy of pointer array. getVect sets a pointer array.
//Caller is responsible for memorey management
//
// *
// * Rev 1.0 Nov 16 2002 16:22:48 ebechhoefer
// * Initial revision.
//
//
//
// ============================================================================
#ifndef vectorH
#define vectorH
#pragma once
#define M_PI 3.14159265358979
#define SWAP(a,b) tempr=(a); (a)=(b); (b)=tempr
#define SQR(a) ((a)*(a))
#define VMIN(a,b) (a)<(b)? (a):(b)
#define VMAX(a,b) (a)>(b)? (a):(b)
//#include<fstream.h>
//#include <iostream>
#include<stdlib.h>
#include<math.h>
//template<class T>
//class sequence;
204
T* vect;
int s;
unsigned NumberOfBitsNeeded ( unsigned PowerOfTwo );
unsigned ReverseBits ( unsigned index, unsigned NumBits );
void fft(unsigned ,int ,float *,float *,float *,float *);
void four1(double* data,int nn, int isign);
public:
vector() {vect=0; s=0;}
vector (int size);
vector (const vector &rhs);
~vector () {wipe();}
void wipe () {if (vect && s) delete [] vect;}
int length () const {return s;}
void setvect (T* a,int i) {vect=a;s = i;}
T* getvect () {s = 0; return vect;}
void resize (int newsize);
void getmem (int size);
T& operator () (int a)
{
//if (a>=s || a<0)
//throw xBoundary();
//else
return (vect[a]);
}
T& operator () (char *complex ,int a)
{
if (a>=s || a<0)
//throw xBoundary();
else{
if (strcmp(complex,"im") == 0)
return (vect[a]);
else
return (vect[a]);
}
}
205
T vmax();
T vmin();
void min_with_index(T& min_value, int& index, int start=0);
void max_with_index(T& min_value, int& index ,int start=0);
vector& demean ();
vector& blank ();
double magnitude ();
double mean ();
float median (int start = 0, int end = 0);
float variance ();
double angle_between (vector& b);
double project_onto(vector& b);
double distance_from(vector& b);
double dot_product(vector& b);
float sum();
float product();
vector& real_FFT();
vector& FFT(bool INV=0);
vector& IFFT();
vector& mag_FFT();
vector& real_IFFT();
void insertSort(long lb, long ub);
long partition(long lb, long ub);
void quickSort(long lb, long ub);
void quickSort();
vector & linspace(float d1, float d2, int n);
vector & hamming(int n);
vector & fir(int nn,const vector<T>& aa);
vector& conv(const vector<T>& a);
vector& diff(const vector<T>& a);
vector& offset(float ,float );
};
template <class T>
vector <T> operator + (const vector<T>& v1,const vector<T>& v2);
206