混合波束成形| 通过天线空间方向图理解波束成形的物理意义

波束成形的物理意义

在这里插入图片描述
如图, 是在各种教材中经常看到的天线方向图。 上图表示的是当前天线经过波束成形后在空间中 指向 30度方向 (一般考虑的方向是0-180度)。这里解释一下天线方向:
不失一般性的,一个MISO系统的接收信号(简洁起见,省略噪声)可以表示为:

         y 
        
       
         = 
        
       
         h 
        
       
         v 
        
       
         x 
        
       
      
      
      
      
        (1) 
       
      
     
    
   
     \mathbf{y} = \mathbf{h}\mathbf{v}x \tag{1} 
    
   
 </span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.63888em; vertical-align: -0.19444em;"></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">y</span></span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf">h</span></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span><span class="mord mathdefault">x</span></span><span class="tag"><span class="strut" style="height: 1em; vertical-align: -0.25em;"></span><span class="mord text"><span class="mord">(</span><span class="mord"><span class="mord">1</span></span><span class="mord">)</span></span></span></span></span></span></span><br> 那么, <strong>如何把数学建模里的 代表 波束成形向量 的 <span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
  
   
    
    
      v 
     
    
   
     \mathbf{v} 
    
   
 </span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.44444em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span></span></span></span></span> 与 我们平常所说的 将 天线阵列对准某个方向发射的物理意义对应呢</strong>?</p> 

正如我们生活中使用手电筒一样, 把手电筒照向某个方向, 其实就对应于最后某个方向是亮的, 而其他方向是暗的。 波束成形也是如此。 让波束成形后的天线阵列所谓对准某一方向, 指的就是在该方向上的信噪比显著地高于其他方向。

由于噪声的功率是一定的, 信噪比其实就是(1)中

     y 
    
   
  
    \mathbf{y} 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.63888em; vertical-align: -0.19444em;"></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">y</span></span></span></span></span></span>的能量。 也就是:<br> <span class="katex--display"><span class="katex-display"><span class="katex"><span class="katex-mathml"> 
  
   
    
    
      P 
     
    
      = 
     
     
     
       y 
      
     
       H 
      
     
    
      y 
     
    
      = 
     
    
      ∣ 
     
    
      x 
     
     
     
       ∣ 
      
     
       2 
      
     
    
      ∣ 
     
     
     
       v 
      
     
       H 
      
     
     
     
       h 
      
     
       H 
      
     
    
      h 
     
    
      v 
     
    
   
     P=\mathbf{y}^H\mathbf{y}=|x|^2|\mathbf{v}^H\mathbf{h}^H\mathbf{h}\mathbf{v} 
    
   
 </span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathdefault" style="margin-right: 0.13889em;">P</span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 1.08577em; vertical-align: -0.19444em;"></span><span class="mord"><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">y</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.891331em;"><span class="" style="top: -3.113em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathdefault mtight" style="margin-right: 0.08125em;">H</span></span></span></span></span></span></span></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">y</span></span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 1.14133em; vertical-align: -0.25em;"></span><span class="mord">∣</span><span class="mord mathdefault">x</span><span class="mord"><span class="mord">∣</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.864108em;"><span class="" style="top: -3.113em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mord">∣</span><span class="mord"><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.891331em;"><span class="" style="top: -3.113em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathdefault mtight" style="margin-right: 0.08125em;">H</span></span></span></span></span></span></span></span><span class="mord"><span class="mord"><span class="mord mathbf">h</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.891331em;"><span class="" style="top: -3.113em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathdefault mtight" style="margin-right: 0.08125em;">H</span></span></span></span></span></span></span></span><span class="mord"><span class="mord mathbf">h</span></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span></span></span></span></span></span></p> 

由于

     ∣ 
    
   
     x 
    
    
    
      ∣ 
     
    
      2 
     
    
   
  
    |x|^2 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 1.06411em; vertical-align: -0.25em;"></span><span class="mord">∣</span><span class="mord mathdefault">x</span><span class="mord"><span class="mord">∣</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.814108em;"><span class="" style="top: -3.063em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span>也是相同的, 因此对于同一波束成形的天线阵列, 不同方向的信噪比就取决于<span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
   
     ∣ 
    
   
     h 
    
   
     v 
    
    
    
      ∣ 
     
    
      2 
     
    
   
  
    |\mathbf{h}\mathbf{v}|^2 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 1.06411em; vertical-align: -0.25em;"></span><span class="mord">∣</span><span class="mord"><span class="mord mathbf">h</span></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span><span class="mord"><span class="mord">∣</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.814108em;"><span class="" style="top: -3.063em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span></span></span></span></span>.<br> 这里先类比一下, 方便大家理解物理意义:</p> 
手电筒波束成形
改变手电筒的方向改变天线阵列的波束成形向量
将手电筒照向某个方向通过波束成形后天线阵列对准某个方向发送信号
某个方向的亮度当前波束成形下某个方向的信噪比
将有限的能量聚焦于想看的方向将有限的发送功率对准用户所在的方向

明白了物理意义, 现在我们来看如何判断当前的某个

     v 
    
   
  
    \mathbf{v} 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.44444em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span></span></span></span></span>,对应于朝向哪个方向发射。<br> 首先, 根据MISO信道的建模, 我们有, 对于某个方向 <span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
   
     ϕ 
    
   
  
    \phi 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathdefault">ϕ</span></span></span></span></span>,<br> 其对应的归一化ULA阵列信道为:<br> <span class="katex--display"><span class="katex-display"><span class="katex"><span class="katex-mathml"> 
  
   
    
     
     
       h 
      
      
      
        U 
       
      
        L 
       
      
        A 
       
      
     
    
      ( 
     
    
      ϕ 
     
    
      ) 
     
    
      = 
     
     
     
       1 
      
      
      
        N 
       
      
     
     
     
       [ 
      
     
       1 
      
     
       , 
      
      
      
        e 
       
       
       
         − 
        
       
         j 
        
       
         π 
        
       
         cos 
        
       
         ⁡ 
        
       
         ( 
        
       
         ϕ 
        
       
         ) 
        
       
      
     
       , 
      
     
       … 
      
     
       , 
      
      
      
        e 
       
       
       
         − 
        
       
         j 
        
       
         π 
        
       
         ( 
        
       
         N 
        
       
         − 
        
       
         1 
        
       
         ) 
        
       
         cos 
        
       
         ⁡ 
        
       
         ( 
        
       
         ϕ 
        
       
         ) 
        
       
      
     
       ] 
      
     
    
   
     \mathbf{h}_{\mathrm{ULA}}(\phi)=\frac{1}{\sqrt{N}}\left[1, e^{-j \pi \cos(\phi)}, \ldots, e^{-j \pi(N-1) \cos (\phi)}\right] 
    
   
 </span><span class="katex-html"><span class="base"><span class="strut" style="height: 1em; vertical-align: -0.25em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">h</span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height: 0.328331em;"><span class="" style="top: -2.55em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathrm mtight">U</span><span class="mord mathrm mtight">L</span><span class="mord mathrm mtight">A</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height: 0.15em;"><span class=""></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathdefault">ϕ</span><span class="mclose">)</span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 2.25144em; vertical-align: -0.93em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height: 1.32144em;"><span class="" style="top: -2.18333em;"><span class="pstrut" style="height: 3em;"></span><span class="mord"><span class="mord sqrt"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height: 0.926665em;"><span class="svg-align" style="top: -3em;"><span class="pstrut" style="height: 3em;"></span><span class="mord" style="padding-left: 0.833em;"><span class="mord mathdefault" style="margin-right: 0.10903em;">N</span></span></span><span class="" style="top: -2.88666em;"><span class="pstrut" style="height: 3em;"></span><span class="hide-tail" style="min-width: 0.853em; height: 1.08em;"> 
               <svg width="400em" height="1.08em" viewBox="0 0 400000 1080" preserveAspectRatio="xMinYMin slice"> 
                <path d="M95,702c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,

-10,-9.5,-14c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54c44.2,-33.3,65.8,
-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10s173,378,173,378c0.7,0,
35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429c69,-144,104.5,-217.7,106.5,
-221c5.3,-9.3,12,-14,20,-14H400000v40H845.2724s-225.272,467,-225.272,467
s-235,486,-235,486c-2.7,4.7,-9,7,-19,7c-6,0,-10,-1,-12,-3s-194,-422,-194,-422
s-65,47,-65,47z M834 80H400000v40H845z">
1[1,ejπcos(ϕ),,ejπ(N1)cos(ϕ)]
将不同方向的信道络成一个大矩阵

     H 
    
   
  
    \mathbf{H} 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.68611em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf">H</span></span></span></span></span></span>, 其每一行对应于一个方向的<span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
    
    
      h 
     
     
     
       U 
      
     
       L 
      
     
       A 
      
     
    
   
     ( 
    
   
     ϕ 
    
   
     ) 
    
   
  
    \mathbf{h}_{\mathrm{ULA}}(\phi) 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 1em; vertical-align: -0.25em;"></span><span class="mord"><span class="mord"><span class="mord mathbf">h</span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height: 0.328331em;"><span class="" style="top: -2.55em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathrm mtight">U</span><span class="mord mathrm mtight">L</span><span class="mord mathrm mtight">A</span></span></span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height: 0.15em;"><span class=""></span></span></span></span></span></span><span class="mopen">(</span><span class="mord mathdefault">ϕ</span><span class="mclose">)</span></span></span></span></span>信道, 那么我们只需要计算 <span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
    
    
      v 
     
    
      H 
     
    
    
    
      H 
     
    
      H 
     
    
   
     H 
    
   
     v 
    
   
  
    \mathbf{v}^H\mathbf{H}^H\mathbf{H}\mathbf{v} 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.841331em; vertical-align: 0em;"></span><span class="mord"><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.841331em;"><span class="" style="top: -3.063em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathdefault mtight" style="margin-right: 0.08125em;">H</span></span></span></span></span></span></span></span><span class="mord"><span class="mord"><span class="mord mathbf">H</span></span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height: 0.841331em;"><span class="" style="top: -3.063em; margin-right: 0.05em;"><span class="pstrut" style="height: 2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathdefault mtight" style="margin-right: 0.08125em;">H</span></span></span></span></span></span></span></span><span class="mord"><span class="mord mathbf">H</span></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span></span></span></span></span>, 就能得到一个列向量, 其每一项代表了当前波束成形向量<span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
   
     v 
    
   
  
    \mathbf{v} 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.44444em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span></span></span></span></span>在这个方向上的能量大小。</p> 

通过天线方向图和Matlab实例说明

接下来通过实例来说明:

      v 
     
    
      = 
     
     
     
       1 
      
      
      
        N 
       
      
     
     
      
      
        [ 
       
      
        1 
       
      
        , 
       
       
       
         e 
        
        
        
          j 
         
        
          π 
         
        
          cos 
         
        
          ⁡ 
         
        
          ( 
         
        
          θ 
         
        
          ) 
         
        
       
      
        , 
       
      
        … 
       
      
        , 
       
       
       
         e 
        
        
        
          j 
         
        
          π 
         
        
          ( 
         
        
          N 
         
        
          − 
         
        
          1 
         
        
          ) 
         
        
          cos 
         
        
          ⁡ 
         
        
          ( 
         
        
          θ 
         
        
          ) 
         
        
       
      
        ] 
       
      
     
       T 
      
     
    
   
     \mathbf{v}=\frac{1}{\sqrt{N}}\left[1, e^{j \pi \cos(\theta)}, \ldots, e^{j \pi(N-1) \cos (\theta)}\right]^T 
    
   
 </span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.44444em; vertical-align: 0em;"></span><span class="mord"><span class="mord mathbf" style="margin-right: 0.01597em;">v</span></span><span class="mspace" style="margin-right: 0.277778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right: 0.277778em;"></span></span><span class="base"><span class="strut" style="height: 2.31123em; vertical-align: -0.93em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height: 1.32144em;"><span class="" style="top: -2.18333em;"><span class="pstrut" style="height: 3em;"></span><span class="mord"><span class="mord sqrt"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height: 0.926665em;"><span class="svg-align" style="top: -3em;"><span class="pstrut" style="height: 3em;"></span><span class="mord" style="padding-left: 0.833em;"><span class="mord mathdefault" style="margin-right: 0.10903em;">N</span></span></span><span class="" style="top: -2.88666em;"><span class="pstrut" style="height: 3em;"></span><span class="hide-tail" style="min-width: 0.853em; height: 1.08em;"> 
               <svg width="400em" height="1.08em" viewBox="0 0 400000 1080" preserveAspectRatio="xMinYMin slice"> 
                <path d="M95,702c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,

-10,-9.5,-14c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54c44.2,-33.3,65.8,
-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10s173,378,173,378c0.7,0,
35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429c69,-144,104.5,-217.7,106.5,
-221c5.3,-9.3,12,-14,20,-14H400000v40H845.2724s-225.272,467,-225.272,467
s-235,486,-235,486c-2.7,4.7,-9,7,-19,7c-6,0,-10,-1,-12,-3s-194,-422,-194,-422
s-65,47,-65,47z M834 80H400000v40H845z">
1[1,ejπcos(θ),,ejπ(N1)cos(θ)]T
这其实是将天线阵列对准

     θ 
    
   
  
    \theta 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord mathdefault" style="margin-right: 0.02778em;">θ</span></span></span></span></span> 方向发送的波束成形向量。<br> 我们来验证他就是对准了 <span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
   
     θ 
    
   
  
    \theta 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord mathdefault" style="margin-right: 0.02778em;">θ</span></span></span></span></span> 方向, 比如我们令其为 空间30度方向。</p> 
N = 16; 
idx = (0 : N-1)';
angle_set =  (1 : 1 : 360) / 180 * pi;
Hset = exp(1j * pi * idx * cos(angle_set));

theta = 30;
x = exp(1j * pi * idx * cos(theta / 180 * pi));

r =  Hset' * x;
polarplot(angle_set, abs(r))
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

运行后, 就能得到文章开头的那张图了。 这是一个极坐标图, 可以清楚的看到, 在30度方向上是能量最大的, 而在其他绝大部分方向上, 能量为0。这也就是我们一开始说的, 通过有效的波束成形, 可以将能量集中, 让天线阵列对准某个方向发送。

也可以根据自己的画图需求改变一下坐标,比如将上面代码第三行替换为

angle_set =  (0 : 0.01 : 180) / 180 * pi;
  • 1

就是画出0~180度的响应, 并且将分辨率提升至0.01度。
效果如图:
在这里插入图片描述
我们可以试着改变

     N 
    
   
  
    N 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.68333em; vertical-align: 0em;"></span><span class="mord mathdefault" style="margin-right: 0.10903em;">N</span></span></span></span></span>, 即天线数的大小。<br> 如<code>N = 64;</code><br> <img src="https://img-blog.csdnimg.cn/20201015201954304.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zOTI3NDY1OQ==,size_16,color_FFFFFF,t_70#pic_center" alt="在这里插入图片描述"><br> 可以明显的看到,波束更窄了, 能量更集中了。 这也是为什么天线数越多,通信性能越好的原因, 指向性也越为精准。</p> 

UPA的方向图

UPA的话就涉及两个角度了 仰角

     ϕ 
    
   
  
    \phi 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.88888em; vertical-align: -0.19444em;"></span><span class="mord mathdefault">ϕ</span></span></span></span></span> 和 水平角 <span class="katex--inline"><span class="katex"><span class="katex-mathml"> 
 
  
   
   
     θ 
    
   
  
    \theta 
   
  
</span><span class="katex-html"><span class="base"><span class="strut" style="height: 0.69444em; vertical-align: 0em;"></span><span class="mord mathdefault" style="margin-right: 0.02778em;">θ</span></span></span></span></span>。 因此很难用二维的图进行绘制。<br> 这里给出代码, 细节不再赘述, 和ULA的方法类似:<br> 效果图:<br> <img src="https://img-blog.csdnimg.cn/20201015204318391.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl8zOTI3NDY1OQ==,size_16,color_FFFFFF,t_70#pic_center" alt="在这里插入图片描述"></p> 

主函数main.m

clear
M = UPA_code3(16, 32);
phi =  -1 : 0.01 : 1;
theta = -1 : 0.01 : 1;
[aa, bb] = meshgrid(phi, theta);
Aset = []';

G = zeros(512, 1);
G(256+11) = 1;
s = M * G;

for i = 1 : length(phi)
a = phi(i);
for j = 1 : length(theta)
tmp = acos(a);
b = theta(j) / sin(tmp);
ar = UPA_arrayresponse2(16,32, acos(b), acos(a));
C(j,i) = abs(s' * ar);
end
end

surf(aa, bb, C)

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22

调用的两个函数文件:

  • UPA_code3.m
function [Aset] = UPA_code3(P,Q)

% P, Q: rows and columns of UPA
% theta, phi: AODs
Aset = [];
for n = 0 : 1 / P * pi : (P-1)/Ppi
for m = 0 : 1 / Q * pi : (Q-1)/Q
pi
A = zeros(P, Q);
for p = 1 : P
for q = 1 : Q
A(p, q) = exp(1jpi(q-1)cos(m) * sin(n)+1jpi(p-1)cos(n));
end
end
a = A(😃;
Aset = [Aset, a];
end
end

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • UPA_arrayresponse2.m
function [A] = UPA_arrayresponse2(P,Q, theta, phi)

% P, Q: rows and columns of UPA
% theta, phi: AODs
A = zeros(P, Q);
for p = 1 : P
for q = 1 : Q
A(p, q) = exp(1jpi(q-1)sin(phi)cos(theta)+1jpi(p-1)*cos(phi));
end
end

A = A(😃;

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

相关阅读

posted @ 2023-07-20 18:02  SymPny  阅读(130)  评论(0编辑  收藏  举报