원시데이터 수집 시스템
선정목록으로

Learning a Low-Dimensional Representation of a Safe Region for Safe Reinforcement Learning on Dynamical Systems

관련 필름·전자재료 · (15) 디스플레이 패널재료

기본 정보

저자
  1. Zhehua Zhou — Chair of Automatic Control Engineering, Technical University of Munich, Munich, Germany|||Max Planck Institute for Intelligent Systems, University of Stuttgart, 70569 Stuttgart, Germany|||Chair of Automatic Control Engineering, Technical University of Munich, 80290 Munich, Germany
  2. Ozgur S. Oguz — Max Planck Institute for Intelligent Systems, University of Stuttgart, Stuttgart, Germany|||Max Planck Institute for Intelligent Systems, University of Stuttgart, 70569 Stuttgart, Germany
  3. Marion Leibold — Chair of Automatic Control Engineering, Technical University of Munich, Munich, Germany|||Chair of Automatic Control Engineering, Technical University of Munich, 80290 Munich, Germany
  4. Martin Buss — Chair of Automatic Control Engineering, Technical University of Munich, Munich, Germany|||Chair of Automatic Control Engineering, Technical University of Munich, 80290 Munich, Germany
DOI
10.1109/tnnls.2021.3106818
저널
IEEE Transactions on Neural Networks and Learning Systems
발행년도
2021
발행기관
Institute of Electrical and Electronics Engineers
피인용수
16
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1109/tnnls.2021.3106818
토픽
Fuel Cells and Related Materials
OpenAlex ID
W3093201391

평가 내용

관련도
관련
사업분야
필름·전자재료 · (15) 디스플레이 패널재료
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '필름·전자재료 > 디스플레이 패널재료' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

For the safe application of reinforcement learning algorithms to high-dimensional nonlinear dynamical systems, a simplified system model is used to formulate a safe reinforcement learning (SRL) framework. Based on the simplified system model, a low-dimensional representation of the safe region is identified and used to provide safety estimates for learning algorithms. However, finding a satisfying simplified system model for complex dynamical systems usually requires a considerable amount of effort. To overcome this limitation, we propose a general data-driven approach that is able to efficiently learn a low-dimensional representation of the safe region. By employing an online adaptation method, the low-dimensional representation is updated using the feedback data to obtain more accurate safety estimates. The performance of the proposed approach for identifying the low-dimensional representation of the safe region is illustrated using the example of a quadcopter. The results demonstrate a more reliable and representative low-dimensional representation of the safe region compared with previous works, which extends the applicability of the SRL framework.

본문 69,790자

본문 펼치기
For the safe application of reinforcement learning algorithms to high-dimensional nonlinear dynamical systems, a simplified system model is used to formulate a safe reinforcement learning framework. Based on the simplified system model, a low-dimensional representation of the safe region is identified and used to provide safety estimates for learning algorithms. However, finding a satisfying simplified system model for complex dynamical systems usually requires a considerable amount of effort. To overcome this limitation, we propose a general datadriven approach that is able to efficiently learn a low-dimensional representation of the safe region. By employing an online adaptation method, the low-dimensional representation is updated using the feedback data to obtain more accurate safety estimates. The performance of the proposed approach for identifying the low-dimensional representation of the safe region is illustrated using the example of a quadcopter. The results demonstrate a more reliable and representative low-dimensional representation of the safe region compared to previous work, which extends the applicability of the safe reinforcement learning framework.Index Terms-safe reinforcement learning, deep learning in robotics and automation, learning and adaptive systems, datadriven model order reduction I. INTRODUCTION R ECENT studies of applying reinforcement learning or deep reinforcement learning algorithms to complex, i.e., highly nonlinear and high-dimensional, dynamical systems have demonstrated attractive achievements in various control tasks, e.g., humanoid control [1] and robotic manipulator control [2]. However, although the results display the potential of utilizing reinforcement learning algorithms as a substitute for traditional controller design techniques, most of them are still only presented in simulations [3]. One major impediment against implementing reinforcement learning algorithms on real-world dynamical systems is that, due to the random exploration mechanism, the intermediate policy may lead to dangerous behaviors of the system. As a result, both the system itself and the environment may be damaged during learning. In order to apply state-of-the-art reinforcement learning algorithms to real-world control systems, one central problem to address is how to introduce a reliable safety guarantee into the learning process. This A. Related Work Safe reinforcement learning (SRL) aims to find an optimal control policy by way of reinforcement learning while ensuring that certain safety conditions are not violated during the learning process. Although the exact definition of safety in SRL varies in different learning tasks, for instance collision avoidance in autonomous vehicles or crash prevention when controlling a quadcopter, we generally consider the safety condition as neither the system itself nor the environment will be damaged. A. Related Work SRL in dynamical systems with continuous action space has been a topic of research for over a decade [4]. Most previous studies employed a manual control mechanism to ensure the safety of the controlled system. For instance, in [5], an experienced human pilot takes over the control of the helicopter if the learning algorithm places the system in a risky state. However, such an approach requires a considerable amount of resource to monitor the entire learning process. Hence, in most cases, it is not applicable to complex learning tasks. Another possibility of safely implementing reinforcement learning algorithms on real-world dynamical systems is by transfer learning [6]. First, a satisfying initial policy is trained in simulation and then transferred to the realworld dynamical system. In essence, this minimizes required number of learning iterations for obtaining the final policy and thus reduces the risk of encountering dangerous intermediate policy [7]. However, since the mismatch between simulation and reality is not considered in transfer learning, no reliable safety guarantee is obtained [8]. A. Related Work In recent studies, SRL in model-free scenarios is usually achieved by solving a constraint satisfaction problem. For example, constrained policy optimization [9] introduces a constraint to the learning process to the effect that the expected return of cost functions should not exceed certain predefined limits. Alternatively, including an additional risk term in the reward function, such as risk-sensitive reinforcement learning [10], can also increase the safety of reinforcement learning algorithms. However, as no system model is directly considered in these approaches, there is still a high possibility that safety conditions are violated, especially in the early learning phase. A. Related Work When at least an approximated system model is available, a more promising SRL can be realized by combining controltheoretic concepts with reinforcement learning approaches. For example in [11], [12], Lyapunov functions are employed arXiv:2010.09555v2 [cs.RO] 8 Sep 2021 A. Related Work to compute a sub-region of the state space where safety conditions will never be violated. The system is then limited to this sub-region during the learning process. However, finding suitable candidates for Lyapunov functions is challenging if the system dynamics contains uncertainties or is highly nonlinear. A. Related Work For uncertain dynamical systems, methods based on learning a model of unknown system dynamics [13] or of environmental constraints [14] are proposed to ensure safety during learning. For instance, by predicting the system behavior in the worst case, robust model predictive control [15] is able to provide safety and stability guarantees to reinforcement learning algorithms if the error in the learned model is bounded. Besides, [16] introduces an action governor to correct the applied action when the system is predicted to be unsafe. However, limited by computational efficiency, these approaches with deterministic safety estimates, i.e., the prediction about the safety of a system state is either safe or unsafe, are usually only applicable to linear systems. Moreover, the accuracy of the learned model also strongly affects the performance of these approaches. A. Related Work To relax the demands placed on the system model and extend the SRL to nonlinear systems, instead of deterministic safety estimates, recent studies employ probabilistic safety estimates, in which safety predictions are represented as probabilities [17]. In [18], for example, modelling uncertainties are approximated by Gaussian process models [19], and a probabilistic safe region is computed by reachability analysis [20]. Similarly, Gaussian process models are used in [21], [22] to model unknown system dynamics. A safe region is then obtained from the probabilistic estimate of the region of attraction (ROA) of a safe equilibrium state. The key component of these studies is a forward invariant safe region, such that the learning algorithm has the flexibility to execute desired actions within the safe region. Safety is ensured by switching to a safety controller whenever the system approaches the boundary of the safe region. However, the safe region is computed either by solving a partial differential equation in [18] or sampling in [22], both of which suffer from the curse of dimensionality. Moreover, modeling an unknown dynamics or disturbance with Gaussian process models also poses challenges when the system is highly nonlinear and high-dimensional, since both making adequate assumptions about the distribution of dynamics and acquiring a sufficient amount of data are difficult. Therefore, although approaches like [18], [22] enable promising results with low-dimensional dynamical systems 1 , they are not directly applicable to complex dynamical systems [23]. A. Related Work Often the motivation for using reinforcement learning algorithms for controller design is to overcome the difficulty of applying model-based controller design approaches to highly nonlinear, high-dimensional and uncertain dynamic system models [24], [25]. In particular, it is challenging to compute a safe region for a complex dynamical system. For this reason, 1 In this paper we consider dynamical systems with dimensions higher than six as high-dimensional, as in such cases it is computationally difficult to implement traditional methods, such as reachability analysis or sum-of-squares programming, in identifying the safe region. [26] introduces an SRL framework that utilizes a supervisory control strategy based on finding a simplified system by means of physically inspired model order reduction [27]. A simplified safe region is constructed from the simplified system, which functions as an approximation for the safe region of the full dynamics. Such a low-dimensional representation of the safe region, which is usually two-or three-dimensional, at least provides safety estimates for the original system states, and it can be updated online during the learning process. To account for the uncertainty in making safety decisions for the complex dynamics based on a rough low-dimensional reduction, the safety estimate is represented in a probabilistic form. Then, in accordance with the derived safety estimate, a supervisor is employed to switch the actual applied control action between the learning algorithm and a corrective controller to keep the system safe. However, implementing physically inspired model order reduction usually requires a thorough understanding of the system dynamics. Moreover, multiple performance tests are required before a satisfying simplified system can be found. B. Contribution In this paper, we consider the same supervisory control strategy as used in [26] to construct a general SRL framework that is applicable to complex dynamical systems. However, to overcome the limitations of physically inspired model order reduction, we propose a novel data-driven approach to identify the supervisor, i.e., the low-dimensional representation of the safe region. Inspired by transfer learning [28], we assume that an approximated system model of the complex dynamical system is available. Even though, inevitably, the approximated model displays discrepancies compared with the real system behavior, an initial estimate of safety can usually be obtained by simulating the approximated model. For example, while the dynamics of a real-world humanoid cannot be known perfectly, an approximated humanoid model can be constructed in simulation for making predictions. Hence, by simulating the system, we obtain training data that represents the safety of various original system states. However, as the state space is high-dimensional, it is infeasible to acquire a sufficient amount of training data to directly learn the safe region of the original system. To solve this problem, a data-driven approach that computes probabilistic similarities between each training data is proposed to first learn a low-dimensional representative safety feature of the complex dynamical system. Then, based on the learned feature, a low-dimensional representation of the safe region is identified, which is used as the starting point to SRL in the real system. B. Contribution Due to the inevitable simulation-to-reality gap, the initial low-dimensional representation of the safe region learned from training data displays discrepancies compared to the real system behavior. To compensate for this mismatch, we also propose an efficient online adaptation method to update the low-dimensional representation of the safe region. During the learning process, we receive feedback data about the actual safe region of the real system. These feedback data are not only used to generate new safety estimates, but they also allow us to adjust our confidence in the reliability of the safety estimates obtained from training data. The proposed online adaptation method then updates the low-dimensional representation of the safe region by simultaneously considering the safety estimates derived from training and feedback data. B. Contribution The contributions of this study are summarized as follows: 1) We propose a novel data-driven approach that is capable of systematically identifying a low-dimensional representation of the safe region. In contrast to physically inspired model order reduction, the proposed approach does not require a thorough understanding of system dynamics. Moreover, it is applicable to a wide range of dynamical systems, as long as an approximated system model is available. 2) We introduce a new online adaptation method for updating the low-dimensional representation of the safe region according to the observed real system behavior. By fully utilizing the information contained in the feedback data, the update is performed efficiently, while a reasonable amount of feedback data enables an accurate low-dimensional representation of the safe region to be acquired. 3) Since the proposed approach results in a reliable and representative low-dimensional representation of the safe region, the applicability of the SRL framework is increased. The remainder of this paper is organized as follows: a brief introduction to the SRL framework is given in Section II. Thereafter, we present an overview of our approach in Section III. In Section IV, we propose a data-driven method to derive a low-dimensional representation of the safe region. This is followed by the online adaptation method in Section V, which is used to update the low-dimensional representation. An example is presented in Section VI to demonstrate the performance of the proposed approach. In Section VII, we discuss several properties of the approach, and Section VIII concludes the paper. A table of nomenclatures is included in the supplementary material. II. SAFE REINFORCEMENT LEARNING FRAMEWORK In this paper, we consider SRL as to optimize a learningbased policy with respect to a predefined reward function, while ensuring that the system state remains in a safe region of the state space. In this section, we outline a general SRL framework for dynamical systems, see also [26]. The SRL framework first identifies a safe state-space region as the safe region. Then, the learning-based policy has the flexibility to execute desired actions within the safe region. Once the system state is about to leave the safe region, a corrective controller is applied to drive the system back to a safe state. A. System Model and Safe Region A nonlinear control-affine dynamical system is given bẏ A. System Model and Safe Region where x ∈ X ⊆ R n is the n-dimensional system state within a connected set X , u ∈ U ⊆ R m is the m-dimensional control input to the system. With a given control policy u = K(x), the closed-loop system dynamics is denoted aṡ A. System Model and Safe Region If a system state x satisfies f K (x) = 0, then it is an equilibrium point. Any equilibrium point can be shifted to the origin by a state transform. Therefore, this paper only uses the origin to formulate the safe region. A. System Model and Safe Region Assumption 1. The origin is a safe state and a locally asymptotically stable equilibrium point under the control policy K(x). A. System Model and Safe Region Based on Assumption 1, the ROA of the origin is defined as A. System Model and Safe Region where Φ(t; x 0 ) is the system trajectory of (2) that starts at the initial state x 0 when time t = 0. The ROA R is the set of initial states that can be driven back to a safe state, i.e., the origin, under the control policy K(x). Therefore in this paper, we define the safe region of the SRL framework as follows. A. System Model and Safe Region Definition 1. A safe region S is a closed positive invariant subset of the ROA R containing the origin. We consider the system state x as safe if it is in the safe region S. B. SRL Framework To realize SRL, we keep the system state within the safe region during the learning process. This is achieved by an SRL framework that adapts a switching supervisory control strategy where the given controller K(x) acts as corrective control and π(x) is the learning-based policy that is used while the system state is in the safe region (see Fig. 1). A supervisor determines the actual applied actions as B. SRL Framework where t safe is the first time point at which the system state x is on the boundary of the safe region S. For each learning iteration, the system starts inside the safe region S for time t = 0. The learning algorithm then updates and executes the learning-based policy π(x). Since the safe region S is a closed set and the trajectory is continuous, the system state can only leave the safe region S by crossing the boundary. Hence, once the system state x is on the boundary of the safe region S, this learning iteration is terminated at time t = t safe and the corrective controller K(x) is activated. For the remaining time of this learning iteration, the corrective controller K(x) attempts to bring the system back to the origin to maintain safety. After this safety recovery, the learning environment is reset and the next learning iteration starts at time t = 0. Remark 1. In this paper, we only consider the safe region obtained from the ROA R, where stability is used as the safety criterion. If more safety criteria should be taken into consideration, such as collision avoidance represented as state constraints, the safe region can be constructed using other control-theoretical concepts, e.g., control barrier functions [29] or invariance functions [30]. The definition of the safe region does not affect the use of the SRL framework and the proposed approach, as long as the safe region is a closed and control invariant set under a given corrective controller. C. SRL Framework for Complex Dynamical Systems The aforementioned SRL framework is not directly applicable to complex dynamical systems, as in such cases, calculating the safe region S is computationally infeasible [31]. An SRL framework based on estimating safety with a lowdimensional representation of the safe region is introduced to overcome this problem [26]. C. SRL Framework for Complex Dynamical Systems Each original system state x is mapped to a low-dimensional safety feature, represented as a simplified state y ∈ Y ⊆ R ny , n y n, through a state mapping y = Ψ(x). The state mapping is chosen such that safe and unsafe states are separated in the simplified state space Y. Nevertheless, due to the order reduction, multiple original system states that have different safety properties can map to the same simplified state. Hence, the safety of the original system state x is estimated by the safety of its corresponding simplified state y in a probabilistic form as C. SRL Framework for Complex Dynamical Systems where Γ(y) is a function defined over the simplified state space Y and is referred to as the safety assessment function (SAF) in this paper. Not only does the SAF Γ(y) encode information relating to the safety of the simplified state y, it also includes the uncertainty involved in making predictions for a highdimensional state by using a low-dimensional reduction. In Section IV, we demonstrate how to efficiently identify the state mapping y = Ψ(x) as well as the SAF Γ(y) using a data-driven method. For a given SAF Γ(y), the probability p(x ∈ S) depends only on the simplified state y. Therefore, by introducing a predefined probability threshold p t , we obtain a low-dimensional representation of the safe region, denoted as S y , in the simplified state space Y C. SRL Framework for Complex Dynamical Systems which works as an approximation of the high-dimensional safe region S. The supervisor (4) is thus modified to C. SRL Framework for Complex Dynamical Systems where t safe denotes the first time point at which the probability p(x ∈ S) is not larger than the threshold p t , i.e., p(x ∈ S) = Γ(y) ≤ p t . More details of this SRL framework are given in [26]. C. SRL Framework for Complex Dynamical Systems III. OVERVIEW OF THE APPROACH The essential factor when applying the SRL framework to complex dynamical systems is finding a reliable lowdimensional representation of the safe region S y . In order to overcome the limitations of physically inspired model order reduction, we propose a novel data-driven approach to identify the low-dimensional representation of the safe region S y , together with a new online adaptation method to efficiently update the learned low-dimensional representation. C. SRL Framework for Complex Dynamical Systems We consider a scenario in which the complex dynamical system, referred to as the real system, has partially unknown dynamics. However, we assume that a nominal approximated system model is available and can be used to roughly predict the real system behavior. The nominal system model is assumed to be represented by (1). The real system model is then given asẋ C. SRL Framework for Complex Dynamical Systems where d(x) is the unknown, unmodelled part of the system dynamics. For brevity, we refer to the nominal and the real systems as simulation and reality, respectively. Due to the highly nonlinear and high-dimensional dynamics, the direct calculation of the safe region is computationally infeasible for both the nominal and the real systems. Besides, although the real system provides exact safety information, in general it is expensive to collect data directly on the real system. In contrast, simulating the nominal system is usually efficient and allows a sufficient amount of data to be obtained for finding a low-dimensional safety representation. However, due to the unknown term d(x), such data is inaccurate and has to be modified to account for the real system behavior. C. SRL Framework for Complex Dynamical Systems Based on these facts, to construct a reliable low-dimensional representation of the safe region S y for the real system, we propose the approach outlined in Fig. 2 (a complete work-flow is given in the supplementary material). It consists of two parts that solve the following two problems, respectively: 1) How to derive and initialize the low-dimensional representation of the safe region S y by using the nominal system model. 2) How to update the low-dimensional representation of the safe region S y online with the observed real system behavior. Part 1) Derivation and Initialization Since no information about uncertainty d(x) is available prior to the learning process, the corrective controller K(x) is designed for the nominal system model (1). Although the safe region of the nominal system is unknown, its simulation is possible and delivers a dataset as follows. Part 1) Derivation and Initialization Definition 2. The training dataset of k t training data is given as Fig. 2: Overview of the proposed approach. The lowdimensional representation S y is initialized using the training dataset D train obtained from the nominal system. Once we collect the feedback dataset D feedback on the real system, the low-dimensional representation S y is updated using the proposed online adaptation method. Part 1) Derivation and Initialization It contains the simulation results that state whether the safety recovery is successful or not for different system states x under the corrective controller K(x). The i-th training data consists of three elements Part 1) Derivation and Initialization x i sim is the initial system state in which the corrective controller K(x) is activated. s sim (x i sim ) is the safety label that represents the result of safety recovery for the state x i sim . We denote s sim (x i sim ) = 1 if the system state x i sim is safe under the corrective controller K(x), and s sim ( Part 1) Derivation and Initialization is the corresponding system trajectory of the safety recovery that starts at x i sim when time t = 0. The subscript sim indicates that the data is collected by using the nominal system model. Part 1) Derivation and Initialization The low-dimensional representation of the safe region S y is thus derived and initialized by using the training dataset D train . To do this, we first identify the state mapping y = Ψ(x) using a data-driven method that computes the probabilistic similarity between each training data (Section IV-A). Then to facilitate an efficient computation, we discretize the simplified state space Y into grid cells and assign an index vector v ∈ Z ny + to each grid cell. By assuming that the SAF Γ(y) is constant in each grid cell, we thus obtain a discretized safety assessment function (DSAF) Γ d (v). A discretized lowdimensional representation of the safe region S y is then given by applying the probability threshold p t on the DSAF Γ d (v) (Section IV-B). To enable the SRL framework on the real system, we also calculate an initial estimate of the DSAF Γ d (v), denoted as the prior DSAF Γ prior d (v), from the training dataset D train . It is then used to initialize the low-dimensional representation of the safe region S y (Section IV-C). Further details of Part 1) are given in Section IV. Part 2) Online Adaptation Due to the unknown part of the system dynamics d(x), there is inevitably a mismatch between simulation and reality. In order to compensate for this mismatch, we update the low-dimensional representation S y by accounting for the real system behavior. Part 2) Online Adaptation Each time the corrective controller K(x) is activated during learning, we observe feedback data about the real safe region. The set of feedback data is defined as follows. Part 2) Online Adaptation Definition 3. The feedback dataset of k f feedback data is given as Part 2) Online Adaptation It contains the results of safety recovery from implementing the corrective controller K(x) on the real system. The i-th feedback data is Part 2) Online Adaptation have the same meaning as in Definition 2, the subscript real indicates here that the data is collected on the real system. Part 2) Online Adaptation Since collecting data on the real system, e.g., real-world robots, is usually expensive and time-consuming, in most cases the feedback dataset D feedback has a limited size. Therefore, the low-dimensional representation of the safe region S y needs to be updated in a data-efficient manner. To achieve this, we propose an online adaptation method, as given in Section V. It comprises three steps: First, we modify the prior DSAF Γ prior d (v) by changing our confidence in its reliability using the feedback dataset D feedback (Section V-A). Second, to fully utilize the valuable information contained in the feedback dataset D feedback , we generate another feedback DSAF Γ feedback d (v) (Section V-B). Third, the two DSAFs are fused to obtain a more accurate DSAF Γ d (v), which is then used to update the low-dimensional representation S y (Section V-C). IV. LEARNING A LOW-DIMENSIONAL REPRESENTATION OF THE SAFE REGION To derive the low-dimensional representation of the safe region S y , two components have to be determined: the state mapping y = Ψ(x), which gives the low-dimensional safety feature, and the SAF Γ(y), which predicts the safety of original system states. In this section, we present a data-driven method for identifying the low-dimensional representation of the safe region S y . It utilizes a technique called t-distributed stochastic neighbor embedding (t-SNE) [32], which was originally proposed for visualizing high-dimensional data. A. Identifying the State Mapping with t-SNE To identify the state mapping y = Ψ(x), we first find the realization of the low-dimensional safety feature, i.e., the values of simplified states y 1 , . . . , y kt , that best corresponds with the training dataset D train by revising t-SNE. Through measuring the similarity between each high-dimensional data point, t-SNE defines a two-or three-dimensional data point such that similar high-dimensional data points are represented by nearby low-dimensional data points with high probability. It uses Euclidean distance between each pair of high-dimensional data points as the metric for measuring similarity. However, since our purpose is to construct the low-dimensional representation of the safe region S y , we are more interested in safety rather than just distance. Accordingly, we propose a new metric that considers similarity and safety at the same time. A. Identifying the State Mapping with t-SNE The general motivation for determining the simplified state y is that the safe and unsafe original system states x should be separated in the simplified state space Y. Since, in this paper, the safe region is defined with respect to the ROA, the trajectories of safe initial states will converge to the origin, while unsafe initial states will have divergent trajectories. Hence, if two original system states x have similar trajectories under the corrective controller K(x), then ideally they should also have nearby corresponding simplified states y (see Fig. 3). Based on this, we first calculate the pairwise trajectory distance ω ij between the i-th and j-th training data, using dynamic time warping (DTW) as A. Identifying the State Mapping with t-SNE where dtw(·) represents the DTW measurement. We thus have ω ij = 0 if i = j, and the more similar the trajectories are, the smaller the value of ω ij is. A. Identifying the State Mapping with t-SNE Remark 2. Besides DTW, other trajectory distance measures, e.g., Fréchet distance, can also be used in (13). Changing the distance metric does not affect the applicability of the proposed approach. However, DTW turns out to be a more suitable metric for trajectories of the dynamical systems we investigated. A. Identifying the State Mapping with t-SNE While, in general, the trajectory distance ω ij reflects the probability that original system states x i sim and x j sim have the same safety property, it is still possible that safe and unsafe states have similar trajectories. To obtain a better lowdimensional safety feature, we thus modify the trajectory distance ω ij in relation to the safety label s sim (x sim ) and compute the distance Ω ij between the i-th and j-th training data as A. Identifying the State Mapping with t-SNE where δ is a constant and ω max = max i,j ω ij is the maximum trajectory distance within the training dataset D train . The distance Ω ij is then used as the new metric for t-SNE to measure the similarities between different training data. A. Identifying the State Mapping with t-SNE In our experiments, we find that a small value of δ is sufficient for providing a satisfying result of t-SNE (in this paper, for example, we use δ = 0.01). A large value of δ, in contrast, may lead to information contained in trajectories being ignored, which can reduce the representation power of the learned simplified states y. A sensitivity analysis of the parameter δ is provided in the supplementary material. A. Identifying the State Mapping with t-SNE After computing the distance Ω ij between each pair of training data, we apply t-SNE on the training dataset D train A. Identifying the State Mapping with t-SNE . Based on these distances, t-SNE calculates the values of corresponding simplified states y, where similar and dissimilar training data are modeled by nearby and distant simplified states, respectively. A. Identifying the State Mapping with t-SNE to derive a realization of the low-dimensional safety feature. To do this, we modify the conditional probability p j|i of t-SNE [32] using the distance Ω ij as A. Identifying the State Mapping with t-SNE where σ i is the variance of the Gaussian distribution that is centered on the state x i sim . The remaining computations are the same as in t-SNE. Since this part makes no contribution, the main steps involved in performing t-SNE are given only in the supplementary material. More details are available in [32]. A. Identifying the State Mapping with t-SNE Using t-SNE, we obtain the values of simplified states y 1 , . . . , y kt that correspond to the training dataset D train as an initial realization of the low-dimensional safety feature. Such a realization models similar training data with nearby simplified states, e.g., y 1 and y 2 in Fig. 3, and dissimilar training data with distant simplified states, e.g., y 1 and y 3 in Fig. 3. In general, the simplified state y is chosen to be two-or threedimensional, i.e., y ∈ R ny with n y = 2 or n y = 3. In this paper, we set n y = 2. A. Identifying the State Mapping with t-SNE Note that t-SNE only determines the values of simplified states but gives no expression of the state mapping y = Ψ(x). Therefore, to identify the state mapping y = Ψ(x), we learn a function approximator using the values of simplified states y 1 , . . . , y kt obtained from t-SNE and the original system states x 1 sim , . . . , x kt sim contained in the training dataset D train . This function approximator, e.g., we use a neural network in this paper, is then utilized to represent the state mapping y = Ψ(x) = NN(x). A. Identifying the State Mapping with t-SNE Remark 3. Different forms of function approximator, for instance, a Gaussian process, can be used to describe the state mapping y = Ψ(x). The selection of function approximator depends mainly on the available number of training data. A. Identifying the State Mapping with t-SNE Due to the approximation error in the function approximator, some original system states x may have slightly different values in their simplified states y when comparing the initial realization obtained from t-SNE with the one computed from the learned state mapping y = Ψ(x) (for an example, see the simulations in Section VI-B and in particular Fig. 7). Hence, to reduce the influence of this issue on deriving the lowdimensional representation of the safe region S y , we compute the values of simplified states y 1 , . . . , y kt once again with the learned state mapping. This final realization of the lowdimensional safety feature is then used for formulating the SAF Γ(y). B. Belief Function Theory and DSAF Once the state mapping y = Ψ(x) is determined, we are able to generate the SAF Γ(y) using the training dataset D train . However, due to the limited size of the training data, it is difficult to construct the SAF Γ(y) over the continuous simplified state space Y. Therefore, we discretize the simplified state space Y. B. Belief Function Theory and DSAF The range of the simplified state space Y is determined by the maximum and minimum values of the simplified states y 1 , . . . , y kt in each dimension. We then discretize the simplified state space Y into grid cells with a predefined step size. Each grid cell is assigned an index vector v ∈ Z 2 + to indicate its position in the simplified state space Y; for example, v = [2, 3] refers to the grid cell that is located at the second row and third column (see Fig. 4). A locating function is defined as follows. B. Belief Function Theory and DSAF Definition 4. By locating the simplified state y = Ψ(x) for an original system state x in the simplified state space Y, the locating function L(x) returns the index vector v of the grid cell that it belongs to. B. Belief Function Theory and DSAF By assuming that the SAF Γ(y) is constant in each grid cell, we obtain a DSAF Γ d (v) that we will have to define. Then, instead of using the simplified state y, the safety of an original system state x is estimated by way of the index vector v as B. Belief Function Theory and DSAF In general, the DSAF Γ d (v) for an index vector v can be approximated by the number of safe and unsafe original system states x that map to the corresponding grid cell, i.e., L(x) = v. However, due to the high-dimensional original system state space, it is, in most cases, infeasible to acquire a sufficient amount of data to derive an accurate estimate. To solve this problem, we propose using belief function theory [33] to describe the DSAF Γ d (v), where the uncertainty caused by insufficiency in the data amount is considered by a subjective probability [34]. B. Belief Function Theory and DSAF Belief function theory is a general approach to modeling epistemic uncertainty that uses a belief mass to represent the probability of the occurrence of an event. The assignment of belief masses to all possible events is denoted as the basic belief assignment (BBA). The belief mass on the entire event domain, i.e., the probability that one arbitrary event happens, indicates the subjective uncertainty of the estimate [34]. According to this, we define a BBA B v separately for each index vector v as follows. B. Belief Function Theory and DSAF Definition 5. The BBA B v for an index vector v is given as B. Belief Function Theory and DSAF which represents the belief about the value of the DSAF Γ d (v) for the index vector v. The belief masses b v safe and b v unsafe are the probabilities of the occurrence of two complementary events, i.e., p(x ∈ S) and p(x / ∈ S), where the original system state x has the index vector v from the locating function L(x). µ v is the subjective uncertainty that reflects the confidence level of estimating the safety. µ v = 0 means we believe that the estimate is absolutely correct. It holds that B. Belief Function Theory and DSAF The low-dimensional representation of the safe region S y is then defined among the discretized simplified state space as B. Belief Function Theory and DSAF where p t is the predefined probability threshold. In the next subsection, we explain how to initialize the DSAF Γ d (v) so as to enable the application of the SRL framework on the real system. C. Initializing the DSAF from Training Data Since each training data provides information on the value of the DSAF Γ d (v), the low-dimensional representation of the safe region S y is initialized using the training dataset D train . By considering each training data as a belief source, we formulate the following BBAs for all training data and later fuse them to derive an initial estimate of the DSAF Γ d (v). Definition 6. The BBA B i obtained from the i-th training data D i train is defined as C. Initializing the DSAF from Training Data It represents the belief about the value of the DSAF Γ d (v) for the index vector v = L(x i sim ), where the belief source is the ith training data. b i safe , b i unsafe and µ i have the same meanings as in Definition 5. C. Initializing the DSAF from Training Data Due to the inevitable simulation-to-reality gap, we initialize the BBA of each training data with a constant uncertainty µ ini > 0 as C. Initializing the DSAF from Training Data where i = 1, . . . , k t . Since no information about the unknown term d(x) is available prior to the learning process on the real system, the initial subjective uncertainties are chosen to be the same for all BBAs. Later in the online adaptation method, the subjective uncertainties are updated by using the feedback data to realize more accurate safety estimates. For each index vector v, the BBA B v is then estimated by using the BBAs of the training data. To achieve this, we first generate a set of BBAs B v for each index vector v C. Initializing the DSAF from Training Data which contains the BBAs of the training data whose original system state x sim corresponds to the index vector v. The size of the set B v is denoted as k v . Every BBA in the set B v provides a belief about the value of the DSAF Γ d (v) for the index vector v. Hence, an estimate of the BBA B v is derived by fusing all BBAs within the set B v as C. Initializing the DSAF from Training Data where B ini is an initial estimate that represents our guess about the BBA B v when no training data is available (see Fig. 4). F(·) is a fusion operation among the set B v , which is referred to as weighted belief fusion and is defined according to [35] as C. Initializing the DSAF from Training Data We refer to this estimate of the BBA B v as the prior estimate B prior v . Since it is still likely to be imprecise if the available number of training data is too small, the fusion is performed only when the number of BBAs contained in the set B v is not smaller than a minimum number k min . Otherwise, the prior estimate B prior v is set to the initial estimate B ini . We use B ini = (0.05, 0.55, 0.4) in our experiments. This means that if there is very little experience available in the form of training data for one grid cell, then the respective states will initially be considered as unsafe. The resulting prior estimate B prior v is a BBA that satisfies which delivers an estimate of the DSAF Γ d (v) that is derived from the training data. The low-dimensional representation of the safe region S y is then initialized by letting Γ d (v) = Γ prior d (v). In the next section, we propose an online adaptation method to update the DSAF Γ d (v) using feedback data, to account for the unknown part of the system dynamics d(x). V. ONLINE ADAPTATION OF THE SAFETY ASSESSMENT FUNCTION In the early learning phase with the real system, the prior DSAF Γ prior d (v) allows a rough estimate of the safety of an original system state. During the learning process, the feedback data is used to update the DSAF Γ d (v) to achieve more accurate safety estimates. Each update iteration of the DSAF Γ d (v) consists of three steps. First, we modify the prior DSAF Γ prior d (v) by revising the subjective uncertainties of the BBAs of the training data. Second, we compute a feedback DSAF Γ feedback d (v) using the feedback data. Third, the updated DSAF Γ d (v) is obtained by fusing the prior and feedback DSAFs. Note that each time the corrective controller K(x) is activated for the real system, we obtain new feedback data. Hence the size of the feedback dataset D feedback increases incrementally during the learning process. For simplicity, we consider the feedback dataset D feedback of size k f in this section. Details of the online adaptation method are given in the following. A. Update of the Prior DSAF with Feedback Data The prior DSAF Γ prior d (v) is constructed using the training dataset D train , in which the uncertainty caused by the unknown term d(x) is represented by the subjective uncertainty µ i of each BBA B i . Hence, the update of the prior DSAF Γ prior d (v) will now modify the subjective uncertainties by accounting for new information given by feedback data. For this, we assume that original system states that are in close proximity to each other most probably have similar safety properties. A. Update of the Prior DSAF with Feedback Data Assumption 2. The probability p(s real (x 1 ) = s real (x 2 )) that two original system states x 1 and x 2 have the same safety property on the real system is inversely proportional to their Euclidean distance in the original state space ||x 1 − x 2 ||. A. Update of the Prior DSAF with Feedback Data In addition, we define a function P (x) to quantify the similarity with respect to the safety of nominal and real system trajectories that start in the same initial original system state A. Update of the Prior DSAF with Feedback Data It represents the probability that for a given original system state x, its safety label s sim (x) obtained with the nominal system is the same as the safety label s real (x) obtained with the real system. Then, according to Assumption 2, if we observe an original system state x that has the same safety property both in simulation and in reality, it is likely that other original system states that are close to the observed state will also show the same safety property. In order to predict the value of the function P (x), we approximate it with a Gaussian process regression (GPR) model P (x) = GP(x). For each original system state x real contained in the feedback dataset D feedback , we examine its safety label s sim (x real ) in simulation. This leads to a set of samples {P (x 1 real ), . . . , P (x k f real )} for the function P (x), in which Remark 4. If the real system is a real-world dynamical system, then it is usually difficult to test the corrective controller K(x) with arbitrary initial original system states x in reality, since there is a high risk of encountering unsafe behaviors. However in contrast, the simulation can be initialized with any original system state x real contained in the feedback data, which then makes it possible to approximate the function P (x). The trained GPR model GP(x) is then used to update the BBA B i of each training data. The general motivation is that, we decrease the subjective uncertainty µ i if we are confident about the reliability of this training data. Hence for the ith training data, we compute a predicted mean value of the function P (x i sim ), denoted as p i mean , from the GPR model GP(x), along with a corresponding standard deviation p i std of the predicted value. Since a low value of the standard deviation p i std means we have observed enough feedback data to make a reliable prediction, we only update the BBA B i if the standard deviation p i std is smaller than a predefined threshold p th A. Update of the Prior DSAF with Feedback Data with the new subjective uncertainty µ i calculated as A. Update of the Prior DSAF with Feedback Data where µ ini is the same initial subjective uncertainty as that given in (22) (see Fig. 5 for a graphical representation of (33)). BBAs B i with p i std > p th remain unchanged, as in (22). Such an update of the BBA B i considers the predicted value of the function P (x i sim ) and the reliability of this prediction at the same time. A. Update of the Prior DSAF with Feedback Data (33) is designed by considering two aspects: first, the subjective uncertainty µ i is set equal to µ ini when p i std ≥ p th . This means that in this case we do not have the confidence to update the BBA B i , as not enough information is observed from the feedback data; second, due to the inevitable reality gap, the subjective uncertainty µ i maintains a minimum uncertainty µ min even when the standard deviation p i std is 0. We use the exponential form such that the decrease in µ i is faster when the standard deviation p i std is near the threshold p th . The parameter α > 1 determines the decay rate and is selected by considering the actual learning task. A. Update of the Prior DSAF with Feedback Data Note that for the same training data, the relationship between the standard deviation p i std and the threshold p th can change during the learning process. For example, we might obtain p i std ≤ p th in the current update iteration, but in the next update iteration it changes to p i std > p th . This happens primarily when we first observe a safe original system state but followed by a nearby unsafe state, such that the safety of the states in between these two observed states becomes uncertain. In such cases, we set the BBA B i back to the initial BBA given in (22). A. Update of the Prior DSAF with Feedback Data Once the BBAs B i of all training data have been updated with the up-to-date feedback dataset D feedback , the prior estimate B prior v for each index vector v is recomputed using (24). This results in an updated prior DSAF Γ prior d (v), which is used later for revising the DSAF Γ d (v). B. Feedback DSAF The feedback data contain the information about the real safety properties of different original system states x. To fully utilize this valuable information, we construct an additional DSAF, denoted as the feedback DSAF Γ feedback d (v), using the feedback dataset D feedback . B. Feedback DSAF As the amount of data is insufficient, we also consider the estimate obtained from the feedback data as a subjective probability [26]. Then, as with the prior estimate B prior v , we formulate another estimate of the BBA B v for each index vector v as B. Feedback DSAF which is referred to as the feedback estimate B feedback v . For each index vector v, the feedback estimate B feedback v is determined by the number of safe and unsafe feedback data that correspond to this grid cell. By sorting the feedback dataset D feedback with the locating function L(x), we denote the number of safe feedback data that have the index vector v from the locating function, i.e., L(x real ) = v and s real (x real ) = 1, as k v safe (and k v unsafe for the number of unsafe feedback data). If at least one feedback data is available for the index vector v, i.e., k v safe + k v unsafe ≥ 1, we compute the feedback estimate B feedback v as follows B. Feedback DSAF The subjective uncertainty µ v,feedback decreases if more feedback data are observed for the index vector v. It satisfies that, if a sufficient number of feedback data is obtained, the subjective uncertainty µ v,feedback approaches 0. In such a case, the belief masses b v,feedback safe and b v,feedback unsafe can be considered as the actual probabilities. The parameters β and γ define the initial value and the decay rate of the subjective uncertainty µ v,feedback , respectively. If no feedback data is observed for the index vector v, we set the feedback estimate B feedback v to an empty BBA B ∅ defined as B feedback v = B ∅ = (0, 0, 1), which indicates that no safety estimate can be made. B. Feedback DSAF Using the feedback estimate B feedback v , we obtain the following feedback DSAF Γ feedback B. Feedback DSAF which represents the estimate of the DSAF Γ d (v) derived from the feedback data only. In the next subsection, we fuse the feedback DSAF Γ feedback C. Fusion of Prior and Feedback DSAFs The prior and feedback DSAFs both provide beliefs about safety by using different datasets as their belief source. To update the DSAF Γ d (v), we fuse these two functions using weighted belief fusion as given in (25)(26)(27). This leads to a fused estimate B fuse v for each index vector v C. Fusion of Prior and Feedback DSAFs which is computed as The fused estimate B fuse v fulfills the following property, which is also given in [26]. C. Fusion of Prior and Feedback DSAFs Proposition 1. If the number of feedback data approaches infinity, the fused estimate B fuse v becomes the actual probabilities, and the prior estimate B prior v has no effect in making safety estimates. C. Fusion of Prior and Feedback DSAFs Proof. Proposition 1 is justified by the following equations C. Fusion of Prior and Feedback DSAFs which are obtained by simplifying (25)(26)(27) with the set C. Fusion of Prior and Feedback DSAFs Considering computational efficiency, the update of the DSAF Γ d (v) is generally performed once when every k u feedback data is obtained, where the value of k u is selected according to the actual learning task. In each update iteration (indexed by number N , see Section VI-C), we first use the upto-date feedback dataset D feedback to update the prior DSAF which also gives the latest low-dimensional representation of the safe region S y according to (20). With further feedback data, the DSAF Γ d (v) becomes more accurate and more reliable safety estimates are obtained. VI. QUADCOPTER EXPERIMENTS In this section, we demonstrate the proposed approach for identifying the low-dimensional representation of the safe region S y , using the example of a quadcopter. Fig. 6: The system state x of a quadcopter is defined using the ground frame and the body frame. A. Experimental Setup We simulate the quadcopter using the system dynamics given in [36] with MATLAB Simulink 2 (Version R2019b) running on a laptop powered by an Intel i7-7700HQ CPU. The 12-dimensional system state is defined as A. Experimental Setup where p g = [p x , p y , p z ] T and θ g = [θ r , θ p , θ y ] T are the linear and angular positions defined in the ground frame, v b = [v x , v y , v z ] T and ω b = [ω r , ω p , ω y ] T are the linear and angular velocities defined in the body frame (see Fig. 6). The control input u consists of the four motor speeds of the quadcopter. For the nominal system model, we set the mass of the quadcopter to m = 1 kg and the maximal lifting force to f = 200 N. The safety of a given state x is determined by simulating the controlled dynamics with the corrective control K(x) that starts in initial state x, and checking if the controller is able to successfully drive the quadcopter back to a hovering state without crashing. In this example, we use the PID controller given in [36] as the corrective controller K(x). It stabilizes the quadcopter's height as well as its roll, pitch and yaw rotations. The coefficients of the PID controller are: K P,h = 1.5, K I,h = 0, K D,h = 2.5 for the height control, and K P,r = K P,p = K P,y = 6, K I,r = K I,p = K I,y = 0, K D,r = K D,p = K D,y = 1.75 for the roll, pitch and yaw rotations control, respectively. A. Experimental Setup To generate the training dataset D train , we first create k t = 10000 original system states x. We set p x = p y = 0 and p z = 2 m to leave enough space and time for the corrective controller K(x). All other variables are sampled with a uniform distribution within the following range: 0 ≤ θ r , θ p , θ y ≤ 2π rad, −3 m/s ≤ v x , v y , v z ≤ 3 m/s, −10 rad/s ≤ ω r , ω p , ω y ≤ 10 rad/s. The training dataset D train is then obtained by examining the performance of the corrective controller K(x) for all these initial values. B. Identifying the Low-dimensional Representation of the Safe Region The initial realization of the low-dimensional safety feature, i.e., the values of simplified states y 1 , . . . , y kt , obtained from t-SNE is given in Fig. 7a. We use δ = 0.01 in (14) and set the perplexity and tolerance of t-SNE (see [32]) to 40 and 1e −4 , respectively. The result shows that the safe and 2 https://www.mathworks.com/products/simulink.html The final realization of simplified states y 1 , . . . , y kt obtained by recomputing with the learned neural network that represents the state mapping y = Ψ(x) = NN(x). B. Identifying the Low-dimensional Representation of the Safe Region unsafe original system states are clearly separated in the twodimensional simplified state space Y ⊆ R 2 . The state mapping y = Ψ(x) is represented by a two-layer neural network with 128 neurons in each layer, which is trained using the initial realization of simplified states y 1 , . . . , y kt and the set of original system states {x 1 sim , . . . , x kt sim }. By recomputing the outputs of the learned neural network, we obtain the final realization of the lowdimensional safety feature, i.e., the values of the simplified states y 1 , . . . , y kt , given in Fig. 7b. Due to approximation error, certain simplified states have a slightly changed position compared to the values obtained from t-SNE. However, this does not affect the computation of the low-dimensional representation of the safe region S y , as the results are updated later in the online adaptation using the feedback data. B. Identifying the Low-dimensional Representation of the Safe Region We set the simplified state space as {Y | − 30 ≤ y 1 , y 2 ≤ 30}. By discretizing the simplified state space Y into grid cells with step size 1 in both y 1 and y 2 , we obtain the index vector v ∈ {1, 2, . . . , estimates the probability p(x ∈ S) for original system states x that take the index vector v from the locating function L(x). In Fig. 8i, the DSAF Γ d (v) is initialized by the prior DSAF Γ prior d (v). In the next subsection, we demonstrate the update process of the DSAF Γ d (v) using the proposed online adaptation method. C. Updating the Low-dimensional Representation To simulate a mismatch between the nominal and the real systems, we set the mass and the maximal lifting force of the real system to m = 0.8 kg and f = 145 N, respectively. To eliminate the influence of a specific learning task or algorithm and focus on illustrating the update process, the feedback dataset D feedback is obtained by randomly selecting states x real where the corrective controller K(x) is activated, such that the entire original system state space can be visited. C. Updating the Low-dimensional Representation The following parameters are used in the online adaptation method: µ min = 0.1, p th = 0.3, α = 3e 5 , β = 0.3, γ = 0.4. The GPR model GP(x) uses a squared exponential kernel. To demonstrate the online update process, we collect the feedback data one by one and incrementally extend the feedback dataset D feedback . The DSAF Γ d (v) is updated once when every k u = 20 feedback data are obtained. C. Updating the Low-dimensional Representation The results of the online adaptation are given in Fig. 8. Prior to the update (update iteration N = 0), the DSAF Γ d (v) is initialized as the prior DSAF Γ prior d (v), while the feedback DSAF Γ feedback d (v) is constructed using the empty BBA B ∅ (see Fig. 8a, 8e, 8i). Once the learning procedure has started, we collect the feedback data incrementally. In the early updating phase, e.g., update iteration N = 10, the DSAF Γ d (v) is mainly determined by the prior DSAF Γ prior d (v). The subjective uncertainties of each training data are modified using the feedback data, where we become confident about the safety of certain training data when we observe a nearby feedback data that has the same safety property. Since the amount of feedback data is insufficient for providing a reliable safety estimate, the feedback DSAF Γ feedback d (v) has a smaller effect on the computation of the low-dimensional representation of the safe region S y (see Fig. 8b, 8f, 8j). C. Updating the Low-dimensional Representation When more feedback data are available, e.g., update iteration N = 50, the feedback DSAF Γ feedback d (v) is able to provide more accurate safety estimates, hence its influence on the DSAF Γ d (v) also becomes more significant. Due to the high dimensionality of the original system state x and the limited amount of feedback data, it is difficult to acquire an estimate with high confidence from the GPR model GP(x). As a result, changes are marginal in the prior DSAF Γ prior Fig. 8c, 8g, 8k). With even more feedback data, e.g., update iteration N = 100, the DSAF Γ d (v) is able to provide reliable estimates about the probability p(x ∈ S) for each index vector v. While the prior and feedback DSAFs are updated accordingly, the DSAF Γ d (v) represents the actual low-dimensional representation of the safe region S y under the unknown part of the system dynamics d(x) (see Fig. 8d, 8h, 8l). D. Comparison with Physically Inspired Model Order Reduction We compare the proposed approach with the physically inspired model order reduction presented in [26] in terms of the representation power of the identified low-dimensional representation of the safe region S y , i.e., how well the safe and unsafe states are separated. To do this, we compute another DSAF Γ d (v) using physical features. As in [26], the low-dimensional safety feature, i.e., the simplified state y, is selected for the velocities in x and y directions y = [v x , v y ] T . To avoid any dangerous behavior in early learning phase, the low-dimensional representation of the safe region S y is initialized conservatively [26] by setting Γ d (v) = 0.6 for grid cells that satisfy −0.5 ≤ v x , v y ≤ 0.5 (see Fig. 9a). D. Comparison with Physically Inspired Model Order Reduction As the learning task in [26] is relatively simple, the exploration in the original system state space is limited to a small subspace around the origin (see Section VII-A for more discussions on this point). Therefore, to make a fair comparison, we also generate another feedback dataset D feedback that has the same size as the dataset D feedback . However, instead of the complete original system state space given in Section VI-A, the states x real in the set D feedback are sampled from a smaller state space, where the ranges of angular positions and angular velocities are changed to − 1 3 π ≤ θ r , θ p , θ y ≤ 1 3 π rad and −3 rad/s ≤ ω r , ω p , ω y ≤ 3 rad/s, respectively. D. Comparison with Physically Inspired Model Order Reduction We first compare the performance of both approaches by considering a small state space, i.e., the feedback dataset D feedback is used for the update. The results show that, in this case, physical features are able to provide reasonable predictions about safety, i.e., the safe and unsafe regions are separated (see Fig. 9b). Meanwhile, the proposed approach also produces a satisfying result with a marginally better separation between safe and unsafe states (see Fig. 9c). D. Comparison with Physically Inspired Model Order Reduction However, if the learning task becomes more complex, the complete state space usually has to be explored to enable an optimal policy to be found. To simulate this scenario, we also update the initial DSAF Γ d (v) using the feedback dataset D feedback . As seen in Fig. 9d, when considering the entire original system state space, it is difficult to make reliable safety estimates based only on physical features. The boundary between safe and unsafe regions becomes unclear, and there are numerous grid cells that lead to a safety estimate close to 0.5. In contrast, the proposed approach is still able to find a representative low-dimensional representation of the safe region S y for the complete state space. As the identified simplified state y can describe the safety of original system states x more precisely, a satisfying separation between safe and unsafe regions is achieved (see Fig. 8l) and more useful safety estimates are obtained. The independence of the size of the state space indicates the possibility of implementing the proposed approach on different learning tasks, which in turn increases the applicability of the SRL framework. VII. DISCUSSION In this work, we propose a general approach for efficiently identifying a low-dimensional representation of the safe region. Two important aspects of the proposed approach are discussed in this section. A. Relevance to Different SRL Tasks In [26], the SRL framework utilizes the low-dimensional representation of the safe region S y that is obtained using physically inspired model order reduction. Such a lowdimensional representation is useful when the learning task is relatively simple, e.g., teaching a quadcopter to fly forwards as given in [26], such that a satisfying control policy can be found without requiring an extensive exploration in the original state space. Since, in this case, the system state is likely to stay in a sub-state space near the origin, physical features are able to provide reliable safety estimates. However, when the learning task becomes more difficult, e.g., the quadcopter needs to track a complex 3D trajectory, the learning algorithm in general has to explore a large portion of the state space to find an optimal policy. Under these circumstances, at least a rough safety assessment of the complete state space is needed. Unfortunately, being restricted by the representation power, the physically inspired low-dimensional representation of the safe region S y fails to provide useful safety estimates when considering the entire state space. Hence, the performance of the SRL framework is affected. A. Relevance to Different SRL Tasks Therefore, to overcome this problem, this paper proposes a data-driven approach for identifying a low-dimensional representation of the safe region S y that is able to make more precise predictions about safety. Meaningful safety estimates are even obtained for the entire original state space. This not only gives the learning algorithm more flexibility in choosing its actions to find the optimal policy, but also indicates the applicability of the proposed approach to more complex learning tasks. B. Strengths and Limitations The presented approach has three particular strengths. First, it finds a low-dimensional representation of the safe region S y that allows safe and unsafe states to be clearly separated for large portions of a high-dimensional state space; see also Section VI-D. Second, the effort required for identifying the low-dimensional representation of the safe region S y is low. While, for instance, physically inspired model order reduction usually needs a comprehensive analysis of the system dynamics, the proposed approach relies solely on training data that can be collected efficiently even for complex dynamical systems through parallel computing and a suitable simulation environment. Third, it fully utilizes the information contained in the feedback data using two DSAFs. Hence, the update can be performed with few feedback data while providing a satisfying result. B. Strengths and Limitations However, the performance of the identified low-dimensional representation of the safe region S y is affected by the quality of the nominal system, i.e. the magnitude of the discrepancy between the nominal and the real systems. While the state mapping y = Ψ(x) is determined using only training data, the online adaptation method attempts to find an accurate DSAF Γ d (v) based on the learned low-dimensional safety feature. If the reality gap is too large, then it is possible that the learned safety feature is not sufficiently representative and we might therefore observe more grid cells with final safety estimates that are close to 0.5, i.e., Γ d (v) ≈ 0.5, which are less useful for guiding the learning process. In general, if the nominal system is assumed to be unreliable, a high probability threshold p t should be used for constructing the low-dimensional representation of the safe region S y (see (20)), such that the learning process becomes more conservative for keeping the system safe. However, we usually consider the unknown system dynamics d(x) as bounded within a reasonable range, since it makes less sense to use a dissimilar nominal system to predict the behavior of the real system. To further generalize the proposed approach, more studies are required to quantify the influence of the simulation-to-reality gap on the reliability of the obtained safety estimates. VIII. CONCLUSION To apply SRL to complex dynamical systems, this paper proposes a novel data-driven approach to identify a lowdimensional representation of the safe region for realizing a general SRL framework. Using a nominal system model that predicts the behavior of the real system, we first collect training data about the safety of different system states. Then, by computing the probabilistic similarities between each training data using a data-driven method, an initial lowdimensional representation of the safe region is obtained. To compensate for the mismatch between the nominal and the real systems, an efficient online adaptation method based on belief function theory is also proposed to update the low-dimensional representation of the safe region by accounting for the real system behavior. Experimental results show that, compared to the previous work, a more reliable and representative low-dimensional representation of the safe region is found using the proposed approach. However, our approach has the limitation that its performance is affected by the magnitude of discrepancy between the nominal and real systems. If the reality gap is assumed to be large, then it is likely that a less meaningful low-dimensional representation of the safe region will be obtained. VIII. CONCLUSION For future work, we intend to combine the data-driven method with model-based model order reduction techniques to find an approach that is more robust to the simulation-to-reality gap when identifying the low-dimensional representation of the safe region. Moreover, we also plan to investigate the possibility of quantifying the similarity between different dynamical systems, such that the learned safety feature can be generalized from one system to other similar systems. How the similarity between dynamical systems will be measured, is, however, still an open research problem. Zhehua Zhou received the B.E. degree in mechatronics engineering from Tongji University, Shanghai, China in 2014 and the M.Sc. degree in electrical and computer engineering from the Department of Electrical and Computer Engineering, Technical University of Munich, Munich, Germany in 2017. He is currently working toward the Ph.D. degree in learning-based control and robotics from the Chair of Automatic Control Engineering, Department of Electrical and Computer Engineering, Technical University of Munich, Munich, Germany. His research interests include optimal control, learning-based control and the applications to robotics. VIII. CONCLUSION Ozgur S. Oguz received the B.Sc. and the M.Sc. (summa cum laude) degrees in computer science from Koc University, Istanbul, Turkey, and the Ph.D. degree (summa cum laude) from the Department of Electrical and Computer Engineering, Technical University of Munich, Germany, in 2018. Currently he is a postdoctoral researcher at the Machine Learning and Robotics Lab, University of Stuttgart and Max Planck Institute for Intelligent Systems, Germany. His research interests are developing autonomous systems that are able to reason about their states of knowledge, take sequential decisions to realize a goal, and simultaneously learn to improve their causal physical reasoning and manipulation skills. VIII. CONCLUSION Marion Leibold (nee Sobotka) received the diploma degree in applied mathematics from the Technische Universität München, Germany, in 2002. She received the PhD degree from the Faculty of Electrical Engineering and Information Technology, Technische Universität München, Germany, in 2007. Currently she is a senior researcher at the Institute of Automatic Control Engineering, Faculty of Electrical Engineering and Information Technology, Technische Universität München, Germany. Her research interests include optimal control and nonlinear control theory, and the applications to robotics.

섹션 본문 123문단 · 65,250자

(제목 없음)

1For the safe application of reinforcement learning algorithms to high-dimensional nonlinear dynamical systems, a simplified system model is used to formulate a safe reinforcement learning framework. Based on the simplified system model, a low-dimensional representation of the safe region is identified and used to provide safety estimates for learning algorithms. However, finding a satisfying simplified system model for complex dynamical systems usually requires a considerable amount of effort. To overcome this limitation, we propose a general datadriven approach that is able to efficiently learn a low-dimensional representation of the safe region. By employing an online adaptation method, the low-dimensional representation is updated using the feedback data to obtain more accurate safety estimates. The performance of the proposed approach for identifying the low-dimensional representation of the safe region is illustrated using the example of a quadcopter. The results demonstrate a more reliable and representative low-dimensional representation of the safe region compared to previous work, which extends the applicability of the safe reinforcement learning framework.Index Terms-safe reinforcement learning, deep learning in robotics and automation, learning and adaptive systems, datadriven model order reduction

I. INTRODUCTION

2R ECENT studies of applying reinforcement learning or deep reinforcement learning algorithms to complex, i.e., highly nonlinear and high-dimensional, dynamical systems have demonstrated attractive achievements in various control tasks, e.g., humanoid control [1] and robotic manipulator control [2]. However, although the results display the potential of utilizing reinforcement learning algorithms as a substitute for traditional controller design techniques, most of them are still only presented in simulations [3]. One major impediment against implementing reinforcement learning algorithms on real-world dynamical systems is that, due to the random exploration mechanism, the intermediate policy may lead to dangerous behaviors of the system. As a result, both the system itself and the environment may be damaged during learning. In order to apply state-of-the-art reinforcement learning algorithms to real-world control systems, one central problem to address is how to introduce a reliable safety guarantee into the learning process. This

A. Related Work

3Safe reinforcement learning (SRL) aims to find an optimal control policy by way of reinforcement learning while ensuring that certain safety conditions are not violated during the learning process. Although the exact definition of safety in SRL varies in different learning tasks, for instance collision avoidance in autonomous vehicles or crash prevention when controlling a quadcopter, we generally consider the safety condition as neither the system itself nor the environment will be damaged.

4SRL in dynamical systems with continuous action space has been a topic of research for over a decade [4]. Most previous studies employed a manual control mechanism to ensure the safety of the controlled system. For instance, in [5], an experienced human pilot takes over the control of the helicopter if the learning algorithm places the system in a risky state. However, such an approach requires a considerable amount of resource to monitor the entire learning process. Hence, in most cases, it is not applicable to complex learning tasks. Another possibility of safely implementing reinforcement learning algorithms on real-world dynamical systems is by transfer learning [6]. First, a satisfying initial policy is trained in simulation and then transferred to the realworld dynamical system. In essence, this minimizes required number of learning iterations for obtaining the final policy and thus reduces the risk of encountering dangerous intermediate policy [7]. However, since the mismatch between simulation and reality is not considered in transfer learning, no reliable safety guarantee is obtained [8].

5In recent studies, SRL in model-free scenarios is usually achieved by solving a constraint satisfaction problem. For example, constrained policy optimization [9] introduces a constraint to the learning process to the effect that the expected return of cost functions should not exceed certain predefined limits. Alternatively, including an additional risk term in the reward function, such as risk-sensitive reinforcement learning [10], can also increase the safety of reinforcement learning algorithms. However, as no system model is directly considered in these approaches, there is still a high possibility that safety conditions are violated, especially in the early learning phase.

6When at least an approximated system model is available, a more promising SRL can be realized by combining controltheoretic concepts with reinforcement learning approaches. For example in [11], [12], Lyapunov functions are employed arXiv:2010.09555v2 [cs.RO] 8 Sep 2021

7to compute a sub-region of the state space where safety conditions will never be violated. The system is then limited to this sub-region during the learning process. However, finding suitable candidates for Lyapunov functions is challenging if the system dynamics contains uncertainties or is highly nonlinear.

8For uncertain dynamical systems, methods based on learning a model of unknown system dynamics [13] or of environmental constraints [14] are proposed to ensure safety during learning. For instance, by predicting the system behavior in the worst case, robust model predictive control [15] is able to provide safety and stability guarantees to reinforcement learning algorithms if the error in the learned model is bounded. Besides, [16] introduces an action governor to correct the applied action when the system is predicted to be unsafe. However, limited by computational efficiency, these approaches with deterministic safety estimates, i.e., the prediction about the safety of a system state is either safe or unsafe, are usually only applicable to linear systems. Moreover, the accuracy of the learned model also strongly affects the performance of these approaches.

9To relax the demands placed on the system model and extend the SRL to nonlinear systems, instead of deterministic safety estimates, recent studies employ probabilistic safety estimates, in which safety predictions are represented as probabilities [17]. In [18], for example, modelling uncertainties are approximated by Gaussian process models [19], and a probabilistic safe region is computed by reachability analysis [20]. Similarly, Gaussian process models are used in [21], [22] to model unknown system dynamics. A safe region is then obtained from the probabilistic estimate of the region of attraction (ROA) of a safe equilibrium state. The key component of these studies is a forward invariant safe region, such that the learning algorithm has the flexibility to execute desired actions within the safe region. Safety is ensured by switching to a safety controller whenever the system approaches the boundary of the safe region. However, the safe region is computed either by solving a partial differential equation in [18] or sampling in [22], both of which suffer from the curse of dimensionality. Moreover, modeling an unknown dynamics or disturbance with Gaussian process models also poses challenges when the system is highly nonlinear and high-dimensional, since both making adequate assumptions about the distribution of dynamics and acquiring a sufficient amount of data are difficult. Therefore, although approaches like [18], [22] enable promising results with low-dimensional dynamical systems 1 , they are not directly applicable to complex dynamical systems [23].

10Often the motivation for using reinforcement learning algorithms for controller design is to overcome the difficulty of applying model-based controller design approaches to highly nonlinear, high-dimensional and uncertain dynamic system models [24], [25]. In particular, it is challenging to compute a safe region for a complex dynamical system. For this reason, 1 In this paper we consider dynamical systems with dimensions higher than six as high-dimensional, as in such cases it is computationally difficult to implement traditional methods, such as reachability analysis or sum-of-squares programming, in identifying the safe region. [26] introduces an SRL framework that utilizes a supervisory control strategy based on finding a simplified system by means of physically inspired model order reduction [27]. A simplified safe region is constructed from the simplified system, which functions as an approximation for the safe region of the full dynamics. Such a low-dimensional representation of the safe region, which is usually two-or three-dimensional, at least provides safety estimates for the original system states, and it can be updated online during the learning process. To account for the uncertainty in making safety decisions for the complex dynamics based on a rough low-dimensional reduction, the safety estimate is represented in a probabilistic form. Then, in accordance with the derived safety estimate, a supervisor is employed to switch the actual applied control action between the learning algorithm and a corrective controller to keep the system safe. However, implementing physically inspired model order reduction usually requires a thorough understanding of the system dynamics. Moreover, multiple performance tests are required before a satisfying simplified system can be found.

B. Contribution

11In this paper, we consider the same supervisory control strategy as used in [26] to construct a general SRL framework that is applicable to complex dynamical systems. However, to overcome the limitations of physically inspired model order reduction, we propose a novel data-driven approach to identify the supervisor, i.e., the low-dimensional representation of the safe region. Inspired by transfer learning [28], we assume that an approximated system model of the complex dynamical system is available. Even though, inevitably, the approximated model displays discrepancies compared with the real system behavior, an initial estimate of safety can usually be obtained by simulating the approximated model. For example, while the dynamics of a real-world humanoid cannot be known perfectly, an approximated humanoid model can be constructed in simulation for making predictions. Hence, by simulating the system, we obtain training data that represents the safety of various original system states. However, as the state space is high-dimensional, it is infeasible to acquire a sufficient amount of training data to directly learn the safe region of the original system. To solve this problem, a data-driven approach that computes probabilistic similarities between each training data is proposed to first learn a low-dimensional representative safety feature of the complex dynamical system. Then, based on the learned feature, a low-dimensional representation of the safe region is identified, which is used as the starting point to SRL in the real system.

12Due to the inevitable simulation-to-reality gap, the initial low-dimensional representation of the safe region learned from training data displays discrepancies compared to the real system behavior. To compensate for this mismatch, we also propose an efficient online adaptation method to update the low-dimensional representation of the safe region. During the learning process, we receive feedback data about the actual safe region of the real system. These feedback data are not only used to generate new safety estimates, but they also allow us to adjust our confidence in the reliability of the safety estimates obtained from training data. The proposed online adaptation method then updates the low-dimensional representation of the safe region by simultaneously considering the safety estimates derived from training and feedback data.

13The contributions of this study are summarized as follows: 1) We propose a novel data-driven approach that is capable of systematically identifying a low-dimensional representation of the safe region. In contrast to physically inspired model order reduction, the proposed approach does not require a thorough understanding of system dynamics. Moreover, it is applicable to a wide range of dynamical systems, as long as an approximated system model is available. 2) We introduce a new online adaptation method for updating the low-dimensional representation of the safe region according to the observed real system behavior. By fully utilizing the information contained in the feedback data, the update is performed efficiently, while a reasonable amount of feedback data enables an accurate low-dimensional representation of the safe region to be acquired. 3) Since the proposed approach results in a reliable and representative low-dimensional representation of the safe region, the applicability of the SRL framework is increased. The remainder of this paper is organized as follows: a brief introduction to the SRL framework is given in Section II. Thereafter, we present an overview of our approach in Section III. In Section IV, we propose a data-driven method to derive a low-dimensional representation of the safe region. This is followed by the online adaptation method in Section V, which is used to update the low-dimensional representation. An example is presented in Section VI to demonstrate the performance of the proposed approach. In Section VII, we discuss several properties of the approach, and Section VIII concludes the paper. A table of nomenclatures is included in the supplementary material.

II. SAFE REINFORCEMENT LEARNING FRAMEWORK

14In this paper, we consider SRL as to optimize a learningbased policy with respect to a predefined reward function, while ensuring that the system state remains in a safe region of the state space. In this section, we outline a general SRL framework for dynamical systems, see also [26]. The SRL framework first identifies a safe state-space region as the safe region. Then, the learning-based policy has the flexibility to execute desired actions within the safe region. Once the system state is about to leave the safe region, a corrective controller is applied to drive the system back to a safe state.

A. System Model and Safe Region

15A nonlinear control-affine dynamical system is given bẏ

16where x ∈ X ⊆ R n is the n-dimensional system state within a connected set X , u ∈ U ⊆ R m is the m-dimensional control input to the system. With a given control policy u = K(x), the closed-loop system dynamics is denoted aṡ

17If a system state x satisfies f K (x) = 0, then it is an equilibrium point. Any equilibrium point can be shifted to the origin by a state transform. Therefore, this paper only uses the origin to formulate the safe region.

18Assumption 1. The origin is a safe state and a locally asymptotically stable equilibrium point under the control policy K(x).

19Based on Assumption 1, the ROA of the origin is defined as

20where Φ(t; x 0 ) is the system trajectory of (2) that starts at the initial state x 0 when time t = 0. The ROA R is the set of initial states that can be driven back to a safe state, i.e., the origin, under the control policy K(x). Therefore in this paper, we define the safe region of the SRL framework as follows.

21Definition 1. A safe region S is a closed positive invariant subset of the ROA R containing the origin. We consider the system state x as safe if it is in the safe region S.

B. SRL Framework

22To realize SRL, we keep the system state within the safe region during the learning process. This is achieved by an SRL framework that adapts a switching supervisory control strategy where the given controller K(x) acts as corrective control and π(x) is the learning-based policy that is used while the system state is in the safe region (see Fig. 1). A supervisor determines the actual applied actions as

23where t safe is the first time point at which the system state x is on the boundary of the safe region S. For each learning iteration, the system starts inside the safe region S for time t = 0. The learning algorithm then updates and executes the learning-based policy π(x). Since the safe region S is a closed set and the trajectory is continuous, the system state can only leave the safe region S by crossing the boundary. Hence, once the system state x is on the boundary of the safe region S, this learning iteration is terminated at time t = t safe and the corrective controller K(x) is activated. For the remaining time of this learning iteration, the corrective controller K(x) attempts to bring the system back to the origin to maintain safety. After this safety recovery, the learning environment is reset and the next learning iteration starts at time t = 0. Remark 1. In this paper, we only consider the safe region obtained from the ROA R, where stability is used as the safety criterion. If more safety criteria should be taken into consideration, such as collision avoidance represented as state constraints, the safe region can be constructed using other control-theoretical concepts, e.g., control barrier functions [29] or invariance functions [30]. The definition of the safe region does not affect the use of the SRL framework and the proposed approach, as long as the safe region is a closed and control invariant set under a given corrective controller.

C. SRL Framework for Complex Dynamical Systems

24The aforementioned SRL framework is not directly applicable to complex dynamical systems, as in such cases, calculating the safe region S is computationally infeasible [31]. An SRL framework based on estimating safety with a lowdimensional representation of the safe region is introduced to overcome this problem [26].

25Each original system state x is mapped to a low-dimensional safety feature, represented as a simplified state y ∈ Y ⊆ R ny , n y n, through a state mapping y = Ψ(x). The state mapping is chosen such that safe and unsafe states are separated in the simplified state space Y. Nevertheless, due to the order reduction, multiple original system states that have different safety properties can map to the same simplified state. Hence, the safety of the original system state x is estimated by the safety of its corresponding simplified state y in a probabilistic form as

26where Γ(y) is a function defined over the simplified state space Y and is referred to as the safety assessment function (SAF) in this paper. Not only does the SAF Γ(y) encode information relating to the safety of the simplified state y, it also includes the uncertainty involved in making predictions for a highdimensional state by using a low-dimensional reduction. In Section IV, we demonstrate how to efficiently identify the state mapping y = Ψ(x) as well as the SAF Γ(y) using a data-driven method. For a given SAF Γ(y), the probability p(x ∈ S) depends only on the simplified state y. Therefore, by introducing a predefined probability threshold p t , we obtain a low-dimensional representation of the safe region, denoted as S y , in the simplified state space Y

27which works as an approximation of the high-dimensional safe region S. The supervisor (4) is thus modified to

28where t safe denotes the first time point at which the probability p(x ∈ S) is not larger than the threshold p t , i.e., p(x ∈ S) = Γ(y) ≤ p t . More details of this SRL framework are given in [26].

29III. OVERVIEW OF THE APPROACH The essential factor when applying the SRL framework to complex dynamical systems is finding a reliable lowdimensional representation of the safe region S y . In order to overcome the limitations of physically inspired model order reduction, we propose a novel data-driven approach to identify the low-dimensional representation of the safe region S y , together with a new online adaptation method to efficiently update the learned low-dimensional representation.

30We consider a scenario in which the complex dynamical system, referred to as the real system, has partially unknown dynamics. However, we assume that a nominal approximated system model is available and can be used to roughly predict the real system behavior. The nominal system model is assumed to be represented by (1). The real system model is then given asẋ

31where d(x) is the unknown, unmodelled part of the system dynamics. For brevity, we refer to the nominal and the real systems as simulation and reality, respectively. Due to the highly nonlinear and high-dimensional dynamics, the direct calculation of the safe region is computationally infeasible for both the nominal and the real systems. Besides, although the real system provides exact safety information, in general it is expensive to collect data directly on the real system. In contrast, simulating the nominal system is usually efficient and allows a sufficient amount of data to be obtained for finding a low-dimensional safety representation. However, due to the unknown term d(x), such data is inaccurate and has to be modified to account for the real system behavior.

32Based on these facts, to construct a reliable low-dimensional representation of the safe region S y for the real system, we propose the approach outlined in Fig. 2 (a complete work-flow is given in the supplementary material). It consists of two parts that solve the following two problems, respectively: 1) How to derive and initialize the low-dimensional representation of the safe region S y by using the nominal system model. 2) How to update the low-dimensional representation of the safe region S y online with the observed real system behavior.

Part 1) Derivation and Initialization

33Since no information about uncertainty d(x) is available prior to the learning process, the corrective controller K(x) is designed for the nominal system model (1). Although the safe region of the nominal system is unknown, its simulation is possible and delivers a dataset as follows.

34Definition 2. The training dataset of k t training data is given as Fig. 2: Overview of the proposed approach. The lowdimensional representation S y is initialized using the training dataset D train obtained from the nominal system. Once we collect the feedback dataset D feedback on the real system, the low-dimensional representation S y is updated using the proposed online adaptation method.

35It contains the simulation results that state whether the safety recovery is successful or not for different system states x under the corrective controller K(x). The i-th training data consists of three elements

36x i sim is the initial system state in which the corrective controller K(x) is activated. s sim (x i sim ) is the safety label that represents the result of safety recovery for the state x i sim . We denote s sim (x i sim ) = 1 if the system state x i sim is safe under the corrective controller K(x), and s sim (

37is the corresponding system trajectory of the safety recovery that starts at x i sim when time t = 0. The subscript sim indicates that the data is collected by using the nominal system model.

38The low-dimensional representation of the safe region S y is thus derived and initialized by using the training dataset D train . To do this, we first identify the state mapping y = Ψ(x) using a data-driven method that computes the probabilistic similarity between each training data (Section IV-A). Then to facilitate an efficient computation, we discretize the simplified state space Y into grid cells and assign an index vector v ∈ Z ny + to each grid cell. By assuming that the SAF Γ(y) is constant in each grid cell, we thus obtain a discretized safety assessment function (DSAF) Γ d (v). A discretized lowdimensional representation of the safe region S y is then given by applying the probability threshold p t on the DSAF Γ d (v) (Section IV-B). To enable the SRL framework on the real system, we also calculate an initial estimate of the DSAF Γ d (v), denoted as the prior DSAF Γ prior d (v), from the training dataset D train . It is then used to initialize the low-dimensional representation of the safe region S y (Section IV-C). Further details of Part 1) are given in Section IV.

Part 2) Online Adaptation

39Due to the unknown part of the system dynamics d(x), there is inevitably a mismatch between simulation and reality. In order to compensate for this mismatch, we update the low-dimensional representation S y by accounting for the real system behavior.

40Each time the corrective controller K(x) is activated during learning, we observe feedback data about the real safe region. The set of feedback data is defined as follows.

41Definition 3. The feedback dataset of k f feedback data is given as

42It contains the results of safety recovery from implementing the corrective controller K(x) on the real system. The i-th feedback data is

43have the same meaning as in Definition 2, the subscript real indicates here that the data is collected on the real system.

44Since collecting data on the real system, e.g., real-world robots, is usually expensive and time-consuming, in most cases the feedback dataset D feedback has a limited size. Therefore, the low-dimensional representation of the safe region S y needs to be updated in a data-efficient manner. To achieve this, we propose an online adaptation method, as given in Section V. It comprises three steps: First, we modify the prior DSAF Γ prior d (v) by changing our confidence in its reliability using the feedback dataset D feedback (Section V-A). Second, to fully utilize the valuable information contained in the feedback dataset D feedback , we generate another feedback DSAF Γ feedback d (v) (Section V-B). Third, the two DSAFs are fused to obtain a more accurate DSAF Γ d (v), which is then used to update the low-dimensional representation S y (Section V-C).

IV. LEARNING A LOW-DIMENSIONAL REPRESENTATION

45OF THE SAFE REGION To derive the low-dimensional representation of the safe region S y , two components have to be determined: the state mapping y = Ψ(x), which gives the low-dimensional safety feature, and the SAF Γ(y), which predicts the safety of original system states. In this section, we present a data-driven method for identifying the low-dimensional representation of the safe region S y . It utilizes a technique called t-distributed stochastic neighbor embedding (t-SNE) [32], which was originally proposed for visualizing high-dimensional data.

A. Identifying the State Mapping with t-SNE

46To identify the state mapping y = Ψ(x), we first find the realization of the low-dimensional safety feature, i.e., the values of simplified states y 1 , . . . , y kt , that best corresponds with the training dataset D train by revising t-SNE. Through measuring the similarity between each high-dimensional data point, t-SNE defines a two-or three-dimensional data point such that similar high-dimensional data points are represented by nearby low-dimensional data points with high probability. It uses Euclidean distance between each pair of high-dimensional data points as the metric for measuring similarity. However, since our purpose is to construct the low-dimensional representation of the safe region S y , we are more interested in safety rather than just distance. Accordingly, we propose a new metric that considers similarity and safety at the same time.

47The general motivation for determining the simplified state y is that the safe and unsafe original system states x should be separated in the simplified state space Y. Since, in this paper, the safe region is defined with respect to the ROA, the trajectories of safe initial states will converge to the origin, while unsafe initial states will have divergent trajectories. Hence, if two original system states x have similar trajectories under the corrective controller K(x), then ideally they should also have nearby corresponding simplified states y (see Fig. 3). Based on this, we first calculate the pairwise trajectory distance ω ij between the i-th and j-th training data, using dynamic time warping (DTW) as

48where dtw(·) represents the DTW measurement. We thus have ω ij = 0 if i = j, and the more similar the trajectories are, the smaller the value of ω ij is.

49Remark 2. Besides DTW, other trajectory distance measures, e.g., Fréchet distance, can also be used in (13). Changing the distance metric does not affect the applicability of the proposed approach. However, DTW turns out to be a more suitable metric for trajectories of the dynamical systems we investigated.

50While, in general, the trajectory distance ω ij reflects the probability that original system states x i sim and x j sim have the same safety property, it is still possible that safe and unsafe states have similar trajectories. To obtain a better lowdimensional safety feature, we thus modify the trajectory distance ω ij in relation to the safety label s sim (x sim ) and compute the distance Ω ij between the i-th and j-th training data as

51where δ is a constant and ω max = max i,j ω ij is the maximum trajectory distance within the training dataset D train . The distance Ω ij is then used as the new metric for t-SNE to measure the similarities between different training data.

52In our experiments, we find that a small value of δ is sufficient for providing a satisfying result of t-SNE (in this paper, for example, we use δ = 0.01). A large value of δ, in contrast, may lead to information contained in trajectories being ignored, which can reduce the representation power of the learned simplified states y. A sensitivity analysis of the parameter δ is provided in the supplementary material.

53After computing the distance Ω ij between each pair of training data, we apply t-SNE on the training dataset D train

54. Based on these distances, t-SNE calculates the values of corresponding simplified states y, where similar and dissimilar training data are modeled by nearby and distant simplified states, respectively.

55to derive a realization of the low-dimensional safety feature. To do this, we modify the conditional probability p j|i of t-SNE [32] using the distance Ω ij as

56where σ i is the variance of the Gaussian distribution that is centered on the state x i sim . The remaining computations are the same as in t-SNE. Since this part makes no contribution, the main steps involved in performing t-SNE are given only in the supplementary material. More details are available in [32].

57Using t-SNE, we obtain the values of simplified states y 1 , . . . , y kt that correspond to the training dataset D train as an initial realization of the low-dimensional safety feature. Such a realization models similar training data with nearby simplified states, e.g., y 1 and y 2 in Fig. 3, and dissimilar training data with distant simplified states, e.g., y 1 and y 3 in Fig. 3. In general, the simplified state y is chosen to be two-or threedimensional, i.e., y ∈ R ny with n y = 2 or n y = 3. In this paper, we set n y = 2.

58Note that t-SNE only determines the values of simplified states but gives no expression of the state mapping y = Ψ(x). Therefore, to identify the state mapping y = Ψ(x), we learn a function approximator using the values of simplified states y 1 , . . . , y kt obtained from t-SNE and the original system states x 1 sim , . . . , x kt sim contained in the training dataset D train . This function approximator, e.g., we use a neural network in this paper, is then utilized to represent the state mapping y = Ψ(x) = NN(x).

59Remark 3. Different forms of function approximator, for instance, a Gaussian process, can be used to describe the state mapping y = Ψ(x). The selection of function approximator depends mainly on the available number of training data.

60Due to the approximation error in the function approximator, some original system states x may have slightly different values in their simplified states y when comparing the initial realization obtained from t-SNE with the one computed from the learned state mapping y = Ψ(x) (for an example, see the simulations in Section VI-B and in particular Fig. 7). Hence, to reduce the influence of this issue on deriving the lowdimensional representation of the safe region S y , we compute the values of simplified states y 1 , . . . , y kt once again with the learned state mapping. This final realization of the lowdimensional safety feature is then used for formulating the SAF Γ(y).

B. Belief Function Theory and DSAF

61Once the state mapping y = Ψ(x) is determined, we are able to generate the SAF Γ(y) using the training dataset D train . However, due to the limited size of the training data, it is difficult to construct the SAF Γ(y) over the continuous simplified state space Y. Therefore, we discretize the simplified state space Y.

62The range of the simplified state space Y is determined by the maximum and minimum values of the simplified states y 1 , . . . , y kt in each dimension. We then discretize the simplified state space Y into grid cells with a predefined step size. Each grid cell is assigned an index vector v ∈ Z 2 + to indicate its position in the simplified state space Y; for example, v = [2, 3] refers to the grid cell that is located at the second row and third column (see Fig. 4). A locating function is defined as follows.

63Definition 4. By locating the simplified state y = Ψ(x) for an original system state x in the simplified state space Y, the locating function L(x) returns the index vector v of the grid cell that it belongs to.

64By assuming that the SAF Γ(y) is constant in each grid cell, we obtain a DSAF Γ d (v) that we will have to define. Then, instead of using the simplified state y, the safety of an original system state x is estimated by way of the index vector v as

65In general, the DSAF Γ d (v) for an index vector v can be approximated by the number of safe and unsafe original system states x that map to the corresponding grid cell, i.e., L(x) = v. However, due to the high-dimensional original system state space, it is, in most cases, infeasible to acquire a sufficient amount of data to derive an accurate estimate. To solve this problem, we propose using belief function theory [33] to describe the DSAF Γ d (v), where the uncertainty caused by insufficiency in the data amount is considered by a subjective probability [34].

66Belief function theory is a general approach to modeling epistemic uncertainty that uses a belief mass to represent the probability of the occurrence of an event. The assignment of belief masses to all possible events is denoted as the basic belief assignment (BBA). The belief mass on the entire event domain, i.e., the probability that one arbitrary event happens, indicates the subjective uncertainty of the estimate [34]. According to this, we define a BBA B v separately for each index vector v as follows.

67Definition 5. The BBA B v for an index vector v is given as

68which represents the belief about the value of the DSAF Γ d (v) for the index vector v. The belief masses b v safe and b v unsafe are the probabilities of the occurrence of two complementary events, i.e., p(x ∈ S) and p(x / ∈ S), where the original system state x has the index vector v from the locating function L(x). µ v is the subjective uncertainty that reflects the confidence level of estimating the safety. µ v = 0 means we believe that the estimate is absolutely correct. It holds that

69The low-dimensional representation of the safe region S y is then defined among the discretized simplified state space as

70where p t is the predefined probability threshold. In the next subsection, we explain how to initialize the DSAF Γ d (v) so as to enable the application of the SRL framework on the real system.

C. Initializing the DSAF from Training Data

71Since each training data provides information on the value of the DSAF Γ d (v), the low-dimensional representation of the safe region S y is initialized using the training dataset D train . By considering each training data as a belief source, we formulate the following BBAs for all training data and later fuse them to derive an initial estimate of the DSAF Γ d (v). Definition 6. The BBA B i obtained from the i-th training data D i train is defined as

72It represents the belief about the value of the DSAF Γ d (v) for the index vector v = L(x i sim ), where the belief source is the ith training data. b i safe , b i unsafe and µ i have the same meanings as in Definition 5.

73Due to the inevitable simulation-to-reality gap, we initialize the BBA of each training data with a constant uncertainty µ ini > 0 as

74where i = 1, . . . , k t . Since no information about the unknown term d(x) is available prior to the learning process on the real system, the initial subjective uncertainties are chosen to be the same for all BBAs. Later in the online adaptation method, the subjective uncertainties are updated by using the feedback data to realize more accurate safety estimates. For each index vector v, the BBA B v is then estimated by using the BBAs of the training data. To achieve this, we first generate a set of BBAs B v for each index vector v

75which contains the BBAs of the training data whose original system state x sim corresponds to the index vector v. The size of the set B v is denoted as k v . Every BBA in the set B v provides a belief about the value of the DSAF Γ d (v) for the index vector v. Hence, an estimate of the BBA B v is derived by fusing all BBAs within the set B v as

76where B ini is an initial estimate that represents our guess about the BBA B v when no training data is available (see Fig. 4). F(·) is a fusion operation among the set B v , which is referred to as weighted belief fusion and is defined according to [35] as

77We refer to this estimate of the BBA B v as the prior estimate B prior v . Since it is still likely to be imprecise if the available number of training data is too small, the fusion is performed only when the number of BBAs contained in the set B v is not smaller than a minimum number k min . Otherwise, the prior estimate B prior v is set to the initial estimate B ini . We use B ini = (0.05, 0.55, 0.4) in our experiments. This means that if there is very little experience available in the form of training data for one grid cell, then the respective states will initially be considered as unsafe. The resulting prior estimate B prior v is a BBA that satisfies which delivers an estimate of the DSAF Γ d (v) that is derived from the training data. The low-dimensional representation of the safe region S y is then initialized by letting Γ d (v) = Γ prior d (v). In the next section, we propose an online adaptation method to update the DSAF Γ d (v) using feedback data, to account for the unknown part of the system dynamics d(x).

V. ONLINE ADAPTATION OF THE SAFETY ASSESSMENT FUNCTION

78In the early learning phase with the real system, the prior DSAF Γ prior d (v) allows a rough estimate of the safety of an original system state. During the learning process, the feedback data is used to update the DSAF Γ d (v) to achieve more accurate safety estimates. Each update iteration of the DSAF Γ d (v) consists of three steps. First, we modify the prior DSAF Γ prior d (v) by revising the subjective uncertainties of the BBAs of the training data. Second, we compute a feedback DSAF Γ feedback d (v) using the feedback data. Third, the updated DSAF Γ d (v) is obtained by fusing the prior and feedback DSAFs. Note that each time the corrective controller K(x) is activated for the real system, we obtain new feedback data. Hence the size of the feedback dataset D feedback increases incrementally during the learning process. For simplicity, we consider the feedback dataset D feedback of size k f in this section. Details of the online adaptation method are given in the following.

A. Update of the Prior DSAF with Feedback Data

79The prior DSAF Γ prior d (v) is constructed using the training dataset D train , in which the uncertainty caused by the unknown term d(x) is represented by the subjective uncertainty µ i of each BBA B i . Hence, the update of the prior DSAF Γ prior d (v) will now modify the subjective uncertainties by accounting for new information given by feedback data. For this, we assume that original system states that are in close proximity to each other most probably have similar safety properties.

80Assumption 2. The probability p(s real (x 1 ) = s real (x 2 )) that two original system states x 1 and x 2 have the same safety property on the real system is inversely proportional to their Euclidean distance in the original state space ||x 1 − x 2 ||.

81In addition, we define a function P (x) to quantify the similarity with respect to the safety of nominal and real system trajectories that start in the same initial original system state

82It represents the probability that for a given original system state x, its safety label s sim (x) obtained with the nominal system is the same as the safety label s real (x) obtained with the real system. Then, according to Assumption 2, if we observe an original system state x that has the same safety property both in simulation and in reality, it is likely that other original system states that are close to the observed state will also show the same safety property. In order to predict the value of the function P (x), we approximate it with a Gaussian process regression (GPR) model P (x) = GP(x). For each original system state x real contained in the feedback dataset D feedback , we examine its safety label s sim (x real ) in simulation. This leads to a set of samples {P (x 1 real ), . . . , P (x k f real )} for the function P (x), in which Remark 4. If the real system is a real-world dynamical system, then it is usually difficult to test the corrective controller K(x) with arbitrary initial original system states x in reality, since there is a high risk of encountering unsafe behaviors. However in contrast, the simulation can be initialized with any original system state x real contained in the feedback data, which then makes it possible to approximate the function P (x). The trained GPR model GP(x) is then used to update the BBA B i of each training data. The general motivation is that, we decrease the subjective uncertainty µ i if we are confident about the reliability of this training data. Hence for the ith training data, we compute a predicted mean value of the function P (x i sim ), denoted as p i mean , from the GPR model GP(x), along with a corresponding standard deviation p i std of the predicted value. Since a low value of the standard deviation p i std means we have observed enough feedback data to make a reliable prediction, we only update the BBA B i if the standard deviation p i std is smaller than a predefined threshold p th

83with the new subjective uncertainty µ i calculated as

84where µ ini is the same initial subjective uncertainty as that given in (22) (see Fig. 5 for a graphical representation of (33)). BBAs B i with p i std > p th remain unchanged, as in (22). Such an update of the BBA B i considers the predicted value of the function P (x i sim ) and the reliability of this prediction at the same time.

85(33) is designed by considering two aspects: first, the subjective uncertainty µ i is set equal to µ ini when p i std ≥ p th . This means that in this case we do not have the confidence to update the BBA B i , as not enough information is observed from the feedback data; second, due to the inevitable reality gap, the subjective uncertainty µ i maintains a minimum uncertainty µ min even when the standard deviation p i std is 0. We use the exponential form such that the decrease in µ i is faster when the standard deviation p i std is near the threshold p th . The parameter α > 1 determines the decay rate and is selected by considering the actual learning task.

86Note that for the same training data, the relationship between the standard deviation p i std and the threshold p th can change during the learning process. For example, we might obtain p i std ≤ p th in the current update iteration, but in the next update iteration it changes to p i std > p th . This happens primarily when we first observe a safe original system state but followed by a nearby unsafe state, such that the safety of the states in between these two observed states becomes uncertain. In such cases, we set the BBA B i back to the initial BBA given in (22).

87Once the BBAs B i of all training data have been updated with the up-to-date feedback dataset D feedback , the prior estimate B prior v for each index vector v is recomputed using (24). This results in an updated prior DSAF Γ prior d (v), which is used later for revising the DSAF Γ d (v).

B. Feedback DSAF

88The feedback data contain the information about the real safety properties of different original system states x. To fully utilize this valuable information, we construct an additional DSAF, denoted as the feedback DSAF Γ feedback d (v), using the feedback dataset D feedback .

89As the amount of data is insufficient, we also consider the estimate obtained from the feedback data as a subjective probability [26]. Then, as with the prior estimate B prior v , we formulate another estimate of the BBA B v for each index vector v as

90which is referred to as the feedback estimate B feedback v . For each index vector v, the feedback estimate B feedback v is determined by the number of safe and unsafe feedback data that correspond to this grid cell. By sorting the feedback dataset D feedback with the locating function L(x), we denote the number of safe feedback data that have the index vector v from the locating function, i.e., L(x real ) = v and s real (x real ) = 1, as k v safe (and k v unsafe for the number of unsafe feedback data). If at least one feedback data is available for the index vector v, i.e., k v safe + k v unsafe ≥ 1, we compute the feedback estimate B feedback v as follows

91The subjective uncertainty µ v,feedback decreases if more feedback data are observed for the index vector v. It satisfies that, if a sufficient number of feedback data is obtained, the subjective uncertainty µ v,feedback approaches 0. In such a case, the belief masses b v,feedback safe and b v,feedback unsafe can be considered as the actual probabilities. The parameters β and γ define the initial value and the decay rate of the subjective uncertainty µ v,feedback , respectively. If no feedback data is observed for the index vector v, we set the feedback estimate B feedback v to an empty BBA B ∅ defined as B feedback v = B ∅ = (0, 0, 1), which indicates that no safety estimate can be made.

92Using the feedback estimate B feedback v , we obtain the following feedback DSAF Γ feedback

93which represents the estimate of the DSAF Γ d (v) derived from the feedback data only. In the next subsection, we fuse the feedback DSAF Γ feedback

C. Fusion of Prior and Feedback DSAFs

94The prior and feedback DSAFs both provide beliefs about safety by using different datasets as their belief source. To update the DSAF Γ d (v), we fuse these two functions using weighted belief fusion as given in (25)(26)(27). This leads to a fused estimate B fuse v for each index vector v

95which is computed as The fused estimate B fuse v fulfills the following property, which is also given in [26].

96Proposition 1. If the number of feedback data approaches infinity, the fused estimate B fuse v becomes the actual probabilities, and the prior estimate B prior v has no effect in making safety estimates.

97Proof. Proposition 1 is justified by the following equations

98which are obtained by simplifying (25)(26)(27) with the set

99Considering computational efficiency, the update of the DSAF Γ d (v) is generally performed once when every k u feedback data is obtained, where the value of k u is selected according to the actual learning task. In each update iteration (indexed by number N , see Section VI-C), we first use the upto-date feedback dataset D feedback to update the prior DSAF which also gives the latest low-dimensional representation of the safe region S y according to (20). With further feedback data, the DSAF Γ d (v) becomes more accurate and more reliable safety estimates are obtained.

VI. QUADCOPTER EXPERIMENTS

100In this section, we demonstrate the proposed approach for identifying the low-dimensional representation of the safe region S y , using the example of a quadcopter. Fig. 6: The system state x of a quadcopter is defined using the ground frame and the body frame.

A. Experimental Setup

101We simulate the quadcopter using the system dynamics given in [36] with MATLAB Simulink 2 (Version R2019b) running on a laptop powered by an Intel i7-7700HQ CPU. The 12-dimensional system state is defined as

102where p g = [p x , p y , p z ] T and θ g = [θ r , θ p , θ y ] T are the linear and angular positions defined in the ground frame, v b = [v x , v y , v z ] T and ω b = [ω r , ω p , ω y ] T are the linear and angular velocities defined in the body frame (see Fig. 6). The control input u consists of the four motor speeds of the quadcopter. For the nominal system model, we set the mass of the quadcopter to m = 1 kg and the maximal lifting force to f = 200 N. The safety of a given state x is determined by simulating the controlled dynamics with the corrective control K(x) that starts in initial state x, and checking if the controller is able to successfully drive the quadcopter back to a hovering state without crashing. In this example, we use the PID controller given in [36] as the corrective controller K(x). It stabilizes the quadcopter's height as well as its roll, pitch and yaw rotations. The coefficients of the PID controller are: K P,h = 1.5, K I,h = 0, K D,h = 2.5 for the height control, and K P,r = K P,p = K P,y = 6, K I,r = K I,p = K I,y = 0, K D,r = K D,p = K D,y = 1.75 for the roll, pitch and yaw rotations control, respectively.

103To generate the training dataset D train , we first create k t = 10000 original system states x. We set p x = p y = 0 and p z = 2 m to leave enough space and time for the corrective controller K(x). All other variables are sampled with a uniform distribution within the following range: 0 ≤ θ r , θ p , θ y ≤ 2π rad, −3 m/s ≤ v x , v y , v z ≤ 3 m/s, −10 rad/s ≤ ω r , ω p , ω y ≤ 10 rad/s. The training dataset D train is then obtained by examining the performance of the corrective controller K(x) for all these initial values.

B. Identifying the Low-dimensional Representation of the Safe Region

104The initial realization of the low-dimensional safety feature, i.e., the values of simplified states y 1 , . . . , y kt , obtained from t-SNE is given in Fig. 7a. We use δ = 0.01 in (14) and set the perplexity and tolerance of t-SNE (see [32]) to 40 and 1e −4 , respectively. The result shows that the safe and 2 https://www.mathworks.com/products/simulink.html The final realization of simplified states y 1 , . . . , y kt obtained by recomputing with the learned neural network that represents the state mapping y = Ψ(x) = NN(x).

105unsafe original system states are clearly separated in the twodimensional simplified state space Y ⊆ R 2 . The state mapping y = Ψ(x) is represented by a two-layer neural network with 128 neurons in each layer, which is trained using the initial realization of simplified states y 1 , . . . , y kt and the set of original system states {x 1 sim , . . . , x kt sim }. By recomputing the outputs of the learned neural network, we obtain the final realization of the lowdimensional safety feature, i.e., the values of the simplified states y 1 , . . . , y kt , given in Fig. 7b. Due to approximation error, certain simplified states have a slightly changed position compared to the values obtained from t-SNE. However, this does not affect the computation of the low-dimensional representation of the safe region S y , as the results are updated later in the online adaptation using the feedback data.

106We set the simplified state space as {Y | − 30 ≤ y 1 , y 2 ≤ 30}. By discretizing the simplified state space Y into grid cells with step size 1 in both y 1 and y 2 , we obtain the index vector v ∈ {1, 2, . . . , estimates the probability p(x ∈ S) for original system states x that take the index vector v from the locating function L(x). In Fig. 8i, the DSAF Γ d (v) is initialized by the prior DSAF Γ prior d (v). In the next subsection, we demonstrate the update process of the DSAF Γ d (v) using the proposed online adaptation method.

C. Updating the Low-dimensional Representation

107To simulate a mismatch between the nominal and the real systems, we set the mass and the maximal lifting force of the real system to m = 0.8 kg and f = 145 N, respectively. To eliminate the influence of a specific learning task or algorithm and focus on illustrating the update process, the feedback dataset D feedback is obtained by randomly selecting states x real where the corrective controller K(x) is activated, such that the entire original system state space can be visited.

108The following parameters are used in the online adaptation method: µ min = 0.1, p th = 0.3, α = 3e 5 , β = 0.3, γ = 0.4. The GPR model GP(x) uses a squared exponential kernel. To demonstrate the online update process, we collect the feedback data one by one and incrementally extend the feedback dataset D feedback . The DSAF Γ d (v) is updated once when every k u = 20 feedback data are obtained.

109The results of the online adaptation are given in Fig. 8. Prior to the update (update iteration N = 0), the DSAF Γ d (v) is initialized as the prior DSAF Γ prior d (v), while the feedback DSAF Γ feedback d (v) is constructed using the empty BBA B ∅ (see Fig. 8a, 8e, 8i). Once the learning procedure has started, we collect the feedback data incrementally. In the early updating phase, e.g., update iteration N = 10, the DSAF Γ d (v) is mainly determined by the prior DSAF Γ prior d (v). The subjective uncertainties of each training data are modified using the feedback data, where we become confident about the safety of certain training data when we observe a nearby feedback data that has the same safety property. Since the amount of feedback data is insufficient for providing a reliable safety estimate, the feedback DSAF Γ feedback d (v) has a smaller effect on the computation of the low-dimensional representation of the safe region S y (see Fig. 8b, 8f, 8j).

110When more feedback data are available, e.g., update iteration N = 50, the feedback DSAF Γ feedback d (v) is able to provide more accurate safety estimates, hence its influence on the DSAF Γ d (v) also becomes more significant. Due to the high dimensionality of the original system state x and the limited amount of feedback data, it is difficult to acquire an estimate with high confidence from the GPR model GP(x). As a result, changes are marginal in the prior DSAF Γ prior Fig. 8c, 8g, 8k). With even more feedback data, e.g., update iteration N = 100, the DSAF Γ d (v) is able to provide reliable estimates about the probability p(x ∈ S) for each index vector v. While the prior and feedback DSAFs are updated accordingly, the DSAF Γ d (v) represents the actual low-dimensional representation of the safe region S y under the unknown part of the system dynamics d(x) (see Fig. 8d, 8h, 8l).

D. Comparison with Physically Inspired Model Order Reduction

111We compare the proposed approach with the physically inspired model order reduction presented in [26] in terms of the representation power of the identified low-dimensional representation of the safe region S y , i.e., how well the safe and unsafe states are separated. To do this, we compute another DSAF Γ d (v) using physical features. As in [26], the low-dimensional safety feature, i.e., the simplified state y, is selected for the velocities in x and y directions y = [v x , v y ] T . To avoid any dangerous behavior in early learning phase, the low-dimensional representation of the safe region S y is initialized conservatively [26] by setting Γ d (v) = 0.6 for grid cells that satisfy −0.5 ≤ v x , v y ≤ 0.5 (see Fig. 9a).

112As the learning task in [26] is relatively simple, the exploration in the original system state space is limited to a small subspace around the origin (see Section VII-A for more discussions on this point). Therefore, to make a fair comparison, we also generate another feedback dataset D feedback that has the same size as the dataset D feedback . However, instead of the complete original system state space given in Section VI-A, the states x real in the set D feedback are sampled from a smaller state space, where the ranges of angular positions and angular velocities are changed to − 1 3 π ≤ θ r , θ p , θ y ≤ 1 3 π rad and −3 rad/s ≤ ω r , ω p , ω y ≤ 3 rad/s, respectively.

113We first compare the performance of both approaches by considering a small state space, i.e., the feedback dataset D feedback is used for the update. The results show that, in this case, physical features are able to provide reasonable predictions about safety, i.e., the safe and unsafe regions are separated (see Fig. 9b). Meanwhile, the proposed approach also produces a satisfying result with a marginally better separation between safe and unsafe states (see Fig. 9c).

114However, if the learning task becomes more complex, the complete state space usually has to be explored to enable an optimal policy to be found. To simulate this scenario, we also update the initial DSAF Γ d (v) using the feedback dataset D feedback . As seen in Fig. 9d, when considering the entire original system state space, it is difficult to make reliable safety estimates based only on physical features. The boundary between safe and unsafe regions becomes unclear, and there are numerous grid cells that lead to a safety estimate close to 0.5. In contrast, the proposed approach is still able to find a representative low-dimensional representation of the safe region S y for the complete state space. As the identified simplified state y can describe the safety of original system states x more precisely, a satisfying separation between safe and unsafe regions is achieved (see Fig. 8l) and more useful safety estimates are obtained. The independence of the size of the state space indicates the possibility of implementing the proposed approach on different learning tasks, which in turn increases the applicability of the SRL framework.

VII. DISCUSSION

115In this work, we propose a general approach for efficiently identifying a low-dimensional representation of the safe region. Two important aspects of the proposed approach are discussed in this section.

A. Relevance to Different SRL Tasks

116In [26], the SRL framework utilizes the low-dimensional representation of the safe region S y that is obtained using physically inspired model order reduction. Such a lowdimensional representation is useful when the learning task is relatively simple, e.g., teaching a quadcopter to fly forwards as given in [26], such that a satisfying control policy can be found without requiring an extensive exploration in the original state space. Since, in this case, the system state is likely to stay in a sub-state space near the origin, physical features are able to provide reliable safety estimates. However, when the learning task becomes more difficult, e.g., the quadcopter needs to track a complex 3D trajectory, the learning algorithm in general has to explore a large portion of the state space to find an optimal policy. Under these circumstances, at least a rough safety assessment of the complete state space is needed. Unfortunately, being restricted by the representation power, the physically inspired low-dimensional representation of the safe region S y fails to provide useful safety estimates when considering the entire state space. Hence, the performance of the SRL framework is affected.

117Therefore, to overcome this problem, this paper proposes a data-driven approach for identifying a low-dimensional representation of the safe region S y that is able to make more precise predictions about safety. Meaningful safety estimates are even obtained for the entire original state space. This not only gives the learning algorithm more flexibility in choosing its actions to find the optimal policy, but also indicates the applicability of the proposed approach to more complex learning tasks.

B. Strengths and Limitations

118The presented approach has three particular strengths. First, it finds a low-dimensional representation of the safe region S y that allows safe and unsafe states to be clearly separated for large portions of a high-dimensional state space; see also Section VI-D. Second, the effort required for identifying the low-dimensional representation of the safe region S y is low. While, for instance, physically inspired model order reduction usually needs a comprehensive analysis of the system dynamics, the proposed approach relies solely on training data that can be collected efficiently even for complex dynamical systems through parallel computing and a suitable simulation environment. Third, it fully utilizes the information contained in the feedback data using two DSAFs. Hence, the update can be performed with few feedback data while providing a satisfying result.

119However, the performance of the identified low-dimensional representation of the safe region S y is affected by the quality of the nominal system, i.e. the magnitude of the discrepancy between the nominal and the real systems. While the state mapping y = Ψ(x) is determined using only training data, the online adaptation method attempts to find an accurate DSAF Γ d (v) based on the learned low-dimensional safety feature. If the reality gap is too large, then it is possible that the learned safety feature is not sufficiently representative and we might therefore observe more grid cells with final safety estimates that are close to 0.5, i.e., Γ d (v) ≈ 0.5, which are less useful for guiding the learning process. In general, if the nominal system is assumed to be unreliable, a high probability threshold p t should be used for constructing the low-dimensional representation of the safe region S y (see (20)), such that the learning process becomes more conservative for keeping the system safe. However, we usually consider the unknown system dynamics d(x) as bounded within a reasonable range, since it makes less sense to use a dissimilar nominal system to predict the behavior of the real system. To further generalize the proposed approach, more studies are required to quantify the influence of the simulation-to-reality gap on the reliability of the obtained safety estimates.

VIII. CONCLUSION

120To apply SRL to complex dynamical systems, this paper proposes a novel data-driven approach to identify a lowdimensional representation of the safe region for realizing a general SRL framework. Using a nominal system model that predicts the behavior of the real system, we first collect training data about the safety of different system states. Then, by computing the probabilistic similarities between each training data using a data-driven method, an initial lowdimensional representation of the safe region is obtained. To compensate for the mismatch between the nominal and the real systems, an efficient online adaptation method based on belief function theory is also proposed to update the low-dimensional representation of the safe region by accounting for the real system behavior. Experimental results show that, compared to the previous work, a more reliable and representative low-dimensional representation of the safe region is found using the proposed approach. However, our approach has the limitation that its performance is affected by the magnitude of discrepancy between the nominal and real systems. If the reality gap is assumed to be large, then it is likely that a less meaningful low-dimensional representation of the safe region will be obtained.

121For future work, we intend to combine the data-driven method with model-based model order reduction techniques to find an approach that is more robust to the simulation-to-reality gap when identifying the low-dimensional representation of the safe region. Moreover, we also plan to investigate the possibility of quantifying the similarity between different dynamical systems, such that the learned safety feature can be generalized from one system to other similar systems. How the similarity between dynamical systems will be measured, is, however, still an open research problem. Zhehua Zhou received the B.E. degree in mechatronics engineering from Tongji University, Shanghai, China in 2014 and the M.Sc. degree in electrical and computer engineering from the Department of Electrical and Computer Engineering, Technical University of Munich, Munich, Germany in 2017. He is currently working toward the Ph.D. degree in learning-based control and robotics from the Chair of Automatic Control Engineering, Department of Electrical and Computer Engineering, Technical University of Munich, Munich, Germany. His research interests include optimal control, learning-based control and the applications to robotics.

122Ozgur S. Oguz received the B.Sc. and the M.Sc. (summa cum laude) degrees in computer science from Koc University, Istanbul, Turkey, and the Ph.D. degree (summa cum laude) from the Department of Electrical and Computer Engineering, Technical University of Munich, Germany, in 2018. Currently he is a postdoctoral researcher at the Machine Learning and Robotics Lab, University of Stuttgart and Max Planck Institute for Intelligent Systems, Germany. His research interests are developing autonomous systems that are able to reason about their states of knowledge, take sequential decisions to realize a goal, and simultaneously learn to improve their causal physical reasoning and manipulation skills.

123Marion Leibold (nee Sobotka) received the diploma degree in applied mathematics from the Technische Universität München, Germany, in 2002. She received the PhD degree from the Faculty of Electrical Engineering and Information Technology, Technische Universität München, Germany, in 2007. Currently she is a senior researcher at the Institute of Automatic Control Engineering, Faculty of Electrical Engineering and Information Technology, Technische Universität München, Germany. Her research interests include optimal control and nonlinear control theory, and the applications to robotics.

참고문헌 49건

  1. Model Order Reduction: Theory, Research Aspects and Applications Mathematics in industry · Springer Nature · 2008 10.1007/978-3-540-78841-6
  2. Invariance controlled balance of legged robots 2022 European Control Conference (ECC) · 2007 10.23919/ecc.2007.7068567
  3. Gaussian Processes for Machine Learning 2005
  4. A comprehensive survey on safe reinforcement learning Journal of Machine Learning Research · The MIT Press · 2015
  5. Subjective probability: A judgment of representativeness Cognitive Psychology · Elsevier BV · 1972 10.1016/0010-0285(72)90016-3
  6. Safe Exploration in Markov Decision Processes International Conference on Machine Learning · 2012
  7. End-to-End Training of Deep Visuomotor Policies arXiv (Cornell University) · Cornell University · 2015 10.48550/arxiv.1504.00702
  8. Lyapunov design for safe reinforcement learning Journal of Machine Learning Research · The MIT Press · 2003 10.5555/944919.944955
  9. A Survey on Transfer Learning IEEE Transactions on Knowledge and Data Engineering · IEEE Computer Society · 2009 10.1109/tkde.2009.191
  10. Risk-Sensitive Reinforcement Learning Neural Computation · The MIT Press · 2014 10.1162/neco_a_00600
  11. An Application of Reinforcement Learning to Aerobatic Helicopter Flight Advances in neural information processing systems · 2007 10.7551/mitpress/7503.003.0006
  12. Visualizing Data using t-SNE Journal of Machine Learning Research · The MIT Press · 2008
  13. Stabilization with guaranteed safety using Control Lyapunov–Barrier Function Automatica · Elsevier BV · 2016 10.1016/j.automatica.2015.12.011
  14. Safe learning of regions of attraction for uncertain, nonlinear systems with Gaussian processes 2016 10.1109/cdc.2016.7798979
  15. Benchmarking Deep Reinforcement Learning for Continuous Control arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1604.06778
  16. Robust Constrained Learning-based NMPC enabling reliable mobile robot path tracking The International Journal of Robotics Research · SAGE Publishing · 2016 10.1177/0278364916645661
  17. Safe Control under Uncertainty with Probabilistic Signal Temporal Logic 2016 10.15607/rss.2016.xii.017
  18. Transfer from Simulation to Real World through Learning Deep Inverse Dynamics Model arXiv (Cornell University) · Cornell University · 2016 10.48550/arxiv.1610.03518
  19. Virtual vs. real: Trading off simulations and physical experiments in reinforcement learning with Bayesian optimization 2017 10.1109/icra.2017.7989186
  20. DeepLoco ACM Transactions on Graphics · Association for Computing Machinery · 2017 10.1145/3072959.3073602
  21. A Mathematical Theory of Evidence Princeton University Press eBooks · Princeton University Press · 2020 10.2307/j.ctv10vm1qb
  22. Benchmarking Reinforcement Learning Algorithms on Real-World Robots Conference on Robot Learning · 2018
  23. Safe Reinforcement Learning Using Robust MPC IEEE Transactions on Automatic Control · Institute of Electrical and Electronics Engineers · 2020 10.1109/tac.2020.3024161
  24. Adversarial Attacks on Neural Network Policies arXiv (Cornell University) · Cornell University · 2017 10.48550/arxiv.1702.02284
  25. Benchmarking Reinforcement Learning Algorithms on Real-World Robots arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1809.07731
  26. Constrained policy optimization International Conference on Machine Learning · 2017
  27. A General Safety Framework for Learning-Based Control in Uncertain Robotic Systems IEEE Transactions on Automatic Control · Institute of Electrical and Electronics Engineers · 2018 10.1109/tac.2018.2876389
  28. Benchmarking deep reinforcement learning for continuous control 2016
  29. Hamilton-Jacobi reachability: A brief overview and recent advances 2017 10.1109/cdc.2017.8263977
  30. End-to-end training of deep visuomotor policies Journal of Machine Learning Research · The MIT Press · 2016
  31. DSOS and SDSOS Optimization: More Tractable Alternatives to Sum of Squares and Semidefinite Optimization SIAM Journal on Applied Algebra and Geometry · Society for Industrial and Applied Mathematics · 2019 10.1137/18m118935x
  32. A Lyapunov-based Approach to Safe Reinforcement Learning arXiv (Cornell University) · Cornell University · 2018
  33. Bridging Hamilton-Jacobi Safety Analysis and Reinforcement Learning 2022 International Conference on Robotics and Automation (ICRA) · 2019 10.1109/icra.2019.8794107
  34. RLBench: The Robot Learning Benchmark & Learning Environment arXiv (Cornell University) · Cornell University · 2019
  35. RLBench: The Robot Learning Benchmark & Learning Environment IEEE Robotics and Automation Letters · Institute of Electrical and Electronics Engineers · 2020 10.1109/lra.2020.2974707
  36. A General Framework to Increase Safety of Learning Algorithms for Dynamical Systems Based on Region of Attraction Estimation IEEE Transactions on Robotics · Institute of Electrical and Electronics Engineers · 2020 10.1109/tro.2020.2992981
  37. A Survey on Transfer Learning Smart innovation, systems and technologies · Springer Nature · 2020 10.1007/978-981-15-5971-6_83
  38. Safe learning of regions of attraction for uncertain, nonlinear systems with Gaussian processes 2016 10.1109/cdc.2016.7798979
  39. Risk-Sensitive Reinforcement Learning Neural Computation · The MIT Press · 2014 10.1162/neco_a_00600
  40. Risk-Sensitive Reinforcement Learning SpringerReference · 2012 10.1007/springerreference_302119
  41. Safe Reinforcement Learning Using Robust Action Governor arXiv (Cornell University) · Cornell University · 2021 10.48550/arxiv.2102.10643
  42. (제목 없음) Directory of Open access Books (OAPEN Foundation) · 2022 10.7551/mitpress/3206.001.0001
  43. Subjective Logic Artificial intelligence: foundations, theory, and algorithms/Artificial intelligence: Foundations, theory, and algorithms · Springer International Publishing · 2016 10.1007/978-3-319-42337-1
  44. Constrained Policy Optimization arXiv (Cornell University) · Cornell University · 2017 10.48550/arxiv.1705.10528
  45. Safe Model-based Reinforcement Learning with Stability Guarantees arXiv (Cornell University) · Cornell University · 2017 10.48550/arxiv.1705.08551
  46. A Lyapunov-based Approach to Safe Reinforcement Learning arXiv (Cornell University) · Cornell University · 2018 10.48550/arxiv.1805.07708
  47. A Mathematical Theory of Evidence. Biometrics · Oxford University Press · 1976 10.2307/2529769
  48. Safe Exploration in Markov Decision Processes arXiv (Cornell University) · Cornell University · 2012 10.48550/arxiv.1205.4810
  49. A Mathematical Theory of Evidence Princeton University Press eBooks · Princeton University Press · 1976 10.1515/9780691214696