Analytical Analysis of an OCP with System of ODEs in MATLAB
Version 1.1.0 (9.39 KB) by
Arindam Kumar Paul
Do the analytical analysis of an Optimal Control Problem with 3 ODEs and Objective Functions Graphically.
Just run the code, you are allowed to set 6 symbols here and you can extend. Here, a system with 3 ODEs is preferable. If you have more please do some code. Run, Enter Symbols you need, enter Equations (System of Odes with Control Variables, Input the Objective Function, Get the Necessary and Suficient Proof for the existence of Optimal Control, Get the value of control analytically, get the adjoint system, get the Hamiltonian, Lagrangian etc.)
Use Latex(vars) to get the latex code for the variable/expression.
Just Input like : a - gamma*p - v1*alpha*p- beta*p-delta*p-u1*p (Equations)
Equations be like :
Where, Initial Conditions are :
Objective Functional is defined by :
Nothing, Just Run, If get an error, just turn 2-13 lines as comments by using "%" before the lines.
See the analytical outcomes in the command window.
Output:
Hamiltonian:
Adjoint System :
Value of Control :
,
And others like stability, Equillibriums etc. Will be updated soon.
Contribute.
Enjoy.
Cite As
Arindam Kumar Paul (2024). Analytical Analysis of an OCP with System of ODEs in MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/132907-analytical-analysis-of-an-ocp-with-system-of-odes-in-matlab), MATLAB Central File Exchange. Retrieved .
As a codework for the project and published work entitled "Modeling and Optimal Control Applied to Reduce the Effects of Greenhouse Gases Emitted from the Coal-based Power Plant in Bangladesh".
MATLAB Release Compatibility
Created with
R2022a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Acknowledgements
Inspired by: OpenOCL - Open Optimal Control Library
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.1.0 | Codes are updated and some bugs fixed. |
|
|
1.0.0 |
|