scieee AI-readable full text Open interactive document viewer

Repositorio Institucional de Documentos

Abstract

Every year there are around 20 earthquakes of magnitude 7 or above . This kind of seismic events are potentially destructive and can cause several structural damage, economic and human loss. In order to perform an efficient risk management and prevention work geophysics must be equipped with suitable software and hardware tools. Seismic studies comprise not only risk management but earth structure studies that are useful in gas and oil prospections. Vibration monitoring has also turned in a very useful scientific approach to deal with structural safety and maintenance. Among these devices, MEMS accelerometer combines great performance with low costs, characteristics that have made it one of the most popular devices when it comes to this task. Seismic analysis software has been developed using LabVIEW. The software decodes SAC data files and retrieves important seismic parameters like arrival wave times, location and magnitude. The precision and performance reached is acceptable for the scope of this project and it could be used as a domestic seismic analyser but not for its use in a professional seismic station. The seismic data for the system evaluation was retrieved from IRIS database. A vibration DAQ and monitoring module has been designed and implemented. It successfully measures and monitors acceleration versus time and the signal’s spectra. Zooming options were included in order to make easier the background noise and ambient vibration study. An instant and maximum earthquake intensity gauge was programmed to give an idea of the experienced event potential danger. The user can selectively save acceleration time responses in LVM format. An analogue output was implemented. It is capable of reading acceleration versus time responses saved in LVM and SAC files and output them using a DAQ card analogue output function. This voltage can be seen in an oscilloscope or input to other devices. In order to acquire and save the analogue waveforms created with the previous function an analogue input was included as an initial objective in the Scheme of Work. However, it was dropped in the final implementation because it was considered that its function was too similar to the vibration DAQ module and it did not have enough practical application. Martínez Larcuén, Mariano; Platt, Simon Philip

Full text

PROYECTO FINAL DE CARRERA Seismic and vibration signal analysis and monitoring using LabVIEW AUTOR Mariano Martínez DIRECTOR Simon Platt(UCLAN) SUPERVISOR UNIV.ZARAGOZA Antonio Bono ESPECIALIDAD Electrónica CONVOCATORIA Junio 2012 Desarrollado en programa de intercambio en: University of Central Lancashire. School of Computing, Engineering and Physical Sciences 2 School of Computing, Engineering and Physical Sciences MARIANO MARTINEZ SEISMIC AND VIBRATION SIGNAL ANALYSIS AND MONITORING USING LabVIEW (EL3990) Submitted in partial satisfaction of the requirements for the degree of Bachelor of Engineering (with Honours) in 1. Electronic Engineering April 2012 I declare that all material contained in this report, including ideas described in the text, computer programs and drawings, is my own work except where explicitly and individually acknowledged. Signed ……………………. Date ………………………. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 3 Abstract Every year there are around 20 earthquakes of magnitude 7 or above (PREPA.R.E, 2008). This kind of seismic events are potentially destructive and can cause several structural damage, economic and human loss. In order to perform an efficient risk management and prevention work geophysics must be equipped with suitable software and hardware tools. Seismic studies comprise not only risk management but earth structure studies that are useful in gas and oil prospections. Vibration monitoring has also turned in a very useful scientific approach to deal with structural safety and maintenance. Among these devices, MEMS accelerometer combines great performance with low costs, characteristics that have made it one of the most popular devices when it comes to this task. (Santoso, 2010). Seismic analysis software has been developed using LabVIEW. The software decodes SAC data files and retrieves important seismic parameters like arrival wave times, location and magnitude. The precision and performance reached is acceptable for the scope of this project and it could be used as a domestic seismic analyser but not for its use in a professional seismic station. The seismic data for the system evaluation was retrieved from IRIS database. (IRIS, 2011) A vibration DAQ and monitoring module has been designed and implemented. It successfully measures and monitors acceleration versus time and the signal’s spectra. Zooming options were included in order to make easier the background noise and ambient vibration study (Attri R. K., 2004). An instant and maximum earthquake intensity gauge was programmed to give an idea of the experienced event potential danger. The user can selectively save acceleration time responses in LVM format. An analogue output was implemented. It is capable of reading acceleration versus time responses saved in LVM and SAC files and output them using a DAQ card analogue output function. This voltage can be seen in an oscilloscope or input to other devices. In order to acquire and save the analogue waveforms created with the previous function an analogue input was included as an initial objective in the Scheme of Work. However, it was dropped in the final implementation because it was considered that its function was too similar to the vibration DAQ module and it did not have enough practical application. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 4 Acknowledgements I would like to take this opportunity to express my gratitude to all the academic staff that has helped me during the development of this final project. Particularly to Simon Platt for sharing his knowledge, the orientation, material lent and the doubts solved. I’d also like to express my gratitude to David Heys in whose SIC tutorial sessions I sometimes had project related enquiries. I would like to show my appreciation to the Stores staff for their kindness, good work and also for the patience showed the busy laboratory days. I wouldn’t like to forget University of Zaragoza professors, as the knowledge obtained in their lessons were essential to bring this project into a conclusion. I would like to show my appreciation to the UCLAN instruction for giving me the opportunity of studying here this year and the budget assigned to buy the materials I needed for the project execution. Many thanks to the Google team as their search tool has saved me enormous amounts of time being a key tool during the great amount of background information I had to research. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 5 Table of contents Abstract ................................................................................................................................................... 3 Acknowledgements ................................................................................................................................. 4 Table of contents .................................................................................................................................... 5 List of tables ............................................................................................................................................ 7 List of equations ...................................................................................................................................... 7 List of figures ........................................................................................................................................... 8 List of abbreviations .............................................................................................................................. 11 1. Introduction .................................................................................................................................. 12 1.1 Motivation ................................................................................................................................... 12 1.2 Aim and objectives ..................................................................................................................... 13 1.3 Scope ........................................................................................................................................... 14 1.4 Literature review ......................................................................................................................... 15 2. Background ................................................................................................................................... 18 2.1 Vibration Monitoring Instrumentation Systems ......................................................................... 18 2.1.1 Introduction and applications ............................................................................................... 18 2.1.2 Instrumentation Systems for Data Acquisition .................................................................... 18 2.1.3 Vibration transducers ........................................................................................................... 19 2.1.4 Accelerometers..................................................................................................................... 20 2.1.5 Acceleration, intensity and damage ..................................................................................... 20 2.2 Seismological data analysis ........................................................................................................ 22 2.2.1 Introduction to earthquakes and seismic waves ................................................................... 22 2.2.2 Measuring and recording seismic data ................................................................................. 24 2.2.3 Seismic Data ........................................................................................................................ 25 2.3.4 Seismic Data in LabVIEW. SAC format ............................................................................. 25 2.3.5 Earthquake parameters computation overview .................................................................... 26 2.3.6 Processing timing parameters .............................................................................................. 28 2.3.7 Processing location parameters ............................................................................................ 30 2.3.8 Processing magnitude parameters ........................................................................................ 31 3. Vibration Monitoring System Design ............................................................................................ 35 3.1 Hardware ..................................................................................................................................... 35 3.1.1 Accelerometer choice ........................................................................................................... 35 3.1.2 DAQ selection ...................................................................................................................... 37 3.1.3 Data acquisition structure..................................................................................................... 39 3.1.4 Signal conditioning .............................................................................................................. 40 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 6 3.1.5 ADXL203EB Evaluation board ........................................................................................... 43 3.1.6 Enclosure and mounting....................................................................................................... 43 3.1.8 PCB ...................................................................................................................................... 45 3.1.9 EMI/EMC considerations .................................................................................................... 46 3.2 Software ...................................................................................................................................... 47 3.2.1 Global software framework ................................................................................................. 47 3.2.2 DAQ ..................................................................................................................................... 47 3.2.3 Axis calibration .................................................................................................................... 47 3.2.4 Earthquake intensity and danger .......................................................................................... 48 3.2.5 Display characteristics and saving options .......................................................................... 49 4. Seismological data analysis software design ................................................................................ 50 4.1 Introduction and Specifications .................................................................................................. 50 4.2 Data format selection .................................................................................................................. 50 4.3 Global software framework ....................................................................................................... 51 4.4 Reading SAC files ....................................................................................................................... 51 4.5 Frequency analysis and optional filtering ................................................................................... 52 4.6 Arrival times ............................................................................................................................... 52 4.6.1 Introduction .......................................................................................................................... 52 4.6.2 Automatic picking ................................................................................................................ 52 4.6.3 Manual picking .................................................................................................................... 55 4.7 Coda length ................................................................................................................................. 55 4.8 Distance to the epicentre ............................................................................................................. 56 4.9 Magnitude ................................................................................................................................... 58 5. Analogue output design ................................................................................................................ 60 6. Vibration monitoring system construction and implementation ................................................. 61 6.1 Hardware ..................................................................................................................................... 61 6.2 Software ...................................................................................................................................... 62 7. Seismological data analysis software implementation ................................................................. 64 8. Analogue output software implementation ................................................................................. 69 9. Dataflow and Interface ................................................................................................................. 70 10. System evaluation and results .................................................................................................. 72 10.1 Vibration DAQ evaluation ........................................................................................................ 72 10.2 Seismic analysis evaluation ...................................................................................................... 75 10.3 Analogue output evaluation ...................................................................................................... 86 11. Future work: Potential improvements and modifications .............................................................. 87 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 7 12. Conclusion ................................................................................................................................. 89 Appendix A: Detailed Seismic analysis software ................................................................................... 91 Appendix B: Detailed Vibration DAQ software ................................................................................... 106 Appendix C: Detailed analogue output software................................................................................ 110 Appendix D: Brief Instructions for use ............................................................................................... 113 Appendix E : Planning documents ...................................................................................................... 117 Appendix F: DAQ Circuit and PCB plans .............................................................................................. 119 Appendix G: DAQ hardware components list ..................................................................................... 126 List of tables Table 2.1:Mercalli intensity scale relationship with PGA (PREPA.R.E, 2008)........................................ 22 Table 2.2 Seismic data global computation .......................................................................................... 27 Table 2.3: Approximate Magnitude vs Size equivalence ..................................................................... 32 Table 3.1: Input range and resolution for NI 6221 ............................................................................... 38 Table 10.1 Software magnitude calculations evaluation. Comparison with magnitude of different data retrieved from ISIS. ....................................................................................................................... 78 Table 10.2 Coda magnitude characteristics verification ....................................................................... 79 Table 10.3Threshold determination for different earthquakes ........................................................... 81 Table 10.4: Automatic and manual picking comparrison ..................................................................... 82 Table G.1 DAQ hardware component list ........................................................................................... 126 List of equations Equation 2.1: STA and LTA equations ................................................................................................... 28 Equation 2.2: Distance formulas ........................................................................................................... 31 Equation 2.3: Local magnitude ............................................................................................................. 32 Equation 2.4: Coda/duration magnitude .............................................................................................. 32 Equation 3.1: Anti-aliasing condition ................................................................................................... 38 Equation 3.2: Satisfactory conversion time demonstration ................................................................. 38 Equation 3.3: Cut-off frequency and added capacitors relationship (Analog Devices, 2011) .............. 41 Equation 3.4: Accelerometer noise ....................................................................................................... 41 Equation 4.1: STA/LTA ratio equations ................................................................................................. 52 Equation 4.2:Coda length...................................................................................................................... 56 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 8 List of figures Figure 1.1: Software main structure ..................................................................................................... 13 Figure 1.2: Global software specifications ............................................................................................ 15 Figure 2.1: DAQ general structure ........................................................................................................ 18 Figure 2.2: Earthquake origin. Image by Taiwanese Central Weather Bureau ( Central Weather Bureau, 2012) ........................................................................................................................................ 23 Figure 2.3: P waves Figure 2.4 S waves .......................................................................................... 24 Figure 2.5: STA LTA algorithm illustration (Han, 2010) ......................................................................... 29 Figure 2.6: Coda length illustration ....................................................................................................... 30 Figure 2.7: Generic depth distance travel time dependence and epicentre plotting (Havskov & Ottemöller, 2010) ................................................................................................................................. 31 Figure 2.8: Coda Magnitude parameters in different areas of the world (Havskov & Ottemöller, 2010) .............................................................................................................................................................. 33 Figure 2.9: Magnitude scale conversion table (Havskov & Ottemöller, 2010) ..................................... 34 Figure 3.1: Hardware block diagram .................................................................................................... 39 Figure 3.2: Schematics design ............................................................................................................... 40 Figure 3.3: Connection scheme used .................................................................................................... 42 Figure 3.4: BNC 2120 GS input ........................................................................................................... 42 Figure 3.5: ADXL Evaluation board........................................................................................................ 43 Figure 3.6:1591XXMS Dimensions ........................................................................................................ 44 Figure 3.7:1591XXMS 3D model ......................................................................................................... 44 Figure 3.8:PCB artwork ......................................................................................................................... 45 Figure 3.9: PCB 3D model...................................................................................................................... 46 Figure 3.10: Vibration DAQ software framework ................................................................................. 47 Figure 3.11: Calibration subroutine flowchart ...................................................................................... 48 Figure 3.12: Magnitude and danger calculator subroutine .................................................................. 48 Figure 4.1 Seismic analysis software specifications .............................................................................. 50 Figure 4.2: Global computation framework (Attri R. K., 2005) ............................................................. 51 Figure 4.3: Read data flowchart ............................................................................................................ 51 Figure 4.4: Automatic Arrival time picking global flowchart ................................................................ 53 Figure 4.5: STA/LTA ratio implementation subroutine flowchart ........................................................ 54 Figure 4.6: STA/LTA one sample subroutine flowchart ........................................................................ 55 Figure 4.7: Pick arrival times subroutine .............................................................................................. 55 Figure 4.8: Coda length subroutine algorithm ...................................................................................... 55 Figure 5.1: Analogue output specifications .......................................................................................... 60 Figure 5.2: Analogue output flowchart ................................................................................................. 60 Figure 6.1 Vibration sensor device without the lid and header on which the evaluation board is mounted ................................................................................................................................................ 61 Figure 6.2: Complete vibration sensor module. ................................................................................... 61 Figure 6.3 code section comprising DAQ assistant and calibration VI .................................................. 62 Figure 6.4: Vibration DAQ front panel .................................................................................................. 62 Figure 6.5: "Intensity and danger Display" VI in the vibration DAQ main code ................................... 63 Figure 7.1Seismic analysis VI front panel .............................................................................................. 64 Figure 7.2Code sections where the mentioned SubVIs are used ......................................................... 65 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 9 Figure 7.3 Seismogram and its spectra ................................................................................................. 65 Figure 7.4 Filtering options in the seismic analysis front panel ............................................................ 66 Figure 7.5 : STA LTA ratio and Pick arrival times VIs in the main seismic code .................................... 66 Figure 7.6 STA/LTA ratio VI front panel. The figure shows an earthquake seismogram, the STA/LTA ratio and the STA and LTA waves for specific L1 and L2 window lengths ........................................... 67 Figure 7.7 Cursors and controls for manual picking in the seismic analysis VI front panel(left) and the loop that actualises coda length and S-P when the use modifies arrival times. ................................. 68 Figure 7.8 "Coda length" VI in the main seismic code .......................................................................... 68 Figure 7.9: Distance to the epicentre subVI placed in the seismic analysis code. ................................ 69 Figure 7.10: Magnitude controls and indicators in the front panel ..................................................... 69 Figure 8.1: Analogue output VI front panel .......................................................................................... 70 Figure 9.1: Example of the event structure continuously used in the software. The External loop keeps it running. The shift registers and local variables can be seen. .................................................. 71 Figure 9.2: Main menu interface .......................................................................................................... 71 Figure 10.1: Hardware system distribution for vibration DAQ and output testing .............................. 72 Figure 10.2: Accelerometer voltage outputs when tilted so that the two axes support different accelerations ......................................................................................................................................... 72 Figure 10.3: DAQ front panel when running ......................................................................................... 73 Figure 10.4: Light table hitting (Y axis) time and frequency responses ................................................ 73 Figure 10.5: Strong enclosure hitting (X axis) time responses .............................................................. 74 Figure 10.6: Strong shaking time and frequency responses ................................................................. 74 Figure 10.7: Heavy shaking time and frequency responses ................................................................. 75 Figure 10.8 Software distance calculations compared to USGS Distance vs S-P time table ................ 77 Figure 10.9: STA/LTA ratio VI front panel ............................................................................................. 80 Figure 10.10: Averaged threshold ......................................................................................................... 82 Figure 10.11: Coda length calculator problem ..................................................................................... 84 Figure 10.12: Nonfiltered seismogram ............................................................................................... 85 Figure 10.13: Seismogram spectra ........................................................................................................ 85 Figure 10.14: Filtered seismogram. Low cut-off = 0. 01 Hz. High cut-off =1 Hz ................................... 85 Figure 10.15: Analogue output front panel running and reading a SAC file. ........................................ 86 Figure 10.16: LVM vibration file reading and analogue output ............................................................ 86 Figure 10.17: SAC file reading and analogue output ........................................................................... 87 Figure A. 1: Seismic analysis VI front panel........................................................................................... 91 Figure A. 2: Seismic analysis VI global structure. Timeout event. ........................................................ 91 Figure A. 3: Seismic analysis VI. Read file event ................................................................................... 92 Figure A.4 Seismic analysis VI. Automatic picking event ...................................................................... 92 Figure A. 5: Seismic analysis VI .Frequency analysis event ................................................................... 93 Figure A. 6:Seismic analysis VI.Filter event ........................................................................................... 93 Figure A.7: Seismic analysis VI. Calculate distance event .................................................................... 94 Figure A.8: Seismic analysis VI. Calculate magnitude event ................................................................. 94 Figure A..9: Seismic analysis VI. Stop event. ......................................................................................... 95 Figure A.10: Read SAC VI icon ............................................................................................................... 96 FigureA.11: Retrieve properties VI block diagram ................................................................................ 97 Figure A.12: STA LTA ratio front panel .................................................................................................. 98 Figure A.13: STA LTA ratio VI Start event and global VI structure ........................................................ 99 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 16 estimated as more suitable. The British institution was chosen for being a local organization, its significance and the clear and simple explanations that it provides. Routine data processing in earthquake seimology (Havskov & Ottemöller, 2010) is one of the key books that have been used. It offers an impresive amount of relevant information, some of it at advanced geo-phisical level but always oriended to readers that not necessarily have previous knowledge about the topic. Its most nottable contributions were the seismic signal measuring and processing, data formats and seismic parameters. Although seismic data format descriptions were found in different sources it was the only resource that gathered all them together and discussed differences and applications. Concerning the data sources, the amount of websites of institutions supplying this information has been greater than expected but only the ones with a clear interface have been pre-selected [ (British Geological Survey, 2012) (European Strong-Motion Database, 2000) (IRIS, 2011) (NIED, 1996) (SCEDC, 2011)]. Some of these pages presented a poor and unclear retrieval display and explanations about the data available. Therefore, they have been discarded. The final data has been retrieved from IRIS and the British Geological Survey. However, after further analysis BGS data exhibited too much noise, probably because most of its sources are non-professional stations located in schools. The small magnitude of the earthquakes in this part of the world sure has contributed to the noisy seismograms. There is a lack of information about the management of earthquake signals with labVIEW, to deal with this kind of data there are standard specific programs and these are more used by the experts of this field.It is not easy to find an earthquake strong motion project developed with LabVIEW in the internet. The development of an analysis program using labVIEW has been measured interesting particularly in two points. As an standard in industry and science it is a key ability in the formation of an engineer so one of the aims of the project is to master this important tool. Also,creating an analysis program using an industry stardard like LabVIEW can be a good contribution to the existing tools as it will make this field more accesible to engineers and scientifics that are not directly related with the world of seismic events. Attri R.K(2005) offers a good approach to the single wave seismic parameters computation. Nevertheless, the occurrence and arrival times computation methods are barely sketched and it is impossible to develop the software from that information. One of his refferences (Munro K. , 2004) details the STA/LTA averaging method and is the thread to a couple of thesis University of Central Lancashire. School of Computing, Engineering and Physical Sciences 17 where different types of arrival pickings techniques as well as other signal processing and analysis procedures are described and evaluated in detail. (Munro K. A., 2005) (Han, 2010). Wenzel et al (2005) explain ambient vibration based methods for structure assesment. Nevertheless, the instrumentation used, approaches and structures assessed are beyond the scope of this project. The accerometers cited measure µg, no low cost accelerometers with that resolution were found. UCLAN discovery gave access to a convenient paper that deals with structural low cost vibration monitoring system (Santoso, 2010). It also provides useful information about MEMS accelerometers. The literature about specifications and usage of accelerometers in this field has been abundant. The most valuable information has been retrieved from practical tips in some internet magazines and private companies notes comprising mounting and parameter description (Endevco, 2006) (Barnes, 2011) (Lent, 2009). The US geological Survey webpage publish important educational material which has been handled for testing – arrival times vs distance tables. It was also the base along with another paper (PREPA.R.E, 2008) to retrieve the earthquake intensity and danger information that was later implemented in the vibration DAQ software. USGS excels giving simple but precise earthquake related parameter definition while the paper provides a worthwhile accelerationintensity relationship. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 18 2. Background 2.1 Vibration Monitoring Instrumentation Systems 2.1.1 Introduction and applications Monitoring and sensing are key processes when investigating or evaluating vibration exposure in scientific, industrial or structural fields. The vibration is originated in the object of study due to its work conditions as for example a bridge while cars are crossing it or some equipment while working with engines attached to them. Sensors are needed to measure this signals. When the input vibration origin is not fully known the tremors are called ambient vibration and the study of the –mostly – noise level produced has a margin of uncertainly. Many manmade structures have what is called a “vibration signature”, behaviour which, if appropriately measured and analysed, can report important data about the load-bearing or damage of a structure (Wenzel & Pichler, 2005). Efficient and economic systems and sensors are increasingly on demand to perform vibration based maintenance and safety monitoring, analysis and evaluation. 2.1.2 Instrumentation Systems for Data Acquisition An instrumentation system for data acquisition (DAQ) that senses, conditions and translates to digital the measured information is needed so that the signal is properly applied to the processing system. Th e fundamentals of DAQ can be seen in the following chart: Figure 2.1: DAQ general structure University of Central Lancashire. School of Computing, Engineering and Physical Sciences 19  Sensors: A sensor translates a physic magnitude into an electric signal that can be read by the commonly used instrumentation. There are common parameters to all of them like range or span, accuracy, precision, tolerance and sensitivity. Linear and nonlinear sensors are available in the market; in almost all circumstances linear sensors are preferred because of its easy handling. Therefore, a linearization process is often carried out on non-linear devices. Several physic magnitudes can be sensed nowadays. More information in 2.1.3 Vibration .  Signal Conditioning: In this stage, the electrical signal measured by the sensor is turned into a signal easier to treat, store, convert to digital or displayed on a screen.  A/D Conversion: The signals in the physic world are analogue, however, today almost all of the processing systems are digital. A circuit that performs the translations is required.  Digital Processing: Depending on the processing, the systems can be classified as centralised, decentralised and distributed. While centralised systems just require one processing stage – and hence, just one computing device – the other two involve a previous processing phase before sending the data to the main computational system. The processing hardware that can handle these includes DSP (Digital Signal Processors), microcontrollers, automatons and even personal computers.  Data Transmission: Frequently, the signal acquired by the DAQ has to be sent a certain distance for its process, display or storage. The common techniques include Electromagnetic waves (radio, infrared…), Laser (fibre optics) and Electrical signals. The signal can be encoded using voltage, current or frequency patterns and can be either digital or analogue. 2.1.3 Vibration transducers There are several motion transducers (motion sensors) that are used in industry for mechanical vibrations measurements. This large set includes:  Potentiometers: Displacement transducers. The output voltage is related to the displacement; 𝑉0=𝑘𝑥. Where k is a constant and x the displacement.  Variable inductance transducers: They are based on the following principle. When a flux linkage changes within an electrical conductor a voltage is generated. If the flux change is caused by motion, the mechanical energy is converted into electrical energy and hence, motion parameters are related with electrical magnitudes. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 20  Self-induction transducers: Based on the change of self-inductance when moving a ferromagnetic object in a magnetic field.  Variable capacitance transducers: Transducers where displacement, velocity or acceleration depend on a capacitance.  Piezoelectric transducers: Uses the piezoelectric characteristic of some materials. These materials generate an electrical charge that implies potential difference when exposed to mechanical stress. (De Silva, 2007) 2.1.4 Accelerometers Accelerometers are transducers of acceleration into a proportional voltage. The most usual technologies are: o Piezoelectric accelerometers o Piezoresistive accelerometers o Variable capacitance accelerometers Except for extremely low frequency seismic measurements, piezoelectric accelerometers are the most popular for vibration and seismic sensing. The characteristics that make them suitable are a large bandwidth, high sensitivity and resolution along with their easy use. Among the piezoelectric accelerometers nowadays the IEPE is dominating the market. Due to its incorporated charge amplifier, it just requires normal wire connections without external components. (Lent, 2009) It is difficult to find a piezoelectric accelerometer for less than £100 or £200. The last decade advances in MEMS technology have made possible to manufacture compact low cost MEMS accelerometers with a great performance and accuracy (Buckari, 2000). Nowadays, this technology is highly on demand in order to develop high-sensitive low cost structural vibration monitoring systems. It is available in different types and different axes can be measured with the same device. (Santoso, 2010) 2.1.5 Acceleration, intensity and damage A particle attached to the earth will irregularly vary its acceleration when an earthquake occurs on the surface. The horizontal component of this acceleration is particularly interesting for the topic in study as the building codes define how much horizontal force a building can resist. Force is related to acceleration. The peak ground acceleration (PGA) is the maximum University of Central Lancashire. School of Computing, Engineering and Physical Sciences 21 acceleration that a particle suffers during the event. PGA is associated to the earth surface movement and it is a suitable danger indicator for short buildings up to seven floors; hazard for higher buildings can be measured by other parameters like SA (Spectral Acceleration). PGA is quite a simple parameter while SA depends on the building structure and complicates calculations ( U.S. Geological Survey, 2010). While earthquake magnitude parameters are related to the power of an event, intensity parameters measure the effect that an earthquake has on buildings, persons and object. It measures the damage and varies within the affected zone. The Modified Mercalli Intensity Scale is the most widely used intensity scale in US. It is based on PGA (PREPA.R.E, 2008). Modified Mercalli Intensity Scale I. Not felt except by a very few under especially favorable conditions. II. Felt only by a few persons at rest, especially on upper floors of buildings. III. Felt quite noticeably by persons indoors, especially on upper floors of buildings. Many people do not recognize it as an earthquake. Standing motor cars may rock slightly. Vibrations similar to the passing of a truck. Duration estimated. IV. Felt indoors by many, outdoors by few during the day. At night, some awakened. Dishes, windows, doors disturbed; walls make cracking sound. Sensation like heavy truck striking building. Standing motor cars rocked noticeably. V. Felt by nearly everyone; many awakened. Some dishes, windows broken. Unstable objects overturned. Pendulum clocks may stop. VI. Felt by all, many frightened. Some heavy furniture moved; a few instances of fallen plaster. Damage slight. VII. Damage negligible in buildings of good design and construction; slight to moderate in well-built ordinary structures; considerable damage in poorly built or badly designed structures; some chimneys broken. VIII. Damage slight in specially designed structures; considerable damage in ordinary substantial buildings with partial collapse. Damage great in poorly built University of Central Lancashire. School of Computing, Engineering and Physical Sciences 22 structures. Fall of chimneys, factory stacks, columns, monuments, walls. Heavy furniture overturned. IX. Damage considerable in specially designed structures; well-designed frame structures thrown out of plumb. Damage great in substantial buildings, with partial collapse. Buildings shifted off foundations. X. Some well-built wooden structures destroyed; most masonry and frame structures destroyed with foundations. Rails bent. XI. Few, if any (masonry) structures remain standing. Bridges destroyed. Rails bent greatly. XII. Damage total. Lines of sight and level are distorted. Objects thrown into the air. (US Geological Sruvey, 2009) MOD. MERCALLI SCALE PGA(g) IV 0.03 and below V 0.03 – 0.08 VI 0.08 – 0.15 VII 0.15 – 0.25 VIII 0.25 – 0.45 IX 0.45 – 0.60 X 0.60 – 0.80 XI 0.80 – 0.90 XII 0.90 and above Table 2.1:Mercalli intensity scale relationship with PGA (PREPA.R.E, 2008) 2.2 Seismological data analysis 2.2.1 Introduction to earthquakes and seismic waves Seismic signals recorded by sensors in seismic stations have a regular pattern most of the time, this is called seismic noise. However, time to time there is an event; a seismic wave stands out of the background noise with a particular form easily recognised. The most University of Central Lancashire. School of Computing, Engineering and Physical Sciences 23 common source of seismic waves are earthquakes, these have a usual frequency between 0.001 and 4 Hz and can be detected from a considerable long distance. However, strong motion signals can be produced by man as well. For example, powerful explosions, or earth movements caused for natural gas extractions can cause these elastic waves. Nevertheless, excepting nuclear explosions, the range detection of these phenomena is far smaller than the one of a natural earthquake. (Kennett, 2009) (Havskov & Ottemöller, 2010). The earthquakes are caused by the energy accumulation in the Earth’s crust due to the relative movement of the two sides of a fault – discontinuity in volume of rock. When the stress limit is reached the event can be easily triggered and the rock is fractured around the weak points of the fault. The accumulated energy is suddenly released as an earthquake and seismic waves spread out from the rupture point, if they are very large can be extremely destructing in points near to the epicentre. (British Geological Survey, 2011) Figure 2.2: Earthquake origin. Image by Taiwanese Central Weather Bureau ( Central Weather Bureau, 2012) The sudden movement of a fault generates different kinds of seismic waves:  P waves (Primary): Compressional waves. As the name indicates, they are the first to arrive. They feature typical speed values of 6 km/s in depths less than 15 km.  S waves (Shear or Secondary): Arrive after P. Typical velocity of 3.5 km/s in the same conditions as P waves. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 24  Surface waves: They are waves that travel through the surface. Combination of S and P waves (Rayleigh waves) and multiply reflected and superimposed S waves (Love waves). Typical velocities between 3.5-4.5 km/s although they always arrive after S waves. (Havskov & Ottemöller, 2010) Figure 2.3: P waves Figure 2.4 S waves Pictures from British Geological Survey (2011). 2.2.2 Measuring and recording seismic data The seismic signals can be recorded both locally and globally by seismic instruments. The typical sensors used for acoustic and seismic detection are seismometers, piezoelectric sensors, geophones and capacitive sensors. A seismic sensor outputs voltage proportional to the surface motion. Usually in a seismic station there are 3 sensors, one for each of the 3 axes. Nowadays, the data is stored only digitally after filtering and amplification processes, the use of a GPS at the same time has solved the problem of a proper timing stamp of the records. (Havskov & Ottemöller, 2010) As a result of the increasing number of stations recording data around the world there is a good amount of this kind data in the internet. Although in most cases after formal request, different governments, universities and scientific organizations supply this data to whoever wants to use it. Examples of these organizations are:  IRIS (Incorporated Research Institutions for Seismology) (IRIS, 2011)  British Geological Survey (British Geological Survey, 2012)  European Strong-Motion Database (European Strong-Motion Database, 2000)  The Kyoshin Net (K-NET) (NIED, 1996)  Southern California Earthquake Data Centre (SCEDC, 2011) University of Central Lancashire. School of Computing, Engineering and Physical Sciences 25 2.2.3 Seismic Data Havskov & Ottemöller(2010) state about waveform formats “Each channel of seismic waveform data consists of a series of samples (amplitude values of the signal) that are normally equally spaced in time (sample interval). Each channel of data is headed by information with at least the station and component name (see below for convention on component name), but often also network and location code (see below). The timing is normally given by the time of the first sample and the sample interval or more commonly, the sample rate. Some waveform formats (e.g. SAC) can store the timing of each sample.” There are several formats for strong motion data; we can classify them in three big groups according to the purpose:  Recording formats: The specific purpose of past data was just to be recorded and saved, these format were not very suitable for processing. Most of the data nowadays have to be able to be processed.  Processing formats: Appropriate for processing without any modification. An example is .SAC of which further details will be given later in 2.3.4 Seismic Data in LabVIEW. SAC format.  Data exchange formats: The data exchange formats are the most complete data available nowadays as all the information is included, the GSE(Group of Scientific Experts) and SEED (Standard for the Exchange of Earthquake Data) are examples. A variant of this last one seems to be becoming the standard both for exchange and processing, miniSEED. (Havskov & Ottemöller, 2010) The examples above are some of the most common type of data. However, there are a great amount of formats and sometimes even each institution has its own. For example CSMIP (California Strong Motion Instrumentation Program) or COSMOS (Consortium of Organisations for Strong-Motion Observation System). 2.3.4 Seismic Data in LabVIEW. SAC format Plug--ins for the following data are available for LabVIEW  COSMOS  CSMIP  European Strong-Motion Database Format.  K-Net Strong Motion Data Format files. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 32 Size Guidance magnitude Large M > 8 Great M = 6–8 Medium M = 4–6 Small M = 2–4 Micro M < 2 Table 2.3: Approximate Magnitude vs Size equivalence Some of the most common scales are:  Local magnitude ML. Original magnitude scale, also known as Richter scale. It is defined as = 𝛥 Equation 2.3: Local magnitude A= Maximum amplitude in a Wood-Anderson seismogram (which measures displacements from signals with f > 2 Hz) 𝛥 =Distance correction function Δ=Distance to the epicentre [km] Applicable to events of amplitude less than 6-7, distance below 1500 km and 1-20 Hz frequency band. The simplest way to calculate the local magnitude is using the coda Magnitude Mc (sometimes called duration magnitude). It is a local magnitude approximation that relates the coda length (event duration) to the earthquake size. It is defined as: = 𝑡 𝑎 Equation 2.4: Coda/duration magnitude tcoda = coda length r=distance to the epicentre in km The a,b and c parameters try to reflect the different attenuation on the earth surface depending on the place, so their values differ depending on the location. The parameters used by Lee et at(1972)( original developers of this method) are sometimes used for locations where no local studies are available. However, the results are not always satisfactory. The usage of this scale University of Central Lancashire. School of Computing, Engineering and Physical Sciences 33 should be restricted to magnitude below 5 and distance below 1500 km. Havskov & Ottemöller in their book Routine data processing in Earthquake seismology compile an extremely useful table with this parameter for different localion altogether with a reference list. Figure 2.8: Coda Magnitude parameters in different areas of the world (Havskov & Ottemöller, 2010)  Broadband surface wave magnitude MS: Takes advantage of the fact that in shallow earthquakes for distances over 600-1000 km surface waves dominate over the rest. = (𝑉𝑚 𝑥 2 ) 1 𝛥 Vmax= Maximum velocity amplitude (which is usually the surface wave amplitude) Δ= distance to the epicentre in deg It is valid for depths under 60 km, a wide range of periods (from 2 to 60 s), distance from 2 to 160 ˚ and magnitudes between 4 and 9. (British Geological Survey, 2011) There is a decent concord between MS and ML for magnitudes from around 4 to 6.5 (Havskov & Ottemöller, 2010). Standards tables are available to translate from one magnitude scale to another. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 34 Figure 2.9: Magnitude scale conversion table (Havskov & Ottemöller, 2010) University of Central Lancashire. School of Computing, Engineering and Physical Sciences 35 3. Vibration Monitoring System Design Before giving top-level details about how the requirements have been fulfilled it is advisable to recall the functions that were agreed in the Scheme of work (*) Only for short buildings up to 7 stories. System based on PGA .See 2.1.5 Acceleration, intensity and damage. 3.1 Hardware 3.1.1 Accelerometer choice At the first stages of the project it was decided that the vibration sensor to use was going to be an accelerometer. This is due to the fact that recent advances have made possible highperformance, high-accuracy, low-cost accelerometers available on a single monolithic IC (Bukhari, 2000). These characteristics make the technology suitable for the task regarding the resources available. As stated in the background(2.1.4 Accelerometers), the most popular accelerometer type for vibration and seismic signals is the piezoelectric but, with a market price of around £200 in some of the main online catalogues it exceeded the budget available and, therefore ,a variable capacitance MEMS accelerometer was preferred. This technology provides small size, compact, sensitive lightweight and relatively cheap sensors perfect for the project purpose. (Santoso, 2010) Once selected the technology the following parameters requirements have been taken into account to select the most suitable accelerometer: o Axes: A dual axes system for both horizontal axes measurements is going to be developed as the horizontal component of the PGA (Peak Ground Acceleration) is Specifications Represent acceleration vs time Display spectra Zooming features for detail study Show event potential danger(*) Graph saving options Interactive menu Hardware suitable for easy attachment University of Central Lancashire. School of Computing, Engineering and Physical Sciences 36 the standard for most building codes and hazard risks. ( U.S. Geological Survey, 2010) An additional vertical axis for µg sensing (ambient noise) has been considered but discarded due to economic reasons (see 11. Future work: Potential improvements and modifications) o Frequency response: A bandwidth of 50 Hz will be enough for structural monitoring (Lynch, 2003). o Maximum acceleration: A PGA of 0.9 g causes total damage. Hence, an accelerometer with at least that figure as a maximum is required. (PREPA.R.E, 2008) o Weight: The accelerometer weight not more than 10% of the test or mounting device so that the measurements are not significantly altered. o Ground Isolation: If the test article is conductive and at ground potential, a difference in ground levels could cause measurement problems and therefore a common ground is required o Mounting: Suitable for high sensitivity, adequate attachment. o Sensitivity: The lower the better but according to table 2.1 tens of mg is enough to cover all cases. o Resolution: The lowest level in Mercally Scale (IV) is characterised by a 30 mg acceleration or below. Therefore, this will be the minimum resolution we will be targeting at. o Signal conditioning: Better if signal already conditioned to save costs both of time and money. o Power: Standard 3 to 5 Volts preferred (Lent, 2009) (Aszkler, 2005) Considering the requirements and limitations, the accelerometer series that have been selected are the ADXL203. They are high precision, low power, dual axis accelerometers. Their bandwidth can be modified with capacitors to make it fit the application and the output signal is already conditioned. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 37 ADXL203 FEATURES o High performance, single-/dual-axis accelerometer on a single IC chip o 1 mg resolution at 60 Hz o Low power: 700 μA at VS = 5 V (typical) o High sensitivity accuracy o X and Y axes aligned to within 0.1° (typical) o Bandwidth adjustment with a single capacitor (0.5 to 2500) o Single-supply operation o RoHS compliant (Analog Devices, 2011) The device is commercialised in a 8 ld LCC package only ( 8 terminal ceramic Leadless Chip Carrier). 3.1.2 DAQ selection Among the DAQ cards available the DAQ device selected was the NI6021 from National instruments connected to a BNC-2120 accessory. The factors that backed up this decision were:  Available, installed and configured in the laboratories  Provides flexible AI and AO sample and convert timing  Can perform 32 bit ADC.  It includes a 5 V power supply, exactly the same that is needed for the accelerometer. It also features a driver supplying current enough.  Customized analogue input range. The ranges available are ±10, ±5, ±1 and ±0.2V. The device automatically amplifies or attenuates the signal depending on the input range. This feature is very valuable in order to save signal conditioning circuits. It maximizes the resolution as well.  It includes a 700 kHz low-pass filter.  The input channel resolution is, regardless the range used, below 500µV, which implies, taking into account the accelerometer sensitivity ( ≈1V/g), that a high resolution is available in any case. See table 3.1  The BNC-2120 accessory available provides user-friendly interface. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 38 (National Instruments, 2008) (National Instruments, 2007) (National Instruments, 2008) Input range Nominal Resolution –10 V to 10 V 320 µV –5 V to 5 V 160 µV –1 V to 1 32 µV –200 mV to 200 mV 6.4 µV Table 3.1: Input range and resolution for NI 6221 The device should be able to gather samples fast enough so those aliasing problems are avoided: 𝑠 𝑎 =2 0𝑘 ⇒ 𝑠 𝑎 =12 𝑘 𝑖 𝑡 𝑠 𝑎 2∗ 12 𝑘 100 Equation 3.1: Anti-aliasing condition (Martin & Bono, 2010) Where fsmax is the DAQ maximum sample rate, fschan is the maximum sample rate per channel and f3dB is the filter’s corner frequency. Hence, there are no problems regarding the aliasing. The NI 6021 timing resolution is 50 ns, taking this into account the signal frequency should be below a limit or a sample and hold circuit will be required. (National Instruments, 2007) Considering the signal as a sine superimposition: 1 2 𝑡 1 2 0 1 Equation 3.2: Satisfactory conversion time demonstration (Martin & Bono, 2010) Therefore, a S&H circuit is not needed. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 39 3.1.3 Data acquisition structure Selecting a sensor and a data acquisition device was the first step because they are essential hardware. However, the design of a simple block diagram preceded any other advance in the hardware design. A proper structure design determines the rest of the hardware selection clarifying the processes that follow and minimizing modifications later on. The following figure is the block diagram from which the rest of the hardware was built up. Figure 3.1: Hardware block diagram Notice that D GND is the same electrical point as AI GND. The type of AI connection selected is reasoned in the next section. Considering the electronic nature of the device, the next step was a schematic hardware design. Due to the System simplicity, it does not differ much from the block diagram. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 40 Figure 3.2: Schematics design As it can be seen, excepting the capacitors C2 and C3 there is not additional signal conditioning. This will be explained with detail in the following subchapter. C1 filters the supply (details on EMI/EMC section).Observe that the computers in the laboratory used already integrate the DAQ card. 3.1.4 Signal conditioning Amplification and signal levels The ADXL203 MEMS accelerometer has a typical Zero g bias level of 2.5 V. This offset can be eliminated using software which simplifies considerably the hardware design. The DAQ card used – NI6021 – allows the selection of a customized analogue input range which determines the system resolution. The ranges available are ±10, ±5, ±1 and ±0.2V. In order to maximize the resolution of the vibration monitoring system the most suitable choice is ±1 V as the accelerometer resolution is 1000 mV/g. A building structural vibration caused by an earthquake will rarely exceed 1 g, and if it does, the high value of the acceleration assures that the event is potentially destructive so the danger selection is already clear. To achieve this objective a suitable band pass filtering could be used to eliminate the offset and adapt the signal to the input limitations of +-1 but, is that input resolution needed? Setting the ±5 range, the resolution will be 160 µV, which implies an acceleration of 160 µg. This resolution is University of Central Lancashire. School of Computing, Engineering and Physical Sciences 41 unreachable for our hardware as the data sheet specifies that the typical noise floor is 110 µg/√Hz .Hence, the ±5 range has been selected as the performance is not negatively affected compared to the ideal case of ±1 and it has a key advantage, it allows to software filter the offset instead of adding an additional circuit. Bandwidth selection and Noise filtering A bandwidth of 50 Hz is enough for structural seismic and vibration monitoring (Lynch, 2003).To avoid aliasing problems the more we limit our bandwidth to this value the better. The DAQ includes a low pass filter of 700 kHz, which is evidently not enough for our purposes. Fortunately, the ADXL203 provides a band limiting function just adding capacitors to the X and Y outputs. These characteristic permits to avoid aliasing problems and easily filter the noise signals that can be encountered without adding an additional filter. According to the data sheet: = = 0 =100 Equation 3.3: Cut-off frequency and added capacitors relationship (Analog Devices, 2011) Notice that the added capacitors purpose is to set the frequency response of the device but also determine the noise filtered, the noise is higher if the frequency response is increased. Therefore, a trade-off between bandwidth and noise should be reached. The intrinsic noise of the accelerometer, as specified by the manufacturer, will be white Gaussian noise affecting equally to all the frequencies the following way. rmsNoise=(110µg/√Hz)*(√(BW*1.6) Equation 3.4: Accelerometer noise Hence, the bandwidth has been limited to 50 Hz, enough to the purposes and to limit the performance disturbing noise. The noise that will be suffered for the 50 Hz bandwidth that is going to be handled will be rmsNoise=1 mg, completely negligible as the acceleration levels are going to be classified in ranges of magnitude and destruction power being the lower range from 0 to 30mg. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 48 Figure 3.11: Calibration subroutine flowchart 3.2.4 Earthquake intensity and danger Figure 3.12: Magnitude and danger calculator subroutine Waveforms input Calculate DC values Subtract Dc values Output signal w/o DC BEGIN END BEGIN X and Y axes ac. input Select X and Y ac. range XIntensity>Yintensity Decode X and Y Mercalli scale intensity M.Intensity=X intensity M. Intensity=Yintensity END M.Intensity output University of Central Lancashire. School of Computing, Engineering and Physical Sciences 49 The PGA and the intensity are related (PREPA.R.E, 2008). The detailed relation can be seen in 2.1.5 Acceleration, intensity and damage. The subroutine should recognise the acceleration range of each of the axes and identify the Mercalli intensity in real time. The axis with the higher intensity determines the final result. 3.2.5 Display characteristics and saving options The display should have a proper zooming or autoscalling options to study the input signals in detail. Absolute time axis would be suitable. The danger indicator will indicate the Mercalli intensity scale danger in real time. For each execution another indicator should display what was the maximum intensity experienced during the current run. The user will select whether and when to capture the waveform data that is being displayed by clicking a saving button. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 50 4. Seismological data analysis software design 4.1 Introduction and Specifications The objective of this part of the project is to develop software that performs the tasks below. Figure 4.1 Seismic analysis software specifications An important portion of this section consists of high-level flowcharts, as well as notes if necessary. LabVIEW is a really high-level programming language as so they are the flowcharts. There is no need to enter into low-level programming when the software has those processes automatized. This section aim is to briefly describe and justify the design options adopted. 4.2 Data format selection When analysing the project requisites, the first problem that was encountered was what seismic data format to use and whether it was freely distributed or needed to be requested to the proper institutions. An important research work needed to be made in order to gather information about seismic data and sources. A good amount of this information is available in the seismic background section. Although the SEED and miniSEED data formats are probably the most popular types, the SEED format is an exchange format, what is to say, it stores absolutely all the data of the event (Havskov & Ottemöller, 2010). According to the purposes and scope of the project, a waveform (or processing) data type is more than enough; it was not recommendable to add complications until the basic requirements were completed. In any case, although miniSEED Specifications Decode seismic data from a standard format Display waveform Calculate relevant parameters: S-P arrival time, magnitude, epicentral distance, coda length. Signal to noise ratio analysis(STA/LTA) Manual and automatic phase picking Optional filtering Display frequency response Interactive menu University of Central Lancashire. School of Computing, Engineering and Physical Sciences 51 is part of that group, National Instruments does not provide a plug-in in their support website. National instruments do provide numerous strong motion data plug-ins, including another standard for a processing format; the SAC data format (National Instruments, 2011). Hence, SAC format was used to process the data in this project as it is possible to obtain this type directly and very easily from the biggest database found, IRIS. Not only that, the British Geological Survey offers its earthquake data in this format too. This is particularly useful because it allows the retrieval of local data. (British Geological Survey, 2012) 4.3 Global software framework Figure 4.2: Global computation framework (Attri R. K., 2005) The figure above represents the software structure. The process is controlled by the user, deciding in which step should be picked up. Some phases need data from previous processes so the user should be careful and know what it is being done. In any case, indications will be included to help users not familiarized with seismic analysis. As we are using recorded digital data, obviously a triggering process is not necessary. 4.4 Reading SAC files Read data •Retrieve properties •Recover waveform Optional frequency analysis Optional band pass filtering Time parameters •S arrival time •P arrival time •Coda length •S-P time interval Location parameters •Distance to the epicenter in degees •Distance to the epicenter in km Magnitude aproximation •Coda Magnitude(Mc) •Surface Magnitude(MS) Beginning Retrieve waveform Decode data Retrieve properties End Figure 4.3: Read data flowchart University of Central Lancashire. School of Computing, Engineering and Physical Sciences 52 The plug-in has to carry out the decoding. The SAC files, as explained in the background, include a waveform and headers with properties as the event date or the name of the seismic station. Those also need to be retrieved to be displayed. 4.5 Frequency analysis and optional filtering Sometimes it may be necessary to filter the seismograms, for example for a better phase arrival timing (Havskov & Ottemöller, 2010).The software should include an option to filter the waveform. Havskov et al (2010) recommends 4 order Butterworth filters. In order to properly select the cut-off frequencies a tool to display the spectra would be really useful. The seismic events have a typical low frequency so in this case a logarithm frequency scale is not necessary. 4.6 Arrival times 4.6.1 Introduction A system to automatically detect the wave arrivals is going to be developed due to the importance of these parameters – described in seismic background (2.3.6.1 P and S arrival times). One of the algorithms available to perform this task need to be applied but also a manual picking tool is necessary. 4.6.2 Automatic picking 4.6.2.1 Algorithm selection Among the available algorithms, the time domain energy based algorithms appeared to simplify the tasks, featuring an acceptable accuracy. The STA/ LTA ratio method was selected because of its simplicity and popularity (Han, 2010). Refer to STA/LTA ratio description in the seismic background to see the algorithm detailed description. =∑ Short-term average =∑ Long term average STA LTA ratio =STA/LTA Equation 4.1: STA/LTA ratio equations University of Central Lancashire. School of Computing, Engineering and Physical Sciences 53 As it is explained in the background there are different expressions for this method. The expressions above present these advantages: 1) They can be calculated using data from one station only. Recall that a SAC data file only incudes one waveform. 2) The expressions do not include square-roots as other do. The calculations have to be performed, sometimes, in thousands of points. Eliminating one of the operations can results in a significant improvement on performance. In contrast, it does not have the precision of other algorithms (Han, 2010). Nevertheless, considering the scope of the project it is far enough. 4.5.2.2 Flowcharts If there is a proper preprogramed VI in among the available in LabVIEW to perform the calculation it will be used, in any case the following diagram represents the programming structure designed for its later LabVIEW implementation. Figure 4.4: Automatic Arrival time picking global flowchart Beginning Initialisation: -Retrieve user defined parameters -Retrieve signal data STA /LTA ratio Pick arrival times Display & Save data End University of Central Lancashire. School of Computing, Engineering and Physical Sciences 54 Figure 4.5: STA/LTA ratio implementation subroutine flowchart Beginning Initialisation: -Retrieve user defined parameters -Retrieve signal data -Retrieve sample number Cut out windows values for the indicated sample number Calculate STA/LTA for window values specified Save data End Beginning Initialisation: -Retrieve user defined parameters -Retrieve signal data STA/LTA one sample calculator Build & save waveform Display point No more samples End YES NO University of Central Lancashire. School of Computing, Engineering and Physical Sciences 55 4.6.3 Manual picking It was stated in the STA/LTA ratio description that the automatic picking has a great dependence on the station and type of event sensed. If there is not data available or there is not enough time to proceed with that calibration, the automatic picking is useless. Sometimes, the seismograms available contain too much noise in the same bandwidth than the signal, making difficult the correct functionality of modest automatic picking software like in this case. These problems are common even in advanced professional software and sometimes are compensated averaging the timing information of several channels available in the same station (Munro K. A., 2005). However, in this project only one waveform is available. The distance and magnitude calculations depend on the timing parameters so an alternative method is required so that the analysis does not reach a dead-end. The software should allow easy manual pickings using a cursor or similar techniques. 4.7 Coda length This parameter has significance enough to develop a subroutine that performs the task. The method followed to design that subroutine is showed in the next page. Beginning Initialisation: -Retrieve user defined parameters -Retrieve signal data Detect points over threshold P time=first point S time=second point S-P Save & display data End Figure 4.7: Pick arrival times subroutine Figure 4.6: STA/LTA one sample subroutine flowchart University of Central Lancashire. School of Computing, Engineering and Physical Sciences 56 The P arrival time indicates the earthquake start. The software has to determine when the event is finished, when the earth has calmed down (Attri R. K., 2005). It is known that LTA values characterise a measurement of the noise level (Munro K. A., 2005). Therefore, it can be used to determine an event conclusion. This happens when the current LTA levels are compared with an average value before an event was triggered. If current LTA ≤ LTA (averaged before P), the noise level is back to what it was before there was an earthquake. The duration or coda length can be calculated with a simple subtraction. 𝑡 = 𝑖 𝑡𝑖𝑚 − 𝑡 𝑖 𝑡𝑖𝑚 Equation 4.2:Coda length 4.8 Distance to the epicentre The habitual computational location methods used in professional stations around the world - iterative approaches - are far over the scope of this project, not only because of the difficulty of the implementation but because data from more than one station is required. Recall that this project aim is to retrieve information from one seismogram at a time only. Moreover, the task is to calculate the distance from the epicentre not locate the exact coordinates in 3D as the mentioned approaches are able to do. (Havskov & Ottemöller, 2010). Beginning Initialisation: -Retrieve P arrival time -Retrieve LTA data Pre-event LTA waveform average=threshold Cut out LTA waveform from P arrival time Save Coda and final time End First value below time=final time P arrival time-Final time=Coda length Gather values below threshold Figure 4.8: Coda lengthy subroutine flowchart University of Central Lancashire. School of Computing, Engineering and Physical Sciences 57 In order to calculate this distance with a single seismogram there are two options. Using lookup tables or approximation algorithms. (Attri R. K., 2005)A priori the incorporation of these tables in the software looks like the most precise way to realise the software. However, the integration of these tables in the software could represent an important amount of time and even more if depth wants to be taken into account in order to make the most of this procedure. Prior the programing of these tables the approximation equations have been tested manually resulting in an error range of less than 1 ˚ in most of the cases up to a distance of 100 ˚. For events in a 2000 km range the inaccuracy was often around 0.1˚.The precision has been considered acceptable for the objectives of the project. This approach saves lots of hours of programing and table lookups in the internet. Recall that the equations implemented, depending on the distance, are 1) From 0 to 250 km 𝛥 𝑘𝑚 = 𝑡𝑝 𝑎 −𝑡𝑠 𝑎 𝑣𝑝∗𝑣𝑠 𝑣𝑝−𝑣𝑠 𝑠= 𝑝 √ = 𝑘𝑚 = 𝑘𝑚 𝑚 𝑡 2) From 250 km to 2222 km (20˚) 𝛥 𝑘𝑚 = 𝑡𝑝 𝑎 −𝑡𝑠 𝑎 ∗10 3) From 20˚ 𝛥 ˚ =[ 𝑡𝑝 𝑎 −𝑡𝑠 𝑎 𝑚𝑖 −2]∗10 [t]=minutes Where 𝑡𝑝 𝑎 and 𝑡 𝑠 𝑎 are P and S first arrivals respectively and Δ is the distance to the epicentre. Notice that from 9˚ to 20˚ and over 100˚ theoretically the algorithm is not valid. In the evaluation section the magnitude of the probable inaccuracies will be tested. (Havskov & Ottemöller, 2010) The software will be based on the following structure: University of Central Lancashire. School of Computing, Engineering and Physical Sciences 64 7. Seismological data analysis software implementation In this section general comments about the main LabVIEW structures used are going to be made. The Appendix A contains the whole code with more detailed explanations. Figure 7.1Seismic analysis VI front panel In order to read and decode the data files, a subVI called ReadSAC has been developed. It retrieves the SAC file waveform and properties. The Open Data Storage express VI allows opening external types of files when the data plug-in is available, once it is installed, it can be selected in its dialog box. After the decoding, the file can be read with Read Data in channel mode returning the seismogram waveform as dynamic data. To obtain the properties was more problematic and it required the creation of another SubVI called RetrieveProperties. It is based on the Get properties VI example available in the Labview 2010 data base (National Instruments, 2010) and it uses For loops and the Get Properties VI to obtain metadata from the file, channel groups and groups. Waveform and data are displayed in the seismic analysis front panel. Notice that most of the data obtained does not inform in the properties about the amplitude units so it is impossible to programmatically display them. The unit information depends on the source and, therefore, a selector has been built-in so that the operator selects the units of the waveform that has read .It is usually nm/s or µm/s (IRIS, 2011) (British Geological Survey, 2012). With respect to the calculations this selections only affects to MS. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 65 Figure 7.2Code sections where the mentioned SubVIs are used A subVI was created to calculate and show the seismogram vs. spectra. A dialog box opens showing both graphs in a window separated from the seismic main controls and indicators. Spectra magnitude is linear so that it can be compared in a better way with the seismogram, the usually low bandwidth of typical earthquakes advices a linear frequency axis scale. Figure 7.3 Seismogram and its spectra The operator can define the low and upper cut-off frequencies of a band-pass filter. The resulting filtered waveform is saved in a shift register so all the analysis operations can be performed to the filtered signal. The LabVIEW filter VI can be set to use a 4 order University of Central Lancashire. School of Computing, Engineering and Physical Sciences 66 Butterworth as recommended by Havskov et al. (Havskov & Ottemöller, 2010). Notice that if the cut-ff frequencies do not fulfil the Nyquist criterion the software will return an error. Figure 7.4 Filtering options in the seismic analysis front panel In order to calculate the STA/LTA ratio, a proper pre-programmed VI was searched among the VI’s available in LabVIEW. However, it was not possible to implement it in a satisfactory way. It was considered that the development of an own subVI could save time and effort. The subVI STA LTA wave (SNR) provides the STA/LTA ratio using window lengths selected by the operator while Pick arrival times VI uses this ratio along with a user defined threshold to automatically pick the P and S arrival timing. Figure 7.5 : STA LTA ratio and Pick arrival times VIs in the main seismic code The STA/LTA wave SubVI is set up in dialog mode so that a new window with its front panel pops up when the automatic picking control is pressed. The use of different windows was considered an appropriate way to expand the information showed in screen and to show the user the state of the SNR calculations, as it take some seconds until it is completed. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 67 Figure 7.6 STA/LTA ratio VI front panel. The figure shows an earthquake seismogram, the STA/LTA ratio and the STA and LTA waves for specific L1 and L2 window lengths The SNR calculations are performed sample by sample by a VI called STA LTA one sample. Basically, the STA LTA ratio VI function is to control the running of that other subVI, window lengths and to put together the waveform. The Pick arrival times VI takes advantage of the fact that the first two values that surpass the threshold value are, respectively, the P and S arrival times. Arrival time values are actualised when STA LTA ratio dialog box is closed. Detailed comments are written in Appendix A. The manual picking has been carried out using three vertical cursors which display the time axis values. To use this tool the user should manually identify and introduce the correct P and S arrival time values as well as the end of the event time in the proper controls before proceeding with further automatic calculations. The subtractions required to determine S-P time and coda length are automatically performed. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 68 Figure 7.7 Cursors and controls for manual picking in the seismic analysis VI front panel(left) and the loop that actualises coda length and S-P when the use modifies arrival times. A coda length meter VI was developed in order to retrieve this magnitude. It performs the actions described in the design section. It uses the LTA waveform and the P wave arrival time to obtain the coda length and the event end time. In this case only the event end time is retrieved as the final subtraction to calculate the coda ( P arrival time – event end time) is performed in the main seismic analysis VI in order to allow the user to manually change the event end time at any time (manual picking). The automatic coda results are actualised at the same time that the arrival times. A subVI called Gathering Signal Values below a Threshold value is used. This design is a modification of Gathering Signal Values passed Threshold value VI developed by one of the NI Instructors in the NI developer zone. It is available to public (NI Instructors, 2011). Detailed description in appendix A. Figure 7.8 "Coda length" VI in the main seismic code The Distance to the epicentre VI uses the P and S arrival times – previously calculated or manually typed - and the already known P and S wave speed - in a normal crust – to determine the station distance to the epicentre in km and degrees. Empirical formulas are used. Notice that the algorithm should change depending on the event distance; this is achieved with a case structure. Values are returned and displayed in the main seismic menu; no dialog box is opened when running. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 69 Figure 7.9: Distance to the epicentre subVI placed in the seismic analysis code. When Calculate magnitude button is pressed in the front panel, the system processes the seismogram, coda length and distance to the epicentre parameters – that should be previously settled – to calculate the MS and Mc magnitude. To calculate Mc , a, b and c parameters should be input by the user and a coda length value has to be available. MS requires previous bandpass filtering (2 to 60s) as indicated in the background. The maximum value of the filtered signal, as well as the epicentral distance in deg, is used to compute this magnitude scale. The user can select the signal units so that the formula rearranges for correct calculation. The block diagram can be seen in the Appendix A. Figure 7.10: Magnitude controls and indicators in the front panel 8. Analogue output software implementation An analogue output VI has been developed. The software is able to read LVM files, containing acceleration time response, and SAC files, it auto detects the input format. There is a user controlled linear scaling. The output start and pause is user managed. When scaling, the output must be within the configured max and min voltage. In this case +-10 V. As different type of data may be read, the user should manually indicate the amplitude units. The DAQmx auto start function should be on to avoid overwriting errors (-200279) when starting the output after stopped (National Instruments, 2012).Output presets VI defines the output task characteristics, in this case, outputs the signal at 50 kHz using a 10 samples buffer. High buffers may cause errors. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 70 Figure 8.1: Analogue output VI front panel 9. Dataflow and Interface The interface and data flow has been managed using mainly the event structure. The events are usually buttons pressed. When that happens the program jumps to different running points. Shift registers save event common data while the VIs is running, like the seismogram or errors. Although they are a resource many times avoided, local variable have been required so that controls can be changed both automatically and manually by the user, for example, the P arrival time control can be set by the user but when it is calculated automatically the new value actualises the control through a local variable. SubVIs have been created to perform tasks in a more organized way. Generally, SubVIs were created after processes that were considered important and independent enough to be called subroutines in the design chapter. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 71 Figure 9.1: Example of the event structure continuously used in the software. The External loop keeps it running. The shift registers and local variables can be seen. Figure 9.2: Main menu interface All the front panels used as interface front panels are included in the Appendixes along with the VIs block diagrams. The Appendix D comprises some usage instructions. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 72 10. System evaluation and results 10.1 Vibration DAQ evaluation The figure below shows the hardware configuration in the tests performed. Note the BNC input connected to the vibration module and the analogue output connected to the oscilloscope trough a BNC coaxial wire. Figure 10.1: Hardware system distribution for vibration DAQ and output testing Prior to the insertion of the accelerometer analogue outputs into the NI2120 they were tested in an oscilloscope to ensure that de device is not defective. Figure 10.2: Accelerometer voltage outputs when tilted so that the two axes support different accelerations The vibration DAQ has been tried for different vibration conditions using a 12 kS/s sample rate and a 1000 samples buffer size. Previously, the intensity indicator was tried out with simulated signals to assure that it indicates the correct level. The tests were carried out University of Central Lancashire. School of Computing, Engineering and Physical Sciences 73 attaching the vibration module to a table and applying different magnitude vibrations, hits, and shakings. Figure 10.3: DAQ front panel when running Figure 10.4: Light table hitting (Y axis) time and frequency responses University of Central Lancashire. School of Computing, Engineering and Physical Sciences 80 incoming surface waves or particularly intense noise. Notice that this happens often in far events due to the wave speed difference which tend to separate surface waves from S signals. The software was intended to use this information to automatically calculate the P and S waves arrival times – in this text sometimes denoted as automatic phase picking. Before the performance of this part can be evaluated, a process of calibration must be performed. The threshold that determines the wave arrival has to be defined depending on the station that makes the measurements. These calibration processes are made taking into account the station history (Attri R. K., 2005), however, for obvious reasons the one that is included in this report doesn’t cover that extension. The threshold values have been calculated averaging 16 different thresholds from 8 different events. Figure 10.9: STA/LTA ratio VI front panel University of Central Lancashire. School of Computing, Engineering and Physical Sciences 81 The process followed comprised these steps for each of the events: 1) Manual picking 2) Selecting L1 an L2 windows depending on the signal frequency response. L1 = 3*expected signal period; L2=10*L1.Frequency analysis performed with the previously developed software function. 3) SNR study, pick the threshold value that provides an arrival time that matches with the manual picking. For both P and S waves. A history chart was made and averaged to obtain a proper threshold value. Probably, trimming could be performed by statistically adjusting L1 and L2 for each event based on the manual pickings (Munro K. , 2004) but is out of reach with the available time. The calibration has been made for the station JHJ2 based in Hachijojima Island belonging to the Japan Meteorological Agency Seismic Network. Again, the reason is the amount of events to choose from after the March 11 earthquake and the clarity of the seismograms available. EVENT MAN(P)[s] MAN(S)[s] L1 L2 Tp Ts 1) 2012 02 14 NEAR EAST COAST OF HONSHU JAPAN 84.54 123.98 3 30 3.1 3.1 2) 2011 10 21 HOKKAIDO, JAPAN REGION 96 209.35 3.75 37.5 2.6 2.4 3) 2011 12 09 SEA OF OKHOTSK 89.12 245.58 3 30 2.9 3.7 4) 2011 08 01 NEAR S. COAST OF HONSHU, JAPAN 84.54 109.59 6 60 2.9 5.5 5) 2011 07 23 NEAR EAST COAST OF HONSHU, JAPAN 84.55 143.8 7 70 2.7 2.1 6) 2011 04 01 EASTERN HONSHU, JAPAN 86.46 151 6 60 3.2 2.2 7) 2011 04 07 NEAR EAST COAST OF HONSHU, JAPAN 90.56 149.56 7.5 75 3.2 1.8 8) 2011 04 28 NEAR EAST COAST OF HONSHU, JAPAN 85.73 134.33 7.5 75 1 1.7 Table 10.3Threshold determination for different earthquakes University of Central Lancashire. School of Computing, Engineering and Physical Sciences 82 The following chart displays different threshold values and averages them. Figure 10.10: Averaged threshold The average value T=2.775 was used to test the automatic phase picking software. The automatic arrival values are compared with the manual picking ones. L1 and L2 are the same indicated in the previous table. EVENT MAN(P)[s] AUT(P)[s] MAN(S)[s] AUT(S)[s] 1) 2012 02 14 NEAR EAST COAST OF HONSHU JAPAN 84.54 84.1 123.98 123.6 2) 2011 10 21 HOKKAIDO, JAPAN REGION 96 96.05 209.35 209.65 3) 2011 12 09 SEA OF OKHOTSK 89.12 89 245.58 245.35 4) 2011 08 01 NEAR S. COAST OF HONSHU, JAPAN 84.54 84.5 109.59 - 5) 2011 07 23 NEAR EAST COAST OF HONSHU, JAPAN 84.55 84.65 143.8 144.55 6) 2011 04 01 EASTERN HONSHU, JAPAN 86.46 85.6 151 151.7 7) 2011 04 07 NEAR EAST COAST OF HONSHU, JAPAN 90.56 90.55 149.56 151.35 8) 2011 04 28 NEAR EAST COAST OF HONSHU, JAPAN 85.73 7.5 134.33 136.5 Table 10.4: Automatic and manual picking comparrison 2.775 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 12345678910 11 12 13 14 15 16 Título del eje Título del eje Thresholds Average threshold University of Central Lancashire. School of Computing, Engineering and Physical Sciences 83 The results are mostly satisfactory for the number of arrival threshold that have been averaged, the error rarely exceed 0.5 seconds. Number 7 and 8 S wave arrival appears to be problematic probably due to the number of averaged sampled. However, number 8 is a really noisy seismogram, there is apparently a bad influence of background noise in picking that this algorithm is not able to solve. The generalized threshold – for both P and S picking – appear to have also a negative effect compared to other studies found (Munro K. , 2004) reducing the precision that could have been reached if using different values. In events with P and S waves arrivals really close in time doesn’t work properly – earthquake 4. This algorithm seem to be a good qualitative method to calculate approximated arrival times with a precision of around 0.5 seconds –probably much less with the appropriate history study. Nevertheless, fails to be the ultimate method to provide timings precisely with real data. Kim Munro concludes the same in her study Automatic event detection and picking of P-wave arrivals (Munro K. , 2004). An algorithm modification for improvement was presented in her later Thesis Analysis of microseismic event picking with applications to landslide and oil-field monitoring settings (Munro K. A., 2005). The first STA/LTA software programmed had serious performance problems as the processing of data comprising around 15’000 samples took between 40 and 50 seconds (Intel Core i5 processor 2.3 GHz). By substituting express VIs and modifying the algorithm, that time has been reduced to half. It is not a brilliant performance though. Performing the window calculations point by point to such amount of data requires processing power. However, it is considered that in the future a reduction in processing time is still possible with the current implementation, especially regarding the resetting. In the current state it is not recommendable to use the automatic picking with data over the samples indicated above. The SNR ratio front panel pops up when using the automatic picking allowing the user to see the calculation progress. The coda length calculator present problems related to the algorithm, from the several test performed only few gave satisfactory results. It is important to notice that the evaluation of this piece of software was extremely difficult due to the subjectivity of the magnitude to measure (Havskov & Ottemöller, 2010). The automatic detector is far more sensible than the manual picking so it is was sometimes difficult to say if the problem was the user ability to choose a proper coda or the software performance. However, the poor execution was evident University of Central Lancashire. School of Computing, Engineering and Physical Sciences 84 with a naked eye due to some impossible results. The problem was identified and described below. Figure 10.11: Coda length calculator problem The detection extremely depends on the correct P wave time arrival detection. The figure above represents the LTA wave, the background noise. If the P wave timing is slightly imprecise the VI “cuts out” the waveform before it was supposed. The remaining waveforms values are later compared with a typical noise value before the earthquake arrival, notice that if the remaining values contain pre-event noise levels the event end time picked is going to be incorrect, far before than when it was supposed. As explained above, it is impossible to assure a perfect automatic P or S arrival picking with the available resources, and the precision required for the algorithm above may be tens of millisecondsfew samples make the difference. This issue improvement will be one of the future works suggested. It is also important to highlight that the data analysed has to include the samples where the earth is settled down. This is not trivial, good amount of data samples available in the internet do not include this information, they are cut out before, the waveform never returns to the pre-event levels and, hence, the analysis always returns wrong values. Wrong P arrival time The software “cuts-out” the waveform from here to perform a comparing task with the remaining values. If P timing is wrong, the remaining waveform contains pre-event noise levels. Wrong end time University of Central Lancashire. School of Computing, Engineering and Physical Sciences 85 Other additional functions as the frequency analysis or the band pass filtering are working correctly. The following charts correspond to a 2012 event near the east coast of Honshu. Figure 10.12: Nonfiltered seismogram Figure 10.13: Seismogram spectra Figure 10.14: Filtered seismogram. Low cut-off = 0. 01 Hz. High cut-off =1 Hz By the time this report is being typed, some user interface issues are not still polished causing occasional crashes but allowing the evaluation of the different VI’s developed. It is expected that this issues are solved before the demonstration. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 86 10.3 Analogue output evaluation The analogue output software successfully reads and outputs LVM files containing X or Y axes acceleration recorded with Vibration DAQ VI and the designed hardware module. It also works well with the SAC files (velocity) downloaded from the IRIS database. The stop, refresh and scaling options don’t show problems if the operator works within the restrictions stated in the implementation section. Figure 10.15: Analogue output front panel running and reading a SAC file. Figure 10.16: LVM vibration file reading and analogue output University of Central Lancashire. School of Computing, Engineering and Physical Sciences 87 Figure 10.17: SAC file reading and analogue output 11. Future work: Potential improvements and modifications The project accomplishes most of the objectives that were set. However, when designing and implementing the work, alternative development procedures and improvement ideas came up. Unfortunately, as always, time and resources were limited and they had to be abandoned or at least postposed in order to deal with the main objectives. Some of them are going to be proposed in this section:  In order to monitor ambient noise in some structures as bridges a µg resolution is required (Wenzel & Pichler, 2005). The addition of a second accelerometer that measures acceleration in another axis may be a useful approach to improve the hardware module so that can be used for that purpose.  An aisled vibration DAQ module has been developed. In order to study the large structures vibration behaviour a good amount of them, distributed in strategic locations, are needed (Wenzel & Pichler, 2005). The development of a decentralised University of Central Lancashire. School of Computing, Engineering and Physical Sciences 88 networking system that uses, for example, microcontrollers would be suitable to perform this task.  The seismic analysis VI analyses one seismogram at a time and the location parameter that returns is the distance to the epicentre. It is possible to plot the location when the distance from at least three different seismic stations is known. A logical work continuation is the development of software that processes that distance values and uses a graphic interface to plot the location on a world map.  The use of tables instead of formulas to calculate the distance to the epicentre would improve that parameter precision.  The calculation of the magnitude using more scales would save the user time as there would be no need to use conversion graphs (Havskov & Ottemöller, 2010).  Better algorithms for arrival time detection using wavelet transform or frequency analysis among others could be integrated in the software (Han, 2010).  Coda length algorithm improvement to avoid the errors detected in its evaluation  STA/LTA average performance optimization. Another approach for its development or an improvement of the existing one (the collector VI appears to be the cause of a lot of this issue) is required.  In order to gather samples to shape a waveform only the collector VI has found among the LabVIEW library. That VI is not only slow but also has the collected samples limited. The development of a fast sample collecting VI without preestablished sample number limitation would boost the improvement of the STA/LTA average calculation performance.  Because of the time limitations, the main menu (event structure) that should have joint the access to the three main software functions (DAQ, seismic analysis and output) in a common interface could not be completed. Also, some bugs in the seismic interface as occasional crashes without apparent reason were noticed. It is expected that this issues are solved by the time of the demonstration. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 89 12. Conclusion Monitoring and analysis of seismic signals have become a fundamental discipline when trying to minimize the human and economic loss that earthquakes cause every year. To deal with this menace, geologist need to be supplied with analytical tools that help with the arduous work of determining the seismic event characteristics in order to take preventing actions, establish patterns or study the earth structure. Preventing work has to be made in building structures as well, cheap maintenance and failure detecting systems are highly on demand and it is there where MEMS accelerometers plays a fundamental role. The seismic analysis software developed manages to successfully retrieve timing, location and magnitude parameters with an acceptable precision according to the scope of the project. The precision achieved is probably not suitable for the accurate calculations of professional seismic stations. However, taking into account the resources and time available and that the geo-instrumentation and LabVIEW knowledge was acquired as part of the project, it represents a good approach and prototype from which build up a more complex software using this popular graphic programming language. It is important to highlight that the software has performance issues when computing SNR analysis and automatic timing parameters detection and that improve this in the future is essential. The coda length software needs also polishing or algorithm reconsideration to avoid some calculations errors. The event date that can be retrieved from the SAC_SM plugging does not match with the source date too often; this might point out a problem with either the plug-in or the seismic data source. The vibration DAQ effectively performs acceleration versus time and spectra measuring and monitoring. It manages to translate the incoming acceleration into earthquake intensity rank in accordance with the Modified Mercalli scale. Saving and zooming options are properly working and the enclosure and double sided tape using for attachment fits very well the specifications marked at the beginning of the development. Nevertheless, the user should be careful with the sample rate and buffer selection as a wrong selection may cause conflicts with the hardware. The system is a good starting point to develop a networked system for structural monitoring. The software manages to output vibration and seismic signals based on real data without problems. This analogue output may be used to be read in an oscilloscope or to excite a shaking table in order to simulate history-based earthquakes. University of Central Lancashire. School of Computing, Engineering and Physical Sciences 96 Figure A.10: Read SAC VI icon Figure A.11: ReadSAC VI block diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 97 Figure A.12: Retrieve properties Icon FigureA.11: Retrieve properties VI block diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 98 Figure A.3: STA LTA ratio icon Figure A.12: STA LTA ratio front panel University of Central Lancashire. School of Computing, Engineering and Physical Sciences 99 Figure A..13: STA LTA ratio VI Start event and global VI structure FigureA.14:STA LTA ratio VI BACK event University of Central Lancashire. School of Computing, Engineering and Physical Sciences 100 FigureA.15: STA LTA one sample VI icon Figure A.16:STA LTA one sample block diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 101 Figure A.17: Pick arrival times VI icon Figure A.18: Pick arrival times VI block diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 102 FigureA.19: Frequency analysis VI icon FigureA.20: Frequency analysis VI front panel University of Central Lancashire. School of Computing, Engineering and Physical Sciences 103 FigureA.21: Frequency analysis VI block diagram Figure A.22: Distance to the epicentre icon Figure A.23: Distance to the epicentre block diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 104 Figure A.24: Distance to the epicentre case structures Figure A.25 Coda length meter FigureA.26: Coda length meter VI block diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 105 Figure A.27: Gather signals below a threshold VI icon Figure A.28: Gather signals below a threshold block diagram (NI Instructors, 2011) . University of Central Lancashire. School of Computing, Engineering and Physical Sciences 112 Figure C.4: Analogue output VI. Start output event. Figure C. 5: Analogue output VI. Back event University of Central Lancashire. School of Computing, Engineering and Physical Sciences 113 Appendix D: Brief Instructions for use Figure D.1: Seismic analysis main window instructions Reads or actualises data Opens frequency analysis window Band pass filter. The user should select the cut –off frequencies Returns to main menu Selects file to analyse Cursors for manual picking. Use as a reference to identify arrival and end times. Automatically calculates timing parameters. L1, L2 and threshold required. Prior to calculate the distance, timing parameters should have been manually or automatically identified. Coda magnitude requires a, b and c parameters. The seismogram units affect Ms calculations. Previous distance data required. Graph tools University of Central Lancashire. School of Computing, Engineering and Physical Sciences 114 Figure D.2: STA LTA ratio VI front panel instructions Press to start SNR analysis. L1,L2 can be redefined Return to menu Seismogram display STA/LTA ratio waveform display. Signal to noise ratio STA & LTA display. Signal and noise respectively University of Central Lancashire. School of Computing, Engineering and Physical Sciences 115 Figure D.3: Vibration DAQ VI instructions Start/continue samples acquisition Pause acquisition Return to main menu Save time response Modify rate and buffer Intensity and danger indicators. Instant danger (left). Maximum danger (right) University of Central Lancashire. School of Computing, Engineering and Physical Sciences 116 Figure D.4: Analogue output VI instructions Select file to output. LVM and SAC format are admitted Read or refresh the file Start/continue output Pause/stop output Return to Main menu Select amplitude units Linear scaling factor University of Central Lancashire. School of Computing, Engineering and Physical Sciences 117 Appendix E : Planning documents Gantt Diagram Figure D.1: Gantt diagram University of Central Lancashire. School of Computing, Engineering and Physical Sciences 118 Risk register Figure D.2: Risk register University of Central Lancashire. School of Computing, Engineering and Physical Sciences 119 Appendix F: DAQ Circuit and PCB plans University of Central Lancashire. School of Computing, Engineering and Physical Sciences 120 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 121 University of Central Lancashire. School of Computing, Engineering and Physical Sciences 128 17. Havskov, J., & Ottemöller, L. (2010). Routine Data Processing. Springer. 18. IRIS. (2011). IRIS Incorporated Resiarch Institution for Seismology. Retrieved 11 2011, from http://www.iris.edu/hq/ 19. Kayal, B. J. (2008). Microearthquake Seismology and Seismotectonics of South Asia. Springer. 20. Kennett, B. (2009). Seismic Wave Propagation in Stratified Media. ANU E Press. 21. Kris L. Pankow, J. C. (2007). Use of ANSS Strong-Motion Data to Analyze Small Local Earthquakes. Retrieved 11 2011, from Seismological research letters: http://srl.geoscienceworld.org/content/78/3/369.extract 22. Lent, B. (2009). Simple Steps to Selecting the Right Accelerometer. Retrieved 03 2009, from Sensemag: http://www.sensorsmag.com/sensors/acceleration-vibration/simple-steps- selecting-right-accelerometer-1557 23. Lynch, J. P. (2003). Design and performance validation of a wireless sensing unit for structural monitoring aplication. Stanford: Structural Engineering and Mechanics, Vol. 17, No. 3-4 (2004). 24. Martin, B., & Bono, A. (2010). Transductors and intrumentations sistems. University of Zaragoza. 25. Munro, K. (2004). Automatic event dection and picking of P wave arrivals. CREWES. 26. Munro, K. A. (2005). Analysis of microseismic event picking with applications to landslide and oil-field. UNIVERSITY OF CALGARY. 27. National Instruments. (2007). NI602x Specifications. 28. National Instruments. (2008). BNC 2120 Instalation guide. 29. National Instruments. (2008). DAQ M series Manual. 30. National Instruments. (2008). DAQ System Overview. NI 602X Manual. National Instruments Corporation. 31. National Instruments. (2010). VI examples. National Instruments. 32. National Instruments. (2011). Supported Data pluggins. Retrieved 11 2011, from National Instruments Developer Zone: http://zone.ni.com/devzone/cda/tut/p/id/4065 33. National Instruments. (2012). National Instruments support. Retrieved 4 2012, from National instruments: http://www.ni.com/support/ 34. NI Instructors. (2011, 9). Gathering Signal Values Passed a Threshold Value VI. Retrieved from https://decibel.ni.com/content/docs/DOC-18091 35. NIED. (1996). K-NET. Retrieved 11 2011, from K-NET: http://www.k-net.bosai.go.jp/ University of Central Lancashire. School of Computing, Engineering and Physical Sciences 129 36. PREPA.R.E. (2008). Measuring and Recording Intensity, Magnitude, Energy and Acceleration. Retrieved 1 2012, from PREPA.R.E: http://www.prepareinc.us/Chapter%202%20- %20Measuring%20and%20Recording%20- %20Intensity,%20Magnitude%20and%20Energy.pdf 37. Renken, B. (1991). Info-LabVIEW. Retrieved 11 2011, from Info- LabVIEW: http://www.infolabview.org/about.html 38. Santoso, D. R. (2010). A simple instrumentation system for large structure vibration monitoring. Indonesian Journal of Electrical engineering. 39. SCEDC. (2011). Southern California Earthquake Data Center. Retrieved 04 2011, from http://www.data.scec.org 40. Turk et al, A. S. (2011). Subsurface sensing. John Wiley & Sons. 41. Turkel, S. (2000, August). Controlling EMI Noise Problems. Retrieved March 2012, from EC&M: http://ecmweb.com/mag/electric_controlling_emi_noise/ 42. US Geological Sruvey. (2009). The Modified Mercalli Intensity Scale. Retrieved 1 2012, from http://earthquake.usgs.gov/learn/topics/mercalli.php 43. W.H.K Lee et al. (1972). A method of estimating magnitude of local earthquakes from signal duration. United States Departament of Interior Geological Survey. 44. Wenzel, H., & Pichler, D. (2005). Ambient vibration monitoring. Jhon Willey & Sons LTD.