Water depth measurement method and device, electronic equipment and storage medium
By segmenting and processing the variance and slope of the echo signal, and selecting the signal that meets the threshold as the target echo signal, the problem of interference from aquatic plants and suspended matter in shallow water areas is solved, and the accuracy and stability of water depth measurement are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 河北望道地理信息有限公司
- Filing Date
- 2026-04-03
- Publication Date
- 2026-05-29
AI Technical Summary
In shallow, slow-flowing areas, the presence of aquatic plants and suspended matter can lead to errors in bottom echo tracking and distortion in depth measurement using ultrasonic depth sounding technology.
By segmenting the echo signal, calculating the variance and slope of each segment, selecting the signal whose variance and slope meet the threshold as the target echo signal, determining the ultrasonic receiving time, and eliminating noise interference from aquatic plants and suspended objects, the accurate identification of underwater echoes is ensured.
This improves the accuracy of water depth measurement, avoids misjudgments due to clutter interference, ensures the accuracy of ultrasonic wave reception time, and thus obtains accurate water depth measurement results.
Smart Images

Figure CN122110134A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of hydrological measurement technology, and more specifically, relates to a method and device for measuring water depth, electronic equipment, and storage medium. Background Technology
[0002] Channel depth is a core parameter for river management, waterway maintenance, and safety monitoring of hydraulic structures. Shipborne echo sounding technology, with its advantages of high measurement efficiency, wide operating range, and continuous onboard observation capabilities, has become the mainstream method for on-site channel depth monitoring. Its working principle is as follows: ultrasonic transducers mounted on the ship emit ultrasonic signals downwards. The ultrasonic waves propagate in the water and are reflected off the seabed to form echoes. The system calculates the channel depth by detecting the time difference between ultrasonic wave transmission and reception, combined with the sound wave propagation speed.
[0003] However, in shallow, slow-flowing areas, a large amount of aquatic plants easily grow in the water, and there is a lot of silt and suspended matter. As the ultrasonic waves propagate downwards, they will form strong clutter reflections on the interfering objects such as aquatic plants and suspended matter, which will cause errors in bottom echo tracking and distortion of bottom depth measurement. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a method and apparatus for measuring water depth, an electronic device, and a storage medium, thereby improving the accuracy of water depth measurement.
[0005] The embodiments of this application disclose the following technical solutions: In a first aspect, a method for measuring water depth is provided, applied to a water depth measurement system mounted on the hull of a vessel in a target water area. The water depth measurement system includes an ultrasonic transmitting unit and an ultrasonic receiving unit, both communicatively connected to a controller. The method is executed by the controller and includes: Output an ultrasonic wave transmission signal to control the ultrasonic wave transmission unit to emit an ultrasonic wave signal; In response to receiving the echo signal returned by the ultrasonic receiving unit, the echo signal is segmented along the time axis, and the variance and slope of each segment are calculated. Based on the variance and slope of each segment, the earliest corresponding signal with a variance less than a preset variance threshold and a slope less than a preset slope threshold is selected from the multiple segmented echo signals as the target echo signal. The ultrasonic receiving time is determined based on the time period corresponding to the target echo signal. The echo signal is the signal returned by the ultrasonic receiving unit after receiving the reflected signal of the ultrasonic signal. Calculate the first time difference between the ultrasonic wave reception time and the ultrasonic wave transmission time; The propagation path of the ultrasonic signal is determined based on the first time difference and the preset ultrasonic propagation speed. The current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal.
[0006] Secondly, a water depth measuring device is provided, disposed in a controller. The controller is applied to a water depth measuring system mounted on the hull of a vessel in a target water area. The water depth measuring system further includes an ultrasonic transmitting unit and an ultrasonic receiving unit respectively communicatively connected to the controller. The device comprises: A signal output module is used to output an ultrasonic transmission signal to control the ultrasonic transmission unit to emit an ultrasonic signal; The signal receiving module is used to, upon receiving the echo signal returned by the ultrasonic receiving unit, segment the echo signal along the time axis, calculate the variance and slope of each segment of the echo signal; based on the variance and slope of each segment of the echo signal, select the earliest corresponding signal from the multiple segmented echo signals, with a variance less than a preset variance threshold and a slope less than a preset slope threshold, as the target echo signal; determine the ultrasonic receiving time based on the time period corresponding to the target echo signal; the echo signal is the signal returned by the ultrasonic receiving unit after receiving the reflected signal of the ultrasonic signal; The time difference calculation module is used to calculate the first time difference between the ultrasonic wave reception time and the ultrasonic wave transmission time. The path calculation module is used to determine the propagation path of the ultrasonic signal based on the first time difference and the preset ultrasonic propagation speed; A depth measurement module is used to determine the current depth measurement result of the target water area based on the propagation path of the ultrasonic signal.
[0007] Thirdly, embodiments of this application also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the water depth measurement method provided by any possible implementation of the first aspect.
[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the water depth measurement method provided by any possible implementation of the first aspect.
[0009] The beneficial effects of the technical solution provided in this application are as follows: Compared with related technologies, the water depth measurement method, apparatus, electronic device, and storage medium provided in this application embodiment take into account the scattered reflective interfaces of interfering objects such as aquatic plants and suspended matter, which cause the corresponding echo signals to fluctuate violently and have many spikes, resulting in a large variance; and the rise edge of the echo signal is steep and abrupt, resulting in a large slope. In contrast, the underwater reflective surface is continuous and flat, resulting in a stable and smooth waveform of the reflected signal, thus the echo signal has small fluctuations and high stability, resulting in a small variance; at the same time, the rise edge of the echo signal is gentle, resulting in a small slope. Therefore, after receiving the echo signal, this application embodiment segments the echo signal along the time axis and calculates the variance and slope of each segment, using these two as characteristic criteria to distinguish between interfering signal echoes and underwater echoes. Among the multiple segments of echo signals, the earliest echo signal segment that simultaneously satisfies the condition that its variance is less than a variance threshold and its slope is less than a slope threshold is selected as the earliest true underwater echo, thereby determining the ultrasonic wave reception time. Using the above method, the interference from aquatic plants and suspended objects in front can be effectively eliminated, avoiding misjudging the interference echo as the bottom echo, ensuring the accuracy of the ultrasonic wave reception time, and thus obtaining accurate water depth measurement results. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart of a water depth measurement method provided in the embodiments of this application; Figure 2 A schematic diagram of the tilt angle provided for an embodiment of this application; Figure 3 A structural block diagram of the water depth measuring device provided in the embodiments of this application; Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0013] It should be noted that the terms "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Unless the context clearly indicates otherwise, the singular forms "a," "one," or "the," etc., do not indicate a quantity limitation, but rather indicate the presence of at least one. The quantities of "multiple" or "multiple copies" mentioned in the embodiments of this application all refer to a quantity of "at least two," for example, "multiple" means "at least two," and "multiple copies" means "at least two copies." The terms "comprising" and "having," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusion. The term "and / or" as used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0014] like Figure 1 As shown in the embodiments of this application, the water depth measurement method is applied to a water depth measurement system. The water depth measurement system is mounted on the hull of a vessel in the target water area. The water depth measurement system includes an ultrasonic transmitting unit and an ultrasonic receiving unit that are respectively communicatively connected to a controller. The controller can be the executing entity for each step in the water depth measurement method. The method may include: S101: Outputs ultrasonic transmission signal to control the ultrasonic transmission unit to emit ultrasonic signal.
[0015] In this embodiment, the ultrasonic transmitting unit is usually located at the bottom of the hull. The controller can output ultrasonic transmission signals to the ultrasonic transmitting unit according to a preset time period (e.g., 0.2s). When the ultrasonic transmitting unit receives the signal, it emits ultrasonic signals towards the bottom of the water.
[0016] S102: In response to receiving the echo signal returned by the ultrasonic receiving unit, the echo signal is segmented along the time axis, and the variance and slope of each segment are calculated; based on the variance and slope of each segment, the earliest corresponding signal with a variance less than a preset variance threshold and a slope less than a preset slope threshold is selected from the multiple segmented echo signals as the target echo signal; the ultrasonic receiving time is determined based on the time period corresponding to the target echo signal; the echo signal is the signal returned by the ultrasonic receiving unit after receiving the reflected signal of the ultrasonic signal.
[0017] In this embodiment, the ultrasonic receiving unit and the ultrasonic transmitting unit can be integrated inside the same ultrasonic transducer. The two are installed side by side on the bottom of the ship, with the transmitting and receiving directions both vertically downward. The ultrasonic signal emitted by the ultrasonic transmitting unit propagates in the water and is reflected by the bottom or obstacles in the water to form an echo. The echo is received by the ultrasonic receiving unit and converted into an echo signal in the form of an electrical signal, which is then uploaded to the controller.
[0018] As ultrasonic signals propagate underwater, they are reflected sequentially by various reflective objects such as aquatic plants, suspended objects, and the seabed, forming echo signals that arrive in chronological order. Among these, aquatic plants and suspended objects closer to the surface are closer to the ultrasonic receiving unit, and their corresponding echo signals appear earlier on the timeline; the seabed is furthest from the ultrasonic receiving unit, and its corresponding echo appears later on the timeline.
[0019] Considering the scattered reflective surfaces of interfering objects such as aquatic plants and suspended matter, the corresponding echo signals fluctuate violently and have many spikes, resulting in a large variance; the rise time of the echo signal is also steep and abrupt, resulting in a large slope. In contrast, the underwater reflective surface is continuous and flat, resulting in a stable and smooth waveform, thus exhibiting small fluctuations and high stability, with a smaller variance; the rise time of the echo signal is also gentle, resulting in a smaller slope. Therefore, in this embodiment, after receiving the echo signal, the echo signal is segmented along the time axis, and the variance and slope of each segment are calculated. Variance characterizes the degree of fluctuation in the echo signal, and slope characterizes the steepness of the rise time of the echo signal. These two factors are used as characteristic criteria to distinguish between interfering signal echoes and underwater echoes. Among the multiple echo signal segments, the earliest echo signal segment that simultaneously satisfies both a variance less than a variance threshold and a slope less than a slope threshold is selected as the earliest true underwater echo. This echo signal segment is used as the target echo signal to determine the ultrasonic wave reception time. For example, the midpoint of the time period corresponding to the target echo signal can be used as the ultrasonic receiving time.
[0020] Using the above method, the interference from aquatic plants and suspended objects in front can be effectively eliminated, avoiding misjudging the interference echo as the bottom echo and ensuring the accuracy of the ultrasonic wave reception time.
[0021] S103: Calculate the first time difference between the ultrasonic wave reception time and the ultrasonic wave transmission time.
[0022] In this embodiment, the ultrasonic emission time is the time when the ultrasonic transmitting unit emits an ultrasonic signal, and the ultrasonic receiving time is the time when the ultrasonic receiving unit receives the echo signal. By calculating the time difference between the two times, the first time difference is used as the first time difference. The first time difference can characterize the total round-trip propagation time of the ultrasonic signal from the transmitting unit, through the water to the bottom, and then reflected back to the ultrasonic receiving unit.
[0023] S104: Determine the propagation path of the ultrasonic signal based on the first time difference and the preset ultrasonic propagation speed.
[0024] In this embodiment, by multiplying the first time difference by a preset ultrasonic propagation speed (e.g., 1480 m / s), the total round-trip propagation path of the ultrasonic signal from transmission to reception can be obtained, which is the propagation path of the ultrasonic signal.
[0025] S105: Determine the current depth measurement result of the target water area based on the propagation path of the ultrasonic signal.
[0026] In this embodiment, assuming that both the ultrasonic transmitting unit and the ultrasonic receiving unit are vertically downward and installed close together, the ultrasonic signal can be considered to propagate along a path approximately perpendicular to the bottom of the water. In this case, the depth of the target water area is equal to half the propagation path of the ultrasonic signal. Therefore, dividing the propagation path of the ultrasonic signal by 2 yields the current depth measurement result of the target water area.
[0027] As can be seen from the above, this embodiment considers that the scattered reflective interfaces of interfering objects such as aquatic plants and suspended matter result in violent fluctuations and numerous spikes in the corresponding echo signals, exhibiting a large variance (the variance between signal sampling values at multiple moments in the echo signal); and the rise of the echo signal is steep and abrupt, exhibiting a large slope. In contrast, the underwater reflective surface is continuous and flat, resulting in stable and smooth reflected signals, thus exhibiting small fluctuations and high stability, exhibiting a small variance; and the rise of the echo signal is gentle, exhibiting a small slope. Therefore, this embodiment, after receiving the echo signal, segments the echo signal along the time axis, calculates the variance and slope of each segment, and uses these two as characteristic criteria to distinguish between interfering signal echoes and underwater echoes. Among the multiple segments of echo signals, the earliest echo signal segment that simultaneously satisfies both a variance less than a variance threshold and a slope less than a slope threshold is selected as the earliest true underwater echo, thereby determining the ultrasonic wave reception time. Using the above method, the interference from aquatic plants and suspended objects in front can be effectively eliminated, avoiding misjudging the interference echo as the bottom echo, ensuring the accuracy of the ultrasonic wave reception time, and thus obtaining accurate water depth measurement results.
[0028] In one embodiment of this application, the echo signal includes signal sample values at multiple times; segmenting the echo signal along the time axis includes: Echo curves were plotted based on signal sample values at multiple times. Determine multiple minimum points of the echo curve; The echo signal is segmented based on the time corresponding to multiple minimum points; where each pair of adjacent minimum points is a segment of the echo signal.
[0029] In this embodiment, the ultrasonic signal emitted by the ultrasonic transmitting unit is a short-time detection pulse. When the short-time detection pulse propagates in water, it will be reflected multiple times by aquatic plants, suspended objects, and objects at different depths and interfaces such as the bottom of the water, forming multiple reflected echoes arranged sequentially on the time axis.
[0030] The controller can sample the echo signal at multiple consecutive moments using its internal analog-to-digital converter (ADC module), obtaining the signal sample values of the echo signal at multiple moments. Based on the signal sample values at multiple moments, an echo curve is plotted, and the echo curve is filtered to remove noise and glitches, resulting in a smooth echo curve. Moments on the echo curve where the corresponding signal sample value is less than the adjacent sampling moments are selected as minimum points. These minimum points are the boundary points between two adjacent reflected echoes. Therefore, by using each minimum point as a boundary point, the entire echo curve can be divided into multiple reflected echo segments along the time axis, and each reflected echo segment is considered as an echo signal segment.
[0031] As can be seen from the above, this embodiment can separate multiple reflected echoes formed by different objects by drawing echo curves and using the minimum points on the echo curves as dividing points to segment the echo curves. This is beneficial for accurately identifying the real underwater echoes from the multiple reflected echoes.
[0032] In one embodiment of this application, for each echo signal segment, the slope of that echo signal segment is calculated, including: The maximum value of the signal sampled values at multiple times in the echo signal segment is determined as the signal peak value, and the time corresponding to the signal peak value is taken as the peak time. Starting from the peak moment, select the first corresponding moment when the signal sample value is less than the sampling threshold as the start moment of the rise; Calculate the second time difference between the start of the rise and the peak time; The slope of the echo signal segment is determined based on the second time difference; wherein the slope of the echo signal segment is negatively correlated with the second time difference.
[0033] In this embodiment, the signal sampling value of each echo signal gradually rises from low to high to the maximum, and then gradually decays. For each echo signal, the sampling threshold can be set to 10% of the signal peak value. By calculating the time it takes for the signal sampling value of the echo signal to rise from the sampling threshold to the signal peak value (i.e., the second time difference), the steepness of the rising edge of the echo signal segment can be characterized, i.e., the slope of the echo signal segment.
[0034] Specifically, for each echo signal segment, the maximum value among multiple sampled values of the echo signal segment can be found first and taken as the signal peak value. The time corresponding to the maximum value is recorded as the peak time. Then, taking the peak time as the starting point, the first time that is less than the preset sampling threshold is selected as the rise start time. The second time difference between the rise start time and the peak time is calculated. The larger the second time difference, the smoother the process of the echo signal rising from the sampling threshold to the signal peak value, the slower the rise edge, and the smaller the corresponding slope. The smaller the second time difference, the faster the echo signal rises to the signal peak value in a short time, the steeper the rise edge, and the larger the corresponding slope.
[0035] In one embodiment of this application, determining the current depth measurement result of a target water area based on the propagation path of an ultrasonic signal includes: Acquire the ship's attitude information at the moment of ultrasonic wave emission; the attitude information includes roll angle and pitch angle. The tilt angle is determined based on the pose information; the tilt angle is the angle between the actual propagation path of the ultrasonic signal and the vertical direction. The current depth measurement result of the target water area is determined based on the propagation path and tilt angle of the ultrasonic signal.
[0036] In this embodiment, considering that the hull is easily affected by water flow, waves, etc. during the measurement process, it will cause the ultrasonic wave emission direction to deviate from the vertical direction, resulting in the actual propagation path of the ultrasonic signal being an inclined path rather than a vertical path perpendicular to the bottom of the water. If the water depth is calculated directly according to the vertical propagation path, a large measurement error will occur.
[0037] Therefore, this scheme acquires the ship's attitude information simultaneously with the ultrasonic wave transmission. This attitude information includes the ship's roll and pitch angles, both of which can be obtained using a gyroscope. The ship's tilt angle can be calculated from the roll and pitch angles; this tilt angle is the angle between the actual propagation path of the ultrasonic wave and the vertical direction.
[0038] For example, determining the tilt angle based on pose information includes: The tilt angle is determined using the following formula: ; in, Indicates the tilt angle. Indicates the roll angle. Indicates the pitch angle.
[0039] The derivation of the above formula is as follows: Assuming the unit vector in the vertical direction is (0, 0, 1), the unit vector of the transducer normal after roll φ and pitch θ (that is, the unit vector of the actual propagation direction of the ultrasonic wave) is: (sinθ, sinθ) cosθ,cos cosθ), the dot product of the two vectors above is: ; Furthermore, according to the definition of the dot product of vectors in spatial analytic geometry, for any two vectors and Their vector dot product is: ; in, and They represent the lengths of the vectors, It represents the angle between two vectors.
[0040] In this embodiment, it is assumed that Let be the unit vector in the vertical direction. This is the unit vector representing the actual propagation direction of the ultrasonic wave. and The length of each vector is 1, therefore, we can obtain: ; Simplifying, we get: ; Therefore, using the above formula, the roll angle and pitch angle of the ship can be calculated. .
[0041] like Figure 2 As shown, after obtaining Based on the propagation path of the ultrasonic signal, the true water depth perpendicular to the horizontal plane (i.e., the current depth measurement result of the target water area) can be calculated using trigonometric functions: ; in, This indicates the current depth measurement result of the target water area. This indicates the propagation path of an ultrasonic signal.
[0042] In one embodiment of this application, determining the current depth measurement result of the target water area based on the propagation path and tilt angle of the ultrasonic signal includes: If the tilt angle is less than or equal to the preset included angle threshold, the current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal and the tilt angle.
[0043] In this embodiment, it is considered that when the tilt angle is too large, it indicates that the hull is swaying too much, and the ultrasonic signal is likely to irradiate non-bottom areas such as the shore and reefs, resulting in the echo signal not being a true bottom echo signal, thus leading to inaccurate current depth measurement results.
[0044] To avoid the above problems, this embodiment pre-sets an included angle threshold. When the tilt angle is greater than the preset included angle threshold, the measurement is deemed invalid and the water depth is no longer calculated. When the tilt angle is less than or equal to the preset included angle threshold, the measurement is deemed valid, and the current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal and the tilt angle.
[0045] Furthermore, during multiple consecutive measurements, several valid current depth measurement results can be selected, and the average value of these results can be calculated. This average value can then be used as the current depth measurement result for the target water area, thereby reducing errors caused by fluctuations in a single measurement and improving the stability and accuracy of water depth measurement.
[0046] In one embodiment of this application, the water depth measurement method further includes: In response to the ship reaching the preset calibration area within the target waters, the water depth calibration value of the preset calibration area is obtained; The depth correction coefficient is obtained by calculating the ratio of the calibrated depth value of the water area to the current depth measurement result of the target water area. The current depth measurement results of the target water area are corrected based on the depth correction factor; The corrected current depth measurement result will be used as the final current depth measurement result.
[0047] In this embodiment, multiple calibration areas are usually pre-set in the target water area. The water depth of the calibration area is a known and accurate water depth, which can be used as the water depth calibration value of the corresponding area.
[0048] When the vessel reaches the pre-defined calibration area, the calculated current depth measurement result can be compared with the water depth calibration value. For example, the ratio of the water depth calibration value to the current depth measurement result of the target water area can be calculated as a depth correction coefficient. The correction coefficient can characterize the degree to which the ultrasonic wave propagation speed is affected by changes in water temperature, salinity, or water quality. Therefore, by using the depth correction coefficient to correct the current depth measurement result and using the corrected value as the final current depth measurement result, the accuracy of water depth measurement can be further improved.
[0049] Based on the same principle as the water depth measurement method provided in the embodiments of this application, the embodiments of this application also provide a water depth measurement device, which is installed in a controller. The controller is applied to the water depth measurement system, which is mounted on the hull of a vessel in the target water area. The water depth measurement system also includes an ultrasonic transmitting unit and an ultrasonic receiving unit that are respectively communicatively connected to the controller. Figure 3As shown, the water depth measuring device 20 may specifically include: a signal output module 21, a signal receiving module 22, a time difference calculation module 23, a distance calculation module 24, and a depth measurement module 25.
[0050] Among them, the signal output module 21 is used to output ultrasonic transmission signals to control the ultrasonic transmission unit to emit ultrasonic signals; The signal receiving module 22 is used to segment the echo signal along the time axis when it receives the echo signal returned by the ultrasonic receiving unit, and calculate the variance and slope of each segment of the echo signal; based on the variance and slope of each segment of the echo signal, select the earliest corresponding signal from the multiple segments of the echo signal, and the signal with a variance less than a preset variance threshold and a slope less than a preset slope threshold, as the target echo signal; determine the ultrasonic receiving time based on the time period corresponding to the target echo signal; the echo signal is the signal returned by the ultrasonic receiving unit after receiving the reflected signal of the ultrasonic signal; Time difference calculation module 23 is used to calculate the first time difference between the ultrasonic wave reception time and the ultrasonic wave transmission time; The path calculation module 24 is used to determine the propagation path of the ultrasonic signal based on the first time difference and the preset ultrasonic propagation speed. The depth measurement module 25 is used to determine the current depth measurement result of the target water area based on the propagation path of the ultrasonic signal.
[0051] In one embodiment of this application, the echo signal includes signal sample values at multiple times; the signal receiving module 22 is specifically used for: Echo curves were plotted based on signal sample values at multiple times. Determine multiple minimum points of the echo curve; The echo signal is segmented based on the time corresponding to multiple minimum points; where each pair of adjacent minimum points is a segment of the echo signal.
[0052] In one embodiment of this application, for each echo signal segment, the signal receiving module 22 is specifically used for: The maximum value of the signal sampled values at multiple times in the echo signal segment is determined as the signal peak value, and the time corresponding to the signal peak value is taken as the peak time. Starting from the peak moment, select the first corresponding moment when the signal sample value is less than the sampling threshold as the start moment of the rise; Calculate the second time difference between the start of the rise and the peak time; The slope of the echo signal segment is determined based on the second time difference; wherein the slope of the echo signal segment is negatively correlated with the second time difference.
[0053] In one embodiment of this application, the depth measurement module 25 is specifically used for: Acquire the ship's attitude information at the moment of ultrasonic wave emission; the attitude information includes roll angle and pitch angle. The tilt angle is determined based on the pose information; the tilt angle is the angle between the actual propagation path of the ultrasonic signal and the vertical direction. The current depth measurement result of the target water area is determined based on the propagation path and tilt angle of the ultrasonic signal.
[0054] In one embodiment of this application, the depth measurement module 25 is further configured to: The tilt angle is determined using the following formula: ; in, Indicates the tilt angle. Indicates the roll angle. Indicates the pitch angle.
[0055] In one embodiment of this application, the depth measurement module 25 is further configured to: If the tilt angle is less than or equal to the preset included angle threshold, the current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal and the tilt angle.
[0056] In one embodiment of this application, the depth measurement module 25 is specifically used for: In response to the ship reaching the preset calibration area within the target waters, the water depth calibration value of the preset calibration area is obtained; The depth correction coefficient is obtained by calculating the ratio of the calibrated depth value of the water area to the current depth measurement result of the target water area. The current depth measurement results of the target water area are corrected based on the depth correction factor; The corrected current depth measurement result will be used as the final current depth measurement result.
[0057] This application provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this application.
[0058] In one alternative embodiment, an electronic device is provided, such as Figure 4 As shown, Figure 4The illustrated electronic device 300 includes a processor 301 and a memory 303. The processor 301 and the memory 303 are connected, for example, via a bus 302. Optionally, the electronic device 300 may further include a transceiver 304, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 304 is not limited to one type, and the structure of this electronic device 300 does not constitute a limitation on the embodiments of this application.
[0059] Processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 301 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0060] Bus 302 may include a pathway for transmitting information between the aforementioned components. Bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 302 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0061] The memory 303 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0062] The memory 303 is used to store computer programs that execute the embodiments of this application, and the execution is controlled by the processor 301. The processor 301 is used to execute the computer programs stored in the memory 303 to implement the steps shown in the foregoing method embodiments.
[0063] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one computer program, which is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-described water supply pipe monitoring methods.
[0064] In one possible implementation, the aforementioned computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), a compact disc read-only memory (CD-ROM), magnetic tape, a floppy disk, and an optical data storage device, etc. The random access memory can include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0065] In an exemplary embodiment, a computer program or computer program product is also provided, which includes computer instructions loaded and executed by a processor to enable the computer to implement any of the above-described water supply pipe monitoring methods.
[0066] It should be further noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The implementation methods described in the above exemplary embodiments do not represent all implementation methods consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application.
[0067] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0068] Furthermore, the step numbers described herein are merely illustrative of one possible execution order between steps. In some other embodiments, the steps may not be executed in the order of their numbers, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.
[0069] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. Optionally, the program is stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0070] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for measuring water depth, characterized in that, An application is made in a water depth measurement system, the system being mounted on the hull of a vessel in a target water area. The system includes an ultrasonic transmitting unit and an ultrasonic receiving unit, both communicatively connected to a controller. The method is executed by the controller and includes: Output an ultrasonic wave transmission signal to control the ultrasonic wave transmission unit to emit an ultrasonic wave signal; In response to receiving the echo signal returned by the ultrasonic receiving unit, the echo signal is segmented along the time axis, and the variance and slope of each segment are calculated. Based on the variance and slope of each segment, the earliest corresponding signal with a variance less than a preset variance threshold and a slope less than a preset slope threshold is selected from the multiple segmented echo signals as the target echo signal. The ultrasonic receiving time is determined based on the time period corresponding to the target echo signal. The echo signal is the signal returned by the ultrasonic receiving unit after receiving the reflected signal of the ultrasonic signal. Calculate the first time difference between the ultrasonic wave reception time and the ultrasonic wave transmission time; The propagation path of the ultrasonic signal is determined based on the first time difference and the preset ultrasonic propagation speed. The current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal.
2. The water depth measurement method as described in claim 1, characterized in that, The echo signal includes signal sample values at multiple times; the step of segmenting the echo signal along the time axis includes: Echo curves were plotted based on the signal sampling values at the aforementioned multiple times. Determine multiple minimum points of the echo curve; The echo signal is segmented based on the time corresponding to the multiple minimum points; wherein, each pair of adjacent minimum points is a segment of the echo signal.
3. The water depth measurement method as described in claim 1, characterized in that, For each echo signal segment, calculate the slope of that echo signal segment, including: The maximum value of the signal sampled values at multiple times in the echo signal segment is determined as the signal peak value, and the time corresponding to the signal peak value is taken as the peak time. Starting from the peak time, the first corresponding time when the signal sample value is less than the sampling threshold is selected backward as the rise start time; Calculate the second time difference between the start time of the rise and the peak time; The slope of the echo signal segment is determined based on the second time difference; wherein the slope of the echo signal segment is negatively correlated with the second time difference.
4. The water depth measurement method as described in claim 1, characterized in that, The measurement result for determining the current depth of the target water area based on the propagation path of the ultrasonic signal includes: Acquire the ship's attitude information at the moment of ultrasonic wave transmission; the attitude information includes roll angle and pitch angle. The tilt angle is determined based on the pose information; the tilt angle is the angle between the actual propagation path of the ultrasonic signal and the vertical direction. The current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal and the tilt angle.
5. The water depth measurement method as described in claim 4, characterized in that, Determining the tilt angle based on the pose information includes: The tilt angle is determined using the following formula: ; in, Indicates the tilt angle. Indicates the roll angle. Indicates the pitch angle.
6. The water depth measurement method as described in claim 4, characterized in that, The measurement result for determining the current depth of the target water area based on the propagation path of the ultrasonic signal and the tilt angle includes: If the tilt angle is less than or equal to a preset included angle threshold, the current depth measurement result of the target water area is determined based on the propagation path of the ultrasonic signal and the tilt angle.
7. The method for measuring water depth as described in claim 1, characterized in that, Also includes: In response to the hull reaching a preset calibration area within the target water area, the water depth calibration value of the preset calibration area is obtained; The depth correction coefficient is obtained by calculating the ratio of the calibrated depth value of the water area to the current depth measurement result of the target water area. The current depth measurement result of the target water area is corrected based on the depth correction coefficient; The corrected current depth measurement result will be used as the final current depth measurement result.
8. A water depth measuring device, characterized in that, The device includes a controller for a water depth measurement system mounted on a vessel in the target water area. The water depth measurement system further includes an ultrasonic transmitting unit and an ultrasonic receiving unit, both communicatively connected to the controller. A signal output module is used to output an ultrasonic transmission signal to control the ultrasonic transmission unit to emit an ultrasonic signal; The signal receiving module is used to, upon receiving the echo signal returned by the ultrasonic receiving unit, segment the echo signal along the time axis, calculate the variance and slope of each segment of the echo signal; based on the variance and slope of each segment of the echo signal, select the earliest corresponding signal from the multiple segmented echo signals, with a variance less than a preset variance threshold and a slope less than a preset slope threshold, as the target echo signal; determine the ultrasonic receiving time based on the time period corresponding to the target echo signal; the echo signal is the signal returned by the ultrasonic receiving unit after receiving the reflected signal of the ultrasonic signal; The time difference calculation module is used to calculate the first time difference between the ultrasonic wave reception time and the ultrasonic wave transmission time. The path calculation module is used to determine the propagation path of the ultrasonic signal based on the first time difference and the preset ultrasonic propagation speed; A depth measurement module is used to determine the current depth measurement result of the target water area based on the propagation path of the ultrasonic signal.
9. An electronic device, characterized in that, The electronic device includes a processor and a memory: The memory is used to store computer programs; The processor is configured to execute the water depth measurement method according to any one of claims 1-7 according to the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program that, when executed by an electronic device, performs the water depth measurement method according to any one of claims 1-7.