Cautious Bayesian Optimization: A Line Tracker Case Study
Abstract
:1. Introduction
2. Problem Statement
3. Constraint-Aware Bayesian Optimization
- How to craft the constraints in a way amenable to static Bayesian optimization;
- How to encode possible model-based knowledge on the problem (transfer learning);
- Setting up Gaussian processes and choosing the acquisition function;
- Incorporating possible offset/scaling biases via semi-parametric ingredients;
- Developing a final algorithm for experimental optimization, incorporating all the above.
3.1. Constraint Encoding
- Direct safety-related measurements: Minimum distance to obstacles, maximum accelerations close to operational limits, etc.;
- Indirect safety-related measurements: In some cases, failures are “catastrophic” but these measures are binary: say, a control loop is either stable or unstable, or the line-tracker robot in later section may lose track sight in sensors. A binary success/failure measure cannot be suitably handled with Gaussian processes without methodological modifications, as Gaussian process models are smooth functions that cannot model sharp discontinuities. Furthermore, just measuring “stable” does not tell you how close you are to instability, and, say, a slight modification of some decision parameters may give rise to failure. This is why indirect measurements are needed in these contexts. Thus, we can propose risk measures based on robust control ideas [34]:
- –
- Medium-to-high-frequency control action components. The appearance of closed-loop resonances augments such medium-frequency activity in the recorded control signals. They indicate that the system’s Nyquist plot is approaching .
- –
- Peak error and manipulated variable values. Sensor and actuator saturation may cause the trajectory tracking or control problem to fail. Thus, maximum error or control action may also be monitored to compute g.
An example of the above ideas will be discussed in the case study in Section 4.2.
3.2. Gaussian Processes and Bayesian Optimization
- Expected Improvement: average of a truncated Gaussian at the currently best value in ;
- Lower/Upper Confidence Bound (LCB, UCB): ;
- Probability of Improvement: integral of the truncated Gaussian at the currently best value in ;
- Expected value: .
3.3. Transfer Learning from Model to Experiment
Semi-Parametric Gaussian Process Models
- The prior knowledge on the plant should be encoded in , perhaps incorporating some component regarding “nominal” parameter values inside the said . Then, in the above GP model would encode parameter increments from the nominal ones.
- As another interpretation, if , the mismatch would be interpreted to be close to a linear function, which might locally be understood as uncertainty in a possible offset and uncertainty in the gradient of the model. Likewise would locally fit the error to a parabolic shape ( denotes the degree-2 monomials in x arranged in a row).
- Finally, if , the semi-parametric model would encode offset and scaling uncertainty, as the posterior mean should be close to:
4. Case Studies
4.1. One-Dimensional Example
Algorithm 1: Final algorithm proposed for constraint-aware Bayesian optimization |
|
4.2. Robot Line Follower
4.2.1. Simulation Environment
4.2.2. Performance and Safety Measures
4.2.3. Overall BO Setup
4.2.4. Line-Follower Results
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Kober, J.; Peters, J. Policy search for motor primitives in robotics. Mach. Learn. 2011, 84, 171–203. [Google Scholar] [CrossRef]
- Deisenroth, M.P.; Neumann, G.; Peters, J. A Survey on Policy Search for Robotics. Found. Trends® Robot. 2013, 2, 1–142. [Google Scholar] [CrossRef]
- Ariyur, K.B.; Krstic, M. Real-Time Optimization by Extremum-Seeking Control; John Wiley & Sons: Hoboken, NJ, USA, 2003. [Google Scholar]
- Chen, C.Y.; Joseph, B. On-line optimization using a two-phase approach: An application study. Ind. Eng. Chem. Res. 1987, 26, 1924–1930. [Google Scholar] [CrossRef]
- Yip, W.S.; Marlin, T.E. Designing plant experiments for real-time optimization systems. Control. Eng. Pract. 2003, 11, 837–845. [Google Scholar] [CrossRef]
- Marchetti, A.; Chachuat, B.; Bonvin, D. Modifier-adaptation methodology for real-time optimization. Ind. Eng. Chem. Res. 2009, 48, 6022–6033. [Google Scholar] [CrossRef]
- Rodríguez-Blanco, T.; Sarabia, D.; Pitarch, J.L.; De Prada, C. Modifier Adaptation methodology based on transient and static measurements for RTO to cope with structural uncertainty. Comput. Chem. Eng. 2017, 106, 480–500. [Google Scholar] [CrossRef]
- Bernal, M.; Sala, A.; Lendek, Z.; Guerra, T.M. Analysis and Synthesis of Nonlinear Control Systems; Springer: Berlin/Heidelberg, Germany, 2022. [Google Scholar]
- Åström, K.J.; Wittenmark, B. Adaptive Control; Courier Corporation: North Chelmsford, MA, USA, 2013. [Google Scholar]
- Odry, Á.; Kecskes, I.; Sarcevic, P.; Vizvari, Z.; Toth, A.; Odry, P. A novel fuzzy-adaptive extended kalman filter for real-time attitude estimation of mobile robots. Sensors 2020, 20, 803. [Google Scholar] [CrossRef]
- Girbés, V.; Armesto, L.; Hernández Ferrándiz, D.; Dols, J.F.; Sala, A. Asynchronous sensor fusion of GPS, IMU and CAN-based odometry for heavy-duty vehicles. IEEE Trans. Veh. Technol. 2021, 70, 8617–8626. [Google Scholar] [CrossRef]
- Armesto, L.; Moura, J.; Ivan, V.; Erden, M.S.; Sala, A.; Vijayakumar, S. Constraint-aware learning of policies by demonstration. Int. J. Robot. Res. 2018, 37, 1673–1689. [Google Scholar] [CrossRef]
- Seeger, M. Gaussian processes for machine learning. Int. J. Neural Syst. 2004, 14, 69–106. [Google Scholar] [CrossRef]
- Williams, C.K.; Rasmussen, C.E. Gaussian Processes for Machine Learning; MIT Press: Cambridge, MA, USA, 2006. [Google Scholar]
- Sala, A.; Armesto, L. Adaptive polyhedral meshing for approximate dynamic programming in control. Eng. Appl. Artif. Intell. 2022, 107, 104515. [Google Scholar] [CrossRef]
- Calandra, R.; Seyfarth, A.; Peters, J.; Deisenroth, M.P. Bayesian optimization for learning gaits under uncertainty. Ann. Math. Artif. Intell. 2016, 76, 5–23. [Google Scholar] [CrossRef]
- Chepiga, T.; Zhilyaev, P.; Ryabov, A.; Simonov, A.P.; Dubinin, O.N.; Firsov, D.G.; Kuzminova, Y.O.; Evlashin, S.A. Process Parameter Selection for Production of Stainless Steel 316L Using Efficient Multi-Objective Bayesian Optimization Algorithm. Materials 2023, 16, 1050. [Google Scholar] [CrossRef]
- Rong, G.; Alu, S.; Li, K.; Su, Y.; Zhang, J.; Zhang, Y.; Li, T. Rainfall induced landslide susceptibility mapping based on Bayesian optimized random forest and gradient boosting decision tree models—A case study of Shuicheng County, China. Water 2020, 12, 3066. [Google Scholar] [CrossRef]
- Gonzalvez, J.; Lezmi, E.; Roncalli, T.; Xu, J. Financial applications of Gaussian processes and Bayesian optimization. arXiv 2019, arXiv:1903.04841. [Google Scholar] [CrossRef]
- Ait Amou, M.; Xia, K.; Kamhi, S.; Mouhafid, M. A Novel MRI Diagnosis Method for Brain Tumor Classification Based on CNN and Bayesian Optimization. Healthcare 2022, 10, 494. [Google Scholar] [CrossRef]
- Song, X.; Wei, W.; Zhou, J.; Ji, G.; Hussain, G.; Xiao, M.; Geng, G. Bayesian-Optimized Hybrid Kernel SVM for Rolling Bearing Fault Diagnosis. Sensors 2023, 23, 5137. [Google Scholar] [CrossRef]
- Elshewey, A.M.; Shams, M.Y.; El-Rashidy, N.; Elhady, A.M.; Shohieb, S.M.; Tarek, Z. Bayesian Optimization with Support Vector Machine Model for Parkinson Disease Classification. Sensors 2023, 23, 2085. [Google Scholar] [CrossRef]
- Wu, J.; Frazier, P. Practical two-step lookahead bayesian optimization. In Advances in Neural Information Processing Systems; Wallach, H., Larochelle, H., Beygelzimer, A., d’Alché-Buc, F., Fox, E., Garnett, R., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2019; Volume 32. [Google Scholar]
- Spaan, M.T. Partially observable Markov decision processes. In Reinforcement Learning: State-of-the-Art; Springer: Berlin/Heidelberg, Germany, 2012; pp. 387–414. [Google Scholar]
- Armesto, L.; Pitarch, J.L.; Sala, A. Acquisition function choice in Bayesian optimization via partially observable Markov decision process. In IFAC World Congress; Elsevier: Amsterdam, The Netherlands, 2023. [Google Scholar]
- Lam, R.; Willcox, K.; Wolpert, D.H. Bayesian optimization with a finite budget: An approximate dynamic programming approach. Adv. Neural Inf. Process. Syst. 2016, 29. [Google Scholar]
- Gelbart, M.A. Constrained Bayesian optimization and applications. Ph.D. Thesis, Harvard University, Cambridge, MA, USA, 2015. [Google Scholar]
- Hernández-Lobato, J.M.; Gelbart, M.A.; Adams, R.P.; Hoffman, M.W.; Ghahramani, Z. A general framework for constrained Bayesian optimization using information-based search. J. Mach. Learn. Res. 2016, 17, 1–53. [Google Scholar]
- Gardner, J.R.; Kusner, M.J.; Xu, Z.E.; Weinberger, K.Q.; Cunningham, J.P. Bayesian optimization with inequality constraints. In Proceedings of the 31st International Conference on Machine Learning (ICML), Beijing, China, 21–26 June 2014; pp. 937–945. [Google Scholar]
- Gelbart, M.A.; Snoek, J.; Adams, R.P. Bayesian optimization with unknown constraints. arXiv 2014, arXiv:1403.5607. [Google Scholar]
- Pakdaman, M.; Sanaatiyan, M.M.; Ghahroudi, M.R. A line follower robot from design to implementation: Technical issues and problems. In Proceedings of the 2010 The 2nd International Conference on Computer and Automation Engineering (ICCAE), Singapore, 26–28 February 2010; Volume 1, pp. 5–9. [Google Scholar]
- Latif, A.; Widodo, H.A.; Rahim, R.; Kunal, K. Implementation of line follower robot based microcontroller ATMega32A. J. Robot. Control. (JRC) 2020, 1, 70–74. [Google Scholar] [CrossRef]
- Snoek, J.; Larochelle, H.; Adams, R.P. Practical bayesian optimization of machine learning algorithms. Adv. Neural Inf. Process. Syst. 2012, 25. [Google Scholar]
- Skogestad, S.; Postlethwaite, I. Multivariable Feedback Control: Analysis and Design; John Wiley & Sons: Hoboken, NJ, USA, 2005. [Google Scholar]
- Wang, Z.; Jegelka, S. Max-value Entropy Search for Efficient Bayesian Optimization. PMLR 2017, 70, 3627–3635. [Google Scholar]
- Tighineanu, P.; Skubch, K.; Baireuther, P.; Reiss, A.; Berkenkamp, F.; Vinogradska, J. Transfer learning with gaussian processes for bayesian optimization. In Proceedings of the International Conference on Artificial Intelligence and Statistics, PMLR, Online, 28–30 March 2022; pp. 6152–6181. [Google Scholar]
- Bai, T.; Li, Y.; Shen, Y.; Zhang, X.; Zhang, W.; Cui, B. Transfer Learning for Bayesian Optimization: A Survey. arXiv 2023, arXiv:2302.05927. [Google Scholar]
- Wu, T.; Movellan, J. Semi-parametric Gaussian process for robot system identification. In Proceedings of the 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, Vilamoura-Algarve, Portugal, 7–12 October 2012; pp. 725–731. [Google Scholar]
- Shekaramiz, M.; Moon, T.K.; Gunther, J.H. Details on Gaussian Process Regression (GPR) and Semi-GPR Modeling, 2019. Electrical and Computer Engineering Faculty Publications, Paper 216. Available online: https://digitalcommons.usu.edu/ece_facpub/216/ (accessed on 14 February 2023).
- Armesto, L. How to Use Vision Sensors for Line Tracking with Proximity Sensors|CoppeliaSim (V-REP). Available online: https://youtu.be/vSl1Ga80W7w (accessed on 23 March 2023).
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Girbés-Juan, V.; Moll, J.; Sala, A.; Armesto, L. Cautious Bayesian Optimization: A Line Tracker Case Study. Sensors 2023, 23, 7266. https://doi.org/10.3390/s23167266
Girbés-Juan V, Moll J, Sala A, Armesto L. Cautious Bayesian Optimization: A Line Tracker Case Study. Sensors. 2023; 23(16):7266. https://doi.org/10.3390/s23167266
Chicago/Turabian StyleGirbés-Juan, Vicent, Joaquín Moll, Antonio Sala, and Leopoldo Armesto. 2023. "Cautious Bayesian Optimization: A Line Tracker Case Study" Sensors 23, no. 16: 7266. https://doi.org/10.3390/s23167266
APA StyleGirbés-Juan, V., Moll, J., Sala, A., & Armesto, L. (2023). Cautious Bayesian Optimization: A Line Tracker Case Study. Sensors, 23(16), 7266. https://doi.org/10.3390/s23167266