  In this work, we investigate the data-driven safe control synthesis problem
for unknown dynamic systems. We first formulate the safety synthesis problem as
a robust convex program (RCP) based on notion of control barrier function. To
resolve the issue of unknown system dynamic, we follow the existing approach by
converting the RCP to a scenario convex program (SCP) by randomly collecting
finite samples of system trajectory. However, to improve the sample efficiency
to achieve a desired confidence bound, we provide a new posteriori method with
validation tests. Specifically, after collecting a set of data for the SCP, we
further collect another set of independent \emph{validate data} as posterior
information to test the obtained solution. We derive a new overall confidence
bound for the safety of the controller that connects the original sample data,
the support constraints, and the validation data. The efficiency of the
proposed approach is illustrated by a case study of room temperature control.
We show that, compared with existing methods, the proposed approach can
significantly reduce the required number of sample data to achieve a desired
confidence bound.
