User:DanielMartensson/sandbox

Matavecontrol is a free software library for control engineering. Matavecontrols goal is to offer a library for control engineering which can be used for both MATLAB and GNU Octave. Matavecontrol is using a combination of both GNU Octave and MATLAB code.

Developments
The developments behind this project are built on to work with both MATLAB and GNU Octave.

Technical details
Matavecontrol is using most of the time built in functions and for-loops to compute transfer functions, state space models and other types of matrices.

The language
GNU Octave and MATLAB share the same basic built in functions such as eig, ode45, inv etc.
 * The function are.m is using ode45 to solve Algebraic Riccati Equations
 * The function tf.m is using struct and cellarrays to do string handling
 * The function lyap.m is using kronecker product to find the solution to the Lyapunov equation
 * The function pid.m is creating a transfer function as a PID-controller.
 * Matavecontrol is using functions such as "or" and "and" insted of "||" or "&&".

Difference between Control System ToolBox and Matavecontrol
Matavecontrol works with both discrete time models and continuous time models. Control System ToolBox from MathWorks is separating functions depending if it's discrete time or continuous time. For example "dlyap.m" and "lyap.m" or "dare.m" and "care.m".

Matavecontrol has the same name on the functions as Control System ToolBox has. But insted Matavecontrol have included the discrete time and continuous time functions in the same function. Matavecontrol requrie that the user always create a transfer function or a state space model to begin with. That model can then be used in almost all functions.

Function reference
Here is some examples how to use Matavecontrol. Creating a state space model. Here is an example how to find the solution to the Algebraic Riccati Equation. In this case, sys, is a continuous model. Which result that are.m choosing the continuous Algebraic Riccati Equation. If sys was discrete, then are.m is choosing discrete Algebraic Riccati Equation. How to interprent the help text. Here we can se that t should only be a real number such as 10, 11 or 24.2. G symbols a transfer function and sys symbols a state space model.