Efficient Synthesis of Sparse Arrays
- 格式:pdf
- 大小:696.43 KB
- 文档页数:4
基于压缩感知的下视三维SAR成像新方法李学仕;孙光才;徐刚;邢孟道;梁毅【摘要】下视3维合成孔径雷达(Synthetic Aperture Radar,SAR)可对平台正下方目标进行3维重构,具有广阔的应用前景.为有效减少线阵天线所需阵元数,该文提出了一种基于稀疏阵列的下视3维SAR成像方法.为了抑制稀疏阵列导致的栅瓣效应,该方法结合压缩感知(Compressed Sensing,CS)理论,实现对下方3维目标的成像.分析了稀疏阵列配置对稀疏信号处理的影响以及3维成像采用稀疏信号处理的可行性.最后通过仿真实验验证了该文分析的正确性及算法的有效性.%Downward-looking 3-D Synthetic Aperture Radar (SAR) can be used for three-dimensional reconstruction of the targets in the inferior of the platform of the SAR, and it has wide application prospects. An imaging method of downward-looking 3-D SAR is proposed, which is in the case of the thinned arrays, and this method reduces effectively the antenna elements. In order to suppress the sidelobe brought by thinned arrays, the Compressed Sensing (CS) theory is used in the proposed method. This paper also analysis how distribution of the sparse arrays influences the sparse signal processing and the feasibility of using the compressed sensing theory in 3-D SAR imaging. The simulation results validate the correctness of the analysis and the effectiveness of the proposed algorithm.【期刊名称】《电子与信息学报》【年(卷),期】2012(034)005【总页数】7页(P1017-1023)【关键词】压缩感知;3维SAR;下视;多发多收【作者】李学仕;孙光才;徐刚;邢孟道;梁毅【作者单位】西安电子科技大学雷达信号处理国家重点实验室西安710071;西安电子科技大学雷达信号处理国家重点实验室西安710071;西安电子科技大学雷达信号处理国家重点实验室西安710071;西安电子科技大学雷达信号处理国家重点实验室西安710071;西安电子科技大学雷达信号处理国家重点实验室西安710071【正文语种】中文【中图分类】TN957.521 引言传统的合成孔径雷达(Synthetic Aperture Radar,SAR)只能得到场景的 2维像,现实中,各种各样的应用需求都需要雷达具有下视3维SAR成像能力,如特殊地形的勘探、测绘、城市规划以及环境破坏的影响分析等[1,2]。
运用增广矩阵束方法稀布优化平面阵唐斌;郑美燕;陈客松;吴宏刚;刘先攀【摘要】基于增广矩阵束方法(Matrix Enhancement and Matrix Pencil,MEMP),以使用尽可能少的阵元逼近期望的方向图为目标,提出了一种求解阵元位置和设计激励幅度的新方法.首先对期望平面阵的方向图进行采样得到离散的数据集,再构造增广矩阵,对此增广矩阵进行奇异值分解(Singular Value Decomposition,SVD),确定逼近期望方向图所需的最小阵元数目;基于广义特征值分解求解两组特征值,并根据类基于旋转不变技术的信号参数估计(Estimating Signal Parameters Via Rotational Invariance Techniques,ESPRIT)对这两组特值配对;在最小二乘准则下求解稀布面阵的阵元位置和激励.仿真试验验证了该方法在稀布平面阵优化问题中的高效性和数值精度.【期刊名称】《电波科学学报》【年(卷),期】2013(028)003【总页数】7页(P540-546)【关键词】平面阵列;稀布阵;增广矩阵束方法(MEMP);奇异值分解(SVD);低秩逼近矩阵【作者】唐斌;郑美燕;陈客松;吴宏刚;刘先攀【作者单位】电子科技大学电子工程学院,四川成都611731;成都航空职业技术学院航空电子工程系,四川成都610100;电子科技大学电子工程学院,四川成都611731;电子科技大学电子工程学院,四川成都611731;中国民用航空局第二研究所,四川成都610041;电子科技大学航空航天学院,四川成都611731【正文语种】中文【中图分类】TN820.1+5;TN820.1+3引言近几十年来,平面天线在雷达、通信、卫星电视接收等方面得到广泛的应用.通常情况下阵元数目决定一个系统的复杂度和成本,因此使用尽可能少的阵元达到系统要求是阵列设计的重要问题.综合非均匀平面阵列的阵元激励是一个线性问题,然而综合阵元相位和位置是一个包含多个未知量的高度非线性优化问题.一种方案是对均匀间隔的阵列进行稀疏化设计,得到稀疏阵列;另一种方案是对阵元随机稀布,使阵元在稀布过程中有更大的自由度,可以获得比稀疏阵列更好的性能,称为稀布阵列.目前已经有许多综合稀布阵列的方法,包括优化算法(如遗传算法(Genetic Algorithms,GA)[1]、微分进化算法(Differential Evolution Algorithm,DEA)[2]、粒子群优化方法(Particle Swarm Optimization,PSO)[3]、模拟退火方法[4]、矩阵束方法(Matrix Pencil Method,MPM))和其他综合技术等.其中,GA、DEA和PSO适合求解全局最优解,但是非常耗时;MPM已成功应用于可分离型分布的平面阵列的稀布综合中,然而可分离型平面阵列只能保证两个主平面内方向图的最佳特性,并不能保证在任一平面内方向图都是最佳的.使平面阵产生的方向图在每一剖面上都是最佳方向图,其关键是采用不可分离型分布的平面阵.如何将MPM扩展应用到不可分离型分布的阵列综合中,本文提出一种新的方法-增广矩阵束方法(Matrix Enhancement and Matrix Pencil, MEMP)[5].目前还未见将MEMP应用到平面阵列综合中的报道,本文对此展开研究.首先对期望的方向图进行采样得到离散的数据集合,并由采样点数据根据隔断和堆放的过程构造增广矩阵,对此增广矩阵进行奇异值分解,确定在误差允许范围内所需的阵元数目;然后基于广义特征值分解分别求解两组特征值,并根据文献[6]的配对方法实现两组特征值的正确配对;最后在最小二乘准则的条件下求得稀布面阵的阵元位置和激励.仿真试验分别优化激励为1的平面阵(等激励阵列)和切比雪夫平面阵(非等激励阵列),使用尽可能少的阵元逼近均匀分布阵列的方向图,并保持原阵列的特性,仿真结果证明了该方法的有效性.1 增广矩阵束用于平面阵列综合1.1 阵列的最优化模型在三维空间任意排列的阵列如图1所示.此阵列由N个阵元组成,位于(ri,θi,φi)第i 个单元的激励记为Ri,每个阵元均为全向辐射元.图1 任意阵元的参考坐标根据电磁波的叠加原理,阵因子可写为[7](1)式中: k=2π/λ,λ为工作波长;cos αi=sin θsin θicos(φ-φi)+cos θcos θi,(2)0≤θ≤π,0≤φ≤2π分别表示方位角和俯仰角.针对本文的平面阵,式(1)可简化为(3)式中: dx和dy分别为第i个阵元的横坐标和纵坐标; u=sin θcos φ;v=sin θsin φ .1.2 最小阵元数目估计MEMP是在误差允许范围内,使用尽可能少的阵元形成新的平面阵列来逼近期望方向图.因此,最优化问题的数学描述为(4)式中:和分别为新阵列中阵元的激励、横坐标和纵坐标.本文使用的是总体最小二乘准则,取L=2.对期望的方向图从u=-1、v=-1到u=1、v=1进行均匀采样,则um=mΔ=m/N,其中m=-N,…,0,…,N;vn=nΔ=n/N,其中n=-N,…,0,…,N.共有(2N+1)(2N+1)个采样点.任一采样点处的值为(5)式中yi=ejkdixΔ=ejkdix/N和zi=ejkdiyΔ=ejkdiy/N.然后,由方向图的采样数据构造增广矩阵Xe.(6)式中:Xm=(7)式中: x(m,n)=f(m-N,n-N); Xe是Hankel块矩阵; Xm是Hankel矩阵.参数K 和L的选择满足条件:(8)对增广矩阵Xe进行奇异值分解(SVD),表达式为(9)min=min{KL,(2N+2-K)(2N+2-L)}是增广矩阵Xe较小的维数; Us、Σs、Vs包含N个主特征值和主特征向量,Un、Σn、Vn包含剩余特征值和特征向量.具体为:Us=[u1,u2,…,uN],Σs=diag{σ1,σ1,…,σN},Vs=[v1,v2,…,vN],Un=[uN+1,uN+2,…,umin],Σn=diag{σN+1,σN+2,…,σmin},Vn=[vN+1,vN+2,…,vmin].式中,σ1≥σ2≥…≥σmin.增广矩阵Xe的秩等于非零奇异值的数目,一般由N个阵元组成的阵列则有N个非零奇异值,即σi>0(i=1,…,N),当i>N+1时,σi=0,因此,Σn为0.式(9)可以化简为(10)文献[8]的结果表明,重要奇异值的数目要小于总的阵元数,也就是说一些不重要的阵元的贡献可以由其他重要阵元的组合代替,因此可以舍弃不重要的奇异值来获得增广矩阵Xe的低秩逼近矩阵XQ,这个低秩逼近矩阵对应着更少的阵元组成的新阵列.通常的处理方法是将这些小的奇异值设为0,即:(11)式中,ΣQ=diag{σ1,σ1,…,σQ,0,…,0},Q≤N.在实际的阵列综合中,Q的最小值可以通过下式确定[9](12)ε是一个很小的正数,ε的选择取决于重构方向图和期望方向图的逼近程度.1.3 求解特征值yi和zi矩阵束方法[10-11]求解特征值是通过构造两个矩阵求其广义特征值而得到,利用文献[6]中的配对算法估计出(yi,zi)对.1.3.1 提取特征值yi低秩矩阵XQ获得后,求解特征值yi即是求解下式的广义特征值:(XQ,f-yXQ,l)v=0,(13)式中: XQ,f和XQ,l分别由XQ去掉前L列和后L列得到.等效于求解下列广义特征值问题(U2-yU1)v=0,(14)式中:U2和U1由UQ分别去掉前L行和后L行得到,UQ是式(10)Us的Q个左特征向量.因此,矩阵束U2-yU1可以化为(U2-yU1)=E1(Yd-yI)Ta,(15)式中,Yd是由特征值{y i,i=1,…,Q}组成的对角矩阵.1.3.2 提取特征值zi为提取另一组特征值集合{zi,i=1,…,Q},引入置换矩阵PP= [pT(1),pT(1+L), …,pT(1+(K-1)L),pT(2),pT(2+L), …,pT(2+(K-1)L),……pT(L),pT(L+L),…,pT(1+(K-1)L)]T.(16)矩阵P的元素p(i)是一个KL×1的向量,且除了第i行为1外,其他皆为0.用P左乘Us,则得UsP=PUs.(17)由式(14)可知,求解特征值zi等效于求解下式的广义特征值(U2P-zU1P)v=0,(18)式中: U2P和U1P由UQP分别去掉前K行和后K行得到,UQP是式(17)UsP 的Q个左特征向量.因此,矩阵束U2P-zU1P可以化为(U2P-zU1P)=E1P(Zd-zI)Tb,(19)式中,Zd是由特征值{zi,i=1,…,Q}组成的对角矩阵.1.3.3 对特征值yi和zi进行配对由式(15)和(19)可得:(20)通过标量β将矩阵F1和F2线性组合,并对其对角化分解的变换矩阵为T.βF1+(1-β)F2=T-1DT .(21)由T、Ta和Tb求得两组置换矩阵P1和P2:P1=T-1Ta, P2=T-1Tb.(22)P1和P2每一行最大元素的位置构成向量p1和p2.p1中第k个位置所对应的特征值和p2中第k个位置对应的特征值构成正确的特征值对.文献[12]应用类ESPRIT算法对特征值配对,得到的只是特征值的近似值,此配对方法可得到更精确的特征值.1.4 求解阵元位置和激励一旦求出特征值yi和zi,阵元位置可以通过文献[8]的式(13)求出:(23)如文献[8]所说,各种方向图的综合实例表明:就对称针状波束方向图而言,和的虚部要比实部小得多.例如,切比雪夫平面阵方向图的综合,和的虚部要比实部小10个数量级.在这种情况下,直接取和的实部即可.阵元位置的计算如下:(24)式中:(25)阵元激励可通过下式求得(26)矩阵R的对角线上的元素即是Ri(i=1,…,Q).式中:(27)式中:(28)(29)式中:(30)(31)(32)1.5 算法流程1) 对期望平面阵的方向图进行采样,并由采样点数据构造增广矩阵Xe,如式(6)所示.2) 对增广矩阵Xe进行SVD,计算出其奇异值和左特征向量Us.3) 根据式(12)确定逼近期望方向图所需的最小阵元数目Q.4) 由式(15)和(19)分别提取特征值yi和zi,并按照式(21)对特征值yi和zi进行配对.5) 由式(24)和(26)计算重构阵列阵元位置和激励.2 仿真实例为说明增广矩阵束方法的有效性,本文给出以下两个实例来减小期望方向图的阵元数目,并使重构阵列保持原阵列的特性.例1:综合激励为1的矩形平面阵设有一7×7的矩形平面阵,其阵元均匀分布在矩形栅格上,阵元间距dx=dy=λ/2,方向图如图2(a)所示.首先对此方向图进行采样,共有(2×49+1)(2×49+1)个采样点,并由这些采样点数据按照隔断和堆放的过程构造增广矩阵.矩阵束参数K=L=50.由式(12)可知,当ε=10-6所需的阵元数为Q=36,然后基于广义特征值分解提取两组特征值,并应用配对算法对特征值进行配对,最后在最小二乘准则的约束下求得稀布面阵的阵元位置和激励.根据上述流程求得重构阵列的方向图如图2(b)所示.图3对比了期望方向图和重构方向图的切面图.(a) 均匀平面阵的方向图(b) 重构平面阵的方向图图2 综合激励为1的矩形平面阵的方向图由图可知,非均匀分布的阵列只需要36个阵元便可精确重构均匀分布时需要49个阵元才能产生的方向图,此例可节省27%的阵元.图4给出了均匀分布和稀布后的阵元位置图.表1列出了均匀分布的阵元位置以及稀布后的阵元位置和激励.因阵元是对称分布的,只给出了第一象限内阵元的位置和激励.表1 均匀阵元的位置和非均匀阵列阵元的位置与激励均匀阵列的阵元位置0.0,1.50.5,1.51.0,1.51.5,1.50.0,1.00.5,1.01.0,1.01.5,1.00.0,0.50.5,0.51.0,0.51.5,0.50.0,0.00.5,0.01.0,0.01.5,0.0非均匀阵列的阵元位置(激励)0.3188,1.4912(1.3481)0.9342,1.4912(1.2523)1.4912,1.4912(1.1118)0.3188,0.9342(1.5185)0.9342,0.9342(1.4106)1.4912,0.9342(1.2523)0.3188,0.3188(1.6347)0.9342,0.3188(1.5185)1.4912,0.3188(1.3481) 图3 方向图的截面图图4 阵元位置图例2:综合切比雪夫平面阵(a) 切比雪夫平面方向图(b) 重构平面阵方向图图5 综合切比雪夫平面阵的方向图设有一4×4的切比雪夫平面阵,其阵元均匀分布在矩形栅格上,阵元间距dx=dy=λ/2,要求其环状副瓣的电平为-20 dB.在此例中,共有(2×16+1)(2×16+1)个采样点,增广矩阵束参数K=L=17.按照例1的步骤求得稀布平面阵的阵元位置和激励.图5是切比雪夫方向图和稀布平面阵方向图.旁瓣电平为-16.504 2 dB.图6对比了重构方向图和期望方向图的切面图,进一步增加阵元数目也不会改善方向图的特性.虽然旁瓣电平有小幅抬高(3.495 8 dB),但可以节省43.75%的阵元.图7给出了均匀切比雪夫平面阵的阵元位置和稀布后的阵元位置图.表2列出了均匀分布条件下阵元的位置和激励以及稀布后的阵元位置和激励.图6 方向图的截面图图7 阵元位置图表2 切比雪夫阵列和重构阵列的阵元位置与激励切比雪夫平面阵的阵元位置(激励)0.25,0.75(0.6854)0.75,0.75(0.2285)0.25,0.25(0.9008)0.75,0.25(0.6854)非均匀阵列的阵元位置(激励)-0.5819,0.5815(0.8882)0.0049,0.6404(1.3491)0.5845,0.5871(0.8724)-0.6362,-0.0036(1.3614)0,0(1.7599)0.6362,0.0036(1.3614)-0.5845,-0.5871(0.8724)-0.0049,-0.6404(1.3491)0.5819,-0.5815(0.8882)3 结论提出了一种基于增广矩阵束(MEMP)方法的减小最小阵元数目、求解阵元位置和设计激励幅度的平面阵列综合方法,与基于随机优化的算法相比,基于增广矩阵束的方法是一种非迭代算法,适合于要求窄波束、低副瓣阵列的设计.另外,与基于矩阵束方法的可分离型分布的平面阵列综合相比,增广矩阵束方法可用于不可分离型分布的平面阵的综合,从而保证方向图在每一剖面的最佳特性.本文的探讨丰富了增广矩阵束方法在稀布平面阵列综合中的应用,为其他种类的稀布阵列综合提供了有益的提示,也为其在工程应用中提供了有价值的参考.参考文献[1] 陈客松,何子述.平面稀布天线阵列的优化算法[J].电波科学学报,2009,24(2):193-198.CHEN Kesong,HE Zishu. Synthesis approach for sparse plane arrays[J]. Chinese Journal of Radio Science,2009,24(2):193-198.(in Chinese)[2] KURUP D G, HIMDI M. Synthesis of uniform amplitude unequally spaced antenna arrays using the differential evolution algorithm[J]. IEEE Trans on Antenna and Propagation,2003,51(9): 2210-2217.[3] DELIGKARIS K.V,ZAHARIS Z.D.Thinned planar array design using boolean PSO with velocity mutation[J].IEEE Trans on Magnetics,2009,45(3):1490-1493.[4] 郭陈江,张锋,丁君,等.基于循环差集与模拟退火法的阵列综合[J].电波科学学报,2007,22(6):962-964.GUO Chenjiang,ZHANG Feng,DING Jun,et al. Array synthesis using cyclic difference sets and simulated annealing[J].Chinese Journal of Radio Science,2007,22(6):962-964.(in Chinese)[5] HUA Yingbo.Estimating Two-dimensional frequencies by matrix enhancement and matrix pencil[J].IEEE Trans on SgnalProcessing,1992,40(9):2267-2280.[6] ROUQUETTE S, NAJIM M.Estimation of frequencies and damping factors by two dimensional ESPRIT type methods[J].IEEE Trans on Signal Processing,2001,49(1):237-245.[7] CHEN D K.Optimization techniques for antenna arrays[J].Processing of the IEEE,1971,59(12):1664-1674.[8] MILLER E K,GOODMAN D M.A pole-zero modeling approach to linear array synthesis I:the unconstrained solution[J].Radio Science,1983,18(1):57-69.[9] LIU Yanhui, NIE Zaiping, LIU Qinghuo. Reducing the number of elements in a linear antenna array by the matrix pencil method[J].IEEE Trans on Antennas and Propagation,2008,56(9):2955-2962.[10] SAPKAR T K,PEREIRA ing the matrix pencil method to estimate the parameters of a sum of complex exponentials[J].IEEE Antennas and Propagation Magazine,1995,37(1):48-54.[11] HUA Yingbo, SAPKAR T K. Matrix pencil method for estimating parameters of exponentially damped/undamped sinusoids in noise[J].IEEE Trans on Acoustics Speech and Signal Processing,1990,38(5):814-824. [12] 周云钟,陈天麒.多信号极化与到达角估计算法[J].电波科学学报,1997,12(2):220-224.ZHOU Yunzhong,CHEN Tianqi.Angles of arrival polarizations estimation[J].Chinese Journal of Radio Science,1997,12(2):220-224.(in Chinese)。
解决eslint空格报错等问题eslint检查代码风格是好的,不过有些换⾏报错空格报错还有在代码中有 console也是报错这有些烦⼈为了把这些烦⼈的报错给禁⽌掉我们可以在package.json⽂件中找到(或者在.eslintrc.js中找到rules)"eslintConfig": { "root": true, "env": { "node": true }, "extends": [ "plugin:vue/essential", "eslint:recommended" ], "rules": { "no-console":"off",//在这禁⽌掉console报错检查 "no-irregular-whitespace":"off"//这禁⽌掉空格报错检查 }, "parserOptions": { "parser": "babel-eslint" }},//在rules规则中禁⽌掉这些规则下⾯罗列⼀些,⼀些规则的含义:、“off” or 0 - 关闭(禁⽤)规则“warn” or 1 - 将规则视为⼀个警告(并不会导致检查不通过)“error” or 2 - 将规则视为⼀个错误 (退出码为1,检查不通过).常⽤规则类别描述Possible Errors 可能的错误或逻辑错误no-cond-assign 禁⽌条件表达式中出现模棱两可的赋值操作符no-console 禁⽤consoleno-constant-condition 禁⽌在条件中使⽤常量表达式no-debugger 禁⽤ debuggerno-dupe-args 禁⽌ function 定义中出现重名参数no-dupe-keys 禁⽌对象字⾯量中出现重复的 keyno-duplicate-case 禁⽌出现重复的 case 标签no-empty 禁⽌出现空语句块no-ex-assign 禁⽌对 catch ⼦句的参数重新赋值no-extra-boolean-cast 禁⽌不必要的布尔转换no-extra-parens 禁⽌不必要的括号no-extra-semi 禁⽌不必要的分号no-func-assign 禁⽌对 function 声明重新赋值no-inner-declarations 禁⽌在嵌套的块中出现变量声明或 function 声明no-irregular-whitespace 禁⽌在字符串和注释之外不规则的空⽩no-obj-calls 禁⽌把全局对象作为函数调⽤no-sparse-arrays 禁⽤稀疏数组no-prototype-builtins 禁⽌直接使⽤Object.prototypes 的内置属性no-unexpected-multiline 禁⽌出现令⼈困惑的多⾏表达式no-unreachable 禁⽌在return、throw、continue 和 break语句之后出现不可达代码use-isnan 要求使⽤ isNaN() 检查 NaNvalid-typeof 强制 typeof 表达式与有效的字符串进⾏⽐较—– —–Best Practices 最佳实践array-callback-return 强制数组⽅法的回调函数中有 return 语句block-scoped-var 强制把变量的使⽤限制在其定义的作⽤域范围内complexity 指定程序中允许的最⼤环路复杂度consistent-return 要求 return 语句要么总是指定返回的值,要么不指定curly 强制所有控制语句使⽤⼀致的括号风格default-case 要求 switch 语句中有 default 分⽀dot-location 强制在点号之前和之后⼀致的换⾏dot-notation 强制在任何允许的时候使⽤点号eqeqeq 要求使⽤ === 和 !==guard-for-in 要求 for-in 循环中有⼀个 if 语句no-alert 禁⽤ alert、confirm 和 promptno-case-declarations 不允许在 case ⼦句中使⽤词法声明no-else-return 禁⽌ if 语句中有 return 之后有 elseno-empty-function 禁⽌出现空函数no-eq-null 禁⽌在没有类型检查操作符的情况下与 null 进⾏⽐较no-eval 禁⽤ eval()no-extra-bind 禁⽌不必要的 .bind() 调⽤no-fallthrough 禁⽌ case 语句落空no-floating-decimal 禁⽌数字字⾯量中使⽤前导和末尾⼩数点no-implicit-coercion 禁⽌使⽤短符号进⾏类型转换no-implicit-globals 禁⽌在全局范围内使⽤ var 和命名的 function 声明no-invalid-this: 禁⽌ this 关键字出现在类和类对象之外no-lone-blocks 禁⽤不必要的嵌套块no-loop-func 禁⽌在循环中出现 function 声明和表达式no-magic-numbers 禁⽤魔术数字no-multi-spaces 禁⽌使⽤多个空格no-multi-str 禁⽌使⽤多⾏字符串no-new 禁⽌在⾮赋值或条件语句中使⽤ new 操作符no-new-func 禁⽌对 Function 对象使⽤ new 操作符no-new-wrappers 禁⽌对 String,Number 和 Boolean 使⽤ new 操作符no-param-reassign 不允许对 function 的参数进⾏重新赋值no-redeclare 禁⽌使⽤ var 多次声明同⼀变量no-return-assign 禁⽌在 return 语句中使⽤赋值语句no-script-url 禁⽌使⽤ javascript: urlno-self-assign 禁⽌⾃我赋值no-self-compare 禁⽌⾃⾝⽐较no-sequences 禁⽤逗号操作符no-unmodified-loop-condition 禁⽤⼀成不变的循环条件no-unused-expressions 禁⽌出现未使⽤过的表达式no-useless-call 禁⽌不必要的 .call() 和 .apply()no-useless-concat 禁⽌不必要的字符串字⾯量或模板字⾯量的连接vars-on-top 要求所有的 var 声明出现在它们所在的作⽤域顶部—– —–Strict Mode 使⽤严格模式和严格模式指strict 要求或禁⽌使⽤严格模式指令—– —–Variables 变量声明init-declarations 要求或禁⽌ var 声明中的初始化no-catch-shadow 不允许 catch ⼦句的参数与外层作⽤域中的变量同名no-restricted-globals 禁⽤特定的全局变量no-shadow 禁⽌ var 声明与外层作⽤域的变量同名no-undef 禁⽤未声明的变量,除⾮它们在 /global / 注释中被提到no-undef-init 禁⽌将变量初始化为 undefinedno-unused-vars 禁⽌出现未使⽤过的变量no-use-before-define 不允许在变量定义之前使⽤它们—– —–Nodejs and CommonJS Node.js,CommonJSglobal-require 要求 require() 出现在顶层模块作⽤域中handle-callback-err 要求回调函数中有容错处理no-mixed-requires 禁⽌混合常规 var 声明和 require 调⽤no-new-require 禁⽌调⽤ require 时使⽤ new 操作符no-path-concat 禁⽌对 dirname 和 filename进⾏字符串连接no-restricted-modules 禁⽤指定的通过 require 加载的模块—– —–Stylistic Issues 风格指南array-bracket-spacing 强制数组⽅括号中使⽤⼀致的空格block-spacing 强制在单⾏代码块中使⽤⼀致的空格brace-style 强制在代码块中使⽤⼀致的⼤括号风格camelcase 强制使⽤骆驼拼写法命名约定comma-spacing 强制在逗号前后使⽤⼀致的空格comma-style 强制使⽤⼀致的逗号风格computed-property-spacing 强制在计算的属性的⽅括号中使⽤⼀致的空格eol-last 强制⽂件末尾⾄少保留⼀⾏空⾏func-names 强制使⽤命名的 function 表达式func-style 强制⼀致地使⽤函数声明或函数表达式indent 强制使⽤⼀致的缩进jsx-quotes 强制在 JSX 属性中⼀致地使⽤双引号或单引号key-spacing 强制在对象字⾯量的属性中键和值之间使⽤⼀致的间距keyword-spacing 强制在关键字前后使⽤⼀致的空格linebreak-style 强制使⽤⼀致的换⾏风格lines-around-comment 要求在注释周围有空⾏max-depth 强制可嵌套的块的最⼤深度max-len 强制⼀⾏的最⼤长度max-lines 强制最⼤⾏数max-nested-callbacks 强制回调函数最⼤嵌套深度max-params 强制 function 定义中最多允许的参数数量max-statements 强制 function 块最多允许的的语句数量max-statements-per-line 强制每⼀⾏中所允许的最⼤语句数量new-cap 要求构造函数⾸字母⼤写new-parens 要求调⽤⽆参构造函数时有圆括号newline-after-var 要求或禁⽌ var 声明语句后有⼀⾏空⾏newline-before-return 要求 return 语句之前有⼀空⾏newline-per-chained-call 要求⽅法链中每个调⽤都有⼀个换⾏符no-array-constructor 禁⽌使⽤ Array 构造函数no-continue 禁⽤ continue 语句no-inline-comments 禁⽌在代码⾏后使⽤内联注释no-lonely-if 禁⽌ if 作为唯⼀的语句出现在 else 语句中no-mixed-spaces-and-tabs 不允许空格和 tab 混合缩进no-multiple-empty-lines 不允许多个空⾏no-negated-condition 不允许否定的表达式no-plusplus 禁⽌使⽤⼀元操作符 ++ 和 –no-spaced-func 禁⽌ function 标识符和括号之间出现空格no-ternary 不允许使⽤三元操作符no-trailing-spaces 禁⽤⾏尾空格no-whitespace-before-property 禁⽌属性前有空⽩object-curly-newline 强制花括号内换⾏符的⼀致性object-curly-spacing 强制在花括号中使⽤⼀致的空格object-property-newline 强制将对象的属性放在不同的⾏上one-var 强制函数中的变量要么⼀起声明要么分开声明one-var-declaration-per-line 要求或禁⽌在 var 声明周围换⾏operator-assignment 要求或禁⽌在可能的情况下要求使⽤简化的赋值操作符operator-linebreak 强制操作符使⽤⼀致的换⾏符quote-props 要求对象字⾯量属性名称⽤引号括起来quotes 强制使⽤⼀致的反勾号、双引号或单引号require-jsdoc 要求使⽤ JSDoc 注释semi 要求或禁⽌使⽤分号⽽不是 ASIsemi-spacing 强制分号之前和之后使⽤⼀致的空格sort-vars 要求同⼀个声明块中的变量按顺序排列space-before-blocks 强制在块之前使⽤⼀致的空格space-before-function-paren 强制在 function的左括号之前使⽤⼀致的空格space-in-parens 强制在圆括号内使⽤⼀致的空格space-infix-ops 要求操作符周围有空格space-unary-ops 强制在⼀元操作符前后使⽤⼀致的空格spaced-comment 强制在注释中 // 或 /* 使⽤⼀致的空格。
vue-cli3项⽬配置eslint代码规范的完整步骤前⾔最近接⼿了⼀个项⽬,由于之前为了快速开发,没有做代码检查。
为了使得代码更加规范以及更易读,所以就要eslint上场了。
安装依赖安装依赖有两种⽅法:1. 在cmd中打上把相应的依赖加到devDependencies下,再npm install对应依赖。
2. 在package.json⽂件加上相应依赖:"eslint-plugin-html": "^6.0.3","@vue/cli-plugin-eslint": "^3.3.0","@vue/eslint-config-standard": "^4.0.0","eslint": "5.0.0","eslint-friendly-formatter": "4.0.1","eslint-loader": "2.0.0","eslint-plugin-import": "^2.20.2","eslint-plugin-vue": "4.7.1",eslint配置⽅法eslint的规则有三个选项:"off"或者0,不启⽤这个规则"warn"或者1,出现问题会有警告"error"或者2,出现问题会报错在根⽬录创建.eslintrc.js,代码如下:module.exports = {// 默认情况下,ESLint会在所有⽗级组件中寻找配置⽂件,⼀直到根⽬录。
ESLint⼀旦发现配置⽂件中有 "root": true,它就会停⽌在⽗级⽬录中寻找。
.eslintrc的配置{// 环境定义了预定义的全局变量。
"env": {//环境定义了预定义的全局变量。
更多在官⽹查看"browser": true,"node": true,"commonjs": true,"amd": true,"es6": true,"mocha": true},// JavaScript 语⾔选项"parserOptions": {// ECMAScript 版本"ecmaVersion": 6,"sourceType": "module", //设置为 "script" (默认) 或 "module"(如果你的代码是 ECMAScript 模块)。
//想使⽤的额外的语⾔特性:"ecmaFeatures": {// 允许在全局作⽤域下使⽤ return 语句"globalReturn": true,// impliedStric"impliedStrict": true,// 启⽤ JSX"jsx": true,"modules": true}},//-----让eslint⽀持 JSX start"plugins": ["react"],"extends": ["eslint:recommended","plugin:react/recommended"],//-----让eslint⽀持 JSX end/*** "off" 或 0 - 关闭规则* "warn" 或 1 - 开启规则,使⽤警告级别的错误:warn (不会导致程序退出),* "error" 或 2 - 开启规则,使⽤错误级别的错误:error (当被触发的时候,程序会退出)*/"rules": {////////////////// 可能的错误 //////////////////// 禁⽌条件表达式中出现赋值操作符"no-cond-assign": 2,// 禁⽤ console"no-console": 0,// 禁⽌在条件中使⽤常量表达式// if (false) {// doSomethingUnfinished();// } //cuowu"no-constant-condition": 2,// 禁⽌在正则表达式中使⽤控制字符:new RegExp("\x1f")"no-control-regex": 2,// 数组和对象键值对最后⼀个逗号, never参数:不能带末尾的逗号, always参数:必须带末尾的逗号, // always-multiline:多⾏模式必须带逗号,单⾏模式不能带逗号"comma-dangle": [1, "never"],// 禁⽤ debugger"no-debugger": 2,// 禁⽌ function 定义中出现重名参数"no-dupe-args": 2,// 禁⽌对象字⾯量中出现重复的 key"no-dupe-keys": 2,// 禁⽌重复的 case 标签"no-duplicate-case": 2,// 禁⽌空语句块"no-empty": 2,// 禁⽌在正则表达式中使⽤空字符集 (/^abc[]/)"no-empty-character-class": 2,// 禁⽌对 catch ⼦句的参数重新赋值"no-ex-assign": 2,// 禁⽌不必要的布尔转换"no-extra-boolean-cast": 2,// 禁⽌不必要的括号 //(a * b) + c;//报错"no-extra-parens": 0,// 禁⽌不必要的分号"no-extra-semi": 2,// 禁⽌对 function 声明重新赋值"no-func-assign": 2,// 禁⽌在嵌套的块中出现 function 或 var 声明"no-inner-declarations": [2, "functions"],// 禁⽌ RegExp 构造函数中⽆效的正则表达式字符串"no-invalid-regexp": 2,// 禁⽌在字符串和注释之外不规则的空⽩"no-irregular-whitespace": 2,// 禁⽌在 in 表达式中出现否定的左操作数"no-negated-in-lhs": 2,// 禁⽌把全局对象 (Math 和 JSON) 作为函数调⽤错误:var math = Math();"no-obj-calls": 2,// 禁⽌直接使⽤ Object.prototypes 的内置属性"no-prototype-builtins": 0,// 禁⽌正则表达式字⾯量中出现多个空格"no-regex-spaces": 2,// 禁⽤稀疏数组"no-sparse-arrays": 2,// 禁⽌出现令⼈困惑的多⾏表达式"no-unexpected-multiline": 2,// 禁⽌在return、throw、continue 和 break语句之后出现不可达代码"no-unreachable": 2,// 要求使⽤ isNaN() 检查 NaN"use-isnan": 2,// 强制使⽤有效的 JSDoc 注释"valid-jsdoc": 1,// 强制 typeof 表达式与有效的字符串进⾏⽐较// typeof foo === "undefimed" 错误"valid-typeof": 2,//////////////// 最佳实践 ////////////////// 定义对象的set存取器属性时,强制定义get"accessor-pairs": 2,// 强制数组⽅法的回调函数中有 return 语句"array-callback-return": 0,// 强制把变量的使⽤限制在其定义的作⽤域范围内"block-scoped-var": 0,// 限制圈复杂度,也就是类似if else能连续接多少个"complexity": [2, 9],// 要求 return 语句要么总是指定返回的值,要么不指定"consistent-return": 0,// 强制所有控制语句使⽤⼀致的括号风格"curly": [2, "all"],// switch 语句强制 default 分⽀,也可添加 // no default 注释取消此次警告"default-case": 2,// 强制object.key 中 . 的位置,参数:// property,'.'号应与属性在同⼀⾏// object, '.' 号应与对象名在同⼀⾏"dot-location": [2, "property"],// 强制使⽤.号取属性// 参数: allowKeywords:true 使⽤保留字做属性名时,只能使⽤.⽅式取属性// false 使⽤保留字做属性名时, 只能使⽤[]⽅式取属性 e.g [2, {"allowKeywords": false}]// allowPattern: 当属性名匹配提供的正则表达式时,允许使⽤[]⽅式取值,否则只能⽤.号取值 e.g [2, {"allowPattern": "^[a-z]+(_[a-z]+)+$"}] "dot-notation": [2, {"allowKeywords": false}],// 使⽤ === 替代 == allow-null允许null和undefined=="eqeqeq": [2, "allow-null"],// 要求 for-in 循环中有⼀个 if 语句"guard-for-in": 2,// 禁⽤ alert、confirm 和 prompt"no-alert": 0,// 禁⽤ arguments.caller 或 arguments.callee"no-caller": 2,// 不允许在 case ⼦句中使⽤词法声明"no-case-declarations": 2,// 禁⽌除法操作符显式的出现在正则表达式开始的位置"no-div-regex": 2,// 禁⽌ if 语句中有 return 之后有 else"no-else-return": 0,// 禁⽌出现空函数.如果⼀个函数包含了⼀条注释,它将不会被认为有问题。
Efficient Synthesis of Sparse Arrays as the Solution of an Inversion Problemwithin the Bayesian Compressive Sensing FrameworkA. Massa*, P. Rocca, M. Carlin, and G. OliveriELEDIA Research Center @ University of Trento, Trento, ItalyE-mail: andrea.massa@unitn.itIntroductionDesigning sparse arrays requires the solution of a nonlinear inversion problem because of the dependence of the radiation pattern on the locations and the weights of the array elements. Unfortunately, the design of sparse layouts is usually a very challenging problem with respect to the synthesis of their filled counterparts since, although convenient from several viewpoints, they usually present a reduced control of the arising beam shape, the peak sidelobe level (PSL ) as well as the mainbeam width [1]-[17]. Accordingly, several design techniques have been proposed to suitably address these issues. The sparse array design techniques have been usually conceived either as the solution of a “thinning” problem where the functional depends on the array PSL [4]-[15], or as the selection of the element positions an weights which exhibit a target pattern [16]-[17]. While a large set of approaches have been introduced for thinning both linear and planar arrangements (e.g., random architectures [2], stochastic optimizers [4]-[11] and analytical methods [12]-[15]), few methodologies have been developed for the solution of the latter synthesis problem [14]-[16] although recently an innovative approach based on the formulation of the sparse array synthesis problem as a “Compressive Sensing (CS ) retrieval” one has been presented [18]-[19]. Such a method formulates the synthesis inversion problem at hand by imposing suitable sparseness constraints as regularization terms, then re-casting it in a probabilistic framework exploiting the so-called Bayesian Compressive Sensing formulation [20]. Successively, the an efficient Relevance Vector Machine (RVM) is applied to determine the array synthesis unknowns [21].This work is aimed at reviewing through a detailed analysis the performances, the features, and the limitations of the BCS-based technique when dealing with reference and representative synthesis problems concerned with (a ) real excitations and symmetrical patterns as well as (b ) shaped-beam sparse arrays (i.e., complex excitations and asymmetrical pattern).The abstract is organized as follows. In Sect. II, the synthesis problem at hand is mathematically formulated as an example of a more general inversion problem and recast to the BCS framework. A set of representative results is presented to assess the potentialities and the current limitations of the synthesis approach (Sect. III).Mathematical FormulationLet us consider a linear array of N isotropic elements distributed on an orthogonal axis at the positions r 1,…,r N . Each n -th element of the array is fed by a weight )exp(n n n j p c ϕ= (n=1,…,N ), p n and φn being the corresponding amplitude and the phase. The array synthesis problem at hand can be formulated as the inversion one of finding the minimum number of elements N and the associated set of complex array weights p n n=1,…,N , that radiate a pattern F (u )()[]∑=+=Nn n n n ur j p u F 12exp )(ϕπ (1)978-1-4673-0946-2/12/$31.00 ©2012 IEEEclose to a reference one F REF (u ) [18] within a given tolerance th δth REF u F u F δ<−)()( (2)In order to solve such an inversion problem within a BCS formulation, the following assumptions are considered: (a ) the radiated pattern matches the reference one in a user-defined set of S angular positions u s s =1,..,S , within the visible range ([]1,1−∈s u ); (b ) the element positions are user-chosen in a set of arbitrary Q>N candidate locations not necessarily belonging to a regular lattice r 1,…,r Q . Accordingly, the problem at hand turns assumes the following matrix formth REF δ<−ΨF C (3)where F REF =[F REF (u 1),…,F REF (u S )], C =[c 1,…,c Q ], and⎥⎥⎥⎦⎤⎢⎢⎢⎣⎡=Ψ)2exp()2exp()2exp()2exp(1111Q S S Q r u j r u j r u j r u j ππππ"#%#" (4)is the complex “projection matrix” of the array.To recast the problem at hand in the BCS framework, Eq. (3) is firstly rewritten asE CF +Ψ=REF (5)where E =[e 1,…,e S ] is a zero mean complex Gaussian error vector with variance ξ2 proportional to the mismatching between the reference pattern and the synthesized one. Statistically F REF is then modeled in terms of the following Gaussian function()()⎟⎟⎠⎞⎜⎜⎝⎛Ψ−−=222/222exp 21,ξπξξC F C F REF S REF P (6) and the original synthesis reads as [18][19]:“Given F REF , find C and ξ2 which maximize p(F REF |C, ξ2) subject to the constraint that the weights C are maximally sparse”.By enforcing the constraint C through the definition of a suitable prior p (C ) to privilege sparse complex weight distributions (i.e., few non-zero coefficients in C ) [19], the following relevance vector machine (RVM ) [20][21] solution is finally obtainedREF HBCS BCS H BCS L F C Ψ⎟⎟⎠⎞⎜⎜⎝⎛+ΨΨ=−1221ξξ (7) where ()QBCS BCSBCS l l diag L ,...,1=, ()()[]REF HREF L BCS QBCS BCSK K N l lF F 1,21log 2log max arg ,,...,2−++=πξξ, (8) and ()H L I K ΨΨ+=−12ξ [20][21].Numerical ResultsIn order to validate the above proposed methodology, a set of numerical results concerned both with real excitations and symmetrical patterns as well as with shaped-beam sparse arrays ispresented. More specifically, a non-uniform real-valued arrangement comprising N ref =25 elements taken from [6] has been firstly considered as a reference, and both the BCS (single-task) and the MT-BCS (multi-task) solution of (7) [19] have been computed. Figure 1(a ), which shows the comparison between the reference and the BCS-synthesized F(u), indicates that both techniques are able to accurately match the target pattern while reducing the number of elements with respect to the (already sparse) reference arrays [e.g., P BCS =22 vs. P REF =25 – Fig. 1(a )].-30-25-20-15-10-5 0 00.20.40.6 0.8 1N o r m a l i z e d v a l u e [d B ]u[Trucco,1999], L=50λ, PSL=-14.45 dB|E REF (u)|2|E MT-BCS (u)|2, P MT-BCS =21|E BCS (u)|2, P BCS =220.2 0.4 0.6 0.8 1-20-100 1020A r r a y e x c i t a t i o n [A m p l i t u d e ]x [λ][Trucco,1999], L=50λ, PSL=-14.45 dBTrucco, 1999MT-BCS Array, P MT-BCS =21BCS Array, P BCS=22(a ) (b )Fig. 1. [Symmetric Array ] Array pattern from the reference and the BCS/MT-BCS synthesizedlayouts (a ) and associated amplitudes (b ).Morever, it is worth noticing that the two techniques yield similar performances (P BCS =22 vs. P MT-BCS =21). However, the same does not hold true when shaped-beam patterns are taken into account (Fig. 2). Indeed, the multi-task procedure in this case yields a significant improvement in terms of sparseness [P BCS =41, P MT-BCS =24, P REF =32 – Fig. 2(b )] for the same matching accuracy [Fig. 2(a )] due to the complex-valued nature of the associated problem.-50-40-30-20-10-1-0.5 0 0.5 1N o r m a l i z e d v a l u e [d B ]u[Akdagli,2006], L=15.5 λ|E REF (u)|2, P=32|E MT-BCS (u)|2, P=24|E BCS (u)|2, P=410 0.2 0.4 0.6 0.8 1-8-6-4-20 2468A r r a y e x c i t a t i o n [A m p l i t u d e ]x [λ][Akdagli,2006], L=15.5 λAkdagli et al. 2006, P=32MT-BCS Array, P MT-BCS =24BCS Array, P BCS=41(a ) (b )Fig. 2. [Shaped-beam Array ] Array pattern from the reference and the BCS/MT-BCSsynthesized layouts (a ) and associated amplitudes (b ).References:[1] C. A. Balanis, Antenna Theory: Analysis and Design , 2nd ed. New York: Wiley, 1997.[2] R. J. Mailloux, Phased Array Antenna Handbook , 2nd ed. Norwood, MA: Artech House,2005.[3] M. G. Andreasen, “Linear arrays with variable interelement spacings,” IEEE Trans.Antennas Propagat., vol. AP-10, pp. 137-143, Mar. 1962.[4]M. I. Skolnik, G. Nemhauser and J.W. Sherman, “Dynamic programming applied tounequally-spaced arrays,” IEEE Trans. Antennas Propagat., vol 12, pp. 35-43, Jan 1964. [5]R. M. Leahy and B. D. Jeffs, “ On the design of maximally sparse beamforming arrays”,IEEE Trans. Antennas Propagat., vol. 39, no. 8, pp. 1178-1187, Aug. 1991.[6] A. Trucco and V. Murino, “Stochastic optimization of linear sparse arrays,” IEEE J.Oceanic Engineering, vol. 24, no.3, pp. 291-299, Jul. 1999.[7]S. Caorsi, A. Lommi, A. Massa and M. Pastorino, “Peak sidelobe level reduction with ahybrid apporach based on GAs and difference sets,” IEEE Trans. Antennas Propag., vol.52, no. 4, pp. 1116-1121, Apr. 2004.[8] A. Lommi, A. Massa, E. Storti, and A. Trucco, “Side lobe reduction in sparse linear arraysby genetic algorithms,” Microwave Opt. Tech. Lett., vol. 32, no. 3, pp. 194-196, 2002.[9]S. Caorsi, A. Lommi, A. Massa, S. Piffer, and A. Trucco, “Planar antenna array design witha multi-purpose GA-based procedure,” Microwave Opt. Tech. Lett., vol. 35, no. 6, pp. 428-430, Dec. 2002.[10]M. Donelli, S. Caorsi, F. De Natale, D. Franceschini, and A. Massa, “A versatile enhancedgenetic algorithm for planar array design,” J. Electrom. Waves Appl., vol. 18, pp. 1533-1548, 2004.[11]M. Donelli, A. Martini, and A. Massa, “A hybrid approach based on PSO and Hadamarddifference sets for the synthesis of square thinned arrays,” IEEE Trans. Antennas Propag., vol. 57, no. 8, pp. 2491-2495, Aug. 2009.[12]G. Oliveri, M. Donelli and A. Massa, “Linear array thinning exploiting almost differencesets, IEEE Trans. Antennas Propag.,” vol. 57, no. 12, pp. 3800-3812, Dec. 2009.[13]G. Oliveri, L. Manica, and A. Massa, “ADS-Based guidelines for thinned planar arrays,”IEEE Trans. Antennas Propag., vol. 58, no. 6, pp. 1935-1948, Jun. 2010.[14]G. Oliveri and A. Massa, “GA-Enhanced ADS-based approach for array thinning,” IETMicrowaves Antennas Propag., vol. 5, no. 3, pp. 305–315, 2011.[15]G. Oliveri, F. Caramanica, C. Fontanari, and A. Massa, “Rectangular thinned arrays basedon McFarland difference sets”, IEEE Trans. Antennas Propag., vol. 59, no. 5, pp. 1546-1552, May 2011.[16]Y. Liu, Z. Nie and Q. H. Liu, “Reducing the number of elements in linear antenna array bythe matrix pencil method,” IEEE Trans.Antennas Propag., vol. 56, no. 9, pp. 2955-2962, Sep. 2008.[17]Y. Liu, Q. H. Liu and Z. Nie, “Reducing the number of elements in the synthesis of shaped-beam patterns by the forward-backward matrix pencil method, IEEE Trans. Antennas Propag., vol. 58, no. 2. pp. 604-608, Feb 2010.[18]G. Oliveri and A. Massa, “Bayesian compressive sampling for pattern synthesis withmaximally sparse non-uniform linear arrays,” IEEE Trans. Antennas Propag., vol. 59, no.2, pp. 467-481, Feb. 2011.[19]G. Oliveri, M. Carlin, and A. Massa, “Complex-weight sparse linear array synthesis bybayesian compressive sampling,” IEEE Trans. Antennas Propag., vol. 60, no. 5, pp. 2309-2326, May 2012.[20]S. Ji, Y. Xue and L. Carin, “Bayesian compressive sensing,” IEEE Trans. Signal Process.,vol. 56, no. 6, pp. 2346-2356, Jun. 2008.[21]M. E. Tipping, “Sparse bayesian learning and the relevance vector machine,” J. MachineLearning Res., vol. 1, pp. 211-244, 2001.。