A robot control method and system
By generating and compressing control instructions in the LoRa communication system, sending them to the robot using a wireless module, and calculating the synchronization index based on the received execution result data, optimizing the control instructions and transmission methods, the problem of the reduction of synchronization in the robot control accuracy is solved, and the stable and efficient synchronization performance of the system is achieved.
Patent Information
- Application Number
- CN202510154243.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-02-12
AI Technical Summary
In the LoRa communication system, the control accuracy of the robot is affected by the reduction of synchronization between the control end and the robot, resulting in data loss and communication interruption, making it difficult to ensure normal functions.
By generating control instructions and performing compression processing, the wireless module is used to send it to the robot, and the delay index and interference index are determined based on the reception time of the reception result data and the transmission time of the robot sending the execution result data, and the synchronization index is calculated. When the synchronization index is abnormal, the method of processing control instructions and/or transmission method of wireless module are optimized.
Through continuous synchronization detection and optimization and adjustment, we ensure that the system maintains a stable and normal working state for a long time, improves synchronization performance, and ensures the control accuracy of the robot.
Smart Images

Figure CN119610139B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a manipulator control method and system. Background Art
[0002] LoRa communication technology can achieve long-distance, low-power data transmission, and is particularly suitable for scenarios that cover a wide area and have low energy consumption requirements. The control instructions of the manipulator are transmitted based on the LoRa wireless communication system to enable it to perform specific operations, which can meet the needs of long-distance, low-power application scenarios. During the long-term operation of the system, due to the influence of environmental factors, the synchronization between the control end and the manipulator is reduced, affecting the control accuracy of the manipulator, and even causing data loss, communication interruption, etc., making it difficult to ensure normal function. Summary of the invention
[0003] In view of this, an object of the embodiments of the present application is to provide a robot control method and system to solve the problem of robot control accuracy.
[0004] Based on the above purpose, an embodiment of the present application provides a manipulator control method, which is characterized by comprising:
[0005] Generate a control instruction, compress the control instruction, and send the compressed control instruction to the manipulator via a wireless module;
[0006] Determine the delay index according to the receiving time of the execution result data and the sending time of the execution result data sent by the manipulator; wherein the execution result data is obtained by the manipulator performing a corresponding action according to the received control instruction and sent to the control end;
[0007] Determining a synchronization index according to the delay index and an interference index of the detected signal during transmission;
[0008] When abnormal synchronization is determined according to the synchronization index, a method for processing control instructions and / or a transmission method of the wireless module are optimized.
[0009] Optionally, the sending to the manipulator via a wireless module includes:
[0010] During the transmission of the compressed control instruction, signal sampling is performed to obtain the instantaneous voltage and instantaneous current of the signal;
[0011] Calculating instantaneous power according to the instantaneous voltage and instantaneous current;
[0012] Performing a short-time Fourier transform on the instantaneous power to obtain instantaneous power in the frequency domain;
[0013] For each frequency component of the instantaneous power in the frequency domain, calculate the corresponding instantaneous power spectral density, calculate the second-order moment and the fourth-order moment of the instantaneous power spectral density, and calculate the instantaneous power fluctuation index of the signal according to the second-order moment and the fourth-order moment;
[0014] The interference index is determined according to the instantaneous power fluctuation index of each frequency component.
[0015] Optionally, the execution result data includes the execution result data corresponding to each control instruction obtained by the manipulator performing corresponding actions according to the control instructions received at different time points within a predetermined first time period;
[0016] Determining the delay index according to the receiving time of the execution result data and the sending time of the execution result data sent by the robot comprises:
[0017] The delay index is determined according to the reception time of each execution result data and the sending time of the robot sending the corresponding execution result data.
[0018] Optionally, determining the delay index according to the reception time of each execution result data and the sending time of the robot sending the corresponding execution result data includes:
[0019] respectively calculating the delay errors between the receiving time of each execution result data and the corresponding sending time, and constructing a delay error time series including each delay error;
[0020] Performing empirical mode decomposition processing on the delay error time series to obtain multiple intrinsic mode functions and a residual term;
[0021] For each intrinsic mode function, calculating the cumulative sum of delay errors corresponding to all time points in the delay error time series to obtain the cumulative error contribution of each intrinsic mode function;
[0022] Add the cumulative error contributions of all intrinsic mode functions to obtain the cumulative delay error;
[0023] Calculate the cumulative sum of the delay errors corresponding to all time points in the delay error time series by the residual term;
[0024] The delay error cumulative sum is added to the cumulative sum corresponding to the residual term to obtain a delay error cumulative index.
[0025] Optionally, determining a synchronization index according to the delay index and an interference index of a detected signal during transmission includes:
[0026] Preprocessing the delay index and the interference index to obtain a feature vector suitable for processing by a pre-built synchronization evaluation model;
[0027] The feature vector is input into the synchronization evaluation model, and the synchronization evaluation model outputs a synchronization index.
[0028] Optionally, when abnormal synchronization is determined according to the synchronization index, a method for processing control instructions and / or a method for transmitting the wireless module are optimized, including:
[0029] When it is determined that the synchronization index is less than a preset synchronization index threshold, it is determined to be abnormal synchronization;
[0030] Calculating a synchronization anomaly index according to each synchronization index in a preset second time period and a deviation between each synchronization index and the synchronization index threshold;
[0031] When it is determined that the synchronization anomaly index is greater than or equal to a preset synchronization anomaly index threshold, the processing method of the control end for the control instruction and / or the transmission method of the wireless module are optimized.
[0032] Optionally, compressing the control instruction includes:
[0033] Compressing the control instruction according to a preset compression method to obtain a compressed control instruction;
[0034] According to the current channel state, it is determined whether the probability of data corruption of the compressed control instruction is greater than a preset corruption threshold. If so, error correction processing is performed on the compressed control instruction to obtain a corrected control instruction.
[0035] Optionally, the control instruction processing method is optimized, including:
[0036] When it is determined that the delay index is greater than a preset delay index threshold, the compression method and / or the error correction processing method is adjusted.
[0037] Optionally, optimizing the transmission method of the wireless module includes:
[0038] When it is determined that the interference index is greater than a preset interference index threshold, selecting a target operating frequency band in which the interference of the wireless module is less than a preset interference value;
[0039] The current operating frequency band of the wireless module is adjusted to the target operating frequency band.
[0040] The present application provides a manipulator control system, including:
[0041] The control end is used to generate a control instruction, compress the control instruction, and send the compressed control instruction to the manipulator via the wireless module; and determine the delay index according to the receiving time of the execution result data and the sending time of the execution result data sent by the manipulator; determine the synchronization index according to the delay index and the interference index of the detected signal during the transmission process; when it is judged as abnormal synchronization according to the synchronization index, the processing method of the control instruction and / or the transmission method of the wireless module are optimized;
[0042] The robot arm is used to perform corresponding actions according to the received control instructions, obtain execution result data, and send the execution result data to the control end.
[0043] From the above, it can be seen that the manipulator control method and system provided by the embodiment of the present application, the control end compresses the generated control instructions, and the compressed control instructions are sent to the manipulator via the wireless module. The delay index is determined according to the reception time of the execution result data and the sending time of the execution result data sent by the manipulator. The synchronization index is determined according to the delay index and the interference index of the detected signal during the transmission process. When abnormal synchronization is judged according to the synchronization index, the control instruction processing method and / or the transmission method of the wireless module are optimized. Through continuous synchronization detection and optimization adjustment, the present application can ensure that the system maintains a stable and normal working state for a long time, improve the synchronization performance, and ensure the control accuracy of the manipulator. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 A schematic diagram of a method flow of an embodiment of the present application;
[0046] Figure 2 A system structure block diagram of an embodiment of the present application;
[0047] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0049] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to represent relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0050] As described in the background technology section, in the remote control process of the manipulator based on the LoRa communication system, the control end (for example, a computer or mobile device) generates the control instructions of the manipulator, and the control instructions are processed by data compression, error correction, signal coding and other data enhancement technologies and then sent to the manipulator to ensure that they can be transmitted quickly and accurately under the low bandwidth conditions of the LoRa system. During the long-term operation of the system, the data synchronization performance between the control end and the manipulator is reduced due to factors such as environmental interference. When the temperature changes drastically, the clock of the LoRa network node may drift slightly, and the control instructions cannot reach the manipulator synchronously. The manipulator may have execution lag or loss of control problems. In extreme cases, clock drift may cause communication interruption, signal overlap or data packet loss, especially in long-term unsupervised remote operations, it is difficult to ensure the normal function of the manipulator.
[0051] In view of this, an embodiment of the present application provides a robot control method, in which the control end determines a synchronization index based on the interference suffered by the control instruction during the wireless transmission process and the delay in the transmission of data from the robot to the control end. When abnormal synchronization is judged according to the synchronization index, the control end improves the data synchronization between the control end and the robot and ensures the control accuracy by optimizing and adjusting the control end's processing method for the control instruction and / or the transmission method of the wireless module for transmitting the control instruction.
[0052] The technical solution of the present application is further described in detail below through specific embodiments.
[0053] like Figure 1 , 2 As shown, the embodiment of the present application provides a manipulator control method, which is applied to a control end, and the method includes:
[0054] S101: Generate a control instruction, compress the control instruction, and send the compressed control instruction to the manipulator via a wireless module;
[0055] In this embodiment, the manipulator control system includes a control terminal and a manipulator, and the control terminal and the manipulator realize wireless communication through a wireless module. According to the actual application requirements of the manipulator, the control terminal generates a control instruction for controlling the action of the manipulator, compresses the control instruction and sends it to the manipulator through the wireless module, and the manipulator receives the control instruction, decompresses the control instruction, and then executes the corresponding action, thereby realizing the remote control of the manipulator by the control terminal.
[0056] In some methods, the control instructions include start, stop, target position, execution time, movement mode, joint angle, speed, action type, etc. The format of the control instructions can be binary, hexadecimal, etc. Depending on the specific control content, the size of the control instruction is usually tens of bytes. The above is only an exemplary description, and the specific content, format and size of the control instruction are not specifically limited.
[0057] In some embodiments, the control instruction is compressed, including:
[0058] Compressing the control instruction according to a preset compression method to obtain a compressed control instruction;
[0059] According to the current channel state, it is determined whether the probability of data corruption in the compressed control instruction is greater than a preset corruption threshold. If so, error correction processing is performed on the compressed control instruction to obtain a corrected control instruction.
[0060] In this embodiment, after the control end generates the control instruction, it is necessary to compress the control instruction to reduce the amount of data transmitted and the transmission time, and improve the transmission efficiency. When compressing, the control instruction is first analyzed to determine the compressible part, and then a suitable compression method is selected according to the analysis result to compress the control instruction, and the compressed control instruction is encapsulated into a data packet. The compression effect is judged according to the size of the data packet and the size of the original data packet encapsulated by the uncompressed control instruction. If the data packet has a significantly reduced data volume compared to the original data packet, the compression is successful.
[0061] Optionally, if there is a large amount of repeated or redundant data in the control instructions, the Huffman compression algorithm, the Lempel-Ziv-Welch (LZW) lossless compression algorithm, etc. can be selected. The Huffman compression algorithm generates the shortest code according to the frequency of occurrence of the data, and the LZW algorithm compresses repeated patterns in a dictionary manner. Both compression methods can effectively compress repeated data.
[0062] In some embodiments, considering that interference in wireless communication channels may cause data packets to be damaged during transmission, after generating compressed data packets, it is necessary to determine whether error correction is required for the data in combination with the channel state. Specifically, the current channel state is determined based on system parameters such as signal strength, signal-to-noise ratio, bit error rate, etc. of the wireless communication channel within a predetermined historical time; if the channel state is good, the probability of data damage is not high, and error correction is not required; if the channel state is not good (for example, the bit error rate is greater than a preset bit error rate threshold, the signal strength is less than a preset strength threshold, the signal-to-noise ratio is less than a preset signal-to-noise ratio threshold, etc.), the probability of data damage is high, especially for compressed data packets that are very sensitive to data damage, individual bit errors may cause the entire data packet to fail, then when it is determined that the probability of data damage is greater than the damage threshold, error correction should be performed on the data to ensure the integrity and accuracy of data transmission.
[0063] In some embodiments, error correction processing is performed on the compressed control instructions, including adding an error correction code to the compressed data packet, so that the robot can perform data correction according to the error correction code after receiving the data packet to repair possible errors. Optionally, a forward error correction method can be used to add an error correction code with a certain degree of redundancy to the data packet according to the channel state, so as to minimize the transmission of redundant information while ensuring data integrity.
[0064] In some embodiments, the wireless module may be a LoRa wireless module, and the LoRa wireless module is used to realize remote low-power control of the manipulator by the control end. The compressed data packet or the data packet with the error correction code added is first converted to obtain a data form suitable for processing by the LoRa wireless module, and the converted data packet is modulated by the LoRa wireless module, and the modulated data packet is sent to the manipulator through the antenna.
[0065] In some ways, the LoRa wireless module uses a spread spectrum algorithm to modulate the converted data packets and convert the digital data into a radio frequency signal suitable for transmission. According to the transmission distance and bandwidth requirements, select the appropriate spreading factor (SF). For example, in application scenarios with long distances or large interference, a larger spreading factor (such as SF = 10 to 12) can be selected to improve anti-interference and transmission distance. Optionally, CSS (Chirp Spread Spectrum) spread spectrum technology can be used to improve anti-interference capabilities with signals with larger bandwidths.
[0066] In some embodiments, the LoRa wireless module is configured with a suitable working frequency band and transmission power, and the modulated data packet is sent through the antenna. Among them, the range of transmission power is generally between 14 dBm and 20 dBm. The greater the transmission power, the longer the transmission distance and the greater the power consumption. The selection of the working frequency band is related to the region. During use, if the currently selected working frequency band is subject to greater interference, a working frequency band with less interference can be reselected to ensure the quality of data transmission.
[0067] In some ways, due to the limitation of channel resources, the data packets to be sent can be added to the sending queue to ensure that the data packets will not conflict or be lost. The control end sends the data packets in the sending queue according to the preset scheduling algorithm, combined with the priority and arrival order of the data packets. During the data transmission process, flow control is required to avoid overload transmission. If the control end and the manipulator use a confirmation mechanism to send data, the control end needs to wait for the confirmation signal sent by the manipulator before sending the next data packet to ensure that the previous data packet has been successfully received. If no confirmation signal is received, the previous data packet needs to be retransmitted to ensure the integrity and accuracy of data transmission.
[0068] S102: Determine a delay index according to the time of receiving the execution result data and the time of sending the execution result data by the manipulator; wherein the execution result data is obtained by the manipulator performing a corresponding action according to the received control instruction and sent to the control end;
[0069] In this embodiment, after the control end sends the control instruction, the manipulator receives the data packet including the control instruction through the channel, and obtains the control instruction after demodulating, decompressing, and correcting the received data packet. The manipulator performs the corresponding action according to the control instruction, obtains the corresponding execution result data, and then sends the execution result data to the control end. The control end determines the delay index of the data during the transmission process based on the sending time of the execution result data sent by the manipulator and the receiving time of the execution result data actually received, and evaluates the data synchronization performance between the control end and the manipulator in combination with the delay index.
[0070] In some embodiments, the execution result data includes the execution result data corresponding to each control instruction obtained by the manipulator performing corresponding actions according to the control instructions received at different time points within a predetermined first time period;
[0071] Determining the delay index according to the receiving time of the execution result data and the sending time of the execution result data sent by the robot includes: determining the delay index according to the receiving time of each execution result data and the sending time of the corresponding execution result data sent by the robot.
[0072] In this embodiment, the delay index can be determined by the sending time of the execution result data sent by the manipulator and the receiving time of the control terminal within a certain time period. That is, within a certain time period, the control terminal sends control instructions to the manipulator multiple times, and the manipulator performs corresponding actions according to the control instructions received each time, and generates corresponding execution result data, and records the sending time and corresponding receiving time of each execution result data. According to the sending time and corresponding receiving time of multiple execution result data, the delay index within a certain time period is determined.
[0073] In some embodiments, the delay index is determined according to the reception time of each execution result data and the sending time of the corresponding execution result data by the robot, including:
[0074] respectively calculating the delay errors between the receiving time of each execution result data and the corresponding sending time, and constructing a delay error time series including each delay error;
[0075] Performing empirical mode decomposition on the delay error time series, multiple intrinsic mode functions and a residual term are obtained;
[0076] For each intrinsic mode function, the cumulative sum of the delay errors corresponding to all time points in the delay error time series is calculated to obtain the cumulative error contribution of each intrinsic mode function;
[0077] Add the cumulative error contributions of all intrinsic mode functions to obtain the cumulative delay error;
[0078] Calculate the cumulative sum of the delay errors corresponding to the residual term at all time points in the delay error time series;
[0079] The delay error cumulative sum is added to the cumulative sum corresponding to the residual term to obtain a delay error cumulative index.
[0080] This embodiment provides a specific method for determining the delay index. For the sending time and corresponding receiving time of multiple execution result data recorded, the delay error of the receiving time and the corresponding sending time of each execution result data is calculated respectively, which is expressed as D(x)=Treceive(x)−Tsend(x), where Treceive(x) is the receiving time of the execution result data x, Tsend(x) is the sending time of the execution result data x, and D(x) is the delay error of the execution result data x. The delay errors of multiple execution result data constitute a delay error time series. D(t) , the time series is composed of t The delay error is caused by the change of the transmission time (or reception time). t 1, the corresponding delay error is 3 seconds. When the sending time (or receiving time) is t 2, the corresponding delay error is 2 seconds.
[0081] For the delayed error time series D(t) Performing empirical mode decomposition, we obtain multiple intrinsic mode functions and a residual term, which can be expressed as:
[0082] (1)
[0083] in, It is k The intrinsic mode functions, K is the number of decomposed intrinsic mode functions, R(x) is the residual term.
[0084] For each intrinsic mode function, the cumulative sum of the delay errors corresponding to all time points in the delay error time series is calculated to obtain the cumulative error contribution of each intrinsic mode function, which is expressed as:
[0085] (2)
[0086] Among them, CE k is the cumulative error of the kth intrinsic mode function from time t = 1 to t = N, where N is the total length of the delayed error time series.
[0087] The cumulative error contributions of all intrinsic mode functions are added together to obtain the cumulative sum of delay errors. The cumulative sum of delay errors corresponding to the residual term at all time points in the delay error time series is calculated. The cumulative sum of delay errors is added to the cumulative sum corresponding to the residual term to obtain the cumulative index of delay errors, i.e., the delay index, which is expressed as:
[0088] (3)
[0089] After calculating the delay index, the degree of delay between the control end and the manipulator can be evaluated based on the delay index. If the delay index is large, the accumulation of delay errors in the first time period is large, the synchronization performance decreases, and the synchronization control accuracy of the manipulator is affected; if the delay index is small, it indicates that the delay error in the first time period is relatively stable, and the delay error has little effect on the synchronization performance.
[0090] S103: determining a synchronization index according to the delay index and an interference index of the detected signal during the transmission process;
[0091] In this embodiment, after the control end sends a control instruction, during the transmission of the control instruction in the form of a wireless signal, the interference degree of the wireless signal is detected to obtain an interference index. The control end comprehensively determines the synchronization index based on the interference index in the signal transmission process and the delay index of the execution result data from the manipulator to the control end, and evaluates the synchronization performance between the control end and the manipulator based on the synchronization index.
[0092] In some embodiments, the wireless module is used to send the information to the robot, including:
[0093] During the transmission of the compressed control instruction, the signal is sampled to obtain the instantaneous voltage and instantaneous current of the signal;
[0094] Calculate instantaneous power based on instantaneous voltage and instantaneous current;
[0095] Perform short-time Fourier transform on the instantaneous power to obtain the instantaneous power in the frequency domain;
[0096] For each frequency component of the instantaneous power in the frequency domain, the corresponding instantaneous power spectrum density is calculated, the second-order moment and the fourth-order moment of the instantaneous power spectrum density are calculated, and the instantaneous power fluctuation index of the signal is calculated based on the second-order moment and the fourth-order moment;
[0097] The interference index is determined according to the instantaneous power fluctuation index of each frequency component.
[0098] This embodiment provides a method for detecting the degree of interference and calculating the interference index. Specifically, during the signal transmission process, a spectrum analyzer is used to detect the interference source of the current working frequency band of the wireless module. The spectrum analyzer detects the signal strength of the working frequency band, analyzes whether there is external interference in the channel, and identifies the type of interference source based on the signal strength and signal waveform. For example, interference signals from other devices or environmental noise will show specific peaks in the spectrum.
[0099] The wireless signal is sampled during the transmission process to obtain the instantaneous voltage and instantaneous current of the sampled signal, and the instantaneous power is calculated based on the instantaneous voltage and instantaneous current. x(t) ; Perform short-time Fourier transform on the instantaneous power to obtain the instantaneous power in the frequency domain. The short-time Fourier transform performs localized analysis on the signal through the window function and calculates the frequency component that changes with time, which is expressed as:
[0100] (4)
[0101] in ,X(t,f) is the short-time Fourier transform result, indicating the frequency f At the moment t Contribution is the instantaneous power signal in the time domain, It is a time-shift window function, which can be Hamming window, rectangular window, etc.; in different time periods, X (t,f) The corresponding frequencies are different, that is, the instantaneous power in the frequency domain in a certain period of time contains different frequency components.
[0102] For each frequency component of the instantaneous power in the frequency domain, the corresponding power spectrum is calculated to obtain the frequency fThe corresponding signal energy distribution is expressed as:
[0103] (5)
[0104] in, P(t,f) is the signal at frequency f and time t The instantaneous power spectral density.
[0105] Frequency f The instantaneous power distribution of the frequency spectrum is calculated, and the fourth-order moment (kurtosis) of the power spectrum density in the frequency bandwidth is expressed as:
[0106] (6)
[0107] in, is the frequency f The corresponding fourth-order moment is used to reflect the sharpness or peak deviation of the signal power within the frequency bandwidth.
[0108] Frequency f The instantaneous power distribution of is calculated, and the second-order moment of the power spectrum density within the frequency bandwidth is expressed as:
[0109] (7)
[0110] in, is the frequency f The corresponding second-order moment is used to measure the dispersion of signal power and provide a reference for signal strength fluctuations within the frequency bandwidth.
[0111] According to the second-order moment and fourth-order moment of the signal, the instantaneous power fluctuation index of the instantaneous power signal is calculated, which is expressed as:
[0112] (8)
[0113] Among them, SK is the instantaneous power fluctuation index.
[0114] According to formulas (5)-(8), the instantaneous power fluctuation index corresponding to each frequency component is calculated, and the average value of the instantaneous power fluctuation index of each frequency component is calculated. The average value is used as the interference index, and the interference index is used to evaluate the interference degree of the signal during the transmission process.
[0115] In some embodiments, determining the synchronization index according to the delay index and the interference index of the detected signal during the transmission process includes:
[0116] Preprocessing the delay index and the interference index to obtain a feature vector suitable for processing by a pre-built synchronization evaluation model;
[0117] The feature vector is input into the synchronization evaluation model, and the synchronization evaluation model outputs the synchronization index.
[0118] In this embodiment, after determining the interference index of the signal during transmission and the delay index of the data from the manipulator to the control end, the delay index and the interference index are input into a pre-built synchronization evaluation model, and the model outputs the synchronization index, and the synchronization index is used to evaluate the data synchronization performance between the control end and the manipulator. Specifically, the instantaneous power fluctuation index and the delay error accumulation index are pre-processed to obtain a feature vector suitable for model processing, and the feature vector is input into the synchronization evaluation model, and the model outputs the corresponding synchronization index.
[0119] In some methods, based on a machine learning model, a training sample consisting of a characteristic vector of an interference index and a delay index is input into the machine learning model, the model takes the synchronization index between the control end and the manipulator as a prediction target, and takes minimizing the prediction error of the synchronization index as a training target, and trains the model until the prediction error is less than the expected error value, and the training ends. After the training, a synchronization evaluation model is obtained, and the synchronization evaluation model is used to predict the synchronization index between the control end and the manipulator based on the delay index and the interference index. Optionally, the machine learning model can use a polynomial regression model.
[0120] In some embodiments, the method for predicting the synchronization index according to the interference index and the delay index by the synchronization evaluation model can be expressed as:
[0121] CR= F (SK,CD) (9)
[0122] in, F is the output function of the model.
[0123] S104: When it is determined as abnormal synchronization according to the synchronization index, the processing method of the control instruction and / or the transmission method of the wireless module are optimized.
[0124] In this embodiment, after determining the synchronization index based on the interference index and the delay index, the synchronization index is compared with a preset synchronization index threshold. If the synchronization index is greater than or equal to the synchronization index threshold, it is judged that the data synchronization performance between the control end and the manipulator remains stable and is in a normal synchronization state, and it is necessary to continuously monitor the synchronization state of the system; if the synchronization index is less than the synchronization index threshold, it is judged that the data synchronization performance between the control end and the manipulator decreases and is in an abnormal synchronization state, and it is necessary to improve the synchronization by optimizing and adjusting the processing method of the control instructions and / or the transmission method of the wireless module.
[0125] In some embodiments, when abnormal synchronization is determined according to the synchronization index, the processing method of the control terminal for the control instruction and / or the transmission method of the wireless module are optimized, including:
[0126] When the synchronization index is judged to be less than the preset synchronization index threshold, it is judged to be abnormal synchronization;
[0127] Calculate a synchronization anomaly index according to each synchronization index in a preset second time period and a deviation between each synchronization index and a synchronization index threshold;
[0128] When it is determined that the synchronization anomaly index is greater than or equal to a preset synchronization anomaly index threshold, the processing method of the control end for the control instruction and / or the transmission method of the wireless module are optimized.
[0129] In this embodiment, when the synchronization index is used to determine whether the system is in abnormal synchronization, the synchronization anomaly index within a certain period of time is calculated. If the synchronization anomaly index is greater than or equal to the synchronization anomaly index threshold, it indicates that the probability of the system being in abnormal synchronization for a period of time is high, and the overall synchronization performance has declined for a period of time. It is necessary to improve the synchronization performance through optimization and adjustment to ensure the long-term reliable operation of the system. If the synchronization anomaly index is less than the synchronization anomaly index threshold, the probability of the system being in abnormal synchronization for a period of time is not high, and the overall synchronization performance is relatively stable, and no adjustment or fine-tuning is required.
[0130] The synchronization anomaly index is calculated according to each synchronization index in the preset second time period and the deviation between each synchronization index and the synchronization index threshold. The method is as follows: a synchronization index set including all synchronization indexes in the second time period is constructed, the number of synchronization indexes in the synchronization index set that are less than the synchronization index threshold is counted, the deviation between the synchronization index that is less than the synchronization index threshold and the synchronization index threshold is calculated, and the synchronization anomaly index is calculated according to the number and deviation of the synchronization indexes that are less than the synchronization index threshold, which is expressed as:
[0131] (10)
[0132] in, is the number of synchronization indexes in the synchronization index set that are less than the synchronization index threshold, is the synchronization index threshold, CR t Indicates time t The synchronization index, Indicates the deviation between the synchronization index and the synchronization index threshold.
[0133] In some embodiments, the method for processing the control instruction by the control end is optimized, including:
[0134] When it is determined that the delay index is greater than a preset delay index threshold, the control end adjusts the compression method and / or the error correction processing method.
[0135] In this embodiment, when optimizing and adjusting, targeted adjustments can be made according to the reasons for the decline in synchronization performance. If the delay index is greater than the preset delay index threshold, that is, the data transmission delay from the manipulator to the control end is high, it is necessary to adjust the compression method and / or error correction method of the control end to send the control instruction to reduce the transmission delay and improve the transmission efficiency. Specifically, a compression algorithm that retains data accuracy (such as lossless compression) is selected, and the use of incremental encoding is considered to only transmit data that is different from the transmitted data, thereby reducing the amount of data and the transmission time; at the same time, an enhanced redundant check mechanism is used to improve the error correction capability and ensure the integrity and accuracy of the data during the transmission process; if the amount of data transmitted is large, the frequency of sending the execution result data can be reduced, and the generation of compressed data packets can be optimized to reduce resource usage, reduce data delay, and improve transmission performance; the number of retransmissions can also be increased to avoid data loss.
[0136] In some embodiments, the transmission method of the wireless module is optimized, including:
[0137] When it is determined that the interference index is greater than a preset interference index threshold, a target operating frequency band in which the interference of the wireless module is less than a preset interference value is selected;
[0138] Adjust the current operating frequency band of the wireless module to the target operating frequency band.
[0139] In this embodiment, when optimizing and adjusting, if the interference index is greater than the interference index threshold, that is, the signal is greatly interfered during transmission, it is necessary to adjust the transmission mode of the wireless module, reselect the target working frequency band with less interference or no interference, adjust the current working frequency band to the target working frequency band, and reduce the interference during signal transmission. Specifically, a spectrum analyzer is used to detect the frequency range supported by the wireless module, and one or more frequency bands with interference less than the interference value are found, and a frequency band with the least interference and the most stable is determined as the target working frequency band. The control end and the manipulator are synchronously switched to the target working frequency band to correctly send and receive data. After switching the frequency band, the wireless module readjusts the communication parameters such as the spreading factor and the transmission power to determine the stability and transmission efficiency of the transmitted signal under the target working frequency band.
[0140] In some methods, when the system is judged to be in a normal synchronization state through the synchronization index, lightweight performance optimization can be performed. For example, the control end improves transmission efficiency and reduces resource usage by fine-tuning the compression method.
[0141] In some methods, when the synchronization index is used to determine whether the system has recovered from abnormal synchronization to a normal synchronization state, the compression method can be adjusted to reduce the amount of transmitted data and optimize the transmission efficiency. The frequency of sending execution result data can be increased to improve the real-time nature of synchronization detection. The system's synchronization performance can be continuously optimized based on real-time detection results, and resource usage can be reduced by reducing the number of retransmissions.
[0142] In some methods, if the synchronization performance of the system is still low within a certain period of time after optimization and adjustment, it may be caused by clock drift. The clocks of the control end and the robot arm should be resynchronized to ensure the synchronization of the clocks at both ends.
[0143] The robot control method provided in the embodiment of the present application is that the control end sends a control instruction to the robot through a wireless module to control it to perform a specific action, and determines the synchronization index by detecting the interference index of the interference during data transmission and the delay index of data transmission from the robot to the control end. When the system is judged to be in an abnormal synchronization state according to the synchronization index, the synchronization performance is improved by optimizing and adjusting the compression method, error correction method, working frequency band of the wireless module and other methods to ensure the control accuracy of the robot. Through continuous synchronization detection and optimization adjustment, it is ensured that the system maintains a stable and normal working state for a long time.
[0144] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0145] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0146] Figure 3A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0147] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0148] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0149] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0150] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0151] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010 , the memory 1020 , the input / output interface 1030 , and the communication interface 1040 ).
[0152] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0153] The electronic device of the above embodiment is used to implement the corresponding method in the above embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0154] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0155] A person of ordinary skill in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0156] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power / ground connections to the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device may be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0157] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many alternatives, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the discussed embodiments.
[0158] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present disclosure.
Claims
1. A robot control method, characterized in that: include: Generate a control instruction, compress the control instruction, and send the compressed control instruction to the manipulator via a wireless module; Determine the delay index according to the receiving time of the execution result data and the sending time of the execution result data sent by the manipulator; wherein the execution result data is obtained by the manipulator performing corresponding actions according to the received control instructions and sent to the control end; the execution result data includes the execution result data corresponding to each control instruction obtained by the manipulator performing corresponding actions according to the control instructions received at different time points within a predetermined first time period; the determining of the delay index includes: Respectively calculate the delay error between the receiving time and the corresponding sending time of each execution result data, and construct a delay error time series including each delay error; perform empirical mode decomposition processing on the delay error time series to obtain multiple intrinsic mode functions and a residual term; for each intrinsic mode function, calculate the cumulative sum of the delay errors corresponding to all time points in the delay error time series to obtain the cumulative error contribution of each intrinsic mode function; add the cumulative error contributions of all intrinsic mode functions to obtain the cumulative sum of delay errors; calculate the cumulative sum of the delay errors corresponding to all time points of the residual term in the delay error time series; add the cumulative sum of the delay errors and the cumulative sum corresponding to the residual term to obtain a delay error cumulative index as the delay index; Determining a synchronization index according to the delay index and an interference index of the detected signal during transmission; When abnormal synchronization is determined according to the synchronization index, a method for processing control instructions and / or a transmission method of the wireless module are optimized.
2. The method according to claim 1, characterized in that The sending to the robot via the wireless module includes: During the transmission of the compressed control instruction, signal sampling is performed to obtain the instantaneous voltage and instantaneous current of the signal; Calculating instantaneous power according to the instantaneous voltage and instantaneous current; Performing a short-time Fourier transform on the instantaneous power to obtain instantaneous power in the frequency domain; For each frequency component of the instantaneous power in the frequency domain, calculate the corresponding instantaneous power spectral density, calculate the second-order moment and the fourth-order moment of the instantaneous power spectral density, and calculate the instantaneous power fluctuation index of the signal according to the second-order moment and the fourth-order moment; The interference index is determined according to the instantaneous power fluctuation index of each frequency component.
3. The method according to any one of claims 1 to 2, characterized in that: Determining a synchronization index according to the delay index and an interference index of a detected signal during transmission includes: Preprocessing the delay index and the interference index to obtain a feature vector suitable for processing by a pre-built synchronization evaluation model; The feature vector is input into the synchronization evaluation model, and the synchronization evaluation model outputs a synchronization index.
4. The method according to claim 1, characterized in that When abnormal synchronization is determined according to the synchronization index, a control instruction processing method and / or a wireless module transmission method are optimized, including: When it is determined that the synchronization index is less than a preset synchronization index threshold, it is determined to be abnormal synchronization; Calculating a synchronization anomaly index according to each synchronization index in a preset second time period and a deviation between each synchronization index and the synchronization index threshold; When it is determined that the synchronization anomaly index is greater than or equal to a preset synchronization anomaly index threshold, the processing method of the control end for the control instruction and / or the transmission method of the wireless module are optimized.
5. The method according to claim 1, characterized in that The control instruction is compressed, including: Compressing the control instruction according to a preset compression method to obtain a compressed control instruction; According to the current channel state, it is determined whether the probability of data corruption of the compressed control instruction is greater than a preset corruption threshold. If so, error correction processing is performed on the compressed control instruction to obtain a corrected control instruction.
6. The method according to claim 5, characterized in that Optimize the processing method of control instructions, including: When it is determined that the delay index is greater than a preset delay index threshold, the compression method and / or the error correction processing method is adjusted.
7. The method according to claim 1, characterized in that Optimizing the transmission method of the wireless module includes: When it is determined that the interference index is greater than a preset interference index threshold, selecting a target operating frequency band in which the interference of the wireless module is less than a preset interference value; The current operating frequency band of the wireless module is adjusted to the target operating frequency band.
8. A robot control system, used to implement the robot control method according to any one of claims 1 to 7, characterized in that: include: The control end is used to generate a control instruction, compress the control instruction, and send the compressed control instruction to the manipulator via a wireless module; And determine the delay index according to the receiving time of the execution result data and the sending time of the execution result data sent by the manipulator; determine the synchronization index according to the delay index and the interference index of the detected signal during the transmission process; when it is judged as abnormal synchronization according to the synchronization index, optimize the processing method of the control instruction and / or the transmission method of the wireless module; The robot arm is used to perform corresponding actions according to the received control instructions, obtain execution result data, and send the execution result data to the control end.
Citation Information
Patent Citations
Mechanical arm motion control delay measuring system based on visual inspection and method thereof
CN113370268A
Low-time-delay surgical robot remote control system
CN115592667A