Mass-spring system: weighted Huge{ell_1} norm

mass-spring pic 

Mass-spring system with N masses on a line.


The weighted ell_1 norm is given by

         g(F) , = , sum_{i, , j} W_{ij} | F_{ij} |.

Since

     {     W_{ij} , = , 1/|F_{ij}| ,     ~~     F_{ij} , neq , 0     }         ~~     Rightarrow     ~~         {rm bf{card}} , (F)     , = ,     sum_{i, , j} W_{ij} |F_{ij}|,

we use the re-weighted scheme of Candes et al. ’08

     W_{ij}^+     , = ,      frac{1}{|F_{ij}| , + , varepsilon},     ~~~     0 , < , varepsilon , ll , 1,

where F is the optimal sparse feedback gain from the previous re-weighted iteration.

At gamma = 0, the solution of the optimal control problem is computed from the positive definite solution of the algebraic Riccati equation. For a fixed value of gamma > 0, we initialize the re-weighted scheme using the solution from the previous value of gamma. We update the weights until convergence or a maximum number of iterations is reached.

We next show the Matlab code and the computational results obtained using lqrsp.m. We set {rho = 100, , varepsilon = 10^{-3} } and select 50 logarithmically-spaced points for gamma in [10^{-4}, , 10^{-1}].

Matlab code

% Mass-spring system

% State-space representation of the mass-spring system with N = 50 masses
N = 50;
I = eye(N,N);
Z = zeros(N,N);
T = toeplitz([2 -1 zeros(1,N-2)]);
A = [Z I; -T Z];
B1 = [Z; I];
B2 = [Z; I];
Q = eye(2*N);
R = 10*I;

% Compute the optimal sparse feedback gains
options = struct('method','wl1','gamval',logspace(-4,-1,50),...
        'rho',100,'maxiter',100,'blksize',[1 1],'reweightedIter',5);
tic
solpath = lqrsp(A,B1,B2,Q,R,options);
toc

Computational results

Download Matlab code mass_spring_wl1.m to reproduce these figures.

Sparsity patterns

The number of nonzero elements in F decreases with gamma.

mass_spring_wl1_nnz_F 

The number of nonzero elements in the feedback gain F as a function of gamma.
For a system with N = 50 masses, there are total of 5000 elements in F.

The number of nonzero sub-diagonals in both position and velocity feedback gains F = [F_p ; ; F_v] decreases with gamma. For large values of gamma both F_p and F_v become diagonal matrices.

mass_spring_wl1_F_1 

Sparsity pattern of the feedback gain matrix F = [F_p ; ; F_v] for gamma = 10^{-4}.

mass_spring_wl1_F_2 

Sparsity pattern of the feedback gain matrix F = [F_p ; ; F_v] for gamma = 0.0105.

mass_spring_wl1_F_3 

Sparsity pattern of the feedback gain matrix F = [F_p ; ; F_v] for gamma = 0.1000.

Performance of sparse feedback gains

In the absence of sparsity constraints, i.e., at gamma = 0, the optimal {cal H}_2 controller

     F (0)     , := ,          F_c      , = ,      R^{-1} B_2^T P


is obtained from the positive definite solution of the algebraic Riccati equation

         A^T P         ~ + ~         P , A         ~ - ~          P , B_2 , R^{-1} B_2^T P         ~ + ~         Q         ~ = ~         0.


As gamma increases, the feedback gain F becomes sparser and the quadratic performance deteriorates.

mass_spring_wl1_nnz_F_pct 

Sparsity level:

 displaystyle{frac{ {rm bf{card}} , (F) }{ {rm bf{card}} , (F_{c}) }} times 100 %

mass_spring_wl1_H2 

Performance loss:

 displaystyle{frac{J(F) ,-, J(F_c)}{J(F_c)}} times 100 %


The above results demonstrate that the optimal sparse feedback gain, with 2% of nonzero elements relative to the centralized feedback gain F_c, introduces performance loss of only 8% compared to F_c.

Sparsity vs. performance
     begin{array}{cccc}     gamma     &     0.014     &     0.043     &     0.10     [0.1cm]     displaystyle{frac{ {rm bf{card}} , (F) }{ {rm bf{card}} , (F_{c}) }}     &     9.36 %     &     5.80 %     &     {bf 1.96} %      [0.35cm]     displaystyle{ frac{J(F) ,-, J(F_c)}{J(F_c)} }     &     0.80 %     &     2.31 %      &     {bf 7.80} %            end{array}

Diagonals of sparse feedback gains

The elements on the main diagonals of the optimal sparse feedback gains become larger as the number of the sub-diagonals of F 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.

mass_spring_wl1_Fp_diag 

Diagonal of the optimal sparse F_p for different values of gamma: gamma =  10^{-4}~(circ), 0.0281~(+), 0.1000~(*).
Blue circles are almost on the top of the main diagonal of the optimal centralized F_p.

mass_spring_wl1_Fv_diag 

Diagonal of the optimal sparse F_v for different values of gamma: gamma =  10^{-4}~(circ), 0.0281~(+), 0.1000~(*).
Blue circles are almost on the top of the main diagonal of the optimal centralized F_v.

Also see computational results obtained using other sparsity-promoting functions.

Back to mass-spring system example