Having error message when using 'sysic to build interconnection in my LPV system

4 ビュー (過去 30 日間)
Robert Bate
Robert Bate 2018 年 7 月 17 日

I once used 'sysic' function to build interconnection in my LPV system back in 2016, it worked just fine. Recently I try to run the same code that I used back in 2016. Now I get an error message;

Error using sysic>LOCALmat2ss (line 637) Systems of class plftss are not allowed.

Error in sysic (line 111) [sysvals{i},flagvec(i)] = LOCALmat2ss(tmp);

Error in MS_Thesis_LPV_effective_Final_04272016 (line 64) G=sysic;

Below is the code I am trying to run, can anyone help?

<<

>>

clear all clc

%Variable declaration kt= 0.052; % Motor torque constant in Nm*A^(-1) R = 2.07; % Resistance in ohms Lo = 6.210^(-4);% Inductance in Henry bm = 4.8*10^(-5); % Coefficient of friction in Nm*rad^(-1) J = 6.9*10^(-6); % Motor moment of inertia Kg*m^(2) kb = 0.052; % Voltage constant (inverse speed constant) in V srad^(-1)

disp('The time-varying parameter rho = Lo, wich will be replaced in the') disp('state-space model of the DC plant') disp('Generating the range of the time-varying parameter "rho"') disp('and the ratebonds "rho_dot"')

disp('DC motor nominal plant')

disp(' [x1_dot] [-R/rho kb/rho] [x1] [1/rho] ') disp(' = [ ] [ ] + [ ] [u]') disp(' [x2_dot] [kt/Jm -bm/Jm] [x2] [ 0 ] ')

disp(' y = [0 1][x1] + [0][u] ') disp(' [x2] ')

% Define time-varying parameters % The value of rho is multiplied by 10 (-4) rho = tvreal('rho',[1.0*10^(-4) 6.2*10^(-4)],[-1.0*10^(-4) 1.0*10^(-4)]);

A=[-R/rho -kb/rho; kt/J -bm/J]; B=[1/rho; 0]; C=[1 0]; D=[0]; sys=ss(A,B,C,D)

pause

%Design an LPV controller that minimizes the $L_2$ norm of the weighted %interconnection

%Define weights for the interconnection

Wperf = tf(0.085*[1/0.01 1000],[1/0.01 0.1]);

bodemag(Wperf) legend('Wperf') pause

%Form synthesis connection

systemnames='Wperf sys'; inputvar='[omega;u]'; outputvar='[Wperf;omega-sys]'; input_to_sys='[u]'; input_to_Wperf='[omega-sys]'; cleanupsysic='yes'; G=sysic;

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by