Disclosure of Invention
The invention aims to solve the technical problem of providing a satellite magnetic field seismic anomaly extraction method based on complex non-negative matrix factorization, which fully utilizes amplitude and phase information contained in satellite observation data in a time-frequency domain, so as to identify components related to a seismic, and enable seismic anomaly extraction to be more accurate and reliable.
The invention discloses a satellite magnetic field seismic anomaly extraction method based on complex non-negative matrix factorization, which comprises the following steps:
step 1, reading Swarm A satellite magnetic field data, and dividing the daily magnetic field data into a plurality of orbits;
Step 2, subtracting the CHASS-7 model endogenous field from the original Y component magnetic field data of each satellite orbit, removing the main magnetic field of the earth core and the rock ring magnetic field of the earth crust to obtain a residual magnetic field;
Step 3, carrying out short-time Fourier transform on the preprocessed data to obtain a complex time-frequency matrix in a rectangular coordinate representation form of a complex domain;
decomposing the complex time-frequency matrix by utilizing complex non-negative matrix decomposition to obtain R characteristic components, wherein each characteristic component comprises a base vector, a coefficient vector and a phase matrix;
step 5, obtaining time domain characteristic components from the characteristic components through inverse short-time Fourier transform;
Step 6, according to the characteristic that the seismic energy and the space-time information are concentrated in the seismic research area, calculating the energy-entropy ratio of each characteristic component by utilizing the coefficient vector of each characteristic component of the track and the time domain characteristic component, and selecting the characteristic component with the largest energy-entropy ratio as the seismic component according to the sequence from big to small;
and 7, calculating the root mean square of each track time domain seismic component, setting a threshold value by using an overrun method, and extracting abnormal points from the track seismic components.
Further, the step 1 includes:
The method comprises the steps of reading Swarm A satellite magnetic field data, dividing daily magnetic field data into a plurality of orbits, specifically, storing the magnetic field data in a daily unit, dividing the magnetic field data by using 50 DEG S and 50 DEG N as orbit endpoints, and obtaining 32 satellite orbits daily.
Further, the step 2 includes:
The raw Y-component magnetic field data for each satellite orbit minus the CHAOS-7 model endogenous field is calculated as:
Wherein B y0 is the original Y component magnetic field, Endogenous field Y component data calculated for the CHASS-7 model, B y being the residual Y component magnetic field;
the residual magnetic field is differentiated, and the calculation is as follows:
x(n)=By(n+1)-By(n) (2)
Where B y (N) is the nth data point of the remaining Y component magnetic field, the data length of B y is set to N, and x (N) is the differential Y component magnetic field.
Further, the step 3 includes:
short-time Fourier transform is carried out on the differential Y component magnetic field x (n), and the discrete short-time Fourier transform is specifically as follows:
Where m represents the time index of the input signal x (n), g (n) is the selected window function, g (n-m) is the sliding window, n determines the current sliding position, j represents the imaginary unit, ω is the frequency index, and V (n, ω) represents the complex time-frequency matrix obtained by the discrete short-time fourier transform.
Further, the step4 includes:
Decomposing the complex time-frequency matrix by complex non-negative matrix decomposition, specifically, representing the complex time-frequency matrix V (n, omega) obtained by short-time Fourier transformation as V k×l of k rows and l columns, giving the number R of decomposition characteristic components, wherein R is a positive integer and satisfies R < < min (k, l), decomposing the complex time-frequency matrix V k×l into a matrix W k×R, a matrix H R×l and a matrix Wherein W k×R is referred to as a basis matrix, representing the frequency distribution characteristics of the data, H R×l is referred to as a coefficient matrix, representing the weights of the different frequency distribution characteristics in time/space,Refers to a time-varying phase spectrum, comprising a phase matrix of k rows and l columns corresponding to R characteristic components, hereinafter abbreviated as V, W, H,The complex non-negative matrix factorization mathematical model is:
Wherein, the A Hadamard product representing two matrices, the elements of which are defined as the product of the corresponding elements of the two matrices, W k×r representing the r-th column of the base matrix W, H r×l representing the r-th row of the coefficient matrix H,Representing time-varying phase spectraR is more than or equal to 1 and less than or equal to R.
To approximate the decomposition result to complex matrix V as much as possible, KL divergence is used to measure the original and reconstructed matricesThe error between them, the objective function is:
Wherein, the As an objective function, X k,r,l is an estimated value of the reconstructed complex time-frequency matrix of the R-th feature component, R (H r,l) is a penalty term based on p-norm, and when 0< p <2, the sparsity of H r,l can be effectively controlled. The penalty term is:
R(Hr,l)=2λ|Hr,l|p,λ>0 (5)
λ is the weight coefficient of the penalty term;
The formulas for the auxiliary functions Z k,r,l,dk,r,l,Ak,r,l and B k,r,l are as follows:
Zk,r,l=|Xk,r,l| (6)
finally, the iterative updating rule when 0< p <1 is obtained is as follows:
Zk,r,l=|Xk,r,l| (14)
Yk,r,l=|Xk,r,l| (15)
Ur,l=Hr,l (16)
the iterative algorithm steps are as follows:
Input complex time-frequency matrix V, number of decomposed eigenvectors R, upper limit of iteration times N iter
(1) Initializing W, H and X k,r,l;
(2) Updating the objective function variable by using the formulas (11) - (17), iterating continuously until the value of the objective function formula (5) converges or reaches the set iteration times N iter, and stopping iterating;
the output is W, H,
R characteristic components are obtained through decomposition, wherein the R characteristic components comprise an R column vector W r of a base matrix W, an R row vector H r of a coefficient matrix H and a corresponding phase matrixH r coefficient vector, W r base vector.
Further, the step 5 includes:
the time domain characteristic components are obtained by carrying out inverse short-time Fourier transform on the characteristic components, and the time domain characteristic components are specifically:
ISTFT () represents a function of the inverse short-time Fourier transform.
Further, the step 6 includes:
The energy-entropy ratio of each characteristic component of the track consists of an energy ratio and an entropy ratio, wherein the energy ratio refers to the ratio of the energy to the whole track in the seismic investigation region of the r component of the track, and the entropy ratio refers to the ratio of shannon entropy to the whole track in the seismic investigation region of the time domain characteristic component.
Shannon entropy Z i(yr) in the seismic investigation region and shannon entropy Z (y r) for the entire trajectory are calculated as follows:
wherein, the point between s 1 and s 2 is in the seismic investigation region, N is the length of the time domain feature component Y r, p (Y r) represents the probability that the random event Y is Y r, and s 1、s2 is the minimum latitude and the maximum latitude of the seismic investigation region respectively.
The energy-entropy ratio is calculated as follows:
the points between Ps and Pe are in the seismic research area, L is the number of columns of H r,l, and Ps and Pe are the minimum latitude and the maximum latitude of the corresponding seismic research area obtained by short-time Fourier transform respectively.
Sorting the characteristic components according to the energy-entropy ratio from large to small, respectively marking the basis vectors of the sorted characteristic components as W s1、Ws2、...、WsR, respectively marking the coefficient vectors as H s1、Hs2、…、HsR, respectively marking the phase matrixes asThe reconstructed time domain data are denoted as y s1、ys2、…、ysR, respectively, and the feature component with the largest energy-entropy ratio is selected as the seismic component.
Further, the step 7 includes:
In substep ①, the root mean square of the time domain seismic components of each track is calculated as:
The substep ② threshold is set as:
Thre=P×RMS (22)
p is an empirical parameter, typically set to 3, and Thre is an anomaly extraction threshold
When the amplitude of the time domain seismic component data point in the seismic investigation region is greater than Thre, the point is considered to be a seismic outlier while the trajectory is marked as an outlier trajectory.
Compared with the prior art, the invention has the beneficial effects that:
The satellite magnetic field seismic anomaly extraction method based on complex non-negative matrix factorization comprises the steps of removing an endogenous field through subtracting a CHAOS-7 model, performing first-order difference, removing a background field of satellite magnetic field data, performing time-frequency conversion on preprocessed data with the background field removed through short-time Fourier transform to obtain a complex time-frequency matrix, according to the characteristics of global magnetic field influence and seismic influence on a local area magnetic field caused by non-seismic factors such as solar activity and magnetic storm, obtaining a plurality of characteristic components through utilizing the advantages of complex non-negative matrix factorization local feature extraction, wherein each characteristic component comprises a base vector, a coefficient vector and a corresponding phase matrix, fully utilizing amplitude and phase information contained in a time-frequency domain of satellite magnetic field signals, obtaining a reconstructed time domain characteristic component through inverse short-time Fourier transform, identifying a seismic component through utilizing an energy-entropy ratio according to the characteristics of seismic energy and space-time information distribution, setting a threshold value through calculating root mean square of the time domain seismic component, and extracting seismic anomalies through adopting an overrun method. According to the characteristic that the abnormal distribution of the seismic magnetic field is concentrated in the seismic influence area, the abnormal characteristics generated by the earthquake and the non-earthquake factors are separated by utilizing the advantages of complex non-negative matrix factorization local characteristic extraction and the characteristic of fully utilizing complex domain amplitude information and phase information, so that the abnormal seismic magnetic field is extracted more accurately and reliably, and the recognition of the abnormal phenomenon of the ionosphere seismic magnetic field is deepened.
On the basis of having the advantage of extracting local features, the complex non-negative matrix decomposition method can approximately decompose the original complex matrix V into two non-negative matrices W E R k×r、H∈Rr×l and a phase spectrum thereofWhere W is called a basis matrix, representing the frequency distribution characteristics of the data, and H is called a coefficient matrix, representing the weights of the different frequency distribution characteristics in time/space. After removing the background of satellite magnetic field data, carrying out short-time Fourier transform to obtain a time spectrum matrix of a complex domain, decomposing the time spectrum matrix by adopting a complex non-negative matrix to obtain seismic components, reconstructing back to a time domain by utilizing inverse short-time Fourier transform, extracting seismic anomalies by an overrun method, and determining an anomaly orbit. The method fully utilizes the amplitude and phase information contained in the magnetic field signal, and increases the reliability of the seismic anomaly extraction result.
Detailed Description
The present invention will be described in further detail with reference to the following examples in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, a satellite magnetic field seismic anomaly extraction method based on complex non-negative matrix factorization includes:
Step1, reading Swarm A satellite magnetic field data, and dividing daily data into a plurality of orbits taking 50 DEG S-50 DEG N as endpoints;
and 2, selecting a Y component of magnetic field data as original magnetic field data, subtracting an endogenous field of the CHASS-7 model from the original magnetic field data of each track, thereby removing a main magnetic field and a rock ring magnetic field to obtain a residual magnetic field, and performing first-order difference on the residual magnetic field to obtain magnetic field pretreatment data in order to remove a low-frequency background, wherein the endogenous field of the CHASS-7 model belongs to the prior art.
Step 3, performing time-frequency transformation on the preprocessed data by adopting short-time Fourier transformation to obtain a complex time-frequency matrix;
decomposing the complex time-frequency matrix by utilizing complex non-negative matrix decomposition to obtain R characteristic components, wherein each characteristic component comprises a base vector, a coefficient vector and a phase matrix;
Step 5, obtaining time domain characteristic components by performing inverse short-time Fourier transform on the characteristic components;
and 6, calculating the energy-entropy ratio of each characteristic component by utilizing the coefficient vector of each characteristic component of the track and the time domain characteristic component according to the characteristic that the seismic energy and the time-space information are concentrated in the seismic research area, and selecting the characteristic component with the largest energy-entropy ratio as the seismic component according to the sequence from large to small.
And 7, calculating the root mean square of the time domain seismic components of each track, setting a threshold value, and taking the data point with the time domain amplitude larger than the threshold value in the seismic research area as an abnormal point.
The step 1 comprises the following steps:
the read Swarm A satellite magnetic field data are stored in daily units, and are divided into the track endpoints of 50 DEG S and 50 DEG N to obtain 32 satellite tracks per day.
The step 2 comprises the following steps:
Selecting a satellite magnetic field Y component as original magnetic field data, subtracting a CHASS-7 model from the original magnetic field data of each satellite orbit to obtain a residual magnetic field, and calculating as:
Wherein B y0 is the original Y component magnetic field, Endogenous field Y component data calculated for the CHASS-7 model, B y is the residual magnetic field.
In order to remove the low-frequency background, the residual magnetic field is subjected to first order difference, and the obtained preprocessing data is calculated as:
x(n)=By(n+1)-By(n) (2)
Where B y (N) is the nth data point of the residual magnetic field, the data length of B y is set to N, and x (N) is the differential Y component magnetic field result.
The step 3 comprises the following steps:
performing discrete short-time Fourier transform on the preprocessed data x (n) to obtain a complex time-frequency matrix, wherein the discrete short-time Fourier transform formula is as follows:
Where m represents the time index of the input signal x (n), g (n) is the selected window function, g (n-m) is the sliding window, n determines the current sliding position, j represents the imaginary unit, ω is the frequency index, and V (n, ω) represents the complex time-frequency matrix obtained by the discrete short-time fourier transform.
The step 4 includes:
Decomposing the complex time-frequency matrix by complex non-negative matrix decomposition, specifically, representing the complex time-frequency matrix V (n, omega) obtained by short-time Fourier transformation as V k×l of k rows and l columns, giving the number R of decomposition characteristic components, wherein R is a positive integer and satisfies R < < min (k, l), decomposing the complex time-frequency matrix V k×l into a matrix W k×R, a matrix H R×l and a matrix Wherein W k×R is referred to as a basis matrix, representing the frequency distribution characteristics of the data, H R×l is referred to as a coefficient matrix, representing the weights of the different frequency distribution characteristics in time/space,Refers to a time-varying phase spectrum, comprising a phase matrix of k rows and l columns corresponding to R characteristic components, hereinafter abbreviated as V, W, H,The complex non-negative matrix factorization mathematical model is:
Wherein, the The Hadamard product, representing two matrices, is defined as the product of the corresponding elements of the two matrices.
In order to make the decomposition result approach the complex matrix V as much as possible, the KL divergence is used to measure the error between the original matrix and the reconstructed matrix, so that the decomposition result approaches the complex matrix V as much as possible, and the objective function is:
Wherein, the As an objective function, X k,r,l is an estimated value of the reconstructed complex time-frequency matrix of the R-th feature component, R (H r,l) is a penalty term based on p-norm, and when 0< p <2, the sparsity of H r,l can be effectively controlled. The penalty term is:
R(Hr,l)=2λ|Hr,l|p,λ>0 (6)
λ is the weight coefficient of the penalty term;
The formulas for the auxiliary functions Z k,r,l,dk,r,l,Ak,r,l and B k,r,l are as follows:
Zk,r,l=|Xk,r,l| (7)
finally, the iterative updating rule when 0< p <1 is obtained is as follows:
Zk,r,l=|Xk,r,l| (15)
Yk,r,l=|Xk,r,l| (16)
Ur,l=Hr,l (17)
the iterative algorithm steps are as follows:
Input complex time-frequency matrix V, number of decomposed eigenvectors R, upper limit of iteration times N iter
(1) Initializing W, H and X k,r,l;
(2) Updating the objective function variable by using the formulas (11) - (17), iterating continuously until the value of the objective function formula (5) converges or reaches the set iteration times N iter, and stopping iterating;
the output is W, H,
R characteristic components are obtained through decomposition, wherein the R characteristic components comprise an R column vector W r of a base matrix W, an R row vector H r of a coefficient matrix H and a corresponding phase matrixH r coefficient vector, W r base vector.
The step 5 includes:
Reconstructing each characteristic component back to the time domain through the inverse short-time Fourier transform to obtain each time domain characteristic component, wherein the formula of the inverse short-time Fourier transform is as follows:
ISTFT () represents a function of the inverse short-time Fourier transform.
The step 6 includes:
According to the characteristic that the seismic energy and the space-time information are concentrated in the seismic research area, the energy-entropy ratio of each characteristic component of the track is calculated, wherein the energy-entropy ratio consists of an energy ratio and an entropy ratio, the energy ratio refers to the ratio of the energy in the seismic research area of the r component of the track to the whole track, and the entropy ratio refers to the ratio of shannon entropy in the seismic research area of the time domain characteristic component to the whole track.
Shannon entropy Z i(yr) in the seismic investigation region and shannon entropy Z (y r) for the entire trajectory are calculated as follows:
wherein, the point between s 1 and s 2 is in the seismic investigation region, N is the length of the time domain feature component Y r, p (Y r) represents the probability that the random event Y is Y r, and s 1、s2 is the minimum latitude and the maximum latitude of the seismic investigation region respectively.
The energy-entropy ratio is calculated as follows:
the points between Ps and Pe are in the seismic research area, L is the number of columns of H r,l, and Ps and Pe are the minimum latitude and the maximum latitude of the corresponding seismic research area obtained by short-time Fourier transform respectively.
Sorting the characteristic components according to the energy-entropy ratio from large to small, respectively marking the basis vectors of the sorted characteristic components as W s1、Ws2、…、WsR, respectively marking the coefficient vectors as H s1、Hs2、…、HsR, respectively marking the phase matrixes asThe reconstructed time domain data are denoted as y s1、ys2、…、ysR, respectively, and the feature component with the largest energy-entropy ratio is selected as the seismic component.
The step 7 includes:
The root mean square of the time domain seismic components for each track is calculated as:
the threshold is set to:
Thre=P×RMS (23)
If the data point of the time domain seismic component in the seismic investigation region is greater than Thre, the point is considered to be a seismic outlier, while the trajectory is marked as an outlier trajectory.
Taking the example of the Swarm A star magnetic field Y component data in the area of seismic influence and the study time range of 7.8 grade earthquake occurring in early Cyclodor at 4 months and 16 days of 2016. The seismic influence area, namely the seismic research area, is a square research area which is determined according to Dobrovolsky formula R=10 0.43M and takes the center of the earthquake as the center, wherein R is half side length, and the research time range is 60 days before the earthquake to 30 days after the earthquake.
Comprising the following steps:
step 1, downloading and reading magnetic field data of the Swarm A star 2016 from 2 months to 16 months to 5 months, wherein the magnetic field data are stored in a unit of day, and the magnetic field data are required to be divided into tracks with geomagnetic latitude of 50 DEG S and 50 DEG N as endpoints. The period of travel of the Swarm A star around the earth is about 90 minutes, i.e. one orbit can be obtained every 45 minutes, and 32 orbits can be obtained per day.
Taking track 5 of 2016, 4 and 9 days as an example, the vector magnetic field comprises an X (north) component, a Y (east) component and a Z (vertical) component, and the magnetic field of the Y component is possibly influenced by the movement of a rock layer and is less influenced by the disturbance of an external magnetic field, so that the magnetic field data of the Y component is used as the original magnetic field data. Subtracting the CHASS-7 model from the original magnetic field data of each satellite orbit to obtain a residual magnetic field, and calculating as:
Wherein B y0 is the original Y component magnetic field, Endogenous field Y component data calculated for the CHASS-7 model, B y is the residual magnetic field.
In order to remove the low-frequency background, the residual magnetic field is subjected to first order difference, and the obtained preprocessing data is calculated as:
x(n)=By(n+1)-By(n)(2)
Where B y (N) is the nth data point of the residual magnetic field, the data length of B y is set to N, and x (N) is the differential Y component magnetic field result.
Step 3, in order to obtain the characteristic of the frequency change of the magnetic field signal along with time, performing discrete short-time Fourier transform on the preprocessed data x (n) to obtain a complex time-frequency matrix, wherein the discrete short-time Fourier transform formula is as follows:
where n represents the current sliding position, g (n) is the selected window function, and g (n-m) is the sliding window.
And 4, decomposing the complex time-frequency matrix by utilizing the advantages of the local feature extraction of complex non-negative matrix decomposition to separate the features caused by the earthquake and the non-earthquake factors because the influence of the non-earthquake factors such as the sun activity, the magnetic storm and the like on the magnetic field signals is global and the influence of the earthquake is more likely to be local. Complex non-negative matrix factorization considers the problem that given a complex matrix V ε C k×l and a positive integer R, R < < min (k, l) is satisfied, and a matrix W ε R k×r、H∈Rr×l andThe mathematical model is as follows:
Wherein, the The Hadamard product, representing two matrices, is defined as the product of the corresponding elements of the two matrices.
The KL divergence is used for measuring the error between the original matrix and the reconstruction matrix, so that the decomposition result approaches the complex matrix V as much as possible, and the objective function is as follows:
Wherein R (H r,l) is a penalty term based on p-norm, and when 0< p <2, the sparsity of H r,l can be effectively controlled. The penalty term is:
R(Hr,l)=2λ|Hr,l|p,λ>0 (6)
The formulas for the auxiliary functions Z k,r,l,dk,r,l,Ak,r,l and B k,r,l are as follows:
Zk,r,l=|Xk,r,l| (7)
finally, the iterative updating rule when 0< p <1 is obtained is as follows:
Zk,r,l=|Xk,r,l| (15)
Yk,r,l=|Xk,r,l| (16)
Ur,l=Hr,l (17)
the iterative algorithm steps are as follows:
(1) Initializing W k,r,Hr,l,Xk,r,l;
(2) Updating the objective function variable by using the formulas (10) - (16), and continuously iterating until the value of the objective function formula (4) converges or reaches the set iteration number N iter =250, and stopping iterating.
Taking 2016, 4, 9, and 5 as an example, a transformation curve of the complex non-negative matrix factorization objective function error value with the number of iterations is shown in fig. 2, and it can be seen that the final objective function error value converges. The 3 eigenvectors are obtained by decomposition, and as shown in fig. 3, the r eigenvector includes the r (r=1, 2, 3) th column vector W r (base vector) of the base matrix, the r row vector H r (coefficient vector) of the coefficient matrix, and the corresponding phase matrix
And 5, reconstructing each characteristic component back to the time domain through inverse short-time Fourier transform to obtain each time domain characteristic component, wherein the formula of the inverse short-time Fourier transform is as follows:
And 6, calculating the energy-entropy ratio of each characteristic component of the track according to the characteristic that the seismic energy and the space-time information are concentrated in the seismic research area, wherein the energy-entropy ratio consists of an energy ratio and an entropy ratio, the energy ratio is the ratio of the energy in the seismic research area of the r component of the track to the whole track and represents the seismic energy distribution, and the entropy ratio is the ratio of the Shannon entropy in the seismic research area of the time domain characteristic component to the whole track and represents the seismic information distribution.
Shannon entropy Z i(yr in the seismic investigation region), shannon entropy Z (y r) for the entire trajectory, and the energy-to-entropy ratio is calculated as follows:
Where N is the length of the time domain feature component y r and L is the number of columns of H r,l for points between s 1 to s 2 and points between Ps to Pe within the seismic region.
Sorting the characteristic components according to the energy-entropy ratio from large to small, respectively marking the basis vectors of the sorted characteristic components as W s1、Ws2、Ws3, respectively marking the coefficient vectors as H s1、Hs2、Hs3, respectively marking the phase matrixes asThe reconstructed time domain data are respectively recorded as y s1、ys2、ys3, and the characteristic component with the largest energy-entropy ratio is selected as the seismic component, and the sequencing result of the track 5 of 2016, 4 and 9 days is shown in fig. 4 and 5. The fundamental vector frequency W s1 of the seismic component is mainly distributed around 0.04Hz, and ULF waves conforming to low earth orbit observations are typically in the frequency range of Pc3 (20-100 mHz). Meanwhile, the coefficient vector H s1 of the seismic component only has obvious abnormality in a research area, the coefficient vector H s2 of the other characteristic components is distributed on the whole track, the abnormality of H s3 exists outside the research area, and the rule that the energy of the seismic component is mainly distributed in the seismic influence area is met.
Step 7, calculating the root mean square of the time domain seismic components of each track as follows:
the threshold is set to:
Thre=P×RMS (23)
Taking the example of the track 5 of the year 2016, month 4 and day 9, the root mean square of the time domain seismic component of the track is 0.0142, the threshold is set to be 3 times root mean square, namely thre= 0.0426, as shown by the horizontal dashed line of the seismic component y s1 in fig. 5, 4 data points of the time domain seismic component of the track, which are larger than Thre, in the seismic research area are marked as seismic outliers, and the track is marked as an outlier.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.