Code Monkey home page Code Monkey logo

matavecontrol's Introduction

Matavecontrol V7.0

Matavecontrol is a basic toolbox for control engineering. The toolbox can be used for both GNU Octave and MATLAB®. Easy to use and easy to install. The main focus on matavecontrol is to offer a control toolbox which can be used in both GNU Octave and MATLAB®. Matavecontrol has the same function names as MATLAB®'s Control System ToolBox, but the time discrete functions are included in the time continuous functions. Also the library is a very basic library so other developers can fast dive into the code.

Caution

Installing GNU Octave's Control-Toolbox or MATLAB's Control-Toolbox/System Identification Toolbox WILL cause problems with MataveID & MataveControl because they are using the same function names.

Typical use

To use Matavecontrol, you should allways start with to create a transfer function or a state space model. Then you can use that mathematical model in almost all the function of Matavecontrol.

Here is some examples when I use Matavecontrol. MATLAB pictures are from Umeå University.

Creating a transfer function in MATLAB®

alt text

Creating a transfer function in GNU Octave

alt text

Create a bode diagram plot in MATLAB®

alt text

Create a bode diagram plot in GNU Octave

alt text

Create a state space model in MATLAB®

alt text

Create a state space model in GNU Octave

alt text

Do a step simulation in MATLAB®

alt text

Do a step simulation in GNU Octave

alt text

Convert a time continuous transfer function to a discrete transfer function in MATLAB®

alt text

Convert a time continuous transfer function to a discrete transfer function in GNU Octave

alt text

Do a nyquist diagram plot in MATLAB®

alt text

Do a nyquist diagram plot in GNU Octave

alt text

Model Predictive Control - Linear programming

Here I use MPC with linear programming. I used to use MPC with a quadratic programming, but unfortunately quadprog is only available for MATLAB and you need to have a license for that. So I wrote my own linear programming MPC with regularization for smoother outputs and inputs. The linear programming algorithm is available in C code as well in my other projects for embedded MPC systems, and that's the main reason why I selected a simple optimization solver instead of a large and difficult one.

alt text

Install

To install Matavecontrol, download the folder "sourcecode" and place it where you want it. Then the following code need to be written in the terminal of your MATLAB® or GNU Octave program.

path('path/to/the/sourcecode/folder/where/all/matave/files/are/matavecontrol', path)
savepath

Example:

path('/home/hp/Dokument/Reglerteknik/matavecontrol', path)
savepath

Important! All the .m files need to be inside the folder matavecontrol if you want the update function to work.

Update

Write this inside the terminal. Then Matavecontrol is going to download new .m files to matavecontrol from GitHub

updatematavecontrol

matavecontrol's People

Contributors

danielmartensson avatar

Watchers

 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.