- Ensure that the input names specified in Ksys.InputName match exactly with the output names of sysDrone and the output of Sum. Any discrepancy in names could lead to inputs being considered unused.
- The external inputs and outputs you specified in the connect call are 'reference' and outputs such as 'Imbardata', 'PosizioneX', 'PosizioneY', 'PosizioneZ', and 'Propulsione'. Ensure that the he 'reference' signal is correctly used by the interconnected system and all specified external outputs are correctly mapped to the internal signals of sysDrone, Ksys, or Sum.
Problem of Eigenvalue allocation using connect
3 次查看(过去 30 天)
显示 更早的评论
Hello evryone i have a problem with my script Matlab.
In my script i I tried to controll a MIMO system in particular a drone or a quadcopter and i use to controll it the eigenvalue allocation but my script generate an warning. These warning create a sistem insensitive to a pole allocation, infact i you print the sysitem before and after the the application of new poles the output don't change.
These is my script:
close all
clear all
clc
m = 0.75;
g = 9.81;
u_bar= m*g/4;
d= 0.2;
Ix= 0.005;
Iy= 0.005;
Iz= 0.01;
c=0.1;
A = [0 1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0; ...
0 0 0 1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0;...
0 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0; ...
0 0 0 0 0 0 0 1 0 0 0 0; 0 0 ((4*u_bar)/m) 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 1 0 0; ((4*u_bar)/m) 0 0 0 0 0 0 0 0 0 0 0;...
0 0 0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0;]
B= [ zeros(1,4); 0 (d/Ix) 0 -(d/Ix);...
zeros(1,4); (d/Iy) 0 -(d/Iy) 0;...
zeros(1,4); -(c/Iz) (c/Iz) (c/Iz) (c/Iz);...
zeros(5 ,4); ...
(1/m) 1/m 1/m 1/m]
C = [zeros(1,4) 1 zeros(1,7); zeros(1,6) 1 zeros(1,5); zeros(1,8) 1 zeros(1,3); zeros(1,10) 1 0;]
D = zeros(4,4)
sysDrone=ss(A,B,C,D)
sysDrone.InputName='Propulsione'
sysDrone.OutputName={'Imbardata', 'PosizioneX', 'PosizioneY', 'PosizioneZ'}
figure(1)
step(sysDrone)
eig(sysDrone)
%[ABAR,BBAR,CBAR,T,K] = ctrbf(A,B,C)
Ctr = ctrb(A,B)
rho_c = rank(Ctr)
Obs = obsv(A,C)
rho_o = rank(Obs)
T_sett=2
PO=4
zita=abs(log(PO/100))/(sqrt(pi^(2)+log(PO/100)^(2)))
wn=4/(zita*T_sett)
p1= -wn*zita + 1j*wn*sqrt(1-zita^(2))
p2 = 10*real(p1)
p_star = [ p1 p1' p2 p2-1 p2-3 p2-4 p2-5 p2-6 p2-7 p2-8 p2-9 p2-10]
K1=place(A,B,p_star)
eig(A-B*K1)
Ksys=ss([], [], [], K1)
Ksys.InputName={'ang_PHI','vel_PHI','ang_THETA','vel_THETA','ang_PSI','vel_PSI','pos_X','vel_X','pos_Y','vel_Y','pos_Z','vel_Z'}
Ksys.OutputName='sf_Action'
Sum = sumblk('Propulsione = reference - sf_Action',4)
SYS=connect(sysDrone,Ksys,Sum,'reference',{'Imbardata'; 'PosizioneX'; 'PosizioneY'; 'PosizioneZ';'Propulsione'})
figure(2)
step(SYS)
zpk(SYS)
G=1/dcgain(SYS(1));
SYSC=series(G,SYS);
figure(3)
step(SYSC)
These is the output:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/920344/image.jpeg)
These is a pdf with the print of my Comand Window:
0 个评论
回答(1 个)
Ganesh
2024-5-28
The warning you are facing is occuring due to the inconsistency between the connected systems "sysDrone", "Ksys" and "Sum". To resolve the warning, you may follow the following steps:
The error you are facing is due to incorrect usage of indexing. To fix the issue use the correct indexing for MIMO models by referring to the following documentation:
For more information on the "connect" function, refer to the following documentation:
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Robust Control Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!