  This paper develops a novel control synthesis method for safe stabilization
of control-affine systems as a Differential Complementarity Problem (DCP). Our
design uses a control Lyapunov function (CLF) and a control barrier function
(CBF) to define complementarity constraints in the DCP formulation to certify
stability and safety, respectively. The CLF-CBF-DCP controller imposes
stability as a soft constraint, which is automatically relaxed when the safety
constraint is active, without the need for parameter tuning or optimization. We
study the closed-loop system behavior with the CLF-CBF-DCP controller and
identify conditions on the existence of local equilibria. Although in certain
cases the controller yields undesirable local equilibria, those can be confined
to a small subset of the safe set boundary by proper choice of the control
parameters. Then, our method can avoid undesirable equilibria that CLF-CBF
quadratic programming techniques encounter.
