Massspring system: sumoflogs function

Massspring system with masses on a line.

Here, we show the Matlab code and the computational results obtained
using lqrsp.m. In this example, we use the sumoflogs function to promote
sparsity. We set and select logarithmicallyspaced
points for .
Matlab code
N = 50;
I = eye(N,N);
Z = zeros(N,N);
T = toeplitz([2 1 zeros(1,N2)]);
A = [Z I; T Z];
B1 = [Z; I];
B2 = [Z; I];
Q = eye(2*N);
R = 10*I;
options = struct('method','slog','gamval',logspace(4,1,50),...
'rho',100,'maxiter',100,'blksize',[1 1]);
tic
solpath = lqrsp(A,B1,B2,Q,R,options);
toc
Computational results
Sparsity patterns
The number of nonzero elements in decreases with .
The number of nonzero subdiagonals in both position and velocity feedback gains
decreases with For large values of both and become
diagonal matrices.
Performance of sparse feedback gains
In the absence of sparsity constraints, i.e., at , the optimal controller
is obtained from the positive definite solution of the algebraic Riccati equation
As increases, the feedback gain becomes sparser and the quadratic
performance deteriorates.

Sparsity level:


Performance loss:

The above results demonstrate that the optimal sparse feedback gain,
with of nonzero elements relative to the centralized feedback gain ,
introduces performance loss of only compared to .
Diagonals of sparse feedback gains
The elements on the main diagonals of the optimal sparse feedback gains become larger as the number of
the subdiagonals of drops. Thus, in order to compensate for communication with smaller
number of neighboring masses, each mass places more emphasis on its own position and velocity when
forming control action.
Also see computational results obtained using other
sparsitypromoting functions.
Back to massspring system example
