  In many safety-critical control systems, possibly opposing safety
restrictions and control performance objectives arise. To confront such a
conflict, this letter proposes a novel methodology that embeds safety into
stability of control systems. The development enforces safety by means of
barrier functions used in optimization through the construction of barrier
states (BaS) which are embedded in the control system's model. As a result, as
long as the equilibrium point of interest of the closed loop system is
asymptotically stable, the generated trajectories are guaranteed to be safe.
Consequently, a conflict between control objectives and safety constraints is
substantially avoided. To show the efficacy of the proposed technique, we
employ barrier states with the simple pole placement method to design safe
linear controls. Nonlinear optimal control is subsequently employed to fulfill
safety, stability and performance objectives by solving the associated
Hamilton-Jacobi-Bellman (HJB) which minimizes a cost functional that can
involve the BaS. Following this further, we exploit optimal control with
barrier states on an unstable, constrained second dimensional pendulum on a
cart model that is desired to avoid low velocities regions where the system may
exhibit some controllability loss and on two mobile robots to safely arrive to
opposite targets with an obstacle on the way.
