Hard Real Time embedded solution for Execution Time analysis of non-linear control laws 1 st Andrea Bonci Dept. of Information Engineering Universit` a Politecnica delle Marche Ancona, Italy a.bonci@univpm.it 2 th Giacomo Nabissi Dept. of Information Engineering Universit` a Politecnica delle Marche Ancona, Italy g.nabissi@univpm.it 3 th Giuseppe Antonio Scala Dept. of Information Engineering Universit` a Politecnica delle Marche Ancona, Italy g.a.scala@pm.univpm.it Abstract—In Soft Real-Time (SRT) or Hard Real-Time (HRT) applications, the behaviour of the computing system must be predictable at design phase because it impacts on the design itself. Nowadays, hardware architectures are able to provide higher performance and guarantee temporal determinism but few works investigate the computational effort required by control algorithms implementation. This preliminary work aims to be a first step towards a novel analysis of performances and Worst-Case Execution Time (WCET) which can be useful to compare different control techniques and for evaluating also the complexity of the algorithms. To this purpose, a mobile robot consisting of motorized cart-pendulum has been built and it has been equipped with an HRT hardware platform where a nonlinear State Dependent Riccati Equation (SDRE) technique has been implemented. Index Terms—Nonlinear control, UGV, Hard Real-Time im- plementation, control algorithm analysis, WCET analysis. I. I NTRODUCTION Nowadays, industrial automation systems or autonomous systems, can incorporate more sensors and more powerful controllers. Moreover, the SRT or HRT nature of these kind of systems makes it crucial that future architectures are able to provide higher performance and guarantee temporal determinism, especially regarding Industry 4.0 issues [1] [2]. Therefore, the behaviour of the computing system must be predictable at design phase and the need of predictability has significant impacts on the design itself [3]. In order to satisfy these temporal constrains and guarantee correctly working of the system, research on timing analysis of Real Time (RT) systems started many years ago and has have been focused on the Response Time Analysis (RTA) [4], [5]. However, it is still difficult to analyse a real system using those methods because of the unpredictable randomness of the CPU which cannot be accurately modelled. Because of these lack, nowadays, HRT requirements are solved via hardware, using multi- cores embedded boards that allows the computation of the deterministic execution time. The availability of this embedded architecture, has encouraged the designers to define new ways This work is funded by: the EU H2020 ENCORE project, GA No. 820434, by the REACT (REACTive Product Design and Manufacturing) project from Italian National Ministry of Economic Development-MISE, and by the EU ERDF, POR MARCHE region FESR 2014/2020–AXIS 1–Specific Objective 2–ACTION 2.1,“HD3Flab-Human Digital Flexible Factory of the Future Laboratory”. to evaluate control algorithms efficiency, not only analysing performances but also evaluating a tight WCET of the control algorithms implementation. Indeed, this area still lacks of deeply investigations. Very few works have been devoted to the implementation and performance evaluation of control algorithms on deterministic multi-core platforms [6] and there are no works focused on the control algorithms analysis from the point of view of performances and deterministic execution time needed. This assertion is especially valid for nonlinear controls, which typically requires even more computation effort and strict determinism for real time applications. This preliminary work aims to be a first step towards a novel analysis of performances and WCET useful to compare further different control techniques and for evaluating also the algo- rithms complexity. To this purpose, a mobile robot consisting of motorized four-wheeled cart-pendulum has been built with an inverted pendulum on the top and it has been equipped with an HRT hardware platform where a nonlinear SDRE controller has been implemented. The preliminary results obtained are encouraging and the possibility of evaluating new features to improve the choice amongst various control techniques may turn out very helpful. This especially in recent applications such as cyber physical systems, where the execution time taken by the control algorithm must be known at the design stage to guarantee performances in the Factories of the Future [7] [8] [9]. II. CART- PENDULUM ROBOT MODEL In this section are briefly presented the fundamental steps used to derive the model of the cart-pendulum in discrete time linear-like form used in simulations and to derive the control law, as proposed also in [10]. Starting from the classic nonlinear model representation of the cart-pendulum system as below: (m + M )¨ x + b ˙ x + mL ¨ φ cos(φ) - mL ˙ φ 2 sin(θ)= F - m L cos(φ)¨ x - (J p + mL 2 ) ¨ φ + m g L sin(φ)=0 (1) where the variable φ = π - θ represent the angle deviation from the upper vertical axis and positive counter-clockwise, as shown in Figure 1, x represents the longitudinal displacement of the cart and F is the sum of forces applied to the