MATLAB | YALMIP | Centralized,Decentralized,Distributed Control | Linear Matrix Inequality (LMI) | Control Theory
This repository contains the MATLAB code and Report of the final group project of a course on Networked Control systems.
In this project, we solve a benchmark problem in control theory, the (linearized) modeling and control of a system of three tanks in series.
In particular, coherently with the course topics, we implement different control schemes (centralized, decentralized, distributed).
Simulation and performance analysis are done both in continuous-time and discrete-time domains.
The project is implemented in **MATLAB**, and **YALMIP** (with sedumi or SDTP3 for low-level optimization) as the optimization toolbox for LMI.
Controller tuning relies on Linear Matrix Inequality (LMI) theory (simple but efficient).
If you want more details on the modeling, system decomposition, and control tuning, refer to our presentation
Given the continuous time state-space description of the system:
- Decompose the model
- Perform open-loop stability analysis
- Define different state-feedback control structures (centralized, decentralized, distributed)
- Analyze each structure and compute the control gains to achieve satisfactory closed-loop performances.
- Plot the simulation results and compare the performance of the control structures.
For a detailed task description, refer to the general Project work assignment and our Three tanks assignment
Important
To run the code, you need YALMIP toolbox installed, and a low-level Linear Programming solver like sedumi or SDTP3.
If you have some problem installing it, you can refer to this presentation provided by my professor.
MATLAB scripts and functions are organized as follows:
-
Functions:
Used in the main project scripts for fixed mode analysis and control gain tuning.
For details, look at the function description (the control structure is specified as input)di_fixed_modes.m
: compute system fixed mode
The functions below are based on LMI resolution with YALMIP:
LMI_CT_DeDicont.m
andLMI_DT_DeDicont.m
: Continuous (CT) and Discrete(DT) pole-placement control tuningLMI_CT_H2.m
andLMI_DT_H2.m
: Continuos (CT) and Discrete(DT) H2 optimal control tuningLMI_CT_opt1.m
andLMI_DT_opt1.m
: Continuos (CT) and Discrete(DT) pole-placement plus control action rate limitation tuning.
(This is the LMI I'm proud of, being my own creation, look at this part of the presentation)
-
Scripts:
Even if it seems long and complex, don't panic! Most of it is related to plot signals and zero/poles analysis.
In all the scripts below, we start with the system modeling, decomposition, control structure definition, and fixed mode computation.
Then, an open-loop analysis and closed-loop control for different control structures.
Each script differs by the controller gain tuning technique, based on the previously explained functions.PROJECT.m
: Tuning based on pole-placementPROJECT_H2.m
: Tuning based on H2PROJECT_EXT.m
: Tuning based on the "extended system" technique, by pole-placement plus control action rate limitation.
To run the code, open the PROJECT script in Matlab and run it.
Many images will be opened with the simulation results.
This MATLAB code and the project report can be helpful for Automation and Control Students.
Providing a simple way to define and solve LMIs, and a powerful tool to tune controllers for even bigger MIMO (Multi Input Multi Output) systems.
Experiment with it, and feel free to open an issue, reach out to me for any questions!