Executing the SQP Algorithm (Control Design and Simulation Module)

LabView Control Design and Simulation Module

Executing the SQP Algorithm (Control Design and Simulation Module)

The SIM Optimal Design VI uses an internal simulation diagram to obtain the finite-horizon time-domain response of the dynamic system model. Use the Solver Parameters parameter of this VI to configure the simulation. You also can configure the Sequential Quadratic Programming (SQP) algorithm using the beginning state, cno settings, and stopping criteria parameters.

This VI returns the following information:

  • Signals—The finite-horizon time-response data for the output and control action of the dynamic system, evaluated at each point specified in the Optimal parameters array.
  • Design parameters—The set of parameter values that minimize the specified cost function. These values are the optimal parameter values.
  • Design cost—The result of the specified cost function if you apply the values from the Design parameters array.
  • Optimal parameters—A list of possible optimal parameter values. Each column of this array corresponds to one parameter you specified in the Parameter Bounds array. Each row of this array corresponds to one execution of the SQP algorithm.
  • Optimal costs—The results of the specified cost function that correspond to each row of the Optimal parameters array.

The SQP algorithm takes as long to execute as the product of the number of function evaluations and the run time of the simulation. If you specify only one set of initial parameter values, the algorithm must solve, on average, between 30 and 200 functions. The front panel of the SIM Optimal Design VI includes a Current Data page that you can use to monitor the progress of the algorithm as the VI runs. This page updates each time the SQP algorithm executes from one set of initial parameter values.

The Optimal Design Parameters page of this VI also includes the Best Parameters (Infeasible Constraints) and Best cost (Infeasible constraints) parameters. These parameters return optimal parameter values and the associated cost function result with no constraints. This information can be useful when revising the constraint envelopes.

If the dynamic system has constraints and the SQP algorithm does not return feasible optimal values, try ensuring that the specified cost function remains constant when parameter values are outside the feasible range. This method helps you set reasonable parameter bounds. Additionally, reducing system discontinuities helps the SQP algorithm execute precisely. You can use several methods to reduce discontinuities, for example, avoiding saturation effects and rate limiters in the system model.