|
10 | 10 | % Predictive Control at Megahertz Rates,” IEEE Transactions on Automatic
|
11 | 11 | % Control, vol. 59, no. 12, pp. 3238–3251, 2014.
|
12 | 12 | %
|
13 |
| -% The projection function takes in a single vector of variables, and then |
14 |
| -% outputs a single vector of the variables after they are projected into |
15 |
| -% the feasible space. For example, to implement box constraints -5 <= x <= 5, |
16 |
| -% the projection function is |
| 13 | +% This algorithm solves an optimization problem of the form |
| 14 | +% min 0.5*u'*H*u + q'*u |
| 15 | +% s.t. G*u <= b |
| 16 | +% where for linear time-invariant MPC, q = J'*x0 and b = F*x0 + g. |
| 17 | + |
| 18 | +% The inequality constraint is handled through a projection operation onto |
| 19 | +% the feasible set. The projection function is supplied by the user, and |
| 20 | +% takes in a single vector of variables, and then outputs a single vector |
| 21 | +% of the variables after they are projected into the feasible set. For |
| 22 | +% example, to implement box constraints -5 <= x <= 5, the projection |
| 23 | +% function is: |
17 | 24 | % projOp = @(x) min( 5, max(-5, x) );
|
18 | 25 | %
|
19 |
| -% This algorithm can utilize either a constant step size scheme where beta is |
20 |
| -% held the same across all iterations (calculated using the formula in the |
21 |
| -% above paper), or it can utilize a variable stepsize. |
| 26 | +% This algorithm can utilize either a constant step size scheme where beta |
| 27 | +% is held the same across all iterations (calculated using the formula in |
| 28 | +% the above paper), or it can utilize a variable stepsize. |
22 | 29 | %
|
23 | 30 | % This algorithm can utilize one of 4 different stopping criteria:
|
24 | 31 | % 'Iterations' - Terminate after the specified number of iterations
|
|
150 | 157 | end
|
151 | 158 |
|
152 | 159 | % Use acceleration to get the next point
|
153 |
| -% y_n = (1 + beta)*x_n - beta*x; |
154 | 160 | y_n = x_n + beta*(x_n - x);
|
155 | 161 | end
|
156 | 162 |
|
|
0 commit comments