- Jupyter Notebook 97.8%
- Python 1.9%
- MATLAB 0.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github/workflows | ||
| data | ||
| figure | ||
| src | ||
| test | ||
| .gitignore | ||
| environment.yml | ||
| LICENSE | ||
| matlabkernel_existinglicense.png | ||
| README.md | ||
AEsensor Calibration using ARX model
This repository contains the MATLAB function to conduct the sensor calibration using the autoregressive exogenous model (ARX) model, represented by poles and zeros, and an example to apply the response removal with the ARX model to the AE waveform. Jupyter notebooks are available to perform those processings above.
List of Notebooks
-
01_AEsensor_calibration_arx.ipynb
We conduct the calibration of the AE sensor using Auto-Regressive eXogenous (ARX) model. We use the measurements of laser Doppler vibrometer (LDV) and the AE sensor as the input and output of the system, respectively. -
02_Apply_removalresp_to_AEevent.ipynb
We demonstrate the application of the ARX model with poles and zeros to the AE waveform using src/remove_resp_digitalfilt.py. -
convert_and_save_AEevent_fb03-087.ipynb This notebook preprocesses the raw AE waveforms to use for the application of response removal.
Installation to run the notebooks
The easiest way to set up the environment for the notebooks is installing the dependencies using Miniconda (Conda also works, but miniconda is enough to execute the notebooks in this repo).
-
install the miniconda following the instruction in the website.
-
Clone the git repository and create the environment Type the commands below in the terminal.
git clone https://github.com/kura-okubo/AEsensor_Calibration_ARX.git
cd AEsensor_Calibration_ARX
conda env create -n AEsensor_arx -f environment.yml
conda activate AEsensor_arx
python3 -m pip install jupyter-matlab-proxy
These commands download the repository in your local machine, create the environment with the dependencies used in the notebooks, and install the matlab kernel for the jupyter notebook.
If struggling with creating conda enviromment, like stacking at
Solving environment, usingmambais recommended.
conda install mamba -c conda-forge
reset
mamba env create -n AEsensor_arx -f environment.yml
- Find the path to the MATLAB executable file by
which matlab
If the path to the executable e.g.
/Applications/MATLAB_R2024b.app/bin/matlab
is returned, you are ready to execute the notebook. If not, export the path to the directory with matlab like
export PATH="$PATH:/Applications/MATLAB_R2024b.app/bin/"
If you have an error like
$/Applications/MATLAB_R2024b.app/bin/matlab
env: /Applications/MATLAB_R2024b.app/bin/maci64/path_per_install: No such file or directory
mkdir: /bin/maci64: Operation not permitted
matlab: No MATLAB bin directory for this machine architecture.
ARCH = maci64
Check if the terminal app is open with Rosetta option. Turn it off if you download native Apple silicon MATLAB.
- Launch the Jupyter lab Type in the terminal as following:
cd src
jupyter lab
- Open the notebooks selecting from the side bar of the jupyter lab.
Tips: Choose the
Exisiting Licensewhen you already activate the desktop MATLAB app.
The default browser to open the jupyter lab can be changed following here.
Uninstall the environment
To remove (uninstall) the environment, run the followings:
conda deactivate
conda env remove -n AEsensor_arx
Matlab license
To use the src/lsq_arx.m and to execute the notebook of 01_AEsensor_calibration_arx.ipynb, you need a license for the followings:
- MATLAB R2020b or later
- Signal Processing Toolbox
We use butterworth filter and tf2zpk implemented in the Signal Processing Toolbox.
Gallery
Figure 1. Bode plot of the AE sensor.
Figure 2. Comparison before and after the response removal of the AE waveform.
Reference
Okubo, K., Yamashita, F. & Fukuyama, E. Dynamics of non-self-similar earthquakes illuminated by a controlled fault asperity. Nat Commun 17, 3860 (2026). https://doi.org/10.1038/s41467-026-72217-x