Fractional-order-controller / FOPID-tuner

Fractional order proportional integral derivative controller tuner
5 stars 0 forks source link

Optimization terminated: mesh size less than options.MeshTolerance #2

Open cnpcshangbo opened 5 years ago

cnpcshangbo commented 5 years ago

We got the message as in the title. obj, constraints should be examined.

cnpcshangbo commented 5 years ago

image

cnpcshangbo commented 5 years ago

run_patternsearch_npm Optimization terminated: no feasible point found.

% k_p=x(1); k_i=x(2); k_d=x(3); lambda=x(4); mu=x(5); 2.0000 0 1.3408 0 1.0497

cnpcshangbo commented 5 years ago

Checking: obj_fun_apm(x)= Inf changing M1

cnpcshangbo commented 5 years ago

Optimization terminated: mesh size less than options.MeshTolerance and constraint violation is less than options.ConstraintTolerance. % k_p=x(1); k_i=x(2); k_d=x(3); lambda=x(4); mu=x(5); 0.4598 0 2.8483 0 1.0497

obj_fun_apm(x)= 8.5063e+03

cnpcshangbo commented 5 years ago

created test_obj.m % k_p=x(1); k_i=x(2); k_d=x(3); lambda=x(4); mu=x(5); 2.1654 0 1.3408 0 1.0497

obj_fun_apm(x)= 8.5659e+03

simple_constraint(x)= c=,ceq=-4.242110e-01 to check obj function image

cnpcshangbo commented 5 years ago

image It seems that the calculation of phi_m has something wrong.

cnpcshangbo commented 5 years ago

How to calculate phase? w=wc; APM1 = atan2(kdw^lambdasin(pilambda/2),(1+kdw^lambdacos(pilambda/2)))... +atan2(1,T1w); w=wc1.5; APM2 = atan2(kdw^lambdasin(pilambda/2),(1+kdw^lambdacos(pilambda/2)))... +atan2(1,T1w); w=wc0.5; APM3 = atan2(kdw^lambdasin(pilambda/2),(1+kdw^lambdacos(pilambda/2)))... +atan2(1,T1*w);

% APM = abs(phi_m-APM1/pi180)+abs(phi_m-APM2/pi180)+abs(phi_m-APM3/pi180); APM = 10^2abs(phi_m-APM1/pi180)-APM2/pi180-APM3/pi*180; % to get the min value max, so we use a negative symbol.

Why the value I calculated is not the same as the one in Bode plot?

cnpcshangbo commented 5 years ago

Calculate phase in MATLAB for IOPID and FOPID.

https://www.icloud.com/pages/0HjZflSJfrfi4R4VCTbPvJzJw#Calculating_Bode_for_IOPID