Abstract
Control barrier functions for port-Hamiltonian systems inherit model uncertainty when the Hamiltonian is learned from data. We show how to propagate this uncertainty into a safety filter with independently tunable credibility budgets. To propagate this uncertainty, we employ a two-stage Bayesian approach. First, posterior prediction over the Hamiltonian yields credible bands for the energy storage, producing Bayesian barriers whose safe sets are high-probability inner approximations of the true allowable set with credibility 1 - (\eta_{\mathrm{ptB}}). Independently, a drift credible ellipsoid accounts for vector field uncertainty in the CBF inequality with credibility 1 - (\eta_{\rm dr}). Since energy and drift uncertainties enter through disjoint credible sets, the end-to-end safety guarantee is at least 1 - (\eta_{\rm dr} + \eta_{\mathrm{ptB}}). Experiments on a mass-spring oscillator with a GP-learned Hamiltonian show that the proposed filter preserves safety despite limited and noisy observations. Moreover, we show that the proposed framework yields a larger safe set than an unstructured GP-CBF alternative on a planar manipulator.