Target vehicle remote control and data transmission system and method based on CAN-to-MQTT

By converting CAN to MQTT, combined with MQTT server and 5G network, the problem of balancing network bandwidth and real-time performance in vehicle remote control is solved, a low-latency and stable communication link is achieved, system costs are reduced and scalability is improved. It is suitable for remote monitoring and distributed control systems of multiple devices.

CN120729908APending Publication Date: 2025-09-30SHENZHEN TECH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510971591.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

Existing vehicle remote control technology has difficulty balancing network bandwidth utilization and the real-time performance of control instructions in medium and low-speed scenarios. Traditional equipment is costly and lacks flexibility. CAN protocol instructions conflict between multiple devices, communication link data distribution management is poor, and real-time performance needs to be improved.

Method used

Using an MQTT server and protocol conversion device, a communication link is established by converting CAN to MQTT. Utilizing the high bandwidth and low latency characteristics of MQTT, different topics and pre-processing analysis are configured to achieve flexible access and data classification for multiple devices. 5G networks and WiFi are combined for data transmission. A Raspberry Pi 4B and Python scripts are used for protocol conversion, and CAN ID offsets are defined to resolve multi-device conflicts.

Benefits of technology

It achieves a low-latency and stable communication link, reduces the difficulty and cost of system integration, improves the system's scalability and data utilization value, and is suitable for a variety of cross-network transmission scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729908A_ABST
    Figure CN120729908A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle remote control, in particular to a CAN-to-MQTT-based target vehicle remote control and data transmission system and method.A low-delay and stable communication link is established by adopting an MQTT server, and a CAN-to-MQTT data communication link is realized by means of hardware equipment of Raspberry Pi 4B and a Python data protocol conversion script; the upper computer builds target vehicle remote driving, and feeds back the road driving condition in real time by means of a camera. According to the method, a lower-delay and more stable control and communication link can be provided based on the DBC of original equipment, consumption-level hardware and an industrial-level communication protocol are deeply fused, the system cost is remarkably reduced on the premise that the performance is guaranteed, a replicable engineering normal form is provided for a remote control technology in a medium-low speed scene, and the method is suitable for popularization and application. When a plurality of interference target vehicles execute a standard test working condition, the interference test scene can be realized by remote control of a safety officer and sending of an automatic driving control instruction by a terminal computer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle remote control, and in particular to a target vehicle remote control and data transmission system and method based on CAN to MQTT conversion. Background Art

[0002] With the rapid development of the Internet of Vehicles (IoV) and intelligent connected vehicle technologies, remote vehicle control and cloud collaboration have become key technical directions for promoting the implementation of autonomous driving and intelligent transportation systems. Existing research has initially established a hierarchical system and collaborative mechanism for vehicle cloud architecture. Through the architectural design and communication protocol optimization of 5G cloud networks, this provides the basic network support and technical framework for remote control of target vehicles.

[0003] However, current technologies still face significant bottlenecks in the engineering implementation of remote real-time control. Traditional connected vehicle technologies struggle to balance 5G / Wi-Fi network bandwidth utilization with the real-time requirements of control commands in low- and medium-speed scenarios, such as urban road testing and closed-campus debugging. Cross-layer conversion between the vehicle's underlying CAN bus protocol and cloud-based protocols like MQTT relies on high-performance hardware and lightweight algorithms. Existing solutions often utilize dedicated gateway devices, which are costly and lack flexibility, making them difficult to adapt to diverse testing scenarios. Conflicts between the same CAN protocol commands across multiple devices of the same type can lead to conflicts, making stable remote control of multiple devices impossible. While existing technologies can perform protocol conversions, such as CAN to 4G, their real-time performance needs improvement, multi-device adaptation presents challenges, and communication link data distribution and management are poor. Summary of the Invention

[0004] The technical problem to be solved by the present invention is: in order to overcome the above technical problems, the present invention provides a target vehicle remote control and data transmission system and method based on CAN to MQTT, which makes use of the characteristics of MQTT server and MQTT protocol with high bandwidth, low latency and adaptability to unstable network environment, so that the whole system has excellent message transmission reliability; the openness and standardization of MQTT make it possible for new equipment to be easily connected to the entire communication link as long as it follows the MQTT protocol specification, without having to worry about the complex adaptation problems with the original equipment of the CAN bus, which greatly reduces the difficulty of system integration and improves the scalability of the project; by configuring different MQTT topics, the distribution mode is flexible, and pre-processing and analysis can be performed to improve the data utilization value; it can be widely used in scenarios where CAN data needs to be transmitted across networks, such as remote monitoring, distributed control systems, etc.

[0005] The technical solution adopted by the present invention to solve its technical problem is: a target vehicle remote control and data transmission system based on CAN to MQTT, including: a host computer, an MQTT server, a protocol conversion device and a target vehicle.

[0006] Host computer: Use Simulink control model; MQTT server: used for data transmission, with publishing topics and receiving topics. It receives MQTT messages from protocol conversion devices that subscribe to the publishing topics. Other devices receive MQTT messages by subscribing to the topics. Different topics can be used to classify the transmitted data. Devices only need to subscribe to different topics to receive the data they need.

[0007] Protocol conversion device: Receives CAN message control instructions from the host computer through Python scripts, converts CAN message control instructions into MQTT messages, and sends them to the topic of the MQTT server via 5G network / WiFi; subscribes to the publishing topic of another device, converts its MQTT message into CAN message, and sends it to the target vehicle through the device's CAN port; Target vehicle: As the controlled object, it receives and executes the CAN message control instructions converted by the protocol conversion device, and at the same time feeds back vehicle status information such as speed, turning angle, gear position, etc. through the CAN bus.

[0008] It also includes a camera: connected to a protocol conversion device, by calling the Motion service, and using the local area network host computer to obtain real-time vehicle driving images.

[0009] The host computer and the target vehicle are respectively equipped with a protocol conversion device, which is used to convert the data received by the CAN port of the host computer and the target vehicle into MQTT messages and publish them to the MQTT server. At the same time, they subscribe to the messages on the MQTT server and convert them into CAN messages and send them to the CAN bus. The protocol conversion device is deployed with an MQTT server and a CAN to MQTT protocol conversion Python script, and the protocol conversion device is equipped with a Raspberry Pi 4B with a CAN HAT. The protocol converter defines a CAN ID offset to handle ID conflicts across multiple vehicles and devices. Vehicle or device IDs are defined as offsets to link multiple vehicles and devices, enabling data transmission across multiple vehicles and devices. The protocol converter reads CAN messages from the host computer and target vehicle and adds the CAN ID offset. The CAN data is converted into a specifically formatted MQTT message, which is published to an MQTT server topic. Subscribing to the topic in real time, the CAN ID offset is removed to restore the CAN message, and the protocol converter sends the CAN message to the host computer and target vehicle. The entire system supports data transmission across multiple CAN channels. Devices with the same CAN protocol are connected using CAN ID offsets. Buffer management prevents redundant backlogs, and a multi-threaded architecture design improves system real-time performance. The system is widely applicable in scenarios requiring cross-network CAN data transmission, such as remote monitoring and distributed control systems.

[0010] It also includes a remote driving control model, which includes a steering wheel pedal signal processing module, a Carsim virtual scene test module and a control signal conversion module. The steering wheel pedal signal processing module is used to switch the control signal by receiving the steering wheel pedal signal; the Carsim virtual scene test module is used to send the control signal output by the steering wheel pedal signal processing module to the host computer, convert it into actual control instructions to the Carsim vehicle dynamics model, and reflect it in the virtual scene; the control signal conversion module is used to convert the target vehicle CAN protocol output from the steering wheel pedal signal processing module into a recognizable expected speed, braking force, gear and front wheel angle, and send it to the target vehicle through the communication link. The target vehicle's status feedback is then sent back to the host computer by the link to obtain the vehicle's current motor speed, gear, parking status, steering motor angle and fault status.

[0011] A target vehicle remote control and data transmission method based on CAN to MQTT, using the target vehicle remote control and data transmission system based on CAN to MQTT of the present invention, comprises the following steps: Step 1: Establish 5G network + MQTT server communication link: The 5G network + MQTT server communication link includes the host computer sending control commands to the target vehicle and the target vehicle feedback vehicle status to the host computer; The host computer sends control instructions to the target vehicle: The Simulink control model in the host computer sends CAN message control instructions to the host computer protocol conversion device for protocol conversion to MQTT messages, which are then sent to the publishing topic of the MQTT server via WiFi. The vehicle-side protocol conversion device subscribes to the publishing topic, converts the MQTT messages into CAN messages, and sends them to the target vehicle to execute the control instructions of the host computer; The target vehicle feeds back vehicle status to the host computer: The target vehicle's VCU (vehicle controller) feeds back vehicle status information, such as speed, gear position, front wheel angle, braking force, etc., to the vehicle-side protocol conversion device via CAN messages. The protocol is converted into MQTT messages and published to the subscription topic. The host-side protocol conversion device subscribes to the topic to obtain vehicle feedback information, make the next plan, and send control instructions. The two data streams realize a closed data loop, jointly establish communication between the terminal and the target vehicle, and enable the remote driving of the target vehicle to execute the planned path.

[0012] Step 2: Establish a remote driving control model: The remote driving control model mainly packages the control signals input by the steering wheel and pedals into CAN messages that can be recognized by the target vehicle, and unpacks the received vehicle status CAN messages. The host computer and Carsim jointly simulate to build a virtual scene, receive control inputs and vehicle status in real time, and feed them back to the virtual scene. Step 3: Multiple remote control target vehicle link implementation and communication link delay test.

[0013] Considering the need for real-time data transmission and the data backlog problem in the CAN buffer, data in the CAN send buffer is regularly cleared to prevent buffer overflow and improve system reliability. To cope with data processing of multiple CAN ports, multiple data processing threads are designed to read and publish to prevent data congestion.

[0014] Currently, it is difficult to handle the situation where the same CANDBC (Controller Area Network Database) controller sends control commands and receives feedback information from multiple vehicles of the same type at the same time. The same situation also occurs when controlling multiple vehicles, such as on-board VCUs, integrated inertial navigation systems, lidars, and other equipment and sensors.

[0015] The established communication link also performs CAN ID offset processing during the link process, ensuring that the initial CANDBC is not changed while solving the problem of multi-vehicle and multi-device data interaction with the terminal host computer. The specific process of step 3 is as follows: Step 31: Establish multiple CAN sending modules and multiple CAN receiving modules in the Simulink model established by the host computer; Step 32: The communication link configures different sending and receiving subscription topics according to the offset of the host computer to distinguish different devices in different vehicles; Step 33: The protocol conversion device subscribes to the publishing topic of the host computer and publishes data to the receiving topic of the host computer; subtracts the offset from the control instruction received from the subscription topic, sends data back to the publishing topic, and adds the offset to the data.

[0016] In step 31, configure the ID rules as follows: The number of vehicles on the host computer is N, and the number of acquisition devices required for each vehicle is M, so there are a total of S devices that need to be processed, where S=N*M; the CAN ID is hexadecimal, and the host computer mainly changes the last two digits when modifying it. The first digit consists of 1 to N, and the second digit consists of 1 to M.

[0017] The present invention provides a system and method for remote control and data transmission of target vehicles based on CAN to MQTT. This system and method utilizes a 5G network / WiFi + MQTT server to establish a low-latency and stable communication link. This CAN to MQTT data communication link is implemented using Raspberry Pi 4B hardware and a Python data protocol conversion script. A host computer controls the target vehicle remotely, using a high-definition camera to provide real-time feedback on road conditions. A Logitech steering wheel serves as a driving model input for the driver to remotely control the vehicle. This system provides a lower-latency, more stable control and communication link using native device-based DBC. It deeply integrates consumer-grade hardware with industrial-grade communication protocols (CAN and MQTT), significantly reducing system costs while ensuring performance. This system provides a replicable engineering paradigm for remote control technology in low- and medium-speed scenarios. Specifically, it is applicable to multiple jamming target vehicles performing standard test conditions, with safety personnel remotely controlling them and terminal computers sending autonomous driving control commands to implement jamming test scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The present invention will be further described below with reference to the accompanying drawings and examples.

[0019] Figure 1 This is the architecture diagram of the vehicle control and feedback system based on the MQTT protocol of the present invention.

[0020] Figure 2 It is an overall model diagram of the remote driving control model of the present invention.

[0021] Figure 3 4 is a model architecture diagram of the remote driving control model of the present invention.

[0022] Figure 4 This is a Carsim virtual scene perspective diagram of the present invention.

[0023] Figure 5 It is a schematic diagram of the remote hardware communication link of the present invention.

[0024] Figure 6 This is a link delay test effect diagram of the present invention.

[0025] Figure 7 This is a rendering of the remote driving test of the present invention. DETAILED DESCRIPTION

[0026] The present invention will now be described in further detail with reference to the accompanying drawings. It should be emphasized that the following description is merely exemplary and is not intended to limit the scope of the present invention and its application.

[0027] like Figure 1As shown, a target vehicle remote control and data transmission system based on CAN to MQTT of the present invention includes: a host computer, an MQTT server, a protocol conversion device and a target vehicle.

[0028] Host computer: Use Simulink control model; MQTT server: used for data transmission, with publishing topics and receiving topics. It receives MQTT messages from protocol conversion devices that subscribe to the publishing topics. Other devices receive MQTT messages by subscribing to the topics. Different topics can be used to classify the transmitted data. Devices only need to subscribe to different topics to receive the data they need.

[0029] Protocol conversion device: Receives CAN message control instructions from the host computer through Python scripts, converts CAN message control instructions into MQTT messages, and sends them to the topic of the MQTT server through 5G network / WiFi; subscribes to the publishing topic of another device, converts its MQTT message into CAN message and sends it to the target vehicle through the device's CAN port; at the same time, the device provides various interfaces for subsequent development and use of various sensors.

[0030] Target vehicle: As the controlled object, it receives and executes the CAN message control instructions converted by the protocol conversion device, and at the same time feeds back vehicle status information such as speed, turning angle, gear position, etc. through the CAN bus.

[0031] It also includes a camera: connected to a protocol conversion device, by calling the Motion service, and using the local area network host computer to obtain real-time vehicle driving images.

[0032] The host computer and target vehicle each have a protocol conversion device. This device converts data received through their CAN ports into MQTT messages and publishes them to the MQTT server. It also subscribes to messages on the MQTT server and converts them into CAN messages, which are then sent to the CAN bus. This process requires defining various configuration parameters in a Python script, including CAN interface configuration, MQTT server configuration, and subscription and publication topics. Received CAN messages are formatted, processed, and packaged, enabling the device's WiFi network to transmit the MQTT messages remotely. This enables low-latency remote data transmission between the target vehicle and the cloud server in the connected vehicle network, allowing for remote control and real-time detection and diagnosis of the target vehicle. The protocol conversion device implements data conversion and communication between the CAN bus and the MQTT protocol. A Python script converts the format of received CAN messages, processes the data, and packages them for remote transmission of the MQTT messages. The protocol converter, which includes an MQTT server and a Python script for CAN-to-MQTT protocol conversion, is equipped with a Raspberry Pi 4B equipped with a CANHAT. The CAN HAT provides a high-speed CAN port for receiving the vehicle's IMU and feedback, enabling real-time collection and processing of CAN bus data. It also features an Ethernet port and WiFi module for deploying an MQTT cloud server on the local area network, providing a robust network environment. The device also provides a USB port for connecting to sensors such as cameras, providing feedback on road conditions to the driver and vehicle. like Figure 5 As shown, the protocol conversion device of the host computer converts the protocol into MQTT messages and sends them to the publishing topic of the MQTT server via WiFi; the protocol conversion device on the vehicle side subscribes to the publishing topic, and then converts the MQTT messages into CAN messages and sends them to the target vehicle to execute the control instructions of the host computer. The two protocol conversion devices are connected to the host computer and the target vehicle respectively, and send the information to the CAN BUS of the host computer controller. The controller and the PC are connected and communicated via UDP. The PC receives the vehicle status and sends control instructions in real time.

[0033] The protocol converter defines a CAN ID offset to address ID conflicts across multiple vehicles and devices. Vehicle or device IDs are defined as offsets to link multiple vehicles and devices, enabling data transmission across multiple vehicles and devices. The protocol converter reads CAN messages from the host computer and target vehicle and adds the CAN ID offset. The CAN data is converted into a specifically formatted MQTT message, which is published to an MQTT server topic. Subscribing to the topic in real time, the CAN ID offset is removed to restore the CAN message, and the protocol converter sends the CAN message to the host computer and target vehicle. The entire system supports data transmission across multiple CAN channels. Devices with the same CAN protocol are connected using CAN ID offsets. Buffer management prevents redundant backlogs, and a multi-threaded architecture design improves system real-time performance. The system is widely applicable in scenarios requiring cross-network CAN data transmission, such as remote monitoring and distributed control systems.

[0034] like Figure 2-3 As shown, it also includes a remote driving control model, which includes a steering wheel pedal signal processing module, a Carsim virtual scene test module and a control signal conversion module. The steering wheel pedal signal processing module is used to switch the control signal by receiving the steering wheel pedal signal; the Carsim virtual scene test module is used to send the control signal output by the steering wheel pedal signal processing module to the host computer, convert it into an actual control instruction to the Carsim vehicle dynamics model, and reflect it in the virtual scene; the control signal conversion module is used to convert the target vehicle CAN protocol output from the steering wheel pedal signal processing module into a recognizable expected speed, braking force, gear and front wheel angle, and send it to the target vehicle through the communication link. The target vehicle's status feedback is then sent back to the host computer by the link to obtain the vehicle's current motor speed, gear, parking status, steering motor angle and fault status.

[0035] Steering wheel pedal signal processing module: switches gears by receiving the left and right steering wheel paddles, processes the steering wheel input signal and outputs the number of forward and reverse steering circles. The accelerator pedal and brake pedal input signals are converted into acceleration force and braking force 0-1 and whether the steering wheel is online. If it is not online, all outputs are 0, increasing system redundancy.

[0036] Carsim virtual scene test module: The output of the steering wheel and pedal signal processing module is packaged and sent to the host computer via UDP. After signal processing, it is converted into actual acceleration and deceleration, wheel angle and gear position and fed into the Carsim vehicle dynamics model to reflect it in the virtual scene. Figure 4 shown.

[0037] Control signal conversion module: converts the output of the steering wheel pedal signal processing module into recognizable expected speed, braking force, gear position and front wheel angle according to the target vehicle CAN protocol, and sends it to the target vehicle through the communication link; the target vehicle's status feedback is then sent back to the host computer through the link to obtain the vehicle's current motor speed, gear position, parking status, steering motor angle and fault status.

[0038] A target vehicle remote control and data transmission method based on CAN to MQTT, using the target vehicle remote control and data transmission system based on CAN to MQTT of the present invention, comprises the following steps: Step 1: Establish 5G network + MQTT server communication link: The 5G network + MQTT server communication link includes the host computer sending control commands to the target vehicle and the target vehicle feedback vehicle status to the host computer; The host computer sends control instructions to the target vehicle: The Simulink control model in the host computer sends CAN message control instructions to the host computer protocol conversion device for protocol conversion to MQTT messages, which are then sent to the publishing topic of the MQTT server via WiFi. The vehicle-side protocol conversion device subscribes to the publishing topic, converts the MQTT messages into CAN messages, and sends them to the target vehicle to execute the control instructions of the host computer; The target vehicle feeds back vehicle status to the host computer: The target vehicle's VCU feeds back vehicle status information, such as speed, gear position, front wheel angle, braking force, etc., to the vehicle-side protocol conversion device via CAN messages. The protocol is converted into MQTT messages and published to the subscription topic. The host-side protocol conversion device subscribes to the topic to obtain vehicle feedback information, make the next plan, and send control instructions. The two data streams realize a closed data loop, jointly establish communication between the terminal and the target vehicle, and enable the remote driving of the target vehicle to execute the planned path.

[0039] Step 2: Establish a remote driving control model: The remote driving control model mainly packages the control signals input by the Logitech steering wheel and pedals into CAN messages that can be recognized by the target vehicle, and unpacks the received vehicle status CAN messages into visual data. The host computer and Carsim jointly simulate to build a virtual scene, receive control inputs and vehicle status in real time, and feed them back to the virtual scene. Step 3: Multiple remote control target vehicle link implementation and communication link delay test.

[0040] Considering the need for real-time data transmission and the data backlog problem in the CAN buffer, data in the CAN send buffer is regularly cleared to prevent buffer overflow and improve system reliability. To cope with data processing of multiple CAN ports, multiple data processing threads are designed to read and publish to prevent data congestion.

[0041] Currently, it is difficult to handle the situation where the same CANDBC controller sends control commands and receives feedback information from multiple vehicles of the same type at the same time. The same situation also occurs when controlling multiple vehicles, such as on-board VCUs, integrated inertial navigation systems, lidars and other equipment and sensors.

[0042] The established communication link also performs CAN ID offset processing during the link process, ensuring that the initial CANDBC is not changed while solving the problem of multi-vehicle and multi-device data interaction with the terminal host computer. The specific process of step 3 is as follows: Step 31: Establish multiple CAN sending modules and multiple CAN receiving modules in the Simulink model established by the host computer; Step 32: The communication link configures different sending and receiving subscription topics according to the offset of the host computer to distinguish different devices in different vehicles. For example, the first device of the first vehicle is assigned an offset of 0x11, and the publishing topic is defined as Publish11 and the receiving topic is defined as Subscribe11. Step 33: The protocol conversion device subscribes to the host computer's publishing topic Publish11 and publishes data to the host computer's receiving topic Subscribe11. It subtracts the offset 0x11 from the control instruction received from the subscription topic, sends the data back to the publishing topic, and adds the offset 0x11 to the data. The entire process is performed in hexadecimal to ensure normal data transmission.

[0043] In step 31, configure the ID rules as follows: The number of vehicles on the host computer is N, and the number of acquisition devices required for each vehicle is M, so there are a total of S devices that need to be processed, where S=N*M; the CAN ID is in hexadecimal format, and the host computer mainly changes the last two digits when modifying it. The first digit consists of 1 to N, and the second digit consists of 1 to M. For example, the first device of the first vehicle is assigned an offset of 0x11, and the hexadecimal addition is performed on the CAN ID in the DBC corresponding to the device to obtain a new CAN ID as the ID for the host computer to send and receive CAN messages.

[0044] Communication delay is the primary issue that needs to be considered for remote control of target vehicles, as it affects the vehicle control stability and accuracy. In order to achieve remote control of the target vehicle via the communication link, the present invention designs and tests the communication delay of the remote control link. Figure 5 In the test, the host computer and the protocol conversion device are used as the test communication link delay of the entire control link. The CAN1 port of the host computer controller outputs a sine wave, which is transmitted to the CAN2 port through the link to calculate the delay of the transceiver link.

[0045] Sending step 1ms, To measure the transmission and reception delay, communication delay The calculation formula (1) is as follows:

[0046] Link communication delay test results are as follows Figure 6 As shown, the remote driving test results are as follows Figure 7 As shown, the entire remote control link has a good control effect, with a test delay of 5-11ms, a step size of 1ms, and a link communication delay of 4-10ms. There is no data loss during the process. Therefore, the entire delay from the host computer sending a control command to the vehicle receiving the command and then feeding back the vehicle status is 8-20ms.

[0047] The following is a comparison table of the test results of three transmission methods: CAN to LoRa, CAN to 4G, and CAN to 5G.

[0048]

[0049] The present invention provides a target vehicle remote control and data transmission system and method based on CAN to MQTT, which adopts 5G network / WiFi+MQTT server to establish a low-latency and stable communication link, and realizes the CAN to MQTT data communication link with the help of Raspberry Pi 4B hardware equipment and Python data protocol conversion script; the upper computer sets up the target vehicle remote driving, uses the high-definition camera to provide real-time feedback on road driving conditions, and uses the Logitech steering wheel as the driving model input to realize the driver's remote driving; it can realize remote control of multiple target vehicles and real-time data communication transmission, and can provide lower latency and more stable control and communication links under the DBC based on the original equipment.

[0050] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.

Claims

1. A target vehicle remote control and data transmission system based on CAN to MQTT, characterized in that: include: Host computer: Use Simulink control model; MQTT server: used for data transmission, with publishing topics and receiving topics. It receives MQTT messages from protocol conversion devices that subscribe to the publishing topics. Other devices receive MQTT messages by subscribing to the topics. Protocol conversion device: Receives CAN message control instructions from the host computer through Python scripts, converts CAN message control instructions into MQTT messages, and sends them to the topic of the MQTT server through 5G network / WiFi; subscribes to the publishing topic of another device, converts its MQTT message into CAN message and sends it to the target vehicle through the device's CAN port; and Target vehicle: As the controlled object, it receives and executes the CAN message control instructions converted by the protocol conversion device, and at the same time feeds back the vehicle status information through the CAN bus.

2. the target vehicle remote control and data transmission system based on CAN turning MQTT as claimed in claim 1, is characterized in that, It also includes a camera: connected to a protocol conversion device, by calling the Motion service, and using the local area network host computer to obtain real-time vehicle driving images.

3. the target vehicle remote control and data transmission system based on CAN turning MQTT as claimed in claim 1, is characterized in that, The host computer and the target vehicle are respectively equipped with a protocol conversion device, which is used to convert the data received by the CAN port of the host computer and the target vehicle into MQTT messages and publish them to the MQTT server. At the same time, they subscribe to the messages on the MQTT server and convert them into CAN messages and send them to the CAN bus. The protocol conversion device is deployed with an MQTT server and a CAN to MQTT protocol conversion Python script, and the protocol conversion device is equipped with a Raspberry Pi 4B with a CAN HAT.

4. the target vehicle remote control and data transmission system based on CAN turning MQTT as claimed in claim 1, is characterized in that, The CAN ID offset and vehicle ID or device ID are defined in the protocol conversion device. The protocol conversion device reads the CAN messages of the host computer and the target vehicle and adds the CAN ID offset. The CAN data is converted into MQTT messages in a specific format and published to the MQTT server. The topic is subscribed to receive MQTT messages in real time, the CAN ID offset is eliminated to restore the CAN message, and the protocol conversion device sends the CAN message to the host computer and the target vehicle.

5. The target vehicle remote control and data transmission system based on CAN-to-MQTT as claimed in claim 1, wherein It also includes a remote driving control model, which includes a steering wheel pedal signal processing module, a Carsim virtual scene test module and a control signal conversion module. The steering wheel pedal signal processing module is used to switch the control signal by receiving the steering wheel pedal signal; The Carsim virtual scene test module is used to send the control signal output by the steering wheel and pedal signal processing module to the host computer, convert it into actual control instructions to the Carsim vehicle dynamics model, and reflect it in the virtual scene; the control signal conversion module is used to convert the target vehicle CAN protocol output by the steering wheel and pedal signal processing module into recognizable expected speed, braking force, gear position and front wheel angle, and send it to the target vehicle through the communication link. The target vehicle's status feedback is then sent back to the host computer through the link to obtain the vehicle's current motor speed, gear position, parking status, steering motor angle and fault status.

6. A target vehicle remote control and data transmission method based on CAN to MQTT, characterized in that: The target vehicle remote control and data transmission system based on CAN to MQTT according to any one of claims 1 to 5 is adopted, comprising the following steps: Step 1: Establish 5G network + MQTT server communication link: The 5G network + MQTT server communication link includes the host computer sending control commands to the target vehicle and the target vehicle feedback vehicle status to the host computer; The host computer sends control instructions to the target vehicle: The Simulink control model in the host computer sends CAN message control instructions to the host computer protocol conversion device for protocol conversion to MQTT messages, which are then sent to the publishing topic of the MQTT server via WiFi. The vehicle-side protocol conversion device subscribes to the publishing topic, converts the MQTT messages into CAN messages, and sends them to the target vehicle to execute the control instructions of the host computer; The target vehicle feeds back the vehicle status to the host computer: The VCU of the target vehicle feeds back the vehicle status information to the vehicle-side protocol conversion device through CAN messages, which converts the protocol into MQTT messages and publishes them to the subscription topic. The host-side protocol conversion device subscribes to the topic to obtain the vehicle feedback information, makes the next plan, and sends control instructions; Step 2: Establish a remote driving control model: The remote driving control model mainly packages the control signals input by the steering wheel and pedals into CAN messages that can be recognized by the target vehicle, and unpacks the received vehicle status CAN messages. The host computer and Carsim jointly simulate to build a virtual scene, receive control inputs and vehicle status in real time, and feed them back to the virtual scene. Step 3: Multiple remote control target vehicle link implementation and communication link delay test.

7. The target vehicle remote control and data transmission method based on CAN-to-MQTT as claimed in claim 6, wherein: Clear the data in the CAN send buffer periodically.

8. The target vehicle remote control and data transmission method based on CAN-to-MQTT as claimed in claim 6, wherein: To handle data processing of multiple CAN ports, multiple data processing threads are designed to read and publish.

9. The target vehicle remote control and data transmission method based on CAN to MQTT as claimed in claim 6, wherein The specific process of step 3 is: Step 31: Establish multiple CAN sending modules and multiple CAN receiving modules in the Simulink model established by the host computer; Step 32: The communication link configures different sending and receiving subscription topics according to the offset of the host computer to distinguish different devices in different vehicles; Step 33: The protocol conversion device subscribes to the publishing topic of the host computer and publishes data to the receiving topic of the host computer; subtracts the offset from the control instruction received from the subscription topic, sends data back to the publishing topic, and adds the offset to the data.

10. The target vehicle remote control and data transmission method based on CAN to MQTT as claimed in claim 9, characterized in that: In step 31, configure the ID rules as follows: The number of vehicles on the host computer is N, and the number of acquisition devices required for each vehicle is M, so there are a total of S devices that need to be processed, where S=N*M; the CAN ID is hexadecimal, and the host computer mainly changes the last two digits when modifying it. The first digit consists of 1 to N, and the second digit consists of 1 to M.

Citation Information

Cited By

  • Joint actuator durability detection method and system

    CN121141149A