fmincon PI-controller of nonlinear System
Mostrar comentarios más antiguos
Hi!
I want to optimize two PI-controllers of my simulink model(high nonlinear). I have several constrains of my nonlinear sytem, but I don't know how to insert these into 'fmincon'.
This is my optimization functinon:
function y = fun(x)
% Set parameter of PI- controller of the force
set_param('Sim_10_01/CF/KpF', 'Gain', 'x(1)');
set_param('Sim_10_01/CF/TiF', 'Gain', 'x(2)');
% Set parameter of PI-controller of the pressure
set_param('Sim_10_01/Cp/Kpp', 'Gain', 'x(3)');
set_param('Sim_10_01/Cp/Tip', 'Gain', 'x(4)');
sim('Sim_10_01','SrcWorkspace','current');
y = [moment force pressure acceleration];
I want to optimize the parameters of both PI-controllers for the same output 'acceleration' in relation of the constrains of the moment, force and pressure.
My issue now: I don't know how to insert those constrains, due they are not dependent on x(well somehow yes, but I don't have any mathematical evidence). In fact those constrains have a scalar min- maximum, such for example. -1kN <= force <= 15kN.
Can fmincon handle a vector returning of my fun.m ?
Any idea's?
Thank you!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Simulink Control Design en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!