Starting from:

$25

ESC794 - HW3 - Solved

 Selected Topics in Engineering Science

Model Predictive Control


1 Solve the following quadratic program using the basic active set method discussed in class.

Minimize

 

with P =diag(2     = [1 1 1] subject to

x1 + x2 + x3

4
x3

2
x2

0
x1

4
•    Start from a feasible point of your choice and a suitable initial guess for the active set.

•    Show every step of the iterations until the solution is found. You can do this as comments in the Matlab code.

•    How do you know that the exact solution has been found?

•    Solve the same problem using quadprog and verify that your answer matches this solution.


Install the qpOASES solver (Matlab interface) in your computer. Obtain it from https://projects.coin-or.org/qpOASES/wiki/QpoasesDownload

Instructions for installation on Linux and Windows, as well as solver usage and examples is found in the documentation:

https://www.coin-or.org/qpOASES/doc/3.0/manual.pdf

•    Focus on section 6.1 of the documentation. You will need a C++ compiler enabled in Matlab. Linux users: you can use gcc. Windows users: use the free MinGW compiler available from the add-ons tab from within Matlab. You may need a Mathworks account.

•    Linux users: I found a compilation error which was easily fixed by changing a line in make.m. See: https://projects.coin-or.org/qpOASES/ticket/84

•    Make sure you can run the examples supplied with the code.

•    Solve the QP problem of question 1 above using qpOASES, without additional bounds on x or upper bounds on Ax.

•    Use tic and toc to time execution of each solver. Times will vary depending on processor loads, so do this test many times and report on the min, max and mean times of each solver. Histograms would be nice.


More products