Design and Characterization of a Fiber Bragg Grating Interrogation System for Wind Turbine Blade Strain and Structural Health Monitoring Applications by WILLIAM ROGER ALLAN II B.S. (University of California, Davis) 2004

THESIS

Submitted in partial satisfaction of the requirements of the degree of MASTER OF SCIENCE in Mechanical Engineering in the OFFICE OF GRADUATE STUDIES of the UNIVERSITY OF CALIFORNIA DAVIS

Approved:

Committee in Charge 2006 –i–

– ii –

Acknowledgements I would like to acknowledge the following sponsors, colleagues, friends, and family for their contributions to my research and this document.

Thank you: to Sandia National Labs Wind Energy Group and Jose Zayas, for sponsorship of this research; to Professor David Horsley, for direction and a very generous level of patience; to Professors Chattot and La Saponara, for advising this thesis; to Professor Yankelevich for assistance with fiber optic splicing equipment; to Dr. Frank, for supporting my undergraduate research; to Chris Nitta, for countless software bail-outs in this thesis and previous projects; to Mark Duvall and the rest of Team Fate, for sincere guidance and great memories; and to my Parents.

– iii –

– iv –

Abstract A design and subsequent prototype of a low cost, integrated optical interrogation system for fiber Bragg grating (FBG) strain sensors have been executed based on a needs analysis of the wind turbine power generation industry. The design, motivated by the need for a widely deployable wind turbine blade (WTB) strain sensing system, addresses metrics of sampling rate, resolution, accuracy, temperature effects, and cost where relevant to the primary WTB application. Though fiber Bragg grating technology has been available since the early 1980s, a low cost method of interrogating the sensors to get useful data has not been available. The design detailed in this thesis leverages a microelectromechanical optical tunable filter, superluminescent broadband diode and embedded realtime digital signal processor to drive cost down while providing advanced, application-specific interrogation functionality. System tests at Sandia National Laboratories Wind Energy Group facilities demonstrated adequate sampling rate, a resolution of 1με, and good test-to-test repeatability. When contrasted with commercial off-the-shelf FBG interrogation systems, the new design exhibits adequate performance and a more relevant application-specific feature set for approximately one tenth the cost. Furthermore, the system is not specific to wind turbine blades; any structural health monitoring application using composite parts for aeronautical, aerospace, marine or similar field may potentially leverage the system.

–v–

– vi –

Table of Contents Acknowledgements.........................................................................................................................iii Abstract............................................................................................................................................ v Table of Contents...........................................................................................................................vii Lists.................................................................................................................................................xi List of Figures .............................................................................................................................xi List of Tables ............................................................................................................................. xv List of Abbreviations and Symbols..........................................................................................xvii Chapter 1 – Introduction .................................................................................................................. 1 Wind Turbine Technology ........................................................................................................... 1 Wind Turbine Blade Construction ............................................................................................... 2 Strain Sensor Applications in Wind Turbine Blades ................................................................... 3 Other FBG Strain Sensor Applications........................................................................................ 6 Target Strain Sensor Performance ............................................................................................... 7 Chapter 2 – Sensor Technologies .................................................................................................. 10 Resistive Strain Gauges ............................................................................................................. 10 Semiconductor Strain Transducers ............................................................................................ 11

– vii –

Accelerometer- and Gyroscope-based Strain Sensing Techniques............................................ 14 Fiber Optic Sensing.................................................................................................................... 16 Time Division Multiplexed FBG Sensors.............................................................................. 17 Wavelength Division Multiplexed FBG Sensors................................................................... 18 Multi-Axis FBG Sensing ....................................................................................................... 19 Strain Sensor Technology Summary.......................................................................................... 20 Existing Commercial Products................................................................................................... 24 Relevant Publications................................................................................................................. 25 Chapter 3 – Optical Interrogation Techniques............................................................................... 27 Classical Optical Approaches .................................................................................................... 28 Mechanically Tuned Optical Filters........................................................................................... 35 The MEMTUNE Tunable Optical Filter.................................................................................... 37 Chapter 4 – Interrogator System Design........................................................................................ 39 Design Goals.............................................................................................................................. 39 High Level System Design ........................................................................................................ 40 Digital Signal Processor Interface Overview......................................................................... 41 Optical Interface Overview.................................................................................................... 41 User Interface Subsystem ...................................................................................................... 42 Mechanical Design ................................................................................................................ 43 Digital Signal Processor Interface Detail................................................................................... 45 Embedded Digital Signal Processor....................................................................................... 45 External Communications Transceivers ................................................................................ 48 Photodiode and Amplifier...................................................................................................... 49 High Speed Communications Interface ................................................................................. 50 – viii –

Analog Output Monitors........................................................................................................ 52 Packaging............................................................................................................................... 53 Optical Interface Design Detail.................................................................................................. 53 Tunable Optical Filter............................................................................................................ 55 Superluminescent Diode ........................................................................................................ 59 Firmware and Software Application Detail ............................................................................... 60 Data Structures....................................................................................................................... 61 DSP Initialization and Hardware Drivers .............................................................................. 63 Prescan Routine ..................................................................................................................... 64 Sensor Scanning Routine ....................................................................................................... 69 PC-Based Graphical User Interface Detail ................................................................................ 76 Chapter 5 – Characterization and Testing Results ......................................................................... 80 Laboratory Testing and Characterization................................................................................... 80 FBG Sensitivity Testing......................................................................................................... 81 Accuracy Testing with a Fiberglass Beam............................................................................. 82 Dynamic Steel Beam Tests ........................................................................................................ 87 Sandia National Laboratories Field Test.................................................................................... 89 Specimen Design ................................................................................................................... 90 Test Procedures...................................................................................................................... 91 Auto-Scan Results.................................................................................................................. 92 Field Test Results....................................................................................................................... 96 Test 3 of 5 .............................................................................................................................. 97 Test 4 of 5 ............................................................................................................................ 100 Test 5 of 5 ............................................................................................................................ 103

– ix –

Chapter 6 – Discussion and Conclusions..................................................................................... 107 Prescan Performance................................................................................................................ 107 Detected Sensors.................................................................................................................. 108 FBGIS Performance................................................................................................................. 110 Output Noise ........................................................................................................................ 110 Offset and Gain Errors......................................................................................................... 111 Linearity............................................................................................................................... 113 Repeatability ........................................................................................................................ 115 System Cost ............................................................................................................................. 116 Discussion Summary ............................................................................................................... 116 Conclusion ............................................................................................................................... 118 References.................................................................................................................................... 119 Appendix 1 – Datasheets ............................................................................................................. 121 Appendix II – Drawings, Schematics & PCB Layouts ................................................................ 135 Appendix III – Project Code Listing............................................................................................ 165

–x–

Lists List of Figures Figure 1. A typical off-shore wind turbine installation. .................................................................. 2 Figure 2. Typical blade cross section with integrated shear web. .................................................. 3 Figure 3. Wind turbine blade bending modes. ................................................................................ 4 Figure 4. Sensor arrangements for flap/edge, twist, and combined flap/edge/twist detection. ...... 5 Figure 5. Typical metal foil strain gauge, unidirectional. ............................................................ 10 Figure 6. Simple grating monochromator illustration. ................................................................. 28 Figure 7. Misalignment Sensitivity of the Photodiode and Collimator......................................... 31 Figure 8. First order response of Grating Monochromator and PDA400 Photodiode. ............... 33 Figure 9. Interrogator System Block Diagram.............................................................................. 40 Figure 10. On-board LCD display example.................................................................................. 42 Figure 11. FBGIS Exterior Packaging & Interface Features. ...................................................... 43

– xi –

Figure 12. CAD Model of Interior FBIGS Components. .............................................................. 44 Figure 13. RS-232 Transceiver Circuit. ........................................................................................ 48 Figure 14. Photodiode amplifier circuit........................................................................................ 50 Figure 15. PCB Trace Layout for the SPI signals......................................................................... 51 Figure 16. Analog Output Monitor Circuit. .................................................................................. 52 Figure 17. DSP Interface PCB and User Interface PCB. ............................................................. 53 Figure 18. Optical Interface PCB. ................................................................................................ 54 Figure 19. MEMTUNE factory tuning curve. ............................................................................... 56 Figure 20. MEMTUNE filter response.......................................................................................... 57 Figure 21. MEMTUNE filter noise................................................................................................ 58 Figure 22. Spectral scan of SLD and FBG array.......................................................................... 60 Figure 23. Hierarchy of the sensors structure. ............................................................................. 61 Figure 24. Code Computer Studio (CCS) interface and prescan results. ..................................... 69 Figure 25. Strain sampling period timing analysis (T = 25.4ms). ................................................ 76 Figure 26. PC-GUI screen Capture. ............................................................................................. 78 Figure 27. Experimental setup for sensitivity testing.................................................................... 81 Figure 28. Sensitivity test results. ................................................................................................. 82

– xii –

Figure 29. Fiberglass beam test sensor mounting. ....................................................................... 83 Figure 30. Fiberglass beam experimental setup. .......................................................................... 84 Figure 31. Fiberglass beam static test results............................................................................... 85 Figure 32. Linearity analysis of static beam test. ......................................................................... 86 Figure 33. Preliminary dynamic performance testing. ................................................................. 87 Figure 34. Steel beam experimental setup. ................................................................................... 88 Figure 35. Steel beam dynamic strain measurement (free ringing). ............................................. 88 Figure 36. Free ringing test zoom................................................................................................. 89 Figure 37. Specimen design and sensor layout. ............................................................................ 91 Figure 38. Pre-scan results of FBGIS on damaged specimen. .................................................... 93 Figure 39. Prescan capture of kernel data.................................................................................... 95 Figure 40. Test 3 - FBG interrogator raw output. ........................................................................ 98 Figure 41. Test 3 - FBG interrogator loading results................................................................... 99 Figure 42. Test 3 - FBG interrogator output deviation from linear.............................................. 99 Figure 43. Test 3 - FBG interrogator output standard deviation. .............................................. 100 Figure 44. Test 4 - FBG interrogator output. ............................................................................. 101 Figure 45. Test 4 - FBG interrogator load results...................................................................... 102

– xiii –

Figure 46. Test 4 - FBG interrogator output standard deviation. .............................................. 102 Figure 47. Test 4 - FBG interrogator output deviation from linear............................................ 103 Figure 48. Test 5 - FBG interrogator raw output. ...................................................................... 105 Figure 49. Test 5 - FBG interrogator load results...................................................................... 105 Figure 50. Test 5 - FBG interrogator output standard deviation. .............................................. 106 Figure 51. Test 5 - FBG interrogator deviation from linear....................................................... 106 Figure 52. Load test results with FBG and resistive strain sensors. (From SNL) ...................... 112 Figure 53. Tests 4,5 - FBG Interrogator Deviation from Linear. ............................................... 114 Figure 54. Tests 4,5 - FBG Scanner Strain Repeatability Between Tests 4,5. ............................ 115

– xiv –

List of Tables Table 1. Target Interrogator Performance Metrics........................................................................ 8 Table 2. Strain Sensor Technology Analysis Summary................................................................. 22 Table 3. Strain Sensor Technology Decision Matrix. ................................................................... 23 Table 4. Existing commercial FBG interrogation products.......................................................... 24 Table 5. Experimentally derived properties of the MEMTUNE device. ....................................... 38 Table 6. Interrogator System Design Goals.................................................................................. 39 Table 7. DSP Processor Selection Criteria .................................................................................. 45 Table 8. PD100 Electrical Specifications (from Anadigics Datasheet)........................................ 49 Table 9. Properties of each FBG element..................................................................................... 62 Table 10. FBGIS internal memory capture.................................................................................. 95 Table 11. Test 3 Parameters. ........................................................................................................ 97 Table 12. Test 3 specimen loading (0 - 10ksi). ............................................................................. 97 Table 13. Test 4 Parameters. ...................................................................................................... 100 Table 14. Test 4 specimen loading (0 - 10ksi). ........................................................................... 100 Table 15. Test 5 Parameters. ...................................................................................................... 103 Table 16. Test 5 specimen loading (0 - 16ksi). ........................................................................... 104

– xv –

Table 17. FBGIS detected center wavelengths and sensor numbers. ......................................... 109 Table 18. Summary of FBGIS Parameters.................................................................................. 117

– xvi –

List of Abbreviations and Symbols A/D

analog to digital

ADC

analog to digital converter

BPS

bits per second

CAN

controller area network

CPU

central processing unit

D/A

digital to analog

DAC

digital to analog converter

DSP

digital signal processor

EMI

electromagnetic interference

FBG

fiber Bragg grating

FBGIS

fiber Bragg grating interrogation system

FWHM

full width half maximum

GUI

graphical user interface

LCD

liquid crystal display

PC-GUI

Microsoft Windows-based graphical user interface application

IMU

inertial measurement unit

InGaAs

Indium-Gallium-Arsenide

MEMS

microelectromechanical systems

OSA

optical spectrum analyzer

PWM

pulse width modulation

RAM

random access memory

RS-232

standard serial communication protocol

SHM

structural health monitoring

SCI

serial communications interface

– xvii –

SLD

superluminescent diode

SNL

Sandia National Laboratories

SNR

signal to noise ratio

SPI

serial peripheral interface

TDM

time division multiplexing

TI

Texas Instruments

TF

tunable optical filter

UART

universal asynchronous receive / transmit

UI

user interface

WDM

wavelength division multiplexing

WTB

wind turbine blade

h

kernel buffer array

λ

wavelength

με

microstrain

R

grating reflectivity

S

sensitivity

x

scan data set array

y

correlation result array

– xviii –

1

Chapter 1 – Introduction This chapter introduces the application of strain sensors in wind turbine blade (WTB) structures and the useful applications of that strain data for both static monitoring and dynamic control applications. With that motivation as background, fiber Bragg grating (FBG) technology is introduced and compared with other sensor technologies using metrics relevant to WTB applications. Finally, design constraints of a deployable FBG strain sensor interrogation system (FBGIS) are defined based on typical application scenarios.

Wind Turbine Technology Modern wind turbine designs cover the generator power spectrum from small single-purpose generators to giant, muti-megawatt off-shore wind generator farms. In general, higher power generators require larger blade dimensions in both length and chord. The case of large, high power wind turbines will be frequently referenced for the purposes of this thesis, as this application best highlights the need for smart structures such as wind turbine blades with integrated strain sensors and a related signal processing and communications infrastructure. Larger wind turbines and wind turbine farms demand more complex operation and maintenance routines. For the extreme (but increasingly popular) case of an offshore installation, simple maintenance costs can be five to ten times greater than equivalent land-based service. Even for land-based wind turbine installations, a blade is expected to fail approximately once every six years and therefore requires regular detection and prevention inspections (van Bussel and Zaaijer 2001).

2 Currently, wind turbines are inspected visually by a technician during service routines. This requires, of course, that a technician be present during the inspection routine and that the blade set and generator be braked for safety. Certainly, if there were a blade or entire wind turbine capable of monitoring its own health and notifying a maintenance crew when service was required, the cost of service routines could be dramatically reduced. It is desirable in all maintenance cases to integrate intelligence into the blade so that diagnostic procedures can be conducted remotely and service routines may only be performed when necessary. Ultimately the number of maintenance hours and service routines should be reduced as they currently average 40 to 80 hours with service routines being conducted semiannually (van

(Image courtesy and copyright LM Glasfiber)

Bussel 1999).

Figure 1. A typical off-shore wind turbine installation.

Wind Turbine Blade Construction Fiberglass blades are considered for the purposes of this analysis, though other composite materials have been used. In any case, FBG technology can readily apply to most composite structures with some considerations and restrictions.

3 Blade cross section

Internal shear web

Figure 2. Typical blade cross section with integrated shear web.

A simple representation of a blade’s internal construction is illustrated in the blade cross section diagram above. In general, a large composite blade integrates an internal shear web for some portion of its length near the blade root. This structural element provides added stiffness under bending loads and as such is a primary target for the application of strain sensors. The issue of strain sensor mounting locations over different blade types and geometries is not addressed in this thesis, as the optical interrogation technology is independent of installation process or location.

Strain Sensor Applications in Wind Turbine Blades A strain sensor applied to a composite WTB may be subject to at least two distinct applications: static monitoring and dynamic control. Note that the target interrogation system design in this document focuses on the former, and accordingly the subject or application of dynamic control is not re-visited beyond this section. Structural health monitoring (SHM) applications require strategically-located sensors embedded on the surface or within in a WTB structure to measure strain or other physical states. A data collection and processing infrastructure stores measured data and can transmit data for remote post-processing or evaluate the dataset locally. In the latter case, alarm events may be triggered if undesirable dataset trends emerge (some non-continuous data, etc.) or threshold strain values are exceeded. A typical production monitoring application (implemented as a feature of some highend commercial turbine) would require a relatively large-scale deployment of strain-sensorembedded WTBs at multiple sites; a robust, scalable and low-cost sensing solution is therefore

4 required to competitively address the aforementioned costs due to service and maintenance issues. Experimental sensing applications, in contrast, place higher demands on FBG sensing technology and lower demands on high volume optimizations and cost reduction. High bandwidth, high sample rate sensing systems with multiple sensing locations are generally required as the data is often used to validate theoretical models for analysis or control. Accordingly, data collection, processing and transmission infrastructure requirements for this sensing application are also more demanding. This type of sensing is also suitable for active load control where realtime, high resolution measurements are desirable. Three primary deflection directions are identified as sensing axes within a wind turbine blade. Flap bending is likely the most significant bending mode, where the blade flexes due to wind loading on the top and bottom surface of the blade. Edge bending occurs in the plane of the blade, where the blade tip deflects with respect to the blade base. Finally, blade torsional deflections should be measured, where the blade ‘twists’ along its length. Fiber Bragg gratings are suitable to detect each of these strain states.

Flap Bending

Twist

Edge Bending Figure 3. Wind turbine blade bending modes.

Structurally, the blade may be approximated as a tapered I-beam. To illustrate sensor mounting locations, however, the beam will be approximated as a uniform I-beam, which better represents

5 the more proximal cross section of the blade. The figure below illustrates three strain gauge mounting schemes, where each instance corresponds to a particular strain state.

(a)

(b)

(c)

Figure 4. Sensor arrangements for flap/edge, twist, and combined flap/edge/twist detection.

In Figure 4(a), both flap and edge bending can be detected in the ideal case. Flap bending will positively strain the upper gauge, and negatively strain (compress) the lower gauge. Thus the strain due to flap bending can be determined from the difference of the two strain readings. Edge bending strain is simply the average of the two strain values. Twist can be determined from sensors locations shown in Figure 4(b), as the average of the two strain values. Note that other strain arrangements are possible to detect the same strain effects; the examples above are given for reference and are not intended to provide an optimal arrangement of sensors. Figure 4(c) illustrates an arrangement of sensors that combine the first two sensing schemes, allowing for a simultaneous measurement of the different bending modes. Conceivably, then, it is possible to arrange strain sensors to detect both bending modes and the torsional state of the blade, which is useful for active load control as well as structural health monitoring. Sudden changes in the average cyclic strain may indicate deterioration of a blade. Or, separately, realtime monitoring of the blade strains could influence an adaptive control strategy with active pitch control or similar actuator-based load optimization scheme.

6

Other FBG Strain Sensor Applications The use of a FBG interrogation system to resolve strain is not specific to WTB applications. In general, any SHM application may benefit from the use of FBG technology as the properties of EMI immunity, high sensitivity and linear response are universally desirable. Transportation applications including spacecraft, aircraft, watercraft, and advanced ground-based transportation vehicles (military personnel transports, high performance all terrain vehicles, etc.) can integrate FBG sensors for either long-term health monitoring or dynamic monitoring of loaded substructures. Habitation structures including large residential or commercial buildings can incorporate FBG sensors in concrete to monitor any long-term deformation or crack propagation. Finally, extensive use of FBG sensors occurs in research and development environments to validate models or characterize new designs. For example, the Airbus A340-600 prototype utilized fiber Bragg gratings during development to validate FE calculations in major composite structural members (Betz, Staudigel et al. 2002). More fundamentally, a report from NASA Langley Research Center details techniques for achieving reliable sensor embedment in composite structures where both physical and chemical parameters are to be monitored by using high index of refraction fiber with intimate resin/fiber contact techniques (Wood, Brown et al. 2001). The team also investigates the use of FBG monitoring during the epoxy curing process. In the civil engineering field where composite structures are not as prevalent, a Japanese team details the applicability of FBG technology to steel structures, concluding that the sensors are adequate to monitor large steel structures through their yield point (Yamakawa, Iwaki et al. 1999). Eric Udd, a veteran of the FBG industry, assists in the reporting of a historical bridge instrumented with FBG strain sensors to monitor the performance of recently installed concrete support structures (Seim, Udd et al. 1998).

7

Target Strain Sensor Performance It is useful to define the minimum performance characteristics required to obtain useful data from the interrogation system for WTB applications. In terms of the final strain measurement, metrics of resolution, accuracy, noise, gain error, offset error, and repeatability should be bounded. Resolution, in microstrain, must meet some reasonable threshold but in general is not a critical parameter for wind turbine applications. In the case of simple structural health monitoring of an in-service WTB, the absolute resolution of the strain reading is critical only as it pertains to the deviation in strain over time. In this application scenario, the resolution may be bounded by considering the minimum desirable drift in strain that suggests a structural deviation. This is likely a structurally-dependant parameter, but we can assume 10με for the purposes of the interrogator design. Thus, we bound the FBGIS resolution to 10με. Strain accuracy is important if the interrogation system is being used to detect maximum loading conditions. Certainly, it is desirable to utilize the wind turbine to its maximum rated load, and shut down the system only when this threshold has been exceeded. Uncertainty in accuracy forces this shutoff threshold value to compensate, leading to reduced performance of the turbine in heavy load conditions. Bounding the accuracy to ±20με provides a reasonable level of certainty for both coarse structural health monitoring applications and laboratory-based research and testing of large structures. Signal noise is undesirable as, when compensating for white noise, the signal must be averaged over time. This leads to a reduced sampling rate or, alternatively, reduced overall accuracy. In either case, noise should be minimized. High sampling rates are not critical for SHM applications; noise should therefore not be reduced at the expense of other more critical performance metrics. For convenience in design, however, the minimum detectable signal desired may be considered to place an upper bound on the signal to noise ratio. In general, a SNR

8 of at least two is required for straightforward machine detection of a given signal. For the accuracy characteristic of ±20με defined earlier, a SNR of two places an upper bound of ±10με on peak-to-peak noise. Calibration is common for test instruments, and can be utilized in the FBG interrogation system to improve fixed offset and gain errors within the system. However, this scheme does not compensate for dynamic or transient gain and offset errors from effects such as temperature drift. Furthermore, it is undesirable to require regular calibration of the interrogation system if it is to perform in the field for decades at a time. It was decided that, for the purposes of the FBGIS prototype, a calibration routine may be introduced if necessary to meet performance requirements, and suggestions for automated calibration also be included to address system usability issues related to in-field calibration. Table 1. Target Interrogator Performance Metrics.

METRIC

PARAMETER

SYMBOL

MIN

MAX

UNITS

CONDITIONS

10

με

– 20

20

με



– 0.05

0.05



– 10

10

με

Post calibration

10

με

Swing over full strain range

M1.1

Resolution



M1.2

Accuracy



M1.3

Gain Error

M1.4

Offset Error

M1.5

SNR

M1.6

Repeatability

SNRε RRε

Post calibration

10 – 10

These metrics are not demanding. Previous work from the mid 1990s has demonstrated optical interrogation systems with resolution well below 1με (Shi, Chan et al. 2002), extremely high accuracy (Berkoff and Kersey 1996), SNR of over 30dB (Li, Guo et al. 2006), and it is well known that electrical strain transducers have similar performance in the field. However, the parameters are kept loose to accommodate for lower-cost components which may exhibit poorer

9 performance than that which is achieved under controlled laboratory conditions with precision test equipment.

10

Chapter 2 – Sensor Technologies This chapter provides a general overview of strain sensing technologies by examining candidate strain sensor technologies, and assesses the usefulness of FBG technology for wind turbine blades. The chapter concludes with a survey of existing work related to relevant fiber Bragg grating technologies, instrumentation, and peripheral applications.

Resistive Strain Gauges Conventional electrical strain gauges are composed of a thin-film metal foil bonded to a structural (usually elastic) backing. By straining the assembly, the metal foil’s resistance parallel to the axis of strain changes due to three effects: the overall length of the foil (proportional to applied strain), the foil cross sectional area (from Poisson’s ratio), and any piezoresistive behavior of the material

Figure 5. Typical metal foil strain gauge, unidirectional.

(Image courtesy Omega Engineering)

(usually negligible).

Strain gauge sensitivity S is a measure of the fractional change in resistance per unit strain. A sensitivity of 1.0 would indicate that some percent change in resistance of the gauge would occur

11 for the same percent change in elongation. High quality strain gauges made of platinum or platinum alloys have S = 6.1, while S = 2.0 is more common for lower-cost transducers. Given a 1.0 με load condition with S = 2.0, an equal-resistance Wheatstone bridge is considered with Vexcite = 10V to resolve the strain electrically. The change in resistance is 2mΩ as given by the sensitivity and a nominal resistance Rsense = 1kΩ. Then the change in bridge voltage is ΔV = (ΔR/R)/4 * Vexcite = 5μV and the electrical sensitivity is 5μV/ με. This is a difficult voltage level to resolve when typical environmental noise levels are present, even with higher quality gauges where S=6.1 giving approximately 15 μV/ με. Metal foil strain gauges should be temperature compensated but they exhibit roughly linear temperature response below 260°C. They also generally exhibit linear behavior between stress and resistance over their rated operating range. Accuracy with these gauges is typically better than ±0.1%. Basic resistive single axis strain gauges with S = 2.1 may be purchased in low volumes for approximately $49 each1. A variety of metal foil patterns are available and designed for different load sensing applications, and certainly there are a number of particular designs to chose from that are suitable to WTB sensing.

Semiconductor Strain Transducers This class of electric strain transducer relies on the piezoresistive properties of silicon or germanium to measure the effects of stress, and strain can subsequently be derived based on this

1

Omega Engineering, Inc. : http://www.omega.com/

12 property. These sensors generally exhibit a 50x increase in sensitivity when compared to metal foil strain transducers.2 Semiconductor strain transducers (SSTs) change resistivity3 in response to applied strain, unlike metal foil gauges which typically only change overall resistance. However, the response is very nonlinear and exhibits higher temperature sensitivity than their metal foil counterparts. Thus post-processing and temperature compensation are required. Typical silicon strain sensors have sensitivity S up to 150 and are therefore suitable for high resolution measurements. Considering the same Wheatstone bridge used for the resistive strain gauge example, a 10V bridge excitation potential is again used with a 1.0 με load condition. The change in resistance ΔR is 0.1Ω for S = 100 provided Rsense = 1k Ω. Then the change in bridge voltage is ΔV = (ΔR/R)/4 * Vexcite = 500μV and the electrical sensitivity is 500μV/ με. This voltage level can be resolved with confidence when typical environmental noise levels are present if careful attention is paid to noise shielding, amplifier design and proper wiring techniques. The transducer package is typically a bonded assembly with the silicon adhered to a rigid metal base plate, or a bare silicon wafer to be bonded directly to the surface of the strained material with special epoxy. Bare silicon wafers are extremely fragile and require great care in handling. The installation process for such a sensor, while common, requires specialized knowledge and skill. The bonded assembly on the other hand is more rugged and can be surface-mounted to most structures with minimal installation effort. Note that any bonding technique subjects the sensor to creep and hysteretic effects.

2

Online strain tutorial: http://www.omega.com/literature/transactions/volume3/strain.html Resistivity: The electrical resistance per unit length and per unit reciprocal cross-sectional area of a given material at a specified temperature. (Allen Press - http://www.allenpress.com) 3

13 Temperature effects are extremely significant in semiconductor strain transducers. While typical temperature coefficients of a resistive metal foil strain gauge are 10 ppm/°C, a semiconductor strain transducer can approach 90,000 ppm/°C. Thus the sensor must be temperature compensated. Furthermore, the nonlinearity of the sensor independent of temperature can exceed 20%. Each sensor must be calibrated (though sensors can be purchased in matched sets), and either post processing or embedded processing relative to calibration is required on a per-sensor basis. A bare silicon strain sensor typically costs $15 in low quantities.4 However because substantial skilled labor including surface preparation and environmental sealing is involved, effective sensor cost can rise to over $100 each. Mounted silicon sensors are comparable in cost to installed bare sensors. An extreme silicon strain sensor design is reported by the Berkeley Sensors and Actuators Center (BSAC) using MEMS technology. The sensor relies on mechanical deformation of a doubleended tuning fork support structure in the silicon to change the resonant frequency of a vibrating mass. The reported sensitivity was 39 Hz / με with a dynamic bandwidth of 10Hz to 20kHz and extremely low noise floor (Wojciechowski, Boser et al. 2004). External electronics were used to drive the sensor and detect the oscillation frequency. Such a device promises that may lead to integrated signal processing and communications technology necessary for use in a WTB application, but remains in laboratories currently.

4

Entran Sensors and Electronics: http://www.entran.com/gages.htm

14

Accelerometer- and Gyroscope-based Strain Sensing Techniques In WTB construction an I-beam is the main structural element, spanning most of the blade length. At least three analysis approaches are possible when applying inertial sensors to WTB structures if the designer is willing to compromise on the detection system’s overall fidelity. The inertial approach resolves back calculates strain from a measured deflection among two or more points on the blade. Position is estimated by integrating measured acceleration twice at multiple points, while also taking into account twist measured by a gyroscope. Thus the change in position (from accelerometers) and twist angle (from gyroscopes by integrating once to resolve angle) may be used to coarsely estimate a strain state of the blade. By knowing the orientation of the two end points on the beam, analytical or FEM beam-bending theory can be applied to determine the beam state. If the position and orientation of the beam end points are measured, and the unloaded beam geometry is known a-priori, then the strain may be calculated with post-processing using the inertial approach and theoretical models. As blade deflections in WTB applications are typically three-dimensional, a three-axis accelerometer and three-axis gyroscope composing a full inertial measurement unit (IMU) may be required to fully resolve the blade’s strained state. Bending assumptions and other sensing technologies can be applied in combination with accelerometerand gyroscope-based data, however, to reduce the number of required sensing axes in the inertial sensing approach. The gravitational approach leverages the blade’s rotation in the gravitational field to resolve differences in angle with respect to ground or other sensors. Knowledge of the angle between two points can lead to an approximation of strain in that direction in the absence of other mechanical influences. In this approach, consider instrumenting the blade for flap bending sensing. A single-axis accelerometer is placed at the root of the blade, with the sensitive axis

15 aligned parallel to the blade length. A second accelerometer may be placed at the blade tip in the same orientation. Without bending, as the blade rotates in a plane perpendicular to the ground, a purely cyclic loading of the accelerometer occurs due to gravity and centripetal acceleration dominant at the blade tip. The centripetal acceleration can be calibrated out as the mounting location and rotational speed are known. Then the difference between the two accelerometers is a function of the difference in angle between the blade root and blade tip. Accordingly, if a difference exists, a bending moment can be back-calculated and strain can be assumed based on analytical or FEM models. Of course, this technique interacts with small cosine angles and therefore appropriate attention must be paid to noise levels and sensitivity. Note that MEMS accelerometers and gyroscopes offer the convenient, rugged packaging, integrated signal conditioning and relatively high sensitivity suitable for resolving static and dynamic accelerations at multiple points on a blade structure. Because they are mass produced, their cost is very low and availability is immediate in high quantities. However, while the sensors are highly developed, more work is necessary to develop a metric of confidence when inferring strain states or failure mechanism from inertial techniques alone. Furthermore, early detection of failure is desirable which requires high sensitivity around expected failure points on a blade and inertial techniques only provide a coarse estimation of deflection. Finally, the resonance approach detects resonant or induced vibratory frequencies of the structure, where any shift in frequency or amplitude of the signal may indicate integrity degradation or fracture. Resonance sensing leverages accelerometers of some form to observe the vibrating modes of the blade. A number of accelerometers may be strategically applied where oscillatory nodes are expected as to achieve either maximum or minimum amplitude under normal conditions. If a change in structure occurs in the blade, the mode frequency may shift or change amplitude dependent on the nature of the structure deformation.

16 Significant research has focused on the idea of resonance-based structural health monitoring. Work has been done to investigate the use of piezoceramics in structural health monitoring of composite beams and plates with limited success. A conclusion notes that, while effective in some cases, damage detection with discrete piezoceramic sensors distributed over a structure require significant a-priori knowledge of mechanical properties and geometry and only provide adequate sensing at higher structural excitation modes (Schulz, Pai et al. 1999). Furthermore, a field survey was conducted that highlights the need for integrated statistical methods to overcome the frequency of false positives and lack of specificity in structural damage detection (Farrar, Doebling et al. 2000). The resonance technique requires advanced realtime signal processing to extract the meaningful vibration data from the bulk motion acceleration signal. The signals to be measured may be orders of magnitude smaller than dominant accelerations incident on the blade. More advanced resonance sensing modes using piezo materials are prohibitively expensive to deploy on a mass scale, and still require more fundamental breakthroughs to prove their usefulness in highreliability applications. It is assumed that this technique will not be able to provide the sensing resolution required as outlined previously in a production environment.

Fiber Optic Sensing Special purpose optical fiber may be selectively modified to change its permanent index of refraction at some cross section of the fiber. A typical exploitation of this property is the fiber Bragg grating (FBG), where cross sections of the fiber are locally modified in a periodic fashion spaced a small distance apart to create a grating. Distance between each cross section changes by straining the optical fiber axially. A unique property of the FBG is that it reflects a narrow band of C-band light (typically 0.3nm) back to the source. As the fiber is strained, the wavelength of

17 that reflected light shifts linearly and thus by measuring the change in reflected wavelength a measure of strain can be resolved (Kersey, Davis et al. 1996). A number of FBG sensors can be created in a single length of fiber, potentially creating a high density array of sensors in a convenient package. The upper limit to the number of sensors is a function of attenuation per sensor, light source intensity and the interrogation method. The primary challenge in the application of FBG sensors is the method of multiplexing more than one sensor onto a signal fiber, and the method of reading back, or interrogating, the center frequency of each sensor. Typically, FBG sensors cost $300 per sensor in single unit quantities (see Appendix I – SmartFibre Price Lsit) and presumably reduce in cost dramatically for production volumes. Tests conducted for this thesis used a custom arrayed FBG with six integrated sensors at a cost of $1250 per assembly, and single FBG sensors costing approximately $300 each.

Time Division Multiplexed FBG Sensors In time division multiplexing (TDM) a number of FBG sensors are created, all at the same center wavelength. To interrogate the sensors, a narrow band of light is sent down the fiber and is distributed via delay lines to each sensor assembly. Sensors are in an interferometric configuration where the source light is split, sent to the sensor and a delay line, and re-combined. Finally, the output of the interferometer is re-spliced onto the return line (Grattan and Meggitt 2000). The result is a temporally spaced sequence of optical signals that represent the interference patterns of each interferometer. The intensity of each pulse represents the shift in wavelength. Sensor number is decoded by sequence; the sensor closest to the light source will return to the source fastest as the light has the smallest path to travel.

18 A straightforward example of this technique was demonstrated recently by a group from Korea. The paper reports on the interrogation of up to 1000 sensors on a single spool of fiber optic cable using optical time-domain reflectometry, which implements a TDM-like interrogation scheme. Their experiment involved a 52-sensor fiber optic cable with sensor spacing of 10m, using the sensors to detect temperatures ranging from 10° to 40°C over the 1545 to 1548nm wavelength range. Reported accuracy was ±1.7°C (Eom, Kim et al. 2005). The TDM multiplexing technique avoids costly broadband light sources where the light frequency must be adjusted to match each sensor center frequency separately. A major limitation in TDM is that sensors can generally be spaced no less than 3.5m apart. Optical delay lines must be integrated or high density sensing may not be possible in some applications.

Wavelength Division Multiplexed FBG Sensors In wavelength division multiplexing (WDM) the FBG sensors are again on the same fiber but at different center wavelengths. Two methods exist for interrogating the FBG sensors using WDM. Reflected light may be filtered using a tunable optical filter (TF) if a broadband light source is to select a window through which a single reflected signal is expected to pass. By adjusting the filter the system can select which FBG to measure. However, using this method only one grating can be interrogated at a time, and the tuning method is often mechanical. Significant research has been conducted towards the development of a responsive MEMS tunable filter but to date no low cost commercial versions exist. Note that this research used the MEMS tunable filter from Nortel Networks but it is no longer produced. The second interrogation method in WDM is with a tunable light source. The most common method to achieve a variable light source is with a tunable laser diode. These systems are precise and exhibit relatively high tuning response. However, the cost of a tunable laser source is

19 generally prohibitive – embedded modules can be purchased for approximately $5000. Though an article in IEEE Spectrum (Bruce 2002) is quick to extol the virtues of the tunable laser applied to telecom applications – presumably attempting to help rebound the then-recent telecom industry crash, a highly integrated device with wide tuning range and good dynamic bandwidth is not yet available in 2006. Another technique to achieve a tunable light source is to use the same tunable optical filter at the output of an ASE white light source. While this method is likely lower cost, the system is again subject to extremely low sampling rates because of the filter’s mechanical nature. A group from Ireland experiments with a tunable laser source to interrogate embedded FBG sensors using a WDM scheme. They report a tunable laser resolution of 0.02nm and resulting strain resolution of 15με when interrogating FBG sensors (Connelly, Moloney et al. 2005). Again, though, the resolution is low and the sampling rate, though not reported, is not likely high as tunable laser sources are typically slow and Connelly uses LabView to control the experiment. Zhao et al. detail a number of general interrogation techniques including one based on a tunable light source. They report successful interrogation of one sensor with 5με resolution and 13kHz sampling frequency, but the technique is not expandable to multiple sensors. (Zhao and Liao 2004)

Multi-Axis FBG Sensing Multi-axis sensors are composed of more complex grating geometries applied in multiple directions to create a two or three-axis strain sensor. Temperature sensors may also be incorporated so that the ambient temperature effects can be calibrated out of the strain sensor response. While very attractive, these multi-axis sensors are challenging to process in realtime. Instead of a simple shifting frequency, the reflected light starts at a single centered peak and then diverges into two or more smaller peaks. It is the amplitude and the difference in wavelength

20 between peaks that must be decoded to measure the strain on multiple axes, and temperature effects further complicate the strain measurement. Presently, an optical spectrum analyzer is required to capture the full response of the reflected light band and intelligent post processing is required. It is cited that the primary drawback to FBG sensors is the apparent inability to completely decouple the temperature dependence of the sensors. A number of techniques have been proposed as solutions to the issue: a multi-diameter fiber strategy where differing cross-sectional areas lead to different thermal expansion effects (Song, Lee et al. 1997); a partially-adhered FBG sensor where part of the grating is glued to the structure leading to a two-peak reflection signature (Lo 1998); and a dual-doping strategy where a fiber with different doping elements provide distinguishable thermal expansion coefficients (Cavaleiro, Araujo et al. 1999). In contrast to the single-axis interrogation system where a simple shift in center wavelength is detected, the actual shape of the optical waveform is critical in multi-axis sensing. The complexity of this approach is highlighted in a number of published multi-axis sensor reports by Udd through spectrum captures that show the overlapping and virtually indistinguishable sensor readouts (Udd, Kreger et al. 2004). His reports conspicuously omit any consideration of a readout system while praising the usefulness of the multi-axis sensor itself (Black, Udd et al. 2004). Because an OSA is not acceptable in the WTB application due to its cost, size and relatively slow scan speed, multi-axis sensors will therefore be avoided when considering the FBGIS design.

Strain Sensor Technology Summary Three distinct technologies were considered for use in WTB applications. Electrical strain transducers, inertial sensors and fiber optic sensing techniques all possess some advantages for field deployment.

21 Electrical sensors are low cost with well-known infrastructure requirements, but are susceptible to EMI noise. They may be suitable for strain sensing at the WTB root, and proper electrical isolation may reduce the risks of electronic components attracting static charge or lightning. The sensors can be bonded to a structure but specialized sensors are required for embedment. Accelerometers and gyroscopes provide a unique insight into the blade performance and are very low cost. However, resolving strain to the microstrain level is likely not practical because of electrical noise, sensing bandwidth and fundamental limitations of the technique. However, the sensors may be used for coarse measurements to validate proper operation of the blade using the gravitational sensing approach. Bending limits of the blade can be monitored for safety with this relatively low cost sensing solution, but higher-fidelity interrogation is not likely. FBG sensing presents two clear advantages over other sensing methods. Noise immunity at the sensor is a tremendous advantage in the field because shielded wire and electronic filters may be omitted at the sensor. FBG sensors are also lightweight and can be embedded directly into the blade during manufacturing. The sensing resolution is inherently high because of their noise immunity, and the bandwidth is potentially high given the availability of a lower-cost tunable optical filter. For experimental applications, FBG sensing using WDM is desirable. This technique provides the maximum flexibility, sensing bandwidth and resolution necessary for precise laboratory measurements or feedback measurement. Single axis sensors should be employed wherever possible because of the cost overhead associated with multi-axis FBG sensors. For field deployment of production WTBs, a combination of all three sensing technologies may be considered. In high volume, unit sensor cost is a major consideration and electrical transducers provide significant cost benefits. Higher sensing resolution is often not required and

22 electrical infrastructure costs are also greatly reduced. Electrical sensor performance including linearity and temperature drift can usually be calibrated out through software. Table 2. Strain Sensor Technology Analysis Summary.

Sensor Cost

Infrastructure Cost

Approx. Resolution

Max Sensors

Noise Immunity

Sampling Frequency

Installation/ Packaging

Resistive Strain

$15

$1000

10 με

Any

Low

>1kHz

Surface Mount

Semiconductor Strain

$50

$1000

10 με

Any

Low

>1kHz

Epoxy Bond

Inertial Sensing

$200

$2000

Coarse

Any

Low

500 Hz

Surface Mount

Gravitational Sensing

$100

$2000

Coarse

Any

Low

500 Hz

Surface Mount

Resonance Sensing

$50

>$4000

Poor

Any

Low

>10 Hz

Surface Mount

WDM FBG

$300

>$3000

< 1 με

20

High

>10 Hz

Embedded TOM

TDM FBG

$300

>$3000

< 1 με

20

High

>10 Hz

Embedded TOM

Multi-axis FBG

$600

>$8000

< 5 με

5

High

<10 Hz

Embedded TOM

Desirable performance values have been highlighted in the table above. Remaining cells are either adequate or unacceptable. As all values are either qualitatively or quantitatively defined, it is possible to assign weighting values to the parameters using a 1-to-3 scale for least to most critical. Sensor and infrastructure costs are critical and therefore assigned weights of three each. Resolution is less important and assigned a weighting of two. The maximum number of sensors is critical in that the final system must support at least five sensors, so a weight of two is assigned. Nose immunity, though essentially a binary metric, is critical and is given a weight of three. Sampling frequency is less important and given a value of two. Packaging and installation is a relatively small one-time cost and is therefore given a weighting value of one.

23 The following table, corresponding to the previous table, presents the weighted values of each parameter for each type of strain sensing system. Values are qualitatively assigned on a 1-to-5 scale from least to most desirable, and represented as black bars. Table 3. Strain Sensor Technology Decision Matrix.

Weights:

3

3

2

3

3

2

1

Sensor Cost

Infrastruct. Cost

Approx. Resolution

Max Sensors

Noise Immun

Samp. Freq.

Install/ Packag.

Weighted Total

Resistive Strain

▌▌▌▌▌

▌▌▌▌▌

▌▌▌

▌▌▌



▌▌▌▌▌

▌▌▌

3.6

Semiconductor Strain

▌▌▌▌

▌▌▌▌▌

▌▌▌

▌▌▌



▌▌▌▌▌

▌▌

3.4

Inertial Sensing

▌▌▌

▌▌▌▌



▌▌▌



▌▌▌▌▌

▌▌▌

2.6

Gravitational Sensing

▌▌▌

▌▌▌▌



▌▌▌

▌▌▌

▌▌▌▌▌

▌▌▌

3.0

Resonance Sensing

▌▌▌▌▌

▌▌



▌▌▌



▌▌▌▌

▌▌▌

2.7

WDM FBG

▌▌▌

▌▌

▌▌▌▌▌

▌▌▌▌▌

▌▌▌▌▌

▌▌▌

▌▌▌▌▌

3.9

TDM FBG

▌▌▌

▌▌

▌▌▌▌▌

▌▌▌▌▌

▌▌▌▌▌

▌▌▌

▌▌▌▌▌

3.9

Multi-axis FBG





▌▌▌▌▌

▌▌▌

▌▌▌▌▌

▌▌

▌▌▌▌▌

2.9

The table above indicates that the two FBG strain sensing schemes have the most desirable overall properties. This conclusion is based on the assigned parameter (category) weightings and each qualitative parameter value per sensing system. Weighted totals for each strain sensing system were calculated as the row sum of the products of each value and respective weight, normalized to a 1-5 scale. It is necessary to further contrast the WDM and TDM interrogation schemes. In WDM sensor interrogation, it is the wavelength that must be distinctly spaced and therefore a constraint exists in the maximum number of sensors that can fit within a given spectral range. In TDM interrogation, it is the physical sensor spacing that must be distinctly spaced and therefore there is a limit to the maximum number of sensors on a fixed-length optical fiber.

24 Furthermore, using a time-based scheme such as TDM to measure the distance light travels requires extremely high speed electronics. If two sensors were spaced d = 4m apart along a fiber, the time t between return pulses would be approximately t = d / c = 4 / 3E8 = 13ns. At best, an A/D converter with 75MHz sampling rate would be required; these devices are available but difficult to integrate and interface with. A data transfer rate of at least 1.2GB/s would be required to capture a stream of 16-bit data at this rate, not including any communications overhead.

Existing Commercial Products A number of commercial products exist to perform the exact task required for WTB interrogation of FBG sensors. The systems offer various levels of integration, sampling rates, number of sensors per channel, number of channels, and communications options. However few highperformance systems exists whose cost is less than approximately $15,000. A primary goal of this research is to investigate the possibility of reducing the overall interrogation system cost while maintaining some of the most desirable properties of more expensive systems: high sampling rates and multi-sensor capability. Furthermore, it is also desirable to implement an autonomous system, capable of self calibration, auto-initiation, auto-reporting and fault-tolerant operation in a small, potentially ruggedized package. Table 4. Existing commercial FBG interrogation products.

Product

Company

Capabilities

Cost

Link

W4-2

SmartFibres Ltd.

1Hz, 1 Channel, Full Spectrum, C-Band, +/- 25pm accuracy, Unsealed Metal Enclosure

$13,640

http://www.smartfibres.com

F3/2005

SmartFibres Ltd.

5Hz, 2 Channel, 1pm Accuracy, LCD User Interface, Rack

$43,991

http://www.smartfibres.com

Spectraleye 600

FBGS Technologies

Simple OSA, handheld, 1Hz SR, 1pm res, 10pm accuracy, 50nm tuning range

>$10k

http://www.fbgstechnologies.com/

IS7000

FIBERPRO

Rackmount, 200Hz SR, PC software, 5pm accuracy, 3mW source, realtime output, 35nm tuning range

>$8k

25

Inter-FBG

O/E LAND LNC

8 sensors/channel, 1/2/4/8 channels, 5nm range, reflective/transmissive, 3mW laser, 1 minute scan speed

-

VectorLight 122

Prime Research

Two optical channels, 5Hz output, low voltage, ruggedized package

-

http://www.primephotonics.com /data_sheets/ VectorLight_ 122R_20060204.pdf

WaveCapture

BaySpec

Grating-based design, athermal, low power, sealed, ruggedized, fast response time <0.6ms

-

http://www.bayspec.com/pdf/ FBGAnalyzer.pdf

SM-130

Micron Optics

4 optical channel, >100 sensors/channel, 1kHz sampling per sensor, not ruggedized

>$20k

http://www.micronoptics.com/ pdfs/sm130.pdf

FB200

Yokogawa

1pm resolution, 40 sensors, single channel, lifetime >10yrs, compact, rugged solid state, 100Hz, grating-based CCD

-

WT-1030

Insensys

3 channel, 30 sensors/channel, 0.8 microstrian, 500Hz overall sampling rate, CAN,

-

http://www.insensys.com/ dynamicdata/data/docs/wt1030.pdf

*Note: costs bounded as lower limits are estimates and have not been confirmed

Relevant Publications The advent of fiber Bragg gratings has encouraged diverse research efforts since the early 1980s. The technology spans a number of major scientific and engineering fields as it boasts numerous inherent advantages. Novel technologies such as digital signal processors and optical MEMS devices developed more recently, however, may allow more optimized, higher performance interrogation system implementations not possible with the previous decade’s resources. Relevant topics related to FBG sensing for WTB structural health monitoring include: FBG strain sensor technology at the optical level; FBG application issues including fiber optic cables, multiFBG sensing strategies, temperature compensation of FBG sensors; FBG-based optical filters; FBG interrogation and high speed detection systems; and FBG sensors embedded in composites; It is desirable to establish, based on the above focus areas, the most applicable interrogation scheme and any identify relevant limitations in either FBG technology itself or the interrogation technique. This foundation will at minimum expose a clear development path to optimize for cost, and may potentially reveal opportunities for a more novel interrogation system leveraging

26 optimizations originating from the specific WTB application. Specific papers regarding implementations or lab experiments using particular sensor schemes or interrogation techniques have been integrated throughout this thesis where appropriate. The next chapter identifies these techniques, sets selection criteria, and selects an appropriate technique for the WTB application.

27

Chapter 3 – Optical Interrogation Techniques This chapter documents the initial research into FBG optical interrogation, performed in order to identify the most appropriate interrogation technique for WTB applications. Relevant publications are also identified and considered. Fundamentally, the problem of detecting strain in an FBG sensor is a problem of measuring deviation in the optical signal’s center wavelength. This is true for the case of uniaxial, periodic FBG sensors in single mode fiber. The reflected optical signal from a uniaxial FBG strain sensor in this case exhibits a distribution over some narrow band of the optical spectrum (typically 0.3nm) according to the Airy function (Zhou, Graver et al. 2003). When strained, the optical peak shifts in center wavelength but exhibits roughly the same spectral shape, so if this deviation can be measured then the strain in the optical fiber can be resolved. (Yu and Yin 2002) The interrogation system, therefore, must be capable of detecting the optical power over some narrow optical spectrum band. A number of techniques are considered, ranging from classical optical diffraction to active optical spectrum scanners based on MEMS devices. As the FBG strain sensing technology has already been selected, the next fundamental issue to be resolved is the type of interrogator to implement. Interrogation systems have been a topic of research since the early 1990s and Kersey summarizes those efforts through 1996 in a field survey paper. The author identifies four major interrogation strategies for use in sensing instrumentation: edge filtering, scanning filters, interferometric detection, and direct

28 spectroscopic (diffraction-based) detection. Edge filtering exhibits low sensitivity, and interferometric detection is considered useful for dynamic, but not static, detection. Direct spectroscopic detection based on CCD sensor arrays is dismissed due to the inadequate 100-300pm resolution of the detection scheme, though algorithms have been tested that increase the resolution by approximately 100x (Kersey, Davis et al. 1996).

Classical Optical Approaches The most straightforward method of breaking light into its separate components is by optical diffraction. In this technique, the source light is incident on a diffraction grating, breaking the light into a continuous band of spatially distinct wavelengths. The resolvance or “sharpness” of the diffracted light is a function of the grating geometry and incident angle of the light on the grating. The figure below illustrates the basic principle.

Grating Rotation Axis

Incident Light (from sensors)

Masked Light Grating Mask

Photo Detector

Figure 6. Simple grating monochromator illustration.

A monochromator is realized as illustrated above by diffracting and masking the source light to obtain some narrow wavelength component of the source. Adjusting the incident angle of the source light with respect to the grating may be accomplished by rotating the grating about a vertical axis through its surface and through the point on which the source light is incident, such

29 that the distance from that axis to the mask is constant through the rotation range. Of course, the mask and photodiode may be actuated in place of or in addition to the grating with similar effect. Optical power transmitted through the mask is detected by the photodiode, and by scanning through some grating angle the power spectrum may be measured. Instrument resolution is dependent on the width of the mask opening, but is also influenced by the grating geometry, source wavelength, and incident angle of the source light. To assess usefulness of the classical grating-based monochromator in the FBGIS system, some initial design parameters should be fixed. Resolvance, a measure of the ‘clarity’ or ‘sharpness’ of the diffracted light, is determined from the incident area on the grating surface. This system-level property presents a tradeoff between optical power and resolution. The minimum resolvable change in wavelength Δλ at some wavelength λ is defined in terms of the grating resolvance R as

Δλ =

λ R

and the resolvance also is defined as

R = mN where m is the order and N is the number of illuminated lines on the grating surface. A common low cost grating with good line density provides a = 600 lines/mm and appropriate blaze angle.5 The approximate minimum detectable change in wavelength Δλ around λ = 1500nm for a 1.0mm incident beam diameter (via a collimator) is

5

Part Number GR13-0616 from ThorLabs (www.thorlabs.com)

30

Δλ =

λ

mN 1550 × 10 −9 = 1 ⋅ 600 = 2.58nm

A resolution of one microstrain is desired, and typical FBG strain sensors provide 1.2pm/με sensitivity (optical wavelength per strain); the minimum detectable change in wavelength should be on the order of 1pm. Clearly the simple diffraction grating is not adequate for the required sensitivity. Special optics may be used to increase the resolvance, but a 3 magnitude-of-order decrease in discernable wavelength delta by optical means is not practical within the domain of this research. Special signal processing algorithms, however, have the capacity to address the issue (Li, Guo et al. 2006). Practical aspects of a grating-based approach, including mounting and alignment issues, were investigated as a validation to the expected performance limitations discussed previously. A 600 line/mm grating was used with a 1310nm laser source and 1mm diameter optical collimator. A PDA400 photodiode from ThorLabs with integrated amplification was used to measure diffracted light levels and investigate the effect of varying the photodiode entrance slit width. The photodiode amplifier was set to highest gain (x150,000) and was positioned 110mm from the grating surface. The photodiode, with a responsivity of 0.83, provided a measure of optical power in the spectrum passed through varying slit widths. Laser line width is specified by the manufacturer at approximately 0.05nm. The following raw data was measured to determine alignment sensitivity of the laser beam using the collimator without a grating.

31

0.035

0.03

0.025

0.02 Optical Power (mW) 0.015

0.01

0.005

22.8 22.5 22.2 Deviation X (mm)

0

21.9

7.5 8

21.6

8.5 9

Deviation Y (mm)

9.5

Figure 7. Misalignment Sensitivity of the Photodiode and Collimator.

The figure above illustrates the sensitivity to misalignment in mounting technique. To retain approximately 90% of the signal strength, the alignment must be within approximately 0.25mm of the critical centerline. This presents a challenge from both a manufacturing and thermal control perspective; if the mounts have metal supports, it is conceivable that thermal expansion in the metal may throw off alignment and require re-calibration. Also note that this test was performed without a slit mask. All of the light from the beam (of diameter 1mm) was allowed to fall on the photodiode’s surface (approximately a 1mm square). In practice, a slit mask is required to obtain a relatively narrow spectrum of light, further sharpening the curve and increasing misalignment sensitivity. To determine the effectiveness of the simple grating monochromator in resolving wavelength, some simple assumptions may be made regarding the geometry of the setup. Considering a detector slit width of 1mm and distance between detector and grating of 100mm, the remaining parameter to be determined is the desired resolution of the instrument. As a starting point, assume that the resolution is 0.1nm. For the mounting distances given, the angle that 0.1nm

32 subtends would necessarily be Δθ = 1mm / 100mm = 1 / 100 rad (or 0.572 degrees). This gives a required grating dispersion of 0.1nm / 0.01rad = 10 nm/rad. The grating pitch L is 1667nm for a 600line/mm grating surface, and optical wavelength in the final application spans 1525 to 1600nm for typical C-band FBG sensors. The grating equation for these parameters provides the diffracted angle at 1525nm and 1600nm to be 1.155rad (66.20°) and 1.287rad (73.74°), respectively. This gives a dispersion rate of 75nm / (1.287-1.155)rad = 568 nm/rad (9.9 nm / degree), which is approximately six times too large for our target resolution. Adjusting the incident angle on the grating improves the angular dispersion, but to achieve the target dispersion requires an incident angle within one degree parallel to the grating surface, which is not practically implementable. A simple experiment was conducted to investigate these effects, including that of slit width on the light power levels. The following graph illustrates the photodiode response sensitivity to slit width.

33

1ST ORDER 1310 nm Laser Spectrograph with Varying Slit Widths d ~ 150mm, theta ~ 55°, P=1.5mW, 600L/in grating 2.0.E-03 1.8.E-03 1.6.E-03 1.4.E-03

0.30 mm Slit 0.20 mm Slit 0.15 mm Slit

Power (mW)

1.2.E-03 1.0.E-03 8.0.E-04 6.0.E-04 4.0.E-04 2.0.E-04 0.0.E+00 1316

1316.2

1316.4

1316.6

1316.8

1317

1317.2

1317.4

1317.6

1317.8

1318

Approx. Wavelength (relative to measured center frequency)

Figure 8. First order response of Grating Monochromator and PDA400 Photodiode.

The results of this experiment demonstrate that a clear reduction in optical power is observable by reducing the slit width. The slight deviation in center wavelength may be attributable to slight hysteresis in the linear stage due to the manually-actuated micrometer. A slight broadening effect of the signal presumably due to the resolvance of the grating is also identifiable. The laser line width is specified as approximately 0.05nm, while the detected line width at FWHM is approximately 0.20nm. It is concluded from these basic grating experiments that both mechanical sensitivity and overall achievable resolution prohibit the high level of accuracy and repeatability required in this WTB interrogation application. Previous research has attempted a similar grating-based detection scheme using a 1200 lines/mm grating and photo detector array instead of a single photodiode. Askin et al. implemented a

34 custom spectrometer using a collimator to generate a plane wave incident on the grating. The reflected signal was spatially oriented to illuminate a 1024-element linear CCD array with 2mm x 25μm pixel dimensions. Resolution of the spectrometer subsystem due to the experimental setup was limited to 130με per pixel, but a simple averaging algorithm provided resolution up to 1με (Askins, Putnam et al. 1995). While the reported resolution meets the needs of WTB health monitoring, the mechanical precision required to implement the optical subsystem (alignment of the grating, CCD, collimator, and optical source) is prohibitive from cost and reliability perspectives. Just recently a team from China implemented a similar grating-based system with more advanced optical components (Li, Guo et al. 2006). A more sensitive indium-gallium-arsenide (InGaAs) photodiode array was used with a curved diffraction grating to focus the diffracted light strategically on the grating. The team reports very good accuracy but low resolution (no number is published but graph data suggests approximately 0.04nm), as expected with grating-based spectrum analyzers. Again, the experimental setup suffers from extremely precise requirements for spatial alignment of the optical elements and in this case includes a motorized stage. One unique aspect of the research, however, involved the elimination of a thermoelectric cooler on the broadband light source by turning down the source power; the extremely high sensitivity of the InGaAs array allows the relatively low optical power to be successfully detected with an adequate SNR of 30dB. Though it is certainly possible to construct a diffraction grating-based monochromator in a number of ways with adequate resolution, a high degree of accuracy is required and therefore these techniques are not suitable for the application at hand.

35

Mechanically Tuned Optical Filters Instead of mechanically steering the actual optical signal, it is possible to mechanically tune an optical filter to directly select some particular narrow band of the source signal and measure its intensity. While there is still a spatial dependency in this scheme, it is typically a onedimensional parameter and therefore may be easily regulated. A number of off-the-shelf tunable optical filters are composed of a Fabry-Perot etalon and some high precision linear actuator. Typically, for sub-nm wavelength tuning, a piezo actuator is used with a flexure stage to produce highly accurate, repeatable, and mechanically stable displacements. An optical filter element, being possibly a Fabry-Perot etalon or a temperaturecontrolled FBG, spans some gap in the flexure stage, and when actuated a strain is induced which tunes the center wavelength of the optical filter. These stages exhibit high precision but must be driven with high (>100V) potentials and are also cost prohibitive (>$5,000). One stage with 300um travel provides closed-loop positional accuracy of <10nm which, when used with a 1cm long fixed FBG filter, can tune to an optical resolution of approximately 1με.6 This performance, combined with a natural mechanical frequency of 300Hz (due to the high stiffness flexure stage) and +/- 15nm repeatability, meets some performance requirements of the FBGIS. The cost and voltage drive requirements, however, prohibit its use for this low cost, embedded application. Furthermore, they are inherently mechanically sensitive and may not be suitable for the dynamic environment of wind turbine hubs or blades. Other mechanically tuned filters rely on a fiber Bragg grating as the tunable element and strain the grating to tune the center passband. One of the simpler implementations of this technique was demonstrated by Goh using a simple FBG mounted to a flexure beam and a micrometer screw.

6

Part number P-783 from Physik Instrumente (PI) GmbH & Co. KG

36 The assembly was tuned manually (but could potentially be automatically tuned using a linear actuator) to achieve a 90nm overall tuning range from 1634 to 1544nm (Goh, Moktar et al. 2003). Goh notes that silica fiber is 23 times stronger in compression and therefore the compressive mode is a more desirable for straining the fiber; the reported device uses a combination of tensile and compressive strain to achieve the wide tuning range. A previous design with similar principle (Goh, Set et al. 2002) implemented the beam bending technique but did not integrate the tension-mode mechanism and only achieved up to 50nm tuning range. Such a simple device is attractive due to its low cost implementation, but it is inherently mechanically sensitive and therefore is not suitable for harsh, dynamic environments frequently encountered in wind turbine installations. Furthermore, the device requires temperature regulation and a suggested implementation is not addressed in either of the two papers; the devices are likely intended for static telecom applications and not dynamic environments. A third option when constructing mechanically tunable optical filters is piezo actuators. Piezoelectric transducers (PZT) generally have excellent accuracy and extremely high actuator force albeit over a very limited linear stroke length. Installing the actuators around a fiber Bragg grating allows a highly responsive, highly accurate technique for straining the grating. Such a device was prototyped (Inui, Komukai et al. 2001) and exhibited a tuning sensitivity of 0.2nm / V and total tuning range of 10nm. While the strategy provides a mechanically stable implementation and relatively low voltage (50V) operation, the tuning range is limited. Stacking actuators in series increases the stroke length but also increases risk of damaging the already precarious actuators. The scanning filter technique was identified as the primary candidate technology because of its relative ease of implementation, flexibility, and the straightforward algorithms needed as relevant to the WTB application. A number of different scanning technologies ranging from obvious to highly creative have been reported. Lee and Jeong summarize more recent developments in

37 interrogator technology in Section 7 of Yu’s edited text (Yu and Yin 2002) on Fiber Optic Technology.

The MEMTUNE Tunable Optical Filter While flexure stage actuators and FBG-based tunable filters meet resolution requirements for a suitable tunable optical filter, their cost and/or mechanical sensitivity prohibits use. Similar in principle to the flexure stage / Fabry-Perot etalon device described previously, a MEMS-based Fabry-Perot etalon promises the same positional accuracy with increased natural frequency and decreased overall unit cost due to the high level of integration. The MEMTUNE7 product is such a device. The product is a single confocal-cavity Fabry-Perot etalon with integrated electrostatic actuator to adjust the gap between the etalon plates, and includes a thermoelectric temperature regulation device and feedback thermistor. With only a 20V drive voltage requirement and coverage of the entire C-band, the device meets the needs of the FBGIS including packaging constraints and low cost (<$1000). However, the device is not actively being produced and remains the IP of Bookham Corporation. The decision to use the MEMTUNE product was based on a primary goal of this research: demonstrate a FBG interrogation system with adequate performance that can be produced for relatively low cost. In production volumes, the business case to produce the MEMTUNE product again may be justified. There exist a number of critical parameters in the MEMTUNE device as it is a complex, dynamic opto-mechanical machine that is sensitive to a number of external inputs. Straightforward properties include its voltage-tuning wavelength sensitivity, temperature sensitivity, and dynamic bandwidth. Surprisingly, an important characteristic of the device is the limit of optical tuning

7

The MEMTUNE device was originally designed and manufactured by startup CoreTek, acquired by Nortel Networks in 2001 and finally sold to Bookham in 2005.

38 stability due to both thermal noise and radiation pressure (Tucker, Baney et al. 2002). The team extracts a number of other properties from simple static testing and determines the thermal noise and radiation pressure effects based on these estimates. Table 5. Experimentally derived properties of the MEMTUNE device. Property

Value

Unit

R

0.99979

F

1.5 × 104

FSR

30

THz

v-3dB

2.0

GHz

km

2.32

N/m -12

m

3 × 10

Rm

4.9 × 10-6

ω0

140

kg

kHz

The table above identifies the mirror reflectivity R, finesse F, free spectral range FSR, passband 3-dB bandwidth v-3dB, mass m, damping constant Rm, and natural frequency ω0. Based on these values, Tucker et al. estimate the effect of thermal noise on the tunable filter passband. For high finesse filters, the thermal noise significantly increases optical loss and widens the filter bandwidth. Separately, the effects of radiation pressure were bounded and demonstrated that the overall effect induces hysteretic behavior over the tuning curve, and is equal to the force from thermal noise when the optical power in the cavity Pin = 3.6μw. Also, the effect of radiation pressure can be interpreted to induce a gain on the natural frequency of the mechanical tuning system. Particular attention should be paid to minimize the optical power level in the etalon cavity while still maintaining an adequate level for detection with a low cost photodiode.

39

Chapter 4 – Interrogator System Design This chapter documents the overall design goals, performance tradeoffs, and component selection process during the design phase of the fiber Bragg grating interrogator system (FBGIS). The design detailed in this chapter implements an optical spectrum scanner and embedded digital signal processing hardware to create a self-contained interrogation unit.

Design Goals The following table presents the design goals for the interrogator system. Goals are enumerated and assigned a priority (one to three indicates high to low, respectively). These design goals were identified by the sponsor, Sandia National Laboratories Wind Energy Group, as priorities during discussions regarding the interrogator’s high-level design. A best effort was made to meet each of the goals or accommodate upgrades to meet goals in future hardware or software revisions. Table 6. Interrogator System Design Goals.

ID

Goal

Priority

Description

G1

PERFORMANCE

G1.1

Minimum 10Hz Sampling Rate

1

Required for 1 Hz sampling on 10 distinct FBG sensors.

G1.2

Minimum 10με resolution

2

Necessary for good strain sensitivity and repeatability analysis

G1.3

Realtime performance

1

No post-processing of data required

G2

USABILITY

G2.1

Off-board PC User Interface

1

Necessary for in-field configuration and data logging.

G2.2

Small Form Factor

2

Compact size for easy mobility during testing. An intermediate form factor between lab prototype and production, suitable for demonstrating the packaging of the system and also accommodating the servicing needs

40 of a prototype instrument. G2.3

Integrated User Interface

3

Convenient for stand-alone operation.

G2.4

Auto Calibration Routine

3

Convenient when connecting to different FBG arrays

High Level System Design The overall interrogator system architecture is presented in the figure below. The system has three major subsystems: the DSP Interface, Optic Interface, and User Interface. Each has its own custom printed circuit board (PCB) and is powered by a common 5V DC supply. The subsystems are capable of communicating with each other over the Controller Area Network (CAN) 2.0B protocol, allowing for future expansion as well as increased reliability. The entire system was packaged into an off-the-shelf 3U rack-mount chassis.

Figure 9. Interrogator System Block Diagram.

41

Digital Signal Processor Interface Overview The Digital Signal Processor (DSP) interface subsystem is responsible for processing the optical signal and calculating a strain value in real time. This is the subsystem that also communicates with the PC user interface to provide continuous data streams for configuration and data logging. The core of this subsystem is the Texas Instruments TMS320F2812 (F2812) digital signal processor. For prototyping purposes, a F2812 development board was used as it provided the fastest processor bring-up time. A custom carrier PCB was designed to provide a number of application specific functions, including serial communications for data logging, programmable analog outputs for signal monitoring, a CAN communications interface, a photodiode and amplifier circuit for optical power measurement, and a high speed communications interface to the Optical Interface subsystem. The DSP Interface PCB assembly is mounted on the base plate of the rack-mount enclosure and includes the appropriate optical and electrical connectors to interface directly with the other two subsystems.

Optical Interface Overview The optical interface provides a mechanical, optical, and electronic interface for the optical components in the system. Required electronic support functions for the optical components are also provided. Two core optical components enable the optical spectrum scanning functions: a MEMS-based tunable optical filter, and a C-band superluminescent diode (SLD). Each of these components requires temperature regulation, and the SLD requires a high precision, low noise current source. This functionality was included on the custom Optical Interface PCB. Provisions for microcontroller monitoring of the device temperatures and SLD current were integrated.

42 Furthermore, software configurable temperature and current set points were provided for the respective optical components. Jumpers on the PCB were provided to set the controller inputs with a resistive voltage divider in the event that the noise from the D/A converters was too high. Mechanically, the system includes a fiber management system and an off-PCB circulator housing for robustness. The Optical Interface subsystem is mounted to the lid of the rack mount enclosure.

User Interface Subsystem The User Interface (UI) subsystem provides an on-board graphical interface to the instrument operation. Features for auto-detection, calibration, manual overrides, data logging, and real-time graphical monitoring were designed. A single Freescale HCS12DJ256B microcontroller was used to drive two graphical LCD screens and monitor eight pushbutton inputs. Provisions for panel-mounted indicator lights were also accommodated. A comprehensive user interface provided most of the functions available in the PC-GUI. A few screen designs of the user interface are provided below for reference. Menus are driven from the four mechanical soft keys described previously, corresponding to the four tabs at the bottom of the screen.

Figure 10. On-board LCD display example.

Note that the UI subsystem was fully designed but not implemented at the time of this report.

43

Mechanical Design The FBGIS instrument was first designed entirely in a Computer Aided Design (CAD) program before parts were procured or manufactured. The enclosure, mounting systems, heat sinks, user interface, and printed circuit boards were all pre-defined to ensure ease of assembly and reduce the number of prototype revisions necessary. The following figure illustrates the FBGIS exterior packaging. Overall package dimensions are 481mm x 86.8mm x 203.7mm; see Appendix II for detailed exterior drawing and dimensions.

Figure 11. FBGIS Exterior Packaging & Interface Features.

The front panel features a number of connectors and user interface components. From left to right, the front panel includes two serial ports for data acquisition, a CAN port, a PC GUI port, two programmable analog output monitors, a control and configuration monitor, a realtime data monitor, the sensor optical connector, and a power switch. Furthermore, panel-mount indicator LEDs controlled by the User Interface Subsystem give the system operator intelligent feedback about the state of the system. Both user interface graphic displays provide four ‘soft keys’ directly underneath, corresponding to a custom-designed on-screen menuing system. The keys include LED indicators and are software controlled for enhanced usability.

44 A heat sink is visible on the top of the enclosure. The aluminum heat sink has direct thermal contact with both the MEMS tunable optical filter and the SLD. Thermoelectric Peltier-type coolers embedded in both optical components need a heat sink to operate properly, and the combined heat sink provides a low resistance path for heat to exit through enclosure to ambient.

Figure 12. CAD Model of Interior FBIGS Components.

From the interior CAD model view presented above, all three custom PCBs, the user interface and the AC power supply mounting locations are visible. A fan and power entry module are used to provide power to the on-board 5V 6A AC/DC switching power supply that powers all devices in the enclosure. Though the power supply is a relatively low cost device and as such has poor

45 switching noise parameters (on the order of 50mV P-to-P) the system seems to be insensitive to these periodic supply noise spikes. A high current linear regulator was used in place of the switching supply to test sensitivity, and no observable change in output characteristics was observed.

Digital Signal Processor Interface Detail The primary function of the DSP Interface is to measure the optical signal input, execute realtime signal processing on that signal, calculate a strain value based on the processed signal, and finally output the data in some usable format suitable for acquisition.

Embedded Digital Signal Processor It was clear at design time that an embedded processor with DSP capability was required, as the system design goals called for low power operation and realtime performance. Other requirements, based on overall system design goals, are formally documented and assigned hierarchical IDs in the following table. Table 7. DSP Processor Selection Criteria

ID

Goal

Priority

Description

G1.3a

Minimum 100Mhz CPU Clock Speed

1

Minimum processor speed to achieve realtime scans at 10Hz; required for Interrogator System Design Goal G1.3

G1.3b

Minimum 16k RAM

1

Minimum RAM available to execute signal processing algorithms; required for Interrogator System Design Goal G1.3

G1.3c

Integrated UART Peripheral

2

Required to provide data logging capability, communication with PC GUI; required for Interrogator System Design Goals G2.1, G2.3

G1.3d

Integrated SPI Peripheral

1

Necessary to interface with high speed DAC for flexible tunable filter interface

The processor selection process was not exhaustive because a particular embedded DSP from Texas Instruments immediately seemed a perfect fit for the application. The F2812 DSP was chosen as the core of this subsystem because of its relatively fast 150MHz internal clock speed,

46 ample flash memory, royalty-free real time operating system (RTOS) and compatibility with a production integrated development environment (IDE) Code Composer Studio. The processor also includes a number of peripherals that met potential performance requirements for both prototype and production versions of the FBGIS: an integrated CAN 2.0b communications controller, a high resolution PWM port, serial communications hardware, integrated 16-channel 12-bit A/D converter, and an advanced timing and event infrastructure. See Appendix I for device datasheet. The integrated CAN 2.0b peripheral provides a communication interface to other intelligent devices inside and outside of the enclosure. Any communications strategy between the DSP Interface, Optical Interface User Interface and external CAN devices is possible if CAN ports are present on each device. Currently the system sets the CAN baud rate at 250kbps, though up to 1Mbps rates are possible if necessary. For example, it is intuitive for the user interface to issue a ‘scan’ command to the DSP Interface, at which time a query is sent from the DSP Interface to the Optics Interface asking if the optical devices are stable. At startup, for instance, the temperature must be regulated to exactly 25.0C on both devices before operation can be allowed. The Optical Interface provides the ‘OK’ signal and the DSP executes a scan. Finally, the resulting strain is calculated for that sensor and sent back to the User Interface for display. Having a bussed communications interface provides the most flexible platform for prototyping, servicing, and future upgrades and accommodates this type of host/client communications strategy. Integrated PWM peripherals allow on-chip PID regulation of the optics temperatures and potentially even current source if the system were re-packaged as a single module. With this architecture the processor would be responsible for not only the DSP functions, but also the system-level coordination and optical support functions. A separate application of the PWM port

47 would be to generate analog signals (via R/C filters and a buffer) for the two output monitors. In the design implemented for this thesis, however, these peripheral functions were off-loaded to external microcontrollers and accordingly the PWM port was not used. The integrated A/D port is useful for a number of reasons when compared with an external A/D solution. The peripheral features an 80ns conversion time, which allows a theoretical maximum sampling rate of 12.5MHz. This speed is more than adequate for the desired overall strain sampling rate of 10Hz using 2048 analog samples per sensor signal. Furthermore, the device peripheral features integration with the Event Manager (EVM) peripheral; the A/D converter can be triggered from a clock source in the EVM to obtain a perfectly periodic conversion period. While the ADC peripheral converts the analog value, the CPU is free to perform other actions. For a 150MHz CPU, each instruction takes 6.7ns and therefore up to 12 CPU instructions can be executed during each conversion. If written properly, an algorithm could take advantage of all these functions. Note that significant implementation issues were encountered when attempting to use the onboard A/D converter to measure the photodiode’s response. A document in Appendix B details the issue; the response from TI stated that the device was operating as intended and that the problem was in my setup. To date it is not clear what the source of the A/D problem was, so a last-minute off-board isolated A/D converter was designed and prototyped. A final feature of the F2812 was its compatibility with the Mathworks RealTime Embedded Workshop family of products. Control algorithms can be designed in Simulink, leveraging onchip peripherals, and sent directly to the silicon for autonomous execution. This toolchain provides excellent organization and human readability to an application, but fundamentally limits the ultimate performance of the system due to the overhead introduced. Having this option, however, was a good backup plan at the time in the event that the Code Composer Studio toolchain was not adequate.

48

External Communications Transceivers The FBGIS includes two RS-232 communication ports and a single CAN communication port. Both standards require external hardware transceivers to properly condition the signals according to their respective protocol specifications. Both SCI channels on the F2812 were buffered by the MAX3232 dual channel RS-232 transceiver. The chip features 3.3V operation, which is required to interface with the SCI peripheral. Each COMM port (A and B, as labeled on the enclosure) are connected directly to the MAX3232.

Figure 13. RS-232 Transceiver Circuit.

The CAN peripheral on the F2812 is buffered using the SN65HVD230 transceiver. Again, this IC provides a 3.3V I/O interface so that intermediate level translators are not necessary. The CAN protocol is a bussed protocol (unlike RS-232) such that multiple nodes can be attached to the same two physical wires. Communication arbitration is performed by the F2812 CAN peripheral, and communication is realized through a message passing architecture. Every devices on the CAN bus requires a compatible transceiver.

49

Photodiode and Amplifier The photodiode circuit is a critical component of the FBGIS, and is responsible for converting incident light to an electrical current. That current, on the order of 10nA, must be converted to a voltage and amplified in order to be measured with a standard A/D converter. The PD100 photodiode from Anadigics was selected because the devices were already on hand and had suitable sensitivity in the wavelength band of interest. The following table summarizes the photodiode’s characteristics. Reference the appendix for the full datasheet. Table 8. PD100 Electrical Specifications (from Anadigics Datasheet).

Property

Min

Max

Units

5

20

V

Dark Current

0.2

2.0

nA

Capacitance

1.2

1.3

pF

Operating Voltage

Typ

Notes

Responsivity

0.85

0.9

A/W

at 1550nm

3dB Bandwidth

2.0

2.2

GHz

50Ω

Optical Return Loss

40

45

dB

The most important characteristic for selecting a diode is the responsivity. The overall gain required to use the ADC peripheral on the DSP is a function of the responsivity of the photodiode to incident light. The amplifier circuit is composed of a transimpedance amplifier and a non-inverting gain amplifier. The full circuit is shown below for reference.

50

Figure 14. Photodiode amplifier circuit.

The two stages may be considered separately in the amplifier circuit for analysis purposes. Photodiode D5 forces a current to ground when light is incident. Because the capacitor is not populated on the PCB, this current is sourced only from the output of U5B (pin 7) and through R15. The non-inverting input of the op-amp is tied to ground. The output of the op-amp is then forced to generate a voltage such that the drop across R15 due to the photodiode current forces the inverting input to zero volts. The second stage implements a simple non-inverting gain amplifier.

High Speed Communications Interface A serial peripheral interface (SPI) link is used to communicate directly between the F2812 and the D/A converter used to drive the tunable optical filter. Other protocols cannot be used because they are not fast enough to support the high update rate required for realtime performance. The SPI peripheral on the F2812 can transfer data at a clock rate of up to 10MHz. Each clock pulse corresponds to a bit transfer, and sixteen bits are required to set the D/A converter output voltage. Thus, the maximum update rate of the DAC is 625kHz. Specific design parameters for the DAC are discussed in the Optical Interface Detail section; reference the appendix for full schematics.

51 Both the DSP Interface and Optical Interface have identical RJ-45 style electrical connectors, commonly used for Ethernet, and are connected via a standard CAT-5 Ethernet cable. This standard was chosen because Ethernet uses similar communication frequencies as SPI, and is shielded for noise immunity. The components are also very low cost because the cables and connectors are mass produced. Any signal on the order of 10MHz, such as the SPI protocol used on the F2812, requires special attention when laying out PCB traces. Trace impedance and crosstalk are the primary contributors to a degraded digital signal. Special attention was paid to the PCB layout on both the DSP Interface PCB and Optical Interface PCB to ensure proper noise shielding. Larger width traces were used to reduce overall impedance, though the optimal trace width was not calculated.

Figure 15. PCB Trace Layout for the SPI signals.

The SPI signal source, toward the left side of Figure 15, is a standard 0.1” header from the DSP development board. Between each trace from the source to the RJ45 connector on the right hand side is a grounded copper plane. These conductive areas are connected directly to the shield of the Ethernet cable, providing optimal noise shielding directly from the source. Four test points are also included for ease of debugging; oscilloscope probes clip on to easily inspect the SPI waveform integrity.

52

Analog Output Monitors Two BNC-style coaxial connectors are mounted on the DSP Interface PCB for convenience. Instead of using either of the user interface solutions, the end user can simply monitor the strain on any FBG sensor as an analog output and capture the data with standard analog data acquisition hardware. Also, if a reference strain gauge is being used to test FBG sensors, both the reference gauge and FBG sensor output can be viewed at the same time with an oscilloscope.

Figure 16. Analog Output Monitor Circuit.

The analog outputs are generated with two 16-bit D/A converters and buffered with a gain stage, and sent through a low-pass filter for switching noise reduction. The F2812 processor sets the output of the D/A converter, if enabled, to a value corresponding to a particular strain gauge measurement. Each of the analog output monitors is able to monitor any single FBG sensor, and that mapping is set with either the PC or on-board user interface.

53

Figure 17. DSP Interface PCB and User Interface PCB.

Packaging The DSP Interface is implemented as a single carrier PCB for the TI ezDSP F2812 development board from Spectrum Digital Corporation. The carrier board includes the signal conditioning and mechanical mounting requirements for proper operation of the DSP. Special electrical connectors were used to elevate the development board to fit both the optical FC/PC photodiode and the RJ45 jack underneath. This design decision was made to keep both components in closest proximity to the PCB to avoid high frequency noise issues generated with long PCB traces.

Optical Interface Design Detail The Optical Interface is responsible for the temperature regulation of the optical devices, reporting of the temperatures on the communications bus, and mounting optical components. The interface is implemented as a single PCB with both electrical and mechanical features. A picture of the PCB is given below for reference.

54

Figure 18. Optical Interface PCB.

The MEMTUNE device is mounted towards the top of the PCB and uses two special-purpose mounts for electrical and mechanical connection. The PCB area underneath the device is removed to accommodate the small aluminum heat sink. The superluminescent diode (SLD) is in the middle of the board and includes a large aluminum heat sink. The three square devices in line on the right side of the board are the MEMTUNE temperature regulator, the SLD current regulator, and the SLD temperature regulator. They are off-the-shelf devices from Wavelength Electronics and provide all-analog closed-loop control. The two large black plastic semicircular structures are custom machined optical spools that carry excess slack from the tunable filter pigtails. An on-board D/A converter controlled by an SPI input from the DSP generates the voltage, which is amplified with a simple non-inverting op-amp circuit to cover the full tuning

55 range of the MEMTUNE device. Two isolated 12V DC/DC converters are electrically stacked to generate a 24V source for the DAC voltage amplifier circuit. An RJ-45 connector on the lower edge of the PCB transmits the 10MHz SPI signal between the DSP (offboard) and the D/A converter at the top of the board as described in the DSP Interface Detail section. Finally, a microcontroller (not soldered at the time of the photo, but presently implemented) interfaces to the three Wavelength Electronics controllers. The microcontroller is connected using SPI (a separate SPI bus than the DAC SPI) to three separate external D/A converters and amplifiers. The converters generate three voltage setpoints, one each for the two temperature controllers and one current controller. Because the microcontroller is also connected to the common CAN bus, these setpoints may be adjusted by the user interface PCB or the DSP control system. The microcontroller is also capable of monitoring the feedback from the three controllers. The two thermistors are monitored directly from the MEMTUNE and SLD devices through a highimpedance buffer, and the current to the SLD is monitored with a special-purpose output on the current controller device. These analog voltages are read by the microcontroller and broadcast over CAN at 10Hz for use by the PC GUI. The data can be viewed in realtime or logged with the strain data for characterization of the FBGIS’s thermal sensitivity. The microcontroller is also connected to the two LEDs built in to the RJ45 jack that may be used for debugging purposes.

Tunable Optical Filter The MEMTUNE device is used to select a narrow bandwidth of light when scanning the optical spectrum of interest. Of interest to the DSP application is the nonlinearity of the filter, which is specified from the manufacturer using a 4-th order polynomial fit. The following plot illustrates

56 the transfer function between tuning voltage and wavelength. Note that the test was taken without thermal regulation so an offset from the factory curve is clearly visible.

Figure 19. MEMTUNE factory tuning curve.

The effects of this nonlinearity are directly visible in the following plot, where equally-metered voltage steps are generated and the wavelength shift of the filter is directly observed.

57

Figure 20. MEMTUNE filter response.

Note that the tuning curve has a negative slope. That is, the first scan is centered at roughly 1593nm and successive scans proceed leftward on the plot. Also note the increasing spacing between each scan at higher voltages. This is a direct result of the filter’s nonlinearity. A software lookup table compensates for the effect with a 256-point linear interpolation of the tuning curve. The D/A converter driving the tunable filter has a specified settling time of 1μs. While investigating possible noise sources in the FBGIS system, however, it was found that the MEMTUNE mechanics were possibly being excited by some component of the tuning voltage. The effect is evident when observing the passband of the tunable filter under D/A converter control as shown in the following image.

58

Figure 21. MEMTUNE filter noise.

Each peak’s location in sample number is irrelevant as the data is a direct capture of the DSP’s memory contents. Four different voltage setpoints were generated using a simple custom program in the DSP. The filter quality degradation is evident in each step using the first step (V1 = 0.00V) as the reference. The next step at DAC code 8092 (V2 = 2.96V) shows a clear narrowing of the passband and more irregular peak shape. The next scan at DAC code 28672 (V3 = 10.50V) exhibits significant optical noise, and the final scan at V4 = 24.00V shows further degradation. Waveforms for the last two data sets above were the highest quality taken from a number of noisier trials. The experiment was repeated using a lab DC voltage regulator and the noise effects were not present, indicating that the D/A amplifier is the source of the noise. The tuning voltage at 24V was AC-coupled and measured and a 3-7mV RMS ripple was evident, but the ripple was present even at low voltages indicating that a higher frequency component exists at

59 higher voltages. This issue is identified as a major source of total output noise in the FBGIS system, and has not been resolved at the time of this thesis.

Superluminescent Diode A critical system component is the SLD which provides broadband light in the C-band used to interrogate the sensors. The light source should have low ripple, adequate power rating, roughly constant intensity over the range of interest (1500-1600nm) and temperature-insensitive operation. A device from Inphenix was selected for its good power rating of 3mW, a ripple rating of 0.3dB, wide peak power band of 60nm, and an integrated thermoelectric cooler. Operating the device requires two closed-loop controllers addressing both the constant current and constant temperature requirements of the device. The two aforementioned controllers from Wavelength Electronics were selected for the application because of their low cost and immediate availability. The current controller was set to 113mA (verified using the device’s monitor output) and the temperature controller was set to 26 degrees as verified by the integrated thermistor. Note that the current rating of 113mA is significantly lower than the 250mA maximum rating; though the system is insensitive to small variations in optical power a higher power level will increase the SNR.

60

-20 SLD -25

Reflected Sensors

-30

Power (dBm)

-35

-40

-45

-50

-55

-60 1500

1510

1520

1530

1540

1550

1560

1570

1580

1590

1600

Wavelength (nm)

Figure 22. Spectral scan of SLD and FBG array.

The above plot generated with the OSA specifies the SLD power curve over the 1500-1600nm infrared band. Separately, a plot of the six arrayed FBG sensors used in testing is shown and was measured from the reflected SLD light using an optical circulator. The plot shows a total loss from source to detector (not including tunable filter losses) of up to 5dBm, which is not critical for this application.

Firmware and Software Application Detail While the hardware design was a large effort of the FBGIS implementation, the software for all three microcontrollers required the most effort as many functions must work together with hard realtime performance. The main application resides in the DSP Flash memory and provides the actual scanning and signal processing routines along with the basic communications required to export the data to the user interface. The DSP application first initializes its own peripherals and memory, and proceeds to set up the data structures and initializations required to operate the various external peripherals. After configuration of external hardware is complete, a wait-state is induced for approximately ten

61 seconds to allow the optics to settle thermally. Once settled, a prescan routine is performed which automatically detects, enumerates, and calibrates any optical sensors found within the usable optical domain. From that point, the sensors are scanned at full speed subject to the various configuration parameters accessible with the PC-based GUI.

Data Structures A number of structures are implemented in the C language to assist in organizing the multitude of settings, arrays, parameters, and flags that exist in the software. The major data structure is the sensors

structure, which contains the settings, kernel data, and strain data for each sensor. A

graphical representation of the structure is given below for reference.

sensors nSensors tuneV0 tuneV1 tuneV2 tuneV3 tuneV4

fbg[] fbg[0]

fbg[1]

centerWavelength centerPosition zeroStrainOffset coarseStepSize fineStepSize fineWindowSize kernelSize tstamp delta strain

fbg[n]

strainOffset strainNumerator strainDivisor sensitivity startWavelength endWavelength startDomain endDomain enabled

kernelData[256]

Figure 23. Hierarchy of the sensors structure.

At the highest level, the sensors root node holds the parameters nSensors and tune[]. The parameter nSensors is filled at the completion of the prescan() routine and stores the number of detected sensors. At this time, memory is only pre-allocated for a maximum of six sensors; sensors detected after the sixth sensor will be omitted from the scan routines.

62 A child of the root sensor node is the fbg[] array, which holds the data for each detected sensor referenced from zero. For instance, fbg[3] holds the data for the fourth detected sensor. Each fbg element has a child array kernelData which stores the correlation kernel, and a number of properties as summarized in the table below. Table 9. Properties of each FBG element. Property

Description

Min

Def

Max

centerWavelength

Unit

Stores the center wavelength determined during the prescan routine

-

0

-

pm

centerPosition

Stores the center position determined during the prescan routine

-

0

-

DAC codes

zeroStrainOffset

Stores the offset from the start of the kernel scan window to the peak of the measured optical waveform

-

0

-

DAC codes

coarseStepSize

Step size when scanning a waveform in coarse resolution mode

1

32

128

DAC codes

fineStepSize

Step size when scanning a waveform in fine resolution mode

1

1

16

DAC codes

fineWindowSize

Width of the scan window around the area of interest when performing a fine resolution scan

32

256

1024

DAC codes

kernelSize

The number of elements to allocate for the kernel

16

256

1024

DAC codes

tstamp

Stores the time stamp (running 64-bit counter) of when the data was taken. (Not implemented)

-

0

-

Timer cycles

delta

Measured offset of the otpical waveform due to strain

-

0

-

DAC codes

strain

Calculated strain based on the delta and sensitivity parameters; this value is used for data acquisition

– 4096

0

4096

strainOffset

Manual calibration offset used to manually apply an offset to the calucated strain value.

-

0

-

DAC codes

strainNumerator

Numerator of gain quotient applied to measured strain value

-

1

-

-

strainDivisor

Divisor of gain quotient applied to measured strain value

-

1

-

-

sensitivity

Sensitivity of the FBG sensor

-

1

-

-

startWavelength

The start wavelength of the sensor optical domain

-

0

-

pm

endWavelength

The end wavelength of the sensor optical domain

-

0

-

pm

startDomain

The start domain of the sensor optical domain

-

0

-

DAC codes

endDomain

The end domain of the sensor optical domain

-

0

-

DAC codes

με

63

enabled

Set to 1 if sensor should be scanned, 0 if sensor should be skipped

-

0

-

-

kernelData[]

Array of size kernelSize that holds the prescan data used for the kernel during subsequent correlations

-

[0..]

-

ADC codes

The table above identifies the parameters stored for each detected sensor, including the kernel array kernelData[], and their default values. The unit DAC codes refers to the code sent over SPI to set the DAC voltage to the MEMTUNE device. This code has a linear transfer function to MEMTUNE tuning voltage, and can be calculated by simply observing that the overall tuning range is 24V and the DAC code is a sixteen-bit value; the units of the DAC code are 366μV / code.

DSP Initialization and Hardware Drivers At startup, a number of CPU-specific and peripheral-specific registers are configured to a known state in order to reset the DSP to a known condition. An initial configuration routine is called for each of the DSP’s onboard peripherals in use, as listed at high level in the partial code section below. Note that code listings in this Chapter are only sections of larger files. See appendix for full code listing.

retErr initPeripherals(void) { // this function calls the inits of each peripheral driver used in this application InitSysCtrl(); InitAdc(); InitSpi(); InitSci(); InitGpio(); InitPieVectTable(); return ERR_OK; }

Note that the InitSysCtrl() function initializes the RAM timing registers, disables the CPU

64 watchdog, configures the hardware phase-locked loop (PLL) for highest-speed operation, and enables the relevant peripheral clock sources. After completion of the peripheral initialization, the application-specific scan routines are set up. Specifically, the sensor structures are set up and the averaging buffers are cleared. The following code section lists the sensorInit() function which is responsible for setting up each sensor.

retErr sensorInit(sFBG *s) { s->coarseStepSize = DEFAULT_COARSE; s->fineStepSize = DEFAULT_FINE; s->fineWindowSize = DEFAULT_WINDOW; s->kernelSize = DEFAULT_KERNEL; s->tstamp = 0; s->delta = 0; s->zeroStrainOffset = 0; s->strain = 0; s->strainOffset = 0; s->strainNumerator = DEFAULT_NUMERATOR; s->strainDivisor = DEFAULT_DIVISOR; return ERR_OK; }

This function zeros some properties of the sensor structures and sets appropriate default values for others. Default values are located in the dspScanner_globals.c file if the default values require modification.

Prescan Routine After the sensors have been initialized and relevant memory sections cleared, the prescan routine is executed. The prescan() routine is listed below for reference.

retErr prescan(void) { Uint16 Uint16 Uint16 Uint16

oldAdcVal, adcValTemp; i,j; bSize; peak, offset;

sensors.nSensors = 0;

65

adcVal = 0; oldAdcVal = 0; adcValTemp = 0; // ScanKernel writes over global adcVal // scan over entire bandwidth and find any peaks // map each peak to a sensor and fill in structure // jump to start and wait for filter to settle i = PRESCAN_START_INDEX; scanPhotodiode(i, &adcVal); DELAY_US(TIME_SETTLE); for (j = 0; j < SIZE_PRESCAN_AVGBUFF; j++) { scanPhotodiode(i, &adcVal); } for (i = PRESCAN_START_INDEX; i < PRESCAN_END_INDEX; i += SIZE_PRESCAN_STEP) { // move tunable filter to next wavelength scanPhotodiode(i, &adcVal); // check if on rising or falling edge if ( (adcVal >= SIZE_MIN_PEAK) && (oldAdcVal-60 < SIZE_MIN_PEAK) ) { // assume rising edge hit, so search for peak while (adcVal >= oldAdcVal) { // keep scanning for lower value oldAdcVal = adcVal; i+=SIZE_PRESCAN_STEP; scanPhotodiode(i, &adcVal); //adcSampleChB1(&adcVal); } // assume peak is now found sensors.nSensors++; // coarse approximation: sensors.fbg[sensors.nSensors-1].centerPosition = i; sensors.fbg[sensors.nSensors-1].centerWavelength = sampleToWavelength(i); sensors.fbg[sensors.nSensors-1].enabled = SENSOR_ENABLED; // refine the center approximation and store the kernel: scanKernel(&sensors.fbg[sensors.nSensors-1]); } oldAdcVal = adcVal; } for (i = 0; i < sensors.nSensors; i++) { scanKernel(sensors.fbg + i); } return ERR_OK; }

66 This function initially zeros its local variables, resets the tunable filter to the origin position, and waits some period of time (TIME_SETTLE) for the tunable filter to mechanically settle after a potentially large step input. A coarse prescan routine is performed with a DAC code pacing of SIZE_PRESCAN_STEP

ranging from PRESCAN_START_INDEX to PRESCAN_END_INDEX. In all

documented tests SIZE_PRESCAN_STEP was set to 32 and the start and end indexes were adjusted to just cover the expected domain of all sensors. For a production system, these values would be adjusted according to the desired optical domain limited by the MEMTUNE tuning range. Sensor peaks are found using a simple peak-finding algorithm, where a rising edge is detected and an inner then loop executes until a falling edge is found. The position of the peak is marked for later high-resolution scanning and the outer loop continues to search for the next rising edge. Once the entire domain has been scanned, each marked peak is ‘zoomed in’ and scanned at high resolution. It is not possible to store the entire contents of the optical scan domain with the limited amount of memory available on the DSP, but this simple optimization performs without a loss of quality. After each sensor is scanned at high resolution (SCAN_STEP_SIZE = 1) the 256element arrays are stored and used as correlation kernels for subsequent scans. The center DAC code corresponding to the peak of the FBG reflection signal is detected at this time. An interpolated lookup table is implemented to convert the DAC code, based on the D/A hardware gain value and 24V reference voltage, to a corresponding wavelength from the MEMTUNE tuning curve provided by the manufacturer. The code-to-wavelength conversion routine is listed here for reference. Note that Chris Nitta assisted in optimizations of the author’s original algorithm.

Uint32 sampleToWavelength(Uint16 sample) { Uint32 zone, sens, L; int16 Idx = sample>>8; return wavelengthLookup[Idx+1] + (((wavelengthLookup[Idx] wavelengthLookup[Idx+1]) * (0x100 - (sample & 0xFF))) >>8);

67

}

A 256-element array of values interpolates the factory-provided tuning curve in picometers. For the specific MEMTUNE device used during testing those values ranged from 1591300 to 1500293 over the voltage range of 0.0 – 24.0V. The input argument sample provides a 16-bit representation of the DAC voltage which is linear between 0 and 24V (assuming the hardware gain has been tuned properly via on-board potentiometer). The variable Idx represents the highest 8 bits of the value, which directly maps to the 256-value lookup table; the coarse approximation is obtained from a 1:1 correspondence between the DAC code and lookup table. To augment the value with a finer approximation, the lower eight bits are used to interpolate linearly between the obtained coarse value and the next coarse value in the array. After the DAC code is converted to a wavelength and stored in the respective sensor structure, a fine scan of the kernel is performed. The strategy for kernel scanning differs from the normal realtime scan routines as it relies on multiple fine scans and heavier averaging routines.

retErr scanKernel(sFBG *s) { Uint16 i; Uint16 bSize, cSize, cMax, cOffset; // initialize values of sensor // must have already detected 'center position' in *s s->startDomain = s->centerPosition - DEFAULT_WINDOW/2; s->endDomain = s->centerPosition + DEFAULT_WINDOW/2; // scan over the whole domain to find the sensor scanRange(s->startDomain, s->endDomain, s->fineStepSize, &bSize, scanBuff); // find the peak findMax(scanBuff, bSize, &cMax, &cOffset);

s->centerPosition = s->startDomain + cOffset; s->centerWavelength = sampleToWavelength(s->centerPosition); s->startDomain = s->centerPosition - SIZE_MAX_KBUFF/2; s->endDomain = s->centerPosition + SIZE_MAX_KBUFF/2;

68

// the peak is cOffset steps from the start // now zoom in on this area and scan scanRange(s->startDomain, s->endDomain, s->fineStepSize, &bSize, s->kernelData); filterAvg(s->kernelData,bSize,8); s->startDomain = s->centerPosition - (SIZE_MAX_SBUFF * s>coarseStepSize)/6; s->endDomain = s->centerPosition + (SIZE_MAX_SBUFF * s>coarseStepSize)/6; return ERR_OK; }

The sensor structure *s is passed into the scanKernel() routine. The start and end domains of the scan are set by DEFAULT_WINDOW which by default is 4096. Thus, the scan window around the calibration zero of that particular sensor is +/- 2048 DAC codes. This corresponds to a different wavelength span depending on where over the MENTUNE curve the sensor exists. The function scanRange() is called with the start, end, and step size parameters set to obtain a coarse scan of the domain. Once the scan result is returned, the function findMax() is called to identify the maximum value of the detected peak. The location of this maximum value is used to re-center the scan window for a fine scan. The fine scan is performed by again calling scanRange()

with different parameters, and filtered with filterAvg(). The function findMax()

is called again to identify the peak in this new fine-resolution averaged data set. The location of the peak is identified and the domain around the sensor is updated based on this calculation. This routine is repeated for each sensor and, once all sensors have been scanned in fine resolution, the prescan()

routine completes.

The following screen capture illustrates the Code Compute Studio (CCS) integrated development environment (IDE). A tree view list of all project files is on the left hand side of the screen, while the code area and a memory graph are displayed in the main project area.

69

Figure 24. Code Computer Studio (CCS) interface and prescan results.

This screen capture was taken during testing at Sandia National Labs facilities in Albuquerque, New Mexico. The foreground graph displays the prescan results recorded from the off-board A/D converter. Note that the signal to noise ratio is extremely high and that only three of six sensors are visible because of the damaged composite sample. See discussion in the last chapter for further detail.

Sensor Scanning Routine After initializing hardware and executing the prescan routine, the software enters a continuous scanning loop as defined in the partial code section below.

while (1) { if (sensors.nSensors != 0) {

70

for (i = 0; i < sensors.nSensors; i++) { if (sensors.fbg[i].enabled == SENSOR_ENABLED) { scanSensor(sensors.fbg+i); } ExternalUserInterfaceParse(&EUInterface); } } else { while (1); } ExternalUserInterfaceParse(&EUInterface); }

The outermost while() loop runs infinitely, and the nested if() conditional statement checks to see that sensors were actually detected by the prescan() routine. Then, for each sensor i the enabled property is verified. If enabled, the scanSensor() routine is called for that sensor. The process repeats for each sensor forever, or until the hardware is reset. Note that, once each enabled sensor has been scanned, the function ExternalUserInterfaceParse(&EUInterface) is called. This is the function that handles communications transactions with the PC-GUI automatically. Variables identified during the DSP initialization are automatically synchronized over RS-232 to the PC GUI application, and any commands from the PC GUI issued by the user are sent to the DSP. This function requires a nondeterministic time to execute, but only introduces a negligible amount of jitter in the sampling periods of the routine. If needed, the GUI can be disabled by closing the GUI application on the PC, disabling communications within the GUI, or removing the “Continuous Update” options on all variables as discussed in the next subsection.

retErr scanSensor(sFBG *s) { Uint32 correlationMax; Uint16 cSize, cMax, cOffset, fSize, correlationOffset; int16 correlationOffsetS = 0; Uint16 fScanCenter, fScanStart, fScanEnd; // coarse scan of sensor range scanRange(s->startDomain , s->endDomain, s->coarseStepSize, &cSize, scanBuff); // find peak findMax(scanBuff, cSize, &cMax, &cOffset);

71

// set up window to zoom in around peak fScanCenter = s->startDomain + cOffset*s->coarseStepSize; fScanStart = fScanCenter - s->fineWindowSize/2; fScanEnd = fScanCenter + s->fineWindowSize/2; // fine scan scanRange(fScanStart, fScanEnd, s->fineStepSize, &fSize, scanBuff); if(enableFiltering) { filterAvg(scanBuff,fSize,filterSize); } // correlate to kernel scannerCorrelate(scanBuff, fSize, s->kernelData, s->kernelSize, cBuff, SIZE_MAX_CBUFF); if(enableFiltering) { filterAvg32(cBuff, SIZE_MAX_CBUFF, filterSize); } // find ustrain value (x100) findMax32(cBuff, SIZE_MAX_CBUFF, &correlationMax, &correlationOffset); correlationOffsetS = correlationOffset; correlationOffsetS = correlationOffsetS + ((int32)fScanCenter (int32)s->centerPosition) + (((int32)s->fineWindowSize SIZE_MAX_KBUFF) / 2); strain = ( sampleToWavelength(s->centerPosition + correlationOffsetS) - s->centerWavelength ); strain += s->strainOffset; s->strain = (strain * s->strainNumerator) / s->strainDivisor; return ERR_OK; }

The routine above is called for each sensor to perform the optical scan, calculate strain, and store the strain value. Initially, variables are declared and cleared. A coarse scan of the sensor domain is performed to capture a rough estimate of the sensor’s location in wavelength. A scan window is resized around this detected location and a fine scan is performed. This is the scan that is used to execute the correlation, which is called using scannerCorrelate(). The results of the correlation are stored in cBuff, a 1024-value array of 32-bit integers. A separate peak-finding algorithm findMax32() is called to find the peak of the correlation value which gives a direct relative measurement of wavelength delta. When added to the offset of the scan window and

72 converted to wavelength, the strain value may be calculated by subtracting its value form the calibration strain value. Note that an optional gain and offset are applied, and the values (one and zero by default, respectively) are configurable in realtime via the PC GUI. These parameters are useful for debugging, as offset and gain error sources still exist in the system. It is expected that, for this prototype system, a technician calibrates the sensors using a collocated strain gauge for both gain and offset. Note that, due to the fixed-point math optimizations on the DSP, the gain is implemented as an unsigned 16-bit integer numerator and unsigned 16-bit integer denominator. The numerator is applied first, followed by the denominator. Also note that the filtering functions are called only if the variable enableFiltering is nonzero. If enabled, an averaging filter is applied with a running average of size filterSize. Both of these parameters are configurable via the PC GUI and can be used to balance the tradeoff between sampling frequency and noise. By default averaging is enabled with a filter size of sixteen. The correlation routine is worth detailing because it is both a critical function of the DSP algorithm and also a specific optimization area that has bearing on the system’s sampling rate. The correlation routine is a basic routine of the form y = x * h, or y[i] = Σj=[0:M-1] h[j] x[i - j] where y is the output (correlation result), h is the correlation kernel, and x is the scan data. Implementing the algorithm in a fixed-point embedded DSP environment requires consideration of data types and bounds. Both the scan data and correlation kernel are implemented as unsigned 16-bit integers, so their product is within the space of a 32-bit unsigned integer. Accordingly, the results array y is an array of 32-bit integer. Also note that the length of the y array is length(x)-

73 length(h). For a kernel of 256 data points and scan size of 1024 data points, the result array should contain 768 32-bit unsigned integers. The algorithm was first implemented in the Clanguage as follows.

retErr scannerCorrelate(Uint16 *x, Uint16 sizex, Uint16 *h, Uint16 sizeh, Uint32 *cBuff, Uint16 sizec) { //x: signal scan //h: kernel //cbuff: correlation output // want to convolve X with H // going to pad start and end of x with zero's // output y is same size as X - start and end paddings are ignored Uint16 i,j; // zero out cBuff for (i = 0; i < sizec; i++) { cBuff[i] = 0; } for (i = 0; i < sizex-sizeh; i++) { for (j = 0; j < sizeh; j++) { cBuff[i] += (Uint32)h[j] * x[i+j]; } } /* // do the rest for (; i < sizex; i++) { for (j = 0; j < sizex-i; j++) { cBuff[i] += (Uint32)h[j] * x[i+j]; } } */ return ERR_OK; }

Most every DSP has a special instruction (“MAC”) that executes a single multiply and add (or “accumulate”) in one instruction cycle. Note that this process is the core of the nested for() loop in the code above. The compiler in the Code Composer Studio IDE did not take advantage of the MAC instruction when compiling the C code listed above, so the algorithm was hand-coded by Chris Nitta to optimize for execution speed. A number of optimizations were made, past the

74 inclusion of the MAC instruction, to reduce the algorithm execution time to an absolute minimum. The hand-optimized assembly code is listed below for reference.

;retErr scannerCorrelate(Uint16 *x, Uint16 sizex, Uint16 *h, Uint16 sizeh, Uint32 *cBuff, Uint16 sizec) { ; XAR4 AL XAR5 AH SP-4 SP-5 .def _scannerCorrelateA .sect "ramfuncs" .global __scannerCorrelateA _scannerCorrelateA: ADDB SP,#20 MOVL *-SP[18],XAR6 MOVL *-SP[16],XAR7 MOVL *-SP[14],XAR4 MOV *-SP[7],AH ;sizeh MOVL *-SP[6],XAR5 ;h MOV *-SP[3],AL ;sizex MOVL *-SP[2],XAR4 ;x ; InnerLoop = sizeh; MOV *-SP[10],AH DEC *-SP[10] ; ; ; ; ; ; ; ; ; ; ; ;

for (i = 0; i < sizec; i++) { cBuff[i] = 0; ZAPA MOVL XAR6,*-SP[24] MOV AL,*-SP[25] LSL AL,1 MOV *-SP[8],AL DEC *-SP[8] RPT *-SP[8] || MOV *XAR6++,P } OuterCount = sizex - sizeh; MOV AL,*-SP[3] SUB AL,*-SP[7] MOV *-SP[9],AL ; CBuffPtr = cBuff; MOVL XAR6,*-SP[24] ; do{ _scannerCorrelateA_doLoop: ; XInnerPtr = XOuterPtr++; MOVL XAR7,*-SP[14] MOVB ACC,#1 ADDL *-SP[14],ACC ; HPtr = h; MOVL XAR5,*-SP[6] ; Sum32 = 0; ZAPA ; do{ RPT *-SP[10] || MAC P,*XAR5++,*XAR7++ ; }while(--InnerCount); ; *CBuffPtr++ = Sum32; MOVL *XAR6++,P ; THIS MAY BE A PROBLEM, NOT SURE IF ++ INCREMENTS BY 1 or 2 for MOVL ; }while(--OuterCount);

75

DEC BF

*-SP[9] _scannerCorrelateA_doLoop,NEQ MOVL MOVL

MOVB SUBB LRETR

XAR6,*-SP[18] XAR7,*-SP[16] AL,#0 SP,#20

The core of the routine exists within the do loop containing the repeat instruction RPT which repeats the following EMAC instruction sizeh times. Thus, the inner nested loop executes in single-cycle instruction time; for a 256-element kernel, the inner loop executes in just over 256 CPU cycles or 1.68μs. This calculation is repeated length(x) – length (h) times, taking an estimated 1.29ms. Overhead due to register stores and retrieves increases the execution time slightly, and the measured period of the algorithm using an oscilloscope and digital outputs toggled immediately before and after the routine provide a 2.4ms period. The algorithm implemented in C code took approximately 30ms, or over ten times as long. Algorithm efficiency is paramount in DSP applications as calculations are typically looped thousands of times; eliminating a single CPU instruction requiring 6.6ns may lead to a 10% reduction or more in overall sampling time.8 Similarly, the routine for setting the A/D converter and reading the result was optimized in C to reduce the overhead associated with stack swaps from function calls and a further increase in performance was observed. The following chart illustrates the total period as verified after the correlation optimization but before an analog sampling optimization.

8

This estimate considers the correlation routine listed, given that each inner loop executes 262,144 times per strain sample at a 150MHz clock speed with 10ms total sensor sampling period.

76

Figure 25. Strain sampling period timing analysis (T = 25.4ms).

The author expected the correlation routine to require the largest amount of execution time, but noise issues on the SPI data bus combined with higher-latency off-board RAM significantly increased the time required for fine sampling of each FBG sensor. Before the correlation optimization, the total sampling period required over 60ms of which over half were due to the inefficient correlation algorithm. Note that the selection of a DSP with an integrated direct memory access (DMA) controller would allow concurrent sampling of a new data set using the DMA peripheral while executing the correlation algorithm with the CPU. Thus for the case above where the sampling routine requires more time than the correlation routine, the total period is reduced by the correlation time due to this parallelism.

PC-Based Graphical User Interface Detail A custom application (“PC-GUI”) written by Christopher Nitta is used to communicate with the FBGIS and is intended to be the primary interface to the instrument. The software is capable of both realtime data display and data logging using the RS-232 port on a computer.

77 A special-purpose driver was ported to the TI TMS320F2812 DSP by Christopher Nitta implementing the custom GUI protocol with the DSP’s SCI peripheral. Driver configuration is performed during the initialization phase of the DSP application, and a service routine is called after each sensor scan to update the GUI. An important and enabling feature of the DSP is the integration of a 16-byte SCI buffer for both transmit and receive. When sending data from the DSP to the GUI, bytes are loaded into the buffer and transmitted automatically so that the main application is not interrupted. Similarly, when a number of bytes are received in sequence by the DSP SCI hardware, they are stored in the buffer until the service routine is called. In the event of an overflow of either the transmit or receive SCI buffers, the GUI driver drops the corrupted message and waits for the next transfer. This scheme provides the lowest overhead possible when interacting with a host PC through the DSP SCI hardware. At the core of the GUI is a protocol that allows the synchronization of variables between the embedded target (DSP) and host (PC). Variables must be global on the target side, though structures are accommodated. Accordingly, all settings related to the sensors structure are exposed to the GUI so that reconfiguration is possible without re-flashing the DSP. The following screen capture shows some of the exposed variables.

78

Figure 26. PC-GUI screen Capture.

The GUI is graphically composed of a variable list on the left hand side of the screen and a number of configurable pages to organize and display the variable contents. At startup, the GUI displays the variable list and a single blank page. Variables are dragged on the page or graph and displayed in list format. Variables that are read only do not have a ‘Set’ button, while all variables have a ‘Get’ button. The buttons function to set a variable’s contents or get a variable’s contents to/from the embedded target. On each page a ‘Continuous Update’ checkbox is included. This checkbox optionally updates all variables visible on that page continuously using all available RS-232 bandwidth.

79 Pages can be ‘undocked’ so that they separate from the main interface to be arranged to meet specific needs of the user. Shown in Figure 26 above is an undocked page labeled ‘Page 3’ which contains the variables ‘nSensors’ and the enable states of each detected sensor. Graphs may also be created that display any combination of variables on a single axis. Graphs can be updated manually or continuously updated if desired, and may also be ‘undocked’ for convenient viewing in parallel with other data. Variables to be plotted may be dragged onto the graph area and are removed by right-clicking on the variable name in the graph and selecting the ‘Delete’ option. Due to the relatively limited bandwidth of the RS-232 protocol (running at 57600 BPS) only so many variables may be continuously updated at a time. The amount varies due to the bandwidth constraints and the method with which the embedded target handles the GUI requests. For instance, if the embedded target only calls the GUI handler function ten times per second, then the maximum rate that the PC GUI will update will correspond. The GUI also includes a comprehensive data logging feature that is capable of streaming realtime data to a comma-separated value (CSV) ASCII text file. Streaming is available from the ‘Target’ menu and brings up a dialog box to configure the streaming session. A custom filename and path must be entered and the file format may be selected. Two types of data are written to the CSV file: a ‘parameter’ is written only once at the top of the file, while a ‘data’ variable is written continuously as fast as possible. Parameters are useful for marking the state of the system. For example, choosing nSensors as a ‘parameter’ instead of data will display the total number of sensors once at the start of the file and does not need to be re-written to the file each time. Further instructions for the PC GUI are included in the appendix and may be treated as a User’s Guide for the FBGIS.

80

Chapter 5 – Characterization and Testing Results This chapter describes characterization and in-field testing of the FBGIS. Characterization took place at UCD facilities, and the system was tested in-field at Sandia National Laboratories (SNL) in Albuquerque, New Mexico on July 31 and August 1, 2006.

Laboratory Testing and Characterization A number of characterization tests were performed to bound FBGIS performance. Three key parameters were investigated: sensitivity, linearity, and sampling rate. Sensitivity was determined with a separate experimental setup by using the bare fiber optic cable fixed at one end and attached to a precision translation stage at the other. Linearity was determined by measuring induced strain on a fiberglass beam with collocated resistive and optical strain gauges. Maximum sampling rate was determined by measuring the period between consecutive measurement outputs. Additional tests were performed to explore the dynamic performance of the FBGIS. With the sampling rate increased to 90Hz through optimizations in the correlation algorithm and communications routines, the system was tested with a cantilever steel beam vibrating at its natural frequency. Note that further software and hardware optimizations may be executed to increase the sampling rate of the system.

81

FBG Sensitivity Testing Sensitivity was determined by a separate experimental setup using a single fiber with integrated FBG sensor and a precision manually-actuated linear stage. The figure below illustrates the mechanical setup.

110mm Sensor Area

Figure 27. Experimental setup for sensitivity testing.

The experiment anchored one point of the beam to a fixed mount (left) and another point to a movable stage. Care was taken when mounting the fiber in the fixture to not induce significant tension during the tightening of the mounts. The fiber was strained to different set points and data was taken with an optical spectrum analyzer to determine the shifted center wavelength. The following plot illustrates the results of this test.

82

Captured FBG Reflection Spectra Under Varying Strain

0. 18 6

45 0. 1

0. 0

4.5

0. 10 8

55

5

Reference +56.2 me

Reference

+112.5 me

4

+168.7 me +225.0 me

Amplitude (V) .

3.5

3

2.5

2

1.5

1

0.5

0 -0.2

-0.1

0

0.1

0.2

0.3

0.4

Relative Wavelength (nm)

Figure 28. Sensitivity test results.

This test shows the optical signal captured by the PDA400 using the oscilloscope as a data logging device. The offsets in wavelength show that the approximate sensitivity is 186pm / 225με = 0.83 pm/με. This correlates exactly with estimated FBG sensitivities of 1.2 με/pm.

Accuracy Testing with a Fiberglass Beam Accuracy was characterized with a single FBG sensor mounted to a fiberglass beam (Figure 29) and corresponding co-located strain gauge. The beam, approximately 12 inches in length with lengthwise unidirectional fibers, was fixed at one end and included a large steel mass mounted at the free end. The steel mass was used with a large electromagnet to induce a repeatable force at the cantilever bean’s tip during dynamic testing. A power amplifier controlled by a function generator was used to drive the electromagnet in a sinusoidal pattern, and a co-located resistive strain gauge was read by an off-the-shelf standalone battery-powered strain gauge bridge

83 amplifier with excellent noise performance. Resistive gauge data was read by the bridge amplifier and recorded with an oscilloscope while the FBG sensor was read by the FBGIS and recorded in on-board RAM for later extraction. For static testing, a micrometer was used to manually apply a force to the steel mass at regular load points.

Fiberglass Beam

~1 cm

Thin Foil Strain Gauge

Bragg Grating Area

LocTite 401 1.00”

0.125

Figure 29. Fiberglass beam test sensor mounting.

The figure below illustrates the mechanical setup of the fiberglass beam in the vibration test stand with sensors configured as illustrated above. A hard mount on the left hand side rigidly mounts the two beams, and a mass attached to the opposite end provides a magnetized structure to interact with the magnetic field from the energized coil. Optionally, the coil can be de-energized and the micrometer may be used to apply a static load to the beam.

84

Micrometer (Removable)

Actuator Coil

Sensor Area

Fiberglass Beam

Wire & Fiber Optic Cable

Figure 30. Fiberglass beam experimental setup.

The first test used only the micrometer to induce strain in the beam at static test points. The test was used to calibrate the FBGIS relative to the co-located resistive gauge read by the bridge amplifier. Six test loads were applied using the strain gauge as feedback at 50με increments. The following plot displays the results of this test, including a measurement of the system’s noise at that time which has since improved.

85

FBG Interrogation System - Fiberglass Beam Testing Interrogation System Output (Recorded, Unfiltered, M = 0.83, B = –8.0) 50 0 0

5

10

15

20

σ

0 uE

13.6

50uE 100uE

25

-50

10.8

-100

6.6

-150

8.3

-200

10.1

-250

11.1

150uE

Strain (uE)

200uE 250uE

-300 Sample

Figure 31. Fiberglass beam static test results.

The most obvious feature of the above plot is the significant noise levels. An average of approximately 10με standard deviation in the datasets results a rough estimate of strain relative to the axes used, but is an acceptable noise level given our initial design goals. The strain response is very accurate, with all data sets averaging within 5με of the set point as read by the resistive strain gauge. The following plot highlights the error and linearity in the data set.

86

Linearity Results 3

0

FBGIS Data

2.5

-100

Error

1.5

Linear (FBGIS Data)

1 0.5

-150 R2 = 0.9998

0 -0.5

-200

Strain Gauge Setpoint

2 Error (microstrain)

Strain (microstrain)

-50

-1 -1.5

-250

-2 -300 0

100

200

300

400

-2.5 500

Set Point Number

Figure 32. Linearity analysis of static beam test.

The linearity is excellent (with an R2-value better than two nines), while the error per set point was within 3με of the strain gauge reading. However, the measured accuracy is due to manual calibration of the data in post processing. Both a gain and offset were applied to the data sets (all six data sets had applied the same gain and offset) as the exact sensitivity of the FBG sensor was unknown and zero-strain calibration techniques were not yet integrated into the firmware. Nonetheless, the linearity measurement was not affected by the manually-applied gain or offset and thus is a good indicator that the FBGIS’s linearity should be excellent. The same experimental setup was also used to test the FBGIS’s accuracy with dynamic measurements. At the time the system was operating at only 10Hz sampling rate, so the beam was actuated manually at a much slower rate.

87

Manually Actuated Beam FBG Interrogation and Thin Foil Transducer Comparison 250 Thin Foil Transducer Response

200 150

Strain (uE)

100

FBG Interrogator Response

50 0 -50 -100 -150 -200 -250 0

5

10

15

20

25

Tim e (s)

Figure 33. Preliminary dynamic performance testing.

The data displayed above was conditioned to best correlate with the strain gauge data. The gain on the raw data was intentionally set to 0.83 με /pm, which is given by the published approximate sensitivity of the FBG sensors as 1.2 pm/με. No offset was applied to the data, as the offset was calibrated in the FBGIS directly. A gain was applied to the resistive strain gauge data as recorded by an oscilloscope to convert between voltage and strain, and was found by best fit to be 2380.95με/V. An offset of 25με was then applied with a time shift of 14.3 seconds that accounted for the delay between recording triggers. The FBGIS data correlates very well with the resistive gauge output, and noise levels were later reduced to approximately 10με (instead of the 50με observable in the plot above).

Dynamic Steel Beam Tests A flat 3” cantilevered steel beam was instrumented with a single resistive strain gauge and single FBG sensor to test dynamic performance of the FBGIS. The beam testing in this case was similar to the accuracy testing using a fiberglass beam, but in this case the beam was allowed to freely

88 resonate at one end. The experimental test setup was identical to the fiberglass beam test, except that the most recent application revision was used in the DSP for testing. The following illustration shows the test setup.

To FBGIS

Weight (Optional)

Sensor Area

Steel Cantilever Beam

Figure 34. Steel beam experimental setup.

The beam mount was a heavy aluminum block with a bolt-down fixture to clamp the beam in place. The fixture was modified to include a channel for the fiber optic cable and gauge wires.

Sensor 1\Strain (ue) 400

300

strain (ue)

200

100

0 0

5

10

15

20

25

30

-100

-200 time (s)

Figure 35. Steel beam dynamic strain measurement (free ringing).

35

89

Steel Beam Free Ringing 200

150

100

strain (ue)

50

0

-50

-100

-150

-200 5.5

6

6.5

7

7.5

8

time (s)

Figure 36. Free ringing test zoom.

A simple free ringing test was conducted to demonstrate the FBGIS’s dynamic performance. The data rate in the test plotted above was approximately 50Hz. Signal frequency, determined using a simple zero-crossing observation, is 5.6Hz. This implies that approximately ten data points should exist in each cycle, which is verifiable by observation. Note that a weight was placed at the end of the beam to reduce its natural frequency due to the bandwidth limit imposed by the PCGUI communications protocol. At the given sampling rate it is reasonable to conclude that the maximum sensor bandwidth of the FBGIS given by the Nyquist limit is approximately 25Hz, although the system’s sampling rate may be increased to 90Hz.

Sandia National Laboratories Field Test The field test objective was twofold. First, it was desirable to simply evaluate the performance of the FBGIS relative to the resistive gauges. Metrics of linearity, noise, gain and offset errors, and dynamic range were considered. The second objective involved the detection of defects. Here,

90 the strategy was to compare the results of each type of sensor, evaluating whether the surfacemounted sensors or internal sensors were more effective at detecting flaws in the specimen. Note that a conflict between two of these tests exists, where the linearity metric and the effects of intentional structural flaws are difficult to decouple. This issue is treated in the Discussion section.

Specimen Design A rectangular composite test specimen prepared at SNL (reference Appendix II for drawing) incorporated six resistive thin-foil strain gauges and a custom FBG sensor array containing six FBG strain sensors. Two fiber optic FC-type connectors exited the specimen – one at each end of the fiber. Flaws (Teflon inserts) were introduced in the specimen to also investigate the potential of both sensor types to detect delamination flaws in composite parts. Sensors were intentionally located at strategic points around the induced flaws to investigate the effect of flaws at different relative points in the specimen. Finally, the resistive gauges were wired to a commercial strain amplifier, while the fiber sensors were interrogated optically with the UCD-FBGIS.

610mm

91

203mm

Figure 37. Specimen design and sensor layout.

The above photos document the sample test fixture and a close-up view of resistive strain gauge mounting locations on the fiberglass sample. See Appendix II for mechanical drawing detail. Also evident is the ‘burned’ region of the sample where the epoxy curing processes overheated the sample leading to a greatly reduced optical signal.

Test Procedures A tensile test load frame was used to strain the composite part (24” x 8” x 0.3”) axially along its major dimension. Though one of the two fiber optic connectors used to access the FBG sensors was inadvertently broken during the test, the other was still usable and provided strain data. The tensile testing machine was stepped at 500-psi pressures over the desired range. Resistive strain gauge data was logged by the computer, and also transmitted verbally for manual recording on

92 paper. Data from the optical strain sensors was logged by a separate dedicated computer interfaced with the UCD-FBGIS, and also transmitted verbally for hand-recording. Five separate data logs were generated, but the first two logs were for system verification and not considered official tests. Therefore the three real tests generated are enumerated 3, 4, and 5.

Auto-Scan Results The FBGIS is capable of auto-scanning its entire spectrum to both count the number of FBG sensors and identify the wavelength of each sensor. This is the technique used to discover and calibrate the sensors. However, presumably due to the over-heating of the test specimen at manufacture time, the quality of sensors and/or transmissivity of the fiber were greatly reduced. The auto-detect feature therefore had trouble detecting the peaks as they were at various intensities. The following image shows a capture of what the UCD-FBGIS saw for the entire spectrum (1590 to 1550nm), where wavelength decreases from left to right. Note that the vertical scale is the raw value of each analog sample, though each has been over-sampled four times; a value of 225 indicates the 12-bit A/D converter converted the approximate value 56 four times consecutively at that wavelength (DAC code). The horizontal scale is the optical filter DAC code, where each sample is the intensity of the spectrum at some corresponding wavelength.

93

A

B

C

D

Figure 38. Pre-scan results of FBGIS on damaged specimen.

The notch around sample 1934 (label ‘D’) marks the end of the prescan routine and the start of the high resolution scans; the upwards-ramp after the notch is a higher-resolution scan of the first sensor’s leading edge. Data after the notch can be discarded for the purposes of this analysis. The first two peaks (sensors) are discernable, though greatly reduced from the expected intensity of an undamaged sensor array. A signal to noise ratio of approximately 3.5 can be observed from the graph directly, considering a 64-count noise amplitude on the floor and a peak signal amplitude of 225 counts. The third peak was also detected by the system; the high noise level observed for this sensor in the test results reflects its smaller amplitude, and accordingly the correlation routine’s higher variance between successive scans. Furthermore, if the imagination is allowed to stretch a bit, the other three peaks are somewhat discernable. At the same spacing as the first three peaks, the fourth, fifth, and sixth peaks can be seen as small rises in the average noise floor at labels ‘A,’ ‘B,’ and ‘C,’ respectively. It is conceivable that these three signals are just coincidental noise spikes. Of course, the UCDFBGIS is incapable of detecting them in any case with so much signal loss. Since the test, an automatic routine has been integrated into the firmware that detects minimum and maximum analog levels and scales the thresholds accordingly. This routine provides an automatic calibration of analog levels that accommodates for varying SLD intensity and FBG sensor loss levels.

94 Note that the spacing between each sensor decreases in sample number, which corresponds to wavelength. However, this correspondence is nonlinear as a function of the tunable filter transfer function. For a linear sweep over the tunable filter’s input tuning voltage, that the corresponding change in wavelength will decrease at an increasing rate over that same tuning range. It is expected, therefore, that the sensors appear closer together in sample number at lower wavelengths (or higher tuning voltages). See appendix for the filter’s tuning curve. There is a single data structure internal to the UCD-FBGIS. The root node is the sensors structure, which contains the data for all sensors and system parameters. The property nSensors is the number of sensors detected during the initial scan, indexed from one. For each of those sensors, there is a structure fbg[] (indexed from zero) that contains the properties, kernel data and realtime strain data. Within each fbg structure, there is another array kernelData[256] which contains the kernel capture of the corresponding sensor. This kernel is correlated with all successive scans to determine offset in wavelength and therefore strain shift.

95

UCD-FBGIS Prescan Kernel Data KERNEL 0 KERNEL 1 KERNEL 2 KERNEL 3 KERNEL 4 KERNEL 5 Threshold

2000

1800

Value

1600

1400

1200

1000

800 0

32

64

96

128

160

192

224

256

Sample Number

Figure 39. Prescan capture of kernel data.

The contents of the internal data structure sensors of the auto-detection routine were captured at the end of testing. The kernel data is shown graphically above, and all other system parameters and variables are listed in the table below. The data will be treated in the discussion section. Table 10. FBGIS internal memory capture.

Sensors and Global Parameters Parameter

Value

Description

nSensors

5

Number of detected sensors, indexed from 1

SIZE_MAX_OVERSAMP

4

Number of times to over-sample at the same wavelength

SIZE_MAX_KBUFF

256

Size of largest kernel buffer

SIZE_MAX_SBUFF

1024

Size of largest realtime coarse or fine scan

SIZE_MAX_CBUFF

1024

Size of largest realtime correlation

SIZE_MAX_NSENSORS

6

Number of sensors allocated in memory

SIZE_MIN_PEAK

1280

Threshold peak level used when auto-detecting sensors

SIZE_PRESCAN_STEP

16

Sample step size when running prescan and detecting peaks

SIZE_LOOKUP

256

Size of wavelength transform lookup table

SIZE_PRESCAN_AVG

4

Size of post-processing running average filer on prescan data

DEFAULT_DOMAIN

4096

Total window size (in samples) around calibrated sensor

96

DEFAULT_COARSE

16

Step size for coarse scanning within domain

DEFAULT_FINE

1

Step size for fine scanning within window

DEFAULT_WINDOW

1024

Total window size (in samples) around coarse-detected sensor

DEFAULT_KERNEL

256

Default size of correlation kernel

DEFAULT_NUMERATOR

10

Default strain gain numerator

DEFAULT_DIVISOR

15

Default strain gain denominator

TIME_SETTLE

3000 (μs)

Time to wait after first sample is set in a scan (for TF ringing)

PRESCAN_START_IND

0xFFFF/3

(21845) Index of prescan start (in samples)

PRESCAN_END_INDEX

0xD000

(53248) Index of prescan end (in samples)

fbg[] Parameter

fbg[0]

fbg[1]

fbg[2]

fbg[3]

fbg[4]

fbg[5]

centerWavelength

1577000

1569961

1562897

1562905

1562907

1562910

centerPosition

27850

33736

38619

38614

38613

38611

zeroStrainOffset

0

0

0

0

0

0

coarseStepSize

16

16

16

16

16

16

fineStepSize

1

1

1

1

1

1

fineWindowSize

1024

1024

1024

1024

1024

1024

kernelSize

256

256

256

256

256

256

tstamp

0

0

0

0

0

0

delta

0

0

0

0

0

0

strain

-2

-3

-24

-832

-843

0

strainOffset

750

970

1230

0

0

0

strainNumerator

50

50

50

10

10

10

strainDivisor

57

57

57

15

15

15

sensitivity

16187634

16122102

15859963

16187656

14811374

16646398

startWavelength

15597815

15859958

16122102

16711927

15073510

16974091

endWavelength

15597815

15597819

15270121

16711926

16711919

17301768

startDomain

25120

31006

35889

35884

35883

35881

endDomain

30580

36466

41349

41344

41343

41341

enabled

1

1

1

1

1

1

Field Test Results This subsection presents the raw data captured from recorded data logging files. Also included in each test is an analysis of the auto-detect feature and documentation of manual override gain and offset values.

97

Test 3 of 5 Table 11. Test 3 Parameters.

Parameter

Value

Units

nSensors*

5

CWL(1)

1577.000

nm

CWL(2)

1569.961

nm

CWL(3)

1562.897

nm

CWL(4)*

1562.905

nm

CWL(5)*

1562.907

nm

Gain Numerator (all)

10

Gain Denominator (all)

15

Offset (all)

Tuned by hand for each sensor to zero

*Detected sensors 4 and 5 were duplicates and accordingly discarded. See Discussion. Table 12. Test 3 specimen loading (0 - 10ksi).

Sensor 1

Sensor 2

Sensor 3

Load (psi)

AVG

STDEV

AVG

STDEV

AVG

STDEV

0

-8.82504

0.967253

-9.03531

1.162948

-9.27287

3.231082

500

47.67702

1.197622

51.26087

1.152117

56.80435

3.89291

1000

111.5806

1.038504

114.6734

1.263861

133.9919

3.325758

1500

180.2342

1.39235

178.4304

1.041166

199.4557

3.599991

2000

253.2248

0.916459

242.7238

2.140638

262.7666

3.674398

2500

318.5376

0.855888

308.5338

1.294685

327.7744

2.435946

3000

380.4356

1.293963

375.6502

1.687388

384.7554

2.696916

3500

446.4862

0.950916

444.8287

5.780707

442.5138

4.866196

4000

440.2486

2.536196

440.4751

2.829545

436.105

6.282695

4500

511.6545

1.322875

507.8698

1.319575

497.9288

3.799332

5000

578.8507

1.545841

577

1.548226

564.1231

3.970366

5500

648.8309

1.099373

646.1607

3.53607

631.5053

5.751609

6000

713.84

1.527202

713.6831

2.531503

705.3262

5.449382

6500

782.5133

1.625456

785.1917

2.343769

778.9053

4.376387

7000

850.3551

1.436868

853.1084

1.79163

850.2776

4.204386

7500

915.2118

1.786593

921.7882

1.776815

920.8125

3.036293

8000

982.4574

1.487683

987.6765

2.344681

987.4868

4.292659

8500

1046.198

1.327708

1055.173

1.897384

1058.448

6.148906

98

9000

1104.459

1.164659

1118.185

1.692642

1131.724

5.280154

9500

1166.68

1.537332

1178.817

2.58231

1223.282

5.578526

10000

1230.499

1.460936

1242.673

2.666184

1292.433

5.466337

Sandia Test 3/5 - FBG Interrogator Output 1600 Sensor 1\Strain (ue) Sensor 2\Strain (ue) Sensor 3\Strain (ue)

1400

1200

Strain (ue)

1000

Accidental mechanical shock to interrogator

800

600

400

200

0 0

200

400

600

800

1000

1200

1400

Elapsed Time (s)

Figure 40. Test 3 - FBG interrogator raw output.

1600

1800

2000

99

Sandia Test 3/5 - FBG Interrogator Loading Results 1600

Sensor 1 Sensor 2 Sensor 3 Sensor 1 Fit: Sensor 2 Fit: Sensor 3 Fit:

1400

1200

y = 0.13160x - 12.69666 y = 0.13332x - 19.04335 y = 0.13535x - 20.08363

Strain (ue)

1000

800

600

400

200

0 0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Load (psi)

Figure 41. Test 3 - FBG interrogator loading results.

Sandia Test 3/5 - FBG Interrogator Deviation from Linear 30

Sensor 1 20

Sensor 2 Sensor 3

Deviation (ue)

10

0

-10

-20

-30 0

1000

2000

3000

4000

5000

6000

7000

8000

Load (psi)

Figure 42. Test 3 - FBG interrogator output deviation from linear.

9000

10000

100

Sandia Test 3/5 - FBG Interrogator Output Standard Deviation 9 Sensor 1 8

Spikes from Spike from accidental accidental

Sensor 2 Sensor 3

mechanical shock

Standard Deviation (ue)

7

6

5

4

3

2

1

0 0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Load (psi)

Figure 43. Test 3 - FBG interrogator output standard deviation.

Test 4 of 5 Table 13. Test 4 Parameters.

Parameter

Value

Units

nSensors

3

CWL(1)

1577.000

nm

CWL(2)

1569.961

nm

CWL(3)

1562.897

nm

Gain Numerator (all)

10

Gain Denominator

15

Offset

Tuned by hand for each sensor to zero

Table 14. Test 4 specimen loading (0 - 10ksi).

Sensor 1

Sensor 2

Sensor 3

Load (psi)

AVG

STDEV

AVG

STDEV

AVG

STDEV

0

-3.54369

0.774933

-2.77184

2.010068

0.23301

5.135631

500

77.12281

0.994176

78.81404

4.975696

84.84912

6.98855

101

1000

162.6122

1.355262

162.9673

3.51562

193.4163

7.074989

1500

256.6383

1.230411

246.583

4.472677

278.3106

7.82182

2000

337.3788

1.347802

329.5485

4.732904

359.7848

6.947857

2500

414.7231

1.743663

413.1046

4.938024

446.4123

8.781074

3000

495.293

2.290344

499.6293

3.722369

516.4662

6.791478

3500

584.7841

1.093039

585.6477

2.182138

601.0909

5.320345

4000

669.8889

1.372414

672.0519

2.816094

685.8889

5.626764

4500

757.8889

1.263287

758.2127

4.314377

768.0127

8.042473

5000

841.3947

0.905154

844.9421

2.282773

856.8

6.752361

5500

925.0435

1.563175

928.9435

2.866967

937.3826

7.005404

6000

1005.154

1.21287

1014.656

2.986205

1019.477

6.093196

6500

1090.83

1.13043

1102.091

2.776952

1104.536

7.192144

7000

1175.45

1.721137

1188.145

5.130848

1193.435

6.155096

7500

1267.344

1.483298

1276.505

2.704919

1268.866

8.07194

8000

1349.328

1.293956

1363.993

4.34259

1355.81

8.684108

8500

1431.569

1.849689

1450.939

1.992084

1449.006

8.897746

9000

1519.796

1.554734

1538.678

5.177792

1573.053

13.13522

9500

1604.805

1.70888

1625.851

1.676768

1663.817

7.107502

10000

1696.599

2.057753

1716.755

2.610959

1753.103

7.42268

Test 4/5 - FBG Interrogator Raw Output 2000 (Load = 9000psi)

1800

Sensor 1 Sensor 2

1600

Sensor 3

1400

Strain (ue)

1200

1000

800

600

(Load = 1000psi)

400

200

0 0

200

400

600

800

1000

Elapsed Time (s)

Figure 44. Test 4 - FBG interrogator output.

1200

1400

1600

102

Sandia Test 4/5 - FBG Interrogator Loading Results 2000 Sensor 1 Sensor 2 Sensor 3 Sensor 1 Fit: Sensor 2 Fit: Sensor 3 Fit:

1800

1600

1400

y = 0.16946x - 6.36498 y = 0.17205x - 12.83635 y = 0.171726x + 3.738632

1000

800

600

400

200

0 0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Load (psi)

Figure 45. Test 4 - FBG interrogator load results.

Sandia Test 4/5 - FBG Interrogator Standard Deviation 14 Sensor 1 Sensor 2

12

Sensor 3 Linear (Sensor 3) Linear (Sensor 2)

10

Standard Deviation (ue)

Strain (ue)

1200

Linear (Sensor 1)

8

6

4

2

0 0

1000

2000

3000

4000

5000

6000

7000

8000

Load (psi)

Figure 46. Test 4 - FBG interrogator output standard deviation.

9000

10000

103

Sandia Test 4/5 - FBG Interrogator Output Deviation 40

S1 DEV 30

S2 DEV S3 DEV

Deviation (ue)

20

10

0

-10

-20

-30 0

1000

2000

3000

4000

5000

6000

7000

8000

9000

Load (psi)

Figure 47. Test 4 - FBG interrogator output deviation from linear.

Test 5 of 5 Table 15. Test 5 Parameters.

Parameter

Value

Units

nSensors

3

CWL(1)

1577.000

nm

CWL(2)

1569.961

nm

CWL(3)

1562.897

nm

Gain Numerator (all)

50

Gain Denominator

57

Offset

Tuned by hand for each sensor to zero

10000

104 Table 16. Test 5 specimen loading (0 - 16ksi).

Load (psi)

Sensor 1

Sensor 2

Sensor 3

Average

Std Dev

Average

Std Dev

Average

Std Dev

0

-6.94

0.98

-7.15

4.55

-5.38

8.59

500

71.38

1.12

73.18

3.35

79.78

7.54

1000

157.27

1.59

156.73

5.78

184.16

8.94

1500

250.29

0.60

241.42

3.40

270.39

8.59

2000

331.72

1.56

323.18

4.73

352.06

6.56

2500

409.59

1.66

407.44

3.97

440.03

6.65

3000

489.02

1.23

491.68

4.96

510.96

7.54

3500

575.74

1.37

576.13

2.13

593.67

5.42

4000

660.41

1.54

662.07

5.04

676.58

8.40

4500

749.83

1.26

747.66

5.26

757.51

8.25

5000

833.62

1.93

834.87

4.28

843.06

7.81

5500

914.38

1.14

918.73

2.36

925.01

6.01

6000

997.20

1.30

1004.26

5.57

1009.47

7.80

6500

1082.70

1.62

1091.71

5.25

1093.40

8.98

7000

1165.76

1.85

1178.32

4.97

1183.94

7.48

7500

1258.45

1.36

1264.35

4.91

1253.85

6.89

8000

1339.55

1.66

1352.99

2.69

1341.13

6.66

8500

1423.81

1.49

1439.97

1.68

1432.46

6.44

9000

1507.56

1.03

1525.82

2.16

1528.57

10.87

9500

1594.94

1.96

1614.08

3.95

1648.44

8.53

10000

1686.71

1.93

1704.02

3.65

1738.05

8.46

10500

1772.38

1.11

1793.03

3.03

1832.82

9.74

11000

1857.47

1.75

1880.04

4.84

1903.84

6.35

11500

1940.66

1.77

1968.17

3.12

1989.41

7.01

12000

2024.93

1.72

2054.76

2.07

2078.12

8.90

12500

2108.84

2.76

2143.59

2.36

2166.67

8.39

13000

2202.39

2.09

2230.32

5.06

2263.51

10.34

13500

2285.38

2.33

2317.99

5.32

2352.51

9.94

14000

2371.13

3.06

2406.36

3.62

2442.77

8.21

14500

2454.40

2.26

2493.84

2.16

2527.89

9.16

15000

2537.84

2.90

2580.58

5.61

2600.49

9.82

15500

2625.37

3.28

2664.84

3.68

2681.73

11.57

105

Test 5/5 - FBG Interrogator Raw Output 3000 (Load = 15000psi)

Sensor 1\Strain (ue) Sensor 2\Strain (ue) Sensor 3\Strain (ue)

2500

Strain (ue)

2000 Sensor 1 Out of range at 16000psi

1500

1000 (Load = 1000psi)

500

0 0

200

400

600

800

1000

1200

1400

1600

1800

2000

Elapsed Time (s)

Figure 48. Test 5 - FBG interrogator raw output.

Sandia Test 5/5 - FBG Interrogator Loading Results 3000

Sensor 1 AVG 2500

Sensor 2 AVG Sensor 3 AVG

Strain (ue)

2000

Sensor 1 Fit:

y = 0.1702x - 16.479

Sensor 2 Fit:

y = 0.1733x - 26.147

Sensor 3 Fit:

y = 0.1742x - 15.921

1500

1000

500

0 0

2000

4000

6000

8000

10000

12000

Load (psi)

Figure 49. Test 5 - FBG interrogator load results.

14000

16000

106

Sandia Test 5/5 - FBG Interrogator Output Noise 14 Sensor 1 STDEV Sensor 2 STDEV Sensor 3 STDEV Linear (Sensor 3 STDEV) Linear (Sensor 2 STDEV) Linear (Sensor 1 STDEV)

12

8

6

4

2

0 0

2000

4000

6000

8000

10000

12000

14000

16000

Load (psi)

Figure 50. Test 5 - FBG interrogator output standard deviation.

Test 5 - Deviation from Linear 30 Sensor 1 Sensor 2

20

Sensor 3 10

0

Deviation (ue)

Std Dev (ue)

10

-10

-20

-30

-40

-50 0

2000

4000

6000

8000

10000

12000

Load (psi)

Figure 51. Test 5 - FBG interrogator deviation from linear.

14000

16000

107

Chapter 6 – Discussion and Conclusions This section considers the test data and pre-scan results to address the testing goals as they relate to the FBGIS.

Prescan Performance All test results are relative to the pre-scan routine. The prescan is responsible for scanning the entire optical domain in which some number of sensors exist. The routine performs a course scan of the domain using step size SIZE_PRESCAN_STEP and looks for rising edges above the threshold SIZE_MIN_PEAK. The routine at the time did not accommodate different intensity levels and did not attempt to discriminate between reflective (used in this test) or transmissive modes of sensor detection. Since then, however, a routine has been integrated that automatically calibrates for varying analog levels. Relative to this test, the auto-detect function performed as designed. However, because of the degraded state of the sensors used in the composite specimen, the auto-detection routine only found three distinct sensors. As observed in Figure 38, only peaks one, two and three are visible. Two extras were found (accounting for nSensors = 5) because the threshold SIZE_MIN_PEAK happened to be set at 1280, which is at the approximate peak level of the third sensor. In an undamaged sensor set, the signal amplitudes would be much higher and the extra ‘phantom’ sensors would not have been detected. In this case, where the third sensor peak dips below and

108 then returns above the threshold, new sensors are detected in error. Presumably, this happened two extra times. The two ‘phantom’ kernels (fbg[3].kernelData[] and fbg[4].kernelData[]) are still centered relative to each other and the real sensor 3 kernel; each centerPosition is within 4 high-resolution DAC samples of the other. This occurred as a result of the kernel scanning routine, which scans once, finds the peak value, re-centers the scan window around the peak, and scans the final data into memory. The kernelData for fbg[5] was included in the plot, but was not used in data in this paper. The data is from an old scan (which had the same problem and was not overwritten by the prescan routine used in these tests), and can be disregarded. Interestingly, the kernel data matches the phantom scans and therefore indicates that the same effect happened on a previous run.

Detected Sensors The UCD-FBGIS includes a graphical user interface (GUI) which displays the realtime system output in numerical or graphical form, as well as system variables and parameters. It seems that the GUI mis-reported the center wavelengths of the three auto-detected wavelengths. The GUI reported center wavelengths of 1564, 1557, and 1550nm for sensors 1, 2, and 3, respectively. However, upon inspection of the internal data memory of the UCD-FBGIS, it is revealed that the centerWavelength property of sensors fbg[0], fbg[1], and fbg[2] are 1577000, 1569961,

and 1562897, respectively. The error was later traced to a rounding problem with the GUI driver as the DSP prepares to send data out to the PC-GUI and has been fixed. The following table summarizes the expected sensor center wavelengths, and the actual detected center wavelengths.

109

Table 17. FBGIS detected center wavelengths and sensor numbers.

Manufacturer Sensor ID

Manufacturer CWL (nm)

Detected Sensor ID

Detected CWL (nm)

1

1550

-

N/A

2

1556

-

N/A

3

1562

-

N/A

4

1568

3

1562.897

5

1574

2

1569.961

6

1580

1

1577.000

There is considerable discrepancy between the detected center wavelengths and the expected center wavelengths. The manufacturer center wavelengths were verified with an optical spectrum analyzer (OSA), so those values can be trusted. Based on the prescan capture of the signal shown in Figure 38, it is clear that the detected sensors are actually the three high-wavelength sensors 6, 5 and 4. This can be safely concluded by observing that there is no blank space where sensor 1 should have been discovered; the location of the sensor signature corresponds in location with previous tests where the integrity of all six sensors was verified. The prescan routine always starts at the high-range of the wavelengths, and therefore we can be confident that the three detected sensors are as shown in Table 17 above. One potential source of the wavelength discrepancy is not actually an error. When the sensor array was installed in the composite part, the curing process induced a strain in the sensors. This was observed using the OSA and a light source before the testing; the sensors were strained by approximately 2nm in wavelength. This would create a significant offset from the manufacturer’s published center wavelengths.

110 The other significant offset in wavelength (not due to initial preloading) has been traced to a calibration potentiometer on the UCD-FBGIS hardware that was set incorrectly. The potentiometer adjusts the voltage amplification stage after the digital to analog converter, which generates the tuning voltage for the tunable optical filter. The potentiometer should have been set to make the full range of the DAC correspond to the sample-to-wavelength compensation table, which was calculated based on a 0.0 to 25.4 volt range. The maximum value of the analog output was not calibrated before the test, and was approximately 22.17V. It can be concluded that the significant gain error in tuning voltage led, in addition to the error in center wavelengths, some nonlinear gain error in all output data from the UCD-FBGIS.

FBGIS Performance This analysis considers the performance of the UCD-FBGIS. The test results are used here to extract the absolute performance levels of the system.

Output Noise Output noise is defined as the amplitude of the UCD-FBGIS output strain data when the system input is held constant. The standard deviations presented in each of the three tests are useful indicators of noise, as they indicate that two thirds of the data should fall within this deviation. Considering the first sensor on the first test, the peak-to-peak signal is found to be between 3 and 8 με. The average peak-to-peak noise amplitude is 6με for this channel. This analysis discards the accidental mechanical impulse at load 3500 and the last set point for which there seemed to be a change in the load over the extended sampling time. Sensor 3 was known to have very small amplitude, and correspondingly a higher noise level. The effects of this can be observed in Test 3, where the minimum peak-to-peak signal amplitude is 11,

111 the maximum is 68, and the average is 27με. This poor performance is due to a very poor signal to noise ratio, and a mal-formed sensor waveform which is very difficult to correlate. Noise levels in a laboratory environment with a controlled sensor were found to be approximately 3με peak-to-peak, corresponding to the results of Sensor 1 during Test 3. It can be concluded that the system demonstrated a minimum noise level of 3με, with noise up to 68με peak-to-peak for damaged or otherwise lossy sensors.

Offset and Gain Errors The prescan routine generates the reference points to which all subsequent scans are compared. At the time of the testing, there exists a software error in the calculation of the actual strain, requiring the strain offset and gain to be manually applied. Because both of these parameters were entered manually, the offset and gain are essentially arbitrary with respect to the tests presented in this document. To create the strain signal, the correlation result (in samples) is first converted to a wavelength using the interpolated lookup table generated from the tunable filter transfer function. This wavelength is then differenced with the wavelength calculated during the prescan, representing the ‘zero-strain’ condition. The manual offset is then applied to this wavelength delta. Finally, the result is multiplied by the gain numerator, and then divided by the gain denominator.

112

Strain Gage 1 Strain Gage 2 Strain Gage 3 Strain Gage 4 Strain Gage 5 Strain Gage 6

2000

FBG 6 FBG 5 FBG 4

Fiberglass "Wind Turbine Blade" Specimen with Embedded FBG Sensors (Test 1 - Uncalibrated) Uniform Strain Field at Center of Specimen

1500

Microstrain

General Strain Reduction Along Lines of Flaws (Edge of Specimen)

1000

Slight Non-Linear Response in FBG 4 Starting Around 1100 με 500

Strain Relief Created by Extreme FBH Flaw 0 0

2000

4000

6000

8000

10000

12000

Load (lbs)

Figure 52. Load test results with FBG and resistive strain sensors. (From SNL)

In Test 3, the offsets were tuned by hand at zero load, and the gain was set to 10/15. This value seemed to generate accurate strain levels during laboratory testing relative to a resistive strain sensor, but was off by almost 50% when running with the strain sensors installed on the SNL test specimen. After running Test 3, the output was compensated by the factor 1.3 to accommodate for this large gain error. The gains were then set to 50/57, which is approximately equal to the product of 10/15 and 1.3, or 0.87. This gain seemed to track the resistive strains more accurately, but was of course still a manual compensation to a software bug. Investigating the problem after returning from testing revealed that the high precision strain gauge was configured in half-bridge instead of quarter bridge mode; a gain error of precisely 50% was to be expected on the readout.

113 For these tests, therefore, it is not possible to determine the gain and offset errors of the system. Future firmware revisions should provide a more solid foundation on which more deterministic testing can be performed.

Linearity We may consider this metric using the test results because the gain and offset errors should not affect the system’s output linearity. It is important to note, however, the uncertainty introduced from the flaws induced in the test specimen. It is not possible to decouple the localized effects of the induced specimen flaws from the strain effects due to the tensile testing. Noted in Figure 52 above by a SNL engineer is the slight nonlinearity exhibited by sensor FBG4 at around 1100με, but it is not possible to determine whether the effect is from some undesirable FBIGS malfunction or an actual, accurate response of the strain sensor to the local stress concentrations from the induced flaws. Advanced composite FEA modeling is necessary to eliminate the latter by simulating local nonlinearities around flaws, and is not within the scope of this thesis. With these points in mind, we observe the ‘Deviation from Linear’ plots of all three tests. Those results are plotted on equal load scales in the figure below for reference.

114

Tests 3,4,5 - FBG Interrogator Deviation from Linear 40

30

20

Deviation (ue)

10

0

-10 T4S1 T4S2 T4S3 T5S1 T5S2 T5S3

-20

-30

-40

-50 0

2000

4000

6000

8000

10000

12000

14000

16000

Load (psi)

Figure 53. Tests 4,5 - FBG Interrogator Deviation from Linear.

We observe that the sensors correspond to each other between tests 4 and 5, with the major discrepancy being offset error. Sensor 1 (green) tracks very well and shows a slight dip in average strain between 2 and 10kpsi. Sensor 2 (pink) also demonstrates a dip in strain over the same range, but does not correspond as well as the other two sensors over the load range. Sensor 3 (blue) shows a consistent dip in strain between 2.5 and 10kpsi load. It is not clear at this time what effects the nonlinearities should have had on theses sensors. Finite element analysis would add some reference point to the expected strains over the load range, though the effects are specific to composite parts and as such a composite FEA routine would have to be employed.

115

Repeatability To test for repeatability, Tests 4 and 5 can be compared over the 0 to 10kpsi load range, as testing conditions were the same in both. A plot of the difference in load results for these two tests is given below for analysis.

Tests 4,5 - FBG Interrogator Repeatability 50

45 Sensor 1 Sensor 2 Sensor 3

40

Difference (ue)

35

30

25

20

15

10

5

0 0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

Load (psi)

Figure 54. Tests 4,5 - FBG Scanner Strain Repeatability Between Tests 4,5.

It is clear from the figure above that the repeatability is within 10με under low loads and as high as 20με for larger loads. The single data spike in Sensor 3 is due to a discontinuity appearing in Test 4 and is disregarded for the purposes of repeatability analysis. Any nonlinearities in the system would presumably be canceled out when subtracting the two tests, and therefore the resulting discrepancies shown in the above figure are a function of mechanical hysteresis in the test specimen. This effect is clearly visible in Figure 48, where at the end of the test the load changes from maximum to zero, and there is a residual stress of approximately 20με on all sensors.

116

System Cost The overall system cost is estimated at below $3,000 in single unit quantities. Optical components including the light source, tunable filter, and photodiode cost less than $900, $700 and $50 each, respectively. Printed circuit board assemblies including electronic components and hardware are estimated at $300, while the packaging and power supply components cost approximately $150. Finally, the user interface components add $80 to the bill of materials. The sum of all components listed is approximately $2,200. These estimates are for single-quantity parts and should reduce dramatically in any kind of production environment. The cost of production design, assembly, and testing is not included in this estimate.

Discussion Summary A rectangular composite test specimen fabricated at Sandia National Labs was axially loaded in tension, and its strain was measured using both resistive electrical and fiber Bragg grating optical strain sensors. The resistive strain sensors were used as a baseline reference, and the fiber sensors were calibrated against this reference. A custom fiber optic interrogation system developed at UC Davis with Sandia National Laboratories was used to read the optical sensors, and a characterization of this system’s performance was extracted from the test data. The goal of the testing was to characterize this system and determine if defects intentionally induced in the specimen could be detected by either the resistive or fiber optic sensors. Fabrication and errors contributed to increased noise levels and some inconclusive results. A calibration error in the UC Davis optical instrumentation contributed to nonlinear errors in wavelength calculations. A manufacturing error in the test specimen seemed to lower the fiber optic sensor array’s integrity. This made the signals difficult to detect by the UC Davis hardware and accordingly contributed to increased system noise. While six optical sensors were integrated into the specimen, only three could be detected and measured.

117 The results show that the FBGIS has good noise performance under adverse conditions, good dynamic range, and the potential for good absolute accuracy. The results did not provide conclusive data for the determination gain and offset errors, due to unresolved design problems including the MEMTUNE optical noise presumably sourcing from the D/A amplifier. Furthermore, it was not possible at this stage to determine the linearity of the system or its response to the internal specimen structural flaws because the observable effects two parameters cannot be decoupled. The performance results are given in the table below. Table 18. Summary of FBGIS Parameters.

Parameter

MIN

NOM

MAX

Unit

Accuracy

-

-

-

με

Gain Error

-

-

-

-

Offset Error

-

-

-

-

Linearity Noise

Notes Inconclusive N/A N/A

2

0.99

-

-

R

dT/dt = 0

3

6

8

με

Software Adjustable

Hz

From Nyquist

Dynamic Bandwidth

25

Sampling Rate

-

60

90

Hz

Filtering off @ 90

Range

-

+/- 2600

+/-5000

με

Adjustable

The accuracy, gain error and offset error are not conclusive because of the manual overrides included in the software. If the FBG sensitivity is known beforehand, the user may program in this value. Offset can be removed by turning the system on when the strain sensor is at rest, but no repeatable metric of offset error is obtainable at this time. The linearity of the system demonstrated excellent performance using a bare fiber sensor under controlled conditions with a precision translation stage. The range of the system is only bounded by sensor optical spacing such that no sensor overlaps on the next sensor’s optical subdomain. The noise parameter is adjustable with software filtering at the expense of sampling rate, but good noise performance within the specifications is obtained with a medium level of software filtering. Finally, sampling

118 rate has been increased through software optimizations to a maximum of 90Hz. While observed sampling rates of up to 188Hz have been recorded, the noise due to mechanical ringing in the tunable filter limit the maximum speed of the system.

Conclusion A ground-up fiber Bragg grating interrogation system has been developed as a prototype demonstration system using state-of-the-art components for structural health monitoring applications in response to needs of the wind turbine industry. The system provides adequate performance levels at an estimated cost that is a magnitude of order lower than competing offthe-shelf systems. Further research would allow more thorough characterization of the system’s performance, and further integration would result in a compact, single-processor interrogation system with a ruggedized packaging solution for in-field use.

119

References Askins, C. G., M. A. Putnam, et al. (1995). "Instrumentation for interrogating many-element fiber Bragg grating arrays." SPIE 2444: 10. Berkoff, T. A. and A. D. Kersey (1996). "Fiber Bragg Grating Array Sensor System Using a Bandpass Wavelength Division Multiplexer and Interferometric Detection." IEEE Photonics Technology Letters 8(11): 3. Betz, D., L. Staudigel, et al. (2002). Test of a fiber Bragg grating sensor network for commercial aircraft structures. Optical Fiber Sensors Conference Technical Digest, IEEE. Black, K., E. Udd, et al. (2004). Using Multi-Axis Fiber Grating Strain Sensors to Measure Transverse Strain and Transverse Strain Gradients in Composite Materials with Complex Weave Structures. Gresham, OR, Blue Road Research: 7. Bruce, E. (2002). Tunable Lasers / Aimed at wavelength division multiplexing, tunable lasers can save money while making networks more flexible. IEEE Spectrum: 5. Cavaleiro, P. M., F. M. Araujo, et al. (1999). "Simultaneous Measurement of Strain and Temperature Using Bragg Gratings Written in Germanosilicate and Boron-Codoped Germanosilicate Fibers." IEEE Photonics Technology Letters 11(12): 3. Connelly, M. J., S. Moloney, et al. (2005). Tunable Laser based Carbon Composite Strain Sensing System using Wavelength Division Multiplexed Fiber Bragg Grating Sensors. Smart Structures and Materials 2005: Smart Sensor Technology and Measurement Systems, Bellingham, WA, SPIE. Eom, T. J., M. J. Kim, et al. (2005). "Temperature Monitoring System Based on Fiber Bragg Grating Arrays with a Wavelength Tunable OTDR." IEICE Transations on Electronics E88-C(5): 5. Farrar, C. R., S. W. Doebling, et al. (2000). "Vibration-based structural damage identification." Phil. Trans. R. Soc. Lond. 359: 20. Goh, C. S., M. R. Moktar, et al. (2003). "Wavelength tuning of fiber Bragg gratings over 90 nm using a simple tuning package." Photonics Technology Letters 15(4): 3. Goh, C. S., Set, Sze Y., et al. (2002). "Widely Tunable Optical Filters Based on Fiber Bragg Gratings." IEEE Photonics Technology Letters 14(9): 3. Grattan, K. T. V. and B. T. Meggitt, Eds. (2000). Optical Fiber Sensor Technology. Optoelectronics, imaging and sensing. Boston, Kluwer Academic Publishers.

120 Inui, T., T. Komukai, et al. (2001). Highly eficient tunable fiber Bragg grating filters using multilayer piezoelectric transducers. Optics Communications 190, Elsevier Science. Kersey, A. D., M. A. Davis, et al. (1996). "Progress Towards the Development of Practical Fiber Bragg Grating Instrumentation Systems." SPIE 2839: 24. Li, G., T. Guo, et al. (2006). "Fiber Grating sensing interrogation based on the InGaAs photodiode linear array." Applied Optics (publication pending). Lo, Y. L. (1998). "Using in-fiber Bragg-grating sensors for measuring axial strain and temperature simultaneously on surfaces of structures." Optical Engineering 37(8): 5. Schulz, M. J., P. F. Pai, et al. (1999). "Health monitoring and active control of composite structures using piezoceramic patches." Composites: Part B 30 30: 13. Seim, J., E. Udd, et al. (1998). Health monitoring of an Oregon historical bridge with fiber grating strain sensors. Fairview, Oregon, Blue Road Research: 7. Shi, C. Z., C. C. Chan, et al. (2002). "Simulaneous Interrogation of Multiple Fiber Bragg Grating Sensors for Dynamic Strain Measurements." Journal of Optoelectronics and Advanced Materials 4(4): 5. Song, M., B. Lee, et al. (1997). "Interferometric temperature-insensitive strain measurement with differentdiameter fiber Bragg gratings." Optics Letters 22(11): 3. Tucker, R. S., D. M. Baney, et al. (2002). "Thermal Noise and Radiation Pressure in MEMS Fabry-Perot Tunable Filters and Lasers." IEEE Journal of Selected Topics in Quantum Electronics 8(1): 10. Udd, E., S. T. Kreger, et al. (2004). Nondestructive Evaluation of Composite Materials Using Multi-Axis Fiber Grating Strain Sensors. Gresham, OR, Blue Road Research: 13. van Bussel, G. J. W. (1999). The Development of an Expert System for the determination of Availability and O&M Costs for Offshore Wind Farms. European Wind Energy Conference, Nice, France. van Bussel, G. J. W., PhD. and M. B. Zaaijer, M Sc. (2001). Reliability, Availability and Maintenance aspects of large-scale offshore wind farms, a concepts study. Proceedings of MA REC. Netherlands. Wojciechowski, K. E., B. E. Boser, et al. (2004). A MEMS Resonant Strain Sensor Operated in Air. 17th IEEE International Conference on Micro Electro Mechanical Systems, 2004. Wood, K. H., T. L. Brown, et al. (2001). Fiber Optic Sensors for Cure/Health Monitoring of Composite Materials. Hampton, VA, NASA Langley Research Center: 10. Yamakawa, H., H. Iwaki, et al. (1999). Health Monitoring of Steel Structures using Fiber Bragg Grating Sensors. 2nd International Workshop on Structural Health Monitoring, Stanford, CA. Yu, T. S. F. and S. Yin, Eds. (2002). Fiber Optic Sensors. Optical engineering. New York Marcel Dekker. Zhao, Y. and Y. Liao (2004). Discrimination methods and demodulation techniques for fiber Bragg grating sensors. Optics and Lasers in Engineering 41, Elsevier Science. Zhou, Z., T. W. Graver, et al. (2003). "Techniques of Advanced FBG sensors: fabrication, demodulation, encapsulation and their application in the structural health monitoring of bridges." Pacific Science Review 5: 6.

121

Appendix 1 – Datasheets

122 PD100 InGaAs PHOTODIODE

123

124 MEMTUNE TUNABLE OPTICAL FILTER

125

126 INPHENIX SUPERLUMINESCENT DIODE DATASHEET (P/N IPSDD1503)

127

128 TEXAS INSTRUMENTS TMS320F2812 DIGITAL SIGNAL PROCESSOR

129

130 FBG ARRAY (ORDERED CUSTOM 6-SENSOR ARRAY w/ SAME SPECS)

131 SWITCHING POWER SUPPLY (GPC41-5)

132

133 D/A CONVERTER FOR TUNING VOLTAGE

134 OP AMP (USED IN PHOTODIODE AMP, TUNING VOLTAGE AMP)

135

Appendix II – Drawings, Schematics & PCB Layouts

136

137

138 DSP INTERFACE PCB DETAIL

139

140

141

142

143

144

145 OPTIC INTERFACE PCB DETAIL

.

146

147

148

149

150

151

152

153

154

155

156 USER INTERFACE PCB DETAIL

157

158

159

160

161

162

163

164

165

Appendix III – Project Code Listing

166

// DSP SCANNER v0.1 // W. Allan #include "DSP281x_Device.h" #include "DSP281x_Examples.h" #include "dspScanner1.h" #include #include #include #include #include #include

"DERTOS.h" "ExternalUserInterface.h" "UARTEUICommunication.h" "TIBlockMemory16.h" "LEDDIO1.h" "TIUART.h"

// --------------- BEGIN NITTA GUI STARTUP ------------------------INT32S INT16S INT16S INT16S INT16S

load = 0; MemTuneTemp = 0; SLDTemp = 0; SLDCurrent = 0; BoxTemp = 0;

INT8U InCircuitProgrammingFunciton(void){ } DECLARE_EnumValueArray(TrueFalseEnumList) = { {"FALSE", 0}, {"TRUE", 1} }; DECLARE_EnumList(TrueFalseEnumList); DECLARE_EnumValueArray(EnableDisableEnumList) = { {"DISABLED", 0}, {"ENABLED", 1} }; DECLARE_EnumList(EnableDisableEnumList); DECLARE_EnumValueArray(OnOffEnumList) = { {"OFF", 0}, {"ON", 1} }; DECLARE_EnumList(OnOffEnumList);

DECLARE_EnumValueArray(ErrorsEnumList) = { {"Communication Error", 0}, {"Non-volatile Error", 1} }; DECLARE_EnumList(ErrorsEnumList); DECLARE_GlobalEnumListArray(GlobReg) = { DECLARE_GlobalEnumList(TrueFalseEnumList), DECLARE_GlobalEnumList(EnableDisableEnumList), DECLARE_GlobalEnumList(OnOffEnumList) }; DECLARE_ConversionValue(Mult1000Conversion, 0.001, 0, 0, 2000000); DECLARE_ConversionValue(TemperatureConversion, 0.0001527370478983382209188660801564, 0, 0, 0xFFFF); DECLARE_GlobalConversionValueArray(GlobReg) = { DECLARE_GlobalConversionValue(Mult1000Conversion), DECLARE_GlobalConversionValue(TemperatureConversion)

167

}; #define DECLARE_GlobalVariable_Sensor(name, tag) \ DECLARE_GlobalVariable_Group(7, tag), \ DECLARE_GlobalVariable_ReadWrite_Enum(name.enabled, "Enabled", EnableDisableEnumList),\ DECLARE_GlobalVariable_ReadOnly_Conversion(INT32U, name.centerWavelength, "Center Wavelength (nm)", Mult1000Conversion),\ DECLARE_GlobalVariable_ReadOnly(INT16U, name.centerPosition, "Center Position (counts)"),\ DECLARE_GlobalVariable_ReadOnly(INT32S, name.strain, "Strain (ue)"),\ DECLARE_GlobalVariable_ReadOnly(INT16S, name.strainCode, "Strain Code"),\ DECLARE_GlobalVariable_ReadWrite(INT32S, name.strainOffset, "Strain Offset"),\ DECLARE_GlobalVariable_ReadWrite(INT32S, name.strainNumerator, "Strain Numerator"),\ DECLARE_GlobalVariable_ReadWrite(INT32S, name.strainDivisor, "Strain Divisor") DECLARE_GlobalVariableArray(GlobReg) = { DECLARE_GlobalVariable_ReadOnly(INT16U, sensors.nSensors, "n Sensors"), DECLARE_GlobalVariable_ReadOnly_Conversion(INT16S, MemTuneTemp, "MEMTune TOF Temperature (C)", TemperatureConversion), DECLARE_GlobalVariable_ReadOnly_Conversion(INT16S, SLDTemp, "Inphenix SLD Temperature (C)", TemperatureConversion), DECLARE_GlobalVariable_ReadOnly_Conversion(INT16S, SLDCurrent, "Inphenix SLD Current (A)", TemperatureConversion), DECLARE_GlobalVariable_ReadOnly_Conversion(INT16S, BoxTemp, "Box Temperature (C)", TemperatureConversion), DECLARE_GlobalVariable_Sensor(sensors.fbg[0],"Sensor 1"), DECLARE_GlobalVariable_Sensor(sensors.fbg[1],"Sensor 2"), DECLARE_GlobalVariable_Sensor(sensors.fbg[2],"Sensor 3"), DECLARE_GlobalVariable_Sensor(sensors.fbg[3],"Sensor 4"), DECLARE_GlobalVariable_Sensor(sensors.fbg[4],"Sensor 5"), DECLARE_GlobalVariable_Sensor(sensors.fbg[5],"Sensor 6") //DECLARE_GlobalVariable_Function(prescan,"Calibrate Now") }; SBlockMemory16 FileBlockMemory; DECLARE_GlobalRegistry(GlobReg, FileBlockMemory); SUART EUIUARTComm; SEUICommunicationPort UARTEUICommunication; SDIO1 CommunicationLEDDIO1; DECLARE_ExternalUserInterface(EUInterface, GlobReg, UARTEUICommunication, CommunicationLEDDIO1, 500, InCircuitProgrammingFunciton, 256, 512); // ------------------ END NITTA GUI STARTUP -------------------void CheckCAN(void); void main(void) { Uint16 i=0, j=0; SEUICommunicationToken Tokens[16]; INT8U Buffer[16]; Uint32 Counter = 0; INT8U Length; DisableDog();

168

XintfRegs.XTIMING7.all = 0x0003E225; XintfRegs.XBANK.all = 0x800F; // set up DSP peripheral hardware to known initial state initPeripherals(); initGui(); // set up DSP scan routines initScanRoutines(); // warm up delay (10s) for SLD, tunable filter temperature stabalization DELAY_US(1000000);

spiaTxRx(0xFFFF, &j); for (i = 0; i < 0xF000; i+=0x1000) { spiaTxRx(i, &j); } spiaTxRx(0xFFFF,&j);

// execute pre-scan prescan();

// continuous scan while (1) { if (sensors.nSensors != 0) { for (i = 0; i < sensors.nSensors; i++) { if (sensors.fbg[i].enabled == SENSOR_ENABLED) { scanSensor(sensors.fbg+i); } //ExternalUserInterfaceParse(&EUInterface); CheckCAN(); } } else { while (1){ Counter++; if(0 == (Counter & 0x3FFFF)){ GpioDataRegs.GPFTOGGLE.bit.GPIOF14 = 1; } ExternalUserInterfaceParse(&EUInterface); CheckCAN(); } } ExternalUserInterfaceParse(&EUInterface); // toggle LED //GpioDataRegs.GPFTOGGLE.bit.GPIOF14 = 1; } } void CheckCAN(void){ Uint32 Temp; Uint16 Temperatures[4]; Temp = ECanaRegs.CANRMP.all; if(Temp){

169

SLDCurrent = Temperatures[0] = ECanaMboxes.MBOX0.MDL.word.HI_WORD; SLDTemp = Temperatures[1] = ECanaMboxes.MBOX0.MDL.word.LOW_WORD; MemTuneTemp = Temperatures[2] = ECanaMboxes.MBOX0.MDH.word.HI_WORD; BoxTemp = Temperatures[3] = ECanaMboxes.MBOX0.MDH.word.LOW_WORD; ECanaRegs.CANRMP.all = Temp; } } void InitCAN(void){ EALLOW; GpioMuxRegs.GPFMUX.bit.CANTXA_GPIOF6 = 1; GpioMuxRegs.GPFMUX.bit.CANRXA_GPIOF7 = 1; /* Configure eCAN RX and TX pins for eCAN transmissions using eCAN regs*/ ECanaRegs.CANTIOC.bit.TXFUNC = 1; ECanaRegs.CANRIOC.bit.RXFUNC = 1; /* Configure eCAN for HECC mode - (reqd to access mailboxes 16 thru 31) */ // HECC mode also enables time-stamping feature ECanaRegs.CANMC.bit.SCB = 1; /* Initialize all bits of 'Master Control Field' to zero */ // Some bits of MSGCTRL register come up in an unknown state. For proper operation, // all bits (including reserved bits) of MSGCTRL must be initialized to zero ECanaMboxes.MBOX0.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX1.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX2.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX3.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX4.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX5.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX6.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX7.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX8.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX9.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX10.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX11.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX12.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX13.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX14.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX15.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX16.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX17.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX18.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX19.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX20.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX21.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX22.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX23.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX24.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX25.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX26.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX27.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX28.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX29.MSGCTRL.all = 0x00000000; ECanaMboxes.MBOX30.MSGCTRL.all = 0x00000000;

170

ECanaMboxes.MBOX31.MSGCTRL.all = 0x00000000; // TAn, RMPn, GIFn bits are all zero upon reset and are cleared again // as a matter of precaution. /* Clear all TAn bits */ ECanaRegs.CANTA.all = 0xFFFFFFFF; /* Clear all RMPn bits */ ECanaRegs.CANRMP.all = 0xFFFFFFFF; /* Clear all interrupt flag bits */ ECanaRegs.CANGIF0.all = 0xFFFFFFFF; ECanaRegs.CANGIF1.all = 0xFFFFFFFF; /* Configure bit timing parameters */ ECanaRegs.CANMC.bit.CCR = 1 ; while(ECanaRegs.CANES.bit.CCE != 1 ) {}

// Set CCR = 1 // Wait for CCE bit to be set..

ECanaRegs.CANBTC.bit.BRPREG = 39; //39 + 1 = 40 == 250 kbps ECanaRegs.CANBTC.bit.TSEG2REG = 2; ECanaRegs.CANBTC.bit.TSEG1REG = 10; ECanaRegs.CANMC.bit.CCR = 0 ; ECanaRegs.CANMC.bit.PDR = 0; ECanaRegs.CANMC.bit.DBO = 0; ECanaRegs.CANMC.bit.WUBA = 0; ECanaRegs.CANMC.bit.CDR = 0; ECanaRegs.CANMC.bit.ABO = 1; ECanaRegs.CANMC.bit.STM = 0; ECanaRegs.CANMC.bit.SRES = 0; ECanaRegs.CANMC.bit.MBNR = 0; while(ECanaRegs.CANES.bit.CCE != 0 ) {} cleared.. ECanaRegs.CANGAM.all = 0x9FFFFFFF; ECanaLAMRegs.LAM0.all = 0x9FFFFFFF; ECanaRegs.CANMD.all = 0x01; ECanaRegs.CANME.all = 0x01; MSGIDs

// Set CCR = 0

// Wait for CCE bit to be

// Required before writing the

EDIS; } retErr initPeripherals(void) { MemCopy(&RamfuncsLoadStart, &RamfuncsLoadEnd, &RamfuncsRunStart);

// this function calls the inits of each peripheral driver used in this application InitSysCtrl(); InitAdc(); InitSpi(); //InitSci(); EALLOW;

171

GpioMuxRegs.GPFMUX.bit.SCIRXDA_GPIOF5 GpioMuxRegs.GPFMUX.bit.SCITXDA_GPIOF4 GpioMuxRegs.GPGMUX.bit.SCIRXDB_GPIOG5 GpioMuxRegs.GPGMUX.bit.SCITXDB_GPIOG4

= = = =

1; 1; 1; 1;

EDIS; InitGpio(); InitPieVectTable(); InitFlash(); InitCAN(); return ERR_OK; } retErr initGui(void) { OSStart(); LEDDIO1Create(&CommunicationLEDDIO1); TIBlockMemory16Create(&FileBlockMemory); BlockMemoryOpen(&FileBlockMemory); GlobalRegistryInitialization(&GlobReg); //UARTEUICommunication TIUARTCreate(1,&EUIUARTComm); UARTEUICommunicationPortCreate(&EUIUARTComm,57600,0,&UARTEUICommunication); ExternalUserInterfaceInit(&EUInterface); return ERR_OK; }

172

// //

dspScanner_adcRoutines.c W. Allan

#include "DSP281x_Device.h" #include "dspScanner1.h" #include "DSP281x_Examples.h" retErr adcConfig(void) { AdcRegs.ADCTRL1.bit.ACQ_PS = 2; AdcRegs.ADCMAXCONV.bit.MAX_CONV2 = 7; AdcRegs.ADCCHSELSEQ3.bit.CONV08 = 8; AdcRegs.ADCCHSELSEQ3.bit.CONV09 = 8; AdcRegs.ADCCHSELSEQ3.bit.CONV10 = 8; AdcRegs.ADCCHSELSEQ3.bit.CONV11 = 8; AdcRegs.ADCCHSELSEQ4.bit.CONV12 = 8; AdcRegs.ADCCHSELSEQ4.bit.CONV13 = 8; AdcRegs.ADCCHSELSEQ4.bit.CONV14 = 8; AdcRegs.ADCCHSELSEQ4.bit.CONV15 = 8;

// sample for longer time // // // //

analog analog analog analog

channel channel channel channel

B1 B1 B1 B1

return ERR_OK; } retErr adcSampleCh0(Uint16 *data) { AdcRegs.ADCTRL2.bit.SOC_SEQ1 = 1; conversion

// manually start

while (AdcRegs.ADCST.bit.SEQ1_BSY==1); complete

// wait for conversion to

*data = AdcRegs.ADCRESULT0 >> 4;

// store 12-bit result

return ERR_OK; } Uint16 AdcBuffer[8]; retErr adcSampleChB0(Uint16 *data) { Uint32 adcTemp = 0; Uint16 i=0, j, tmp, noswap; AdcRegs.ADCTRL2.bit.RST_SEQ2 = 1; while (AdcRegs.ADCST.bit.SEQ2_BSY); AdcRegs.ADCTRL2.bit.SOC_SEQ2 = 1; conversion

// reset sequencer

// manually start

DELAY_US(5); while (AdcRegs.ADCST.bit.SEQ2_BSY) { i++; }; // wait for conversion to complete DELAY_US(5); // average the ADC values /* adcTemp = AdcRegs.ADCRESULT8; adcTemp += AdcRegs.ADCRESULT9;

173

adcTemp adcTemp adcTemp adcTemp adcTemp adcTemp

+= += += += += +=

AdcRegs.ADCRESULT10; AdcRegs.ADCRESULT11; AdcRegs.ADCRESULT12; AdcRegs.ADCRESULT13; AdcRegs.ADCRESULT14; AdcRegs.ADCRESULT15;

adcTemp = adcTemp >> 3; */ AdcBuffer[0] = AdcRegs.ADCRESULT8; AdcBuffer[1] = AdcRegs.ADCRESULT9; AdcBuffer[2] = AdcRegs.ADCRESULT10; AdcBuffer[3] = AdcRegs.ADCRESULT11; AdcBuffer[4] = AdcRegs.ADCRESULT12; AdcBuffer[5] = AdcRegs.ADCRESULT13; AdcBuffer[6] = AdcRegs.ADCRESULT14; AdcBuffer[7] = AdcRegs.ADCRESULT15; do{

// result

noswap = 1; for(j = 0; j < 7; j++){ if(AdcBuffer[j] > AdcBuffer[j+1]){ tmp = AdcBuffer[j]; AdcBuffer[j] = AdcBuffer[j+1]; AdcBuffer[j+1] = tmp; noswap = 0; } } }while(!noswap); *data = AdcBuffer[7]; *data = AdcRegs.ADCRESULT8; // send back 12-bit DELAY_US(5); return ERR_OK;

}

//

174

// DSP Scanner - CAN Router // W. Allan / C. Nitta #include "DSP281x_Device.h" #include "dspScanner1.h" interrupt void ecanRxMboxIsr(void); void initCANRouter(void) { // this function sets up the eCAN hardware and router functions // Map ECAN isr to my own function EALLOW; PieVectTable.ECAN0INTA = &ecanRxMboxIsr; EDIS; // set up Pie control registers and CPU interrupts to fire ECAN interrupts PieCtrlRegs.PIECRTL.bit.ENPIE = 1; // Enable the PIE block PieCtrlRegs.PIEIER9.bit.INTx5=1; // Enable PIE Group 9, INT 5 (ECAN0INT) PieCtrlRegs.PIEIER9.bit.INTx6=1; // Enable PIE Group 9, INT 6 (ECAN1INT) IER |= 0x0100; // Enable CPU INT9 EINT; // Enable Global Interrputs } interrupt void ecanRxMboxIsr(void) { int i = 1; // for each possible message box if ( ECanaRegs.CANRMP.all & (1<<(i-1)) ) { // there's a message in the ith mailbox } // reset interrupt flag } void parseCANMessage(Uint16 messageID) { // if it's a REQUEST message, find out which type // if it's a REQUEST SINGLE STRAIN VALUE message, reply with requested strain value // if it's a REQUEST KERNEL DATA message, reply with kernel values // if it's a REQUEST SCAN SETTINGS message, reply with scan settings for single sensor

// if it's a SCAN message // if it's a SCAN SINGLE SENSOR command, scan the sensor and return the value // if it's a SCAN KERNEL command, scan the kernel

175

// if it's a SCAN CONTINUOUS command, set up for continuous scan and enable/disable scanning

// if it's a SET message // if it's a SET SCAN SETTINGS command, set the scanner settings // if it's a SET SYSTEM SETTINGS command, set the system settings }

176

// DSP Scanner - Scan Routines // W. Allan #include "DSP281x_Device.h" #include "dspScanner1.h" #include "DSP281x_Examples.h"

// DSP281x Examples Include File

Uint16 adcVal; Uint16 prescanBuff[SIZE_PRESCAN_AVGBUFF]; average int32 strain;

// space for running

retErr initScanRoutines(void) { int i; adcCount = 0; ADC sampling

// reset counter for auto

for (i = 0; i < SIZE_PRESCAN_AVGBUFF; i++) { prescanBuff[i] = 0; } for (i = 0; i < SIZE_MAX_NSENSORS; i++) { // initialize each sensor structure sensorInit(&sensors.fbg[i]); } sensors.tuneV0 sensors.tuneV1 sensors.tuneV2 sensors.tuneV3 sensors.tuneV4

= = = = =

15913; 67398; -13098; 10125; -596;

// E-1 // E-6 // E-5 // E-7 // E-7

return ERR_OK; } extern retErr scannerCorrelateA(Uint16 *x, Uint16 sizex, Uint16 *h, Uint16 sizeh, Uint32 *cBuff, Uint16 sizec) ; #pragma CODE_SECTION (scannerCorrelate,"ramfuncs") retErr scannerCorrelate(Uint16 *x, Uint16 sizex, Uint16 *h, Uint16 sizeh, Uint32 *cBuff, Uint16 sizec) { //x: signal scan //h: kernel //cbuff: correlation output // want to convolve X with H /* Uint16 i,j; Uint32 Sum32; // set LED GpioDataRegs.GPFSET.bit.GPIOF14 = 1; // zero out cBuff for (i = 0; i < sizec; i++) { cBuff[i] = 0; } for (i = 0; i < sizex-sizeh; i++) { for (j = 0; j < sizeh; j++) {

177

cBuff[i] += (Uint32)h[j] * x[i+j]; } } // clear LED GpioDataRegs.GPFCLEAR.bit.GPIOF14 = 1; */ Uint16 OuterCount, InnerCount; Uint32 Sum32; Uint32 *CBuffPtr; Uint16 *HPtr, *XOuterPtr, *XInnerPtr; // set LED GpioDataRegs.GPFSET.bit.GPIOF14 = 1; OuterCount = sizec; CBuffPtr = cBuff; // zero out cBuff while(OuterCount--){ *CBuffPtr++ = 0; } OuterCount = sizex - sizeh; XOuterPtr = x; do{ HPtr = h; XInnerPtr = XOuterPtr++; Sum32 = 0; InnerCount = sizeh; do{ Sum32 += (*(HPtr++)) * (*(XInnerPtr++)); }while(--InnerCount); *(CBuffPtr++) = Sum32; }while(--OuterCount); // clear LED GpioDataRegs.GPFCLEAR.bit.GPIOF14 = 1; return ERR_OK; } retErr findMax(Uint16 *data, Uint16 dataSize, Uint16 *max, Uint16 *offset) { Uint16 i = 0; *max=0; *offset = 0; for (i = 0; i < dataSize; i++) { if (*max < data[i]) { *max = data[i]; *offset = i; } } return ERR_OK; }

retErr findMax32(Uint32 *data, Uint16 dataSize, Uint32 *max, Uint16 *offset) { Uint16 i = 0; *max = 0; *offset = 0;

178

for (i = 0; i < dataSize; i++) { if (*max < data[i]) { *max = data[i]; *offset = i; } } return ERR_OK; }

retErr sensorInit(sFBG *s) { s->coarseStepSize = DEFAULT_COARSE; s->fineStepSize = DEFAULT_FINE; s->fineWindowSize = DEFAULT_WINDOW; s->kernelSize = DEFAULT_KERNEL; s->tstamp = 0; s->delta = 0; s->zeroStrainOffset = 0; s->strain = 0; s->strainOffset = 0; s->strainNumerator = DEFAULT_NUMERATOR; s->strainDivisor = DEFAULT_DIVISOR; return ERR_OK; } retErr scanKernel(sFBG *s) { Uint16 i; Uint16

bSize, cMax,

// size of temporary buffer // value of maximum in fine

cOffset;

// location of maximum in fine

scan scan // initialize values of sensor // must have already detected 'center position' and stored in *s s->startDomain = s->centerPosition - DEFAULT_WINDOW/2; s->endDomain = s->centerPosition + DEFAULT_WINDOW/2; // scan over the default window size to find the sensor scanRange(s->startDomain, s->endDomain, s->fineStepSize, &bSize, scanBuff); // find the peak location of the previous scan findMax(scanBuff, bSize, &cMax, &cOffset); s->centerPosition = s->startDomain + cOffset; s->centerWavelength = sampleToWavelength(s->centerPosition); s->startDomain = s->centerPosition - SIZE_MAX_KBUFF/2; cheating here for convenience... s->endDomain = s->centerPosition + SIZE_MAX_KBUFF/2; ...overwritten later

// //

// the peak is cOffset steps from the start // now zoom in on this area and scan scanRange(s->startDomain, s->endDomain, s->fineStepSize, &bSize, s>kernelData);

179

filterAvg(s->kernelData,bSize,8); findMax(s->kernelData, bSize, &cMax, &cOffset); // offset of peak value (center of sensor) within kernel window s->zeroStrainOffset = (int16) cOffset; // ADJUST SCAN DOMAIN HERE--------------------------------------------------------------// divide by 6 because of ... memory constraints? // results in domain of +/- 2730 or 5460 total s->startDomain = s->centerPosition - (SIZE_MAX_SBUFF * s>coarseStepSize)/6; s->endDomain = s->centerPosition + (SIZE_MAX_SBUFF * s>coarseStepSize)/6; return ERR_OK; } #define SIZE_MAX_FILTER_WINDOW

16

retErr filterAvg(Uint16 *data, Uint16 dataSize, Uint16 windowSize) { Uint16 i, j, WindowOffset; Uint32 Temp; Uint16 FilterWindow[SIZE_MAX_FILTER_WINDOW]; WindowOffset = windowSize/2; for(i = 0; i < WindowOffset; i++){ FilterWindow[i] = data[0]; } while(i < windowSize){ FilterWindow[i] = data[i - WindowOffset]; i++; }

for (i = 0; i < dataSize; i++) { if(i >= (dataSize - WindowOffset)){ FilterWindow[i % windowSize] = data[dataSize - 1]; } else{ FilterWindow[i % windowSize] = data[i + WindowOffset]; } Temp = 0; for (j = 0; j < windowSize; j++) { Temp += FilterWindow[j]; } data[i] = Temp/windowSize; } /* for (; i < dataSize; i++) { filterBuffer[i] = 0; } // copy back over for (i = 0; i < dataSize; i++) { data[i] = filterBuffer[i]; } */ return ERR_OK; }

180

retErr filterAvg32(Uint32 *data, Uint16 dataSize, Uint16 windowSize) { Uint16 i, j, WindowOffset; Uint32 Temp; Uint32 FilterWindow[SIZE_MAX_FILTER_WINDOW]; WindowOffset = windowSize/2; for(i = 0; i < WindowOffset; i++){ FilterWindow[i] = data[0]; } while(i < windowSize){ FilterWindow[i] = data[i - WindowOffset]; i++; }

for (i = 0; i < dataSize; i++) { if(i >= (dataSize - WindowOffset)){ FilterWindow[i % windowSize] = data[dataSize - 1]; } else{ FilterWindow[i % windowSize] = data[i + WindowOffset]; } Temp = 0; for (j = 0; j < windowSize; j++) { Temp += FilterWindow[j]; } data[i] = Temp/windowSize; } /* for (; i < dataSize; i++) { filterBuffer[i] = 0; } // copy back over for (i = 0; i < dataSize; i++) { data[i] = filterBuffer[i]; } */ return ERR_OK; }

retErr scanSensor(sFBG *s) { Uint32 correlationMax; correlation results

Uint16

// max value of

bSize, cMax,

// size of scan buffer // value of maximum in

cOffset,

// location of maximum in

fSize,

// size of fine scan

coarse scan results coarse scan results buffer fScanCenter,

// center of fine domain determined by

coarse scan fScanStart, domain determined by coarse scan fScanEnd, domain determined by coarse scan

// start of fine scan // end of fine scan

181

correlationOffset;

// returned location of

correlation result int16 correlationOffsetS = 0;

// signed version of correlation

result // coarse scan of sensor range scanRange(s->startDomain , s->endDomain, s->coarseStepSize, &bSize, scanBuff); // find peak findMax(scanBuff, bSize, &cMax, &cOffset); // set up window to zoom in around peak fScanCenter = s->startDomain + cOffset * s->coarseStepSize; fScanStart = fScanCenter - s->fineWindowSize/2; fScanEnd = fScanCenter + s->fineWindowSize/2; // fine scan scanRange(fScanStart, fScanEnd, s->fineStepSize, &fSize, scanBuff); #ifdef USE_FILTERING filterAvg(scanBuff,fSize,16); #endif // correlate to kernel GpioDataRegs.GPFSET.bit.GPIOF14 = 1; scannerCorrelateA(scanBuff, fSize, s->kernelData, s->kernelSize, cBuff, SIZE_MAX_CBUFF); GpioDataRegs.GPFCLEAR.bit.GPIOF14 = 1; #ifdef USE_FILTERING filterAvg32(cBuff, SIZE_MAX_CBUFF - SIZE_MAX_KBUFF, 16); #endif findMax32(cBuff, SIZE_MAX_CBUFF - SIZE_MAX_KBUFF, &correlationMax, &correlationOffset); correlationOffsetS = correlationOffset; // convert to signed //correlationOffsetS = correlationOffsetS - ((s->fineWindowSize SIZE_MAX_KBUFF) / 2) ; //- s->zeroStrainOffset; //correlationOffsetS = correlationOffsetS + ((int32)fScanCenter (int32)s->centerPosition) + (((int32)s->fineWindowSize - SIZE_MAX_KBUFF) / 2); //- s->zeroStrainOffset; //correlationOffsetS = correlationOffsetS + s->zeroStrainOffset; //strain = ( sampleToWavelength(s->centerPosition + correlationOffsetS) - s->centerWavelength ); strain = ( sampleToWavelength(correlationOffsetS + s->zeroStrainOffset + fScanStart) - s->centerWavelength ); s->strainCode = (int32)(correlationOffset + s->zeroStrainOffset + fScanStart) - s->centerPosition; // apply overrides strain += s->strainOffset; s->strain = (strain * s->strainNumerator) / s->strainDivisor; return ERR_OK; }

retErr scanRange(Uint16 start, Uint16 end, Uint16 step, Uint16 *bSize, Uint16 *b) { // scan over a range and store in buffer 'b'

182

Uint16 i = 0; Uint16 j=0; Uint16 bCounter = 0; *bSize = (end-start)/step; adcCount = 0;

// reset auto counter

scanPhotodiode(start,&adcVal); DELAY_US(TIME_SETTLE); for (j = 0; j < SIZE_PRESCAN_AVGBUFF; j++) { scanPhotodiode(start,&adcVal); } for (i = start; i < end; i+=step) { scanPhotodiode (i, &adcVal); b[bCounter++] = adcVal; } return ERR_OK; }

retErr setDac(Uint16 data) { spiaTx(data); return ERR_OK; } retErr scanPhotodiode (Uint16 i, Uint16 *a) { Uint32 adcValTemp = 0; Uint32 Temp = 0; Uint16 j; for(j = 0; j < SIZE_MAX_OVERSAMP; j++){ spiaTxRx(i, a); Temp += *a; } *a = Temp; for (j= 0; j < SIZE_PRESCAN_AVGBUFF-1; j++) { // shift bufer down by one prescanBuff[j] = prescanBuff[j+1]; adcValTemp += prescanBuff[j]; } prescanBuff[SIZE_PRESCAN_AVGBUFF-1] = *a; *a = (adcValTemp + *a) / SIZE_PRESCAN_AVGBUFF / 4; //*a = *a >> 2; /* spiaTxRx(i,a); adcSampleChB0(a); *a = *a>>4; 16-bit result register */

// contents stored in upper 12 bits of

183

return ERR_OK; } retErr prescan(void) { Uint16 Uint16 Uint16 Uint16 Uint16 Uint16 Uint16

oldAdcVal, adcValTemp; i,j; bSize; edgeThreshold = 0; peak, offset; adcMaxVal = 0; adcMinVal = 0xFFFF;

sensors.nSensors = 0; adcVal = 0; oldAdcVal = 0; adcValTemp = 0; // since ScanKernel writes over global adcVal //first, see what the maximum and minimum analog value are // we'll tune the edge finding algorithm appropriately for (i = PRESCAN_START_INDEX; i < PRESCAN_END_INDEX; i += SIZE_PRESCAN_STEP) { scanPhotodiode(i, &adcVal); if (adcVal > adcMaxVal) { adcMaxVal = adcVal; } if (adcVal < adcMinVal) { adcMinVal = adcVal; } } edgeThreshold = (adcMaxVal + adcMinVal) / 2;

// scan over entire bandwidth and find any peaks // map each peak to a sensor and fill in corresponding structure // jump to start and wait for filter to settle i = PRESCAN_START_INDEX; scanPhotodiode(i, &adcVal); DELAY_US(TIME_SETTLE); for (j = 0; j < SIZE_PRESCAN_AVGBUFF; j++) { scanPhotodiode(i, &adcVal); } for (i = PRESCAN_START_INDEX; i < PRESCAN_END_INDEX; i += SIZE_PRESCAN_STEP) { // move tunable filter to next wavelength scanPhotodiode(i, &adcVal); // check if on rising or falling edge if ( (adcVal >= edgeThreshold) && (oldAdcVal-30 < edgeThreshold) ) { // assume we hit a rising edge, so search for peak while (adcVal >= oldAdcVal) {

184

// keep scanning forward until lower value is found oldAdcVal = adcVal; i+=SIZE_PRESCAN_STEP; scanPhotodiode(i, &adcVal); } // assume peak is now found // increment number of sensors, store location, and scan kernel... sensors.nSensors++; // coarse approximation: sensors.fbg[sensors.nSensors-1].centerPosition = i; //sensors.fbg[sensors.nSensors-1].centerWavelength = sampleToWavelength(i); sensors.fbg[sensors.nSensors-1].enabled = SENSOR_ENABLED; } oldAdcVal = adcVal; } scanPhotodiode(0xFFFF,&adcVal); for (i = 0; i < sensors.nSensors; i++) { scanKernel(sensors.fbg + i); } return ERR_OK; } //

185

// //

dspScanner_sciRoutines.c W. Allan

#include "DSP281x_Device.h" #include "dspScanner1.h" //------------------------------------------Transmit / receive retErr sciaTx(Uint16 data) { // if buffer is full, return an error if (SciaRegs.SCICTL2.bit.TXRDY == 0) { return ERR_SCI_TXFULL; } // otherwise, send out data and return OK SciaRegs.SCITXBUF = data; return ERR_OK; } retErr scibTx(Uint16 data) { // if buffer is full, return an error if (ScibRegs.SCICTL2.bit.TXRDY == 0) { return ERR_SCI_TXFULL; } // otherwise, send out data and return OK ScibRegs.SCITXBUF = data; return ERR_OK; } retErr sciaRx(Uint16 *data) { // if receive buffer empty, return error code if (SciaRegs.SCIRXST.bit.RXRDY == 1) { return ERR_SCI_RXEMPTY; } // otherwise store contents in *data *data = SciaRegs.SCIRXBUF.all; return ERR_OK; }

retErr scibRx(Uint16 *data) { // if receive buffer empty, return error code if (ScibRegs.SCIRXST.bit.RXRDY == 1) { return ERR_SCI_RXEMPTY; } // otherwise store contents in *data *data = ScibRegs.SCIRXBUF.all; return ERR_OK; } //------------------------------------------Transmit enable/disable

186

retErr sciaTxEnable(void) { SciaRegs.SCICTL1.bit.TXENA = 1; return ERR_OK; } retErr sciaTxDisable(void) { SciaRegs.SCICTL1.bit.TXENA = 0; return ERR_OK; } retErr scibTxEnable(void) { ScibRegs.SCICTL1.bit.TXENA = 1; return ERR_OK; } retErr scibTxDisable(void) { ScibRegs.SCICTL1.bit.TXENA = 0; return ERR_OK; } //------------------------------------------Receive enable/disable retErr sciaRxEnable(void) { SciaRegs.SCICTL1.bit.RXENA = 1; return ERR_OK; } retErr sciaRxDisable(void) { SciaRegs.SCICTL1.bit.RXENA = 0; return ERR_OK; } retErr scibRxEnable(void) { ScibRegs.SCICTL1.bit.RXENA = 1; return ERR_OK; } retErr scibRxDisable(void) { ScibRegs.SCICTL1.bit.RXENA = 0; return ERR_OK; } //------------------------------------------Utilities retErr sciaSetBaudRate(Uint16 baud) { switch (baud) { case (SCI_BAUD_2400): SciaRegs.SCIHBAUD = 0x07; SciaRegs.SCILBAUD = 0xA0; break; case (SCI_BAUD_4800): SciaRegs.SCIHBAUD = 0x03; SciaRegs.SCILBAUD = 0xD0; break; case (SCI_BAUD_9600): SciaRegs.SCIHBAUD = 0x01; SciaRegs.SCILBAUD = 0xE7; break; case (SCI_BAUD_19200):

187

SciaRegs.SCIHBAUD = 0x00; SciaRegs.SCILBAUD = 0xF3; break; case (SCI_BAUD_28800): SciaRegs.SCIHBAUD = 0x00; SciaRegs.SCILBAUD = 0xA2; break; case (SCI_BAUD_38400): SciaRegs.SCIHBAUD = 0x00; SciaRegs.SCILBAUD = 0x79; break; case (SCI_BAUD_57600): SciaRegs.SCIHBAUD = 0x00; SciaRegs.SCILBAUD = 0x50; break; case (SCI_BAUD_115200): SciaRegs.SCIHBAUD = 0x00; SciaRegs.SCILBAUD = 0x28; break; default: SciaRegs.SCIHBAUD = 0x01; SciaRegs.SCILBAUD = 0xE7; break; } return ERR_OK; }

retErr scibSetBaudRate(Uint16 baud) { switch (baud) { case (SCI_BAUD_2400): ScibRegs.SCIHBAUD = 0x07; ScibRegs.SCILBAUD = 0xA0; break; case (SCI_BAUD_4800): ScibRegs.SCIHBAUD = 0x03; ScibRegs.SCILBAUD = 0xD0; break; case (SCI_BAUD_9600): ScibRegs.SCIHBAUD = 0x01; ScibRegs.SCILBAUD = 0xE7; break; case (SCI_BAUD_19200): ScibRegs.SCIHBAUD = 0x00; ScibRegs.SCILBAUD = 0xF3; break; case (SCI_BAUD_28800): ScibRegs.SCIHBAUD = 0x00; ScibRegs.SCILBAUD = 0xA2; break; case (SCI_BAUD_38400): ScibRegs.SCIHBAUD = 0x00;

188

ScibRegs.SCILBAUD = 0x79; break; case (SCI_BAUD_57600): ScibRegs.SCIHBAUD = 0x00; ScibRegs.SCILBAUD = 0x50; break; case (SCI_BAUD_115200): ScibRegs.SCIHBAUD = 0x00; ScibRegs.SCILBAUD = 0x28; break; default: ScibRegs.SCIHBAUD = 0x01; ScibRegs.SCILBAUD = 0xE7; break; } return ERR_OK; } //

189

// //

dspScanner_spiRoutines.c W. Allan

#include "DSP281x_Device.h" #include "DSP281x_Examples.h" #include "dspScanner1.h" retErr spiaTxEnable(void) { SpiaRegs.SPICTL.bit.TALK = 1; return ERR_OK; } retErr spiaTxDisable(void) { SpiaRegs.SPICTL.bit.TALK = 0; return ERR_OK; } retErr spiaSetBaudRate(Uint16 baud) { if (baud == SPI_BAUD_10M) { SpiaRegs.SPIBRR = 3; } else if(baud == SPI_BAUD_2M) { SpiaRegs.SPIBRR = 14;//was 18 } else if(baud == SPI_BAUD_1M) { SpiaRegs.SPIBRR = 36; } else if(baud == SPI_BAUD_500K) { SpiaRegs.SPIBRR = 73; } else if(baud == SPI_BAUD_300K) { SpiaRegs.SPIBRR = 127; } else if((baud > 1)&&(baud < 128)) { // set clock according to BR = LSPCLK/(SPIBRR+1) // default LSPCLK = SYSCLKOUT/4 // default SYSCLKOUT = 150MHz, so LSPCLK = 37.5MHz SpiaRegs.SPIBRR = baud; } else { // value is out of range, so set to 1MHZ // SPIBRR+1 = 37.5 for 1MHz SPI operation, so SPIBRR = ~36 SpiaRegs.SPIBRR = 36; } return ERR_OK; } retErr spiaConfig(sSPIConfig *mySPIConfig) {

return ERR_OK; }

retErr spiaTx(Uint16 data) { SpiaRegs.SPIDAT = data; while (SpiaRegs.SPISTS.bit.BUFFULL_FLAG == 1); DELAY_US(10); return ERR_OK;

190

}

retErr spiaRx(Uint16 *data) { // send out dummy data SpiaRegs.SPIDAT = 0x0000; // wait for RX/TX interrupt flag //while ((SPIST & 0x0040) == 0x0040); *data = SpiaRegs.SPIRXBUF; return ERR_OK; } retErr spiaTxRx(Uint16 tx, Uint16 *rx) { SpiaRegs.SPIDAT = tx; while (SpiaRegs.SPISTS.bit.BUFFULL_FLAG == 1); *rx = SpiaRegs.SPIRXBUF; DELAY_US(2); return ERR_OK; } //

191

// dspscanner_wavelengthTransform.c // W. Allan / C. Nitta // this lookup table maps a DAC value to its corresponding wavelength // the table is stored in FLASH, taking up 0xFFFF bytes of memory // the device has 256k of FLASH #include "DSP281x_Device.h" #include "dspScanner1.h"

Uint32 sampleToWavelength(Uint16 sample) { int16 Idx = sample>>8; // going to use lookup table to approximate wavelength return wavelengthLookup[Idx+1] + (((wavelengthLookup[Idx] wavelengthLookup[Idx+1]) * (0x100 - (sample & 0xFF))) >>8); } // for Nortel MEMTune S/N 020001557, 23.00V Max @ 0xFFFF const Uint32 wavelengthLookup[] = { 1591300 , 1591305 , 1591308 , 1591309 , 1591307 , 1591304 , 1591298 , 1591291 , 1591281 , ... 1539281 1538713 1538142 1537567 1536989 */ //

, , , , };

192

//dspScanner_scanCorrelate.asm //C. Nitta ;retErr scannerCorrelate(Uint16 *x, Uint16 sizex, Uint16 *h, Uint16 sizeh, Uint32 *cBuff, Uint16 sizec) { ; XAR4 AL XAR5 AH SP4 SP-5 .def _scannerCorrelateA .sect "ramfuncs" .global __scannerCorrelateA _scannerCorrelateA: ADDB SP,#20 MOVL *-SP[18],XAR6 MOVL *-SP[16],XAR7 MOVL *-SP[14],XAR4 MOV *-SP[7],AH ;sizeh MOVL *-SP[6],XAR5 ;h MOV *-SP[3],AL ;sizex MOVL *-SP[2],XAR4 ;x ; InnerLoop = sizeh; MOV *-SP[10],AH DEC *-SP[10] ; ; ; ; ; ; ; ; ; ; ; ;

for (i = 0; i < sizec; i++) { cBuff[i] = 0; ZAPA MOVL XAR6,*-SP[24] MOV AL,*-SP[25] LSL AL,1 MOV *-SP[8],AL DEC *-SP[8] RPT *-SP[8] || MOV *XAR6++,P } OuterCount = sizex - sizeh; MOV AL,*-SP[3] SUB AL,*-SP[7] MOV *-SP[9],AL ; CBuffPtr = cBuff; MOVL XAR6,*-SP[24] ; do{ _scannerCorrelateA_doLoop: ; XInnerPtr = XOuterPtr++; MOVL XAR7,*-SP[14] MOVB ACC,#1 ADDL *-SP[14],ACC ; HPtr = h; MOVL XAR5,*-SP[6] ; Sum32 = 0; ZAPA ; do{ RPT *-SP[10] || MAC P,*XAR5++,*XAR7++ ; }while(--InnerCount); ; *CBuffPtr++ = Sum32; MOVL *XAR6++,P ; THIS MAY BE A PROBLEM, NOT SURE IF ++ INCREMENTS BY 1 or 2 for MOVL ; }while(--OuterCount); DEC *-SP[9] BF _scannerCorrelateA_doLoop,NEQ

193

MOVL MOVL MOVB SUBB LRETR

XAR6,*-SP[18] XAR7,*-SP[16] AL,#0 SP,#20

194

[LAST PAGE INTENTIONALLY BLANK]

Design and Characterization of a Fiber Bragg Grating ...

broadband diode and embedded realtime digital signal processor to drive cost down while providing ..... PC-Based Graphical User Interface Detail . ...... however, was a good backup plan at the time in the event that the Code Composer Studio.

5MB Sizes 1 Downloads 227 Views

Recommend Documents

Highly sensitive fiber Bragg grating refractive index ...
Apr 8, 2005 - have been intensively developed due to their many desirable advantages such ... length multiplexing, and distributed sensing possibilities. 1–5.

Highly sensitive fiber Bragg grating refractive index ...
Apr 8, 2005 - Department of Applied Physics, California Institute of Technology, Pasadena, ... advantages such as the small size, absolute measurement ca-.

Fiber-bragg-grating-based dispersion- compensated ...
A pseudo-random-binary-sequence (PRBS) 1023-1 non-return-to zero (NRZ) formats is applied to intensity modulation of WDM channels in 40 Gb/s speed for each channel. The total signal envelope propagates through the fiber span including 100 km. SMF is

Design and characterization of a late-mixing pulsed ...
collimated beams of molecules having cooled internal de- grees of freedom.1 One .... perpendicular to the flight tube and to simplify the data analysis. Several ... for photolysis of the chlorine and provides a center-of-mass collision energy of ...

Design, synthesis and characterization of [1,3,4]thiadiazolo- and [1,2,4 ...
E-mail: [email protected] ... tethered via -O- bridge onto the s-triazine template occurred in a stepwise process as depicted in Schemes 1 and 2.

Status, Prospects, and Strategic Options of Buntal Fiber Industry Fiber ...
Had either elementary or high school education, f ll. d t. d h d ... Average expenses for the province is P171.82 .... technology transfer activities in the future; ...

Numerical optimization of a grating coupler for the ...
tivity of Ag was included to take into account resistive losses in Ag. The input beam was chosen to be of a Gauss- ian profile with a FWHM diameter of 1 m and ...

optical fiber link design pdf
Loading… Page 1. Whoops! There was a problem loading more pages. optical fiber link design pdf. optical fiber link design pdf. Open. Extract. Open with.

Identification and characterization of a PHGPX gene ...
vine serum albumin (BSA) as a standard. SDS-PAGE analysis. An equal amount of each protein sample (35 µg) was loaded on 12–. 15 % gradient SDS-PAGE ...

Grating coupled vertical cavity optoelectronic devices
Feb 26, 2002 - This application is a continuation of application Ser. ... the expense of a larger threshold current. ..... matriX calculation for a slab Waveguide.

Towards a characterization and understanding of ...
technology; (b) new pedagogy which abandons an “information transfer” ..... Keitel and K. Ruthven (Eds.), Learning from Computers: Mathematics Education and.

Molecular cloning and characterization of a human PAX ...
Molecular cloning and characterization of a human PAX-7. cDNA expressed in normal and neoplastic myocytes. Beat W.Schafer*, Thomas Czerny1, Michele Bernasconi, Michele Genini and. Meinrad Busslinger1. University of Zurich, Department of Pediatrics, D

Preparation and Characterization of A New Dinuclear ...
Nov 3, 2003 - A new anionic dinuclear ruthenium complex bearing 1,2-bis(diphenylphosphinomethyl)benzene (BDPX). [NH2Et2][{RuCl (BDPX)}2(μ-Cl)3] (1) was synthesized and its structure was determined by an X-ray crystallo- graphic analysis. This result

Catalysis and characterization of a rugged lead ...
A rugged lead ruthenate pyrochlore (Py, Pb2Ru2O6O ) Nafion® 417 membrane catalyst (|NPy|) has been prepared by an in situ precipitation method and characterized by physico-chemical techniques. The Nafion® 417 membrane enhanced the Py crystallizatio

Synthesis and structural characterization of a stable betaine ... - Arkivoc
more than one moiety of a stable radical are called polyradicals, and they .... following typical settings: number of scans 1, centre field 3350 G, sweep field ..... 20. http://www.niehs.nih.gov/research/resources/software/tox-pharm/tools/index.cfm.

Isolation and chemical characterization of PwTx-II: A ...
Sep 23, 2005 - level of the neuromuscular junction of Arthropods in. Toxicon 46 (2005) ..... for trypargine at 7.21, 7.29, 7.51 and 7.62 ppm (Table 1), while the ...

Isolation and characterization of a novel adenosine ... - GitHub
For analysis of ADA inhibition, we prepared ADA .... performance liquid chromatography (HPLC) analysis ... spectral data from infra-red (IR), proton nuclear.

Synthesis and spectroscopic characterization of double ... - Arkivoc
Dec 4, 2016 - with the elaboration at positions 2, 3 or 6, depending on the application ..... CHaHbO), 4.32 (dd, J 5.9, 11.7 Hz, 1H, CHaHbO), 4.80 (d, J2.0 Hz, ...

Characterization and Parameterized Generation of ...
The development of new architectures for Field-Programmable Gate Arrays ..... is analogous to the conclusions of Shew 63] who studied the application of.

SYNTHESIS AND CHARACTERIZATION OF ...
1 Faculty of Chemical Technology, Hanoi University of Technology. 2 Institute of .... their different degrees of ionization depending on pH values. Actually, the ...

Characterization of the Psychological, Physiological and ... - CiteSeerX
Aug 31, 2011 - inhibitors [8], acetylcholine esterase inhibitors [9] and metabolites ...... Data was stored on a dedicated windows XP laptop PC for post.

SYNTHESIS, CHARACTERIZATION AND ANTIBACTERIAL ...
SYNTHESIS, CHARACTERIZATION AND ANTIBACTE ... T C-4 OF 7-HYDROXY-4- METHYL COUMARIN.pdf. SYNTHESIS, CHARACTERIZATION AND ...

Electrochemical Synthesis and Characterization of ...
atom of DPA.[11] The band around .... (1991). Electron localization and charge transport in poly(o-toluidine): A model polyaniline derivative. Phys. Rev. B 43 ...