Polynomial matrix array mismatch MIMO system
1 view (last 30 days)
Show older comments
Can someone help in this program. I'm trying to find X and Y...for a MIMO system. While i'm multipying cellfunc multiplication causes order mismatch in this program. %% syms s num = {[1 0] , 1 ; 3 , [1 1]}; den = {[1 2 ] , [1 3] ; [1 6] , [5 2] }; G = tf(num,den) [A, B, C, D] = ssdata(G) [row, col] = size(A) %% delta = 3; %% Adash = inv(delta*eye(row)-A); Bdash = inv(delta*eye(row)-A)*B; Cdash = C*inv(delta*eye(row)-A); %% [r, c] = size(B); L = eye(c,r) %% ps=s-3; %% pole placement and finding K&F % multiplicity of desired pole location should not be greater than t rank(B), %hence different pole locations are chosen instead keeping all the poles % at one location, say -1 pole_place = ones(row,1); u = 1; for n = 1:row pole_place(n,1 )= -u; u = u+1; end K = place(A,B,pole_place); F = transpose(K); %% Htemp1= B*K; Htemp2 = ps*Htemp1; H = eye(row)-A-Htemp2 Mtemp1 = F*C; Mtemp2 = ps*Mtemp1; M = eye(row)-A-Mtemp2 %% finding X Xtemp1=ps*K; outX = cellfun(@(x) x*L,den,'un',0); outsys = cellfun(@(x) sym(x),outX,'un',0); Xtemp2=Xtemp1-outsys Xhf = inv(H)*F; Xtemp3 = Xtemp2*Xhf X = ps*Xtemp3 %% finding Y outY = cellfun(@(x) x*L,num,'un',0); Ytemp1 = C-outY Ytemp2 = Ytemp1*inv(H)*F Ytemp3 = ps*Ytemp2 Y = eye(c)-Ytemp3
0 Comments
Answers (0)
See Also
Categories
Find more on Model Predictive Control Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!