Unconstrained Nonlinear Optimal Control Problem

The second example represents an unconstrained optimal control problem in the fixed interval t ∈ [-1, 1] , but with highly nonlinear equations. The mathematical problem is stated as follows:

Minimize

(1)

subject to

(2)

(3)

(4)

Spreadsheet Model

The spreadsheet model for the initial value problem (2)-(4) with a parametrized control function using a third-order polynomial is shown in Table 1.

Table 1
AB
1ODE variables
2t-1
3x_10.05
4x_20
5Parametrized control formula
6c_01
7c_10
8c_21
9c_30
10u=c_0+c_1*t+c_2*t^2+c_3*t^3
11ODE rhs equations
12x1dot=0.78*(-2*(x_1+0.25)+(x_2+0.5)*EXP(25*x_1/(x_1+2))-(x_1+0.25)*u)/2
13x2dot=0.78*(0.5-x_2-(x_2+0.25)*EXP(25*x_1/(x_1+2)))/2

The initial solution to the IVP is obtained by evaluating the array formula =IVSOLVE(B12:B13, B2:B4, {-1,1}) in an allocated array E2:G103, which is shown partially in Table 2 and plotted in Figure 1. Clearly, our initial guess for the control coefficients B6:B9 is not good, since the solution exhibits instabilities at larger time values. The control and integrand vectors, needed to construct the objective formula for the cost index (1), are generated in columns I and K from the formulas I3 and K3, listed in Table 3. The objective (1) is defined by the formula N3 using QUADXY with an initial cost of 1.92 x 1018.

Table 2
EFGHIJK
1IVP Solution
2tx_1x_2u Integrand Cost functional
3-1.000.05010.1025Objective1.92396E+18
4-0.980.0501630.00030510.102516
5-0.960.0503410.00059610.102535
1000.943.59E+09-0.2511.29E+19
1010.963.64E+09-0.2511.33E+19
1020.983.7E+09-0.2511.37E+19
1031.003.75E+09-0.2511.41E+19
Table 3: formulas used to generate values shown in Table 2
PurposeCellFormula
Initial value problem solutionE2:G103=IVSOLVE(B12:B13, B2:B4, {-1,1})
AutoFill formula for control valuesI3=c_0+c_1*E3+c_2*E3^2+c_3*E3^3
AutoFill formula for integrand valuesK3=F3^2+G3^2+0.1*I3^2
ObjectiveN3=0.78*QUADXY(E3:E103, K3:K103)/2

Figure 1

Results and Discussion

We configure Excel Solver to minimize the objective formula N3 by varying the control parameters B6:B9 with no added constraints. Despite the bad initial values for the control parameters, the Solver reported a feasible solution in about 2 seconds with the Answer Report shown in Figure 2. The optimal trajectories for the system variables are plotted in Figure 3.

Figure 2
Figure 3

References

[1] Elnagar, G.; Kazemi, M.A. Pseudospectral Chebyshev Optimal Control of Constrained Nonlinear Dynamical Systems. Comput. Optim. Appl. 1998, 11, 195-217.

[2] Ghaddar, C. K. "Novel Spreadsheet Direct Method for Optimal Control Problems." Math. Comput. Appl., 23, 6, 2018.
Available at: http://www.mdpi.com/2297-8747/23/1/6

[3] Ghaddar, C.K. "Rapid Solution of Optimal Control Problems by a Functional Spreadsheet Paradigm: A Practical Method for the Non-Programmer". Math. Comput. Appl. 2018, 23, 54.
Available at: https://www.mdpi.com/2297-8747/23/4/54

Question or Comment? Email us:
support @ excel-works.com

ExceLab: Transforming Excel into a Calculus Power House

ExceLab functions and methods are protected by USA Patents 10628634, 10114812, 9892108 and 9286286.

© 2015-2024, ExcelWorks LLC
Boston, USA