Motor rack remote communication method and device

By establishing a target MQTT communication channel or transit communication channel between the motor stand and the remote control equipment, the problem of insufficient bidirectional communication in the existing technology is solved, efficient remote control and data upload of the motor stand are realized, and communication efficiency is improved and reliability.

CN119254819APending Publication Date: 2025-01-03CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411551806.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The lack of a two-way communication solution between the motor stand and the remote control device in the prior art, resulting in the inability to effectively remotely control the motor stand and upload data.

Method used

By establishing a target MQTT communication channel or transit communication channel, including the standard protocol channel between the motor stand and the edge computing device and the MQTT protocol channel between the edge computing device and the remote control device, the establishment of a two-way transmission channel is achieved and the motor station is completed. Two-way communication between the rack and the remote control device.

Benefits of technology

It realizes two-way communication between the motor stand and the remote control device, improves transmission efficiency and implementability, and supports real-time data transmission and the execution of control instructions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254819A_ABST
    Figure CN119254819A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motor testing, in particular to a remote communication method and device for a motor rack, and the method comprises the steps: building a two-way transmission channel with remote control equipment, the two-way transmission channel being a target MQTT communication channel or a transfer communication channel, the transfer communication channel comprising a first communication channel and a second communication channel which are communicated, the first communication channel refers to a standard protocol channel between the motor rack and a preset edge computing device, the second communication channel refers to a channel established based on an MQTT protocol between the edge computing device and a remote control device, and the standard protocol channel refers to a channel established based on a preset standard communication protocol; communication with remote control equipment is completed based on a two-way transmission channel; according to the method, two-way communication between the motor rack and the remote control equipment can be well achieved, the transmission efficiency is high, and the practicability is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of motor testing, and in particular to a method and device for remote communication of a motor test bench. Background Art

[0002] The motor test bench is a device used to test and evaluate the performance of motors. It is mainly used in the fields of motor research and development, production and quality control. During the motor performance test, the torque and speed output by the motor test bench are transmitted to the motor under test. At the same time, the various sensors installed on the motor test bench (such as temperature sensors, torque sensors, and speed sensors, etc.) will collect data from the motor under test and feed the collected data back to the control cabinet of the motor test bench.

[0003] At present, due to the lack of a two-way communication solution between the motor test bench and the remote control device, it is impossible to achieve a good two-way communication between the motor test bench and the remote control device, which makes it inconvenient to remotely control the motor test bench and upload the test bench data. Summary of the invention

[0004] The present application provides a motor test bench remote communication method and device to solve the technical problem in the prior art that two-way communication between the motor test bench and the remote control device cannot be well achieved.

[0005] The present application provides a motor test bench remote communication method, the method comprising: establishing a two-way transmission channel with a remote control device, the two-way transmission channel being a target MQTT communication channel or a transit communication channel, the transit communication channel comprising a first communication channel and a second communication channel that are connected, the first communication channel referring to a standard protocol channel between the motor test bench and a preset edge computing device, the second communication channel referring to a channel between the edge computing device and the remote control device based on the MQTT protocol, and the standard protocol channel referring to a channel based on a preset standard communication protocol;

[0006] Based on the bidirectional transmission channel, communication with the remote control device is completed.

[0007] In one embodiment of the present application, the steps of establishing a target MQTT communication channel with a remote control device include:

[0008] Create the first MQTT client instance;

[0009] Obtain connection parameters, including the address and port of a preset target MQTT server;

[0010] According to the connection parameters, the first MQTT client instance is connected to the target MQTT server; the channel between the first MQTT client instance, the target MQTT server, and the second MQTT client instance preset in the remote control device constitutes the target MQTT communication channel.

[0011] In one embodiment of the present application, the step of establishing a transit communication channel with a remote control device includes:

[0012] Receiving a configuration command sent by the edge computing device, where the configuration command is sent by the edge computing device by calling a connection establishment method in a standard communication protocol library;

[0013] According to the configuration command, state configuration is performed, wherein the state configuration includes: target parameter configuration, interface configuration, and input / output data buffer configuration, wherein the target parameter includes: input data type and output data type;

[0014] When the state configuration is completed, establishing the first communication channel with the edge computing device;

[0015] When it is determined that both the first communication channel and the second communication channel have been established, the establishment of the transit communication channel is completed.

[0016] In one embodiment of the present application, the steps of completing communication with the remote control device based on the bidirectional transmission channel include:

[0017] If the bidirectional transmission channel is the target MQTT communication channel, the target data is published to a first target topic of a preset target MQTT server to complete the data transmission from the motor stand to the remote control device;

[0018] The target data is obtained based on sensor data collected by at least one sensor preset on the motor stand, and the first target topic is subscribed by the remote control device so that the remote control device receives the target data in real time.

[0019] In one embodiment of the present application, the steps of completing communication with the remote control device based on the bidirectional transmission channel include:

[0020] If the bidirectional transmission channel is the target MQTT communication channel, then receiving a control instruction issued by the remote control device through the target MQTT communication channel, the control instruction is an instruction issued by the remote control device to a second target topic of the target MQTT server, and the motor stand subscribes to the second target topic;

[0021] Based on the control instruction, a corresponding control operation is performed, and the control operation includes starting the gantry device and stopping the gantry device.

[0022] In one embodiment of the present application, the steps of completing communication with the remote control device based on the bidirectional transmission channel include:

[0023] If the bidirectional transmission channel is the transit communication channel, the target data is transmitted to the edge computing device through the first communication channel in response to the data read instruction sent by the edge computing device;

[0024] The target data is obtained based on the sensor data collected by at least one sensor preset on the motor test stand. The target data in the edge computing device is data that needs to be published to a third target topic. The third target topic is a topic in a preset target MQTT server, and the third target topic is subscribed by the remote control device.

[0025] In one embodiment of the present application, the steps of completing communication with the remote control device based on the bidirectional transmission channel include:

[0026] If the two-way transmission channel is the transit communication channel, a control instruction sent by the edge computing device through the first communication channel is received, wherein the control instruction is published to the edge computing device by a preset target MQTT server, and the control instruction in the target MQTT server is data published by the remote control device to a fourth target topic, and the fourth target topic is a topic preset in the target MQTT server;

[0027] Based on the control instruction, a corresponding control operation is performed, and the control operation includes starting the gantry device and stopping the gantry device.

[0028] In one embodiment of the present application, the step of completing communication with the remote control device based on the bidirectional transmission channel further includes:

[0029] Feedback information is transmitted to the remote control device through the target MQTT communication channel or the transit communication channel, and the feedback information includes: the operating status of the motor test bench, the execution status of the control operation, and the error information of the motor test bench.

[0030] In one embodiment of the present application, the step of acquiring the target data includes:

[0031] Acquiring sensor data collected by at least one sensor preset on the motor stand;

[0032] Determine the current sensor data and the rate of change of the sensor data as state variables; perform state prediction based on the value of the state variable at the previous moment and a preset nonlinear state transition model to obtain a state prediction result; perform covariance prediction based on the current value of the state variable to obtain a current covariance matrix prediction result;

[0033] According to a preset nonlinear observation function, the state prediction result is predicted by an observation value to obtain an observation value prediction result; a target Jacobian matrix of the observation value prediction result is obtained; and a Kalman gain is obtained according to the covariance matrix prediction result and the target Jacobian matrix;

[0034] According to the Kalman gain, the observation value prediction result, and the value of the state variable at the current moment, the state prediction result is updated to obtain a state update value; and, according to the Kalman gain, the covariance matrix prediction result is updated; and according to the state update value, the target data is obtained.

[0035] The present application also provides a motor test bench remote communication device, the device comprising: a channel establishment module, used to establish a two-way transmission channel with a remote control device, the two-way transmission channel is a target MQTT communication channel or a transit communication channel, the transit communication channel comprises a first communication channel and a second communication channel that are connected, the first communication channel refers to a standard protocol channel between the motor test bench and a preset edge computing device, the second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol, and the standard protocol channel refers to a channel based on a preset standard communication protocol;

[0036] A processing module is used to complete the communication with the remote control device based on the bidirectional transmission channel.

[0037] Beneficial effects of the present application: The present application provides a motor test bench remote communication method and device, which establishes a two-way transmission channel with the remote control device. The two-way transmission channel is a target MQTT communication channel or a transit communication channel. The transit communication channel includes a first communication channel and a second communication channel that are connected. The first communication channel refers to a standard protocol channel between the motor test bench and a preset edge computing device. The second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol. The standard protocol channel refers to a channel based on a preset standard communication protocol. Based on the two-way transmission channel, the communication with the remote control device is completed. This method can better realize the two-way communication between the motor test bench and the remote control device, with high transmission efficiency and strong feasibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1A schematic diagram of a flow chart of a motor test bench remote communication method provided in one embodiment of the present application;

[0039] Figure 2 A schematic diagram of a process flow of data transmission in a motor test bench remote communication method provided in an embodiment of the present application;

[0040] Figure 3 Another schematic diagram of a data transmission process in a motor test bench remote communication method provided in an embodiment of the present application;

[0041] Figure 4 This is a schematic diagram of the structure of a motor stand remote communication device provided in one embodiment of the present application;

[0042] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0043] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0044] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.

[0045] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.

[0046] Combine the following Figures 1 to 5 , the motor test bench remote communication method and device provided in this application are explained.

[0047] See also Figure 1 , Figure 1 A flow chart of a motor test bench remote communication method provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:

[0048] S110: Establish a two-way transmission channel with a remote control device, wherein the two-way transmission channel is a target MQTT (Message Queuing Telemetry Transport) communication channel or a transit communication channel, wherein the transit communication channel includes a first communication channel and a second communication channel that are connected, wherein the first communication channel refers to a standard protocol channel between the motor test bench and a preset edge computing device, and the second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol, and the standard protocol channel refers to a channel based on a preset standard communication protocol.

[0049] It should be noted that the execution subject of the motor test stand remote communication method provided in this application is the motor test stand. In some embodiments, the execution subject may be a control cabinet of the motor test stand. The remote control device may be a PC (personal computer) or the like.

[0050] It should also be noted that both the target MQTT communication channel and the second communication channel are channels built based on the MQTT protocol, and the difference lies in the communication subject. The communication subjects of the target MQTT communication channel are the motor test bench and the remote control device, that is, the motor test bench and the remote control device communicate through the target MQTT communication channel. The communication subjects of the second communication channel are the edge computing device and the remote control device, that is, the edge computing device and the remote control device communicate through the second communication channel. The standard communication protocol can be EtherCAT (Ethernet for Control Automation Technology) protocol, etc.

[0051] It should be mentioned that by using the standard communication protocol for communication, data transmission can be completed within milliseconds, ensuring the real-time nature of data transmission. By using the lightweight protocol MQTT for communication, it can better adapt to application scenarios with limited bandwidth or resources, and reduce data transmission power consumption.

[0052] It is also necessary to mention that in the specific implementation process, if the control cabinet of the motor test stand has the MQTT client function, a target MQTT communication channel can be established with the remote control device; if the control cabinet of the motor test stand does not have the MQTT client function and lacks the conditions for a built-in MQTT client, a standard communication protocol can be used to build a standard protocol channel with the remote control device, which has strong compatibility.

[0053] In addition, the edge computing device can be an industrial 4G / 5G gateway, etc.

[0054] S120: Complete communication with the remote control device based on the bidirectional transmission channel.

[0055] It should be noted that by establishing the bidirectional transmission channel, bidirectional communication between the motor test bench and the remote control device can be better achieved. Specifically, the motor test bench can transmit the collected sensor data to the remote control device in a timely manner through the bidirectional transmission channel, and the remote control device can also issue corresponding control instructions to the motor test bench through the bidirectional transmission channel, thereby achieving control of the motor test bench. In addition, the remote control device can remotely process the data uploaded by the motor test bench to improve the efficiency of motor testing.

[0056] In some embodiments, the step of establishing a target MQTT communication channel with a remote control device includes:

[0057] 1. Create the first MQTT client instance.

[0058] Specifically, the first MQTT client instance is created in a control cabinet of the motor stand.

[0059] 2. Obtain connection parameters, which include the address and port of the preset target MQTT server.

[0060] 3. Connect the first MQTT client instance to the target MQTT server according to the connection parameters; the channel between the first MQTT client instance, the target MQTT server, and the second MQTT client instance preset in the remote control device constitutes the target MQTT communication channel.

[0061] It should be noted that in the process of establishing the target MQTT communication channel with the remote control device, the remote control device executes the following steps: 1. creating a second MQTT client instance; 2. obtaining the connection parameters; 3. connecting the second MQTT client instance to the target MQTT server according to the connection parameters; 4. subscribing to the topic to be monitored.

[0062] It should also be noted that, through the above steps, the creation of the target MQTT communication channel can be well achieved.

[0063] In some embodiments, the step of establishing a relay communication channel with a remote control device includes:

[0064] 1. Receive a configuration command sent by the edge computing device, where the configuration command is sent by the edge computing device by calling a connection establishment method in a standard communication protocol library.

[0065] 2. Perform state configuration according to the configuration command, the state configuration includes: target parameter configuration, interface configuration, and input / output data buffer configuration, the target parameters include: input data type and output data type.

[0066] 3. When the state configuration is completed, establish the first communication channel with the edge computing device.

[0067] It should be noted that in the process of establishing the first communication channel, the execution steps of the edge computing device include: 1. Initializing the standard communication protocol (such as EtherCAT) connection; 2. Creating a standard communication protocol connection class to pass in the IP address (Internet Protocol address) of the motor test bench; 3. According to the standard communication protocol connection class, calling the connection establishment method in the standard communication protocol library, and sending a configuration command to the motor test bench to complete the establishment of the first communication channel.

[0068] 4. When it is determined that both the first communication channel and the second communication channel have been established, complete the establishment of the transit communication channel.

[0069] It should be noted that regarding the establishment of the second communication channel, the execution steps of the edge computing device include: first, initializing the MQTT connection; second, creating an edge device class to pass in the IP address of the standard communication protocol device (i.e., the motor test bench), the address and port of the target MQTT server, and the transmission frequency; then, creating a third MQTT client instance; finally, according to the edge device class, connecting the third MQTT client instance to the target MQTT server.

[0070] In addition, regarding the establishment of the second communication channel, the execution steps of the remote control device include: first, creating a fourth MQTT client instance; second, obtaining connection parameters; third, connecting the fourth MQTT client instance to the target MQTT server according to the connection parameters; and fourth, subscribing to the topic to be monitored.

[0071] It should be mentioned that, when the first communication channel and the second communication channel are established, the edge computing device can obtain the data collected by each sensor on the motor stand in real time through the first communication channel; and, according to the transmission frequency, regularly publish the collected data to the corresponding topic of the target MQTT server. The target MQTT server sends the data in the topic to the remote control device so that the remote control device can process the data.

[0072] In some embodiments, based on the bidirectional transmission channel, the step of completing the communication with the remote control device includes:

[0073] If the bidirectional transmission channel is the target MQTT communication channel, the target data is published to a first target topic of a preset target MQTT server to complete the data transmission from the motor stand to the remote control device;

[0074] The target data is obtained based on sensor data collected by at least one sensor preset on the motor stand, and the first target topic is subscribed by the remote control device so that the remote control device receives the target data in real time.

[0075] It should be noted that, when the motor test bench publishes the target data to the first target topic of the target MQTT server, the target MQTT server sends the data in the first target topic to the second MQTT client instance of the remote control device. Through the above steps, it is convenient for the remote control device to directly obtain the target data from the motor test bench, and realize lightweight communication between the motor test bench and the remote control device.

[0076] In some embodiments, based on the bidirectional transmission channel, the step of completing the communication with the remote control device includes:

[0077] 1. If the bidirectional transmission channel is the target MQTT communication channel, then the control instruction published by the remote control device through the target MQTT communication channel is received, and the control instruction is an instruction published by the remote control device to the second target topic of the target MQTT server, and the motor test stand subscribes to the second target topic.

[0078] The control instruction is a start instruction (START) or a stop instruction (STOP).

[0079] 2. Based on the control instruction, execute corresponding control operations, wherein the control operations include starting the bench equipment and stopping the bench equipment.

[0080] It should be noted that, through the above steps, it is possible to remotely control the control device to start and stop the test bench equipment. Specifically, the control cabinet of the motor test bench performs the corresponding control operation when receiving the control command. The test bench equipment refers to the main part of the motor test bench, including: a motor drive device, a test load device, and a measurement system (including various sensors).

[0081] In some embodiments, based on the bidirectional transmission channel, the step of completing the communication with the remote control device includes:

[0082] If the bidirectional transmission channel is the transit communication channel, the target data will be transmitted to the edge computing device through the first communication channel in response to the data read instruction sent by the edge computing device.

[0083] The target data is obtained based on the sensor data collected by at least one sensor preset on the motor test stand. The target data in the edge computing device is data that needs to be published to a third target topic. The third target topic is a topic in a preset target MQTT server, and the third target topic is subscribed by the remote control device.

[0084] It should be noted that, through the above steps, the target data can be transmitted to the remote control device well. In addition, in order to better meet the requirements of motor performance testing, different transmission frequencies can be set in the control cabinet of the motor test bench to regularly transmit the target data to the remote control device according to the transmission frequency. The data transmission frequency may be once per second or once every 500 milliseconds.

[0085] In some embodiments, based on the bidirectional transmission channel, the step of completing the communication with the remote control device includes:

[0086] 1. If the bidirectional transmission channel is the transit communication channel, then the control instruction sent by the edge computing device through the first communication channel is received, and the control instruction is published to the edge computing device by a preset target MQTT server. The control instruction in the target MQTT server is the data published by the remote control device to the fourth target topic, and the fourth target topic is the preset topic in the target MQTT server.

[0087] 2. Based on the control instruction, execute corresponding control operations, wherein the control operations include starting the bench equipment and stopping the bench equipment.

[0088] It should be noted that, through the above steps, the control of the bench equipment can be better achieved.

[0089] In some embodiments, the step of completing communication with the remote control device based on the bidirectional transmission channel further includes:

[0090] Feedback information is transmitted to the remote control device through the target MQTT communication channel or the transit communication channel, and the feedback information includes: the operating status of the motor test bench, the execution status of the control operation, and the error information of the motor test bench.

[0091] It should be noted that through the above steps, the control cabinet of the motor test bench can transmit the feedback information to the remote control device in a timely manner during the data collection and transmission process, so that the remote control device can monitor the status of the motor test bench. The execution of the control operation is such as the successful stop of the test bench equipment. Error information such as startup failure, overtemperature, stop failure, and network abnormality. After receiving the feedback information, the remote control device can take corresponding processing measures.

[0092] In order to reduce the noise of the sensor data and reduce the data processing pressure of the remote control device, in this embodiment, the sensor data collected by the sensor on the test stand is preprocessed (denoised) to obtain the target data. Specifically, the step of obtaining the target data includes:

[0093] 1. Acquire sensor data collected by at least one sensor preset on the motor stand.

[0094] It should be noted that the sensor data of multiple sensors can be collected through the data acquisition module preset in the motor cabinet of the motor test stand, and the collected sensor data can be converted from analog signals to digital signals. The sensor data converted into digital signals are temporarily stored in the local storage to facilitate subsequent preprocessing and avoid data loss.

[0095] 2. Determine the current sensor data and the rate of change of the sensor data as state variables; perform state prediction based on the value of the state variable at the previous moment and the preset nonlinear state transfer model to obtain the state prediction result; perform covariance prediction based on the current value of the state variable to obtain the current covariance matrix prediction result.

[0096] It should be noted that different types of sensors collect different types of sensor data, so the sensor data includes motor torque, speed, and current response value. The preprocessing process of each type of sensor data is performed independently. The following takes the motor torque as an example to explain the preprocessing process.

[0097] First, define the state variable, the mathematical expression of the state variable is:

[0098]

[0099] Among them, x k represents the state variable, T k represents the motor torque at the current moment k, Indicates the rate of change of motor torque.

[0100] Since there is a certain relationship between the state variables at adjacent moments, which is usually a nonlinear relationship, we can get x k Another way to express it:

[0101] x k =f(x k-1 ,u k )+w k

[0102] Among them, f(x k-1 ,u k ) is a nonlinear function used to predict the state variables at time k based on the relationship between the state variables at adjacent moments and the state variables at the previous moment, i.e., time k-1. k Indicates control input, such as various control instructions of the control cabinet of the output motor rack, etc. k is the process noise.

[0103] Next, initialize the state variables That is, the estimated value of the state variable. It can be understood that if the current variable prediction is the first time, the value of the state variable last time is missing, so it is necessary to set the estimated value of the state variable to complete the initialization of the state variable. In addition, the state covariance matrix P0 is initialized for subsequent predictions. In addition, the process noise covariance Q and the measurement noise covariance R are set.

[0104] Then, for each time k, the preset nonlinear state transfer model is used to perform state prediction and obtain the state prediction result. The mathematical expression of this step is:

[0105]

[0106] in, Indicates the state prediction result at the current moment, The state prediction result of the previous moment. It can be understood that if this is the first time to perform state prediction, then for is the mathematical expression of the nonlinear state transfer model.

[0107] Next, obtain the nonlinear state transfer model about x k The Jacobian matrix of the current moment is obtained by taking the derivative of the nonlinear state transfer model. According to the Jacobian matrix and the covariance matrix of the previous moment, the covariance prediction is performed to obtain the current covariance matrix prediction result. The mathematical expression of this step is:

[0108] P k - =F k ·P k-1 ·F k T +Q

[0109] Among them, P k -F represents the covariance matrix prediction result. It can be understood that the covariance matrix prediction result at the current moment is used to perform covariance prediction at the next moment. k represents the above Jacobian matrix, P k-1 represents the covariance matrix of the previous moment. It can be understood that if this prediction is the first prediction, then P k-1 P0, F k T Indicates F k The transpose of .

[0110] 3. According to a preset nonlinear observation function, the state prediction result is predicted by observation value to obtain the observation value prediction result; the target Jacobian matrix of the observation value prediction result is obtained; and the Kalman gain is obtained according to the covariance matrix prediction result and the target Jacobian matrix.

[0111] For ease of understanding, the following explanation is still based on the example of motor torque.

[0112] It should be noted that there is a certain relationship between the state prediction result and the observation value at any time, and the nonlinear observation function is a function used to describe this relationship. Specifically, according to the nonlinear observation function, the state prediction result is predicted by the observation value, and the mathematical expression of the observation value prediction result is obtained as follows:

[0113]

[0114] in, represents the predicted result of the observed value, and h(·) represents the nonlinear observation function.

[0115] It should also be noted that through Take the derivative and get the target Jacobian matrix H k .

[0116] In addition, the mathematical expression of the Kalman gain is obtained as:

[0117] K k =P k - ·H k T ·(H k ·P k - ·H k T +R) -1

[0118] Among them, K k represents the Kalman gain, H k T Indicates H k The transpose of .

[0119] 4. According to the Kalman gain, the observation value prediction result, and the value of the state variable at the current moment, the state prediction result is updated to obtain a state update value; and, according to the Kalman gain, the covariance matrix prediction result is updated; according to the state update value, the target data is obtained.

[0120] The following explanation will be given using motor torque as an example.

[0121] The mathematical expression for updating the state prediction result is:

[0122]

[0123] in, Indicates the state update value, z k Represents the actual observed value, that is, the value of the state variable at the current moment.

[0124] The mathematical expression for updating the covariance matrix prediction result is:

[0125] P k =(IK k ·H k )·P k -

[0126] Among them, P k is the updated covariance matrix, which is used for the next prediction, and I is the unit matrix of the same dimension as the state variable.

[0127] It should be noted that by repeating the above steps, the prediction and update of multiple continuous state variables can be completed, thereby removing the noise interference in the sensor data. In addition, in order to ensure the accuracy of the above denoising process, it also includes: setting constraints to ensure the rationality and accuracy of the target data. The constraints can be preset upper and lower limits of the motor torque, etc. In addition, in addition to the above denoising steps, other methods can also be used to reduce the noise interference of the data, such as filtering.

[0128] It should be mentioned that the torque value in the above-mentioned state update value is the target data.

[0129] The above is an explanation of the preprocessing process of the motor torque. The same is true for other types of sensor data, which will not be repeated here.

[0130] In some embodiments, in order to facilitate data transmission and reading, the target data is stored in the local storage in a preset data structure, and the data structure includes: time value (data acquisition time), target data, and actual state of the sensor, etc. Each set of data corresponds to a unique timestamp. Taking the motor torque as an example, the corresponding data structure is {"timestamp":"time value", "torque": specific torque value, "sensor_status":"actual state of the sensor"}. The storage format can be JSON format (a lightweight data exchange format) and the like.

[0131] In order to ensure the integrity and security of data transmission, some embodiments introduce a verification mechanism, please refer to Figure 2 , Figure 2 A schematic diagram of a flow chart of data transmission in a motor test bench remote communication method provided in an embodiment of the present application includes:

[0132] First, the data to be transmitted is compressed and packaged to obtain an initial data packet. The data to be transmitted may be target data and feedback information that need to be transmitted to the remote control.

[0133] Secondly, a target check code is generated according to a preset check code generation rule, such as a CRC32 (cyclic redundancy check 32-bit) check code or an MD5 check code (a check code obtained by performing a hash operation on the data to be transmitted).

[0134] Finally, the target check code is added to the initial data packet to obtain the data packet to be sent.

[0135] Correspondingly, when the remote control terminal receives the data packet to be sent, first, the data packet to be sent is parsed, and the parsing process includes: performing integrity check on the target check code, if the check passes, it is determined that the data transmission is successful; if the check fails, a retransmission request is sent to the motor test stand. The retransmission request is used to instruct the control cabinet of the motor test stand to resend the data packet to be sent. If the retransmission fails, it is determined whether the control cabinet has regenerated the target check code. If so, the data transmission is terminated. If not, wait for the control cabinet to retransmit the data.

[0136] In order to ensure the continuity of data transmission, the above-mentioned transmission based on the MQTT protocol uses QoS (Quality of Service) level 1 to ensure that the data packet to be transmitted is successfully transmitted at least once. If data transmission fails, the number of failures is recorded. If the cumulative number of failures is greater than or equal to the preset minimum threshold of failures, such as 3 times, and less than or equal to the preset maximum threshold of failures, such as 5 times, switch to the backup MQTT server and re-transmit data. If the cumulative number of failures is less than the minimum threshold of failures, re-transmit data. If the cumulative number of failures is greater than the maximum threshold of failures, end this data transmission.

[0137] Figure 3 Another flowchart of data transmission in the motor test bench remote communication method provided in one embodiment of the present application is provided. Please refer to Figure 3 , taking the transit communication channel as an example, assuming that data communication is currently performed based on the transit communication channel, then for the edge computing device, its execution steps include:

[0138] First, a standard communication protocol (such as EtherCAT) connection is initialized.

[0139] Second, initialize the third MQTT client instance.

[0140] Then, data reading is performed. Specifically, a data reading instruction is sent to the control cabinet of the motor stand through the first communication channel to obtain the data packet to be transmitted transmitted by the control cabinet.

[0141] Next, data transmission is performed. Specifically, the data packet to be transmitted is sent to the third target topic of the target MQTT server through the third MQTT client instance, and the target MQTT server sends the data packet to be transmitted to the remote control device subscribed to the third target topic.

[0142] Finally, determine whether the transmission is successful. If the transmission is successful, end the current transmission. If the transmission fails, record the number of failures and determine whether the accumulated number of failures is greater than or equal to the minimum threshold of failures (such as 3 times). If not, retransmit the data. If so, determine whether the accumulated number of failures is less than or equal to the maximum threshold of failures (such as 5 times). If so, end the current data transmission. If not, switch to the backup MQTT server and retransmit the data.

[0143] In some embodiments, in order to better complete the motor performance test, the execution step of the control cabinet of the motor test bench also includes: dynamically adjusting the transmission frequency according to the change rate of the target data. Specifically, if the change rate of the target data is greater than or equal to a preset first change rate threshold, the transmission frequency is increased; if the change rate of the target data is less than or equal to a preset second change rate threshold, the transmission frequency is reduced. The first change rate threshold is greater than the second change rate threshold.

[0144] The motor test bench remote communication device provided in the present application is described below. The motor test bench remote communication device described below and the motor test bench remote communication method described above can be referenced to each other.

[0145] Please refer to Figure 4 The motor stand remote communication device provided in this embodiment includes:

[0146] A channel establishment module 410 is used to establish a bidirectional transmission channel with a remote control device, wherein the bidirectional transmission channel is a target MQTT communication channel or a transit communication channel, wherein the transit communication channel includes a first communication channel and a second communication channel that are connected, wherein the first communication channel refers to a standard protocol channel between the motor stand and a preset edge computing device, wherein the second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol, and wherein the standard protocol channel refers to a channel based on a preset standard communication protocol;

[0147] The processing module 420 is used to complete the communication with the remote control device based on the two-way transmission channel. The channel establishment module 410 is connected to the processing module 420. The motor stand remote communication device in this embodiment can better realize the two-way communication between the motor stand and the remote control device, with high transmission efficiency and low cost.

[0148] In some embodiments, the channel establishment module 410 is specifically used to create a first MQTT client instance;

[0149] Obtain connection parameters, including the address and port of a preset target MQTT server;

[0150] According to the connection parameters, the first MQTT client instance is connected to the target MQTT server; the channel between the first MQTT client instance, the target MQTT server, and the second MQTT client instance preset in the remote control device constitutes the target MQTT communication channel.

[0151] In some embodiments, the channel establishment module 410 is specifically used to receive a configuration command sent by the edge computing device, where the configuration command is sent by the edge computing device by calling a connection establishment method in a standard communication protocol library;

[0152] According to the configuration command, state configuration is performed, wherein the state configuration includes: target parameter configuration, interface configuration, and input / output data buffer configuration, wherein the target parameter includes: input data type and output data type;

[0153] When the state configuration is completed, establishing the first communication channel with the edge computing device;

[0154] When it is determined that both the first communication channel and the second communication channel have been established, the establishment of the transit communication channel is completed.

[0155] In some embodiments, the processing module 420 is specifically used to publish the target data to a first target topic of a preset target MQTT server if the bidirectional transmission channel is the target MQTT communication channel, so as to complete the data transmission from the motor stand to the remote control device;

[0156] The target data is obtained based on sensor data collected by at least one sensor preset on the motor stand, and the first target topic is subscribed by the remote control device so that the remote control device receives the target data in real time.

[0157] In some embodiments, the processing module 420 is specifically used to receive a control instruction published by the remote control device through the target MQTT communication channel if the bidirectional transmission channel is the target MQTT communication channel, wherein the control instruction is an instruction published by the remote control device to a second target topic of the target MQTT server, and the motor stand subscribes to the second target topic;

[0158] Based on the control instruction, a corresponding control operation is performed, and the control operation includes starting the gantry device and stopping the gantry device.

[0159] In some embodiments, the processing module 420 is specifically configured to transmit the target data to the edge computing device through the first communication channel in response to a data read instruction sent by the edge computing device if the bidirectional transmission channel is the transit communication channel;

[0160] The target data is obtained based on the sensor data collected by at least one sensor preset on the motor test stand. The target data in the edge computing device is data that needs to be published to a third target topic. The third target topic is a topic in a preset target MQTT server, and the third target topic is subscribed by the remote control device.

[0161] In some embodiments, the processing module 420 is specifically used to receive a control instruction sent by the edge computing device through the first communication channel if the bidirectional transmission channel is the transit communication channel, the control instruction is published to the edge computing device by a preset target MQTT server, and the control instruction in the target MQTT server is data published by the remote control device to a fourth target topic, and the fourth target topic is a topic preset in the target MQTT server;

[0162] Based on the control instruction, a corresponding control operation is performed, and the control operation includes starting the gantry device and stopping the gantry device.

[0163] In some embodiments, the processing module 420 is also specifically used to transmit feedback information to the remote control device through the target MQTT communication channel or the transit communication channel, and the feedback information includes: the operating status of the motor test stand, the execution status of the control operation, and the error information of the motor test stand.

[0164] In some embodiments, the processing module 420 is further specifically used to obtain sensor data collected by at least one sensor preset on the motor stand;

[0165] Determine the current sensor data and the rate of change of the sensor data as state variables; perform state prediction based on the value of the state variable at the previous moment and a preset nonlinear state transition model to obtain a state prediction result; perform covariance prediction based on the current value of the state variable to obtain a current covariance matrix prediction result;

[0166] According to a preset nonlinear observation function, the state prediction result is predicted by an observation value to obtain an observation value prediction result; a target Jacobian matrix of the observation value prediction result is obtained; and a Kalman gain is obtained according to the covariance matrix prediction result and the target Jacobian matrix;

[0167] According to the Kalman gain, the observation value prediction result, and the value of the state variable at the current moment, the state prediction result is updated to obtain a state update value; and, according to the Kalman gain, the covariance matrix prediction result is updated; and according to the state update value, the target data is obtained.

[0168] This embodiment also provides a control cabinet, including the motor stand remote communication device as described above.

[0169] This embodiment also provides a motor stand, including the control cabinet as described above.

[0170] In some embodiments, an electronic device is also provided, which may be a server, and its internal structure is shown in FIG. Figure 5 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of the above method are implemented.

[0171] In some embodiments, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: a two-way transmission channel is established with a remote control device, the two-way transmission channel is a target MQTT communication channel or a transit communication channel, the transit communication channel includes a first communication channel and a second communication channel that are connected, the first communication channel refers to a standard protocol channel between a motor stand and a preset edge computing device, the second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol, and the standard protocol channel refers to a channel based on a preset standard communication protocol; based on the two-way transmission channel, communication with the remote control device is completed.

[0172] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: a two-way transmission channel is established with a remote control device, the two-way transmission channel is a target MQTT communication channel or a transit communication channel, the transit communication channel includes a connected first communication channel and a second communication channel, the first communication channel refers to a standard protocol channel between a motor stand and a preset edge computing device, the second communication channel refers to a channel based on the MQTT protocol between the edge computing device and the remote control device, and the standard protocol channel refers to a channel based on a preset standard communication protocol; based on the two-way transmission channel, communication with the remote control device is completed.

[0173] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0174] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0175] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A motor test bench remote communication method, characterized in that: include: Establish a bidirectional transmission channel with a remote control device, wherein the bidirectional transmission channel is a target MQTT communication channel or a transit communication channel, wherein the transit communication channel includes a first communication channel and a second communication channel that are connected, wherein the first communication channel refers to a standard protocol channel between the motor stand and a preset edge computing device, and the second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol, and the standard protocol channel refers to a channel based on a preset standard communication protocol; Based on the bidirectional transmission channel, communication with the remote control device is completed.

2. The motor stand remote communication method according to claim 1, characterized in that: The steps to establish a target MQTT communication channel with a remote control device include: Create the first MQTT client instance; Obtain connection parameters, including the address and port of a preset target MQTT server; According to the connection parameters, the first MQTT client instance is connected to the target MQTT server; the channel between the first MQTT client instance, the target MQTT server, and the second MQTT client instance preset in the remote control device constitutes the target MQTT communication channel.

3. The motor stand remote communication method according to claim 2, characterized in that: The steps of establishing a relay communication channel with a remote control device include: Receiving a configuration command sent by the edge computing device, where the configuration command is sent by the edge computing device by calling a connection establishment method in a standard communication protocol library; According to the configuration command, state configuration is performed, wherein the state configuration includes: target parameter configuration, interface configuration, and input / output data buffer configuration, wherein the target parameter includes: input data type and output data type; When the state configuration is completed, establishing the first communication channel with the edge computing device; When it is determined that both the first communication channel and the second communication channel have been established, the establishment of the transit communication channel is completed.

4. The motor stand remote communication method according to claim 1, characterized in that: Based on the bidirectional transmission channel, the steps of completing the communication with the remote control device include: If the bidirectional transmission channel is the target MQTT communication channel, the target data is published to a first target topic of a preset target MQTT server to complete the data transmission from the motor stand to the remote control device; The target data is obtained based on sensor data collected by at least one sensor preset on the motor stand, and the first target topic is subscribed by the remote control device so that the remote control device receives the target data in real time.

5. The motor stand remote communication method according to claim 1, characterized in that: Based on the bidirectional transmission channel, the steps of completing the communication with the remote control device include: If the bidirectional transmission channel is the target MQTT communication channel, then receiving a control instruction issued by the remote control device through the target MQTT communication channel, the control instruction is an instruction issued by the remote control device to a second target topic of the target MQTT server, and the motor stand subscribes to the second target topic; Based on the control instruction, a corresponding control operation is performed, and the control operation includes starting the gantry device and stopping the gantry device.

6. The motor stand remote communication method according to claim 1, characterized in that: Based on the bidirectional transmission channel, the steps of completing the communication with the remote control device include: If the bidirectional transmission channel is the transit communication channel, the target data is transmitted to the edge computing device through the first communication channel in response to the data read instruction sent by the edge computing device; The target data is obtained based on the sensor data collected by at least one sensor preset on the motor test stand. The target data in the edge computing device is data that needs to be published to a third target topic. The third target topic is a topic in a preset target MQTT server, and the third target topic is subscribed by the remote control device.

7. The motor stand remote communication method according to claim 1, characterized in that: Based on the bidirectional transmission channel, the steps of completing the communication with the remote control device include: If the two-way transmission channel is the transit communication channel, then receiving a control instruction sent by the edge computing device through the first communication channel, the control instruction is published to the edge computing device by a preset target MQTT server, and the control instruction in the target MQTT server is data published by the remote control device to a fourth target topic, and the fourth target topic is a topic preset in the target MQTT server; Based on the control instruction, a corresponding control operation is performed, and the control operation includes starting the gantry device and stopping the gantry device.

8. The motor stand remote communication method according to claim 5 or 7, characterized in that: Based on the bidirectional transmission channel, the step of completing the communication with the remote control device further includes: Feedback information is transmitted to the remote control device through the target MQTT communication channel or the transit communication channel, and the feedback information includes: the operating status of the motor test bench, the execution status of the control operation, and the error information of the motor test bench.

9. The motor stand remote communication method according to claim 4 or 6, characterized in that: The step of acquiring the target data comprises: Acquiring sensor data collected by at least one sensor preset on the motor stand; Determine the current sensor data and the rate of change of the sensor data as state variables; perform state prediction based on the value of the state variable at the previous moment and a preset nonlinear state transition model to obtain a state prediction result; perform covariance prediction based on the current value of the state variable to obtain a current covariance matrix prediction result; According to a preset nonlinear observation function, the state prediction result is predicted by an observation value to obtain an observation value prediction result; a target Jacobian matrix of the observation value prediction result is obtained; and a Kalman gain is obtained according to the covariance matrix prediction result and the target Jacobian matrix; According to the Kalman gain, the observation value prediction result, and the value of the state variable at the current moment, the state prediction result is updated to obtain a state update value; and, according to the Kalman gain, the covariance matrix prediction result is updated; and according to the state update value, the target data is obtained.

10. A motor stand remote communication device, characterized in that: include: A channel establishment module, used to establish a bidirectional transmission channel with a remote control device, wherein the bidirectional transmission channel is a target MQTT communication channel or a transit communication channel, wherein the transit communication channel includes a first communication channel and a second communication channel that are connected, wherein the first communication channel refers to a standard protocol channel between the motor stand and a preset edge computing device, wherein the second communication channel refers to a channel between the edge computing device and the remote control device based on the MQTT protocol, and wherein the standard protocol channel refers to a channel based on a preset standard communication protocol; A processing module is used to complete the communication with the remote control device based on the bidirectional transmission channel.

Citation Information

Patent Citations

  • A remote control method based on MQTT protocol

    CN109088723A

  • Vehicle remote monitoring method and device, intelligent vehicle, electronic equipment and storage medium

    CN110913371A

  • Vehicle control method based on MQTT protocol, terminal and vehicle-mounted communication equipment

    CN116367118A

  • Transmitting station monitoring method based on MQTT technology

    CN117118537A

  • Internet of Things architecture and Internet of Things system

    CN117319425A