optimization for trajectory input variables

2 ビュー (過去 30 日間)
Nivedhitha S
Nivedhitha S 2019 年 8 月 20 日
コメント済み: Nivedhitha S 2019 年 8 月 30 日
Dear community,
I am a newbie in matlab. I would like to know the method to define an objective function for an optimization function. I have a set of 6 ode equations which has 4 input variables for its calculation. I would to like to manipulate these 4 input variables sunch that one of my variable (ODE) can be optimized (maxima/minima). How to implement an objecive function and obtain the trajectory profile for these 4 input variables? I would like to obtain a continuous time varying profile for these 4 input variables. The system is a continuous time varying setup with interdependant ode. Please give me any suggestions for the same.

回答 (1 件)

Prabhan Purwar
Prabhan Purwar 2019 年 8 月 27 日
Hey,
The problem basically consists of an optimizing system of differential equations.
A model with varying parameters can be used to find the best-fitted model parameters for the same.
This can be achieved either through MATLAB or Simulink, both are discussed below, suitability relies upon the complexity and nature of the problem.
Following illustrates formation and solution to a differential equation.
  • Using MATLAB
k1 = ...; % set constant k1
k2 = ...; % set constant k2
k3 = ...; % set constant k3
f = @(t,y)[9-k1*y(2)^2*y(1)+k2*y(1)^2 ; k3*y(2)^2+y(1)*y(2)]; % define differential equations
tspan = [0 20]; % set interval of integration
u0 = ...; % set initial condition for u
omega0 = ...; % set initial condition for Omega
y0 = [u0 ; omega0]; % set vector of initial values
[T Y] = ode45(f,tspan,y0); % call integrator
plot(t,y(:,1),'-o',t,y(:,2),'-o') % plot results
Links:
  • Using Simulink
Links:
Optimization of differential equations
  • Using MATLAB
Making use of fminsearch(), fminbnd() and optimset() functions or optimization toolbox for complex problems after solving the differential equation.
Links:
For real-time optimization of differential equation refer to Simulink
  • Using Simulink
Model can be optimized as illustrated in video
Link:
  1 件のコメント
Nivedhitha S
Nivedhitha S 2019 年 8 月 30 日
Thank you for detailed help and suggestions.
But i was asking about the possibility of a trajectory optimization for my problem.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by