  Data-based safe gain-scheduling controllers are presented for discrete-time
linear parameter-varying systems (LPV) with polytopic models. First,
$\lambda$-contractivity conditions are provided under which safety and
stability of the LPV systems are unified through Minkowski functions of the
safe sets. Then, to bypass the requirement to identify the system dynamics, a
data-based representation of the closed-loop LPV system is provided to directly
exploit collected data and construct a safe controller. It is shown that weaker
data richness requirements are needed to directly learn a closed-loop safe
control policy than to identify the LPV system. The closed-loop data-based
representation is leveraged to directly design data-driven gain-scheduling
controllers that guarantee $\lambda$-contractiveness, and, thus, invariance of
the safe sets. It is also shown that the problem of designing a data-driven
gain-scheduling controller for a polyhedral (ellipsoidal) safe set amounts to a
linear program (a semi-definite program). A simulation example is provided to
show the effectiveness of the presented approach.
