Skip to content

Commit 0430f97

Browse files
committed
Updated FGM routines
1 parent 62b8059 commit 0430f97

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

optimization/fastGradientMethod/fgm_quad.m

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@
1010
% Predictive Control at Megahertz Rates,” IEEE Transactions on Automatic
1111
% Control, vol. 59, no. 12, pp. 3238–3251, 2014.
1212
%
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:
1724
% projOp = @(x) min( 5, max(-5, x) );
1825
%
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.
2229
%
2330
% This algorithm can utilize one of 4 different stopping criteria:
2431
% 'Iterations' - Terminate after the specified number of iterations
@@ -150,7 +157,6 @@
150157
end
151158

152159
% Use acceleration to get the next point
153-
% y_n = (1 + beta)*x_n - beta*x;
154160
y_n = x_n + beta*(x_n - x);
155161
end
156162

optimization/fastGradientMethod/uib_fgm.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
if ( max(max(isnan(Q))) || max(max(isnan(R))) )
110110
error('Must supply sys, Q and R if warm-start lyapunov delta computation is selected.');
111111
end
112-
delta = condensed_primal_hessian_cond_lyap(sys, Q, R);
112+
delta = condensed_primal_hessian_cond_same(sys, Q, R);
113113
delta = delta*eps;
114114

115115
otherwise

0 commit comments

Comments
 (0)