  This paper proposes an optimization with penalty-based feedback design
framework for safe stabilization of control affine systems. Our starting point
is the availability of a control Lyapunov function (CLF) and a control barrier
function (CBF) defining affine-in-the-input inequalities that certify,
respectively, the stability and safety objectives for the dynamics. Leveraging
ideas from penalty methods for constrained optimization, the proposed design
framework imposes one of the inequalities as a hard constraint and the other
one as a soft constraint. We study the properties of the closed-loop system
under the resulting feedback controller and identify conditions on the penalty
parameter to eliminate undesired equilibria that might arise. Going beyond the
local stability guarantees available in the literature, we are able to provide
an inner approximation of the region of attraction of the equilibrium, and
identify conditions under which the whole safe set belongs to it. Simulations
illustrate our results.
