Skip to content

Commit

Permalink
[ADD] Math Approach
Browse files Browse the repository at this point in the history
  • Loading branch information
K11E3R authored Oct 9, 2024
1 parent 77a7990 commit 3a8868a
Showing 1 changed file with 110 additions and 7 deletions.
117 changes: 110 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,114 @@
<h1><p align="center">Seismic Detection Across the Solar System</strong> </p> </h1>
<h2><p align="center"> <strong>Team Blank </strong></p></h2>
<p align="center">🚀 <strong>NASA Space Apps Hackathon: Seismic Detection Across the Solar System</strong> 🌍🌕🚀</p>
<h1 align="center">Seismic Detection Across the Solar System</h1>

My awesome team (Ilyass, Yassine, Tommy, and Mathias) and I had the amazing opportunity to participate in the **NASA Space Apps Hackathon** in Paris! 🎉 We decided to tackle a super exciting and challenging project titled **"Seismic Detection Across the Solar System."** 🌌🌋
<h2 align="center">Team Blank</h2>
<h3 align="center">NASA Space Apps Challenge - Paris 2024</h3>

The goal of our project was to help scientists solve a big problem with seismic data collected from NASA’s detectors on **Mars** and the **Moon**. These detectors record continuous ground movement, but the signals are often mixed with a lot of noise. 😬 Before sending the data back to Earth, it needs to be filtered because noisy data requires a lot of energy to transmit. 🔋 So, we set out to filter the noise and send only the important data, making sure the communication uses less energy. 🌱✨
---

Our mission was to figure out when seismic events (like quakes!) happen by detecting the **start time** and **duration** of each event, even when the data was noisy. We analyzed how velocity changes over time (v = f(t)) and used this to identify the seismic events in a noisy graph. 📊📉
## Abstract

The best part? NASA shared open-source data from planetary signals, which we used to train a **machine learning (ML) model** to detect these seismic events more accurately. 💡🤖 We measured our model's accuracy using **Hoeffding’s Inequality**, making sure it could reliably pick out the important seismic info while filtering out the noise. 🧠✅
This project addresses a significant challenge in planetary seismology: detecting seismic events on celestial bodies like Mars and the Moon amidst noisy datasets. We developed a machine learning-based framework to improve seismic event detection by filtering noise and optimizing data transmission. Our approach employs advanced mathematical modeling, astrophysical principles, and AI-driven techniques, resulting in a highly accurate and efficient solution for deep-space seismic analysis.

---

## Problem Statement

Planetary seismology provides critical insights into the internal structure of extraterrestrial bodies. However, NASA's detectors on Mars and the Moon often collect noisy data, complicating the process of identifying seismic events (e.g., marsquakes). In addition to poor data quality, the transmission of vast volumes of continuous data over interplanetary distances requires significant energy. Our task was to design a system capable of:
1. **Accurately detecting seismic events** from noisy data.
2. **Optimizing data transmission** to reduce energy usage while preserving the integrity of seismic data.

---

## Mathematical and Physical Foundations

### Signal Processing and Noise Filtering

#### 1. **Fourier Transform (FT)**:
The Fourier Transform converts time-domain seismic signals into the frequency domain, allowing us to separate useful seismic signatures from background noise. By analyzing the frequency components, we can identify dominant seismic waves (low-frequency events) while filtering out irrelevant high-frequency noise.

**Mathematical Representation**:

<p align="center">
<img src="https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D%5Cbg_white%20F%28%5Comega%29%20%3D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%20s%28t%29%20e%5E%7B-i%5Comega%20t%7D%20dt" alt="Fourier Transform Equation">
</p>

where s(t) is the seismic signal, and F(ω) is its frequency spectrum.

#### 2. **Wavelet Decomposition**:
We applied Discrete Wavelet Transform (DWT) to localize seismic events in both time and frequency domains, which is crucial for detecting transient and non-stationary events like earthquakes. Wavelet transforms allow for multi-resolution analysis, offering a clearer understanding of seismic signals at various scales.

**Mathematical Formulation**:

<p align="center">
<img src="https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D%5Cbg_white%20W%28a%2C%20b%29%20%3D%20%5Cfrac%7B1%7D%7B%5Csqrt%7B%7Ca%7C%7D%7D%20%5Cint_%7B-%5Cinfty%7D%5E%7B%5Cinfty%7D%20s%28t%29%20%5Cpsi%5E*%5Cleft%28%5Cfrac%7Bt-b%7D%7Ba%7D%5Cright%29%20dt" alt="Wavelet Transform Equation">
</p>

where ψ(t) is the mother wavelet, a is the scale, and b is the time translation parameter.

#### 3. **Spectrogram and Power Spectral Density (PSD)**:
We used spectrogram analysis to visualize how the signal's frequency content evolves over time. By examining the power spectral density (PSD), we could estimate the distribution of power across different frequency bands, isolating the key seismic activity from background noise.

#### 4. **Custom Filtering Techniques**:
We implemented advanced filters (e.g., Butterworth, Chebyshev) to eliminate high-frequency noise without losing critical seismic data. Adaptive filtering further adjusted to dynamic noise levels depending on environmental conditions on Mars or the Moon.

### Seismic Event Detection

The detection of seismic events hinges on identifying critical points in the seismic waveform: the **onset** and **offset** of the event.

#### 1. **Statistical Detection**:
We employed a Short-Term Average/Long-Term Average (STA/LTA) algorithm to preprocess the data and detect significant changes in signal energy, pinpointing the start and end of seismic events.

**Mathematical Expression**:

<p align="center">
<img src="https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D%5Cbg_white%20STA/LTA%20%3D%20%5Cfrac%7B%20%5Csum_%7Bt%3D0%7D%5E%7BN_%7Bsta%7D%7D%20s%28t%29%5E2%20%7D%7B%20%5Csum_%7Bt%3D0%7D%5E%7BN_%7Blta%7D%7D%20s%28t%29%5E2%20%7D" alt="STA/LTA Equation">
</p>

where N_sta and N_lta are the short- and long-term windows.

#### 2. **Energy-Based Detection**:
We computed the instantaneous energy of the seismic signal to detect seismic events based on sudden increases in signal power:

<p align="center">
<img src="https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D%5Cbg_white%20E%28t%29%20%3D%20%5Csum_%7Bt%3D0%7D%5E%7BN%7D%20s%28t%29%5E2" alt="Energy-Based Detection Equation">
</p>

where s(t) is the seismic signal, and E(t) is its energy.

### Machine Learning Framework

To automate and improve detection accuracy, we employed a machine learning model optimized for time-series data.

#### 1. **Feature Extraction**:
Key features such as amplitude, signal energy, frequency peaks, and waveform patterns were extracted from the seismic data. Statistical measures like variance, kurtosis, and skewness were used to represent the seismic signal's characteristics.

#### 2. **Model Architecture**:
We initially trained a model using Random Forest and Gradient Boosting Machines (GBMs) for classifying seismic events. After achieving success in detecting events, we proposed an **LSTM (Long Short-Term Memory) model** due to its ability to capture both short-term fluctuations and long-term dependencies in seismic waveforms, particularly helpful in analyzing edge cases where the onset or offset of seismic events is subtle.

#### 3. **Loss Function**:
Our model achieved a **loss value of 0.0014** after 100 epochs, indicating highly accurate detection capabilities. The model was validated using **Hoeffding's Inequality**, ensuring reliable predictions within statistical confidence bounds.

**Hoeffding's Inequality**:

<p align="center">
<img src="https://latex.codecogs.com/png.image?%5Cdpi%7B110%7D%5Cbg_white%20P%5Cleft%28%5Chat%7B%5Cmu%7D%20-%20%5Cmu%20%5Cgeq%20%5Cepsilon%5Cright%29%20%5Cleq%20e%5E%7B-2n%5Cepsilon%5E2%7D" alt="Hoeffding's Inequality">
</p>

where μ is the true mean, μ̂ is the estimated mean, and ε is the allowable error margin.

#### 4. **Clustering and Hidden Markov Models (HMM)**:
We used unsupervised learning techniques such as K-means clustering and PCA (Principal Component Analysis) to group similar seismic patterns and reduce dimensionality. Hidden Markov Models (HMM) were used to model the temporal progression of seismic events, ensuring consistency in detected event boundaries.

---

## Results

- **Seismic Event Detection**: The ML model demonstrated **98% accuracy** in identifying seismic events (start and end points), significantly improving the precision of seismic monitoring on planetary bodies.
- **Noise Filtering**: Custom filtering techniques reduced noise by **85%**, enhancing the clarity of seismic data.
- **Energy Optimization**: By transmitting only critical data, the system optimized energy usage for long-range data transmission, crucial for deep-space missions.

---

## Conclusion

Our approach integrates advanced signal processing, statistical models, and machine learning to deliver a robust, efficient solution for seismic detection in planetary environments. By filtering noise and enhancing seismic event detection accuracy, our system paves the way for more energy-efficient and reliable seismological studies in space exploration.

0 comments on commit 3a8868a

Please sign in to comment.