Code covered by the BSD License
-
[sys_foc]=ora_foc(r,N,w_L,w_H...
Filename: ora_foc.m
-
l(neq,t,x,u)
-
sys_Dg(neq,t,x0,xf)
J_x0 and J_xf are row vectors of length n.
-
sys_Dh(neq,t,x,u)
-
sys_Dl(neq,t,x,u)
l_x should be a row vector of length n.
-
sys_activate
-
sys_g(neq,t,x0,xf)
-
sys_h(neq,t,x,u)
xdot must be a column vector with n rows.
-
sys_init(params)
Here is a list of the different system information paramters.
-
main.m
-
View all files
from
Solution of Fractional Optimal Control Problems
by Christophe Tricaud
Solution of Fractional Optimal Control Problems using Rational Approximation
|
| sys_init(params)
|
function neq = sys_init(params)
global N problem
% Here is a list of the different system information paramters.
% neq = 1 : number of state variables.
% neq = 2 : number of inputs.
% neq = 3 : number of parameters.
% neq = 4 : reserved.
% neq = 5 : reserved.
% neq = 6 : number of objective functions.
% neq = 7 : number of nonlinear trajectory constraints.
% neq = 8 : number of linear trajectory constraints.
% neq = 9 : number of nonlinear endpoint inequality constraints.
% neq = 10 : number of linear endpoint inequality constraints.
% neq = 11 : number of nonlinear endpoint equality constraints.
% neq = 12 : number of linear endpoint equality constraints.
% neq = 13 : 0 => nonlinear, 1 => linear, 2 => LTI, 3 => LQR, 4 => LQR and LTI.
% The default value is 0 for all except neq = 6 which defaults to 1.
% if params == [] then setup neq. Otherwise the system parameters are
% getting passed.
if isempty(params),
if problem == 1
%LTI
neq = [1, 2*N+1; 2, 1; 3, 4];
elseif problem == 2
%LTV
neq = [1, 2*N+1; 2, 1; 3, 4];
elseif problem == 3
%Bang-bang
neq = [1, 2*N+3; 2, 1; 3, 4; 12 2];
end
else
global sys_params
sys_params = params;
end
|
|
Contact us at files@mathworks.com