  We present Assignably Safe Extremum Seeking (ASfES), an algorithm designed to
minimize a measured objective function while maintaining a measured metric of
safety (a control barrier function or CBF) be positive in a practical sense. We
ensure that for trajectories with safe initial conditions, the violation of
safety can be made arbitrarily small with appropriately chosen design
constants. We also guarantee an assignable ``attractivity'' rate: from unsafe
initial conditions, the trajectories approach the safe set, in the sense of the
measured CBF, at a rate no slower than a user-assigned rate. Similarly, from
safe initial conditions, the trajectories approach the unsafe set, in the sense
of the CBF, no faster than the assigned attractivity rate. The feature of
assignable attractivity is not present in the semiglobal version of safe
extremum seeking, where the semiglobality of convergence is achieved by slowing
the adaptation. We also demonstrate local convergence of the parameter to a
neighborhood of the minimum of the objective function constrained to the safe
set. The ASfES algorithm and analysis are multivariable, but we also extend the
algorithm to a Newton-Based ASfES scheme (NB-ASfES) which we show is only
useful in the scalar case. The proven properties of the designs are illustrated
through simulation examples.
