Azzera filtri
Azzera filtri

GA optimization of hydraulic/actuator system

5 visualizzazioni (ultimi 30 giorni)
Farai Gatawa
Farai Gatawa il 21 Mag 2024
Commentato: Sam Chak il 21 Mag 2024
I am trying to optimize my pid controller using GA to tune my hydraulic system but i keep getting errors. please help me resolve these errors
run GA_optimiz.m
Warning: An error occurred while evaluating "loc_createToolchain" in "/MATLAB/toolbox/coder/autosar/rtwTargetInfo.p": Unrecognized function or variable 'autosarroot'.
This custom registration is not loaded.
Error using optimize_PID (line 3)
Derivative of state '1' in block 'pidtunning/Integrator' at time 1.049063918600629 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)

Error in GA_optimiz>@(k)optimize_PID(k) (line 10)
obj_fcn = @(k)optimize_PID(k);

Error in createAnonymousFcn>@(x)fcn(x,FcnArgs{:}) (line 11)
fcn_handle = @(x) fcn(x,FcnArgs{:});

Error in makeState (line 58)
firstMemberScore = FitnessFcn(state.Population(initScoreProvided+1,:));

Error in galincon (line 24)
state = makeState(GenomeLength,FitnessFcn,Iterate,output.problemtype,options);

Error in ga (line 420)
[x,fval,exitFlag,output,population,scores] = galincon(FitnessFcn,nvars, ...

Error in GA_optimiz (line 12)
[k,best]=ga((obj_fcn),no_Var,[],[],[],[],lb,ub,[],ga_opt);

Error in run (line 112)
evalin('caller', strcat(scriptStem, ';'));

Caused by:
Failure in initial user-supplied fitness function evaluation. GA cannot continue.
  1 Commento
Sam Chak
Sam Chak il 21 Mag 2024
I notice that you have posted another question on MATLAB Answers regarding wind turbine pitch control.
Regarding your questions on fractional order PID controller tuning and plotting surfaces using three vectors, the provided links indicated that you have received detailed responses from users. I encourage you to review their suggestions and provide feedback if you have any remaining questions or need further clarification.
If their answers do not fully resolve your issue, please feel free to provide additional details or clarification so that the community can better assist you.

Accedi per commentare.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by