Research Article

Calculus of Variations and Nonlinear Optimization Based Algorithm for Optimal Control of Hybrid Systems with Controlled Switching

Algorithm 1

Step 1. Chose an initial for ;
Step 2. Compute the corresponding continuous control
 (i) Solve the Hamiltonian system using the shooting method
  (a) Guess the unspecified initial conditions
  and ;
  (b) Integrate the Hamiltonian system (33) forward from
  to ;
  (c) Using the resulting values of and , evaluate
  the error function:
    ;
       ;
  (d) Adjust the value of and , using a
  numerical method for solving nonlinear equations, to bring
  the function E closer to zero;
 (ii) Calculate the continuous optimal control (32);
Step 3. Calculate J (16);
Step 4. Calculate (31);
Step 5. Find the value of by using a nonlinear optimization
   technique; ;
Step 6. Repeat Steps , , and until the criterion
    is satisfied.