Boundary inside and outside identification method for electromagnetic shielding type intelligent mower based on DTW algorithm
By combining autocorrelation filtering and the DTW algorithm, the problem of inaccurate boundary recognition in intelligent lawnmowers under strong interference environments is solved, achieving high-precision boundary recognition with strong anti-interference capabilities and fast computation characteristics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2022-12-06
- Publication Date
- 2026-05-08
AI Technical Summary
Existing intelligent lawnmowers have poor accuracy in identifying boundaries in environments with strong interference, mainly due to inaccurate identification of induced current signal waveforms caused by background noise and inter-system interference.
Autocorrelation filtering is used to suppress background noise, and approximate effective signal waveform segments are cut out. The DTW algorithm is used for matching calculation, and the state inside and outside the boundary is determined by combining the peak-to-peak value and the matching value.
It achieves accurate identification of the boundary inside and outside of the intelligent lawnmower in a strong interference environment, has anti-interference capability, and is accurate and fast in processing.
Smart Images

Figure CN115828065B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data analysis, specifically relating to a method for identifying the boundary inside and outside of an electromagnetically shielded intelligent lawnmower based on the DTW algorithm. Background Technology
[0002] With socio-economic development and the continuous improvement of urban greening, the area of public lawns and private gardens is constantly expanding, leading to a growing demand for lawn maintenance equipment, among which intelligent lawnmowers play a crucial role. Currently, the mainstream method for defining the mowing area using intelligent lawnmowers is electromagnetic shielding. This involves laying a closed-loop cable around the area and transmitting a periodic pulse current signal through the cable. This generates a changing magnetic field within a certain range, causing the inductive probe on the intelligent lawnmower to produce a corresponding induced current. The device extracts the effective waveform segment from the induced current signal and analyzes its characteristics to determine the current location. The extraction and feature analysis of the effective signal waveform from the induced current signal is the most critical step, fundamentally determining the accuracy of the intelligent lawnmower's boundary recognition.
[0003] Current methods for extracting and analyzing effective induced current signal waveforms often employ simple time-domain analysis. This involves pairing the time-domain features of the acquired digital signals to obtain the effective signal waveform range and analyze the internal and external states. This method is only effective in interference-free or weakly interfered environments. In environments with strong interference, the accuracy of boundary identification is poor, reducing the reliability and stability of the intelligent lawnmower. Interference mainly includes background environmental noise and inter-system interference, i.e., the superposition of effective waveforms. Since the induced current signal is periodic and environmental interference noise is mostly white noise, it can be processed using autocorrelation filtering techniques. Then, a dynamic time warping algorithm is used to perform feature matching calculations on the signal. Simultaneously, signal data where effective signal waveforms are superimposed can be added to the matching source to eliminate the influence of inter-system interference, ultimately achieving accurate identification of the boundary and internal / external states of the intelligent lawnmower's current position. Summary of the Invention
[0004] To address the aforementioned problems, this invention provides a method for identifying the boundary inside and outside of an electromagnetically shielded intelligent lawnmower based on the DTW algorithm. The DTW algorithm, or Dynamic Time Warping algorithm, calculates the similarity between two sequences based on dynamic programming principles.
[0005] This invention analyzes the induced current data collected by the inductive probe, uses autocorrelation filtering technology to suppress background noise, and segments out possible valid signal waveforms. Then, it uses the DTW algorithm for matching calculations to obtain accurate boundary inside / outside identification results. This invention combines autocorrelation filtering technology and the DTW matching algorithm to achieve accurate judgment of the boundary inside / outside state of an electromagnetically shielded intelligent lawnmower. This invention can detect and autonomously analyze induced current signals in real time, has strong anti-interference capabilities, and can correctly identify and judge even when valid signal waveforms are superimposed.
[0006] To achieve the above objectives, the present invention includes the following steps:
[0007] A. Establishment of a normal and valid signal library:
[0008] A-1. Record the waveform data of effective signals inside and outside the boundary and the waveform data of signals superimposed by adjacent systems under the condition of no background noise, and establish the members of the normal effective signal library.
[0009] A-2. Classify and label each valid signal in A-1 according to its internal and external characteristics.
[0010] B. Acquisition and preprocessing of the original induced current signal f(n):
[0011] B-1. The intelligent lawnmower periodically samples the induced current signal to obtain f(n).
[0012] B-2, f(n) related feature values acquisition.
[0013] C. Background noise suppression of f(n) and establishment of the approximate effective waveform set f_n(n):
[0014] C-1. Perform autocorrelation filtering on f(n) to suppress background noise and obtain ff(n).
[0015] C-2. Trim ff(n) to extract approximately valid waveform segments.
[0016] C-3. Combine all approximately valid waveform segments into a set f_n(n).
[0017] D. Based on the normal valid signal library, perform matching and output the boundary judgment result:
[0018] D-1. Based on the DTW algorithm, the members of the set f_n(n) are matched with the normal valid signal library in turn to calculate the matching value (cumulative distance).
[0019] D-2. Retain the members with high similarity f_n(n) to form a new set f_n′(n).
[0020] D-3. Calculate the priority value of the members in the set f_n′(n) based on the peak-to-peak value and the matching value.
[0021] D-4. Use the member with the highest priority value as the final reference signal to determine the state inside and outside the boundary.
[0022] The beneficial effects of this invention are as follows: First, a normal effective signal library is established, which contains various effective signals under noise-free conditions, and this library is used as the matching data source. The inductive probe on the intelligent lawnmower collects the induced current data at the current position, and autocorrelation filtering is performed on the current data. Finally, the matching value (cumulative distance) is calculated based on the DTW algorithm, and the priority value is calculated using the peak-to-peak value and the matching value to determine the effective signal member with the highest priority value. The phase of this member is used as the basis for judging whether it is inside or outside the boundary.
[0023] This invention allows for the addition of valid signals from specific scenarios to the normal valid signal library, based on actual conditions. It also utilizes autocorrelation filtering technology to improve the anti-interference capability of the identification. Furthermore, it employs a valid signal matching method based on the DTW algorithm, which offers fast computation speed and accurate matching value calculation, enabling the identification of different types of valid signals and possessing significant engineering value. Attached Figure Description
[0024] Figure 1(a) shows the waveform of the induced current signal;
[0025] Figure 1(b) is a waveform diagram of the effective signal;
[0026] Figure 2 This is a schematic diagram of the overall principle of a boundary identification method for an electromagnetically shielded intelligent lawnmower based on the DTW algorithm.
[0027] Figure 3 This is a flowchart illustrating the principle of a boundary identification method for an electromagnetically shielded intelligent lawnmower based on the DTW algorithm.
[0028] Figure 4(a) is a waveform diagram of an example member of a normal valid signal library (1);
[0029] Figure 4(b) is a waveform diagram of an example member of a normal valid signal library (2);
[0030] Figure 4 c (3) is a waveform diagram of a normal and valid signal library member;
[0031] Figure 4(d) is a waveform diagram of an example member of a normal valid signal library (4);
[0032] Figure 5 This is a schematic diagram of the test scenario;
[0033] Figure 6(a) is a simulation diagram of background noise;
[0034] Figure 6(b) is a simulation diagram of the original signal acoustic waveform;
[0035] Figure 6(c) is the simulation diagram after noise reduction processing;
[0036] Figure 7(a) is a simulation diagram of the matching value calculation of f_nn1(n);
[0037] Figure 7(b) is a simulation diagram of the matching value calculation of f_n2(n). Detailed Implementation
[0038] To make the objectives, technical solutions and advantages of the present invention clearer, a detailed description will be provided below with reference to the accompanying drawings and examples. In the following text, the current data collected by the inductor probe will be converted into voltage, with the unit being volts (V).
[0039] In this invention, a periodic square wave current signal is applied to the boundary line of the corresponding intelligent lawnmower. The changing magnetic field generated by the single-cycle current signal is shown in Figure 1(a) on the inductor probe. Figure 1(b) represents the effective signal, with the signals inside and outside the boundary coil having opposite phases. The overall principle block diagram and overall flowchart of this invention are shown below. Figure 2 and Figure 3 As shown, the specific process is as follows:
[0040] A. Steps for establishing a normal and valid signal library:
[0041] A-1. Record the waveform data of effective signals inside and outside the boundary and the waveform data of signals superimposed between adjacent systems under the condition of no background noise, and establish the members of the normal effective signal library.
[0042] A-2. Classify and label each valid signal in A-1 into internal and external categories.
[0043] In step A-1, the valid signal waveform data under normal conditions is saved to the normal valid signal library. Normal conditions refer to valid signal waveform segments with high signal strength collected by the inductive probe in environments with no or weak background noise. This can include special cases such as waveform superposition. Figures 4(c) and 4(d) illustrate one such waveform superposition case. The normal valid signal library can include other more complex waveform superposition signals and normal valid signals from other special locations or environments to improve recognition accuracy. This invention only describes the normal valid signals in Figures 4(a), 4(b), 4(c), and 4(d).
[0044] Step A-2 involves classifying the signals from A-1. The classification types include signals within the boundary line and signals outside the boundary line. The basis for determining whether a signal is within or outside the boundary line is the phase of the valid signal. This invention stipulates that a positive pulse portion of the valid signal, preceding the negative pulse portion in the time domain, represents signals within the boundary line, while signals with opposite phase represent signals outside the boundary line. Figures 4(a) and 4(c) show valid signals within the boundary line, while Figures 4(b) and 4(d) show valid signals outside the boundary line.
[0045] B. Steps for acquiring and feature obtaining the original induced current signal f(n):
[0046] B-1. The intelligent lawnmower periodically samples the induced current to obtain f(n).
[0047] B-2, f(n) related feature values acquisition.
[0048] In step B-1, the sampling period T a It needs to be greater than the induced current period T c The original digital signal f(n) is obtained by sampling twice.
[0049] T a >2T c
[0050] In step B-2, to facilitate future system debugging, the relevant characteristic values of f(n) are calculated and saved, including the maximum value, minimum value, and mean value.
[0051] C, f(n) Background noise suppression and approximately effective waveform set f _ Steps to establish n(n):
[0052] C-1. Perform autocorrelation filtering on f(n) to suppress background noise and obtain ff(n).
[0053] C-2. Trim ff(n) to extract approximately valid waveform segments.
[0054] C-3. Combine all approximately valid waveform segments into a set f_n(n).
[0055] In step C-1, the original signal f(n) is filtered using autocorrelation filtering technology to obtain ff(n).
[0056] Autocorrelation is the cross-correlation between a signal and itself at different time points. If the original signal is represented as x(t), and τ represents the time-domain offset, the autocorrelation function R(τ) of this signal is expressed as:
[0057]
[0058] If the original signal is a periodic signal with a period of T, its autocorrelation function is still a periodic signal of the same frequency. Therefore, it is not necessary to perform a comparison within the entire number line range (+∞ to -∞), but only a one-period T is required.
[0059]
[0060] For digital signals, the autocorrelation function evolves as follows:
[0061]
[0062] Where N is the number of periodic sequences of the digital signal.
[0063] In real-world environments, background noise is mostly white noise. White noise has a constant variance and a mean of 0. That is, E[s[n]] = 0, E[s[n]] = 0. 2 ]=σ 2 The autocorrelation function of white noise is maximized at zero and rapidly approaches zero as τ increases at other times. Effective signals, containing relatively less noise, also have an autocorrelation function with a maximum at zero, but due to their interrelationships, they exhibit a more regular variation at other times and do not decay rapidly to zero. Periodic signals possess a fixed-period autocorrelation function, thus this method demonstrates significant noise reduction capability.
[0064] In step C-2, the signal ff(n) is truncated. ff(n) may contain multiple valid signal waveform segments, and there may be time-domain superposition of valid signals. Therefore, all approximate signal segments need to be extracted.
[0065] Calculate the mean and Let N be the mean of the sequence of values greater than or equal to 0 in the signal ff(n). + This indicates the length of the sequence. N is the mean of the sequence with values less than 0. - Indicates the length of the sequence:
[0066]
[0067]
[0068] Select greater than or less The signal must be a continuous sequence, and the length of each continuous sequence must be greater than a threshold G, which can be changed according to the length of the valid signal. If no continuous sequence meets the conditions, the final result is determined to be an invalid signal.
[0069] In step C-3, the continuous sequences selected in step C-2 are merged and combined. If the time interval between two continuous sequences is less than T... gap Then the two sequences can be merged and processed, where T gap The maximum time interval for determining whether two consecutive sequences constitute a unified whole. The sequences after merging form a set f_n(n).
[0070] D. Steps for matching based on the normal valid signal library and outputting the boundary judgment result:
[0071] D-1. Based on the DTW algorithm, the members of the set f_n(n) are sequentially matched with the normal valid signal library to calculate the matching value (cumulative distance).
[0072] D-2. Retain the members with high similarity f_n(n) to form a new set f_n′(n).
[0073] D-3. Calculate the priority value of the members in the set f_n′(n) based on the peak-to-peak value and the matching value.
[0074] D-4. Use the member with the highest priority value as the final reference signal to determine the state inside and outside the boundary.
[0075] In step D-1, the DWT algorithm is used. The DWT algorithm calculates the similarity between two time series by extending and shortening the time series. Let Q be one of the signal sequences in the normal valid signal library, and C be one of the signal sequences in f_n(n).
[0076] Q = q1, q2, q3, ... q n
[0077] C = c1, c2, c3, ..., c m
[0078] To align these two sequences, an n×m matrix grid needs to be constructed, where the matrix element (i, j) represents q. i and c j The distance d(q) between two points i c j (That is, the similarity between each point in sequence Q and each point in C; the smaller the distance, the higher the similarity). Generally, the Euclidean distance d(q) is used. i c j )=(q i -c j ) 2 Each matrix element (i, j) represents point q. i and c j Alignment. The shortest path is defined as the rounded path, which can be represented using a sequence as follows:
[0079] W = w1, w2, w3, ... w K max(n, m) ≤ K ≤ n + m - 1
[0080] The reduced path has a defined boundary and possesses continuity and monotonicity, and can be represented as follows:
[0081]
[0082] Finding the resolving path and calculating the cumulative distance (matching value) requires the use of dynamic programming. The cumulative distance is the similarity between two sequences, and the current cumulative distance γ(i,j) represents the current grid point distance d(q). i c j ), that is, point q i and c j The similarity between two sequences is the sum of the Euclidean distance and the cumulative distance of the smallest neighboring element that can reach the point. The smaller the final cumulative distance (matching value) value, the higher the similarity between the two sequences.
[0083] γ(i,j)=d(q) i c j )+min{γ(i-1, j-1), γ(i-1, j), γ(i, j-1)}
[0084] The matching value (cumulative distance) γ of each member in f_n(n) and the members in the normal valid signal library is calculated using the DWT algorithm.
[0085] In step D-2, the member of the normal valid signal library with the highest similarity to each member in f_n(n) is identified and marked, and the corresponding matching value and boundary type of the member in f_n(n) are recorded. A maximum matching threshold ω is set, members with γ≥ω are discarded, and members that meet the conditions are combined into a new set fn′(n).
[0086] In step D-3, each member of set f_n′(n) calculates its priority value based on the signal peak-to-peak value and the matching value, and sorts them according to the priority value. The weight of the peak-to-peak value is ρ1, and the weight of the matching value is ρ2, where:
[0087] ρ1+ρ2=1
[0088] f_n′(n) has a total of h signal members, and the peak-to-peak value of the i-th member is P_P. i Its priority value β i The calculation formula is:
[0089]
[0090] In step D-4, the determination of the member with the highest priority value in step D-3 as the inner and outer type of the boundary is used as the final result. If the set f_n′(n) is empty, it is determined to be an invalid signal.
[0091] Thus, a boundary identification method for electromagnetically shielded intelligent lawnmowers based on the DTW algorithm has been realized. A normal and valid signal library is established, and after filtering and trimming the collected induced current signals, signal waveform matching is performed to finally obtain the boundary identification result of the current position of the intelligent lawnmower.
[0092] Simulation Analysis
[0093] To verify the reliability of the method of this invention, a MATLAB simulation is performed below. The signal data used in this simulation was collected by the inductive probe of a smart lawnmower in a real outdoor wiring scenario. The test scenario is as follows: Figure 5 As shown, the boundary coil area is 10m × 10m, and the probe is located 2m from the boundary. The sampling frequency is 143kHz. The signal actually acquired by the inductive probe contains background noise, as shown in Figure 6(a). The signal generated by the boundary line is the original signal, as shown in Figure 6(b). The acquired signal is denoised using autocorrelation filtering technology, as shown in Figure 6(c). It can be seen that it has a good effect on suppressing background noise, while not destroying the original time-domain properties of the effective signal waveform.
[0094] Calculate the denoised signal ff(n) and in After screening, the approximately valid signal segment sequences include [462, 472], [473, 484], [694, 704], and [705, 719], which, after merging, are as follows:
[0095] f_n(n)={[462, 484], [694, 719]}
[0096] Let the sequence [462, 484] be f_n1(n) and the sequence [694, 719] be f_n2(n). Both are used to calculate the DTW algorithm matching value (cumulative distance) with each member of the normal valid signal library. The results of the operations for f_n1(n) and f_n2(n) are shown in Figures 7(a) and 7(b), respectively. The horizontal axes (a), (b), (c), and (d) in the figures represent the four members of the normal valid signal library, i.e., Figures 4(a), (b), (c), and (d). Finally, priority values are calculated. Taking ω = 2, ρ1 = 0.5, and p2 = 0.5, we get β1 = 1.653792 and β2 = 2.536499. Because β2 > β1, f_n2(n) is the final reference sequence. This sequence type is within the boundary line. Therefore, the current position of the intelligent lawnmower is determined to be within the boundary line, which is consistent with the actual situation.
[0097] Based on the comprehensive simulation results and analysis, it is shown that the boundary identification method for electromagnetically shielded intelligent lawnmowers based on the DTW algorithm proposed in this invention application can autonomously complete the extraction and analysis of effective signals even under strong background noise and mutual interference between systems. It has the characteristics of strong anti-interference ability and high accuracy, and can be applied to the boundary identification and determination of electromagnetically shielded intelligent lawnmowers in different scenarios.
Claims
1. A method for identifying the boundary inside and outside of an electromagnetically shielded intelligent lawnmower based on the DTW algorithm, characterized in that... Includes the following steps: A. Establishment of a normal and valid signal library: A-1. Record the waveform data of effective signals inside and outside the boundary and the waveform data of signals superimposed by adjacent systems under the condition of no background noise, and establish the members of the normal effective signal library; A-2. Classify and label each valid signal in A-1 according to its internal and external characteristics; B. Acquisition and preprocessing of the original induced current signal f(n): B-1. The intelligent lawnmower periodically samples the induced current signal to obtain f(n); B-2, f(n) related feature values acquisition; C. Background noise suppression of f(n) and establishment of the approximate effective waveform set f_n(n): C-1. Perform autocorrelation filtering on f(n) to suppress background noise and obtain ff(n); C-2. Trim ff(n) to extract approximately valid waveform segments; C-3. Combine all approximately valid waveform segments into a set f_n(n); D. Based on the normal valid signal library, perform matching and output the boundary judgment result: D-1. Based on the DTW algorithm, the members of the set f_n(n) are matched with the normal valid signal library in turn to calculate the matching value. D-2. Retain the members with high similarity f_n(n) to form a new set f_n′(n); D-3. Calculate the priority value of the members in the set f_n′(n) based on the peak-to-peak value and the matching value; D-4. Use the member with the highest priority value as the final reference signal to determine the state inside and outside the boundary; In step A-1, the valid signal waveform data under normal conditions is saved to the normal valid signal library. The normal state refers to the valid signal waveform segment with a large signal strength collected by the inductive probe under no background noise or weak background noise. The waveform also includes cases of waveform superposition; In step A-2, the classification of inside and outside is based on the phase of the effective signal. In the effective signal, the positive pulse part precedes the negative pulse part in the time domain, representing the inside of the boundary line, and the signal with the opposite phase represents the outside of the boundary line. In step B-2, the relevant characteristic values of f(n) are calculated and saved, including the maximum value, minimum value, and mean value; In step C-1, if the original signal is represented as x(t), and τ represents the time-domain offset, the autocorrelation function R(τ) of the signal is expressed as: If the original signal is a periodic signal with a period of T, its autocorrelation function is still that of a periodic signal with the same frequency, therefore it only needs to be shifted by one period T: For digital signals, the autocorrelation function evolves as follows: Where N is the number of periodic sequences of the digital signal; In step C-2, the mean is calculated. and Let N be the mean of the sequence of values greater than or equal to 0 in the signal ff(n). + This indicates the length of the sequence. N is the mean of the sequence with values less than 0. - Indicates the length of the sequence: Select greater than or less A continuous sequence of signals must be found, and the length of each continuous sequence must be greater than the threshold G. If there is no continuous sequence that meets the condition, the final result is determined to be an invalid signal. In step C-3, the continuous sequences selected in step C-2 are merged and combined. If the time interval between two continuous sequences is less than T... gap Then the two sequences are merged, where T gap To determine the maximum time interval between two consecutive sequences as a unified whole, the merged sequences are combined into a set f_n(n); In step D-1, the DTW algorithm calculates the similarity between two time series by extending and shortening the time series. Let Q be one signal sequence in the normal valid signal library, and C be one signal sequence in f_n(n): Q=q1,q2,q3,……q n C=c1,c2,c3,……c m Construct an n×m matrix grid, where matrix element (i,j) represents q. i and c j The distance d(q) between two points i ,c j ), using Euclidean distance d(q) i ,c j )=(q i -c j ) 2 Each matrix element (i,j) represents point q. i and c j Alignment, defining the shortest path as the reorganized path, is represented using a sequence as follows: W=w1,w2,w3,……w K max(n,m)≤K≤n+m-1 The reduced path has a defined boundary and possesses continuity and monotonicity, and can be represented as follows: The cumulative distance is the similarity between two sequences. The current cumulative distance γ(i,j) represents the distance d(q) between the current grid points. i ,c j ), that is, point q i and c j The sum of the Euclidean distance to the point and the cumulative distances to the smallest neighboring element reaching that point: γ(i,j)=d(q i ,c j )+min{γ(i-1,j-1),γ(i-1,j),γ(i,j-1)} The matching value γ of each member in f_n(n) and the members in the normal valid signal library is calculated by using the DWT algorithm; In step D-2, the member of the normal valid signal library with the highest similarity to each member in f_n(n) is identified and marked, and the corresponding matching value and boundary type of the member in f_n(n) are recorded. Set a maximum matching threshold ω, discard members with γ≥ω, and combine the members that meet the conditions into a new set f_n′(n); In step D-3, each member of set f_n′(n) calculates its priority value based on the signal peak-to-peak value and the matching value, and sorts them according to the priority value. The weight of the peak-to-peak value is ρ1, and the weight of the matching value is ρ2, where: ρ1+ρ2=1 f_n′(n) has a total of h signal members, and the peak-to-peak value of the i-th member is P_P. i Its priority value β i The calculation formula is: In step D-4, the determination of the member with the highest priority value in step D-3 as the inner and outer type of the boundary is used as the final result. If the set f_n′(n) is empty, it is determined to be an invalid signal.
2. The method for identifying the boundary inside and outside of an electromagnetically shielded intelligent lawnmower based on the DTW algorithm according to claim 1, characterized in that: In step B-1, the sampling period T a Greater than the induced current period T c double.
3. The method for identifying the boundary inside and outside of an electromagnetically shielded intelligent lawnmower based on the DTW algorithm according to claim 1, characterized in that: In step C-2, the threshold G is changed according to the effective signal length.
Citation Information
Patent Citations
Intelligent mowing system
CN113552874A
Mechanical system voiceprint signal matching method based on dynamic time bending algorithm
CN113889147A