Skip to content

Abhishek6122008/Research-Earthquake-Project

Repository files navigation

Quantum Leap

CNN Based P and S waves arrival detection

Project Overview

"The earthquake starts softly and then it hits hard."

This project presents a complete end-to-end system for detecting P-wave (Primary) and S-wave (Secondary) arrival times from raw seismic signals using signal processing, baseline machine learning, and an upgraded CNN-based deep learning model.


📌 Project Overview

Accurate identification of P and S wave arrivals is critical for:

  • Earthquake early warning systems
  • Epicenter localization
  • Magnitude estimation
  • Structural safety analysis
  • Disaster mitigation

Manual picking of arrivals is slow, subjective, and sensitive to noise. This system automates the entire workflow.


🌊 Seismic Wave Fundamentals

🌊 P Wave (Primary Wave)

Definition:

  • Arrives first
  • Longitudinal (compressional)
  • Ground moves back–forth in direction of wave travel

Think of pushing and pulling a slinky.

PropertyP Wave
SpeedFastest
MediumSolid, Liquid, Gas
MotionCompression & Expansion
ArrivalFirst
DamageVery low

On a seismogram: small oscillations, weak amplitude.


🌊 S Wave (Secondary Wave)

Definition:

  • Arrives after P wave
  • Transverse (shear)
  • Ground moves perpendicular to direction of travel

Think of shaking a rope.

PropertyS Wave
SpeedSlower
MediumSolids only
MotionShearing
ArrivalSecond
DamageHigh

S waves have much larger amplitude and cause structural damage.


🔥 Why P Arrives First but S is Dangerous

P waves compress → Earth handles compression well.
S waves shear → Structures do not handle shear well.

  • P wave → Knock on the door
  • S wave → Door gets kicked in

One-line takeaway: P waves arrive first and are weak; S waves arrive later and are stronger and destructive.


🧠 System Architecture

Raw Seismic Signal
        ↓
Signal Conditioning
        ↓
Butterworth Bandpass Filtering
        ↓
Feature Extraction
        ↓
Baseline ML Model
        ↓
CNN Model
        ↓
P & S Arrival Detection

🎛 Signal Processing Foundation

Nyquist Frequency

Nyquist = Sampling Rate / 2

It defines the highest frequency that can be captured without aliasing when converting continuous seismic signals to discrete form.


Butterworth Bandpass Filtering

A Butterworth bandpass filter retains only the relevant seismic frequency band. Filter order (N=4) controls how sharply unwanted frequencies are removed.

  • Low order → smooth filtering
  • High order → sharp but risky (ringing, instability)

Each order adds approximately 20 dB/decade roll-off.

OrderRoll-off
120 dB/decade
240 dB/decade
480 dB/decade
8160 dB/decade

N=4 provides a balanced tradeoff between noise removal and signal preservation. When used with zero-phase filtering (filtfilt), the effective order doubles.


🤖 Baseline Machine Learning Model

A traditional ML model was first implemented to establish a performance benchmark.

Features used:

  • Signal energy
  • Rolling variance
  • STA/LTA ratio
  • Frequency band energy
  • Amplitude envelope
  • Zero-crossing rate

The baseline model provided initial detection capability but struggled in low SNR and complex noise scenarios.


🧠 CNN-Based Deep Learning Model

To improve robustness, the system was upgraded to a Convolutional Neural Network (CNN).

Why CNN?

  • Learns waveform patterns automatically
  • Captures local temporal features
  • Handles noisy signals better
  • Reduces reliance on manual feature engineering

The CNN significantly improved detection accuracy and generalization across seismic events.


📊 Evaluation Metrics

  • Precision
  • Recall
  • F1 Score
  • Mean Absolute Error
  • Detection latency

High recall for P-wave detection is critical for early warning systems.


🚀 Real-World Impact

Even detecting a P wave seconds earlier can enable early warnings before the destructive S wave arrives.

This project integrates physics-based signal processing with deep learning for reliable, automated seismic phase detection.

About

Deep learning based system for predicting structural response and damage during earthquakes using seismic and building data to support faster safety assessment and disaster planning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors