Implementation of a multiple PI controller in Simulink

6 ビュー (過去 30 日間)
Mr. NailGuy
Mr. NailGuy 2017 年 10 月 25 日
コメント済み: Birdman 2017 年 10 月 27 日
Hi! I am having issues on creating a multiple PI-controller for a state-space model with two state variables as shown. This was a demo code from Matlab which is very similar to what I am trying to implement. The full state-space model equation is executed below from the given variables. When I create the simulink to implement multiple PI controller to tune both the state variable (X1 and X2), Simulink always shows an error that the dimensions doesn't match. Please see the error below.
a = [-0.5572,-0.7814;0.7814,0]; b = [1,-1;0,2]; c = [1.9691,6.4493]; sys = ss(a,b,c,0); step(sys)
>> sys
sys =
A =
x1 x2
x1 -0.5572 -0.7814
x2 0.7814 0
B =
u1 u2
x1 1 -1
x2 0 2
C =
x1 x2
y1 1.969 6.449

採用された回答

Birdman
Birdman 2017 年 10 月 26 日
編集済み: Birdman 2017 年 10 月 26 日
You have not entered the D matrix correctly. Your output is 1x1 scalar in the way you constructed your state space model because your C matrix is 1x2, the X vector is 2x1, then the multiplication will be 1x1 scalar. D matrix has to be 1x2 vector. DON'T USE ANY DEMUX AT THE OUTPUT SINCE YOUR OUTPUT IS 1x1. I made the same model and it worked for me without errors, in this case, enter your D matrix as:
D=[0 0];
  28 件のコメント
Mr. NailGuy
Mr. NailGuy 2017 年 10 月 27 日
You're correct. Hope my Simulink works, if not then maybe I would ask for your help. I will send the code so you could have a check of it. You already gave me a big help.
Birdman
Birdman 2017 年 10 月 27 日
No problem, feel free to send me mail when you need help.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by