# LMI, Control system, Robust Control Adaptive Controller

Piecewise gain-scheduled L2 control

Is this a question?

4 Likes

yeah please, actually i am unable to write the code in Matlab Some equation

And?

i want correct it

To summerize: Please explain in detail:

1. Which problem are you trying to solve?
2. Which code did you write that does not work as expected?

Please post a complete, executable example.

here is my problem hope you can understand it very well

(Attachment Problems.docx is missing)

I guess discourse removed your attachment. Can you describe in your own words which problem you are trying to solve and post the code you wrote to solve it?

Please help me to solve this LMI system. Actually, I obtained result which is not correct. I am ok with numerator but I want five denominators.

Here is LMI code

clc, clear all
G1 = 0.058;
G2 = 0.47;
thau2 = 3.4;
thau = 28.6;
T = 11.7;
G3 = 0.105;
b11 = -G1;
b12 = G2/thau2;

A=[0 0 0 0 -G1;0 -thau2^-1 0 0 b12; 0 0 -2thau 1 G3; 0 0 -thau^-2-4(pi)^2*T^-2 0 0; 0 0 0 0 -1]

B1=[b11, -b12, 0, 0, 0]‘;
B2=[0, 0, 0, 0, 1]’;
B11 = [B1 B2];
B12 = [B1];
B21 = B2;
B22 = 2*B2;

C=[ones(1, 3) 0 0];
C1=C;C2=C;

setlmis()
X1=lmivar(1,[5 1])
X2=X1;
X3=X1;
X4=X1;
L=lmivar(2,[1 5])
g=lmivar(1,[1 1])

lmiterm([-1,1,1,X1],1,1)
lmiterm([-1,1,2,g],1,1)
% first LMI
lmiterm([2,1,1,X1],A,1,‘s’)
lmiterm([2 1 1 L],B21,1,‘s’)
lmiterm([2,1,2,0],B11)
lmiterm([2,1,3,X1],1,C’)
lmiterm([2,2,2,0],-eye(2))
lmiterm([2,2,3,0],zeros(2,1))
lmiterm([2,3,3,g],-1,-eye(1))
%Second LMI
lmiterm([3,1,1,X2],A,1,‘s’)
lmiterm([3,1,1 L],B22,1,‘s’)
lmiterm([3,1,2,0],B11)
lmiterm([3,1,3,X2],1,C’)
lmiterm([3,2,2,0],-1)
lmiterm([3,2,3,0],0)
lmiterm([3,3,3,g],-1,eye(1))
%thrid LMI
lmiterm([4,1,1,X3],A,1,‘s’)
lmiterm([4,1,1,L],B21,1,‘s’)
lmiterm([4,1,2,0],B12)
lmiterm([4,1,3,X3],1,C’)
lmiterm([4,2,2,0],-1)
lmiterm([4,2,3,0],0)
lmiterm([4,3,3,g],-1,eye(1))
%fourth LMI
lmiterm([5,1,1,X4],A,1,‘s’)
lmiterm([5,1,1,L],B22,1,‘s’)
lmiterm([5,1,2,0],B12)
lmiterm([5,1,3,X4],1,C’)
lmiterm([5,2,2,0],-1)
lmiterm([5,2,3,0],0)
lmiterm([5,3,3,g],-1,eye(1))

lmis=getlmis
[tmin,xfeas] = feasp(lmis);
X1= dec2mat(lmis,xfeas,X1)
g = dec2mat(lmis,xfeas,g)
L = dec2mat(lmis,xfeas,L)
K =L*inv(X1)
syms s
tf(K,C1)

How could i please guide me. i am little confused.

your help will be highly appreciated.

Just read it. In particular the item 2.

By the way, this is a forum about Julia. Not Matlab. If you just need to correct your Matlab code, which seems to be your goal, this is not the right place.

This is looking like Matlab code, not like Julia code. We can help you with debugging Julia code, but first you have to write some Julia code yourself.

And if you post code, please put it in triple backticks, ``` before and after you code…
{"ft_lang_label":"__label__en","ft_lang_prob":0.71249986,"math_prob":0.9983403,"size":2684,"snap":"2022-40-2023-06","text_gpt3_token_len":1177,"char_repetition_ratio":0.1641791,"word_repetition_ratio":0.0,"special_character_ratio":0.43368107,"punctuation_ratio":0.27623641,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97152656,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-02-07T18:01:41Z\",\"WARC-Record-ID\":\"<urn:uuid:a8e8cd3f-6551-4bad-8850-84ea21d89264>\",\"Content-Length\":\"51138\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:3b818c2e-c750-4aea-874e-dbeb712b57ce>\",\"WARC-Concurrent-To\":\"<urn:uuid:9d3d443d-a044-475e-9dfa-15eced15f9a4>\",\"WARC-IP-Address\":\"64.71.144.205\",\"WARC-Target-URI\":\"https://discourse.julialang.org/t/lmi-control-system-robust-control-adaptive-controller/65626/6\",\"WARC-Payload-Digest\":\"sha1:6QOXVB2Z6JRWO5KQAEAEXHMJN6OO6YZA\",\"WARC-Block-Digest\":\"sha1:2H3B5ORP64O4PFCNHGLPRYXFGA76T3R5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-06/CC-MAIN-2023-06_segments_1674764500628.77_warc_CC-MAIN-20230207170138-20230207200138-00801.warc.gz\"}"}