  Safe control for control-affine systems has been extensively studied.
However, due to the complexity of system dynamics, it is challenging and
time-consuming to apply these methods directly to non-control-affine systems,
which cover a large group of dynamic systems, such as UAVs and systems with
data-driven Neural Network Dynamic Models (NNDMs). Although all dynamic systems
can be written in control-affine forms through dynamic extension, it remains
unclear how to optimally design a computationally efficient algorithm to safely
control the extended system. This paper addresses this challenge by proposing
an optimal approach to synthesize safe control for the extended system under
the framework of energy-function-based safe control. The proposed method first
extends the energy function and then performs hyperparameter optimization to
maximize performance while guaranteeing safety. It has been theoretically
proved that our method guarantees safety (forward invariance of the safe set)
and performance (bounded tracking error and smoother trajectories). It has been
numerically validated that the proposed method is computationally efficient for
non-control-affine systems.
