Git Product home page Git Product logo

control-and-ai-algorithms's Introduction

Control-and-AI-Algorithms

Implementations of Control (PID, LQ, MPC, ...) and AI (fuzzy logic, Q-learner, SARSA, ...). The algorithms are briefly discussed in this readme, and some results are shown. For detailed explanation, see the readme's of each project.

Overview:

  1. Fuzzy Logic
  2. LQ Control
  3. Model Predictive Control
  4. PID Control
  5. Q-learners and SARSA
  6. System Analysis

Implementation of Fuzzy Logic in MATLAB. In Fuzzy Logic, the truth values of variables may be any real number between 0 and 1. Therefore, it can handle 'partial truth', where the truth value may range between completely true and completely false.

LQ control is implemented using Simulink and MATLAB.

First the situation without control. All variables will go towards their equilibrium values.

With LQ control, the controllable variables (k and v) will go towards the desired value. Uncontrollable variables (s) cannot be controlled.

Sometimes, some variables cannot be measered directly. An observer will estimate these values.

The observer can be combined with LQ control.

Finally, a reduced order observer can be used as well.

To achieve optimal control, the controlmatrix can be optimized (on an other system).

Implementation of MPC on a basic system with the following uncontrolled step response.

After optimization of the parameters, the model predictive control algorithm will accurately responds on a change in the set point. Left the response, right the taken control action.

The calculations done by the MPC around the change in stepoint are visualised below:

The impact of the parameters m and p is visualised:

A standard PID controller is implemented in Simulink and MATLAB. The influence of the different control settings is studied.

The PID tuning will perform less optimal if their is a measurement delay.

To efficiently tune the system, control margins are plotted on a BODE-plot for a system of respectively first, second and third order.

We will now tune the PID controller. First the state without control.

The open loop response.

And then the calculated optimal PID control.

Lastly, a PID-feedbackward controller is combined with a feedforward controller. We assume the noise distrubing the system is perfectly characterised. This combination effectively maintains the desire state.

Q-Learning and SARSA algorithms are used to let an imaginary cat (red) through a maze. Besides not running into the walls, the cat tries to locate the mouse (blue).

Several systems are investigated with Bode and Nyquist plots.

A first order system.

A second order system.

A third order system.

Root locus analysis is performed on these three systems.

control-and-ai-algorithms's People

Contributors

wardq 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.