DOA estimation method, system and application
By adopting a two-layer structural model of support vector machine and random forest in DOA estimation, DOA estimation is transformed into regression tasks, solving the problems of high complexity and poor generalization performance of traditional methods, and achieving high accuracy and low time complexity DOA estimation effect of degree.
Patent Information
- Application Number
- CN202411160616.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional DOA estimation algorithms have high complexity and poor generalization performance. Most existing data-driven algorithms transform DOA estimation problems into multi-classification problems, and the estimation accuracy is not high.
A two-layer structure DOA estimation algorithm based on support vector machine and random forest is proposed, which converts DOA estimation into regression task, and uses a combined model of SVM classification and random forest regression to perform source DOA estimation.
High-precision DOA estimation is achieved, and the estimation error is comparable to that of traditional MUSIC algorithms, with strong generalization performance and real-time performance, and low time complexity.
Smart Images

Figure CN119202935A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of DOA estimation, and in particular to a DOA estimation method, system and application based on random forest. Background Art
[0002] Super-resolution Direction of Arrival (DOA) is used to confirm the direction information of each signal in space to the reference array element of the array, which is of great significance for realizing applications such as target positioning, signal source tracking, and multi-target resolution. DOA estimation is widely used, especially in radar, electronic communications, sonar and other fields.
[0003] There are currently two main types of DOA estimation algorithms: the first type is the traditional model-driven DOA estimation algorithm, which includes beamforming algorithm, Capon algorithm, Multiple Signal Classification (MUSIC) algorithm, Estimation of Signal Parameters via Rotational Invariance Techniques (ESPRIT), Maximum Likelihood (ML), etc. In the 1950s, Bartlett proposed the Conventional Beam Forming (CBF) algorithm, which is the earliest array estimation algorithm. This algorithm generalizes Fourier analysis to spatial spectrum estimation, which is simple to implement and has low computational complexity. However, since the angular resolution of the algorithm array is limited by the array aperture and signal wavelength, it may not be possible to accurately estimate the angle, that is, there is a Rayleigh limit. In 1969, Capon proposed an algorithm based on minimum variance unbiased estimation (MVDR). Compared with the CBF algorithm, this algorithm has broken through the "Rayleigh limit" to a certain extent, has a greatly improved resolution, and has a certain anti-interference ability. However, its computational complexity is relatively high, and the estimation result is easily affected by the interference of array elements. In 1979, Schmidt proposed a subspace-based multiple signal classification algorithm. This algorithm uses the orthogonality of the signal subspace and the noise subspace to construct a noise space, thereby detecting the direction of arrival of the signal through spectral peak search, and realizing high-resolution DOA estimation. Subsequently, many scholars have made improvements on this algorithm and proposed algorithms such as weighted MUSIC and root-MUSIC. Then, in 1985, Roy and Kailath proposed another subspace-based method-ESPRIT, which estimates the direction of the signal source by the rotation operator of the received signal, thereby achieving high-resolution DOA estimation. ESPRIT also has high resolution, and compared with the MUSIC algorithm, it does not require spectral peak search and has a smaller time complexity. However, the algorithm requires the array structure to be rotationally invariant, which limits the application scenarios of the algorithm to a certain extent, and for coherent signal sources, the ESPRIT estimation performance will decline.
[0004] Traditional DOA estimation algorithms are parameterized, assuming that the mapping between array element received data and arrival angle estimation is reversible. In practice, traditional estimation algorithms are often affected by a variety of factors, such as array element failure, amplitude and phase errors, array element coupling, etc., which may cause algorithm performance degradation or even unpredictable phenomena, requiring manual correction or compensation based on various influencing factors. With the rapid development of artificial intelligence, data-driven DOA estimation algorithms have also emerged. Data-driven algorithms use a large amount of data for training to find the mapping relationship between received information and arrival angle, which is called a model. This type of algorithm does not require pre-assumptions about array geometry, complex scenarios, and various defects. It has low computational complexity, stronger real-time performance, and stronger adaptability to different types of errors. It has been proven in simulation experiments that it performs comparable to subspace-based algorithms.
[0005] In 2005, Matteo first proposed to apply the machine learning algorithm Support Vector Regression (SVR) to DOA estimation. Simulation experiments showed that this method has high accuracy and generalization ability for DOA estimation. Later, scholars applied SVR to DOA estimation in different scenarios. In 2011, DU Jin-xiang et al. designed a multi-layer SVM binary classification structure to estimate DOA. This structure reduced the number of models to a certain extent and improved the accuracy of DOA estimation. In 2017, Chakrabarty and Habets first introduced the Convolution Neural Network (CNN) into the DOA estimation problem, converting DOA estimation into a multi-classification problem [7]. They used the CNN classifier to learn the inverse mapping of array sampling data to parameter space, which improved the estimation accuracy and had robustness to disturbances, further promoting the development of DOA estimation research based on deep learning. In 2020, Dong Chuanyuan proposed a joint DOA estimation model of SVC and XGBoost regression in his master's thesis. SVC was first used to predict the number of sources, and then the received data was input into the XGBoost regression model with different numbers of sources for DOA estimation. Experiments showed that the SVC classification model can achieve a classification accuracy of 99.7% when the maximum number of sources is three, and the single sample estimation can meet the real-time requirements. In recent years, the research on data-driven DOA estimation algorithms has mainly focused on the use of deep learning frameworks. In 2020, Y. Yao et al. used a new framework that combines convolutional recurrent neural network and Toeplitz matrix reconstruction to solve the problem of arrival angle estimation of an unknown number of coherent sources. Toeplitz was used to determine the number of sources and reduce the pseudo-angle and missed angle phenomena predicted by subsequent classifiers. Simulation results show that the framework has strong robustness under conditions such as few snapshots and colored Gaussian noise. In 2022, J. Fuchs et al. trained three deep learning frameworks, autoencoder, convolutional neural network and multi-layer perceptron, for single snapshot scenarios to estimate the DOA of up to three sources. The networks were trained and tested using real car radar sensor data. Experiments showed that the three deep learning networks were able to achieve super-resolution. In 2023, Carballeira used the classic machine learning algorithm decision tree to predict DOA. Experimental results showed that its accuracy and real-time performance were better than the MUSIC algorithm and it had strong generalization capabilities.
[0006] Traditional DOA estimation algorithms have high complexity and poor generalization performance. Most existing data-driven algorithms transform the DOA estimation problem into a multi-classification problem, and the estimation accuracy is not high. To solve these problems, this paper transforms the DOA estimation problem into a regression problem and proposes a DOA estimation algorithm based on support vector machine and random forest. Simulation experiments show that it has high accuracy, the estimation error is comparable to that of the traditional MUSIC algorithm, and it has strong generalization performance and real-time performance. Summary of the invention
[0007] The purpose of the present invention is to provide a DOA estimation method based on random forest, which uses a double-layer structure combining support vector machine (SVM) classification and random forest regression (Random Forest) algorithm (SVM-RF) to perform DOA estimation and convert DOA estimation into a regression task.
[0008] To achieve the above object, the first aspect of the present invention provides a DOA estimation method based on random forest, comprising the following steps:
[0009] Step 1: Data Collection
[0010] Acquire target signal;
[0011] Step 2: Data Preprocessing
[0012] Handle duplicate values, missing values, and outliers, and complete data annotation;
[0013] Step 3: Feature Extraction
[0014] Calculate the covariance of the acquired target signal, extract the real part and imaginary part of the upper triangular part of the covariance matrix as eigenvalues;
[0015] Step 4: Dataset Division
[0016] Divide the processed data set in step 3 into two subsets: training set and test set;
[0017] Step 5: Model building
[0018] Construct a two-layer DOA estimation model based on SVM-RF and use the training set for model training;
[0019] Step 6: Validate the model
[0020] Use the model trained in step 5 to estimate the DOA of the test set and compare the estimated value with the true value;
[0021] Step 7: Use the model to estimate DOA.
[0022] Specifically, the SVM-RF-based two-layer DOA estimation model includes an SVM model and a plurality of parallel random forest regression models connected thereto.
[0023] As a specific implementation of the present invention, the specific steps of step 2 are:
[0024] Step 21: Keep duplicate data and data containing outliers, and remove data containing missing values;
[0025] Step 22: Data Annotation: Create the category labels of the dataset C = [c 1 ,c 2 ,…,c k ] and DOA tag Degree = [d 1 ,d 2 ,…,d m ];
[0026] Among them, the DOA label is known, and the category label is generated by the angle label. d test Indicates that every d test Train a random forest regression model.
[0027] As a specific implementation of the present invention, the division of the data set includes the generation and division of the data set: according to the incident angle of the received signal, a plurality of data samples are generated at each fixed angle interval, thereby generating a data set, and dividing it into two subsets, a training set and a test set; the specific steps of step 3 are:
[0028] Step 31: Assuming there are M array elements, K signal sources, and a uniform linear array with a spacing of d between array elements, the received signal is expressed as:
[0029] x(t)=A(θ)s(t)+n(t);
[0030] Where θ=[θ 1 ,θ 2 ,…,θ K ] represents the angle between the incoming wave direction and the array element normal; n(t) represents zero-mean stationary Gaussian white noise, A(θ)=[a(θ 1 ),a(θ 2 ),...,a(θ K )]∈C M×K ,θ k is the estimated value of the kth source; a(t) represents the amplitude modulation function, Φ(t) represents the phase modulation function; w 0 =2πf 0 Indicates carrier frequency;
[0031] Step 32: Calculate the covariance of the received signal and obtain the covariance matrix:
[0032] R xx =AR s A H +σ 2 I;
[0033] Among them, the variance is σ 2 , R s represents the eigenvalue diagonal matrix, matrix R xx is a positive Hermitian matrix whose eigenvalues are all positive real numbers; A represents the array steering matrix, A H represents the conjugate transpose operation of the array-directed matrix, and I represents the identity matrix;
[0034] Step 33: Extract the data of the upper right triangle of the covariance matrix and separate the real and imaginary parts of the data into two vectors α 1 ,α 2 , and then α 1 and α 2 Merge into eigenvalue vector β;
[0035] Step 34: According to the incident range interval of the received signal, m data samples are generated every n degrees, thereby generating a data set.
[0036] In the specific implementation, the specific process of step 4 is as follows:
[0037] Step 41: according to the arrival angle range interval [-a, a] of the received signal, m data samples are generated every n degrees, and a data set is generated based on the m data samples;
[0038] Step 42: Divide the generated data set into a training set and a test set.
[0039] In addition, the specific steps of step 5 are:
[0040] Step 51: Build a support vector machine classification model and use the features and category labels in the training set for training;
[0041] Step 52: Divide the training set into training subsets according to the category label values;
[0042] Step 53: Build multiple random forest regression models. Each training subset corresponds to a model for training. The model input is the feature and the output is the angle label.
[0043] It should be noted that: use the trained two-layer DOA estimation model to estimate the DOA of the test set, compare the prediction error between the estimated value and the true value, and verify the model. The specific steps are as follows:
[0044] Step 61: extract the features of the test set, and input the data samples in the test set into the SVM model for classification;
[0045] Step 62: Divide the test set into multiple test subsets according to the classification results, and input the test subsets into the random forest regression model of the corresponding category to predict the DOA value;
[0046] Step 63: Combine the prediction results of each random forest regression model to obtain the DOA estimation value.
[0047] A second aspect of the present invention provides a DOA estimation system based on random forest, which is implemented according to a DOA estimation method based on random forest, and is characterized by comprising:
[0048] A target signal acquisition module, used for the target signal with estimation;
[0049] A two-layer DOA estimation model building module is used to build an estimation model based on SVM and random regression forest;
[0050] The DOA estimation module is used to estimate the DOA of the target signal through the established estimation model.
[0051] The third aspect of the present invention provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the random forest-based DOA estimation method described above.
[0052] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the above-mentioned random forest-based DOA estimation method is implemented.
[0053] A fifth aspect of the present invention provides a computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the random forest-based DOA estimation method described above is implemented.
[0054] Therefore, the present invention adopts the above-mentioned DOA estimation method based on random forest, which has the following beneficial effects:
[0055] The double-layer DOA estimation model proposed in this invention, which is based on the combination of support vector machine classification and random forest regression, performs source DOA estimation under uniform linear arrays, with an accuracy comparable to that of the classic super-resolution algorithm MUSIC, and its time complexity is much smaller than that of the MUSIC algorithm. Compared with XGBoost, Random Forest and SVR, SVM-RF has stronger robustness and generalization ability, low algorithm time cost, and can maintain a relatively low estimation error in the case of low signal-to-noise ratio and few snapshots.
[0056] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 The partitioning hyperplane results for the SVM to correctly partition the training set.
[0058] Figure 2 This is the schematic diagram of the random forest algorithm.
[0059] Figure 3 This is a structural diagram of the double-layer DOA estimation model based on SVM-RF proposed in the present invention.
[0060] Figure 4a-4e They are the DOA estimation fitting result graphs of MUSIC, SVM-RF, RF, XGBoost, and SVR algorithms in simulation experiment 1 under the conditions of SNR=10dB, 500 snapshots, and incident angle range [-90°, 90°].
[0061] Figure 5a-5e They are the DOA estimation fitting result graphs of MUSIC, SVM-RF, RF, XGBoost, and SVR algorithms in simulation experiment 1 under the conditions of SNR=10dB, 500 snapshots, and incident angle range [-80°, 80°].
[0062] Figure 6a-6b The following are the relationship between the root mean square error and running time of each algorithm and the number of snapshots when the number of snapshots is [10, 30, 50, 70, 90, 100, 200, 300, 400, 500].
[0063] Figure 7a-Figure 7b These are the relationship diagrams of the root mean square error and running time of each algorithm with the signal-to-noise ratio SNR = [-10, -5, 0, 5, 10, 15, 20]. DETAILED DESCRIPTION
[0064] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the claims attached to the application.
[0065] Reference Figure 1 -7
[0066] 1. Related foundation of DOA estimation based on random forest
[0067] (1) Signal model
[0068] The present invention takes the uniform linear array incoherent far-field narrowband signal as the object. The local array elements in the array are far enough away from the signal source. The received spherical wave signal is approximately a plane wave. The signal amplitude received by the array is consistent, and there is only a phase delay. The narrowband signal can be expressed as:
[0069]
[0070] Where a(t) represents the amplitude modulation function, θ(t) represents the phase modulation function; w 0 =2πf 0 Indicates the carrier frequency.
[0071] Assume that there are M array elements, K signal sources, and a uniform linear array with a spacing of d between array elements. The signal model is expressed as:
[0072] x(t)=A(θ)s(t)+n(t) (2)
[0073] Where θ=[θ 1 ,θ 2 ,…,θ K ] represents the angle between the incoming wave direction and the array element normal; n(t) represents zero-mean stationary Gaussian white noise with a variance of σ 2 , the noises between the array elements are uncorrelated with each other and with the target element. A(θ)=[a(θ 1 ),a(θ 2 ),...,a(θ K )]∈C M×K ,θ k is the estimated value of the kth source.
[0074] (2) MUSIC algorithm
[0075] In order to prove the performance of the present invention, it is compared with the classical algorithm MUSIC. Therefore, the classical MUSIC algorithm is introduced as follows.
[0076] According to the array output model, the signal covariance matrix is:
[0077] R xx =AR s A H +σ 2 I (3)
[0078] Among them, R s represents the eigenvalue diagonal matrix; for R xx Performing feature decomposition yields:
[0079]
[0080] Among them, λ i For R xx Eigenvalue, u i is the eigenvector, U=[u 1 u 2 …u M ].
[0081] Since the matrix R xx is a positive Hermitian matrix whose eigenvalues are all positive real numbers. xx The eigenvalues of are sorted in descending order, and we get λ 1 ≥λ 2 ≥…≥λ P >λ P+1 =λ P+2 =…=λ M =σ 2 The eigenvectors corresponding to the first P eigenvalues constitute the signal subspace U s =[u 1 u 2 …u P ], the eigenvectors corresponding to the last MP smaller eigenvalues constitute the noise subspace U n =[u P+ 1 u P+2 …u M ].
[0082] According to the orthogonality of the signal direction vector and the noise subspace, that is:
[0083]
[0084] Expand formula (5) to:
[0085] a j H U N =0(j=1,2,…,P) (6)
[0086] In practical applications, the received data matrix is of finite length, and the estimate of the data covariance matrix is:
[0087]
[0088] Write equation (6) in scalar form:
[0089] a j H U N U N H a j =0(j=1,2,…,P) (8)
[0090] Solve DOA by minimum optimization search, that is:
[0091]
[0092] Convert the minimum search problem into a maximum search problem:
[0093]
[0094] Search by azimuth angle θ, and the above formula obtains the θ of the peak 1 ,θ 2 ,…,θ N It is the DOA estimate of N sources.
[0095] (3) Dataset preparation
[0096] Since the covariance matrix R shown in formula (3) xx It is a symmetric matrix, and the main diagonal does not contain useful information. The information contained in its upper right triangular matrix is consistent with that in its lower left triangular matrix. Machine learning algorithms usually input features in the form of vectors. This invention extracts the data of the upper right triangular part of the covariance matrix and separates the real part and the imaginary part into two vectors α 1 ,α 2 Then combine them into a vector β.
[0097] The upper right triangular part has a total of M(M-1) / 2 elements. The first M(M-1) / 2 elements of the M(M-1)-dimensional vector β are the real data of the upper right triangular part of the covariance matrix, and the last M(M-1) / 2 elements are the imaginary data of the upper right triangular part. β is the effective eigenvalue vector finally extracted.
[0098] Assume that the incident signal source is a single signal source, the number of uniform linear array elements is 8, and the interval is 0.5. Considering that the arrival angle is a continuous value in actual situations, the wave angle is [-80, 80] and 10 data samples are generated every 0.05 degree interval, a total of 32200 data samples, which is the generated data set. Considering the signal-to-noise ratio from -20dB to 20dB, 32200 data samples are generated every 5dB interval. The number of snapshots is [10, 30, 50, 70, 90, 100, 200, 300, 400, 500].
[0099] Label creation: The labels in the dataset include category labels C = [c 1 ,c 2 ,…,c k ] and DOA tag Degree = [d 1 ,d 2 ,…,d m ] There are two types. The category label is generated by the angle label. If a random forest regression model needs to be trained every thirty degrees, the category label corresponding to the angle is
[0100] 2. DOA estimation method based on random forest
[0101] The present invention proposes a double-layer DOA estimation model based on SVM-RF, which is composed of an SVM and multiple RandomForest regression models. SVM and random forest are introduced respectively below.
[0102] (1) Support Vector Machine
[0103] Given a training set D = {(x 1 ,y 1 ),(x 2 ,y 2 ),…,(x m ,y m )},y i ∈{-1,+1}, the basic idea of SVM is to find a partitioning hyperplane with the largest geometric interval and that can correctly divide the training set, such as Figure 1 shown.
[0104] from Figure 1 As can be seen from the figure, there are countless hyperplanes that can correctly divide the samples, but only the hyperplane shown by line b has the strongest robustness and works best when predicting the category of unknown samples. In the sample space, the partitioning hyperplane is represented by the following equation:
[0105] ω T x+b=0 (11)
[0106] The hyperplane is determined by the parameters ω and b, denoted as (ω, b).1 ;ω 2 ;…;ω d ) is the normal vector, which determines the direction of the hyperplane. b is the displacement, which determines the distance between the hyperplane and the origin. The distance from any point x in the sample space to the hyperplane (ω, b) can be expressed as:
[0107]
[0108] If the hyperplane can correctly classify the training samples, then for any (x i ,y i )∈D, let:
[0109]
[0110] The sample points closest to the hyperplane make the above equation valid. These points are called "support vectors". The sum of the distances of two heterogeneous support vectors to the hyperplane is:
[0111]
[0112] Among them, γ is the "margin".
[0113] By finding the parameters ω and b that satisfy the constraints in equation (13) and maximize γ, we can find the partitioning hyperplane with the “maximum interval”, namely:
[0114]
[0115] Convert the maximization problem shown in the above equation into a minimization problem and rewrite the above equation as follows:
[0116]
[0117] Formula (16) is the basic form of support vector machine.
[0118] The above equation itself is a convex quadratic programming problem. The Lagrange multiplier method is used to convert it into a dual problem that is easier to solve. The Lagrange multiplier α is introduced for each constraint. i ≥0, define the Lagrangian function as:
[0119]
[0120] Where α=(α 1 ; α 2 ;…;α m ), according to the duality property of Lagrangian, the dual problem of the original problem (Equation (16)) is:
[0121]
[0122] After solving for α, we can find ω and b to get the model:
[0123]
[0124] The above process needs to satisfy the KKT (Karush-Kuhn-Tucker) condition, which requires:
[0125]
[0126] The above conditions ensure that the final trained model is only related to the support vectors, and most of the training samples do not need to be retained.
[0127] After being transformed into a dual problem, the SMO (Sequential Minimal Optimization) algorithm is used to solve equation (18) (SMO is a well-known representative method for solving quadratic programming problems and belongs to the existing technology. This paper does not improve SVM). Unlike other SVM improved algorithms, the SMO algorithm decomposes the entire quadratic programming problem into many small problems that are easy to handle and decomposes them to the smallest achievable scale.
[0128] The basic idea of the SMO algorithm is to first fix α i All parameters except α i The basic steps are:
[0129] S1: Select a pair of variables α that need to be updated i and α j ;
[0130] S2: Fixed α i and α j Parameters other than α are solved by equation (18) to obtain the updated α i and α j ;
[0131] S3: Consider only α i and α j , the constraint in formula (18) can be rewritten as:
[0132]
[0133] Where c is a constant such that Established.
[0134] Use α i y i +α j y j = c eliminates the variable α in equation (18) j , then we get a j The only constraint is α i≥0, that is, the updated α can be efficiently calculated without calling the numerical optimization algorithm i and α j .
[0135] Calculate the parameter b by taking the average value of all support vectors:
[0136]
[0137] In the above discussion, it is assumed that the training samples are linearly separable. For nonlinear separable problems, if the original space is finite-dimensional, there must be a higher-dimensional feature space that makes the samples linearly separable after being mapped to this space. i ,y i Respectively represent sample sets; x s ,y s Represent support vectors respectively; i and j represent the i-th and j-th vectors respectively, and S represents the subscript set of all support vectors; let φ(x) represent the feature vector after mapping x, and the model corresponding to the hyperplane divided in the feature space is expressed as:
[0138] f(x)=ω T φ(x)+b (23)
[0139] Then we have:
[0140]
[0141] Its dual problem can be expressed as:
[0142]
[0143] By introducing the "kernel function", the above equation is solved and the kernel function is:
[0144] κ(x i ,y i )=<φ(x i ),φ(x j )>=φ(x i ) T φ(x j ) (26)
[0145] Substituting equation (26) into equation (25), we can obtain the model:
[0146]
[0147] 2. Decision Trees and Random Forests
[0148] (1) Decision Tree
[0149] Decision tree is a classic basic machine learning method, which is divided into two categories: classification decision tree and regression decision tree. CART (Classification and Regression Tree) regression tree is used for regression tasks. It is a binary tree structure and uses the Gini index as a partitioning indicator. The regression tree divides the feature space into several units, each of which corresponds to a specific output. Its main operations include feature selection, tree generation and pruning. When it is used as a base learner for random forests, these problems can be effectively avoided.
[0150] (2) Random Forest
[0151] Random forest is an ensemble learning algorithm. It builds multiple models on the data set and integrates the analysis and prediction results of all models. The principle is as follows Figure 2 As shown in the figure. Ensemble learning combines multiple base learners to obtain better generalization performance than a single learner. According to the ensemble method, common ensemble algorithms are divided into three types: bagging (bootstrap aggregating, bagging), boosting (boosting) and stacking (stacking). Bagging and boosting are the most common ensemble methods. The most representative boosting algorithm is XGBoost.
[0152] Bagging is the most famous representative of parallel ensemble learning methods. Bagging is based on the self-service sampling method. In a given data set containing m samples, random sampling with replacement is performed. After m samplings, a sampling set containing m training samples is obtained. The sampling operation is repeated T times to obtain T sampling sets containing m training samples. A base learner is trained for each sampling set, and finally these base learners are combined according to specific rules. After the data set is self-service sampled, some samples will appear multiple times in the sampling set, and some samples will not appear in the sampling set. After estimation, the probability that a sample is never collected after m samplings is:
[0153]
[0154] From the above formula, we can see that about 36.8% of the samples in the initial data set do not appear in the sampling set, so we can use the sampling set as the training set and the remaining sample set as the test set. The result of testing in this way is called "out-of-bag estimate".
[0155] Bagging is an efficient ensemble learning algorithm. Assuming the computational complexity of the base learner is O(m), the complexity of Bagging is T(O(m)+O(s)), where O(s) represents the complexity of the sampling and voting or averaging process. Therefore, the complexity of training the Bagging ensemble is the same as the complexity of directly using the base learning algorithm to train the model. At the same time, Bagging is not only applicable to binary classification tasks, but also to multi-classification, regression and other tasks without modification.
[0156] Random Forest (RF) is an ensemble learning algorithm based on bagging. Based on the model constructed using the bagging ensemble principle, RF uses decision trees as the base learner. During the training of the decision tree, before selecting the optimal attribute to partition the node, a subset of k attributes is randomly selected from the attribute set of the node (assuming there are d attributes), and then an optimal attribute is selected from this subset for partitioning. k controls the degree of randomness. In general, it is recommended to take
[0157] 3. Two-layer DOA estimation model based on SVM-RF
[0158] The double-layer DOA estimation model based on SVM-RF proposed in the present invention is as follows: Figure 3 As shown in the figure, the model includes an SVM and multiple RFs. Its working principle is: the received signal is first divided into data sets with DOA estimation values belonging to different ranges using the support vector classification model, where equation (19) is the basic type of support vector classification. This paper is a nonlinear problem, and the model is equation (27);
[0159] Then different data sets are input into the trained random forest regression prediction model with different ranges for prediction, and the final results are merged to obtain the final DOA estimation value, where different ranges refer to the target incidence range, for example, the incidence range is [-80,80], [-90,90], [-70,70], etc. This paper divides the training set into multiple training subsets according to different angle ranges for RF model training, which means that multiple RFs are pre-trained first, and then data sets with different ranges are input into each trained RF one by one for prediction. The test set contains thousands of data. Data sets with different angle ranges are estimated using different RFs, and finally merged together to calculate the root mean square error with the true value of each data.<pandas.core.series.Series> The list data composed of , directly use pandas.concat() to merge.
[0160] When training the model, first train the SVM, and use the constructed training set features and category labels as input. After training the SVM, divide the training set into multiple data sets according to the category labels, and then use the features of different training sets (feature extraction in step 3) and DOA labels as input to train different RF regression models.
[0161] When predicting the DOA value, the input is the feature (the feature extracted in step 3, the eigenvalue vector β set, the same generation method), and the output is the DOA estimate. After the test set enters the model, it is first classified by the SVM model, and then the test set is divided into multiple subsets according to the classification results, and then enters the RandomForest regression model of the corresponding category to predict the DOA value. The output results of each RandomForest regression model are merged to obtain the DOA estimate.
[0162] Example
[0163] To verify the performance of the method proposed in the present invention, the following simulation experiments were performed. The experimental environment of this embodiment is Python 3.8.0, and Pycharm software is used to implement MUSIC, SVR, XGBoost, RF and the SVM-RF algorithm proposed in this paper. The estimation performance of different algorithms under different conditions is compared and analyzed.
[0164] 1. Basic conditions
[0165] In this embodiment, the basic conditions of each simulation experiment are a uniform linear array with 8 array elements under ideal conditions, 1 spatial target source, λ / 2 array element spacing, a target incident range of [-80°, 80°], and Gaussian white noise. The MUSIC algorithm search step is 0.1°, and the machine learning algorithm regression prediction accuracy is 0.1°.
[0166] In this embodiment, the holdout method is used to conduct the experiment. The generated data set D is randomly divided into two subsets, the training set S and the test set T, according to the ratio of training set: test set = 8:2, satisfying D = S ∪ T, The generalization ability of the model for new samples is tested with the test set, and the test error is approximated as the generalization error of the model. At the same time, the running time of different algorithms is compared to measure the real-time performance of the algorithm in estimating DOA. The root mean square error (RMSE) is used to evaluate the algorithm estimation accuracy. The root mean square error formula is:
[0167]
[0168] In the formula, n is the number of test set samples, f(x i ) is the target angle predicted by the model, y i is the actual target angle.
[0169] Since both the MUSIC algorithm and the machine learning algorithm need to perform the covariance matrix operation, the statistical angle estimation time of the experimental process is counted after the covariance matrix is calculated. In the SVM-RF proposed in the present invention, the linear kernel function (linear) adopted by SVC, the penalty parameter C of the error term = 500, and the classification accuracy Accuracy is stable at 0.99. In the machine learning algorithm used for comparison, the support vector regression uses the radial basis kernel function (rbf), the penalty parameter C of the error term = 1000, tol = 0.001. XGBoost algorithm, learning rate eta = 0.06, maximum depth of each tree max_depth = 7, and regression strategy objective = 'reg: linear'. RandomForest algorithm adopts: n_estimators = 70, random_state = 42.
[0170] 2. Simulation experiment 1: Performance comparison of different algorithms under ideal conditions
[0171] Experimental conditions: SNR = 10dB, number of snapshots is 500, incident angle range is [-90°, 90°], number of training set samples is 14400, and number of test set samples is 3600.
[0172] Simulation experiment results: Draw the DOA estimation fitting results of different algorithms, such as Figure 4a-4e As shown, it can be seen from the figure that for the model trained by the data sample, under the test set, the traditional MUSIC algorithm and the SVM-RF algorithm proposed in the present invention estimate the mean square error equivalent, and when the angle of arrival is close to -90 degrees and 90 degrees, the model prediction value is significantly different from the true value. From a numerical point of view, the root mean square error of the four algorithms MUSIC, SVM-RF, RF and XGBoost is not much different, but combined with the DOA estimation fitting diagram, when the angle of arrival is within the range of -80° to 80°, MUSIC and SVM-RF can accurately estimate the angle, and the overall performance is better than RF, SVR and XGBoost regression algorithms. The number of angles incorrectly estimated by the other three algorithms is greater. Compared with the SVM-RF proposed in the present invention, the SVR algorithm lacks a classification process. All samples in the range of -90° to 90° only train one RF model, and RF cannot fully learn the pattern of the data. In SVM-RF, multiple RFs are trained for a smaller range of angles of arrival, and can more fully learn the pattern in the data.
[0173] Combined with Table 1, the running time of each algorithm is compared. For an estimated 3,600 samples, the MUSIC algorithm takes the longest time, 33.12 seconds, due to the need to search for spectral peaks. The prediction speed of the machine learning model is greatly improved compared with the traditional algorithm. XGBoost has the lowest time complexity, and SVM-RF takes about 20.03 seconds. On average, it only takes 0.0056 seconds to predict one sample, which is about 0.048 seconds less than the MUSIC single sample estimation.
[0174] Table 1 DOA estimation duration and root mean square error of five algorithms
[0175]
[0176] Since the RMS error cannot reflect the generalization performance of several algorithms, the experiment was repeated under the conditions of SNR = 10dB, 500 snapshots, incident angle range [-80°, 80°], 12800 training set samples, and 3200 test set samples. The DOA estimation fitting results of different algorithms are shown in Figure 2. Figure 5a-Figure 5e As shown in the figure, it can be seen that the SVM-RF proposed in the present invention performs comparable to MUSIC in terms of algorithm estimation accuracy. Combined with Table 2, it can be seen that the estimation time of this method is much shorter than that of the MUSIC algorithm.
[0177] Table 2 DOA estimation duration and RMS error of five algorithms
[0178]
[0179] 3. Simulation experiment 2: Performance comparison of various algorithms under different snapshot numbers
[0180] Experimental conditions: SNR = 10dB, number of snapshots is [10, 30, 50, 70, 90, 100, 200, 300, 400, 500], incident angle range is [-80°, 80°], and the number of samples in the training set and the test set are 12800 and 3200 respectively.
[0181] Simulation experiment results: Plot the relationship between the root mean square error and running time of each algorithm and the number of snapshots. Figure 6a-Figure 6bAs shown. It can be seen from the figure that: ① The number of snapshots of the three algorithms SVM-RF, MUSIC, and SVR is roughly positively correlated with the angle measurement accuracy of each algorithm, and when the number of snapshots reaches a certain value, the RSME gradually stabilizes. The RSME of the two integrated algorithms RF and XGBoost fluctuates frequently with the change of the number of snapshots. ② In terms of running time, the SVM-RF, RF and XGBoost algorithms are much smaller than the MUSIC and SVR algorithms. The running time of the four algorithms SVM-RF, MUSIC, RF and XGBoost has a low correlation with the number of snapshots, and the change of the number of snapshots has almost no effect on the algorithm estimation time. The estimation time of the SVR algorithm is negatively correlated with the number of snapshots. The larger the number of snapshots, the shorter the SVR estimation time. ③ SVM-RF and MUSIC always keep the root mean square error value less than 0.5 under the condition of a small number of snapshots, and the estimation accuracy of the two is comparable.
[0182] In summary, SVM-RF has strong robustness and can always maintain real-time and high-precision estimation when the number of snapshots changes, and its performance is better than other algorithms.
[0183] 4. Simulation experiment 3: Performance comparison of various algorithms under different signal-to-noise ratios
[0184] Experimental conditions: SNR = [-10, -5, 0, 5, 10, 15, 20], unit: dB, number of snapshots: 500, incident angle range: [-80°, 80°], under each SNR condition: number of training set samples: 12800, number of test set samples: 3200.
[0185] Simulation experiment results: Plot the relationship between the root mean square error and running time of each algorithm and the signal-to-noise ratio, such as Figure 7a-Figure 7b As shown. It can be seen from the figure: ① The root mean square error of each algorithm is negatively correlated with the signal-to-noise ratio. The larger the signal-to-noise ratio, the higher the estimation accuracy, and after the signal-to-noise ratio reaches 5dB, it gradually stabilizes. ② RF and XGBoost are most sensitive to changes in the signal-to-noise ratio. When the signal-to-noise ratio is low, the estimation accuracy of both is the worst. After the signal-to-noise ratio reaches 10dB, the mean square error of DOA estimation stabilizes at around 0.4, with high accuracy. ③ The SVM-RF proposed in the present invention can maintain a high estimation accuracy under various signal-to-noise ratio conditions, which is comparable to the MUSIC algorithm.
[0186] According to the above research, the present invention also has at least the following embodiments
[0187] Example 1
[0188] A random forest-based DOA estimation system is implemented according to a random forest-based DOA estimation method, and is characterized by comprising:
[0189] The target signal acquisition module is used for the estimated target signal and processes and extracts the features of the signal;
[0190] A two-layer DOA estimation model building module is used to build an estimation model based on SVM and random regression forest;
[0191] The DOA estimation module is used to estimate the DOA of the target signal through the established estimation model.
[0192] Example 2
[0193] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the random forest-based DOA estimation method described above.
[0194] Example 3
[0195] A computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the random forest-based DOA estimation method described above is implemented.
[0196] Example 4
[0197] A computer program product includes a computer program, characterized in that when the computer program is executed by a processor, the random forest-based DOA estimation method described above is implemented.
[0198] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A DOA estimation method based on random forest, characterized in that: The following steps are involved: Step 1: Data Collection Acquire target signal; Step 2: Data Preprocessing Handle duplicate values, missing values, and outliers, and complete data annotation; Step 3: Feature Extraction Calculate the covariance of the acquired target signal, extract the real part and imaginary part of the upper triangular part of the covariance matrix as eigenvalues; Step 4: Dataset Division Divide the processed data set in step 3 into two subsets: training set and test set; Step 5: Model building Construct a two-layer DOA estimation model based on SVM-RF and use the training set for model training; Step 6: Validate the model Use the model trained in step 5 to estimate the DOA of the test set and compare the estimated value with the true value; Step 7: Use the model to estimate DOA.
2. The DOA estimation method based on random forest according to claim 1, characterized in that: The double-layer DOA estimation model based on SVM-RF includes an SVM model and a plurality of parallel random forest regression models connected thereto.
3. The DOA estimation method based on random forest according to claim 2, characterized in that: The specific steps of step 2 are: Step 21: Keep duplicate data and data containing outliers, and remove data containing missing values; Step 22: Data Annotation: Create the category labels of the dataset C = [c1, c2, ..., c k ] and DOA tag Degree=[d1,d2,…,d m ]; Among them, the DOA label is known, and the category label is generated by the angle label. d test Indicates that every d test Train a random forest regression model.
4. The random forest-based DOA estimation method according to claim 3, characterized in that: The specific steps of step 3 are: Step 31: Assuming there are M array elements, K signal sources, and a uniform linear array with a spacing of d between array elements, the received signal is expressed as: x(t)=A(θ)s(t)+n(t); Where θ=[θ1,θ2,…,θ K ] represents the angle between the incoming wave direction and the array element normal; n(t) represents zero-mean stationary Gaussian white noise, A(θ)=[a(θ1),a(θ2),...,a(θ K )]∈C M×K ,θ k is the estimated value of the kth source; a(t) represents the amplitude modulation function, Φ(t) represents the phase modulation function; w0=2πf0 represents the carrier frequency; Step 32: Calculate the covariance of the received signal and obtain the covariance matrix: R xx =AR s A H +σ 2 I; Among them, the variance is σ 2 , R s represents the eigenvalue diagonal matrix, matrix R xx is a positive Hermitian matrix whose eigenvalues are all positive real numbers; A represents the array steering matrix, A H represents the conjugate transpose operation of the array-directed matrix, and I represents the identity matrix; Step 33: Extract the data in the upper right triangle of the covariance matrix, separate the real and imaginary parts of the data into two vectors α1 and α2, and then merge α1 and α2 into an eigenvalue vector β; Step 34: According to the incident range interval of the received signal, m data samples are generated every n degrees, thereby generating a data set.
5. The random forest-based DOA estimation method according to claim 4, characterized in that: The specific steps of step 5 are: Step 51: Build a support vector machine classification model and use the features and category labels in the training set for training; Step 52: Divide the training set into training subsets according to the category label values; Step 53: Build multiple random forest regression models. Each training subset corresponds to a model for training. The model input is the feature and the output is the angle label.
6. A DOA estimation system based on random forest, implemented according to the DOA estimation method based on random forest according to any one of claims 1 to 5, characterized in that: include: A target signal acquisition module, used for the target signal with estimation; A two-layer DOA estimation model building module is used to build an estimation model based on SVM and random regression forest; The DOA estimation module is used to estimate the DOA of the target signal through the established estimation model.
7. An electronic device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the random forest-based DOA estimation method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the random forest-based DOA estimation method according to any one of claims 1 to 5 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the random forest-based DOA estimation method described in any one of claims 1 to 5 is implemented.
