利用流型的优化方法(manifold optimization)

方法简要总结

在这里插入图片描述

什么是流型

流形(manifold)是几何中的一个概念,它是高维空间中的几何结构,即空间中的点构成的集合。可以简单的将流形理解成二维空间的曲线,三维空间的曲面在更高维空间的推广。下图是三维空间中的一个流形,这是一个卷曲面:

在这里插入图片描述

针对RIS相位优化的子问题

介绍下面论文中的优化方法
https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=9090356
Recall that ϕ m = e j θ m , ∀ m \phi_{m}=e^{j \theta_{m}}, \forall m ϕm=ejθm,m, and that ϕ = [ ϕ 1 , ⋯   , ϕ M ] T \boldsymbol{\phi}=\left[\phi_{1}, \cdots, \phi_{M}\right]^{\mathrm{T}} ϕ=[ϕ1,,ϕM]T
min ⁡ ϕ f ( ϕ ) ≜ ϕ H Ξ ϕ + 2 Re ⁡ { ϕ H v ∗ }  s.t.  ∣ ϕ m ∣ = 1 , m = 1 , ⋯   , M . (35) \begin{array}{l} \min _{\boldsymbol{\phi}} f(\boldsymbol{\phi}) \triangleq \boldsymbol{\phi}^{\mathrm{H}} \boldsymbol{\Xi} \boldsymbol{\phi}+2 \operatorname{Re}\left\{\boldsymbol{\phi}^{\mathrm{H}} \mathbf{v}^{*}\right\} \\ \text { s.t. }\left|\phi_{m}\right|=1, \quad m=1, \cdots, M . \tag {35} \end{array} minϕf(ϕ)ϕHΞϕ+2Re{ ϕHv} s.t. ϕm=1,m=1,,M.(35)

MM方法

见我之前的博客记录方法

Complex Circle Manifold (CCM) Method

在本小节中,我们采用文[35]中提出的CCM方法直接求解问题(35)。 我们首先将问题(35)转化为下面的等价问题

min ⁡ ϕ f ˉ ( ϕ ) ≜ ϕ H ( Ξ + α I M ) ϕ + 2 Re ⁡ { ϕ H v ∗ }  s.t.  ∣ ϕ m ∣ = 1 , m = 1 , ⋯   , M (41) \begin{array}{l} \min _{\phi} \bar{f}(\phi) \triangleq \phi^{\mathrm{H}}\left(\boldsymbol{\Xi}+\alpha \mathbf{I}_{M}\right) \phi+2 \operatorname{Re}\left\{\phi^{\mathrm{H}} \mathbf{v}^{*}\right\} \\ \text { s.t. }\left|\phi_{m}\right|=1, \quad m=1, \cdots, M \tag{41} \end{array} minϕfˉ(ϕ)ϕH(Ξ+αIM)ϕ+2Re{ ϕHv} s.t. ϕm=1,m=1,,M(41)
其中 α > 0 \alpha>0 α>0是一个正常数参数,其值将在定理1中给出。 问题(35)与问题(41)等价,因为我们有 α ϕ H ϕ = α M \alpha \phi^{\mathrm{H}} \boldsymbol{\phi}=\alpha M αϕHϕ=αM。 参数 α \alpha α可以控制CCM方法的收敛性,这将在定理1中讨论。
问题(41)中的搜索空间可以看作the
product of M M M complex circles(Each complex circle is given by S ≜ { x ∈ C : x ∗ x = Re ⁡ { x } 2 + Im ⁡ { x } 2 = 1 } \mathcal{S} \triangleq\left\{x \in \mathbb{C}: x^{*} x=\operatorname{Re}\{x\}^{2}+\right.\left.\operatorname{Im}\{x\}^{2}=1\right\} S{ xC:xx=Re{ x}2+Im{ x}2=1}
which is a sub-manifold of C [35]),它是 C M \mathbb{C}^{M} CM的子流形,由
S M ≜ { x ∈ C M : ∣ x l ∣ = 1 , l = 1 , 2 , ⋯   , M } (42) \mathcal{S}^{M} \triangleq\left\{\mathbf{x} \in \mathbb{C}^{M}:\left|x_{l}\right|=1, l=1,2, \cdots, M\right\} \tag{42} SM{ xCM:xl=1,l=1,2,,M}(42)
where x l x_{l} xl is the l l lth element of vector x \mathbf{x} x

CCM算法的主要思想是基于(42)定义的流形空间推导出梯度下降算法,它类似于在欧几里得空间上为传统优化开发的梯度下降技术的概念。 CCM算法的主要步骤由每次迭代T中的四个主要步骤组成:

Step1 Gradient in Euclidean Space

我们首先要找到搜索方向,对于极小化问题,最常见的搜索方向是向与 f ˉ ( ϕ t ) \bar{f}\left(\phi^{t}\right) fˉ(ϕt)梯度相反的方向移动,该方向由

η t = − ∇ ϕ f ˉ ( ϕ t ) = − 2 ( Ξ + α I M ) ϕ t − 2 v ∗ (43) \boldsymbol{\eta}^{t}=-\nabla_{\boldsymbol{\phi}} \bar{f}\left(\boldsymbol{\phi}^{t}\right)=-2\left(\boldsymbol{\Xi}+\alpha \mathbf{I}_{M}\right) \boldsymbol{\phi}^{t}-2 \mathbf{v}^{*} \tag{43} ηt=ϕfˉ(ϕt)=2(Ξ+αIM)ϕt2v(43)

Step2 Riemannian gradients:

黎曼梯度与欧几里得梯度是相对并列的概念:

由于我们在流形空间上进行优化,我们必须找到黎曼梯度[12]。 f ˉ ( ϕ t ) \bar{f}\left(\phi^{t}\right) fˉ(ϕt)在当前点 ϕ t ∈ S M \phi^{t} \in \mathcal{S}^{M} ϕtSM处的黎曼梯度是在切空间 T ϕ t S M \mathcal{T}_{\phi^{t}} \mathcal{S}^{M} TϕtSM中( S \mathcal{S} S在点 z m z_{m} zm处的切空间定义为 T z m S = { x ∈ C : Re ⁡ { x ∗ z m } = 0 } \mathcal{T}_{z_{m}} \mathcal{S}=\{x \in \mathbb{C}:\left.\operatorname{Re}\left\{x^{*} z_{m}\right\}=0\right\} TzmS={ xC:Re{ xzm}=0}。 则切空间 T z S M \mathcal{T}_{\mathbf{z}} \mathcal{S}^{M} TzSM是由 T z S M = T z 1 S × T z 2 S ⋯ × T z M S \mathcal{T}_{\mathbf{z}} \mathcal{S}^{M}=\mathcal{T}_{z_{1}} \mathcal{S} \times \mathcal{T}_{z_{2}} \mathcal{S} \cdots \times \mathcal{T}_{z_{M}} \mathcal{S} TzSM=Tz1S×Tz2S×TzMS给出的 M M M个切空间 T z m S \mathcal{T}_{z_{m}} \mathcal{S} TzmS的乘积) 。具体地说,将欧氏空间中的搜索方向 η t \boldsymbol{\eta}^{t} ηt用投影算子投影到 T ϕ t S M \mathcal{T}_{\phi^{t}} \mathcal{S}^{M} TϕtSM上,就可以得到 f ˉ ( ϕ t ) \bar{f}\left(\phi^{t}\right) fˉ(ϕt) ϕ t \phi^{t} ϕt处的黎曼梯度,其计算方法如下[12]:
P T ϕ t S M ( η t ) = η t − Re ⁡ { η t ∗ ⊙ ϕ t } ⊙ ϕ t (44) \mathbf{P}_{\mathcal{T}_{\phi^{t}} \mathcal{S}^{M}}\left(\boldsymbol{\eta}^{t}\right)=\boldsymbol{\eta}^{t}-\operatorname{Re}\left\{\boldsymbol{\eta}^{t *} \odot \boldsymbol{\phi}^{t}\right\} \odot \boldsymbol{\phi}^{t} \tag{44} PTϕtSM(ηt)=ηtRe{ ηtϕt}ϕt(44)

Step3 Update over the tangent space

在切空间( tangent space)上更新:在切空间 T ϕ t S M \mathcal{T}_{\phi^{t}} \mathcal{S}^{M} TϕtSM上更新当前点 ϕ t \boldsymbol{\phi}^{t} ϕt:

ϕ ˉ t = ϕ t + β P T ϕ t S M ( η t ) (45) \bar{\phi}^{t}=\phi^{t}+\beta \mathbf{P}_{\mathcal{T}_{\phi^{t}} \mathcal{S}^{M}}\left(\boldsymbol{\eta}^{t}\right) \tag{45} ϕˉt=ϕt+βPTϕtSM(ηt)(45)

其中β是常数步长,将在定理1中讨论。

Step4 Retraction operator

一般情况下,得到的 ϕ ˉ t \bar{\phi}^{t} ϕˉt不在 S M \mathcal{S}^{M} SM中,即。 我们有 ϕ ˉ t ∉ S M \bar{\phi}^{t} \notin \mathcal{S}^{M} ϕˉt/SM。 因此,必须通过如下使用缩回操作器(缩回运算符将 ϕ ˉ t \bar{\phi}^{t} ϕˉt的每个元素归一化为单位值。)将其映射到流形 S M \mathcal{S}^{M} SM

ϕ t + 1 = ϕ ˉ t ⊙ 1 ∣ ϕ ˉ t ∣ (46) \phi^{t+1}=\bar{\phi}^{t} \odot \frac{1}{\left|\bar{\phi}^{t}\right|} \tag{46} ϕt+1=ϕˉt ϕˉt 1(46)

注意, ϕ ˉ t + 1 \bar{\phi}^{t+1} ϕˉt+1 ϕ ˉ t \bar{\phi}^{t} ϕˉt都属于满足单位常数模约束的 S M \mathcal{S}^{M} SM。 CCM算法的细节在算法3中给出。 CCM算法在Fig2中也得到了几何学的说明. 下面的定理为参数α和β的选择提供了指导,以保证CCM算法的收敛性。

Theorem 1 [35]: Let λ Ξ \lambda_{\boldsymbol{\Xi}} λΞ and λ Ξ + α I \lambda_{\boldsymbol{\Xi}+\alpha \mathbf{I}} λΞ+αI
be the largest eigenvalue of matrices Ξ \boldsymbol{\Xi} Ξ and Ξ + α I \boldsymbol{\Xi}+\alpha \mathbf{I} Ξ+αI, respectively. If α and β
are chosen to satisfy the following condition:

α ≥ M 8 λ Ξ + ∥ v ∥ 2 , 0 < β < 1 λ Ξ + α I (47) \alpha \geq \frac{M}{8} \lambda_{\boldsymbol{\Xi}}+\|\mathbf{v}\|_{2}, \quad 0<\beta<\frac{1}{\lambda_{\boldsymbol{\Xi}+\alpha \mathbf{I}}} \tag{47} α8MλΞ+v2,0<β<λΞ+αI1(47)

then the CCM algorithm generates a non-increasing sequence
{ f ˉ ( ϕ t ) , t = 1 , 2 , ⋯   } \left\{\bar{f}\left(\phi^{t}\right), t=1,2, \cdots\right\} { fˉ(ϕt),t=1,2,}, and finally converges to a finite
value.

在这里插入图片描述

some code

一些关于CCM优化 An-Overview-of-Signal-Processing-Techniques-for-RIS-IRS-aided-Wireless-Systems的作者放在GitHub的代码(不是我写的,仅供参考):

function [e_opt,obj_e] = Generate_beamforming_e(N, M, K, G_tilde, z, W, e_ini, noise, power)

%%  Generate the parameters  %%%%%
A = zeros(size(G_tilde,2),size(G_tilde,2));
a = zeros(size(G_tilde,2),1);
for k = 1 : K
    A = A + abs( z(k) )^2 * G_tilde(:,:,k)' * W * W' * G_tilde(:,:,k);
    a = a + ( z(k) * W(:,k).' * conj( G_tilde(:,:,k) ) )';
end
e_tilde  = [e_ini;1];

% 黎曼梯度与欧几里得梯度
grad_euc = - ( A.' * e_tilde - a );
grad_Rie = grad_euc - real( conj( grad_euc ) .* e_tilde ) .* e_tilde;
beta = 100;
% tang域值,并归一化
e_tang   = e_tilde + beta * grad_Rie;
e_opt    = e_tang(1:M) ./ abs(e_tang(1:M));
ee    = [ e_opt; 1 ];
obj_e = ee' * A.' * ee - 2 * real( a' * ee ) + noise * z' * z + K;
end
close all;
clear all;clc;
warning('off');
rand('twister',mod(floor(now*8640000),2^31-1));

N          = 10;            % array number of BS
M_all      = 10:10:100;            % array number of IRS
K          = 4;            % number of users in each group

SNR        = 5;     % dBm
noise      = 1; % W
power      = 10^(SNR/10)*noise;


%% Simulation loop %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
num_loop = 1000; 
for loop = 1 : num_loop
    outerflag=1; 
    for m = 1 : length(M_all)
        t0 = cputime;
        M  = M_all(m);
        %%%%%  Generate channel  %%%%%
        H   = (1/sqrt(2)) * ( randn(N,M) + 1i*randn(N,M) );
        H   = H / norm( H, 'fro' ) * sqrt( N * M );
        h_r = (1/sqrt(2)) * ( randn(M,K) + 1i*randn(M,K) );
        h_r = h_r / norm( h_r, 'fro' ) * sqrt( K * M );
        h_d = (1/sqrt(2)) * ( randn(N,K) + 1i*randn(N,K) );
        h_d = h_d / norm( h_d, 'fro' ) * sqrt( K * M );
        G=[];  G_tilde=[];
        for k=1:K
            G(:,:,k,m,loop)       = H * diag(h_r(:,k));
            G_tilde(:,:,k,m,loop) = [G(:,:,k,m,loop) h_d(:,k)];
        end
    end
end
save('G','G');
save('G_tilde','G_tilde');
%By Zhou Gui
%From 2019-2-14 to 
close all;
clear all;clc;
warning('off');
rand('twister',mod(floor(now*8640000),2^31-1));
%% Parameters Initialization %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% '1' stands for source-relays; '2' stands for relays-destination
N          = 10;            % array number of BS
M_all      = 100:10:100;            % array number of IRS
K          = 4;            % number of users in each group

SNR        = 5;     % dBm
noise      = 1; % W
power      = 10^(SNR/10)*noise;


%% Simulation loop %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
num_loop = 100; 
for loop = 1 : num_loop
    outerflag=1; 
for m = 1 : length(M_all)
    t0 = cputime;
    M  = M_all(m);
    %%%%%  Generate channel  %%%%%
    H   = (1/sqrt(2)) * ( randn(N,M) + 1i*randn(N,M) );
    H   = H / norm( H, 'fro' ) * sqrt( N * M );
    h_r = (1/sqrt(2)) * ( randn(M,K) + 1i*randn(M,K) );
    h_r = h_r / norm( h_r, 'fro' ) * sqrt( K * M );
    h_d = (1/sqrt(2)) * ( randn(N,K) + 1i*randn(N,K) );
    h_d = h_d / norm( h_d, 'fro' ) * sqrt( K * M );
    G=[];  G_tilde=[];
    for k=1:K
        G(:,:,k)       = H * diag(h_r(:,k));
        G_tilde(:,:,k) = [G(:,:,k) h_d(:,k)];
    end

    %%%%%  Initialization  %%%%% 
    e_ini = [];  e_ini    = ones(M,1);
%     e_ini = [];  e_ini    = exp(1j*angle((1/sqrt(2)) * ( randn(M,1) + 1i*randn(M,1) )));
    W_ini = [];  W_ini    = ones(N,K)*sqrt(power/(N*K)); 
    W     = [];  W(:,:,1) = W_ini;
    e     = [];  e(:,1)   = e_ini;
    
    num_iterative = 10000;
    for n  = 1 : num_iterative
       %%%%%  Optimize a  %%%%%
       for k=1:K
           gk(:,k) = G_tilde(:,:,k)*[ conj(e(:,n)); 1];
           z(k,1)  = W(:,k,n)' * gk(:,k) / ( gk(:,k)'*W(:,:,n)*W(:,:,n)'*gk(:,k) + noise );
       end
       
       %%%%%  Optimize W  %%%%%
       P   = gk*diag(z');
       F_0 = inv(P*P')*P;
       if norm(F_0,'fro')^2 <= power
          F = F_0;
       else
          lambda_max = 20;
          lambda_min = 0;
          while   (lambda_max-lambda_min) > 10^(-5)
              lambda     = ( lambda_max + lambda_min ) / 2;
              F = inv(P*P' + lambda*eye(N))*P;
              if norm(F,'fro')^2 > power 
                 lambda_min = lambda;
              else if norm(F,'fro')^2 < power 
                      lambda_max = lambda;
                  end
              end
          end
       end
       W(:,:,n+1) = F;
       
       
       %%%%%  Optimize e  %%%%%
        [e_opt,obj] = Generate_beamforming_e(N, M, ...
                        K, G_tilde, z, W(:,:,n+1), e(:,n), noise, power);
        obj_e(n+1)=obj;
        e(:,n+1)=e_opt;
    
        %%%%%  stop criterion  %%%%%
        if abs(obj_e(n+1)-obj_e(n))<10^(-7)
            break;
        end
        x=[loop,m,n]
    end
 
    %%%%%  Generate rate  %%%%%
    F = W(:,:,n+1);
    e_tilde = [ e(:,n+1); 1 ];
    rate=0;
    for k=1:K
        temp = F(:,k)' * G_tilde(:,:,k) * conj( e_tilde );
        r(k) = e_tilde.' *G_tilde(:,:,k)' * F * F' * G_tilde(:,:,k) * conj( e_tilde ) + noise;
        r_g(k) = r(k) - temp' * temp;
        rate = rate + log2( 1 + temp'*temp / r_g(k) );
    end
    Rate(loop,m)=real(rate);

    t2=cputime;
    CPU_Time(loop,m)=t2-t0;
end
    save('Rate','Rate');
    save('CPU_Time','CPU_Time');
end
a=1;
    

猜你喜欢

转载自blog.csdn.net/qq_45542321/article/details/131196436