When Artificial Intelligence (AI) shakes hands with Modern Control Theory

Livio Mariano_20459
Livio Mariano_20459
Altair Employee
edited December 2021 in Other Discussion & Knowledge

Abstract

In this article, we’ll introduce a novel AI-based application, romAI, used for the generation of real-time compliant dynamic models from data. We will demonstrate using a real kit, how this innovative technology can support the design of an optimal controller without the need to deal with any equation or performing any measurement but only starting from 110 seconds of data acquisition.  

Introduction

Modern Control Theory relies on the state-space representation of dynamical systems. It represents a set of techniques which enable to leverage the knowledge of the mathematical formulation describing a physical system to better design its controller and reach the desired performance.

Let’s proceeding step by step.

Mathematically speaking, a dynamical system is a system where its output (vector y) depends by its input (vector u), its state (vector x) and a set of characteristic parameters ϴ:

image

The state-space representation of a system is a convenient way, in time-domain, to represent multiple-input multiple-output (MIMO) systems through a set of first-order differential equations:

image

When the dynamical system is linear or when a non-linear system is linearized, the state-space formulation can be written in a matrix form hence we can identify A, B, C and D respectively the state, input, output and feedforward matrix:

image

Optimal control technique is one of those belonging to the Modern Control strategies and is based on the linear (or linearized) formulation of a dynamical system since it uses the state matrixes A,B,C,D as starting point.  Clearly, the better the numerical model of the system made by the state matrixes approximates the real behavior of the system, the better the designed control will be.

In summary, we need the mathematical formulation underlying the system to design its optimal controller.


The Challenge

But... what if we don’t have any mathematical formulation available?

Possible reasons:

  • The system is too complex
  • Missing expertise on the subject
  • Small amount of time available


Can Artificial Intelligence cover our lack of knowledge helping us to adopt an advanced control technique without having any clue on equations, perform any measurement and starting from a few number of simulations or tests?


romAI application

 

In Altair we have developed a novel application: romAI.

This application combines Artificial Intelligence and system modeling techniques to generate from data, reusable continuous dynamic models extremely time-efficient. These models can be used as Reduced-Order Models to speed-up system design and optimization analyses or as foundation for Digital Twins in real-time and control applications like for this challenge.    

The tool is mainly made up of:

  • A GUI used for the generation of romAI, available in both Altair Compose® and Altair Activate®:

image

  • A block which enables the use of the romAI generated, available in Altair Activate®:

image

The romAI block can be used in Altair Activate® directly as well as exported in a licensed FMU or dll for third parties use.


Ball and Balancing Table (BBT)

To take up the challenge we have used the BBT from ACROME:

image

The BBT is a tilted table controlled to make the ball follow a specific trajectory.

The input is represented by the rotation of the 2 arms of the 2 servomotors which tilt the table affecting the ball movement. The table is made up by a touchscreen able to provide information on the location of the ball placed on it.  

Workflow

We’ve followed a 3-step workflow:

  • Data generation
  • System Identification and Control Design
  • Testing

image

It took less than 5 hours to accomplish them all!

To generate the needed data, we have been playing for 110 seconds with the BBT rotating the 2 arms of the servos to randomly move the ball on the table, without the need to define a specific strategy:


 image

Was it really all we needed?

Yes! Only 110 seconds were enough for our need!

We have then saved the data into a csv file and fed with it the romAI GUI for the generation of the dynamic system:


Once the romAI was generated, we have leveraged the built-in linearization feature inside Altair Activate® to automatically obtain the state matrixes A,B,C,D.


Then we can leverage the lqr function of the control library to design the optimal controller.

image

And voila, we are now ready to test the controller!!!

We tested it providing as reference an 8-shaped trajectory and 2 diagonal ones.




image




image



image

The designed controller was able to drive the ball along the desired path.

Conclusion

  • A proper model of the system has been identified starting from data obtained moving the ball randomly on the BBT for only 110s. This is important because not always data are available in the optimal form and for long time histories!
  • The instability of the system under analysis makes this exercise even more challenging. Nevertheless, romAI allowed to identify a model from which to base the optimal controller
  • The designed controller is working well even for duty cycles not used during training
  • Once generated, romAI can be linearized getting the standard A,B,C,D matrixes and a state dimension equal to that defined during the generation by the designer. We can then leverage the control library. All can be done within the same modeling platform Altair Activate®
  • romAI has allowed to adopt an advanced control technique without
    • performing any previous measurement (e.g. ball radius, actuation arm length, …)
    • Writing any equation

Only starting from data acquired in 110s of use!


Now, we'd like to hear in the comments about how romAI can be useful in your work! ????

If needed, do not hesitate to contact Altair to get more information about romAI and understand how this application can satisfy your needs!



Comments

  • Ram_20323
    Ram_20323
    Altair Employee
    edited October 2022

    Livio. Thank you! very interesting and exciting. I was a bit confused about how you took the data and used the lqr function described above and would appreciate a bit more details here. 

  • Livio Mariano_20459
    Livio Mariano_20459
    Altair Employee
    edited November 2022

    Hi Ram, thanks for your comment.

    Data: they are read through a serial port. In Activate then we can automatically export them in a csv file which is used in romAI Director.

    lqr function: once the romAI model is generated, it can be imported in Activate. Here again can be automatically linearized getting the A,B,C,D matrices which are used as input of the lqr function. The latter is used in the script-based editor of Activate (in this case I did it in Model->Initialization but I could use also Diagram->Context). In the editor we have access to many libraries (all also available in Compose), lqr is a function available in the ControlSystem library.