A marine millimeter-wave radar level gauge and its attitude fusion measurement method
By integrating the inertial measurement module and the radar module, and using a single microcontroller to synchronize radar frames and inertial data, attitude compensation and dynamic filtering are achieved, solving the attitude-related errors and measurement instability problems of marine millimeter-wave radar level gauges in the marine environment, and realizing stable level display.
Patent Information
- Application Number
- CN202611535632.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-30
- Publication Date
- 2026-11-10
AI Technical Summary
Existing millimeter-wave radar level gauges suffer from several problems in marine environments, including attitude-related errors caused by hull rolling, asynchronous radar frames and attitude data, difficulty in balancing response speed and stability with fixed filtering parameters, and difficulty in distinguishing between actual level changes and measurement fluctuations caused by hull motion.
The system integrates an inertial measurement module and a radar module, and uses a single microcontroller to synchronize radar frames and inertial data. It uses attitude angles for attitude compensation, and identifies the real liquid surface echo and calculates the liquid level value after attitude compensation through dynamic echo trajectory recognition and filter weight adjustment.
It effectively eliminates liquid level measurement deviation caused by hull tilting, ensures data synchronization, suppresses liquid surface sloshing and measurement jumps caused by obstacles, and achieves stable liquid level display under all operating conditions.
Smart Images

Figure CN123065564A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship liquid level measurement technology, and more specifically, to a shipborne millimeter-wave radar liquid level gauge and its attitude fusion measurement method. Background Technology
[0002] Millimeter-wave radar level gauges are non-contact level measurement instruments widely used for level monitoring in ship compartments. Their working principle is as follows: the millimeter-wave radar transceiver module transmits a frequency-modulated continuous wave (FMCW) signal to the measured liquid surface, receives the reflected signal from the liquid surface, and mixes it with the transmitted signal to form an intermediate-frequency beat signal corresponding to the target distance; the processor performs analog-to-digital conversion and spectrum analysis on the intermediate-frequency beat signal to obtain the distance from the radar antenna phase center to the liquid surface, and then calculates the liquid level based on a pre-set compartment height or zero-point distance.
[0003] Existing 80GHz millimeter-wave radar level gauges are typically mounted on top of tanks, with the radar antenna axis approximately perpendicular to the horizontal liquid surface as the measurement condition. In land-based stationary storage tanks, this condition usually remains stable; however, in a marine environment, the ship's hull experiences rolling, pitching, vibration, and impacts due to sea conditions. The radar housing, antenna, and the measured tank tilt along with the hull, while the average normal to the free surface of the liquid is still primarily determined by the direction of gravity. Therefore, an angle that varies with the ship's motion will form between the radar antenna axis and the normal to the liquid surface.
[0004] When the processor still directly uses the distance measured by the radar along the beam direction as the vertical altitude, attitude-related errors will be introduced. At the same time, the liquid surface sways under the rolling action of the hull, and the instantaneous echo distance and echo amplitude change. Conventional fixed filtering parameters are difficult to simultaneously take into account the response speed in a stationary state and the display stability in a rolling state.
[0005] Existing millimeter-wave radar level gauges typically include a millimeter-wave radar transceiver module, an analog intermediate frequency (IF) conditioning circuit, a processor, and display and communication circuits. The millimeter-wave radar transceiver module generates an FMCW sweep frequency signal and outputs an IF beat signal formed by liquid surface reflection; the analog IF conditioning circuit amplifies, filters, and applies common-mode bias to the IF beat signal; the processor acquires the raw IF data through an ADC (analog-to-digital converter), performs windowing, fast Fourier transform, peak search, and distance conversion, and finally outputs the liquid level value.
[0006] Some instruments allow setting fixed damping time, echo window, or echo lock parameters, but these parameters are generally preset by the user and cannot be synchronously adjusted based on the ship's real-time roll, pitch, and motion intensity to control the measurement distance and filter weights. Existing products typically do not collect inertial data at the radar frequency sweep synchronization moment, thus making it impossible to establish a definite relationship between a certain frame of radar echo and the corresponding attitude of that frame.
[0007] In summary, the existing technology has at least the following drawbacks:
[0008] Firstly, directly using the distance measured along the radar beam direction for liquid level conversion without considering the angle between the radar antenna axis and the direction of gravity will cause attitude-related errors when the ship rolls or pitches.
[0009] Secondly, if radar echoes and ship attitude are collected separately or not at all, it is impossible to determine the roll and pitch angles corresponding to each radar measurement frame.
[0010] Third, using fixed filter parameters, when the filter is weak, the hull rolling will cause the liquid level display to fluctuate, and when the filter is strong, the real liquid level changes under the static and stable state of the ship cannot be reflected in time.
[0011] Fourth, judging the liquid level solely based on the radar echo itself makes it difficult to distinguish between actual liquid level changes and short-term measurement fluctuations caused by ship movement.
[0012] Therefore, in view of the above situation, there is an urgent need to develop a marine millimeter-wave radar level gauge and its attitude fusion measurement method to overcome the shortcomings in current practical applications. Summary of the Invention
[0013] This invention aims to overcome the aforementioned deficiencies of the prior art and provide a marine millimeter-wave radar level gauge and its attitude fusion measurement method that can effectively eliminate the influence of ship roll, pitch and sloshing on liquid level measurement. This solves the problems existing in the prior art, such as attitude-related errors, asynchronous radar frames and attitude data, difficulty in balancing response speed and stability with fixed filtering parameters, and difficulty in distinguishing between actual liquid level changes and measurement fluctuations caused by ship motion.
[0014] To achieve the above objectives, the present invention provides the following technical solution:
[0015] A marine millimeter-wave radar level gauge includes:
[0016] The millimeter-wave radar transceiver module is used to transmit frequency-modulated continuous wave signals and receive liquid surface reflection signals, and output intermediate frequency beat signals.
[0017] The inertial measurement module, rigidly connected to the radar antenna, is used to output triaxial acceleration and triaxial angular velocity.
[0018] An analog intermediate frequency conditioning module, connected to the millimeter-wave radar transceiver module, is used to condition the intermediate frequency beat signal;
[0019] A single microcontroller is connected to both the analog intermediate frequency conditioning module and the inertial measurement module, and the single microcontroller is configured as follows:
[0020] The radar frame timestamps of the millimeter-wave radar transceiver module and the inertial sampling time of the inertial measurement module are recorded using the same timing reference to establish a synchronization relationship between each radar frame and the corresponding inertial data.
[0021] Acquire the conditioned intermediate frequency beat signal and perform spectrum analysis on the intermediate frequency beat signal to extract at least one candidate echo peak, and obtain the candidate echo distance for each radar frame based on the candidate echo peak;
[0022] Read the data from the inertial measurement module, and obtain the inertial data corresponding to each radar frame according to the synchronization relationship, and calculate the hull attitude angle corresponding to each radar frame.
[0023] The candidate echo distances of multiple consecutive radar frames are correlated according to the distance continuity to form a dynamic echo trajectory composed of the candidate echo peaks of each frame. The dynamic echo trajectory is then fused with the corresponding ship attitude angle to identify the real liquid surface echo trajectory.
[0024] Based on the beam distance of the actual liquid surface echo trajectory and the ship attitude angle, calculate the final distance or liquid level value after attitude compensation;
[0025] An output module, connected to the single microcontroller, is used to output the final distance or liquid level value.
[0026] Preferably, the millimeter-wave radar transceiver module outputs a radar sweep frequency synchronization signal, and the timer capture terminal or external interrupt terminal of the single microcontroller receives the synchronization signal and records the radar frame timestamp and the sampling interval of the on-chip analog-to-digital converter accordingly.
[0027] Preferably, the inertial measurement module provides inertial sampling data to the single microcontroller via a data-ready interrupt or FIFO method, and the single microcontroller records the inertial sampling time using the same timing reference as the timestamp of the recorded radar frame.
[0028] Preferably, the single microcontroller calculates the ship's attitude angles by using the gyroscope angular velocity for short-time attitude recursion and correcting it using the direction of gravitational acceleration after low-pass processing, thus obtaining the roll and pitch angles.
[0029] Preferably, the single microcontroller identifies the true liquid surface echo trajectory by: projecting the candidate echo distance onto the gravity direction according to the ship's attitude angle to obtain the projected candidate distance; determining whether the projected candidate distance is continuous between adjacent radar frames, and whether the direction and amount of change of the candidate distance are consistent with the ship's attitude change during the same period; assigning a higher confidence level to the candidate echo trajectory that meets the continuity threshold and is consistent with the attitude change, and selecting the trajectory with the highest confidence level as the true liquid surface echo trajectory.
[0030] Preferably, the single microcontroller calculates the final distance after attitude compensation by: calculating the angle between the radar antenna axis and the gravity direction based on the ship's attitude angle, and projecting the beam distance of the real liquid surface echo trajectory onto the gravity direction to obtain the attitude compensation altitude.
[0031] Preferably, the single microcontroller is further configured to: calculate the hull motion intensity based on the roll angular velocity, pitch angular velocity, and dynamic acceleration; determine the filtering weight based on the motion intensity, and perform recursive filtering on the final distance or liquid level value, wherein the greater the motion intensity, the smaller the filtering weight; wherein the dynamic acceleration is the acceleration obtained after removing the gravity component from the three-axis acceleration. Specifically, the method for extracting the dynamic acceleration is as follows: using the attitude quaternion or rotation matrix already calculated by the single microcontroller, the three-axis acceleration measurement values output by the inertial measurement module are transformed from the sensor coordinate system to the navigation coordinate system (i.e., the local horizontal coordinate system), and the gravity vector [0, 0, g] (where g is the local gravitational acceleration value) is subtracted in the navigation coordinate system to obtain the three-axis dynamic accelerations adx, ady, and adz in the navigation coordinate system.
[0032] Preferably, the inertial measurement module is a six-axis or nine-axis inertial sensor and is connected to the single microcontroller via SPI, I2C, UART or CAN bus.
[0033] The present invention also provides an attitude fusion measurement method based on the above-mentioned marine millimeter-wave radar level gauge, comprising the following steps:
[0034] Step S1: The signal is transmitted and received through the millimeter-wave radar transceiver module, and after being processed by the analog intermediate frequency conditioning module, the intermediate frequency beat data of each radar frame is collected by a single microcontroller.
[0035] Step S2: The inertial measurement module collects the three-axis acceleration and three-axis angular velocity, and the single microcontroller reads and calculates the hull attitude angle corresponding to each radar frame.
[0036] Step S3: The single microcontroller performs spectral analysis on the intermediate frequency beat data, extracts at least one candidate echo peak, and calculates the corresponding candidate beam distance.
[0037] Step S4: The single microcontroller correlates the candidate beam distances of multiple consecutive radar frames to form a dynamic echo trajectory, and fuses the dynamic echo trajectory with the ship's attitude angle to identify the real liquid surface echo trajectory.
[0038] Step S5: The single microcontroller calculates the final distance or liquid level value after attitude compensation based on the beam distance of the real liquid surface echo trajectory and the hull attitude angle, and outputs it through the output module.
[0039] Preferably, step S4 further includes: step S41, projecting the candidate beam distance onto the gravity direction according to the hull attitude angle; step S42, determining whether the continuity and change trend of the projected candidate distance between adjacent frames are consistent with the attitude angle change; step S43, assigning high confidence to the candidate echo trajectory that meets the consistency condition, and determining it as the real liquid surface echo trajectory; after step S5, the method further includes: step S6, calculating the hull motion intensity based on the roll angular velocity, pitch angular velocity, and dynamic acceleration; step S7, dynamically adjusting the filtering weights according to the motion intensity, and performing smooth filtering on the final distance or liquid level value for output.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] First, by integrating an inertial measurement module and calculating the ship's roll and pitch angles in real time, the beam distance is projected onto the direction of gravity for attitude compensation, fundamentally eliminating the liquid level measurement deviation caused by the ship's tilt.
[0042] Second, a single microcontroller is used to record the timestamps of radar frames and inertial data with a unified timing reference, ensuring that each radar echo has attitude data that strictly corresponds to it, thus avoiding compensation errors introduced by asynchronous data.
[0043] Third, by using dynamic echo trajectory recognition, the real liquid surface echo is selected based on the continuity of candidate distance, trajectory confidence, and consistency with attitude changes, which effectively suppresses measurement jumps and false locks caused by liquid surface sloshing and obstacles in the cabin.
[0044] Fourth, the filter weights are dynamically adjusted according to the intensity of the ship's motion. The filter is enhanced during strong swaying to stabilize the display, and the filter is weakened during calm and stable conditions to quickly respond to changes in the actual liquid level, thus achieving optimal output performance under all operating conditions.
[0045] Fifth, simply add a low-cost MEMS inertial sensor to the existing level gauge, and all processing is still done by the original single microcontroller. The hardware changes are minor and the cost is low, making it easy to promote industrialization.
[0046] Other features and advantages of the invention will become clear from the following detailed description of exemplary embodiments of the invention with reference to the accompanying drawings. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the invention and, together with their description, serve to explain the principles of the invention.
[0048] Figure 1 The system composition and data acquisition block diagram of the marine millimeter-wave radar level gauge provided in the embodiments of the present invention are shown.
[0049] Figure 2 A flowchart of the attitude fusion measurement method for a marine millimeter-wave radar level gauge provided in an embodiment of the present invention.
[0050] Figure 3 This is a schematic diagram illustrating the attitude projection and liquid level conversion principle of a marine millimeter-wave radar level gauge provided in an embodiment of the present invention.
[0051] Figure 4 This is a schematic diagram illustrating the dynamic echo trajectory identification in continuous radar frames of a marine millimeter-wave radar level gauge provided in an embodiment of the present invention.
[0052] In the diagram: 100 - Single microcontroller, 200 - Millimeter-wave radar transceiver module, 300 - Inertial measurement module, 400 - Analog intermediate frequency conditioning module, 500 - Output module. Detailed Implementation
[0053] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the preferred embodiments described herein are only for explaining the present invention and are not intended to limit the scope of protection of the present invention.
[0054] Example 1
[0055] Reference Figure 1 This embodiment provides a marine millimeter-wave radar level gauge, including: a millimeter-wave radar transceiver module 200, an analog intermediate frequency conditioning module 400, an inertial measurement module 300, a single microcontroller 100, and an output module 500.
[0056] The millimeter-wave radar transceiver module 200 generates an FMCW sweep signal and transmits millimeter waves to the measured liquid surface via an antenna. Simultaneously, it receives the reflected signal from the liquid surface, mixes it with the transmitted signal, and outputs an analog intermediate frequency beat signal. In this embodiment, the millimeter-wave radar transceiver module 200 operates at 80 GHz, but is not limited to this. At the start of each sweep, the millimeter-wave radar transceiver module 200 outputs a radar frame synchronization signal RAMPSYNC, a rising edge pulse indicating the start time of a radar measurement frame. In this embodiment, the millimeter-wave radar transceiver module 200 may use an RC7701N32 chip. The SPI interface of this chip is only used for reading and writing registers and sweep configuration parameters, and not for transmitting the analog intermediate frequency raw data. The analog intermediate frequency raw data is acquired by the single microcontroller 100 through an on-chip analog-to-digital converter.
[0057] The analog intermediate frequency conditioning module 400 is connected to the output terminal of the millimeter-wave radar transceiver module 200, and is used to differentially amplify, bandpass filter and adjust the common mode voltage of the analog intermediate frequency beat signal so that its amplitude and DC bias meet the requirements of subsequent analog-to-digital conversion.
[0058] The inertial measurement module 300 is rigidly connected to the radar antenna and internally includes a three-axis accelerometer and a three-axis gyroscope for outputting three-axis acceleration (ax, ay, az) and three-axis angular velocity (gx, gy, gz). In this embodiment, the inertial measurement module 300 uses a six-axis MEMS inertial sensor (e.g., MPU-6050) and communicates with the single microcontroller 100 via an SPI interface. When the inertial measurement module 300 has its internal data ready, it outputs an attitude sampling synchronization signal DRDY, which is a low-level active interrupt signal used to notify the single microcontroller 100 to read the latest inertial data. In other embodiments, a nine-axis inertial sensor (including a magnetometer) can also be used, or communication can be achieved via buses such as I2C, UART, or CAN.
[0059] The single microcontroller 100 is the core processing unit of this level gauge, and it is connected to the output terminal of the analog intermediate frequency conditioning module 400 and the communication interface of the inertial measurement module 300. The single microcontroller 100 integrates peripherals such as an ADC, timer, and SPI controller to complete all data acquisition, time synchronization, attitude calculation, echo processing, trajectory recognition, and fusion calculation. In this embodiment, the single microcontroller 100 can be an STM32L496 or similar model.
[0060] The output module 500 is connected to the single microcontroller 100 and is used to output the finally calculated distance value or liquid level value. The output module 500 may include at least one of the following: a 4-20mA current loop, HART protocol communication, RS485 bus, LCD display module, or wireless communication module (such as LoRa, NB-IoT).
[0061] Regarding time synchronization, the details are as follows:
[0062] To achieve precise correspondence between radar frames and attitude data, this embodiment employs a hardware synchronization mechanism. Specifically, the millimeter-wave radar transceiver module 200 outputs a radar frame synchronization signal RAMPSYNC at the start of each frequency sweep. This signal is connected to the timer capture input or external interrupt pin of the single microcontroller 100. Upon detecting the RAMPSYNC signal, the single microcontroller 100 immediately records the current timer count as the start timestamp of the radar frame and delays for a preset time tdelay before starting the sampling interval of the on-chip ADC to begin acquiring the intermediate frequency beat data of the current frame. The tdelay is the duration of the nonlinear region at the start of the frequency sweep, ranging from 5μs to 20μs, to ensure that the ADC acquires the intermediate frequency signal of the linear segment of the frequency sweep. It should be noted that in this embodiment, the digital interface (such as the SPI interface) of the millimeter-wave radar transceiver module 200 is only used for reading and writing registers and frequency sweep configuration parameters, and is not used for transmitting analog intermediate frequency raw data. Therefore, the intermediate frequency beat data must be acquired through the on-chip analog-to-digital converter of the single microcontroller 100.
[0063] Meanwhile, when the inertial measurement module 300 has its internal data ready, it sends an interrupt request to the single microcontroller 100 via the attitude sampling synchronization signal DRDY. The single microcontroller 100 responds to the DRDY interrupt, reads the latest inertial data via SPI, and records the timestamp of this inertial sampling using the same timing reference as the timestamp recorded for the radar frame. Since all timestamps come from the same timer of the same microcontroller, the time correspondence between each frame of radar data and the most recent inertial data can be accurately established. When the inertial sampling time does not completely coincide with the radar frame time, the single microcontroller 100 selects the inertial data located on either side of the radar frame time for linear interpolation, or directly selects the inertial data with the smallest time difference as the attitude data corresponding to that frame.
[0064] To ensure the time synchronization accuracy between radar frames and inertial data, the single microcontroller 100 also performs the following operations: at the end of each radar frequency sweep, the millimeter-wave radar transceiver module 200 generates a frequency sweep end signal (or the single microcontroller 100 obtains the frame end time based on a preset frequency sweep period), and the single microcontroller 100 records the current timer count value as the end timestamp T of the radar frame. end The effective time interval of this radar frame is defined as starting from the rising edge T of RAMPSYNC. start To T end When the inertial measurement module 300 outputs multiple sets of inertial data during a frame, the single microcontroller 100 selects a timestamp located at [T]. start ,T endFor all inertial data within the interval, linear interpolation is performed on the attitude angles of each data set to obtain the effective time center T of the radar frame. mid =(T start +T end The attitude angle estimate at () / 2 is used as the attitude angle corresponding to that frame. The sampling rate of the inertial measurement module 300 is at least 5 times the frame rate of the millimeter-wave radar transceiver module 200 to ensure that at least 5 sets of inertial data are collected during each radar frame, and the interpolation error does not exceed half of the inertial sampling period.
[0065] Regarding attitude calculation, the details are as follows:
[0066] The single microcontroller 100 reads the triaxial acceleration and triaxial angular velocity output by the inertial measurement module 300 via SPI. After acquiring a new set of inertial data, the microcontroller executes an attitude calculation algorithm. This embodiment employs a complementary filtering algorithm: first, it uses the angular velocities (gx, gy, gz) output by the gyroscope to perform short-time attitude recursion and update the quaternions; then, it uses the triaxial accelerations (ax, ay, az) output by the accelerometer to calculate the gravity vector direction. After filtering out high-frequency vibration components through a low-pass filter, it compares this with the recursively obtained gravity direction to obtain the error, which is then used to correct the gyroscope drift and the accumulated error of the quaternions. Finally, the roll angle φ and pitch angle θ at the current moment are calculated. In other embodiments, quaternion attitude calculation or extended Kalman filtering can also be used.
[0067] Since the inertial measurement module 300 is rigidly connected to the radar antenna and its installation direction is fixed relative to the radar antenna coordinate system, the installation rotation relationship between the inertial measurement module coordinate system and the radar antenna coordinate system has been determined during assembly or calibration. When calculating the attitude, the single microcontroller 100 converts the attitude of the inertial measurement module into the attitude of the radar antenna coordinate system, that is, it obtains the roll angle φ and pitch angle θ of the radar antenna axis relative to the horizontal plane.
[0068] Regarding radar range calculation, the details are as follows:
[0069] The single microcontroller 100 activates its on-chip ADC according to the aforementioned frequency sweep synchronization signal to acquire a frame of intermediate frequency beat signal. The acquired digital signal is first deDC processed, then a Hanning window is applied to reduce spectral leakage, and then a Fast Fourier Transform (FFT) is performed to obtain the distance spectrum.
[0070] Within a preset measurement range (e.g., 0.5m to 30m), the single microcontroller 100 searches for peaks in the spectrum and extracts at least one candidate echo peak. The beat frequency corresponding to each candidate echo peak is denoted as fb. According to the FMCW radar principle, the beam distance Dr (the distance measured along the radar beam direction) is calculated using the following formula:
[0071] ;
[0072] Where c is the speed of light and S is the FMCW sweep slope. In this embodiment, S is a pre-calibrated constant stored inside the microcontroller. Alternatively, the frequency point or spectral index of the liquid surface echo peak can be directly converted into beam distance Dr based on the distance coefficient obtained from system calibration.
[0073] Regarding dynamic echo trajectory recognition, the details are as follows:
[0074] Reference Figure 4 One of the key improvements of this invention is that the single microcontroller 100 does not directly use the strongest spectral peak in each radar frame as the liquid surface distance, but instead employs a trajectory recognition method. Specifically, the same microcontroller 100 selects the true liquid surface trajectory based on candidate distance continuity, trajectory confidence, and attitude consistency.
[0075] For adjacent radar frames, the microcontroller associates candidate echo peaks that meet a continuity threshold (e.g., a distance difference of less than 0.2m) based on the distance difference between them, forming a candidate echo trajectory that varies over time. Each candidate echo trajectory includes at least a sequence of candidate ranges from multiple consecutive radar frames, and may also include an amplitude sequence.
[0076] Next, the microcontroller fuses the roll angle φ and pitch angle θ corresponding to each radar frame with the candidate echo trajectory. The fusion process is as follows:
[0077] First, based on the current attitude angle, the candidate echo distance is projected onto the gravity direction. The formula for calculating the projected candidate distance Dp is:
[0078] ;
[0079] Where α is the angle between the radar antenna axis and the direction of gravity. In this embodiment, when the radar antenna axis coincides with the direction of gravity in a stationary state of the ship, and the inertial measurement module mounting axis is parallel to the radar antenna axis, the angle α can be calculated based on the roll angle φ and the pitch angle θ as follows:
[0080] ;
[0081] Then, the microcontroller determines whether the projected candidate distance Dp remains continuous between adjacent radar frames (i.e., whether the change is less than a set threshold), and whether the direction and amount of change of the candidate distance are consistent with the ship's attitude change during the same period. For example, when the ship rolls to the right, the radar antenna axis tilts to the right, the beam distance Dr should increase, and the projected Dp should remain basically unchanged; if the direction of Dr change of a candidate trajectory is opposite to the attitude change, then the trajectory is likely to be a false echo (such as the echo of a fixed obstacle such as a bulkhead or pipe).
[0082] For candidate echo trajectories where the number of consecutive frames reaches a set value (e.g., 5 frames), the distance change after projection does not exceed a set threshold, and the trajectories match the attitude change, the microcontroller increases the confidence level of the liquid surface trajectory; for candidate echo trajectories that exhibit irregular jumps, insufficient continuity, or do not match the attitude change, the microcontroller decreases the confidence level of the liquid surface trajectory.
[0083] Finally, the microcontroller selects the candidate echo trajectory with the highest confidence level and that reaches an effective threshold (e.g., 0.8) as the real liquid surface echo trajectory, and uses the candidate distance of this trajectory in the current frame for subsequent fusion distance calculation. Figure 4 The diagram illustrates the comparison between the real liquid surface trajectory (continuous and consistent with the attitude) and the interference trajectory (irregular jumps) among multiple candidate echo trajectories.
[0084] The details regarding the fusion calculation of attitude and echo trajectory are as follows:
[0085] Reference Figure 3 Once the actual liquid surface echo trajectory of the current frame and its corresponding beam distance Dr are determined, the single microcontroller 100 performs attitude compensation calculation. Figure 3 In the diagram, the solid line Dr represents the current liquid surface echo distance, which is the beam distance measured along the radar antenna axis; the dashed line H0 represents the zero-point distance calibrated along the same antenna axis, which is the calibration distance from the radar antenna phase center to the liquid level zero-point reference point.
[0086] First, based on the roll angle φ, pitch angle θ, and the installation rotation relationship between the inertial measurement module and the radar antenna, the angle α between the radar antenna axis and the direction of gravity is calculated. As mentioned earlier, in the simplified case, .
[0087] Then, the beam distance Dr measured along the radar antenna axis is projected onto the gravity direction to obtain the attitude-compensated altitude Dc (projected distance in the gravity direction). The projection relationship is as follows:
[0088] ;
[0089] Similarly, by projecting the calibration zero-point distance H0 (the calibration distance from the radar phase center to the liquid level zero-point reference point, along the antenna axis) onto the gravity direction, we obtain the attitude compensation zero-point distance Hc (projection in the gravity direction). The projection relationship is as follows:
[0090] ;
[0091] Finally, the attitude compensation liquid level Lc is calculated according to the following formula:
[0092] ;
[0093] For tanks where the liquid level zero point is not located on the radar antenna axis or have an irregular shape, the attitude compensation zero point distance in the direction of gravity can be calculated based on the radar installation coordinates, the liquid level zero point coordinates, and the attitude angle, or the liquid level can be obtained using a pre-stored attitude distance calibration table.
[0094] Regarding the stable output based on hull motion intensity, the details are as follows:
[0095] To further improve the stability of the liquid level display, this embodiment also introduces an adaptive filtering mechanism based on the intensity of hull motion.
[0096] The single microcontroller 100 calculates the hull motion intensity M based on the roll angular velocity, pitch angular velocity, and dynamic acceleration after removing the gravity component. The formula for calculating the motion intensity M is:
[0097] ;
[0098] Where adx, ady, and adz are the dynamic accelerations obtained after removing the gravitational component from the triaxial accelerations, and k1 and k2 are pre-set or experimentally calibrated weighting coefficients. In this embodiment, k1 is 0.3 and k2 is 0.7.
[0099] The microcontroller determines the current state based on the motion intensity M: when M is less than the first threshold Th1, it is determined to be a steady state; when M is between Th1 and Th2, it is determined to be a moderate oscillation state; and when M is greater than Th2, it is determined to be a strong oscillation state. Different states correspond to different filter weights β. For example, β=0.8 in the steady state, β=0.5 in the moderate oscillation state, and β=0.2 in the strong oscillation state. The greater the motion intensity, the smaller the value of β, to enhance the stability of the liquid level output; the smaller the motion intensity, the larger the value of β, to improve the response speed to real liquid level changes.
[0100] Then, a first-order recursive filter is applied to the attitude compensation liquid level Lc:
[0101] ;
[0102] Where Lout(n) is the final output liquid level of the current frame, and Lout(n-1) is the output liquid level of the previous frame. In other embodiments, β can also be calculated continuously based on the motion intensity (e.g., using a linear mapping or exponential decay function), and is not limited to three discrete levels. Furthermore, the filtering method can also employ moving average, amplitude-limited averaging, or Kalman filtering.
[0103] Corresponding to the above system, this embodiment also provides an attitude fusion measurement method. (Refer to...) Figure 2 The method includes the following steps:
[0104] In step S1, the millimeter-wave radar transceiver module 200 transmits and receives signals, which are then processed by the analog intermediate frequency conditioning module 400. Finally, the single microcontroller 100 collects the intermediate frequency beat data of each radar frame.
[0105] In step S2, the inertial measurement module 300 collects the three-axis acceleration and three-axis angular velocity, and the single microcontroller 100 reads and calculates the ship attitude angle corresponding to each radar frame.
[0106] In step S3, the single microcontroller 100 performs spectral analysis on the intermediate frequency beat data, extracts at least one candidate echo peak, and calculates the corresponding candidate beam distance.
[0107] In step S4, the single microcontroller 100 correlates the candidate beam distances of multiple consecutive radar frames to form a dynamic echo trajectory, and fuses the dynamic echo trajectory with the ship's attitude angle to identify the real liquid surface echo trajectory.
[0108] Furthermore, step S4 further includes:
[0109] Step S41: Project the candidate beam distance onto the gravity direction according to the hull attitude angle;
[0110] Step S42: Determine whether the continuity and trend of the projected candidate distance between adjacent frames are consistent with the change in attitude angle;
[0111] Step S43: Assign high confidence to candidate echo trajectories that meet the consistency condition, and determine them as true liquid surface echo trajectories.
[0112] In step S5, the single microcontroller 100 calculates the final distance or liquid level value after attitude compensation based on the beam distance of the real liquid surface echo trajectory and the hull attitude angle, and outputs it through the output module 500.
[0113] Furthermore, after step S5, the method further includes:
[0114] Step S6: Calculate the hull motion intensity based on the roll rate, pitch rate, and dynamic acceleration;
[0115] Step S7: Dynamically adjust the filtering weights according to the motion intensity, and perform smooth filtering on the final distance or liquid level value for output.
[0116] Example 2
[0117] The difference between this embodiment and Embodiment 1 is that the inertial measurement module 300 communicates with the single microcontroller 100 via an I2C bus instead of SPI. Because I2C communication is relatively slow, to ensure the real-time nature of the attitude data, the inertial measurement module 300 uses a FIFO (First-In-First-Out) mode to cache multiple sets of inertial data, which are then read in batches by the microcontroller. When reading data, the microcontroller matches the timestamp of each set of data in the FIFO (generated by an internal counter in the inertial measurement module) with the radar frame timestamp.
[0118] Example 3
[0119] The difference between this embodiment and Embodiment 1 is that the attitude calculation uses the Extended Kalman Filter (EKF) algorithm. The microcontroller establishes a state equation that includes quaternions, gyroscope bias, and other state variables, using accelerometer measurements as observations, and obtains the optimal attitude estimate through prediction-update iteration. This algorithm has higher accuracy in high-dynamic scenarios, but it has a larger computational load and is suitable for microcontroller platforms with higher clock speeds.
[0120] The above embodiments of the present invention provide a marine millimeter-wave radar level gauge and its attitude fusion measurement method, which has the following advantages:
[0121] 1) By integrating the inertial measurement module 300 and calculating the ship's roll and pitch angles in real time, the distance measured along the radar beam direction is projected onto the gravity direction, fundamentally eliminating the liquid level conversion error caused by the ship's tilt, so that the measurement results always correspond to the true air height in the gravity direction.
[0122] 2) By using the same timing reference of a single microcontroller 100, the relationship between each frame of radar echo and the attitude angle at the corresponding time is established through radar frame synchronization signal and inertial data ready interrupt, avoiding the additional error caused by using lagging or leading attitude data for compensation.
[0123] 3) Instead of relying on the strongest echo in a single frame, it identifies the real liquid surface echo by the distance continuity, trajectory confidence, and consistency with attitude changes of candidate echoes in multiple consecutive frames. This effectively suppresses false echo interference caused by liquid surface sloshing, fixed obstacles such as bulkheads or pipes, and reduces liquid level jumps and false locking.
[0124] 4) The filtering weight of the liquid level output is dynamically adjusted according to the intensity of the ship's motion (calculated by angular velocity and dynamic acceleration): when the ship is in a stable state, it quickly responds to the actual liquid level changes, and when there is strong swaying, it smoothly outputs and suppresses display fluctuations, thus achieving the best balance between the two working conditions.
[0125] 5) Simply add a low-cost MEMS inertial sensor 300 to the existing millimeter-wave radar level gauge hardware. All data acquisition, attitude calculation, trajectory recognition and fusion calculation are still completed by the original single microcontroller 100. There is no need to replace the main control chip or add a second processor. It is easy to quickly port and mass-produce on mature platforms such as STM32L496.
[0126] 6) The inertial measurement module 300 is built into the liquid level gauge housing and rigidly connected to the radar antenna. It does not rely on the ship's external attitude system or GPS signal. No additional wiring or calibration is required during installation. It is suitable for liquid level monitoring scenarios in various ship compartments.
[0127] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art can make various improvements and equivalent substitutions without departing from the spirit and principles of the present invention, and these improvements and equivalent substitutions should also be considered to fall within the protection scope of the present invention.
Claims
1. A marine millimeter-wave radar level gauge, characterized in that, include: The millimeter-wave radar transceiver module is used to transmit frequency-modulated continuous wave signals and receive liquid surface reflection signals, and output intermediate frequency beat signals. The inertial measurement module, rigidly connected to the radar antenna, is used to output triaxial acceleration and triaxial angular velocity. An analog intermediate frequency conditioning module, connected to the millimeter-wave radar transceiver module, is used to condition the intermediate frequency beat signal; A single microcontroller is connected to both the analog intermediate frequency conditioning module and the inertial measurement module, and the single microcontroller is configured as follows: The radar frame timestamps of the millimeter-wave radar transceiver module and the inertial sampling time of the inertial measurement module are recorded using the same timing reference to establish a synchronization relationship between each radar frame and the corresponding inertial data. Acquire the conditioned intermediate frequency beat signal and perform spectrum analysis on the intermediate frequency beat signal to extract at least one candidate echo peak, and obtain the candidate echo distance for each radar frame based on the candidate echo peak; Read the data from the inertial measurement module, and obtain the inertial data corresponding to each radar frame according to the synchronization relationship, and calculate the hull attitude angle corresponding to each radar frame. The candidate echo distances of multiple consecutive radar frames are correlated according to the distance continuity to form a dynamic echo trajectory composed of the candidate echo peaks of each frame. The dynamic echo trajectory is then fused with the corresponding ship attitude angle to identify the real liquid surface echo trajectory. Based on the beam distance of the actual liquid surface echo trajectory and the ship attitude angle, calculate the final distance or liquid level value after attitude compensation; An output module, connected to the single microcontroller, is used to output the final distance or liquid level value.
2. The marine millimeter-wave radar level gauge according to claim 1, characterized in that, The millimeter-wave radar transceiver module outputs a radar frequency sweep synchronization signal. The timer capture terminal or external interrupt terminal of the single microcontroller receives the synchronization signal and records the radar frame timestamp and the sampling interval of the on-chip analog-to-digital converter accordingly.
3. The marine millimeter-wave radar level gauge according to claim 1 or 2, characterized in that, The inertial measurement module provides inertial sampling data to the single microcontroller via a data-ready interrupt or FIFO method. The single microcontroller records the inertial sampling time using the same timing reference as the timestamp of the recorded radar frame.
4. The marine millimeter-wave radar level gauge according to claim 1, characterized in that, The single microcontroller calculates the ship's attitude angles as follows: The attitude is recursively calculated using the gyroscope angular velocity over a short time, and then corrected using the direction of gravitational acceleration after low-pass processing, to obtain the roll and pitch angles.
5. The marine millimeter-wave radar level gauge according to claim 1, characterized in that, The single microcontroller identifies the real liquid surface echo trajectory in the following way: The candidate echo distance is projected onto the gravity direction based on the ship attitude angle to obtain the projected candidate distance; Determine whether the projected candidate distance is continuous between adjacent radar frames, and whether the direction and amount of change of the candidate distance are consistent with the changes in the ship's attitude during the same period; Candidate echo trajectories that meet the continuity threshold and are consistent with attitude changes are assigned a higher confidence level for the liquid surface trajectory, and the trajectory with the highest confidence level is selected as the true liquid surface echo trajectory.
6. The marine millimeter-wave radar level gauge according to claim 1, characterized in that, The single microcontroller calculates the final distance after attitude compensation in the following way: The angle between the radar antenna axis and the gravity direction is calculated based on the ship's attitude angle, and the beam distance of the real liquid surface echo trajectory is projected onto the gravity direction to obtain the attitude compensation altitude.
7. The marine millimeter-wave radar level gauge according to claim 1, characterized in that, The single microcontroller is also configured to: The intensity of ship motion is calculated based on roll rate, pitch rate and dynamic acceleration. The filter weight is determined based on the motion intensity, and the final distance or liquid level value is recursively filtered, wherein the greater the motion intensity, the smaller the filter weight; The dynamic acceleration is the acceleration obtained by removing the gravitational component from the triaxial acceleration.
8. The marine millimeter-wave radar level gauge according to claim 1, characterized in that, The inertial measurement module is a six-axis or nine-axis inertial sensor and communicates with the single microcontroller via SPI, I2C, UART or CAN bus.
9. An attitude fusion measurement method based on a marine millimeter-wave radar level gauge according to any one of claims 1 to 8, characterized in that, Includes the following steps: Step S1: The signal is transmitted and received through the millimeter-wave radar transceiver module, and after being processed by the analog intermediate frequency conditioning module, the intermediate frequency beat data of each radar frame is collected by a single microcontroller. Step S2: The three-axis acceleration and three-axis angular velocity are collected by the inertial measurement module, and the single microcontroller reads and calculates the hull attitude angle corresponding to each radar frame. Step S3: The single microcontroller performs spectral analysis on the intermediate frequency beat data, extracts at least one candidate echo peak, and calculates the corresponding candidate beam distance. Step S4: The single microcontroller correlates the candidate beam distances of multiple consecutive radar frames to form a dynamic echo trajectory, and fuses the dynamic echo trajectory with the ship's attitude angle to identify the real liquid surface echo trajectory. Step S5: The single microcontroller calculates the final distance or liquid level value after attitude compensation based on the beam distance of the real liquid surface echo trajectory and the hull attitude angle, and outputs it through the output module.
10. The attitude fusion measurement method according to claim 9, characterized in that, Step S4 further includes: Step S41: Project the candidate beam distance onto the gravity direction according to the hull attitude angle; Step S42: Determine whether the continuity and trend of the projected candidate distance between adjacent frames are consistent with the change in attitude angle; Step S43: Assign high confidence to candidate echo trajectories that meet the consistency condition, and determine them as true liquid surface echo trajectories. Following step S5, the following is also included: Step S6: Calculate the hull motion intensity based on the roll rate, pitch rate, and dynamic acceleration; Step S7: Dynamically adjust the filtering weights according to the motion intensity, and perform smooth filtering on the final distance or liquid level value for output.
