Model Feedback Control System

This example shows how to model a feedback control system using Simulink® signals that carry matrix and vector representations of different components of the feedback system. In this example, the controller is designed for a buck-boost converter to track a reference voltage signal. Buck-boost converters are extensively used in distributed power supply systems and modern power electronics devices due to their high efficiency, high power density, low cost, and compact size.

Open the model.

`open_system('FeedbackMatrix.slx')`

The model represents a closed-loop system where a buck-boost converter achieves the reference voltage profile using a controller that uses the state feedback.

Buck-boost Converter

The state-space equations represent the buck-boost converter:

`$\underset{}{\overset{˙}{x}}=Ax+Bu$`

`$y=Cx+Du$`

${\mathit{x}}^{\prime }=\left[\begin{array}{cc}{\mathit{x}}_{1}& {\mathit{x}}_{2}\end{array}\right]$ represents the inductor current and capacitor voltage, respectively and $y$ represents the output voltage.

Open the `Plant` subsystem to view the buck-boost converter model.

`open_system('FeedbackMatrix/Plant')`

In this example:

$\mathit{A}=\text{\hspace{0.17em}}\left[\begin{array}{cc}0& 375\text{\hspace{0.17em}}\\ -3.4091\mathit{e}+03& -1.5152\mathit{e}+03\end{array}\right]$, $\mathit{B}=\text{\hspace{0.17em}}\left[\begin{array}{c}125\\ 0\end{array}\right]$ , $\mathit{C}=\text{\hspace{0.17em}}\left[\begin{array}{cc}1\text{\hspace{0.17em}}& 0\end{array}\right]$ and $D=0$.

Controller

During the simulation, the controller uses the `error` and `state` signal values and computes the plant input (`plant` `input`) that drives the plant output towards the reference signal.

In this example, the controller consists of a linear quadratic regulator (LQR) represented by the gain vector `K` in the feedback path and an integral gain represented by `Ki` in the feedforward path. The lqr command computes the controller parameters for the desired pole locations. The first element of the LQR gain vector is used as the integral gain `Ki` in the feedforward path and the other two elements are concatenated in the gain vector `K`, which is used in the feedback path.

The model loads the controller parameters from the `mdlParams.mat` file.

Results

Simulate the model and visualize the results using a Scope block. The plant output signal `Voltage` tracks the reference signal, which is a step signal with an initial value of 25 and final value of 12.

`sim('FeedbackMatrix.slx');`