Code Monkey home page Code Monkey logo

adaptmc's Introduction

AdaptMC

This code refers to the artifact developed in support of the paper

Alessandro Vittorio Papadopoulos, Enrico Bini, Sanjoy Baruah, and Alan Burns, ``AdaptMC: Control Theory for Mixed-Criticality Systems'', in Proceedings of the 30th Euromicro Conference on Real-Time Systems (ECRTS 2018)

Requirements

We implemented the results presented in the paper by using Matlab, using mostly basic functions, and few functions included in the Control System Toolbox. We used Wolfram Mathematica to symbolically analyze, and compute the stability region presented in Figure 2. In particular, the following are the main requirements:

  • Matlab R2016a or higher: We tested the codes on Matlab R2016a, R2016b, R2017a, but the lower is not confirmed.

  • Control System Toolbox of Matlab.

  • For Figure 2, the symbolic expressions are obtained in Matlab, but the regions have been obtained with Wolfram Mathematica. In order to reproduce such graph the following alternatives can be used:

Generate Figure 2

The generation of Figure 2 requires the execution of the following code, contained in the stability.m file.

clear; clc;
% Definition of symbolic variables
syms Khh Khl Kll Klh real
syms z

% Dynamic matrix of AdaptMC
A = [zeros(2,2), eye(2);
     -Khh, -Khl,   1, 0;
        0, -Kll,-Klh, 1];
 
% Computation of the characteristic polynomial
p = charpoly(A,z);

% Extraction of the coefficient of the characteristic polynomial
c1 = coeffs(p,z);
c2 = c1(end:-1:1);  % Reordering the coefficients

% Computation of the Jury chart
[J,C] = jury(c2)

The variable C contains the coefficients "of interest", i.e., the entries of the first column with uneven row-indices. J contains the whole Jury chart.

Theoreom The eigenvalues of the matrix A lie in the unit circle if and only if the coefficients in C are greater than zero. Moreover, if non of these is zero, then the number of negative entries gives the number of roots outside the unit disc.

The jury.m function is not part of the standard library of Matlab, or of the Control System Toolbox, but it can be found at this link.

Plugging the coefficients of C in a symbolic manipulation tool, allow the calculation. In order to obtain Figure 2, we used Wolfram Mathematica, but a Computable Document Format is also provided.

Generate Figure 5

In order to generate Figure 5, execute the function generateFigure5.m. There is a toggle variable SAVE, that if set to 1, saves the data generated by the script. The script makes use of the function csvwrite_with_headers, available at this link.

Generate Figure 6

In order to generate Figure 6, execute the function generateFigure6.m. There is a toggle variable SCENARIO that can be used to evaluate the different systems under different disturbance scenarios.

Scenario 1 generates Figure 6.

There is also a toggle variable SAVE, that if set to 1, saves the data generated by the script.

Generate Figure 7

In order to generate Figure 7, execute the function generateFigure7.m. There is a toggle variable SCENARIO that can be used to evaluate the different systems under different disturbance scenarios, with the same meaning as for Figure 6.

There is also a toggle variable SAVE, that if set to 1, saves the data generated by the script.

Finally, there is a toggle variable GAIN, that decides what is the value of the set of gains to use, as described in the paper.

GAIN=1 generates what is presented in Figure 7, with SCENARIO=4.

Contacts

  • Alessandro Papadopoulos (name dot surname at mdh dot se)
  • Enrico Bini
  • Sanjoy Baruah
  • Alan Burns

adaptmc's People

Contributors

apapadopoulos avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.