An adaptive filtering-based method and system for data quality control of a current meter

By using adaptive filtering algorithms and Kalman filtering techniques to dynamically adjust filtering parameters, the problem of distortion in current meter data under complex marine environments using traditional methods is solved, and high-precision output of ocean current direction data is achieved.

CN121071316BActive Publication Date: 2026-02-03SECOND INST OF OCEANOGRAPHY MNR
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511612417.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-06
Publication Date
2026-02-03
Estimated Expiration
2045-11-06

AI Technical Summary

Technical Problem

In existing technologies, traditional fixed-parameter filtering methods cannot adapt to complex marine environments, resulting in distorted current meter data and difficulty in capturing key patterns, such as amplified errors caused by directional reversal due to estuarine tides.

Method used

An adaptive filtering algorithm is used to adjust the filtering parameters. The original dataset is obtained through a current meter and decomposed into eastward and northward current velocity components to form a spectral distribution. The filtering window is dynamically adjusted, and Kalman filtering and arctangent function are combined for data correction to quantify the influence of tides and topography and optimize the filtering parameters.

Benefits of technology

It achieves accurate capture of full-frequency characteristics of ocean current direction changes, enhances filtering accuracy and environmental adaptability, significantly improves data quality, and solves the lag problem of traditional methods in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121071316B_ABST
    Figure CN121071316B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of ocean current monitoring, and discloses a kind of ocean current meter data quality control method and system based on adaptive filtering.The original data containing ocean current direction and speed are obtained, after being decomposed into eastward and northward flow velocity components, frequency spectrum distribution is obtained by Fourier transform, dynamic filtering window is determined by adaptive filtering algorithm, components are preprocessed and feature vector is extracted to calculate flow direction;According to whether the amplitude of the feature vector changes is over the threshold, select Kalman filter to smooth the component or directly obtain the corrected flow direction data;The dynamic trend is extracted by principal component analysis method for the corrected data, and the main direction feature set is obtained;Based on the analysis of the influence of tides and topography, the environmental influence weight is obtained;The filtering parameter update frequency is adjusted by the weight, and the real-time component is filtered twice to output high-precision ocean current direction data.This method can improve the accuracy of ocean current meter data quality control and improve the monitoring accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ocean current monitoring technology, and in particular to a method and system for controlling the data quality of ocean current meters based on adaptive filtering. Background Technology

[0002] Marine environmental monitoring is fundamental to marine resource development, ecological protection, and climate research. Its core function is to provide accurate data for marine engineering, shipping safety, and ecological governance. As a key device for measuring ocean current direction and velocity, the accuracy and stability of current data directly determine the reliability of marine analysis, disaster early warning, and engineering decision-making, making it a crucial support for the marine monitoring system.

[0003] Current current meter data processing mostly employs traditional fixed-parameter filtering methods, which process raw data using preset parameters and can meet basic requirements in stable ocean current environments. These methods often combine simple feature analysis to capture ocean current trends, but they remain limited by fixed-parameter patterns and have failed to overcome adaptability bottlenecks.

[0004] Complex marine environments pose significant challenges to traditional methods. Ocean currents and wind disturbances in open waters, along with nearshore topography and tidal forces, can all cause rapid changes in current direction. Fixed parameters cannot be dynamically adapted, easily leading to data distortion; furthermore, insufficient extraction of azimuth features makes it difficult to capture key patterns, such as the direction reversal caused by tidal forces in estuaries, where fixed parameters can amplify errors due to adjustment lag. Therefore, methods that can adjust filtering parameters in real time and effectively extract features from complex environments are crucial for improving the quality of current meter data. Summary of the Invention

[0005] This invention provides a method and system for quality control of ocean current meter data based on adaptive filtering, so as to improve the quality control accuracy of ocean current meter data and improve the accuracy of ocean current direction monitoring.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for controlling the data quality of ocean current meters based on adaptive filtering, comprising:

[0007] The original dataset containing ocean current direction and velocity is obtained by using an ocean current meter, and the ocean current direction and velocity in the original dataset are decomposed into eastward velocity component and northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change.

[0008] Based on the aforementioned spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change.

[0009] Based on the dynamic filtering window, instantaneous ocean current features are extracted from the eastward and northward current velocity components, and the ocean current direction is calculated by combining the instantaneous ocean current features to form a feature vector containing the direction change law.

[0010] When the directional change of the feature vector exceeds a preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed using the Kalman filter algorithm, and the corrected ocean current direction data is calculated in reverse.

[0011] When the directional change of the feature vector does not exceed the preset amplitude threshold, the ocean current direction data is obtained by back-calculating the preprocessed eastward and northward velocity components using the arctangent function.

[0012] Based on the corrected ocean current direction data, the dynamic change trend of each direction of the ocean current is extracted to obtain the main direction feature set;

[0013] Based on the main direction feature set, the influence of tides and topography on rapid directional changes is analyzed to obtain the environmental impact weights.

[0014] The optimized filter parameters are obtained by adjusting the parameter update frequency of the adaptive filtering algorithm by adjusting the environmental influence weights.

[0015] Based on the optimized filtering parameters, the eastward and northward velocity components of the dynamically acquired real-time ocean current data are subjected to secondary filtering, and high-precision ocean current direction data is output by reverse calculation.

[0016] In one optional implementation, the step of acquiring a raw dataset containing ocean current direction and velocity using a current meter, and decomposing the ocean current direction and velocity in the raw dataset into eastward and northward velocity components to obtain the spectral distribution of the contribution of ocean current direction variation, includes:

[0017] The direction and velocity information of ocean currents are continuously collected by the current meter to form a raw dataset containing time series features;

[0018] Vector decomposition is performed on the ocean current direction and velocity in the original dataset to extract the velocity and direction values ​​at each moment. After converting the direction values ​​to radians, the eastward and northward velocity components are calculated by combining them with the velocity values.

[0019] The eastward and northward velocity components are decomposed using Fourier transform to obtain the corresponding complex frequency components of the eastward and northward components.

[0020] The joint energy of the complex frequency components of the eastward component and the complex frequency components of the northward component is calculated. First, the frequency energy of the eastward component and the frequency energy of the northward component are added to obtain the total energy. Then, the total energy is normalized by the total number of samples to obtain the power spectral density of each frequency point. Finally, the power spectral density is integrated according to the frequency interval to form the spectral distribution of the contribution of different frequency components to the change of ocean current direction.

[0021] In one optional implementation, the step of adjusting the filtering parameters using an adaptive filtering algorithm based on the spectral distribution to determine a dynamic filtering window that matches the current ocean current direction change includes:

[0022] The compositional characteristics and energy proportions of different frequency components in the spectrum distribution are analyzed to identify the effective frequency range reflecting the inherent variation characteristics of ocean currents and the interfering frequency range containing interference information.

[0023] Based on the effective frequency range and the interference frequency range, the filtering parameters are dynamically adjusted through the parameter adjustment mechanism of the adaptive filtering algorithm. Adaptive parameter values ​​are set for the effective frequency range, and suppression parameter values ​​are set for the interference frequency range.

[0024] Based on the adjusted filtering parameters, combined with the frequency characteristics and fluctuation intensity of the current eastward and northward current velocity components, the time-domain coverage and dynamic response characteristics of the filtering window are determined, forming a dynamic filtering window that matches the current ocean current direction change.

[0025] In one optional implementation, the step of extracting instantaneous ocean current features from the eastward and northward current velocity components based on the dynamic filtering window, and then combining these instantaneous ocean current features to calculate the ocean current direction and form a feature vector containing the direction change pattern, includes:

[0026] The eastward and northward velocity components are smoothed through the dynamic filtering window to remove high-frequency interference components and retain information related to changes in ocean current direction, resulting in preprocessed eastward and northward velocity components.

[0027] Instantaneous ocean current characteristics reflecting the instantaneous state of the ocean current are extracted from the preprocessed eastward and northward velocity components.

[0028] Based on the preprocessed eastward and northward velocity components, the ocean current direction is calculated by back-calculating the arctangent function. The instantaneous ocean current characteristics and the back-calculated ocean current direction are then structurally integrated according to the time series to form a feature vector containing the variation law of ocean current direction.

[0029] The instantaneous ocean current features include the instantaneous values ​​of the eastward component, the instantaneous values ​​of the northward component, the differences in the changes of the eastward component at adjacent times, the differences in the changes of the northward component at adjacent times, the continuous trend and fluctuation characteristics of the component changes, and the feature vector contains the dynamic characteristics and correlation patterns of the changes in ocean current direction.

[0030] In one optional implementation, the step of smoothing the preprocessed eastward and northward current velocity components using a Kalman filter algorithm to obtain the corrected ocean current direction data includes:

[0031] Based on the preprocessed eastward and northward velocity components, the Kalman filter algorithm is initiated.

[0032] Based on the state prediction mechanism built into the Kalman filter algorithm, the changing trends of the eastward and northward velocity components in the historical processed data are integrated to generate the predicted values ​​of the eastward and northward velocity components at the current moment.

[0033] Simultaneously, the current time's eastward and northward velocity component observation values ​​are extracted from the preprocessed eastward and northward velocity components. These observation values ​​are then compared with the corresponding component prediction values ​​to obtain the deviation characteristics between the two.

[0034] If the deviation characteristics exceed the preset deviation threshold, the predicted values ​​of the eastward and northward velocity components are dynamically corrected through the state update mechanism of the Kalman filter algorithm to weaken the abnormal fluctuation components remaining in the preprocessed components.

[0035] Through cyclical processing of prediction and correction, the deviation characteristics gradually converge, forming a continuous data sequence of eastward and northward components that closely matches the actual trend of ocean current changes. Based on this sequence, the corrected ocean current direction data is obtained by back-calculating using the arctangent function.

[0036] In one optional implementation, the step of extracting the dynamic change trend of each direction of the ocean current from the corrected ocean current direction data to obtain a main direction feature set includes:

[0037] The corrected ocean current direction data is structured and organized to form sequence data containing both time and direction dimensions;

[0038] Principal component analysis was used to reduce the dimensionality of the sequence data and identify the core patterns that dominate the overall change in the direction of ocean currents.

[0039] Extract the main components of the core pattern; wherein, the main components include the continuous changing trend, fluctuation characteristics and correlation patterns of ocean currents in different directions;

[0040] The main components are integrated in order of their contribution to the overall change to form a main directional feature set that reflects the dynamic change of ocean currents in each direction.

[0041] In one optional implementation, the step of analyzing the influence of tides and topography on rapid directional changes based on the main direction feature set to obtain environmental impact weights includes:

[0042] Extract the temporal correlation features and spatial distribution features of rapid directional changes from the main directional feature set;

[0043] Based on the extracted temporal correlation features and spatial distribution features, combined with the periodic stability features of tidal influence and the spatial correlation features of topographic influence, a two-dimensional analysis mechanism is established.

[0044] The dual-dimensional analysis mechanism is used to match and analyze the features of rapid directional changes, and the tidal and topographic components are identified.

[0045] For the identified dominant tidal components, the tidal influence weights are calculated by combining their periodic stability in time-related characteristics.

[0046] For the identified dominant terrain components, the terrain influence weight is calculated by combining the terrain association strength in their spatial distribution characteristics.

[0047] The calculated tidal influence weights and topographic influence weights are integrated and standardized to unify the measurement scale, thus forming the respective environmental influence weights of the two types of environmental factors in rapid directional changes.

[0048] In one optional implementation, the step of adjusting the parameter update frequency of the adaptive filtering algorithm through the environmental influence weights to obtain optimized filtering parameters includes:

[0049] The composition of the environmental impact weights is analyzed to determine the contribution ratios of tidal and topographical influences, and to identify the types of environmental factors that currently dominate changes in ocean current direction.

[0050] Based on the impact characteristics of different types of environmental factors, a correlation rule between weight and parameter update frequency is established: when the tidal influence accounts for a higher proportion, an appropriate low-frequency update is set according to its periodic characteristics; when the topographic influence accounts for a higher proportion, an appropriate high-frequency update is set according to its suddenness characteristics.

[0051] The environmental impact weights acquired in real time are substituted into the association rule to trigger the parameter update and adjustment mechanism of the adaptive filtering algorithm, so that the update frequency matches the impact characteristics of the current environmental factors.

[0052] The adjusted parameter update frequency is integrated into the parameter system of the adaptive filtering algorithm. Through verification, it is ensured that the frequency is coordinated with the dynamic characteristics of the filtering window and the actual rhythm of ocean current direction changes, thus forming filtering parameters that are adapted to the characteristics of the current environmental impact.

[0053] In one optional implementation, the secondary filtering of the eastward and northward velocity components of the dynamically acquired real-time ocean current data based on optimized filtering parameters, and the subsequent back-calculation and output of high-precision ocean current direction data, includes:

[0054] It continuously receives real-time ocean current direction and velocity data collected by the current meter, forming real-time ocean current data to be processed;

[0055] The real-time ocean current data is vector decomposed to extract the velocity and direction values ​​at each moment. After converting the direction values ​​to radians, the real-time eastward velocity component and the real-time northward velocity component are calculated by combining them with the velocity values.

[0056] Import the optimized filtering parameters into the adaptive filtering algorithm and configure the algorithm's running parameters and processing mode;

[0057] The configured adaptive filtering algorithm is applied to perform time-by-time secondary filtering on the real-time eastward velocity component and the real-time northward velocity component to obtain the filtered eastward velocity component and northward velocity component.

[0058] The continuity of the filtered eastward and northward velocity components is verified to obtain the component data that passes the verification.

[0059] Based on the verified component data, the ocean current direction is calculated by inverse calculation using the arctangent function, integrated to form a continuous data sequence of ocean current direction, and output high-precision ocean current direction data.

[0060] Secondly, the present invention also provides a current meter data quality control system based on adaptive filtering, comprising:

[0061] Data acquisition and decomposition module: The module acquires a raw dataset containing ocean current direction and velocity using a current meter, and decomposes the ocean current direction and velocity in the raw dataset into an eastward velocity component and a northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change.

[0062] Filter window determination module: Based on the spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change;

[0063] Preprocessing feature extraction module: Based on the dynamic filtering window, extract instantaneous ocean current features from the eastward and northward current velocity components, and combine the instantaneous ocean current features to calculate the ocean current direction and form a feature vector containing the direction change law;

[0064] First correction processing module: When the directional change of the feature vector exceeds the preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed by the Kalman filter algorithm, and the corrected ocean current direction data is obtained by back calculation.

[0065] The second correction processing module: when the directional change of the feature vector does not exceed the preset amplitude threshold, the ocean current direction data is obtained by back-calculating the preprocessed eastward and northward velocity components using the arctangent function.

[0066] Principal component feature set module: For the corrected ocean current direction data, extract the dynamic change trend of each direction of the ocean current to obtain the principal direction feature set;

[0067] Environmental weight analysis module: Based on the main direction feature set, analyze the influence of tides and topography on rapid directional changes to obtain environmental impact weights;

[0068] Filter parameter optimization module: Adjusts the parameter update frequency of the adaptive filtering algorithm by the environmental influence weights to obtain optimized filter parameters;

[0069] Secondary filtering output module: Based on the optimized filtering parameters, the eastward and northward velocity components of the dynamically acquired real-time ocean current data are processed by secondary filtering, and high-precision ocean current direction data is output in reverse calculation.

[0070] Compared with the prior art, the present invention has the following beneficial effects:

[0071] (1) Accurate capture of full-frequency characteristics of ocean current direction changes. Complete raw data containing direction and velocity are collected by a current meter. The eastward and northward velocity components are obtained by vector decomposition, and the contribution of different frequency components is decomposed by Fourier transform to form a comprehensive spectrum distribution. This process avoids the interference of angle data jumps directly processed by traditional methods, provides a reliable frequency basis for subsequent filter parameter adjustment, and greatly improves the integrity and accuracy of the data foundation.

[0072] (2) Achieving targeted adaptation of filtering parameters to ocean current changes. Based on the spectral distribution, an adaptive filtering algorithm is used to identify the effective and interference frequency ranges, and the parameters are dynamically adjusted to construct an adaptive dynamic filtering window. The window can both preserve the inherent variation patterns of the eastward and northward components and efficiently filter out interference, overcoming the shortcomings of fixed parameters in adapting to rapid changes in ocean currents, and enhancing the accuracy of filtering and environmental adaptability.

[0073] (3) Effectively preserve key information on dynamic changes in ocean currents. The eastward and northward components are preprocessed using a dynamic filtering window. While smoothing the data and filtering out high-frequency interference, core features such as instantaneous values ​​and variation differences of the components are extracted and integrated with the inversely calculated ocean current direction into a feature vector. This vector fully captures the changing patterns of the current direction, providing reliable support for subsequent corrections and significantly improving the effectiveness of data processing.

[0074] (4) Achieve accurate correction and efficient processing of abnormal data. Based on the preprocessed components, a Kalman filter prediction-correction mechanism is used to weaken abnormal fluctuations, and the correction direction is calculated after the deviation converges. Relying on the linear characteristics of the components, error amplification caused by angle jumps is avoided, balancing correction accuracy and processing efficiency.

[0075] (5) Quantify the impact of complex environmental factors on ocean current changes. A two-dimensional analysis mechanism is established based on the main direction feature set to distinguish the dominant components of tides and topography in rapid ocean current changes and calculate the environmental impact weights. The degree of influence of the two types of factors is clarified, providing a quantitative basis for dynamic parameter adjustment and enhancing the adaptability of the method to complex marine environments.

[0076] (6) Achieve dynamic adaptive optimization of filter parameters. Adjust the update frequency according to the weight: when tides dominate, update at a low frequency to adapt to periodicity; when terrain dominates, update at a high frequency to respond to suddenness, ensuring that the secondary filter always processes the components accurately, solving the lag problem of traditional fixed parameters, and significantly improving the accuracy of the output flow direction data. Attached Figure Description

[0077] Figure 1 This is a flowchart illustrating a current meter data quality control method based on adaptive filtering, provided in an embodiment of the present invention.

[0078] Figure 2 This is a schematic diagram of a current meter data quality control system based on adaptive filtering provided in an embodiment of the present invention. Detailed Implementation

[0079] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0080] Reference Figure 1 This invention provides a method for controlling the data quality of ocean current meters based on adaptive filtering, comprising the following steps:

[0081] S11, Obtain the raw dataset containing ocean current direction and velocity through the current meter, and decompose the ocean current direction and velocity in the raw dataset into eastward velocity component and northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change.

[0082] S12, Based on the spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change;

[0083] S13, Based on the dynamic filtering window, extract instantaneous ocean current features from the eastward and northward current components, and combine the instantaneous ocean current features to calculate the ocean current direction and form a feature vector containing the direction change law;

[0084] S14.1 When the directional change of the feature vector exceeds the preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed by the Kalman filter algorithm, and the corrected ocean current direction data is obtained by back calculation.

[0085] S14.2 When the directional change of the feature vector does not exceed the preset amplitude threshold, the ocean current direction data is obtained by back-calculating the preprocessed eastward and northward velocity components using the arctangent function.

[0086] S15, For the corrected ocean current direction data, extract the dynamic change trend of each direction of the ocean current to obtain the main direction feature set;

[0087] S16, Based on the main direction feature set, analyze the influence of tides and topography on rapid directional changes to obtain the environmental impact weight;

[0088] S17, The parameter update frequency of the adaptive filtering algorithm is adjusted by the environmental influence weight to obtain the optimized filtering parameters;

[0089] S18 performs secondary filtering on the eastward and northward velocity components of dynamically acquired real-time ocean current data based on optimized filtering parameters, and outputs high-precision ocean current direction data.

[0090] In step S11, a raw dataset containing ocean current direction and velocity is obtained by a current meter, and the ocean current direction and velocity in the raw dataset are decomposed into an eastward velocity component and a northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change.

[0091] In one embodiment, this example uses ocean current monitoring in a nearshore sea area as an example, employing a Doppler current meter as the data acquisition device. The specific steps are as follows:

[0092] The original dataset containing ocean current direction and velocity is obtained by using a current meter. Fourier transform is then used to decompose the dataset and obtain the spectral distribution of the contribution of ocean current direction changes. One implementation method is as follows: A 2MHz Doppler current meter [1.1] (operating frequency conforming to the industry standard of 38kHz-3MHz, suitable for nearshore current velocity monitoring of 0.01-5m / s, its Doppler frequency shift calculation formula is...) , where: f d Here, f0 is the Doppler frequency shift (in Hz), f0 is the current meter's operating frequency (2MHz here), v is the current velocity (in m / s), θ is the angle between the sound wave and the current velocity direction (in degrees), and c is the speed of sound in seawater (valued at 1500 m / s). Calculations show that the Doppler frequency shift within the monitoring range of this device is ±2.67Hz to ±13333.3Hz, not exceeding the ±15kHz upper limit. The device continuously collects data from the target sea area, recording the direction information (0°-360°, accuracy ±1.0°) and velocity information (m / s, accuracy ±0.005m / s) of the seawater flow at a sampling frequency of 1Hz, continuously for 2... A time series raw dataset containing 86,400 sample points was generated in 4 hours. The data was stored in a CSV file, which included three columns: "timestamp", "direction", and "velocity" (e.g., a record at a certain moment: timestamp 1620000000, direction 120°, velocity 0.5m / s). Two data gaps occurred during the acquisition process (e.g., sensor instantaneous interference), which were filled using linear interpolation (e.g., missing point D

[100] was calculated by averaging the five valid data points before and after). The ocean current direction and velocity in the raw dataset were processed by vector decomposition: the velocity and direction values ​​at each moment were extracted, and the direction values ​​(degrees) were converted to radians. The conversion formula was as follows: , (where: θ) rad (where θ is in radians and θ is in degrees). Combined with the velocity values, calculate the eastward flow velocity component. and northward flow velocity component (Where u[t] is the eastward velocity component and v[t] is the northward velocity component, both of which are linear scalars), forming time series of u[t]=[0.433,0.425,0.441,...,0.438] and v[t]=[0.250,0.260,0.245,...,0.252] (both with a length of 86400) to eliminate angular cyclic characteristics; then, the Python numpy.fft.fft function is used to perform Fourier transforms on u[t] and v[t] respectively, decomposing the continuously changing signals of the components over time into components of different frequencies, obtaining a complex frequency array F. u [k] and F v [k] (where: F) u [k] is the complex frequency array of the eastward component, F v[k] represents the complex frequency array of the northward component, where k is the frequency index. The calculated frequency resolution is 1 / 86400Hz ≈ 1.157 × 10⁻⁶. -5 Hz, Nyquist frequency 0.5Hz, synchronously extracting frequency components such as 0.000278Hz (period 1 hour) and 0.000116Hz (period 12 hours); energy amplitude calculation of each frequency component obtained by decomposition: using the formula " Calculate the joint energy (where: |F u [k]| is F u The complex modulus of [k], |F v [k]| is F v The complex modulus of [k], where k is the frequency index, such as F u

[10] Modulus squared 1200, F v

[10] The modulus squared is 850, and the total energy amplitude is 2050. Then, the power spectral density is obtained by normalizing it with the total number of samples N=86400 (N is the total number of samples). Where: P[k] is the power spectral density, such as P

[10] =(1200+850) / 86400=0.0237. Finally, P[k] is structurally integrated according to the frequency range (0-0.0001Hz, 0.0001-0.001Hz, 0.001-0.5Hz) to form the spectral distribution of the contribution of different frequency components to the change of ocean current direction. Among them, P[k] reaches 0.09 at 0.000116Hz (corresponding to the influence of semi-diurnal tide) and P[k] reaches 0.06 at 0.000278Hz (corresponding to the influence of topographic turbulence), clearly showing the contribution ratio of each frequency.

[0093] In step S12, based on the spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change.

[0094] In one embodiment, this embodiment follows the aforementioned nearshore marine monitoring scenario. Based on the acquired spectral distribution of the contribution of ocean current direction changes (including effective frequency components such as 0.000116Hz in a 12-hour period and 0.000278Hz in a 1-hour period, and high-frequency interference components >0.001Hz), an adaptive filtering algorithm is used to adjust the filtering parameters and determine the dynamic filtering window. The specific steps are as follows: By analyzing the composition characteristics and energy proportion of different frequency components in the spectral distribution, the effective frequency range and the interference frequency range are identified: the energy proportion of each frequency range in the spectral distribution table (calculated as "range energy proportion = sum of all power spectral densities P[k] within the range ÷ sum of total power spectral densities P[k] across the entire frequency band") is calculated. The power spectral density at the k-th frequency point (P[k]) was calculated, and the effective frequency range of 0.0001Hz to 0.0003Hz was determined. This range contains 12-hour periodic (0.000116Hz) and 1-hour periodic (0.000278Hz) components, with a cumulative energy share of 72%, reflecting the inherent variation characteristics of ocean currents affected by semi-diurnal tides and topographic turbulence. At the same time, the high-frequency band >0.001Hz was identified as the interference frequency range, with an energy share of only 8% and no obvious periodicity (the P[k] value fluctuates randomly), corresponding to interference information such as sensor electronic noise and water microbubble scattering. This was further confirmed by interval integration verification (effective interval integral value = 0.58, interference interval integral value = 0.06). Interval Attributes: Based on the aforementioned effective frequency range and interference frequency range, a minimum mean square error (LMS) adaptive filtering algorithm is adopted. The filtering parameters are dynamically adjusted through a parameter adjustment mechanism: For the effective frequency range of 0.0001Hz~0.0003Hz, adaptation parameters are set, including filter order = 16 (the higher the order, the stronger the ability to retain low-frequency periodic signals) and step size factor μ = 0.015 (μ is the algorithm iteration update coefficient; the smaller the value, the more stable the convergence, adapting to the characteristics of long-period signals), to retain the inherent variations of the eastward and northward flow velocity components; For the interference frequency range >0.001Hz, suppression parameters are set, including a high-frequency attenuation coefficient = 0.3 (attenuation coefficient = output amplitude ÷ output frequency). The input amplitude is set to 0.3, indicating a 70% attenuation of the component in this range. The center frequency of the band-stop filter is 1Hz (the stopband covers the main interference frequency band) to filter out interference components in the eastward and northward velocity components. The parameter adjustment logic is as follows: real-time monitoring of the energy proportion of the effective frequency range; when the proportion is >60%, the adaptive parameters are automatically activated; when the energy proportion of the interference frequency range is >10%, the high-frequency attenuation coefficient is reduced to 0.2 to enhance the suppression effect. Based on the adjusted filter parameters, combined with the frequency characteristics of the current eastward and northward velocity components (12-hour main period superimposed with 1-hour short period) and fluctuation intensity (introducing the standard deviation σ of the component change rate as an indicator, where σ is the statistical dispersion of the component change rate within 5 seconds, in m / s), the filter is adjusted. 2The time-domain coverage and dynamic response characteristics of the filtering window are determined as follows: the basic window length is set to 10 seconds (covering 5 to 10 short-cycle fluctuations, balancing smoothing effect and detail preservation); when σ > 0.08 m / s² (rapid change period, such as the sudden period of topographic turbulence), the window is automatically shortened to 5 seconds to improve the response speed; when σ < 0.03 m / s² (slow period, such as the period of tidal stability), the window is extended to 15 seconds to enhance the smoothing effect; a sliding window mechanism is adopted, σ is recalculated and the window length is adjusted every 30 seconds to form a dynamic filtering window that matches the "long-cycle stability + short-term fluctuation" characteristics of the current ocean current direction change in real time.

[0095] In step S13, instantaneous ocean current features are extracted from the eastward and northward current velocity components based on the dynamic filtering window, and the ocean current direction is calculated by combining the instantaneous ocean current features to form a feature vector containing the direction change law.

[0096] In one embodiment, this embodiment follows the aforementioned nearshore ocean current monitoring scenario. Based on a determined dynamic filtering window (base length 10 seconds, dynamically adjusted according to the rate of change σ of the eastward and northward current components: the window is shortened to 5 seconds when σ > 0.08 m / s², and extended to 15 seconds when σ < 0.03 m / s²), the eastward current component u[t] and the northward current component v[t] (sampling frequency 1 Hz, 86,400 samples in 24 hours) are processed. The specific process is as follows: First, the dynamic filtering window is applied to the eastward current component u[t] and the northward current component v[t] for smoothing. The sliding window weighted average method is adopted, and the weight of data points within the window decreases from the center to the edge (e.g., the weight distribution of a 5-second window is [0.1, 0.2, 0.4, 0.2, 0.1]). High-frequency interference >0.001Hz (such as the instantaneous jump caused by the sensor being impacted by sea waves) is filtered out, and the effective frequency components of 0.0001Hz~0.0003Hz (periodic changes caused by tides and topography) are retained. For example, within a 10-second smoothing period (σ=0.025m / s²), the original eastward component data [0.433,0.421,0.445,...,0.430] and northward component data [0.250,0.242,0.258,...,0.245] are smoothed to become [0.432,0.430,...,0.431] and [0.249,0.248,...,0.247], respectively. The volatility of the eastward component decreases from ±0.012m / s to ±0.003m / s, and the volatility of the northward component decreases from ±0.009m / s to ±0.002m / s, preserving the overall smoothing trend. The preprocessed component data are stored in arrays u_smooth[t] and v_smooth[t], respectively.

[0097] Next, four types of features reflecting the instantaneous state of ocean currents are extracted from the preprocessed datasets u_smooth[t] and v_smooth[t]: First, the instantaneous values ​​of the eastward and northward components, i.e., the preprocessed component values ​​u(t) = u_smooth[t] and v(t) = v_smooth[t] at a certain time t, such as u(7200) = 0.41 m / s and v(7200) = 0.23 m / s at t = 7200 seconds; Second, the differences in component changes between adjacent times, i.e., the differences in component values ​​between two consecutive times. , For example, if t = 7201 seconds, Δu(7201) = 0.006 m / s, Δv(7201) = 0.004 m / s; thirdly, the continuous trend of component changes, that is, the average difference between adjacent changes within the current window length, reflects the average intensity of component changes within the window, such as the average rate of change of the eastward component within a 10-second window of about 0.005 m / s and the northward component of about 0.003 m / s; fourthly, the fluctuation characteristics of component changes, that is, the standard deviation of component data within the window, reflects the degree of dispersion of component data, such as the standard deviation of the eastward component within the above window of about 0.004 m / s and the northward component of about 0.002 m / s.

[0098] Finally, based on the preprocessed eastward velocity component u_smooth[t] and northward velocity component v_smooth[t], the ocean current direction θ(t) = arctan(v(t) / u(t)) is calculated using the arctangent function. The instantaneous ocean current features and the calculated ocean current direction are then structurally integrated into a feature vector according to the time series. The core approach uses a weighted fusion formula based on information entropy. , where f i (t) represents the i-th instantaneous feature (corresponding to the four types of features mentioned above); w i (t) represents the dynamic weights, based on the information entropy H of each feature. i (t) Calculation (the more stable the feature fluctuation, the smaller the information entropy, and the larger the weight); H i (t) reflects the uncertainty of characteristic fluctuations and is calculated through the probability distribution of the deviation of characteristic values ​​within the window. For example, at t=7200 seconds, the information entropies of the four types of features are 0.2, 0.3, 0.1, and 0.25, respectively, with corresponding weights of approximately 0.28, 0.24, 0.32, and 0.16. After standardization, the feature vector V

[7200] ≈0.19 is obtained by fusing these features. This feature vector integrates the instantaneous component state, trend fluctuation characteristics, and inverse direction information, fully reflecting the changing pattern of ocean current direction and providing a quantitative basis for subsequent threshold judgment.

[0099] In step S14.1, when the directional change of the feature vector exceeds a preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed using a Kalman filter algorithm to obtain the corrected ocean current direction data.

[0100] In one embodiment, this example follows the aforementioned nearshore ocean current monitoring scenario. For the time periods in the preprocessed eastward current velocity component u_smooth[t] and northward current velocity component v_smooth[t] (sampling frequency 1Hz, including smoothed current direction data) where the change in the feature vector direction exceeds a preset threshold (e.g., Δθ(t) > 8° / s), a Kalman filter algorithm is used for smoothing. The specific process is as follows:

[0101] First, the Kalman filtering process is initiated based on the preprocessed eastward velocity component u_smooth[t] and northward velocity component v_smooth[t]. The state vector is set as... Where u(t) represents the eastward velocity component at the current moment, Δu(t) represents the rate of change of the eastward component, v(t) represents the northward velocity component at the current moment, and Δv(t) represents the rate of change of the northward component; the state transition matrix is ​​F=[[1,Δt,0,0],[0,1,0,0],[0,0,1,Δt],[0,0,0,1]] (Δt=1 second, matching the 1Hz sampling frequency), used to describe the evolution of the state over time; the observation matrix is ​​H=[[1,0,0,0],[0,0,1,0]], because the eastward and northward velocity components are directly observed; the process noise covariance is Q=diag([0.001,0.0001,0.001,0.0001]) (reflecting the uncertainty of the model itself), and the observation noise covariance is R=0.01 (based on the noise level setting of the preprocessed component data).

[0102] Based on the Kalman filter-based state prediction mechanism, the predicted value for the current moment is generated by integrating the component change trends from historical processed data. For example, at t=7200 seconds, the state at t=7199 seconds is known as x(7199)=[0.41m / s, 0.005m / s]. 2 [0.23m / s, 0.003m / s²]^T, predicted using the formula: Where x_pred(t) is the predicted state vector at time t, F is the state transition matrix, and x(t-1) represents the state vector at time t-1. The calculated value is: x_pred(7200) = [0.41m / s + 0.005m / s]. 2 ×1s, 0.005m / s 2 0.23m / s + 0.003m / s 2 ×1s, 0.003m / s 2]^T=[0.415m / s,0.005m / s²,0.233m / s,0.003m / s²]^T, that is, the current predicted value of the eastward component is 0.415m / s, and the predicted value of the northward component is 0.233m / s.

[0103] Simultaneously, the observation values ​​at the current time are extracted from the preprocessed datasets u_smooth[t] and v_smooth[t]. At t=7200 seconds, the observation value z(7200) = [0.422m / s, 0.240m / s]^T (from the smoothed preprocessed component data). The observed values ​​are compared with the predicted values, and the bias characteristics are calculated. e(t) represents the deviation feature at time t, z(t) represents the observed value at time t, H represents the observation matrix, and x_pred(t) represents the predicted state vector at time t.

[0104] Substituting these values, we get: e(t) = [0.422m / s - 0.415m / s, 0.240m / s - 0.233m / s]^T = [0.007m / s, 0.007m / s]. The preset deviation threshold is 0.01m / s. At this point, the deviation has not exceeded the threshold, so strong correction is not initiated. When t = 7210 seconds, the predicted value x_pred(7210) = [0.430m / s, 0.006m / s]. 2 0.250m / s, 0.004m / s 2 The observed value z(7210) = [0.452m / s, 0.272m / s]^T, and the deviation e(t) = [0.022m / s, 0.022m / s] > 0.01m / s, triggers the state update mechanism.

[0105] The predicted value is corrected through a state update mechanism using Kalman filtering: first, the Kalman gain K(t)≈[0.5,0.04,0.5,0.04]^T is calculated (based on the prediction covariance matrix and the noise covariance), and then the state is updated. Let x(t) represent the updated optimal state vector at time t, x_pred(t) represent the predicted state vector at time t, K(t) represent the Kalman gain vector at time t, and e(t) represent the bias characteristic at time t. Thus, x(7210)≈[0.441m / s,0.0148m / s²,0.261m / s,0.0128m / s²]^T. The corrected component values ​​are closer to the actual trend than the original predicted values, reducing the abnormal fluctuations remaining in the preprocessed data due to short-term terrain interference (the original observed value jumped by 0.022m / s compared to the predicted value; after correction, the fluctuation decreased to 0.011m / s).

[0106] After a prediction and correction cycle every second, the bias characteristics gradually converge (the bias decreases from 0.022 m / s to 0.003 m / s within 100 seconds), forming a smoothed continuous data sequence of eastward and northward components. Based on this sequence, the ocean current direction is calculated using the arctangent function. For example, during a rapid 50-second change period, the corrected ocean current direction data is optimized from [118.5°, 119.2°, ..., 122.5°] to [118.5°, 118.9°, ..., 121.6°], and the data volatility decreases from ±2.2° to ±0.8°, which closely reflects the actual trend of ocean currents being dominated by tides and superimposed with minor topographic interference, thus obtaining the corrected ocean current direction data.

[0107] In step S14.2, based on the preprocessed eastward and northward velocity components, the ocean current direction data is obtained by back-calculating using the arctangent function.

[0108] In one embodiment, this example adopts a nearshore marine monitoring scenario. For the preprocessed eastward current velocity component u_smooth[t] and northward current velocity component v_smooth[t] (sampling frequency 1Hz, 86400 samples / station over 72 hours, eastward undulation ≤±0.003m / s, northward undulation ≤±0.002m / s) of three monitoring stations (Near Reef 1, Middle Reef 2, and Far Reef 3), the current direction is inversely calculated using the arctangent function, providing basic data for the principal component analysis in step S15. The process is as follows:

[0109] First, clarify the inverse calculation formula. The four-quadrant arctangent function is used to avoid quadrant ambiguity; the core formula is:

[0110] , where: θ_i[t] is the ocean current direction at time t of the i-th station (unit: °, range: 0°-360°); v_smooth_i[t] is the preprocessed northward current velocity component at time t of the i-th station (unit: m / s); u_smooth_i[t] is the preprocessed eastward current velocity component at time t of the i-th station (unit: m / s); ×(180 / π) is used to convert the radian calculation result to degree.

[0111] Next, data at key time points were selected. t=7200s (early high tide), 21600s (mid-high tide), and 43200s (transition period) were chosen. Examples of component data for each station are as follows: Near Reef No. 1: Eastward / Northward components at the three times are 0.410 / 0.230, 0.450 / 0.260, and 0.420 / 0.235 m / s, respectively; Middle Reef No. 2: 0.425 / 0.240, 0.465 / 0.270, and 0.435 / 0.245 m / s; Far Reef No. 3: 0.430 / 0.245, 0.470 / 0.275, and 0.440 / 0.250 m / s.

[0112] Then perform the reverse calculation. Example: At t=7200s, θ1≈29.3° for near reef No. 1, θ2≈29.5° for middle reef No. 2, and θ3≈29.6° for far reef No. 3; at t=43200s, θ1≈29.1° for near reef No. 1.

[0113] After calculation over the entire time period, the data is integrated into a 72×3 direction matrix (rows: 72 time points / hour, columns: stations). For example, at t=3600s, the row data is [29.2°, 29.4°, 29.5°], and at t=43200s, the row data is [29.1°, 29.3°, 29.4°].

[0114] Finally, the adaptability was verified. The directional fluctuation of each station was ≤±0.5°, the difference between stations was ≤0.5°, and there was no quadrant jump. It can be directly used as the input for principal component analysis in step S15 to extract the changing trends dominated by tides and topography.

[0115] In step S15, the dynamic change trend of each direction of the ocean current is extracted for the corrected ocean current direction data to obtain the main direction feature set.

[0116] In one embodiment, this example takes the aforementioned corrected ocean current direction data (such as 72-hour corrected data from a nearshore sea area, including continuous observations from 3 monitoring stations, with direction values ​​recorded hourly, and the fluctuation reduced to ±0.8° after Kalman filtering; this direction data is calculated based on the smoothed eastward and northward velocity components), and uses principal component analysis to extract the dynamic trend. The specific process is as follows:

[0117] First, the corrected ocean current direction data was structured and organized. The corrected data from three monitoring stations were integrated to form a sequence of data containing time and direction dimensions: the time dimension consisted of 72 time points (one per hour, covering 3 days), and the direction dimension covered the ocean current direction values ​​of each station (range 0°-360°). Finally, a 72×3 matrix was constructed (rows represent time, columns represent stations). For example, the data in row 24 [118.5°, 120.2°, 119.8°] corresponded to the three stations.

[0118] Next, principal component analysis (PCA) was used to reduce the dimensionality of the sequence data. First, the matrix data was standardized (the mean of each station's data was subtracted and then divided by the standard deviation to eliminate dimensional differences). Then, the covariance matrix of the standardized data (a 3×3 matrix reflecting the correlation of directional changes between stations) was calculated. The eigenvalues ​​and eigenvectors of the covariance matrix were solved, yielding three eigenvalues: λ1=2.1 (70% contribution), λ2=0.7 (23% contribution), and λ3=0.2 (7% contribution). The two principal components with a cumulative contribution rate of 93% were selected as the core patterns governing the overall change in ocean current direction. The first principal component eigenvector is [0.58, 0.56, 0.59] (consistent station changes, driven by common factors); the second principal component is [0.72, -0.21, -0.66] (station differences, influenced by local factors).

[0119] The main components of the core model were then extracted. The first principal component (70%): 12-hour periodic fluctuation (15° deflection every 6 hours, consistent with tides), standard deviation ±1.2°, station correlation coefficient 0.91 (tidal-dominated); the second principal component (23%): no significant periodicity, local sudden deflection (maximum 8°), standard deviation ±2.5°, negative correlation between near-reef and far-reef stations (-0.63, topographic interference).

[0120] Finally, the main components were integrated in order of their contribution to the overall change. The first principal component (70%) was used as the core, integrating its periodic trends, stable fluctuation characteristics, and station consistency correlation patterns. Then, the second principal component (23%) was incorporated, including its sudden trends, significant fluctuation characteristics, and station difference correlation patterns, forming the main directional feature set. The feature set is a two-dimensional array containing principal component scores and trend labels, reflecting the dynamic patterns of ocean currents and providing a basis for subsequent analysis.

[0121] In step S16, based on the main direction feature set, the influence of tides and topography on rapid directional changes is analyzed to obtain the environmental influence weight.

[0122] In one implementation, this embodiment takes the aforementioned principal direction feature set (containing principal component data of ocean current direction from three monitoring stations within 72 hours, wherein the first principal component is the periodic variation dominated by tides, and the second principal component is the local variation caused by topographic disturbance; this principal direction feature set is extracted based on the corrected ocean current direction data, which is generated by back-calculating the preprocessed eastward and northward velocity components after smoothing by Kalman filtering). For the 12 rapid direction change events identified in the feature set (defined as direction deflection >15° within 10 minutes), the influence weights of tides and topography are analyzed. The specific process is as follows:

[0123] First, the temporal correlation features and spatial distribution features of rapid directional changes were extracted from the main directional feature set. Temporal features: 8 events occurred during the ebb and flow tide transition period (12-hour cycle, consistent with the tide table), with an average duration of 12 minutes and fluctuations ≤2° / min; 4 events were non-periodic, lasting 5 minutes, with fluctuations reaching 5° / min. Spatial features: 8 events occurred synchronously at 3 stations (weakly correlated with topography); 4 events were concentrated at station 1 near the reef (water depth <5m, distance from the reef <100m, overlap with the reef 0.89).

[0124] Based on the above characteristics, a two-dimensional analysis mechanism is established: a time-correlated tidal database (deviation < 15 minutes is considered a match) and a spatially overlaid topographic map (distance < 200m from the abrupt change zone is considered a strong correlation).

[0125] The components were matched and identified through a two-dimensional analysis mechanism: eight events that were temporally coincident but spatially unrelated had a principal component score that matched the first principal component (tidal-dominated) with a score of 0.92, and were therefore identified as tidal-dominated components; four events that were temporally random but spatially strongly correlated had a principal component score that matched the second principal component (topographic-dominated) with a score of 0.87, and were therefore identified as topographic-dominated components.

[0126] Calculation of influence weights: For the tidal-dominant component, considering its temporal periodic stability (Pearson correlation coefficient with the tide table of 0.86), the periodic fit weighting method is used to obtain an initial weight of 0.67; for the topographic-dominant component, considering its spatial correlation strength (overlap with reef distribution of 0.89), the spatial decay model is used to calculate an initial weight of 0.33.

[0127] Finally, comprehensive integration and standardization were carried out: the initial weights were scaled proportionally to a total of 1, resulting in environmental impact weights—tidal impact weight 0.67 and topographic impact weight 0.33. This clarified the contribution ratio of the two types of factors in rapid directional changes, with tides being the primary driving factor and topography being the secondary interfering factor.

[0128] In step S17, the parameter update frequency of the adaptive filtering algorithm is adjusted by the environmental influence weight to obtain the optimized filtering parameters.

[0129] In one implementation, this embodiment takes the aforementioned environmental impact weighting results (tidal impact weight 0.67, terrain impact weight 0.33) and adjusts the parameter update frequency of the adaptive filtering algorithm. The specific process is as follows:

[0130] First, we analyze the composition of the environmental impact weights and clarify the contribution ratios of tides and topography: tides account for 67% and topography accounts for 33%. Tides account for 67% (dominant, stable over a 12-hour cycle) and topography accounts for 33% (minor, sudden). This weight is obtained based on the analysis of the main direction feature set, which comes from the corrected ocean current direction data. The corrected direction data is generated by back-calculating the preprocessed eastward and northward velocity components after smoothing them with Kalman filtering.

[0131] Based on the influence characteristics of the two types of factors, a correlation rule between weight and parameter update frequency is established: when the tidal influence accounts for >50%, because its change pattern is predictable (such as the fixed time of the ebb and flow tide), a low-frequency update is set—updating the filter parameters once every 1 hour to match its slow periodicity; when the topographic influence accounts for >50%, because its changes are sudden and irregular (such as the random occurrence of turbulence in the reef area), a high-frequency update is set—updating once every 10 minutes to quickly respond to instantaneous changes.

[0132] The real-time environmental impact weights (tidal 0.67, topographic 0.33) are substituted into the association rules, triggering the parameter update adjustment mechanism of the adaptive filtering algorithm: because the tidal proportion is higher, the algorithm automatically adjusts the parameter update frequency from the initial 30 minutes / time to once / hour. This adjustment matches the update rhythm with the rhythm of ocean current changes dominated by tides (slow fluctuations within a 12-hour cycle), avoiding unnecessary calculation errors introduced by frequent updates.

[0133] The adjusted update frequency (1 time / hour) was then integrated into the parameter system of the adaptive filtering algorithm, which also includes parameters such as the filter order (16th order) and step size factor (0.015). Coordination was ensured through verification: the verification results showed that the parameters were consistent with the 15-second window and the actual change rhythm, proving their effectiveness. After successful verification, the final optimized filtering parameters were: order 16, step size 0.015, and update frequency 1 time / hour, adapting to the current tidal-dominated environmental influence characteristics and providing stable parameter support for subsequent secondary filtering.

[0134] In step S18, the eastward and northward velocity components of the dynamically acquired real-time ocean current data are subjected to secondary filtering based on the optimized filtering parameters, and high-precision ocean current direction data is output in reverse calculation.

[0135] In one embodiment, this embodiment takes the aforementioned optimized filtering parameters (order 16, step size 0.015, update frequency 1 time / hour) and performs secondary filtering processing on a real-time ocean current monitoring scenario in a certain nearshore sea area. The specific process is as follows: First, continuously receive the data collected in real time by the current meter. The monitoring system acquires ocean current direction and velocity information using a 2MHz Doppler current meter at a sampling frequency of 1Hz (1 data point per second). The data is in JSON format and includes a timestamp (e.g., "2023-08-01T12:00:00"), direction value (0°-360°, e.g., 120.3°), and velocity value (m / s, e.g., 0.52m / s), forming a real-time data stream to be processed. The real-time data stream is then decomposed into vectors: the velocity and direction values ​​at each moment are extracted, the direction values ​​are converted to radians, and the real-time eastward velocity component u_real[t] and the real-time northward velocity component v_real[t] are calculated by combining them with the velocity values. For example, in the 10-second raw component data, u_real[t] is [0.445, 0.438, ..., 0.442] and v_real[t] is [0.261, 0.265, ..., 0.263] (including jump values). Next, the optimized filtering parameters are imported into the adaptive filtering algorithm, and the running parameters and processing mode are configured. The algorithm is loaded with an order of 16 (to control the smoothness of the filter) and a step size of 0.015 (to adjust the convergence speed), and a parameter refresh timer is set according to the update frequency of once per hour; at the same time, the "tidal-dominated mode" is enabled, which enhances the retention of low-frequency components and weakens high-frequency noise (such as instantaneous fluctuations >0.01Hz) for periodic changes. The configured algorithm is then applied to perform time-by-time secondary filtering on the real-time eastward velocity component u_real[t] and the real-time northward velocity component v_real[t]. For example, at t=12:00:04, the original eastward component is 0.462 m / s and the northward component is 0.281 m / s. After 16th-order filtering, the eastward component is 0.451 m / s and the northward component is 0.272 m / s, with the abrupt changes reduced by 0.011 m / s and 0.009 m / s respectively. After processing 10 seconds of data, the filtered component sequences u_filter[t] are [0.443, 0.440, ..., 0.441] and v_filter[t] are [0.262, 0.263, ..., 0.262], and high-frequency abrupt changes are effectively suppressed. The continuity of the filtering results is verified. The verification rule is: calculate the difference between the filtered component values ​​at adjacent times. If the difference between the eastward and northward components is ≤0.02 m / s and ≤0.015 m / s respectively (preset thresholds, based on the maximum reasonable rate of change of the components during the tidal dominance period), then it is considered continuous; otherwise, it is marked as abnormal.In the above 10-second results, the maximum difference between adjacent eastward components is 0.007 m / s, and the maximum difference between northward components is 0.005 m / s, both meeting the threshold requirements and passing the verification. If an anomaly of 0.035 m / s difference in the eastward component occurs at any moment (e.g., due to a momentary equipment failure), interpolation correction is triggered (using the average of the preceding and following moments to replace the difference) to ensure the continuity of the component data. Finally, the verified filtering results are integrated, and the ocean current direction is obtained by back-calculating the verified eastward velocity component u_filter[t] and northward velocity component v_filter[t] using the arctangent function, and sorted by timestamp to form a continuous data sequence. Integrating 24-hour data, an ocean current direction sequence from "2023-08-01T00:00:00" to "2023-08-01T23:59:59" is obtained, with the direction value error at each moment ≤0.5° (compared with the anchored buoy reference data). The final high-precision ocean current direction data is stored in CSV format, containing timestamps and filtered direction values, and can be directly used for ocean dynamics analysis or navigation system correction, improving accuracy by more than 60% compared to the original data.

[0136] refer to Figure 2 The second embodiment of the invention provides a current meter data quality control system based on adaptive filtering, comprising:

[0137] Data acquisition and decomposition module: The module acquires a raw dataset containing ocean current direction and velocity using a current meter, and decomposes the ocean current direction and velocity in the raw dataset into an eastward velocity component and a northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change.

[0138] Filter window determination module: Based on the spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change;

[0139] Preprocessing feature extraction module: Based on the dynamic filtering window, extract instantaneous ocean current features from the eastward and northward current velocity components, and combine the instantaneous ocean current features to calculate the ocean current direction and form a feature vector containing the direction change law;

[0140] First correction processing module: When the directional change of the feature vector exceeds the preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed by the Kalman filter algorithm, and the corrected ocean current direction data is obtained by back calculation.

[0141] The second correction processing module: when the directional change of the feature vector does not exceed the preset amplitude threshold, the ocean current direction data is obtained by back-calculating the preprocessed eastward and northward velocity components using the arctangent function.

[0142] Principal component feature set module: For the corrected ocean current direction data, extract the dynamic change trend of each direction of the ocean current to obtain the principal direction feature set;

[0143] Environmental weight analysis module: Based on the main direction feature set, analyze the influence of tides and topography on rapid directional changes to obtain environmental impact weights;

[0144] Filter parameter optimization module: Adjusts the parameter update frequency of the adaptive filtering algorithm by the environmental influence weights to obtain optimized filter parameters;

[0145] Secondary filtering output module: Based on the optimized filtering parameters, the eastward and northward velocity components of the dynamically acquired real-time ocean current data are processed by secondary filtering, and high-precision ocean current direction data is output in reverse calculation.

[0146] It should be noted that the adaptive filtering-based current meter data quality control system provided in this embodiment of the invention is used to execute all the process steps of the adaptive filtering-based current meter data quality control method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0147] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A method for quality control of ocean current meter data based on adaptive filtering, characterized in that, include: The original dataset containing ocean current direction and velocity is obtained by using an ocean current meter, and the ocean current direction and velocity in the original dataset are decomposed into eastward velocity component and northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change. Based on the aforementioned spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change. Based on the dynamic filtering window, instantaneous ocean current features are extracted from the eastward and northward current velocity components, and the ocean current direction is calculated by combining the instantaneous ocean current features to form a feature vector containing the direction change law. When the directional change of the feature vector exceeds a preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed using the Kalman filter algorithm, and the corrected ocean current direction data is calculated in reverse. When the directional change of the feature vector does not exceed the preset amplitude threshold, the ocean current direction data is obtained by back-calculating the preprocessed eastward and northward velocity components using the arctangent function. Based on the corrected ocean current direction data, the dynamic change trend of each direction of the ocean current is extracted to obtain the main direction feature set; Based on the main direction feature set, the influence of tides and topography on rapid directional changes is analyzed to obtain the environmental impact weights. The optimized filter parameters are obtained by adjusting the parameter update frequency of the adaptive filtering algorithm by adjusting the environmental influence weights. Based on the optimized filtering parameters, the eastward and northward velocity components of the dynamically acquired real-time ocean current data are subjected to secondary filtering, and high-precision ocean current direction data is output by reverse calculation.

2. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The process involves acquiring a raw dataset containing ocean current direction and velocity using a current meter, and then decomposing the ocean current direction and velocity in the raw dataset into eastward and northward velocity components to obtain the spectral distribution of the contribution of ocean current direction changes, including: The direction and velocity information of ocean currents are continuously collected by the current meter to form a raw dataset containing time series features; Vector decomposition is performed on the ocean current direction and velocity in the original dataset to extract the velocity and direction values ​​at each moment. After converting the direction values ​​to radians, the eastward and northward velocity components are calculated by combining them with the velocity values. The eastward and northward velocity components are decomposed using Fourier transform to obtain the corresponding complex frequency components of the eastward and northward components. The joint energy of the complex frequency components of the eastward component and the complex frequency components of the northward component is calculated. First, the frequency energy of the eastward component and the frequency energy of the northward component are added to obtain the total energy. Then, the total energy is normalized by the total number of samples to obtain the power spectral density of each frequency point. Finally, the power spectral density is integrated according to the frequency interval to form the spectral distribution of the contribution of different frequency components to the change of ocean current direction.

3. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The step of adjusting the filtering parameters using an adaptive filtering algorithm based on the spectral distribution to determine a dynamic filtering window that matches the current ocean current direction change includes: The compositional characteristics and energy proportions of different frequency components in the spectrum distribution are analyzed to identify the effective frequency range reflecting the inherent variation characteristics of ocean currents and the interfering frequency range containing interference information. Based on the effective frequency range and the interference frequency range, the filtering parameters are dynamically adjusted through the parameter adjustment mechanism of the adaptive filtering algorithm. Adaptive parameter values ​​are set for the effective frequency range, and suppression parameter values ​​are set for the interference frequency range. Based on the adjusted filtering parameters, combined with the frequency characteristics and fluctuation intensity of the current eastward and northward current velocity components, the time-domain coverage and dynamic response characteristics of the filtering window are determined, forming a dynamic filtering window that matches the current ocean current direction change.

4. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The process involves extracting instantaneous ocean current features from the eastward and northward current velocity components based on the dynamic filtering window, and then using these instantaneous ocean current features to calculate the ocean current direction and form a feature vector containing the direction change pattern. This includes: The eastward and northward velocity components are smoothed through the dynamic filtering window to remove high-frequency interference components and retain information related to changes in ocean current direction, resulting in preprocessed eastward and northward velocity components. Instantaneous ocean current characteristics reflecting the instantaneous state of the ocean current are extracted from the preprocessed eastward and northward velocity components. Based on the preprocessed eastward and northward velocity components, the ocean current direction is calculated by back-calculating the arctangent function. The instantaneous ocean current characteristics and the back-calculated ocean current direction are then structurally integrated according to the time series to form a feature vector containing the variation law of ocean current direction. The instantaneous ocean current features include the instantaneous values ​​of the eastward component, the instantaneous values ​​of the northward component, the differences in the changes of the eastward component at adjacent times, the differences in the changes of the northward component at adjacent times, the continuous trend and fluctuation characteristics of the component changes, and the feature vector contains the dynamic characteristics and correlation patterns of the changes in ocean current direction.

5. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The process involves smoothing the preprocessed eastward and northward current velocity components using a Kalman filter algorithm, and then calculating the corrected ocean current direction data, including: Based on the preprocessed eastward and northward velocity components, the Kalman filter algorithm is initiated. Based on the state prediction mechanism built into the Kalman filter algorithm, the changing trends of the eastward and northward velocity components in the historical processed data are integrated to generate the predicted values ​​of the eastward and northward velocity components at the current moment. Simultaneously, the current time's eastward and northward velocity component observation values ​​are extracted from the preprocessed eastward and northward velocity components. These observation values ​​are then compared with the corresponding component prediction values ​​to obtain the deviation characteristics between the two. If the deviation characteristics exceed the preset deviation threshold, the predicted values ​​of the eastward and northward velocity components are dynamically corrected through the state update mechanism of the Kalman filter algorithm to weaken the abnormal fluctuation components remaining in the preprocessed components. Through cyclical processing of prediction and correction, the deviation characteristics gradually converge, forming a continuous data sequence of eastward and northward components that closely matches the actual trend of ocean current changes. Based on this sequence, the corrected ocean current direction data is obtained by back-calculating using the arctangent function.

6. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The process involves extracting the dynamic trends of each direction of the ocean current from the corrected ocean current direction data to obtain a main direction feature set, including: The corrected ocean current direction data is structured and organized to form sequence data containing both time and direction dimensions; Principal component analysis was used to reduce the dimensionality of the sequence data and identify the core patterns that dominate the overall change in the direction of ocean currents. Extract the main components of the core pattern; wherein, the main components include the continuous changing trend, fluctuation characteristics and correlation patterns of ocean currents in different directions; The main components are integrated in order of their contribution to the overall change to form a main directional feature set that reflects the dynamic change of ocean currents in each direction.

7. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, Based on the main direction feature set, the influence of tides and topography on rapid directional changes is analyzed to obtain environmental impact weights, including: Extract the temporal correlation features and spatial distribution features of rapid directional changes from the main directional feature set; Based on the extracted temporal correlation features and spatial distribution features, combined with the periodic stability features of tidal influence and the spatial correlation features of topographic influence, a two-dimensional analysis mechanism is established. The dual-dimensional analysis mechanism is used to match and analyze the features of rapid directional changes, and the tidal and topographic components are identified. For the identified dominant tidal components, the tidal influence weights are calculated by combining their periodic stability in time-related characteristics. For the identified dominant terrain components, the terrain influence weight is calculated by combining the terrain association strength in their spatial distribution characteristics. The calculated tidal influence weights and topographic influence weights are integrated and standardized to unify the measurement scale, thus forming the respective environmental influence weights of the two types of environmental factors in rapid directional changes.

8. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The step of adjusting the parameter update frequency of the adaptive filtering algorithm through the environmental influence weights to obtain the optimized filtering parameters includes: The composition of the environmental impact weights is analyzed to determine the contribution ratios of tidal and topographical influences, and to identify the types of environmental factors that currently dominate changes in ocean current direction. Based on the impact characteristics of different types of environmental factors, a correlation rule between weight and parameter update frequency is established: when the tidal influence accounts for a higher proportion, an appropriate low-frequency update is set according to its periodic characteristics; when the topographic influence accounts for a higher proportion, an appropriate high-frequency update is set according to its suddenness characteristics. The environmental impact weights acquired in real time are substituted into the association rule to trigger the parameter update and adjustment mechanism of the adaptive filtering algorithm, so that the update frequency matches the impact characteristics of the current environmental factors. The adjusted parameter update frequency is integrated into the parameter system of the adaptive filtering algorithm. Through verification, it is ensured that the frequency is coordinated with the dynamic characteristics of the filtering window and the actual rhythm of ocean current direction changes, thus forming filtering parameters that are adapted to the characteristics of the current environmental impact.

9. The current meter data quality control method based on adaptive filtering according to claim 1, characterized in that, The process involves secondary filtering of the eastward and northward velocity components of dynamically acquired real-time ocean current data based on optimized filtering parameters, and then inversely calculating and outputting high-precision ocean current direction data, including: It continuously receives real-time ocean current direction and velocity data collected by the current meter, forming real-time ocean current data to be processed; The real-time ocean current data is vector decomposed to extract the velocity and direction values ​​at each moment. After converting the direction values ​​to radians, the real-time eastward velocity component and the real-time northward velocity component are calculated by combining them with the velocity values. Import the optimized filtering parameters into the adaptive filtering algorithm and configure the algorithm's running parameters and processing mode; The configured adaptive filtering algorithm is applied to perform time-by-time secondary filtering on the real-time eastward velocity component and the real-time northward velocity component to obtain the filtered eastward velocity component and northward velocity component. The continuity of the filtered eastward and northward velocity components is verified to obtain the component data that passes the verification. Based on the verified component data, the ocean current direction is calculated by inverse calculation using the arctangent function, integrated to form a continuous data sequence of ocean current direction, and output high-precision ocean current direction data.

10. A current meter data quality control system based on adaptive filtering, characterized in that, include: Data acquisition and decomposition module: The module acquires a raw dataset containing ocean current direction and velocity using a current meter, and decomposes the ocean current direction and velocity in the raw dataset into an eastward velocity component and a northward velocity component to obtain the spectral distribution of the contribution of ocean current direction change. Filter window determination module: Based on the spectrum distribution, an adaptive filtering algorithm is used to adjust the filtering parameters and determine a dynamic filtering window that matches the current ocean current direction change; Preprocessing feature extraction module: Based on the dynamic filtering window, extract instantaneous ocean current features from the eastward and northward current velocity components, and combine the instantaneous ocean current features to calculate the ocean current direction and form a feature vector containing the direction change law; First correction processing module: When the directional change of the feature vector exceeds the preset amplitude threshold, the preprocessed eastward and northward velocity components are smoothed by the Kalman filter algorithm, and the corrected ocean current direction data is obtained by back calculation. The second correction processing module: when the directional change of the feature vector does not exceed the preset amplitude threshold, the ocean current direction data is obtained by back-calculating the preprocessed eastward and northward velocity components using the arctangent function. Principal component feature set module: For the corrected ocean current direction data, extract the dynamic change trend of each direction of the ocean current to obtain the principal direction feature set; Environmental weight analysis module: Based on the main direction feature set, analyze the influence of tides and topography on rapid directional changes to obtain environmental impact weights; Filter parameter optimization module: Adjusts the parameter update frequency of the adaptive filtering algorithm by the environmental influence weights to obtain the optimized filter parameters; Secondary filtering output module: Based on the optimized filtering parameters, the eastward and northward velocity components of the dynamically acquired real-time ocean current data are processed by secondary filtering, and high-precision ocean current direction data is output in reverse calculation.

Citation Information

Patent Citations

  • Far steady-state filtering flow velocity and flow direction detection method

    CN120539692A

  • Acoustic Doppler flow velocity measurement method and system

    CN120801749A