Seawater temperature field reconstruction algorithm based on ASMP threshold value optimization and low-pass filtering
Technical Field
The invention belongs to the technical field of compressed sensing reconstruction, and particularly relates to a seawater temperature field reconstruction algorithm based on ASMP threshold optimization and low-pass filtering.
Background
The ocean temperature data is generally acquired by adopting an actual measurement mode, but the environment of the ocean is very special, so that the actual measurement cost is higher, meanwhile, the seawater temperature fluctuation is large, periodicity and aperiodicity coexist, and the sampling data obtained by the actual measurement has no continuity and is limited in quantity. Therefore, in general, only a small amount of discrete seawater temperature data can be obtained by ocean observation, and in order to realize continuous expression of the seawater temperature field, reconstruction of the seawater temperature field must be performed on the observed data. An interpolation algorithm is generally selected for the conventional ocean temperature field reconstruction, the method is large and complex in calculation amount, low in accuracy, time-consuming and labor-consuming, and a large number of observed values are usually needed to accurately reconstruct the ocean temperature field. The compressed sensing is a new theory, and has the advantages that the original signal can be reconstructed more accurately by using fewer sampling points, so that the reconstruction accuracy is improved while resources are saved. The conventional information sampling is based on the shannon sampling theorem, which indicates that the signal can be accurately reconstructed if the sampling rate of the signal is not lower than twice the highest frequency. This theory governs the acquisition, processing, storage and transmission of almost all signals. On the one hand, in many practical applications, such as ultra-wideband communication, nuclear magnetic resonance, space detection, high-speed AD converters, etc., when information is stored and processed, a large amount of sampling data is needed to achieve a sampling rate, which results in expensive sampling hardware, low acquisition efficiency, and even difficult realization in some cases. On the other hand, in terms of data storage and transmission, the conventional method is to acquire data in a Nyquist manner, then compress the acquired data, and finally store or transmit the compressed data. In recent years, d.donoho, e.cans, and chinese scientist t.tao et al have proposed a new theory of information acquisition-compressed sensing. The theory states that: for a compressible signal, it can be data sampled and accurately reconstructed in a manner that is below or well below the nyquist criterion. Unlike shannon's theorem, compressed sensing does not measure the signal itself directly, it uses non-adaptive linear projection to obtain the overall structure of the signal to directly derive important information, ignoring information that would be discarded in lossy compression.
A distributed sampling mode is provided by B.Chen, P.Pandey, and D.Pompili, and an ocean temperature field is reconstructed by utilizing a compressed sensing technology, so that the preliminary understanding of the regional temperature field is realized. The characteristics of an ocean temperature field are not considered in the research, the application of the compressed sensing theory is more basic, and the reconstruction precision is not high. At present, no research is available on reconstruction algorithms for improving compressed sensing according to the data characteristics of the ocean temperature field. The invention provides a seawater temperature field reconstruction algorithm based on ASMP threshold optimization and low-pass filtering, which enables the estimation of sparsity to be more accurate and improves the reconstruction precision of a temperature field by searching for an optimal threshold, and meanwhile, the energy of the temperature field is mainly concentrated in a low-frequency domain.
Disclosure of Invention
The invention is realized by the following steps:
a seawater temperature field reconstruction algorithm based on ASMP threshold value optimization and low-pass filtering comprises the following steps:
(1) carrying out sparse transformation on the acquired temperature data;
(2) initializing an ASMP algorithm, and operating the ASMP algorithm: determining a threshold search range as tmin~tmaxTaking the threshold t as an input parameter of an ASMP algorithm, and reconstructing a target signal by using the ASMP algorithm;
(3) the starting threshold in the refinement threshold search step is determined.
Outputting sparse estimation x by each iteration ASMP algorithm, recording the number of non-zero elements of elements 1/2 after x as p, searching the minimum value of p in the iteration process and recording as pmin(ii) a Record first arrival pminCorresponding ASMP algorithm input threshold tminpAs optimum for refinementAn initial threshold in the threshold search step; repeating (3) until the number of iterations n is reachedfirst_loopWherein n isfirst_loopIs (2) the set number of iterations;
(4) running an ASMP algorithm to search a refinement threshold value and determining an optimal threshold value;
(5) and (3) taking the optimal threshold as an input quantity, operating an ASMP algorithm to obtain sparse estimation:
the optimal threshold value t obtained in the step (4)bestThe output sparse estimate is recorded as x as an input parameter of the ASMP algorithmbest=[x1,x2,…,xn];
(6) And (3) carrying out moving average filtering processing on the sparse estimation:
introducing a moving average filter, performing low-pass filtering on the output sparse estimation, filtering out a high-frequency signal, wherein the default window width is 5, and obtaining a denoised signal which is recorded as x'best=[x'1,x'2,…,x'n];
(8) And reconstructing the temperature field distribution.
The step (1) specifically comprises the following steps:
f is a one-dimensional sparsely populated signal of the acquired temperature data, where f ═ Ψ x, x ∈ Rn,Ψ=[ψ1,ψ2,K,ψn]∈Rn×nIs the orthonormal basis, x is the projection of the signal f on the sparse basis Ψ; the psi of the sparse transform adopts DCT basis, and the DCT basis form is as follows:
wherein, CnIs the DCT basis, n is the dimension of the signal f;
Φ=[φ1,φ2,K,φn]is at RnAnother orthonormal basis on the domain, being a unit moment of order nxn; y is1,y2,KymIs that the signal f belongs to R in the observation array phi ∈ RnObserved value y ofi=<f,φi>(ii) a Encoding the sampling position points into a matrix R of order m x n, in phase with the unit matrix phiThe multiplication results in a vector y of the observed values, R Φ f.
The step (2) specifically comprises the following steps:
setting t according to empirical value of ASMP reconstruction algorithm thresholdmin=0.5,tmax2.5, the initialization threshold t is tmin(ii) a Number of iterations nfirst_loopSet to 100 times, iterate threshold t and (t) each timemax-tmin)/nfirst_loopThe amplitude is increased progressively;
(2.1) performing outer loop initialization, and setting sparse estimation and residual margin: setting sparse estimation x as 0 and residual r as y;
(2.2) calculating an inner product, updating an outer loop index set: the inner product is expressed as v ═ Φ
Tr, ratio of absolute values in inner product v
The positions of large atoms are added to the outer circulation support set and are recorded as omega, wherein the sparsity is estimated as s;
(2.3) initializing an inner loop, setting residual margin, sparse estimation and an inner loop counter k: setting residual margin and sparse estimate r(0)=r,x(0)X, where the loop iteration counter is k 1, and the value of k is increased by 1 each time an iteration is performed;
(2.4) calculating an inner product, updating an inner loop index set: inner product u is phiTr(k-1)Where Φ is the measurement matrix, r(k-1)Adding the positions of the first s elements with the maximum absolute value of u to an index set for residual margin of the k-1 th internal loop iteration, and recording the positions as Λ;
(2.5) updating the inner loop support set, and updating sparse estimation and residual margin of the k iteration inner loop by using a least square method: Γ ═ Λ ═ u ═ q (x)(k-1)) Wherein q (x)(k-1)) For the support set of the inner loop of the k-1 iteration, updating the sparse estimate x of the inner loop of the k iteration by using a least square method(k)And residual margin r(k);
(2.6) judging whether the residual error meets the requirement: if the residual error of the kth iteration is more than or equal to the residual error of the k-1 th iteration, namely | | r(k)||2≥||r(k-1)||2Returning to (2.2) to operate again, and if not, returning to (2.5);
(2.7) checking whether the external circulation times reach the standard: that is, checking whether the maximum loop iteration number N is reached, and if so, outputting the target signal
And returning to (2.2) to operate again as an output quantity.
The step (4) specifically comprises the following steps:
(4.1) refine the search for the optimal threshold, the starting threshold t from (3)minpInitially, threshold t is set at (t)max-tmin)/(nfirst_loopX 2) increasing in amplitude;
(4.2) running the ASMP algorithm, and outputting a reconstructed sparse estimate x: the input threshold value of the j iteration ASMP algorithm is tj=tminp+(tmax-tmin)/(nfirst_loop×2)·j,j<nsecond_loopWherein, tminIs the threshold search lower limit, tmaxIs the upper limit of the threshold search range, nfirst_loopIs (2) the set number of iterations, nsecond_loopThe iteration number set for (4.1);
(4.3) sparse estimation of the number p of nonzero elements in the rear 1/2 element of x and the number q of nonzero elements in the front 1/2 element of x<pminA threshold value t in the range of +3, q values corresponding to the reconstructed sparse estimate x are checked, and a search is performed for a value satisfying the condition p<pminMaximum value q of q values of +3max,qmaxThe corresponding threshold t is the optimum threshold to be found and is recorded as tbest;
(4.4) checking whether the maximum number of iterations n has been reachedsecond_loopIf yes, outputting the optimal threshold value tbestOtherwise, returning to (4.2);
the step (8) specifically comprises the following steps:
the calculation method of each element is as follows:
x'1=x1;
x'2=(x1+x2+x3)/3;
x'3=(x1+x2+x3+x4+x5)/5;
x'4=(x2+x3+x4+x5+x6)/5;
x'5=(x3+x4+x5+x6+x7)/5;
……
x'n=(xn-2+xn-1+xn+xn+1+xn+2)/5;
wherein xi'represents denoised signal x'best=[x'1,x'2,…,x'n]I is more than or equal to 1 and less than or equal to n.
The step (8) specifically comprises the following steps:
the reconstructed temperature field distribution is calculated as follows:
f=Ψxbest';
in the formula, xbest'is a denoised sparse estimate of the temperature signal from (7),' is a sparse matrix, which is a DCT basis, and f is a one-dimensional signal of the temperature distribution.
The invention has the advantages that:
the invention improves the threshold input of the ASMP algorithm, enables the estimation of sparsity to be more accurate by searching for the optimal threshold, improves the reconstruction precision of the temperature field, and simultaneously adopts a moving average filter to perform low-pass filtering to further improve the reconstruction precision of the temperature field by considering that the energy of the temperature field is mainly concentrated in a low frequency domain.
Drawings
FIG. 1 is a flow chart of a seawater temperature field reconstruction algorithm based on ASMP threshold optimization and low-pass filtering, which is adopted by the present invention;
FIG. 2 is a flow chart of an ASMP reconstruction algorithm employed in the present invention;
fig. 3 is a flowchart of an ASMP threshold optimal reconstruction algorithm employed in the present invention.
Detailed Description
The invention is further illustrated with reference to the accompanying drawings:
a seawater temperature field reconstruction algorithm based on ASMP threshold optimization and low-pass filtering, as shown in fig. 1, includes the following steps:
step 1, carrying out sparse transformation on the acquired temperature data
The distribution of the ocean temperature field has certain spatial variability, the temperature data of the spatial distribution are not mutually independent, the change in the temperature data space is a stable process, and the data value of the sudden change is less. Therefore, since the temperature signal energy is mainly concentrated in the low frequency region, it is necessary to perform approximate thinning processing on the temperature data so that the non-zero coefficient is mainly concentrated on the low frequency basis.
Consider psi ═ psi1,ψ2,K,ψn]∈Rn×nIs an orthonormal basis, and f is a one-dimensional sparsely populated signal of acquired temperature data, where f ═ Ψ x, and x ∈ RnAnd x is the projection of the signal f on the sparse basis Ψ, i.e., the sparse estimate. In the present invention Ψ employs a DCT group. The DCT basis is formed as follows:
wherein, CnIs the DCT basis and n is the dimension of the signal f.
Φ=[φ1,φ2,K,φn]Is at RnAnother orthonormal basis on the domain, y1,y2,KymIs that the signal f belongs to R in the observation array phi ∈ RnObserved value y ofi=<f,φi>. The invention sets phi to be an n × n order identity matrix.
The sampling position points are encoded in an m × n matrix R, and multiplied by a unit matrix Φ to obtain a vector y, which is an observation value, R Φ f.
Step 2, initializing the ASMP algorithm and operating the ASMP algorithm
Determining a threshold search range as tmin~tmaxAccording to the invention, t is set according to the empirical value of the threshold value of the ASMP reconstruction algorithmmin=0.5,tmax2.5, the initialization threshold t is tmin. According to empirical values, the number of iterations nfirst_loopSet to 100 times, iterate threshold t and (t) each timemax-tmin)/nfirst_loopThe amplitude is incremented.
Taking a threshold value t as an input parameter of an ASMP algorithm, reconstructing a target signal by using the ASMP algorithm, setting sparse estimation of the signal as x, residual error margin as R, measurement quantity as y, a sensing matrix A as R phi psi, R, phi and psi as a coding matrix, a measurement matrix and a sparse matrix in the step 1 respectively, wherein t is an input threshold value of the algorithm, M is the dimension of a measurement value, namely the number of sampling points, and the maximum iteration number of an outer loop is N. The method comprises the following specific steps:
and 2.1, initializing an outer loop, setting the sparse estimation x to be 0, and setting the residual margin r to be y.
Step 2.2. inner product is expressed as v ═ Φ
Tr, ratio of absolute values in inner product v
The positions of the large atoms are added to the outer circulation support set, denoted Ω, where sparsity is estimated as s.
Step 2.3, performing inner loop initialization, setting residual margin and sparse estimation r(0)=r,x(0)X, where the loop iteration counter is k 1, and the value of k is incremented by 1 each time an iteration is performed.
Step 2.4 calculate inner product u ═ ΦTr(k-1)Where Φ is the measurement matrix, r(k-1)And adding the positions of the first s elements with the maximum absolute value of u to an index set for the residual margin of the k-1 th inner loop iteration, and recording the positions as lambda.
Step 2.5, updating the internal circulation supporting set, wherein gamma is ═ Lambdueq (x)(k-1)) Wherein q (x)(k-1)) For the support set of the inner loop of the k-1 iteration, updating the sparse estimate x of the inner loop of the k iteration by using a least square method(k)And residual margin r(k)。
And 2.6, judging whether the residual error meets the requirement. If the residual error of the kth iteration is more than or equal to the residual error of the k-1 th iteration, namely | | r(k)||2≥||r(k-1)||2And returning to 2.2 for rerun, and if not, returning to 2.5.
And 2.7, checking whether the external circulation times reach the standard. That is, checking whether the maximum loop iteration number N is reached, and if so, outputting the target signal
And returning to 2.2 to operate again as an output quantity.
And 3, determining an initial threshold in the step of refining the threshold search.
In step 2, the I-th iteration ASMP algorithm inputs a threshold value ti=tmin+(tmax-tmin)/(nfirst_loop)·i,(i<nfirst_loop) Wherein, tminIs the lower limit of the threshold search range, tmaxIs the upper limit value of the threshold search range, the invention sets t according to the empirical value of the ASMP reconstruction algorithm thresholdmin=0.5,tmax=2.5,nfirst_loopIs the number of iterations set in step 2. Outputting sparse estimation x by each iteration ASMP algorithm, recording the number of non-zero elements of elements 1/2 after x as p, searching the minimum value of p in the iteration process and recording as pmin. Record first arrival pminCorresponding ASMP algorithm input threshold tminpAs the starting threshold in the refined optimal threshold search step. Repeating step 3 until the number of iterations n is reachedfirst_loop。
Step 4, running ASMP algorithm to search the refinement threshold value and determining the optimal threshold value
Step 4.1, the search of the optimal threshold value is refined, and the iteration times n are carried out according to the empirical valuesecond_loopSet to 100 times, the starting threshold t from step 3minpInitially, threshold t is set at (t)max-tmin)/(nfirst_loopX 2) increasing in amplitude, nfirst_loopFor the number of iterations in step 2, tminIs the lower limit of the threshold range, tmaxAnd a threshold range upper limit value.
Step 4.2, running the ASMP algorithm, wherein the input threshold value of the jth iteration ASMP algorithm is tj=tminp+(tmax-tmin)/(nfirst_loop×2)·j,(j<nsecond_loop) Wherein, tminIs the threshold search lower limit, tmaxIs the upper limit of the threshold search range, nfirst_loopIs the number of iterations, n, set in step 2second_loopThe number of iterations set for step 4.1. And outputting the reconstructed sparse estimate x. The specific steps of the ASMP algorithm are shown in step 2 of the invention.
Step 4.3, considering two parameters, sparsely estimating the number p of non-zero elements of the rear 1/2 element of x and the number q of non-zero elements of the front 1/2 element of x, wherein p is<pminA threshold value t in the range of +3, q values corresponding to the reconstructed sparse estimate x are checked, and a search is performed for a value satisfying the condition p<pminMaximum value q of q values of +3max,qmaxThe corresponding threshold t is the optimum threshold to be found and is recorded as tbest. Wherein p isminIs the minimum of the number of non-zero elements of the post-1/2 element from which sparse estimate x was obtained in step 3.
Step 4.4. checking whether the maximum iteration number n is reachedsecond_loopIf yes, outputting the optimal threshold value tbestOtherwise, returning to the step 4.2.
And 5, operating an ASMP algorithm by taking the optimal threshold value as an input quantity to obtain sparse estimation.
The optimal threshold value t obtained in the step 4 is usedbestThe output sparse estimate is recorded as x as an input parameter of the ASMP algorithmbest=[x1,x2,…,xn]. The specific steps of the ASMP algorithm are shown in step 2 of the invention.
Step 6, carrying out moving average filtering processing on the sparse estimation
Introducing a moving average filter, performing low-pass filtering on the output sparse estimation, filtering out a high-frequency signal, wherein the default window width is 5, and obtaining a denoised signal which is recorded as x'best=[x'1,x'2,…,x'n]Wherein, the calculation method of each element is as follows:
x'1=x1
x'2=(x1+x2+x3)/3
x'3=(x1+x2+x3+x4+x5)/5
x'4=(x2+x3+x4+x5+x6)/5
x'5=(x3+x4+x5+x6+x7)/5
……
x'n=(xn-2+xn-1+xn+xn+1+xn+2)/5
wherein x'iRepresenting denoised signal x'best=[x1',x'2,…,x'n]Wherein i is more than or equal to 1 and less than or equal to n.
Step 8, reconstructing the temperature field distribution
Using the calculation:
f=Ψxbest'
in the formula, xbest'is the denoised temperature signal sparse estimate from step 7,' is the sparse matrix, which is the DCT basis, and f is the one-dimensional signal of the temperature distribution. After the one-dimensional signal f is subjected to two-dimensional transformation, the two-dimensional distribution of the temperature can be obtained.