How to solve the problem when using command h2syn design a H2 controller
조회 수: 16 (최근 30일)
이전 댓글 표시
I'm trying to design a H2 controller for a feedback system, the MATLAB code as follow:
load('cz.mat');% loading the discrete impulse response of a system Ts=0.0005; %sampling rate:2k Num=cz'; Den=[1 zeros(1,length(Num)-1)]; G = tf(Num,Den,Ts);
load('WpDen80_400.mat'); load('WpNum80_400.mat'); Wp= tf(WpNum80_400,WpDen80_400,Ts); Wu=0.005; systemnames = ' G Wp Wu '; inputvar = '[ dist; control ]'; outputvar = '[ Wp; Wu; G+dist ]'; input_to_G = '[ control ]'; input_to_Wu = '[ control ]'; input_to_Wp = '[ G+dist ]'; sys_ic = sysic;
nmeas=1; ncon=1; [K2,CL2,GAM2,INF2]=h2syn(sys_ic, nmeas, ncon); After running, the error is: Error using - Matrix dimensions must agree.
Error in lti/h2syn (line 174) f2 = -d12'*c1 - f2c ; % f2 = -f2a
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Computations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!