This paper proposes a method to analyze the stability of systems where neural networks with rectified linear unit (ReLU) activations are used as controllers. The key steps are: (1) Representing ReLU neural networks as solutions to linear complementarity problems (LCPs), (2) Showing systems with ReLU network controllers can be described as linear complementarity systems (LCSs), (3) Formulating the stability verification problem as a linear matrix inequality (LMI) feasibility problem that can be solved using existing techniques. The approach is demonstrated on examples involving multi-contact problems and friction models.
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...ieijjournal1
Ā
It is known that if a linear-time-invariant MIMO system described by a state space equation has a number
of states divisible by the number of inputs and it can be transformed to block controller form, we can
design a state feedback controller using block pole placement technique by assigning a set of desired Block
poles. These may be left or right block poles. The idea is to compare both in terms of systemās response.
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...ieijjournal
Ā
It is known that if a linear-time-invariant MIMO system described by a state space equation has a number of states divisible by the number of inputs and it can be transformed to block controller form, we can design a state feedback controller using block pole placement technique by assigning a set of desired Block poles. These may be left or right block poles. The idea is to compare both in terms of systemās response.
Radial basis function neural network control for parallel spatial robotTELKOMNIKA JOURNAL
Ā
The derivation of motion equations of constrained spatial multibody system is an important problem of dynamics and control of parallel robots. The paper firstly presents an overview of the calculating the torque of the driving stages of the parallel robots using Kronecker product. The main content of this paper is to derive the inverse dynamics controllers based on the radial basis function (RBF) neural network control law for parallel robot manipulators. Finally, numerical simulation of the inverse dynamics controller for a 3-RRR delta robot manipulator is presented as an illustrative example.
Black-box modeling of nonlinear system using evolutionary neural NARX modelIJECEIAES
Ā
Nonlinear systems with uncertainty and disturbance are very difficult to model using mathematic approach. Therefore, a black-box modeling approach without any prior knowledge is necessary. There are some modeling approaches have been used to develop a black box model such as fuzzy logic, neural network, and evolution algorithms. In this paper, an evolutionary neural network by combining a neural network and a modified differential evolution algorithm is applied to model a nonlinear system. The feasibility and effectiveness of the proposed modeling are tested on a piezoelectric actuator SISO system and an experimental quadruple tank MIMO system.
COMPARISON OF VOLUME AND DISTANCE CONSTRAINT ON HYPERSPECTRAL UNMIXINGcsandit
Ā
Algorithms based on minimum volume constraint or sum of squared distances constraint is
widely used in Hyperspectral image unmixing. However, there are few works about performing
comparison between these two algorithms. In this paper, comparison analysis between two
algorithms is presented to evaluate the performance of two constraints under different situations. Comparison is implemented from the following three aspects: flatness of simplex, initialization effects and robustness to noise. The analysis can provide a guideline on which constraint should be adopted under certain specific tasks.
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...ieijjournal1
Ā
It is known that if a linear-time-invariant MIMO system described by a state space equation has a number
of states divisible by the number of inputs and it can be transformed to block controller form, we can
design a state feedback controller using block pole placement technique by assigning a set of desired Block
poles. These may be left or right block poles. The idea is to compare both in terms of systemās response.
THE LEFT AND RIGHT BLOCK POLE PLACEMENT COMPARISON STUDY: APPLICATION TO FLIG...ieijjournal
Ā
It is known that if a linear-time-invariant MIMO system described by a state space equation has a number of states divisible by the number of inputs and it can be transformed to block controller form, we can design a state feedback controller using block pole placement technique by assigning a set of desired Block poles. These may be left or right block poles. The idea is to compare both in terms of systemās response.
Radial basis function neural network control for parallel spatial robotTELKOMNIKA JOURNAL
Ā
The derivation of motion equations of constrained spatial multibody system is an important problem of dynamics and control of parallel robots. The paper firstly presents an overview of the calculating the torque of the driving stages of the parallel robots using Kronecker product. The main content of this paper is to derive the inverse dynamics controllers based on the radial basis function (RBF) neural network control law for parallel robot manipulators. Finally, numerical simulation of the inverse dynamics controller for a 3-RRR delta robot manipulator is presented as an illustrative example.
Black-box modeling of nonlinear system using evolutionary neural NARX modelIJECEIAES
Ā
Nonlinear systems with uncertainty and disturbance are very difficult to model using mathematic approach. Therefore, a black-box modeling approach without any prior knowledge is necessary. There are some modeling approaches have been used to develop a black box model such as fuzzy logic, neural network, and evolution algorithms. In this paper, an evolutionary neural network by combining a neural network and a modified differential evolution algorithm is applied to model a nonlinear system. The feasibility and effectiveness of the proposed modeling are tested on a piezoelectric actuator SISO system and an experimental quadruple tank MIMO system.
COMPARISON OF VOLUME AND DISTANCE CONSTRAINT ON HYPERSPECTRAL UNMIXINGcsandit
Ā
Algorithms based on minimum volume constraint or sum of squared distances constraint is
widely used in Hyperspectral image unmixing. However, there are few works about performing
comparison between these two algorithms. In this paper, comparison analysis between two
algorithms is presented to evaluate the performance of two constraints under different situations. Comparison is implemented from the following three aspects: flatness of simplex, initialization effects and robustness to noise. The analysis can provide a guideline on which constraint should be adopted under certain specific tasks.
The aim of this research is to find accurate solution for the Troeschās problem by using high performance technique based on parallel processing implementation.
Design/methodology/approach ā Feed forward neural network is designed to solve important type of differential equations that arises in many applied sciences and engineering applications. The suitable designed based on choosing suitable learning rate, transfer function, and training algorithm. The authors used back propagation with new implement of Levenberg - Marquardt training algorithm. Also, the authors depend new idea for choosing the weights. The effectiveness of the suggested design for the network is shown by using it for solving Troesch problem in many cases.
Findings ā New idea for choosing the weights of the neural network, new implement of Levenberg - Marquardt training algorithm which assist to speeding the convergence and the implementation of the suggested design demonstrates the usefulness in finding exact solutions.
The Bound of Reachable Sets Estimation for Neutral Markovian Jump Systems wit...AI Publications
Ā
The problem of finding an bound of reachable sets for neutral markovian jump systems with bounded peak disturbances is studied in this paper. Up to now, the result related to the bound of reachable sets was rarely proposed for neutral markovian jump systems. Based on the modified Lyapunov-Krasovskii type functional and linear matrix inequality technology, we obtain some delay-dependent results expressed in the form of matrix inequalities containing only one non-convex scalar. Numerical examples are given to illustrate our theoretical results.
Joint3DShapeMatching - a fast approach to 3D model matching using MatchALS 3...Mamoon Ismail Khalid
Ā
we extend the global optimization-based
approach of jointly matching a set of images to jointly
matching a set of 3D meshes. The estimated correspon
dences simultaneously maximize pairwise feature affini
ties and cycle consistency across multiple models. We
show that the low-rank matrix recovery problem can be
efficiently applied to the 3D meshes as well. The fast
alternating minimization algorithm helps to handle real
world practical problems with thousands of features. Ex
perimental results show that, unlike the state-of-the-art
algorithm which rely on semi-definite programming, our
algorithm provides an order of magnitude speed-up along
with competitive performance. Along with the joint shape
matching we propose an approach to apply a distortion
term in pairwise matching, which helps in successfully
matching the reflexive sub-parts of two models distinc
tively. In the end, we demonstrate the applicability of
the algorithm to match a set of 3D meshes of the SCAPE
benchmark database
Projective and hybrid projective synchronization of 4-D hyperchaotic system v...TELKOMNIKA JOURNAL
Ā
Nonlinear control strategy was established to realize the Projective Synchronization (PS) and Hybrid Projective Synchronization (HPS) for 4-D hyperchaotic system at different scaling matrices. This strategy, which is able to achieve projective and hybrid projective synchronization by more precise and adaptable method to provide a novel control scheme. On First stage, three scaling matrices were given in order to achieving various projective synchronization phenomena. While the HPS was implemented at specific scaling matrix in the second stage. Ultimately, the precision of controllers were compared and analyzed theoretically and numerically. The long-range precision of the proposed controllers are confirmed by third stage.
Linear regression [Theory and Application (In physics point of view) using py...ANIRBANMAJUMDAR18
Ā
Machine-learning models are behind many recent technological advances, including high-accuracy translations of the text and self-driving cars. They are also increasingly used by researchers to help in solving physics problems, like Finding new phases of matter, Detecting interesting outliers
in data from high-energy physics experiments, Founding astronomical objects are known as gravitational lenses in maps of the night sky etc. The rudimentary algorithm that every Machine Learning enthusiast starts with is a linear regression algorithm. In statistics, linear regression is a linear approach to modelling the relationship between a scalar response (or dependent variable) and one or more explanatory variables (or independent
variables). Linear regression analysis (least squares) is used in a physics lab to prepare the computer-aided report and to fit data. In this article, the application is made to experiment: 'DETERMINATION OF DIELECTRIC CONSTANT OF NON-CONDUCTING LIQUIDS'. The entire computation is made through Python 3.6 programming language in this article.
USING LEARNING AUTOMATA AND GENETIC ALGORITHMS TO IMPROVE THE QUALITY OF SERV...IJCSEA Journal
Ā
A hybrid learning automataāgenetic algorithm (HLGA) is proposed to solve QoS routing optimization problem of next generation networks. The algorithm complements the advantages of the learning Automato Algorithm(LA) and Genetic Algorithm(GA). It firstly uses the good global search capability of LA to generate initial population needed by GA, then it uses GA to improve the Quality of Service(QoS) and acquiring the optimization tree through new algorithms for crossover and mutation operators which are an NPāComplete problem. In the proposed algorithm, the connectivity matrix of edges is used for genotype representation. Some novel heuristics are also proposed for mutation, crossover, and creation of random individuals. We evaluate the performance and efficiency of the proposed HLGA-based algorithm in comparison with other existing heuristic and GA-based algorithms by the result of simulation. Simulation results demonstrate that this paper proposed algorithm not only has the fast calculating speed and high accuracy but also can improve the efficiency in Next Generation Networks QoS routing. The proposed algorithm has overcome all of the previous algorithms in the literature..
Semi-global Leaderless Consensus with Input Saturation Constraints via Adapti...IJRES Journal
Ā
In this paper, the problems of semi-global leaderless consensus for continuous-time multi-agent
systems under input saturation restraints are investigated. We consider the leaderless consensus problems
under fixed undirected communication topology. New necessary synthesis conditions are established for
achieving semi-global leaderless consensus via the distributed adaptive protocols, which is designed by utilizing
low gain feedback tactics and the relative state measurements of the neighboring agents. Finally, simulation
results illustrate the theoretic developments.
AN EFFICIENT PARALLEL ALGORITHM FOR COMPUTING DETERMINANT OF NON-SQUARE MATRI...ijdpsjournal
Ā
One of the most significant challenges in Computing Determinant of Rectangular Matrices is high time
complexity of its algorithm. Among all definitions of determinant of rectangular matrices, Radicās
definition has special features which make it more notable. But in this definition, C(N
M
) sub matrices of the
order mĆm needed to be generated that put this problem in np-hard class. On the other hand, any row or
column reduction operation may hardly lead to diminish the volume of calculation. Therefore, in this paper
we try to present the parallel algorithm which can decrease the time complexity of computing the
determinant of non-square matrices to O(N
).
AN EFFICIENT PARALLEL ALGORITHM FOR COMPUTING DETERMINANT OF NON-SQUARE MATRI...ijdpsjournal
Ā
One of the most significant challenges in Computing Determinant of Rectangular Matrices is high time
complexity of its algorithm. Among all definitions of determinant of rectangular matrices, Radicās
definition has special features which make it more notable. But in this definition, C(N
M
) sub matrices of the
order mĆm needed to be generated that put this problem in np-hard class. On the other hand, any row or
column reduction operation may hardly lead to diminish the volume of calculation. Therefore, in this paper
we try to present the parallel algorithm which can decrease the time complexity of computing the
determinant of non-square matrices to O(N).
Power system transient stability margin estimation using artificial neural ne...elelijjournal
Ā
This paper presents a methodology for estimating the normalized transient stability margin by using the multilayered perceptron (MLP) neural network. The complex relationship between the input variables and output variables is established by using the neural networks. The nonlinear mapping relation between the normalized transient stability margin and the operating conditions of the power system is established by using the MLP neural network. To obtain the training set of the neural network the potential energy boundary surface (PEBS) method along with time domain simulation method is used. The proposed method is applied on IEEE 9 bus system and the results shows that the proposed method provides fast and accurate tool to assess online transient stability.
Solution of Inverse Kinematics for SCARA Manipulator Using Adaptive Neuro-Fuz...ijsc
Ā
Solution of inverse kinematic equations is complex problem, the complexity comes from the nonlinearity of joint space and Cartesian space mapping and having multiple solution. In this work, four adaptive neurofuzzy networks ANFIS are implemented to solve the inverse kinematics of 4-DOF SCARA manipulator. The implementation of ANFIS is easy, and the simulation of it shows that it is very fast and give acceptable
error.
A novel two-polynomial criteria for higher-order systems stability boundaries...TELKOMNIKA JOURNAL
Ā
There are many methods for identifying the stability of complex dynamic systems. Routh and Hurwitzās criterion is one of the earliest and commonly used analytical tools analysing the stability of dynamic systems. However, it requires tedious and lengthy derivations of all components of the Routh array to solve the stability problem. Therefore, it is not a simple method to define analytically, stability boundaries for the coefficients of the system characteristic equation.The proposed brand-new criterion is an effective alternaztive technique in identifying stabilityhigher-order linear time-invariant dynamic system that binds the coefficients of the system characteristic polynomial at the stability boundaries by means of an additional single constantk. It defines the necessary and sufficient conditions for the absolute stability of higher-order dynamic systems. It also allows the analysing of the systemās precise marginal stabilityor marginal instability condition when the roots are relocated on imaginary jĻ-axis of s-plane. The criterion proposed bythe authors, in contrast to Routh criteria, simplifies the identification of maximum and minimum stability limits for any coefficient of the higher-order characteristic equation significantly. The derived in the paperstability boundary formulas for the polynomial coefficients are successfully used for the proportional integral derivative (PID) controller with single or multiple gains selections in closed-loop control system.
X-TREPAN: A MULTI CLASS REGRESSION AND ADAPTED EXTRACTION OF COMPREHENSIBLE D...cscpconf
Ā
In this work, the TREPAN algorithm is enhanced and extended for extracting decision trees from neural networks. We empirically evaluated the performance of the algorithm on a set of databases from real world events. This benchmark enhancement was achieved by adapting Single-test TREPAN and C4.5 decision tree induction algorithms to analyze the datasets. The models are then compared with X-TREPAN for comprehensibility and classification accuracy. Furthermore, we validate the experimentations by applying statistical methods. Finally, the modified algorithm is extended to work with multi-class regression problems and the ability to comprehend generalized feed forward networks is achieved.
The aim of this research is to find accurate solution for the Troeschās problem by using high performance technique based on parallel processing implementation.
Design/methodology/approach ā Feed forward neural network is designed to solve important type of differential equations that arises in many applied sciences and engineering applications. The suitable designed based on choosing suitable learning rate, transfer function, and training algorithm. The authors used back propagation with new implement of Levenberg - Marquardt training algorithm. Also, the authors depend new idea for choosing the weights. The effectiveness of the suggested design for the network is shown by using it for solving Troesch problem in many cases.
Findings ā New idea for choosing the weights of the neural network, new implement of Levenberg - Marquardt training algorithm which assist to speeding the convergence and the implementation of the suggested design demonstrates the usefulness in finding exact solutions.
The Bound of Reachable Sets Estimation for Neutral Markovian Jump Systems wit...AI Publications
Ā
The problem of finding an bound of reachable sets for neutral markovian jump systems with bounded peak disturbances is studied in this paper. Up to now, the result related to the bound of reachable sets was rarely proposed for neutral markovian jump systems. Based on the modified Lyapunov-Krasovskii type functional and linear matrix inequality technology, we obtain some delay-dependent results expressed in the form of matrix inequalities containing only one non-convex scalar. Numerical examples are given to illustrate our theoretical results.
Joint3DShapeMatching - a fast approach to 3D model matching using MatchALS 3...Mamoon Ismail Khalid
Ā
we extend the global optimization-based
approach of jointly matching a set of images to jointly
matching a set of 3D meshes. The estimated correspon
dences simultaneously maximize pairwise feature affini
ties and cycle consistency across multiple models. We
show that the low-rank matrix recovery problem can be
efficiently applied to the 3D meshes as well. The fast
alternating minimization algorithm helps to handle real
world practical problems with thousands of features. Ex
perimental results show that, unlike the state-of-the-art
algorithm which rely on semi-definite programming, our
algorithm provides an order of magnitude speed-up along
with competitive performance. Along with the joint shape
matching we propose an approach to apply a distortion
term in pairwise matching, which helps in successfully
matching the reflexive sub-parts of two models distinc
tively. In the end, we demonstrate the applicability of
the algorithm to match a set of 3D meshes of the SCAPE
benchmark database
Projective and hybrid projective synchronization of 4-D hyperchaotic system v...TELKOMNIKA JOURNAL
Ā
Nonlinear control strategy was established to realize the Projective Synchronization (PS) and Hybrid Projective Synchronization (HPS) for 4-D hyperchaotic system at different scaling matrices. This strategy, which is able to achieve projective and hybrid projective synchronization by more precise and adaptable method to provide a novel control scheme. On First stage, three scaling matrices were given in order to achieving various projective synchronization phenomena. While the HPS was implemented at specific scaling matrix in the second stage. Ultimately, the precision of controllers were compared and analyzed theoretically and numerically. The long-range precision of the proposed controllers are confirmed by third stage.
Linear regression [Theory and Application (In physics point of view) using py...ANIRBANMAJUMDAR18
Ā
Machine-learning models are behind many recent technological advances, including high-accuracy translations of the text and self-driving cars. They are also increasingly used by researchers to help in solving physics problems, like Finding new phases of matter, Detecting interesting outliers
in data from high-energy physics experiments, Founding astronomical objects are known as gravitational lenses in maps of the night sky etc. The rudimentary algorithm that every Machine Learning enthusiast starts with is a linear regression algorithm. In statistics, linear regression is a linear approach to modelling the relationship between a scalar response (or dependent variable) and one or more explanatory variables (or independent
variables). Linear regression analysis (least squares) is used in a physics lab to prepare the computer-aided report and to fit data. In this article, the application is made to experiment: 'DETERMINATION OF DIELECTRIC CONSTANT OF NON-CONDUCTING LIQUIDS'. The entire computation is made through Python 3.6 programming language in this article.
USING LEARNING AUTOMATA AND GENETIC ALGORITHMS TO IMPROVE THE QUALITY OF SERV...IJCSEA Journal
Ā
A hybrid learning automataāgenetic algorithm (HLGA) is proposed to solve QoS routing optimization problem of next generation networks. The algorithm complements the advantages of the learning Automato Algorithm(LA) and Genetic Algorithm(GA). It firstly uses the good global search capability of LA to generate initial population needed by GA, then it uses GA to improve the Quality of Service(QoS) and acquiring the optimization tree through new algorithms for crossover and mutation operators which are an NPāComplete problem. In the proposed algorithm, the connectivity matrix of edges is used for genotype representation. Some novel heuristics are also proposed for mutation, crossover, and creation of random individuals. We evaluate the performance and efficiency of the proposed HLGA-based algorithm in comparison with other existing heuristic and GA-based algorithms by the result of simulation. Simulation results demonstrate that this paper proposed algorithm not only has the fast calculating speed and high accuracy but also can improve the efficiency in Next Generation Networks QoS routing. The proposed algorithm has overcome all of the previous algorithms in the literature..
Semi-global Leaderless Consensus with Input Saturation Constraints via Adapti...IJRES Journal
Ā
In this paper, the problems of semi-global leaderless consensus for continuous-time multi-agent
systems under input saturation restraints are investigated. We consider the leaderless consensus problems
under fixed undirected communication topology. New necessary synthesis conditions are established for
achieving semi-global leaderless consensus via the distributed adaptive protocols, which is designed by utilizing
low gain feedback tactics and the relative state measurements of the neighboring agents. Finally, simulation
results illustrate the theoretic developments.
AN EFFICIENT PARALLEL ALGORITHM FOR COMPUTING DETERMINANT OF NON-SQUARE MATRI...ijdpsjournal
Ā
One of the most significant challenges in Computing Determinant of Rectangular Matrices is high time
complexity of its algorithm. Among all definitions of determinant of rectangular matrices, Radicās
definition has special features which make it more notable. But in this definition, C(N
M
) sub matrices of the
order mĆm needed to be generated that put this problem in np-hard class. On the other hand, any row or
column reduction operation may hardly lead to diminish the volume of calculation. Therefore, in this paper
we try to present the parallel algorithm which can decrease the time complexity of computing the
determinant of non-square matrices to O(N
).
AN EFFICIENT PARALLEL ALGORITHM FOR COMPUTING DETERMINANT OF NON-SQUARE MATRI...ijdpsjournal
Ā
One of the most significant challenges in Computing Determinant of Rectangular Matrices is high time
complexity of its algorithm. Among all definitions of determinant of rectangular matrices, Radicās
definition has special features which make it more notable. But in this definition, C(N
M
) sub matrices of the
order mĆm needed to be generated that put this problem in np-hard class. On the other hand, any row or
column reduction operation may hardly lead to diminish the volume of calculation. Therefore, in this paper
we try to present the parallel algorithm which can decrease the time complexity of computing the
determinant of non-square matrices to O(N).
Power system transient stability margin estimation using artificial neural ne...elelijjournal
Ā
This paper presents a methodology for estimating the normalized transient stability margin by using the multilayered perceptron (MLP) neural network. The complex relationship between the input variables and output variables is established by using the neural networks. The nonlinear mapping relation between the normalized transient stability margin and the operating conditions of the power system is established by using the MLP neural network. To obtain the training set of the neural network the potential energy boundary surface (PEBS) method along with time domain simulation method is used. The proposed method is applied on IEEE 9 bus system and the results shows that the proposed method provides fast and accurate tool to assess online transient stability.
Solution of Inverse Kinematics for SCARA Manipulator Using Adaptive Neuro-Fuz...ijsc
Ā
Solution of inverse kinematic equations is complex problem, the complexity comes from the nonlinearity of joint space and Cartesian space mapping and having multiple solution. In this work, four adaptive neurofuzzy networks ANFIS are implemented to solve the inverse kinematics of 4-DOF SCARA manipulator. The implementation of ANFIS is easy, and the simulation of it shows that it is very fast and give acceptable
error.
A novel two-polynomial criteria for higher-order systems stability boundaries...TELKOMNIKA JOURNAL
Ā
There are many methods for identifying the stability of complex dynamic systems. Routh and Hurwitzās criterion is one of the earliest and commonly used analytical tools analysing the stability of dynamic systems. However, it requires tedious and lengthy derivations of all components of the Routh array to solve the stability problem. Therefore, it is not a simple method to define analytically, stability boundaries for the coefficients of the system characteristic equation.The proposed brand-new criterion is an effective alternaztive technique in identifying stabilityhigher-order linear time-invariant dynamic system that binds the coefficients of the system characteristic polynomial at the stability boundaries by means of an additional single constantk. It defines the necessary and sufficient conditions for the absolute stability of higher-order dynamic systems. It also allows the analysing of the systemās precise marginal stabilityor marginal instability condition when the roots are relocated on imaginary jĻ-axis of s-plane. The criterion proposed bythe authors, in contrast to Routh criteria, simplifies the identification of maximum and minimum stability limits for any coefficient of the higher-order characteristic equation significantly. The derived in the paperstability boundary formulas for the polynomial coefficients are successfully used for the proportional integral derivative (PID) controller with single or multiple gains selections in closed-loop control system.
X-TREPAN: A MULTI CLASS REGRESSION AND ADAPTED EXTRACTION OF COMPREHENSIBLE D...cscpconf
Ā
In this work, the TREPAN algorithm is enhanced and extended for extracting decision trees from neural networks. We empirically evaluated the performance of the algorithm on a set of databases from real world events. This benchmark enhancement was achieved by adapting Single-test TREPAN and C4.5 decision tree induction algorithms to analyze the datasets. The models are then compared with X-TREPAN for comprehensibility and classification accuracy. Furthermore, we validate the experimentations by applying statistical methods. Finally, the modified algorithm is extended to work with multi-class regression problems and the ability to comprehend generalized feed forward networks is achieved.
HEAP SORT ILLUSTRATED WITH HEAPIFY, BUILD HEAP FOR DYNAMIC ARRAYS.
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first find the minimum element and place the minimum element at the beginning. Repeat the same process for the remaining elements.
Online aptitude test management system project report.pdfKamal Acharya
Ā
The purpose of on-line aptitude test system is to take online test in an efficient manner and no time wasting for checking the paper. The main objective of on-line aptitude test system is to efficiently evaluate the candidate thoroughly through a fully automated system that not only saves lot of time but also gives fast results. For students they give papers according to their convenience and time and there is no need of using extra thing like paper, pen etc. This can be used in educational institutions as well as in corporate world. Can be used anywhere any time as it is a web based application (user Location doesnāt matter). No restriction that examiner has to be present when the candidate takes the test.
Every time when lecturers/professors need to conduct examinations they have to sit down think about the questions and then create a whole new set of questions for each and every exam. In some cases the professor may want to give an open book online exam that is the student can take the exam any time anywhere, but the student might have to answer the questions in a limited time period. The professor may want to change the sequence of questions for every student. The problem that a student has is whenever a date for the exam is declared the student has to take it and there is no way he can take it at some other time. This project will create an interface for the examiner to create and store questions in a repository. It will also create an interface for the student to take examinations at his convenience and the questions and/or exams may be timed. Thereby creating an application which can be used by examiners and examineeās simultaneously.
Examination System is very useful for Teachers/Professors. As in the teaching profession, you are responsible for writing question papers. In the conventional method, you write the question paper on paper, keep question papers separate from answers and all this information you have to keep in a locker to avoid unauthorized access. Using the Examination System you can create a question paper and everything will be written to a single exam file in encrypted format. You can set the General and Administrator password to avoid unauthorized access to your question paper. Every time you start the examination, the program shuffles all the questions and selects them randomly from the database, which reduces the chances of memorizing the questions.
Understanding Inductive Bias in Machine LearningSUTEJAS
Ā
This presentation explores the concept of inductive bias in machine learning. It explains how algorithms come with built-in assumptions and preferences that guide the learning process. You'll learn about the different types of inductive bias and how they can impact the performance and generalizability of machine learning models.
The presentation also covers the positive and negative aspects of inductive bias, along with strategies for mitigating potential drawbacks. We'll explore examples of how bias manifests in algorithms like neural networks and decision trees.
By understanding inductive bias, you can gain valuable insights into how machine learning models work and make informed decisions when building and deploying them.
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesChristina Lin
Ā
Traditionally, dealing with real-time data pipelines has involved significant overhead, even for straightforward tasks like data transformation or masking. However, in this talk, weāll venture into the dynamic realm of WebAssembly (WASM) and discover how it can revolutionize the creation of stateless streaming pipelines within a Kafka (Redpanda) broker. These pipelines are adept at managing low-latency, high-data-volume scenarios.
Water billing management system project report.pdfKamal Acharya
Ā
Our project entitled āWater Billing Management Systemā aims is to generate Water bill with all the charges and penalty. Manual system that is employed is extremely laborious and quite inadequate. It only makes the process more difficult and hard.
The aim of our project is to develop a system that is meant to partially computerize the work performed in the Water Board like generating monthly Water bill, record of consuming unit of water, store record of the customer and previous unpaid record.
We used HTML/PHP as front end and MYSQL as back end for developing our project. HTML is primarily a visual design environment. We can create a android application by designing the form and that make up the user interface. Adding android application code to the form and the objects such as buttons and text boxes on them and adding any required support code in additional modular.
MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software. It is a stable ,reliable and the powerful solution with the advanced features and advantages which are as follows: Data Security.MySQL is free open source database that facilitates the effective management of the databases by connecting them to the software.
6th International Conference on Machine Learning & Applications (CMLA 2024)ClaraZara1
Ā
6th International Conference on Machine Learning & Applications (CMLA 2024) will provide an excellent international forum for sharing knowledge and results in theory, methodology and applications of on Machine Learning & Applications.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
Ā
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
2. HSCC ā21, May 19ā21, 2021, Nashville, TN, USA Alp Aydinoglu, Mahyar Fazlyab, Manfred Morari, and Michael Posa
in deep learning are gradients of convex potentials, hence they sat-
isfy incremental quadratic constraints that can be used to bound
the global Lipschitz constant of feed-forward neural networks. The
works [17, 18, 47] perform reachability analysis for closed-loop
systems with neural network controllers and [43] considers safety
verification for such systems. The work in [1] integrates quadratic
programs as end-to-end trainable deep networks to encode con-
straints and more complex dependencies between the hidden states.
Yin et al. [49] considers uncertain linear time-invariant systems
with neural network controllers. By over approximating the input-
output map of the neural network and uncertainties by quadratic
and integral quadratic constraints, respectively, the authors develop
an SDP whose solution yields quadratic Lyapunov functions. In [10]
the authors develop a learning-based iterative sample guided strat-
egy based on the analytic center cutting plane method to search for
Lyapunov functions for piece-wise affine systems in feedback with
ReLU networks where the generation of samples relies on solving
mixed-integer quadratic programs. In [30], the authors use a mixed-
integer programming formulation to perform output range analysis
of ReLU neural networks and provide guarantees for constraint
satisfaction and asymptotic stability of the closed-loop system.
1.2 Contributions
Inspired by the connection between ReLU functions and linear
complementarity problems, we develop a method to analyze linear
complementarity systems in feedback with ReLU network con-
trollers. Our starting point is to show that we can represent ReLU
neural networks as linear complementarity problems (Lemma 2).
Next, we demonstrate that linear complementarity systems with
neural network controllers have an equivalent LCS representation.
Then, we leverage the theory of stability analysis for complemen-
tarity systems and derive the discrete time version of the results in
[9]. We describe the sufficient conditions for stability in the form
of Linear Matrix Inequalities (LMIās). Denoting by š the number
of neurons in the network plus the number of complementarity
variables in the LCS, the size of the LMIās scales linearly with š.
Furthermore, the maximum possible number of decision variables
in our LMI scales quadratically with š. To the best of our knowl-
edge, this is the first work on analyzing the stability of LCS systems
with neural network controllers.
2 BACKGROUND
2.1 Notation
We denote the set of non-negative integers by N0, the set of d-
dimensional vectors with real components as Rš and the set of
š Ć š dimensional matrices by RšĆš. For two vectors š ā Rš
and š ā Rš, we use the notation 0 ā¤ š ā„ š ā„ 0 to denote that
š ā„ 0, š ā„ 0, šš š = 0. For a positive integer š, ĀÆ
š denotes the set
{1, 2, . . . ,š}. Given a matrix š ā RšĆš and two subsets š¼ ā ĀÆ
š and
š½ ā ĀÆ
š, we define šš¼ š½ = (ššš )š āš¼,š āš½ . For the case where š½ = ĀÆ
š, we
use the shorthand notation šš¼ā¢.
2.2 Linear Complementarity Problem
The theory of linear complementarity problems (LCP) will be used
throughout this work [13].
Definition 1. Given a vector š ā Rš, and a matrix š¹ ā RšĆš,
the šæš¶š(š, š¹) describes the following mathematical program:
find š ā Rš
subject to š¦ = š¹š + š,
0 ā¤ š ā„ š¦ ā„ 0.
The solution set of the šæš¶š(š, š¹) is denoted by
SOL(š, š¹) = {š : š¦ = š¹š + š, 0 ā¤ š ā„ š¦ ā„ 0}.
The LCP(š, š¹) may have multiple solutions or none at all. The
cardinality of the solution set SOL(š, š¹) depends on the matrix š¹
and the vector š.
Definition 2. A matrix š¹ ā RšĆš is a P-matrix, if the de-
terminant of all of its principal sub-matrices are positive; that is,
det(š¹š¼š¼ ) > 0 for all š¼ ā {1, . . . ,š}.
The solution set SOL(š, š¹) is a singleton for all š if š¹ is a P-
matrix [13]. If we denote the unique element of SOL(š, š¹) as š(š),
then š(š) is a piece-wise linear function of š. We can describe this
function explicitly as in [9]. Consider š¦ = š¹š(š) + š, and define the
index sets
š¼(š) = {š : šš (š) > 0 = š¦š },
š½(š) = {š : šš (š) = 0 ā¤ š¦š },
Then, š(š) is equivalent to
šš¼ (š) = ā(š¹š¼š¼ )ā1
š¼š¼ā¢š, šš½ (š) = 0, (1)
where š¼ = š¼(š) and š½ = š½(š). Furthermore, š(š) as in (1) is Lips-
chitz continuous since it is a continuous piece-wise linear function
of š [42].
2.3 Linear Complementarity Systems
We are now ready to introduce linear complementarity systems
(LCS). In this work, we consider an LCS as a difference equation
coupled with a variable that is the solution of an LCP.
Definition 3. A linear complementarity system describes the
trajectories (š„š)š āN0
and (šš)š āN0
for an input sequence (š¢š)š āN0
starting from š„0 such that
š„š+1 = š“š„š + šµš¢š + š·šš + š§,
š¦š = šøš„š + š¹šš + š»š¢š + š,
0 ā¤ šš ā„ š¦š ā„ 0.
(2)
where š„š ā Ršš„ , šš ā Ršš , š¢š ā Ršš¢ , š“ ā Ršš„ Ćšš„ , šµ ā Ršš„ Ćšš¢ ,
š· ā Ršš„ Ćšš , š§ ā Ršš„ , šø ā RššĆšš„ , š¹ ā Ršš„ Ćšš , š» ā RššĆšš¢ and
š ā Ršš .
For a given š, š„š and š¢š, the corresponding complementarity
variable šš can be found by solving LCP(šøš„š +š»š¢š +š, š¹) (see Def-
inition 1). Similarly, š„š+1 can be computed using the first equation
in (2) when š„š,š¢š and šš are known. In general, the trajectories
(š„š) and (šš) are not unique since SOL(šøš„š +š»š¢š +š, š¹) can have
multiple elements; hence, (2) is a difference inclusion [16].
In this work, we will focus on autonomous linear complemen-
tarity systems (A-LCS) because we consider the input as a function
of the state and the complementarity variable, i.e., š¢š = š¢š (š„š, šš).
3. Stability Analysis of Complementarity Systems with Neural Network Controllers HSCC ā21, May 19ā21, 2021, Nashville, TN, USA
An A-LCS represents the evolution of trajectories (š„š)š āN0
and
(šš)š āN0
according to following dynamics,
š„š+1 = š“š„š + š·šš + š§,
š¦š = šøš„š + š¹šš + š,
0 ā¤ šš ā„ š¦š ā„ 0,
(3)
and unlike (2) there is no input. Moving forward, we will consider
A-LCS models that can have non-unique trajectories.
We note that, however, the existence of a special case of (3) is
continuous piecewise affine systems [25]. If š¹ is a P-matrix, then
š(š„š) is unique for all š„š and (3) is equivalent to
š„š+1 = š“š„š + šµš¢š + š·š(š„š) + š§,
where š(š„š) is the unique element of SOL(šøš„š + š, š¹) and can be
explicitly described as in (1). In this setting, (2) is a piece-wise
affine dynamical system and has a unique solution for any initial
condition š„0.
2.4 Stability of A-LCS
We introduce the notions of stability for A-LCS that are similar
to [44]. An equilibrium point š„š for (3) is defined as a point that
satisfies š„š = š“š„š +š·šš +š§ where šš = SOL(šøš„š +š, š¹) is a singleton.
Without loss of generality, we assume š„š = 0 is an equilibrium of
the system, i.e., š· Ā· SOL(š, š¹) = {āš§}.
Definition 4. The equilibrium š„š = 0 of A-LCS is
(1) stable if for any given š > 0, there exists a šæ > 0 such that
||š„0|| ā¤ šæ =ā ||š„š || ā¤ š āš ā„ 0,
for any trajectory {š„š } starting from š„0,
(2) asymptotically stable if it is stable and there is a šæ > 0 such
that
||š„0|| ā¤ šæ =ā lim
šāā
||š„š || = 0,
for any trajectory {š„š } starting from š„0.
(3) geometrically stable if there exists šæ > 0, š¼ > 1 and 0 < š < 1
such that
||š„0|| ā¤ šæ =ā ||š„š || ā¤ š¼šš
||š„0|| āš ā„ 0,
for any trajectory {š„š } starting from š„0.
Notice that if š¹ is a P-matrix, these are equivalent to the notions
of stability for difference equations where the right side is Lipschitz
continuous [31] since there is a unique trajectory {š„š } starting
from any initial condition š„0.
3 LINEAR COMPLEMENTARITY SYSTEMS
WITH NEURAL NETWORK CONTROLLERS
In this section, we demonstrate that neural networks with rectified
linear units (ReLU) have an equivalent LCP representation. Then,
we show that an LCS combined with a neural network controller
has an alternative complementarity system description.
Definition 5. A ReLU neural network š : Ršš„ ā¦ā Ršš with šæ
hidden layers is the composite function
š(š„) = (āšæ ā¦ šReLU ā¦ āšæā1 ā¦ . . . ā¦ šReLU ā¦ ā0)(š„), (4)
where šReLU(š„) = max{0,š„} is the ReLU activation layer, and
āš (š„) = ššš„ + šš are the affine layers with šš ā Ršš+1Ćšš , šš ā Ršš+1 .
Figure 1: Two-layered neural network with ReLU activation
functions (Example 1).
Here, šš, 1 ā¤ š ā¤ šæ denotes the number of hidden neurons in the š-th
layer, š0 = šš„ , and ššæ+1 = šš . We denote by šš” =
Ćšæ
š=1 šš the total
number of neurons.
3.1 Representing ReLU Neural Networks as
Linear Complementarity Problems
ReLU neural networks are piece-wise affine functions. Similarly,
the linear complementarity problem describes a piece-wise affine
function as shown in (1) as long as š¹ is a P-matrix. In this sec-
tion, we will explore the connection between two piece-wise affine
representations.
It has been shown that ReLU neural networks can be represented
with quadratic constraints [41], [20]. Now, our goal is to show the
connection between these results and linear complementarity prob-
lems. We will describe a method to represent a multi-layered ReLU
neural network as a linear complementarity problem exploring the
cascade connections of complementarity problems [7].
First we consider a single ReLU unit šReLU(š„) = max(0,š„) and
its equivalent LCP representation.
Lemma 1. [26] Consider the following LCP for a given š„ ā Rš:
find šLCP
ā Rš
subject to ĀÆ
š¦ = āš„ + šLCP
,
0 ā¤ šLCP
ā„ ĀÆ
š¦ ā„ 0,
Then šLCP is unique and is given by šLCP = max{0,š„}.
Proof. If š„š < 0, then šLCP
š = 0 and if š„š ā„ 0, then šLCP
š =
š„š. ā”
Next, we consider a two layered neural network and transform
it into an LCP using Lemma 1.
Example 1. Consider a two layered network shown in Figure
1 where š2-layer(š„) = šReLU ā¦ ā1 ā¦ šReLU ā¦ ā0(š„) with ā0(š„) = š„
and ā1(š„) = š2š„ + ĀÆ
š2. An alternative representation is š2-layer(š„)
=
š3(š„)ā¤ š4(š„)ā¤
ā¤
where
š1(š„) = max{0,š„1}, (5)
š2(š„) = max{0,š„2}, (6)
š3(š„) = max{0,š1,1
2 š1(š„) + š1,2
2 š2(š„) + ĀÆ
š1
2}, (7)
š4(š„) = max{0,š2,2
2 š2(š„) + ĀÆ
š2
2}. (8)
4. HSCC ā21, May 19ā21, 2021, Nashville, TN, USA Alp Aydinoglu, Mahyar Fazlyab, Manfred Morari, and Michael Posa
Here šš represents the output of the šth ReLU activation function,
š
š,š
š and ĀÆ
š
š
š represent the coefficients of the affine function. Observe
that the two-layered NN is equivalent to
š3
š4
where š is the unique
solution of the following LCP:
find š ā R4
subject to ĀÆ
š¦1 = āš„1 + š1,
ĀÆ
š¦2 = āš„2 + š2,
ĀÆ
š¦3 = āš1,1
2 š1 ā š1,2
2 š2 ā ĀÆ
š1
2 + š3,
ĀÆ
š¦4 = āš2,2
2 š2 ā ĀÆ
š2
2 + š4,
0 ā¤ š1 ā„ ĀÆ
š¦1 ā„ 0,
0 ā¤ š2 ā„ ĀÆ
š¦2 ā„ 0,
0 ā¤ š3 ā„ ĀÆ
š¦3 ā„ 0,
0 ā¤ š4 ā„ ĀÆ
š¦4 ā„ 0.
Here, {šš }2
š=1 can be represented as šš = max{0,š„š } and {šš }4
š=3
are as in (7), (8) after direct application of Lemma 1. Then, we
conclude that
š3
š4
= š2-layer.
Now, we show that all neural networks of the form (4) have an
equivalent LCP representation.
Lemma 2. For any š„, the ReLU neural network in (4) can be ex-
pressed as š(š„) = ĀÆ
š·š(š„) + ĀÆ
š§, where š(š„) is the unique solution of the
following linear complementarity problem:
find š
subject to ĀÆ
š¦ = ĀÆ
šøš„ + ĀÆ
š¹š + ĀÆ
š,
0 ā¤ š ā„ ĀÆ
š¦ ā„ 0,
where ĀÆ
š =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
āš0
āš1
.
.
.
āššæā1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, ĀÆ
šø =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
āš0
0
.
.
.
0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, the lower triangular matrix
ĀÆ
š¹ =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¼
āš1 š¼
0 āš2 š¼
0 0 āš3 š¼
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0 . . . . . . . . . āššæā1 š¼
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
and ĀÆ
š§ = ĀÆ
ššæ, ĀÆ
š· =
0 0 . . . 0 ššæ
where ĀÆ
š¹ is a P-matrix.
Proof. First, we write šā¤ =
šā¤
0 šā¤
1 Ā· Ā· Ā· šā¤
šæā1
ā R1Ćšš”
where each sub vector šš has the same dimension as ĀÆ
šš. Next, we
show that š0(š„) = šReLU ā¦ ā0(š„). Observe that š0 is independent
of š1, . . . , ššæā1 since š¹ is lower-triangular. Hence š0 is the unique
element of the following LCP:
find š0
subject to ĀÆ
š¦0 = āš0š„ ā ĀÆ
š0 + š0,
0 ā¤ š0 ā„ ĀÆ
š¦0 ā„ 0.
Following Lemma 1, š0(š„) = max{0,ā0(š„)} = šReLU ā¦ ā0(š„).
Similarly, notice that for š 0, šš only depends on ššā1(š„) and is
the unique element of:
find šš
subject to ĀÆ
š¦š = āššššā1(š„) ā ĀÆ
šš + šš,
0 ā¤ šš ā„ ĀÆ
š¦ ā„ 0,
and is equivalent to šš (š„) = šReLU ā¦ āš ā¦ ššā1(š„) as a direct appli-
cation of Lemma 1. Using this equivalency recursively,
ĀÆ
š·š(š„) + ĀÆ
š§ = āšæ ā¦ šReLU ā¦ āšæā1 ā¦ . . . ā¦ šReLU ā¦ ā0(š„).
Notice that ĀÆ
š¹š¼š¼ is lower triangular with ones on the diagonal for
any š¼ such that card(š¼) ā„ 2 hence ĀÆ
š¹ is a P-matrix. ā”
Each neuron in the NN is represented with a complementarity
variable, therefore the dimension of the complementarity vector
(š) is equal to the number of neurons in the network. As seen
in Lemma 2, transforming a ReLU neural network into an LCP
only requires concatenating vectors and matrices. Furthermore,
this transormation allows us to consider the ReLU neural network
controller as an LCP based controller [46].
3.2 Linear Complementarity Systems with
Neural Network Controllers
We will use the LCP representation of the neural network (4) and
describe an LCS with a NN controller as an A-LCS. Consider a linear
complementarity system with a ReLU neural network controller
š¢š = š(š„š):
š„š+1 = š“š„š + šµš(š„š) + Ė
š·Ė
šš + Ė
š§,
Ė
š¦š = Ė
šøš„š + Ė
š¹ Ė
šš + š»š(š„š) + Ė
š,
0 ā¤ Ė
šš ā„ Ė
š¦š ā„ 0,
(9)
where š„š ā Ršš„ is the state, Ė
šš ā RšĖ
š is the complementarity
variable, š(š„) ā Ršš is a ReLU neural network as in (4) with šš”
neurons. Notice that (9) is not in the A-LCS form. Using Lemma 2,
we can transform (9) into an A-LCS in a higher dimensional space.
To see this, observe that (9) is equivalent to
š„š+1 = š“š„š + šµ( ĀÆ
š·ĀÆ
šš + ĀÆ
š§) + Ė
š·Ė
šš + Ė
š§,
Ė
š¦š = Ė
šøš„š + Ė
š¹ Ė
šš + š» ( ĀÆ
š·ĀÆ
šš + ĀÆ
š§) + Ė
š,
ĀÆ
š¦š = ĀÆ
šøš„š + ĀÆ
š¹ ĀÆ
šš + ĀÆ
š,
0 ā¤ Ė
šš ā„ Ė
š¦š ā„ 0,
0 ā¤ ĀÆ
šš ā„ ĀÆ
š¦š ā„ 0,
after direct application of Lemma 2 where ĀÆ
š ā Ršš” . We can write it
succinctly as
š„š+1 = š“š„š + š·šš + š§,
š¦š = šøš„š + š¹šš + š,
0 ā¤ šš ā„ š¦š ā„ 0,
(10)
where šš =
Ė
šš
ĀÆ
šš
, š¦š =
Ė
š¦š
ĀÆ
š¦š
, š· =
Ė
š· šµ ĀÆ
š·
, šø =
Ė
šø
ĀÆ
šø
, š¹ =
Ė
š¹ š» ĀÆ
š·
0 ĀÆ
š¹
, š =
Ė
š + š»ĀÆ
š§
ĀÆ
š
, and š§ = šµĀÆ
š§ + Ė
š§. Here, the size of š„š ā Ršš„
does not change, but notice that now šš ā Ršš where šš = šš” +šĖ
š
.
5. Stability Analysis of Complementarity Systems with Neural Network Controllers HSCC ā21, May 19ā21, 2021, Nashville, TN, USA
Using controllers of the form (4), we exclusively consider the linear
complementarity system model (10) for notational compactness.
Similarly, one can consider the scenario where both the system
dynamics and the controller are represented by ReLU neural net-
works as in š„š+1 = š1(š„š) + šµš2(š„š), where š1 represents the
autonomous part of the dynamics (obtained by, for example, sys-
tem identification) and š2 is the controller. Using Lemma 2, this
system has an equivalent A-LCS representation similar to (10), but
the details are omitted for brevity.
After obtaining an A-LCS representation of the closed-loop sys-
tem, one can directly use the existing tools for stability analysis
of complementarity systems, such as Lyapunov functions [9] and
semidefinite programming [2]. We elaborate on this in the next
section.
4 STABILITY ANALYSIS OF THE
CLOSED-LOOP SYSTEM
In this section, we provide sufficient conditions for stability in the
sense of Lyapunov for an A-LCS. Then, we show that the stability
verification problem is equivalent to finding a feasible solution to
a set of linear matrix inequalities (LMIās). To begin, consider the
following Lyapunov function candidate that was introduced in [9]:
š (š„š, šš) =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š„š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
ā¤ ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š š ā1
šā¤ š ā2
āš
1 āš
2 ā3
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
| {z }
:=š
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š„š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
(11)
where š ā Sšš„ , š ā Ršš„ Ćšš , š ā Sšš , ā1 ā Ršš„ , ā2 ā Ršš , and
ā3 ā R are to be chosen. Note that if š¹ in (10) is a P-matrix, then
šš is a piecewise affine function of š„š, implying that the Lyapunov
function (11) is quadratic in the pair (š„š, šš) but it is piecewise
quadratic (PWQ) in the state š„š. If š¹ is not a P-matrix, then š can
be set valued since there can be multiple ššās corresponding to
each š„š. In either case, š reduces to a common quadratic Lyapunov
function in the special case š = š = 0. Therefore, (11) is more
expressive than a common quadratic Lyapunov function.
In the following theorem, we construct sufficient conditions for
the stability of (10), using the Lyapunov function (11). This is the
discrete time version of the results in [9].
Theorem 2. Consider the A-LCS in (10) with the equilibrium
š„š = 0, the Lyapunov function (11) and a domain X ā Rš. If there
exist š ā Sšš„ +šš+1, š¼1 0, and š¼2 š¼3 ā„ 0 such that
š¼1||š„š ||2
2 ā¤ š (š„š, šš) ā¤ š¼2||š„š ||2
2, ā(š„š, šš) ā Ī1,
š (š„š+1, šš+1) ā š (š„š, šš) ā¤ āš¼3||š„š ||2
2, ā(š„š, šš, šš+1) ā Ī2,
where š„š+1 = š“š„š + š·šš + š§ and
Ī1 = {(š„š, šš) : 0 ā¤ šš ā„ šøš„š + š¹šš + š ā„ 0, š„š ā X},
Ī2 = {(š„š, šš, šš+1) : 0 ā¤ šš ā„ šøš„š + š¹šš + š ā„ 0,
0 ā¤ šš+1 ā„ šøš„š+1 + š¹šš+1 + š ā„ 0, š„š ā X}.
Then the equilibrium is Lyapunov stable if š¼3 = 0 and geometrically
stable if š¼2 š¼3 0.
Proof. Observe that for all (š„š, šš):
š¼1||š„š ||2
2 ā¤ š (š„š, šš) ā¤ š (š„0, š0) ā¤ š¼2||š„0||2
2,
and Lyapunov stability follows. For geometric stability, notice
that Lyapunov decrease condition is equivalent to š (š„š+1, šš+1) ā
š¾š (š„š, šš) ā¤ 0, for some š¾ ā (0, 1). Then
š¼1||š„š ||2
2 ā¤ š (š„š, šš) ā¤ š¾š
š (š„0, š0) ā¤ š¼2š¾š
||š„0||2
2.
The result follows. ā”
Note that we do not require š in (11) to be positive definite to
satisfy the requirements of Theorem 2. In light of this theorem, we
must solve the following feasibility problem to verify that if the
equilibrium of the closed-loop system (10) is stable on X:
find š,š, š ,ā1,ā2,ā3, š¼1, š¼2, š¼3 (12)
s.t. š¼1||š„š ||2
2 ā¤ š (š„š, šš) ā¤ š¼2||š„š ||2
2, for (š„š, šš) ā Ī1,
Īš ā¤ āš¼3||š„š ||2
2, for (š„š, šš, šš+1) ā Ī2,
where Īš = š (š„š+1, šš+1)āš (š„š, šš). In the following proposition,
we turn (12) with X = Rš into an LMI feasibility problem using the
S-procedure [6].
Proposition 1. The following LMIās solve (12) with X = Rš:
š1 ā šš
1š1š1 ā
1
2
(š3,1 + šā¤
3,1) āŖ° 0, (13a)
š2 + šā¤
1 š2š1 +
1
2
(š3,2 + šā¤
3,2) āŖÆ 0, (13b)
š3 + šš
2š3š2 + šš
5š4š5 +
1
2
[(š4 + šā¤
4 ) + (š6 + šā¤
6 )] āŖ° 0, (13c)
where šŗ1 = š·š šš§ +š·š ā1 āā2, šŗ2 = š§š šš· +āš
1 š· āā2, šŗ3 = š§š š +
āš
2 ,š1 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
šø š¹ š
0 š¼ 0
0 0 1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,š2 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
šø š¹ 0 š
0 š¼ 0 0
0 0 0 1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,š3,š =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0 0 0
š½ššø š½šš¹ š½šš
0 0 0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
š4 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0 0 0 0
š½3šø š½3š¹ 0 š½3š
0 0 0 0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, š5 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
šøš“ šøš· š¹š šøšš§ + š
0 0 š¼ 0
0 0 0 1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
š6 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0 0 0 0
š½4šøš“ š½4šøš· š½4š¹ š½4šøš§ + š
0 0 0 0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,š1 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š ā š¼1š¼ š ā1
šā¤ š ā2
āš
1 āš
2 ā3
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
š2 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š ā š¼2š¼ š ā1
šā¤ š ā2
āš
1 āš
2 ā3
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
š3 = ā
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š“š šš“ ā š + š¼3š¼ š“š šš· ā š š“š š š“š šš§ ā ā1
š·š šš“ ā šš š·š šš· ā š š·š š šŗ1
šš š“ šš š· š šš š§ + ā2
š§š šš“ ā āš
1 šŗ2 šŗ3 š§š šš§ ā āš
1š§
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
.
Here, šš are decision variables with non-negative entries, and š½š =
diag(šš) where šš ā Rš are free decision variables.
Proof. First define šā¤
š
=
š„ā¤
š
šā¤
š
1
. By left and right mul-
tiplying both sides of (13a) by šā¤
š
and šš, respectively, we obtain
š (š„š, šš) ā š¼1ā„š„š ā„2
2 ā„
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
ā¤
š1
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
+2šā¤
š diag(š1)š¦š
The right hand side is non-negative due to the complementarity
constraint 0 ā¤ šš ā„ š¦š ā„ 0. Similarly, by left and right multiplying
6. HSCC ā21, May 19ā21, 2021, Nashville, TN, USA Alp Aydinoglu, Mahyar Fazlyab, Manfred Morari, and Michael Posa
both sides of (13b) by šā¤
š
and šš, respectively, we obtain
š¼2ā„š„š ā„2
2 ā š (š„š, šš) ā„
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
ā¤
š2
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
+2šā¤
š diag(š2)š¦š
Again, the right hand side is non-negative due to the complemen-
tarity constraint 0 ā¤ šš ā„ š¦š ā„ 0.
Now, we define šā¤
š
=
š„ā¤
š
šā¤
š
šā¤
š+1
1
. Notice that if we
left and right multiply both sides of (13c) by šā¤
š
and šš, we obtain
āĪš ā š¼3||š„š ||2
2 ā„
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
ā¤
š3
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
+
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š+1
šš+1
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
ā¤
š4
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
š¦š
šš
1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
+2šā¤
š diag(š3)š¦š +2šā¤
š+1 diag(š4)š¦š+1
Similarly, all the terms on the right hand side are non-negative
since 0 ā¤ šš ā„ š¦š ā„ 0 for all š. This concludes the proof. ā”
Notice that (12) captures the non-smooth structure of the LCS
combined with the ReLU neural network controller. In addition to
that, we can assign a different quadratic function to each polyhedral
partition that is created by the neural network without enumerating
those partitions by exploiting the complementarity structure of
the neural network. Observe that (13a), (13b) are LMIās of size
(šš„ + šš + 1), and (13c) is an LMI of size (šš„ + 2šš + 1).
Note that Theorem 13 is a global result for X = Rš. We can adapt
the theorem to bounded regions X containing the origin.
Remark 1. For the equilibrium š„š = 0, the region of attraction is
defined as
R = {š„0 : lim
šāā
||š„š || = 0}.
If one adds (to the left side) +ššæ to (13c) where
šæ =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
āš āš 0 ā1
āšš š 0 āā2
0 0 0 0
āāš
1 āāš
2 0 š ā ā3
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
and š is a non-negative scalar variable, then the closed-loop system is
geometrically stable and the sub-level set
Vš = {š„ : š (š„, š) ā¤ š ā(š„, š) ā Ī1},
is an approximation of the ROA, i.e., Vš ā R. To see this, note that
the resulting matrix inequality would imply
š¼1ā„š„š ā„2
2 ā¤ š (š„š, šš) ā¤ š¼2ā„š„š ā„2
2,
š (š„š+1, šš+1)āš (š„š, šš) + š¼3ā„š„š ā„2
2 + š(š ā š (š„š, šš)) ā¤ 0.
From the second inequality, if š (š„š, šš) ā¤ š, then for some š¾ ā
(0, 1) we have š (š„š+1, šš+1) ā¤ š¾š (š„š, šš) ā¤ š. By induction,
if š (š„0,š¾0) ā¤ š, then š¼1ā„š„š ā„2
2 ā¤ š (š„š,š¾š) ā¤ š¾šš (š„0,š¾0) ā¤
š¾šš¼2ā„š„0ā„2
2.
Remark 2. In order to prove the Lyapunov conditions over the
ellipsoid X = {š„ : š„š šš„ ā¤ š}, one can add (to the left side) āš½1š1
to (13a), +š½2š1 to (13b) and +š½3š2 to (13c) where
š1 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
āš 0 0
0 0 0
0 0 š
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, š2 =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
āš 0 0 0
0 0 0 0
0 0 0 š
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,
and š½š are non-negative scalar variables.
Figure 2: Block diagram of the closed-loop system.
5 EXAMPLES
We use YALMIP [32] toolbox with MOSEK [35] to formulate and
solve the linear matrix inequality feasibility problems. PATH [15]
has been used to solve the linear complementarity problems when
simulating the system. PyTorch is used for training neural network
controllers [38]. The experiments are done on a desktop computer
with the processor Intel i7-9700 and 16GB RAM unless stated oth-
erwise. For all of the experiments, we consider the closed-loop
system in Figure 2 and the linear-quadratic regulator controller is
designed with state penalty matrix šLQR = 10š¼ and input penalty
matrix š LQR = š¼ unless stated otherwise. Now, we introduce the
mixed-integer problem for (2) that connects the complementarity
constraints into equivalent big-M mixed integer constraints:
min
š„š,šš,š¢š
šā1
āļø
š=0
š„š
š šOPT
š„š + š¢š
š š OPT
š¢š + š„š
š šOPT
š š„š
s.t. š„š+1 = š“š„š + šµš¢š + š·šš + š§,
š1š š ā„ šøš„š + š¹šš + š»š¢š + š ā„ 0,
š2(1 ā š š) ā„ šš ā„ 0,
š š ā {0, 1}š
,š„0 = š„(0),
(14)
where 1 is a vector of ones, and š1, š2 are scalars that are used
for the big M method. Moving forward, we will consider function
šOPT(š„(0)) that returns the first element of the optimal input se-
quence, š¢ā
0, for a given š„(0) and learn this function using a neural
network š(š„). The code for all examples is available1.
1https://github.com/AlpAydinoglu/sverification
Figure 3: Neural network (š) policy for the double-integrator
example.
7. Stability Analysis of Complementarity Systems with Neural Network Controllers HSCC ā21, May 19ā21, 2021, Nashville, TN, USA
Figure 4: Sublevel sets of the piece-wise quadratic Lyapunov
functionš (š„š, šš) with four different trajectories for the dou-
ble integrator example. A sublevel set that lies in the con-
straint set is shown in blue.
5.1 Double Integrator
In this example, we consider a double integrator model:
š„š+1 = š“š„š + šµš¢š,
where Ė
š“ =
1 1
0 1
, šµ =
0.5
1
, and š“ = Ė
š“ + šµš¾LQR, where LQR
gains are šLQR = 0.1š¼ and š LQR = 1. This simple model serves as
an example where we approximate an explicit model predictive
controller (explicit MPC) [4] using a neural network and verify the
stability of the resulting system. We consider the state and input
constraints:
X = {š„ :
ā4
ā4
ā¤ š„ ā¤
4
4
}, U = {š¢ : ā3 ā¤ š¢ ā¤ 3},
and obtain 2000 samples of the form (š„, šMPC(š„)) with š = 10,
šMPC = 10š¼, and š MPC = 1 where šMPC is the penalty on the
state, š MPC is the penalty on the input and šMPC(š„) is the first
element of the optimal input sequence for a given state š„ [5]. Next
we approximate the explicit MPC controller using a ReLU network
š(š„) with two layers and 10 neurons in each layer as in Figure 3.
Now, consider the closed-loop system:
š„š+1 = š“š„š + šµš(š„š). (15)
First, we find the equivalent LCP representation of š(š„) using
Lemma 2. Then, we write the equivalent LCS representation of (15)
Figure 5: Envelopes for 1000 trajectories and their corre-
sponding Lyapunov functions (in gray) with a sample trajec-
tory (in black) for the double integrator example.
Figure 6: Regulation task of a cart-pole system exploiting
contact with the soft walls.
as described in Section 3.2. We computed the piece-wise quadratic
Lyapunov function of the form (11) and verified exponential stabil-
ity in 0.81 seconds. The sublevel sets of the Lyapunov functions are
plotted in Figure 4 and the envelopes of 1000 trajectories with their
corresponding Lyapunov functions in Figure 5.
5.2 Cart-pole with Soft Walls
We consider the regulation problem of a cart-pole with soft-walls
as in Figure 6. This problem has been studied in [3, 14, 33] and is
a benchmark in contact-based control algorithms. In this model,
š„1 represents the position of the cart, š„2 represents the angle of
the pole and š„3, š„4 are their time derivatives respectively. Here,
š1 and š2 represent the contact force applied by the soft walls to
the pole from the right and left walls, respectively. We consider the
linearized model around š„2 = 0:
Ā¤
š„1 = š„3,
Ā¤
š„2 = š„4,
Ā¤
š„3 = š
šš
šš
š„2 +
1
šš
š¢1,
Ā¤
š„4 =
š(šš + šš)
ššš
š„2 +
1
ššš
š¢1 +
1
ššš
š1 ā
1
ššš
š2,
0 ā¤ š1 ā„ šš„2 ā š„1 +
1
š1
š1 + š ā„ 0,
0 ā¤ š2 ā„ š„1 ā šš„2 +
1
š2
š2 + š ā„ 0,
where šš = 1 is the mass of the cart, šš = 1 is the mass of the
pole, š = 1 is the length of the pole, š1 = š2 = 1 are the stiffness
parameter of the walls, š = 1 is the distance between the origin and
the soft walls. Then, we discretize the dynamics using the explicit
Euler method with time stepšš = 0.1 to obtain the system matrices:
Ė
š“ =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
1 0 0.1 0
0 1 0 0.1
0 0.981 1 0
0 1.962 0 1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, šµ =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0
0
0.1
0.1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, Ė
š· =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0 0
0 0
0 0
0.1 ā0.1
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, Ė
šø =
ā1 1 0 0
1 ā1 0 0
, Ė
š¹ =
1 0
0 1
, Ė
š =
1
1
, š“ = Ė
š“ + šµš¾šæšš and,
š¾šæšš is the gain of the linear-quadratic regulator that stabilizes
the linear system ( Ė
š“, šµ). However, the equilibrium š„š = 0 is not
globally stable due to the soft walls. We solve the optimal control
8. HSCC ā21, May 19ā21, 2021, Nashville, TN, USA Alp Aydinoglu, Mahyar Fazlyab, Manfred Morari, and Michael Posa
Figure 7: Envelopes for 1000 trajectories and the correspond-
ing Lyapunov functions (in gray) with a sample trajectory
(in black) for the cart-pole example.
problem (14) with š = 10, šOPT = 10š¼, š OPT = 1, and šOPT
š as
the solution of the discrete algebraic Riccati equation to generate
samples of the form (š„, šOPT(š„)). For this particular problem, we
generate 4000 samples and we train a neural network š(š„) with two
layers, each with 10 neurons, to approximate the optimal controller
šOPT and we used the ADAM optimizer to do the training. Then, we
analyze the linear complementarity system with the neural network
controllerš¢š = š(š„š). Following the procedure in Section 3, we first
express the neural network as a linear complementarity problem
using Lemma 2 and then transform the LCS with the NN controller
into the form (10). We compute a Lyapunov function of the form
(11) in 1.61 seconds that verifies that the closed-loop system with
the neural network controller š(š„) is globally exponentially stable.
For this example, a common Lyapunov function is enough to verify
stability. In Figure 7, we present the envelopes for 1000 trajectories.
5.3 Box with Friction
In this example, we consider the regulation task of a box on a surface
as in Figure 8. This simple model serves as an example where the
contact forces šš are not unique due to Coulomb friction between
the surface and the box. Here, š„1 is the position of the cart, š„2 is the
velocity of the cart, š¢ is the input applied to the cart, š = 9.81 is the
gravitational acceleration, š = 1 is the mass of the cart, and š = 0.1
is the coefficient of friction between the cart and the surface. The
system can be modeled by:
š„š+1 = š“š„š + šµš¢š + Ė
š·Ė
šš,
0 ā¤ Ė
šš ā„ Ė
šøš„š + Ė
š¹ Ė
šš + š»š¢š + Ė
š ā„ 0,
(16)
Figure 8: Regulation task of a box on a surface with friction.
Figure 9: Sublevel sets of the piece-wise quadratic Lyapunov
function š (š„š, šš) with four different trajectories for the box
with friction example.
where Ė
š“ =
1 0.1
0 1
, šµ =
0
0.1
, Ė
š· =
0 0 0
0.1 ā0.1 0
, ĀÆ
šø =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0 1
0 ā1
0 0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, Ė
š¹ =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
1 ā1 1
ā1 1 1
ā1 ā1 0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, Ė
š =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
0
0
0.981
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
,š» =
ļ£®
ļ£Æ
ļ£Æ
ļ£Æ
ļ£Æ
ļ£°
1
ā1
0
ļ£¹
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£ŗ
ļ£»
, Ė
šø = ĀÆ
šø +š»š¾šæšš ,
š“ = Ė
š“ + šµš¾šæšš and, š¾šæšš is the gain that (the linear-quadratic
regulator controller) stabilizes the linear system ( Ė
š“, šµ). Observe
that the matrix Ė
š¹ is not a P-matrix, hence for a given š„š, the con-
tact forces šš are not unique. Similar to the previous example, we
generate 2000 samples (š„, šOPT(š„)) for the LCS in (16) with š = 5,
šOPT = šOPT
š = 0.1, š OPT = 1 and train a neural network š(š„)
that approximates the optimal controller. Then we convert the sys-
tem in (16) with the neural network controller š(š„) into the form
(10). Next, we compute the piece-wise quadratic Lyapunov function
(with sublevel sets shown in Figure 9) of the form (11) in 1.05 sec-
onds such that the exponential stability condition is verified outside
a ball around the origin, D = {š„ : ||š„||2
2 0.6}. More precisely, we
prove convergence to a set (smallest sublevel set of š that contains
D) which contains the equilibrium. This is expected because the
trajectories do not reach the origin due to stiction. We demonstrate
the envelopes for 1000 trajectories and their respective Lyapunov
functions in Figure 10.
Figure 10: Envelopes for 1000 trajectories and the correspond-
ing Lyapunov functions (in gray) with a sample trajectory
(in black) for the box with friction example.
9. Stability Analysis of Complementarity Systems with Neural Network Controllers HSCC ā21, May 19ā21, 2021, Nashville, TN, USA
Figure 11: Regulation task of five carts to their respective
origins.
5.4 Five Carts
We consider the regulation task of five carts as in Figure 11. Here
š„š describes the state of the š-th cart, the interaction between the
carts is modeled by soft springs represented by šš, and all carts can
be controlled via the applied force š¢š. We approximate Newtonsās
second law with a force balance equation and obtain the following
quasi-static model:
š„
(1)
š+1
= š„
(1)
š
+ š¢
(1)
š
ā š
(1)
š
,
š„
(š)
š+1
= š„
(š)
š
+ š¢
(š)
š
ā š
(šā1)
š
ā š
(š)
š
, for š = 2, 3, 4,
š„
(5)
š+1
= š„
(5)
š
+ š¢
(5)
š
+ š
(4)
š
,
0 ā¤ š
(š)
š
ā„ š„
(š+1)
š
ā š„
(š)
š
+ š
(š)
š
ā„ 0.
We designed an LQR controller with with state penalty matrix
šLQR = š¼ and input penalty matrix š LQR = š¼. Then, we solve the
optimal control problem (14) with š = 10, šOPT = šOPT
š = 10š¼,
and š OPT = 1 to generate 2000 samples of the form (š„, šOPT(š„)).
Using these samples, we train š(š„) with two layers of size 10 and
express the neural network as a linear complementarity problem
using Lemma 2.
We compute a piece-wise quadratic Lyapunov function of the
form (11) in 1.63 seconds (sub-level sets as in Figure 12) that verifies
that the closed-loop system with the neural network controllerš(š„)
is globally exponentially stable outside a ball D = {š„ : ||š„||2
2 0.1}.
We also verified that there is not a common Lyapunov function
that satisfies the LMIās in (13). We note that a common Lyapunov
function that satisfies Theorem 2 might exist, but no such function
satisfies our relaxation in (13). On the other hand, this demonstrates
the importance of searching over a wider class of functions. In
Figure 13, we present the envelopes for 1000 trajectories and the
Figure 12: Sublevel sets of the piece-wise quadratic Lyapunov
function for the five carts example on the planes P1 = {š„ :
š„1 = š„3 = š„5 = 0} and P2 = {š„ : š„1 = š„2 = š„4 = 0} respectively.
Figure 13: Envelopes for 1000 trajectories and the correspond-
ing Lyapunov functions (in gray) with a sample trajectory
(in black) for the five carts example.
corresponding Lyapunov functions. We note that memory is the
limiting factor in terms of scalability of our method and present
scalability tests in Table 1.
6 CONCLUSION AND FUTURE WORK
In this work, we have shown that neural networks with ReLU
activation functions have an equivalent linear complementarity
problem representation. Furthermore, we have shown that a linear
complementarity system with a ReLU neural network controller
can be transformed into an LCS with a higher dimensional com-
plementarity variable than the original system. This allows one to
use the existing literature on linear complementarity systems when
analyzing an LCS with NN controller with ReLU activations.
Towards this direction, we have derived the discrete-time version
of the stability results in [9] and shown that searching for a Lya-
punov function for an LCS with ReLU NN controller is equivalent
to finding a feasible solution to a set of linear matrix inequalities.
The proposed method exploits the complementarity structure of
both the system and the NN controller and avoids enumerating the
exponential number of potential modes. We have also demonstrated
the effectiveness of our method on numerical examples, including
a difference inclusion model.
As future work, we are planning to explore tools from algebraic
geometry that use samples instead of the S-procedure terms which
result in a stronger relaxation [12]. Also, we consider using passiv-
ity results [34] in order to develop algorithms that can verify the
stability for larger neural networks. At last, it is of interest to learn
stabilizing neural network controllers utilizing the complementar-
ity viewpoint.
RAM Number of neurons Solve time
8GB RAM 20 2.1 seconds
8GB RAM 60 194.72 seconds
8GB RAM 100 OOM
16GB RAM 100 1364.78 seconds
16GB RAM 140 OOM
Table 1: Scalability tests.
10. HSCC ā21, May 19ā21, 2021, Nashville, TN, USA Alp Aydinoglu, Mahyar Fazlyab, Manfred Morari, and Michael Posa
ACKNOWLEDGMENTS
The authors would like to thank Yike Li (University of Pennsylvania)
for the code that computes the optimal control sequence for the cart-
pole example. This work was supported by the National Science
Foundation under Grant No. CMMI-1830218.
REFERENCES
[1] Brandon Amos and J Zico Kolter. Optnet: Differentiable optimization as a layer
in neural networks. arXiv preprint arXiv:1703.00443, 2017.
[2] Alp Aydinoglu, Victor M Preciado, and Michael Posa. Contact-aware controller
design for complementarity systems. In 2020 IEEE International Conference on
Robotics and Automation (ICRA), pages 1525ā1531. IEEE, 2020.
[3] Alp Aydinoglu, Victor M Preciado, and Michael Posa. Stabilization of comple-
mentarity systems via contact-aware controllers. arXiv preprint arXiv:2008.02104,
2020.
[4] Alberto Bemporad, Manfred Morari, Vivek Dua, and Efstratios N Pistikopoulos.
The explicit linear quadratic regulator for constrained systems. Automatica,
38(1):3ā20, 2002.
[5] Francesco Borrelli, Alberto Bemporad, and Manfred Morari. Predictive control for
linear and hybrid systems. Cambridge University Press, 2017.
[6] Stephen Boyd, Laurent El Ghaoui, Eric Feron, and Venkataramanan Balakrishnan.
Linear matrix inequalities in system and control theory. SIAM, 1994.
[7] Bernard Brogliato. Some perspectives on the analysis and control of complemen-
tarity systems. IEEE Transactions on Automatic Control, 48(6):918ā935, 2003.
[8] Bernard Brogliato and B Brogliato. Nonsmooth mechanics. Springer, 1999.
[9] M Kanat Camlibel, Jong-Shi Pang, and Jinglai Shen. Lyapunov stability of comple-
mentarity and extended systems. SIAM Journal on Optimization, 17(4):1056ā1101,
2007.
[10] Shaoru Chen, Mahyar Fazlyab, Manfred Morari, George J Pappas, and Victor M
Preciado. Learning lyapunov functions for piecewise affine systems with neural
network controllers. arXiv preprint arXiv:2008.06546, 2020.
[11] Steven Chen, Kelsey Saulnier, Nikolay Atanasov, Daniel D Lee, Vijay Kumar,
George J Pappas, and Manfred Morari. Approximating explicit model predictive
control using constrained neural networks. In 2018 Annual American control
conference (ACC), pages 1520ā1527. IEEE, 2018.
[12] Diego Cifuentes and Pablo A Parrilo. Sampling algebraic varieties for sum of
squares programs. SIAM Journal on Optimization, 27(4):2381ā2404, 2017.
[13] Richard W Cottle, Jong-Shi Pang, and Richard E Stone. The linear complementarity
problem. SIAM, 2009.
[14] Robin Deits, Twan Koolen, and Russ Tedrake. Lvis: Learning from value function
intervals for contact-aware robot controllers. In 2019 International Conference on
Robotics and Automation (ICRA), pages 7762ā7768. IEEE, 2019.
[15] Steven P Dirkse and Michael C Ferris. The path solver: a nommonotone stabi-
lization scheme for mixed complementarity problems. Optimization methods and
software, 5(2):123ā156, 1995.
[16] Asen Dontchev and Frank Lempio. Difference methods for differential inclusions:
a survey. SIAM review, 34(2):263ā294, 1992.
[17] Souradeep Dutta, Xin Chen, Susmit Jha, Sriram Sankaranarayanan, and Ashish
Tiwari. Sherlock-a tool for verification of neural network feedback systems:
demo abstract. In Proceedings of the 22nd ACM International Conference on Hybrid
Systems: Computation and Control, pages 262ā263, 2019.
[18] Jiameng Fan, Chao Huang, Xin Chen, Wenchao Li, and Qi Zhu. Reachnn*: A tool
for reachability analysis of neural-network controlled systems. In International
Symposium on Automated Technology for Verification and Analysis, pages 537ā542.
Springer, 2020.
[19] Mahyar Fazlyab, Manfred Morari, and George J Pappas. Probabilistic verification
and reachability analysis of neural networks via semidefinite programming. In
2019 IEEE 58th Conference on Decision and Control (CDC), pages 2726ā2731. IEEE,
2019.
[20] Mahyar Fazlyab, Manfred Morari, and George J Pappas. Safety verification and
robustness analysis of neural networks via quadratic constraints and semidefinite
programming. arXiv preprint arXiv:1903.01287, 2019.
[21] Mahyar Fazlyab, Alexander Robey, Hamed Hassani, Manfred Morari, and George
Pappas. Efficient and accurate estimation of lipschitz constants for deep neural
networks. In Advances in Neural Information Processing Systems, pages 11427ā
11438, 2019.
[22] Daniel Goeleven and Bernard Brogliato. Stability and instability matrices for
linear evolution variational inequalities. IEEE Transactions on Automatic Control,
49(4):521ā534, 2004.
[23] Tuomas Haarnoja, Sehoon Ha, Aurick Zhou, Jie Tan, George Tucker, and Sergey
Levine. Learning to walk via deep reinforcement learning. arXiv preprint
arXiv:1812.11103, 2018.
[24] Mathew Halm and Michael Posa. A quasi-static model and simulation approach
for pushing, grasping, and jamming. In International Workshop on the Algorithmic
Foundations of Robotics, pages 491ā507. Springer, 2018.
[25] Wilhemus PMH Heemels, Bart De Schutter, and Alberto Bemporad. Equivalence
of hybrid dynamical models. Automatica, 37(7):1085ā1091, 2001.
[26] WPMH Heemels, Johannes M Schumacher, and S Weiland. Linear complemen-
tarity systems. SIAM journal on applied mathematics, 60(4):1234ā1269, 2000.
[27] Michael Hertneck, Johannes Kƶhler, Sebastian Trimpe, and Frank Allgƶwer. Learn-
ing an approximate model predictive controller with guarantees. IEEE Control
Systems Letters, 2(3):543ā548, 2018.
[28] Luigi Iannelli, Raffaele Iervolino, and Francesco Vasca. Linear complementarity
systems and cone-copositive lyapunov stability. IEEE Control Systems Letters,
3(4):799ā804, 2019.
[29] Benjamin Karg and Sergio Lucia. Efficient representation and approximation of
model predictive control laws via deep learning. IEEE Transactions on Cybernetics,
50(9):3866ā3878, 2020.
[30] Benjamin Karg and Sergio Lucia. Stability and feasibility of neural network-based
controllers via output range analysis. arXiv preprint arXiv:2004.00521, 2020.
[31] Hassan K Khalil and Jessy W Grizzle. Nonlinear systems, volume 3. Prentice hall
Upper Saddle River, NJ, 2002.
[32] Johan Lofberg. Yalmip: A toolbox for modeling and optimization in matlab.
In 2004 IEEE international conference on robotics and automation (IEEE Cat. No.
04CH37508), pages 284ā289. IEEE, 2004.
[33] Tobia Marcucci and Russ Tedrake. Warm start of mixed-integer programs for
model predictive control of hybrid systems. IEEE Transactions on Automatic
Control, 2020.
[34] Felix A Miranda-Villatoro, Fulvio Forni, and Rodolphe Sepulchre. Dominance
analysis of linear complementarity systems. arXiv preprint arXiv:1802.00284,
2018.
[35] APS Mosek. The mosek optimization software. Online at http://www. mosek. com,
54(2-1):5, 2010.
[36] Brendan OāDonoghue. Operator splitting for a homogeneous embedding of the
monotone linear complementarity problem. arXiv preprint arXiv:2004.02177, 2020.
[37] Thomas Parisini and Riccardo Zoppoli. A receding-horizon regulator for nonlin-
ear systems and a neural approximation. Automatica, 31(10):1443ā1451, 1995.
[38] Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang,
Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer.
Automatic differentiation in pytorch. 2017.
[39] Michael Posa, Cecilia Cantu, and Russ Tedrake. A direct method for trajectory
optimization of rigid bodies through contact. The International Journal of Robotics
Research, 33(1):69ā81, 2014.
[40] Michael Posa, Mark Tobenkin, and Russ Tedrake. Stability analysis and control
of rigid-body systems with impacts and friction. IEEE Transactions on Automatic
Control, 61(6):1423ā1437, 2015.
[41] Aditi Raghunathan, Jacob Steinhardt, and Percy S Liang. Semidefinite relax-
ations for certifying robustness to adversarial examples. In Advances in Neural
Information Processing Systems, pages 10877ā10887, 2018.
[42] Stefan Scholtes. Introduction to piecewise differentiable equations. Springer Science
Business Media, 2012.
[43] Chelsea Sidrane and Mykel J Kochenderfer. Overt: Verification of nonlinear
dynamical systems with neural network controllers via overapproximation. In
Safe Machine Learning workshop at ICLR, 2019.
[44] Georgi V Smirnov. Introduction to the theory of differential inclusions, volume 41.
American Mathematical Soc., 2002.
[45] David E Stewart and Jeffrey C Trinkle. An implicit time-stepping scheme for
rigid body dynamics with inelastic collisions and coulomb friction. International
Journal for Numerical Methods in Engineering, 39(15):2673ā2691, 1996.
[46] Aneel Tanwani, Bernard Brogliato, and Christophe Prieur. Well-posedness and
output regulation for implicit time-varying evolution variational inequalities.
SIAM Journal on Control and Optimization, 56(2):751ā781, 2018.
[47] Hoang-Dung Tran, Xiaodong Yang, Diego Manzanas Lopez, Patrick Musau,
Luan Viet Nguyen, Weiming Xiang, Stanley Bak, and Taylor T Johnson. Nnv:
The neural network verification tool for deep neural networks and learning-
enabled cyber-physical systems. In International Conference on Computer Aided
Verification, pages 3ā17. Springer, 2020.
[48] Zhaoming Xie, Glen Berseth, Patrick Clary, Jonathan Hurst, and Michiel van de
Panne. Feedback control for cassie with deep reinforcement learning. In 2018
IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages
1241ā1246. IEEE, 2018.
[49] He Yin, Peter Seiler, and Murat Arcak. Stability analysis using quadratic
constraints for systems with neural network controllers. arXiv preprint
arXiv:2006.07579, 2020.
[50] Xiaojing Zhang, Monimoy Bujarbaruah, and Francesco Borrelli. Safe and near-
optimal policy learning for model predictive control using primal-dual neural
networks. In 2019 American Control Conference (ACC), pages 354ā359. IEEE, 2019.
[51] Henry Zhu, Abhishek Gupta, Aravind Rajeswaran, Sergey Levine, and Vikash
Kumar. Dexterous manipulation with deep reinforcement learning: Efficient,
general, and low-cost. In 2019 International Conference on Robotics and Automation
(ICRA), pages 3651ā3657. IEEE, 2019.