v1.0.4
BO-HBM-ex
Description
The Python's tool BO-HBM-ex shows an example of the application of Bayesian Optimization [1] on a Duffing problem [2]. The Duffing's oscillator problem is here solved using Harmonic Balance Method and a continuation technique.
The optimization problem can be written:
Find
Installation
Get the source code from this repository. The example can be run after installation of dependencies with pip install -r requirements.txt.
Usage
The Python's scripts can be run only with Python 3.
Run solver of Duffing oscillator
The file respDuffing.py provides frequencies responses for displacement and acceleration on PDF pictures for ParamDuffing folder.
Following pictures show
| (a) | (b) |
|---|---|
![]() |
![]() |
| (c) | (d) |
![]() |
![]() |
Animations of
| (a) | (b) |
|---|---|
![]() |
![]() |
Run Bayesian Optimization on Duffing oscillator
The file OptiExp.py generates data of Bayesian Optimization's iterations. These data will be available on the directory ExpOptimDuffing which contains data for sample sets containing 10, 20 and 25 samples. Results are provided along BO iterations on CSV files and acquisition and objective functions are plotted in 2D and 3D.
The following pictures show the evolution of the acquisition and objective functions along BO's iterations applied on the Optimization of the Duffing Oscillator (minimization of the maximum of the acceleration along the frequency bandwidth
| Acquisition function | Objective function |
|---|---|
![]() |
![]() |
![]() |
![]() |
Versions
The code has been executed without any issues with the following versions of Python and libraries:
- Python 3.10.9
- numpy 1.26.2
- matplotlib 3.8.2
- pandas 2.1.3
- torch 2.1.1
- botorch 0.9.4
- gpytorch 1.11
- pydoe 0.3.8
How to cite
This repo is relative to the PhD thesis of Quentin Ragueneau achieved at LMSSC under the supervision of Antoine Legay and Luc Laurent in collaboration with Ingeliance Technologies and founded by ANRT (Cifre 2020/0272).
Please use the following citation reference if you use the code:
Ragueneau, Q., Laurent, L. & Legay, A. (2023). BO-HBM-ex (vxxx). Zenodo. https://doi.org/10.5281/zenodo.102592910
Bibtex entry:
@software{BO-HBM-ex-soft,
author = {Ragueneau, Quentin and Laurent, Luc and Legay, Antoine},
title = {{BO-HBM-ex}},
month = dec,
year = 2023,
publisher = {Zenodo},
version = {vxxx}
doi = {10.5281/zenodo.10259290},
url = {https://doi.org/10.5281/zenodo.10259290}
}
NB: version number and DOI must be adapted from Zenodo's repository.
License
MIT License
Copyright (c) 2023 - Quentin Ragueneau (quentin.ragueneau@ingeliance.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
References
[1] D. R. Jones, M. Schonlau, and W. J. Welch. Efficient Global Optimization of Expensive Black-Box Functions. Journal of Global Optimization, 13(4):455–492, Dec. 1998.
[2] B. Balaram, M. D. Narayanan, and P. K. Rajendrakumar. Optimal design of multi-parametric nonlinear systems using a parametric continuation based Genetic Algorithm approach. Nonlinear Dynamics, 67(4):2759–2777, Mar. 2012.
What's Changed
- update units by @luclaurent in #3
Full Changelog: v1.0.3...v1.0.4










