Optimal Control of Pitch/Travel and Elevation with Feedback:

In this task we include the dynamics of elevation, . The helicopter is moved from to past a restriction causing the elevation angle to change during the flight. We must therefore add the elevation to the state vector; the setpoint is a new manipulated variable in the system.

Preparations

1)

Task

Write the system on continuous state space form with the two extra states and . Use and .

We remember from Helicopter Lab Day 2

Transclude of Helicopter-Lab-Day-2#1-state-space-formulation

Extending this according to the task give us

Where the relevant formulas can be found here page=13

2)

Task

Discretize the model using the forward Euler method (Euler Discretization) and write the resulting model on discrete state space form.

We know that the discretized system is given by

Link to original
Where is the discretization time. This gives us

Where and are unchanged from 1)

3)

Task

Add an inequality constraint on the elevation

nonlinear constraint so we must use theMatlab function fmincon, as this is an SQP type algorithm

Note that this is a

We now want to minimize

We need to solve this similarly as we did in 3) Calculating the Optimal Path

We want to express the cost function, as

Finding : We therefore get

Giving us

Same reasoning for finding :

Which gives us

See the Matlab file init08.m for implementation.

On The Lab

6)

Yes

7)

8)

TEST PLAN

Testing different horizons:

  1. BEST Testing different objective function weights q1 and q2.
  2. q1=q2= 1
  3. q1=q2=0.1 BEST
  4. q1=q2=10

^Everything above is with

Testing with different LQR:

  1. good: Q = [3 0.3 2 0.5 3 0.5], R = [0.1 0.1] BEST
  2. unit: Q = [1 1 1 1 1 1], R = [1 1]

Row vs data

  1. Time
  2. Travel
  3. Travel rate
  4. Pitch
  5. Pitch rate
  6. Elevation
  7. Elevation rate
  8. Pitch reference
  9. Elevation reference
  10. V_d
  11. V_s 13-17. x_star (row 13-17)
  12. Constraint