A communication system for controlling the power motor of an unmanned aerial vehicle
By introducing pulse width modulation lines and adjudication modules into the UAV power control system, the problem of communication failover is solved, the high reliability and security of the communication system are achieved, and the stable operation and data security of the UAV are ensured.
Patent Information
- Application Number
- CN202411234381.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-09-04
AI Technical Summary
The existing UAV power control system lacks a remote monitoring safety mechanism when designing the control bus, and communication failures cannot be switched in time when facing changing environments, resulting in communication instability and safety hazards.
Use pulse width modulation line as auxiliary communication line, and set up a decision module in the flight control host to select the control bus or pulse width modulation line for communication according to the communication situation, ensuring that the pulse width modulation line is switched to the pulse width modulation line in case of communication failure to ensure that the drone is safe operation.
It improves the reliability and security of the drone communication system, protects the security of communication data, meets the special needs of drone air flight, improves operational efficiency and ensures information security.
Smart Images

Figure CN118740546B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of aircraft control, and in particular to a communication system for controlling a power motor of an unmanned aerial vehicle. Background Art
[0002] In the UAV control system, the introduction of Controller Area Network (CAN) bus technology provides a strong guarantee for the stable and efficient operation of UAVs. In this technology, the control bus of the CAN is responsible for connecting sensors, actuators and other components to achieve rapid transmission and real-time sharing of information, thereby ensuring that the UAV can respond quickly in complex and changing environments and ensure flight safety.
[0003] In the existing controller area network of UAV power control, the flight control host and the motor controller are connected through a single control bus, and the motor controller controls the operation of the power motor. Although this control system architecture is simple and efficient, it also has the following defects:
[0004] First, the existing controller area network does not have a security mechanism to directly counter remote monitoring when designing the control bus, and thus cannot ensure that the communication content is not remotely monitored by a third party.
[0005] Secondly, the working environment of UAVs is changeable (such as flight vibration, external signal interference, bad weather, etc.). When a single control bus faces a communication failure caused by the changeable working environment, it cannot stop running due to the communication failure. Summary of the invention
[0006] The technical problem to be solved by the present invention is how to simultaneously achieve communication safety and flight control safety in a UAV control system. In order to overcome the defects of the above-mentioned prior art, the present invention provides a communication system for UAV power motor control.
[0007] The present invention provides a communication system for controlling a power motor of an unmanned aerial vehicle, wherein the communication system comprises a flight control host, a motor controller, a power motor, a control bus and a pulse width modulation line;
[0008] The flight control host, the motor controller, and the power motor are all electrically connected to the control bus, one end of the pulse width modulation line is electrically connected to the flight control host, and the other end of the pulse width modulation line is electrically connected to the motor controller;
[0009] The flight control host comprises a decision module, and the decision module is configured to: transmit the adjustment instruction to the motor controller in a ciphertext manner through the control bus when communication is normal; and transmit the adjustment instruction to the motor controller through the pulse width modulation line when communication fails;
[0010] The motor controller is configured to: decrypt the ciphertext of the adjustment instruction when communication is normal, and then control the power motor to run; and control the power motor to run according to the adjustment instruction when communication fails.
[0011] The communication system for controlling the power motor of the unmanned aerial vehicle disclosed in the present invention sets a pulse width modulation line as an auxiliary communication line and sets a judgment module. The judgment module selects between the communication channels corresponding to the control bus and the pulse width modulation line according to the communication facts, that is, when the communication is normal, the communication channel corresponding to the control bus is selected, and when the communication is abnormal, the communication channel corresponding to the pulse width modulation line is selected, thereby greatly improving the reliability of the communication system. For the special working conditions of the unmanned aerial vehicle in the air, it not only protects the security of the communication data, but also meets the special needs of the unmanned aerial vehicle in the air flight safety, thereby improving the operation efficiency of the unmanned aerial vehicle and ensuring information security.
[0012] In a possible implementation, the flight control host further includes a host body, a first encryption module and a first decryption module, and the motor controller includes a control machine body, a second encryption module and a second decryption module:
[0013] The arbitration module is electrically connected to the host body, the first encryption module is electrically connected to the arbitration module, and the second decryption module is electrically connected to the host body;
[0014] The control machine body is electrically connected to the power motor, the second encryption module, and the second decryption module respectively;
[0015] The first encryption module, the first decryption module, the second encryption module, and the second decryption module are all electrically connected to the control bus;
[0016] One end of the pulse width modulation line is electrically connected to the arbitration module, and the other end of the pulse width modulation line is electrically connected to the control machine body;
[0017] The first encryption module and the second encryption module are both used to perform packet encryption, the second decryption module is used to decrypt the encryption result of the first encryption module, and the first decryption module is used to decrypt the encryption result of the second encryption module;
[0018] By combining the data encryption and decryption module based on the first and second encryption modules and the first and second decryption modules with the pulse width modulation line and the arbitration module, the information security of data transmission can be guaranteed. At the same time, the data encryption and arbitration modules can be implemented by software, and only the pulse width modulation communication line between the control machine body and the host body needs to be added, so that the hardware changes are small and the modification cost is low.
[0019] In a possible implementation, the communication system is configured to operate in multiple cycles until the ground-controlled remote-control flight mission is terminated;
[0020] In each operation, the host body calculates the required speed or torque of each propeller of the drone according to the flight mission of the ground remote control and the current flight posture of the drone, so as to issue an adjustment instruction;
[0021] The decision module determines whether the communication failure condition is met based on the current communication facts:
[0022] If not, the decision module transmits the adjustment instruction to the first encryption module, the first encryption module encrypts the adjustment instruction into a first ciphertext and transmits it to the control bus, the control bus transmits the first ciphertext to the second decryption module, the second decryption module decrypts the first ciphertext into a first plaintext and transmits it to the control machine body, the control machine body calls the power motor to drive the propellers of the drone to move according to the first plaintext, so that the propellers of the drone obtain the required speed or torque;
[0023] After each propeller of the UAV obtains the required speed or torque, the power motor transmits its own temperature and speed information to the control machine body, the control machine body merges its own state information with the temperature and speed information of the power motor to form first state data and transmits it to the second encryption module, the second encryption module encrypts the first state data into a second ciphertext and transmits it to the control bus, the control bus transmits the second ciphertext to the first decryption module, the first decryption module decrypts the second ciphertext into a second plaintext and transmits it to the host body, the host body obtains the flight attitude of the UAV at this time according to the second plaintext and the flight mission of this ground remote control, and enters the next cycle;
[0024] If yes, the decision module transmits the adjustment instruction to the pulse width modulation line, and the pulse width modulation line transmits the adjustment instruction to the control machine body. After receiving the adjustment instruction, the control machine body starts the pulse width modulation protocol, and the control machine body calls the power motor to drive the propellers of the drone to move according to the pulse width modulation protocol, and then enters the next cycle;
[0025] This solution ensures the efficient and orderly operation of the drone, maintains the security of communication information, and ensures the control of the drone in the event of communication failure.
[0026] In a possible implementation manner, the adjustment instruction sent by the host body has at least 6 bytes of data, wherein the first byte of data represents a function, wherein the function represents reading or writing; the second byte of data represents the speed or torque of a propeller of the drone, wherein different data represents different speeds or torques of the propellers;
[0027] When the function represents a read, the remaining bytes of data are unintended;
[0028] When the function represents writing, the remaining byte data means the specific modified value of the rotation speed or torque of the propeller represented by the sub-byte data;
[0029] This solution can ensure that the specific solutions of data encryption, arbitration module and communication protocol of control bus can be flexibly modified according to actual conditions, so as to have a wide range of applications.
[0030] In a possible implementation, the first encryption module includes:
[0031] a first cyclic redundancy check unit, performing a cyclic redundancy check on the adjustment instruction to obtain a first check code, and integrating the first check code into the adjustment instruction to obtain first check data;
[0032] A first encryption unit, encrypts the first verification data in groups to obtain a first pre-verification ciphertext;
[0033] a second cyclic redundancy check unit, performing a cyclic redundancy check on the first pre-check ciphertext to obtain a second check code, and integrating the second check code into the first pre-check ciphertext to obtain the first ciphertext;
[0034] in,
[0035] The first cyclic redundancy check unit is electrically connected to the arbitration module, the first encryption unit is electrically connected to the first cyclic redundancy check unit, the second cyclic redundancy check unit is electrically connected to the first encryption unit, and the second cyclic redundancy check unit is also electrically connected to the control bus;
[0036] This solution can ensure the orderly and efficient operation of data encryption and verification, thereby ensuring the efficient operation of the communication protocol of the control bus and the security maintenance of communication information.
[0037] In a possible implementation, the second decryption module includes a third cyclic redundancy check unit, a first decryption unit and a fourth cyclic redundancy check unit;
[0038] The third cyclic redundancy check unit is electrically connected to the control bus, the first decryption unit is electrically connected to the third cyclic redundancy check unit, the fourth cyclic redundancy check unit is electrically connected to the first decryption unit, and the fourth cyclic redundancy check unit is also electrically connected to the control machine body;
[0039] After receiving the first ciphertext, the third cyclic redundancy check unit verifies the second check code in the first ciphertext to confirm the integrity of the first ciphertext;
[0040] If the check result is incomplete, the third cyclic redundancy check unit sends a first incomplete message and transmits it to the decision module;
[0041] If the verification result is complete, the third cyclic redundancy check unit transmits the first ciphertext to the first decryption unit for decryption to obtain a decryption result, and the first decryption unit transmits the decryption result to the fourth cyclic redundancy check unit, and the fourth cyclic redundancy check unit performs verification according to the decrypted first verification code in the decryption result to confirm the integrity of the decryption result;
[0042] If the check result is incomplete, the fourth cyclic redundancy check unit sends a second incomplete message and transmits it to the decision module;
[0043] If the verification result is complete, the fourth cyclic redundancy check unit uses the decryption result as the first plaintext and transmits it to the control machine body;
[0044] This solution can ensure the orderly progress of decryption and verification, ensure the integrity of communication information, and can always transmit the verification results to the decision module to obtain feedback and provide a basis for the next decision.
[0045] In a possible implementation manner, the communication failure condition is that at least one of the following failures is satisfied:
[0046] First, the control bus communication cannot be connected;
[0047] Second, the second decryption module fails to receive the first ciphertext within a predetermined time;
[0048] Third, the decision module receives unknown communication data;
[0049] Fourth, the interval between the time when the host receives the second plaintext and the time when the adjustment instruction is issued in this cycle exceeds a predetermined time, and the number of occurrences of this event exceeds a first specific number;
[0050] Fifth, the adjudication module receives the first incomplete information and / or the second incomplete information, and the number of occurrences of the event exceeds a second specific number;
[0051] This solution ensures the realization of the purpose of selecting the communication channel corresponding to the control bus and the pulse width modulation line according to the specific communication failure, thereby ensuring the rapid switching of the communication of the judgment module and ensuring the stable and safe control of the drone.
[0052] In a possible implementation, the pulse width modulation protocol is:
[0053] When the control machine body receives the pulse width signal corresponding to the adjustment instruction for the first time with a duty cycle of 90% and a duration of more than 200ms, the control machine body starts the communication with the pulse width modulation line and suspends the communication with the control bus. If the control machine body receives the pulse width signal corresponding to the adjustment instruction for the second time with a duty cycle of 90% and a duration of more than 200ms, the control machine body ends the communication with the pulse width modulation line and starts the communication with the control bus.
[0054] When the control machine body receives the pulse width signal corresponding to the adjustment instruction with a duty cycle of 85% and a duration of more than 200ms, the speed mode is adopted and the power motor is called to adopt a speed corresponding to the duty cycle according to the duty cycle;
[0055] When the control machine body receives the pulse width signal corresponding to the adjustment instruction with a duty cycle of 80% and a duration of more than 200ms, the torque mode is adopted and the power motor is called according to the duty cycle to adopt a torque corresponding to the duty cycle;
[0056] When the duty cycle of the pulse width signal corresponding to the adjustment instruction received by the control body is between 0-75%, the output speed of the power motor is called to be equal to the maximum speed of the power motor multiplied by the duty cycle; or the output torque of the power motor is called to be equal to the maximum torque of the power motor multiplied by the duty cycle.
[0057] Compared with the existing technology, the above technical solution can achieve accurate speed control by limiting the duty cycle, thereby ensuring the safety upper limit of UAV control. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a schematic diagram of the structure of a communication system for controlling a power motor of a UAV according to an embodiment of the present invention;
[0059] Figure 2 This is a flow chart of the operation of a communication system for controlling a power motor of a UAV in an embodiment of the present invention;
[0060] Figure 3 This is a schematic diagram of the structure of a first encryption module in an embodiment of the present invention;
[0061] Figure 4 is a schematic diagram of the structure of a second decryption module in an embodiment of the present invention;
[0062] Figure 5 This is a flow chart of the operation of the second decryption module in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] First, those skilled in the art should understand that these implementations are only used to explain the technical principles of the embodiments of the present application, and are not intended to limit the protection scope of the embodiments of the present application. Those skilled in the art can make adjustments to them as needed to adapt to specific application scenarios.
[0064] In the description of the embodiments of the present application, it should be noted that, unless otherwise clearly specified and limited, the terms "electrical connection" and "establishing an electrical connection relationship" should be understood in a broad sense, that is, it should be understood that two or more of them have an electrical relationship, which can be achieved through a wire, a wireless connection, or a combination of the two; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.
[0065] In the embodiments of the present application, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0066] The present application is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0067] See also Figure 1 to Figure 5 As shown, the present application embodiment discloses a communication system for controlling a power motor of an unmanned aerial vehicle, see Figure 1 As shown, the communication system includes a flight control host, a motor controller, a power motor, a control bus and a pulse width modulation line. The flight control host includes a host body, a decision module, a first encryption module and a first decryption module; the motor controller includes a control machine body, a second encryption module and a second decryption module. The decision module is electrically connected to the host body, the first encryption module is electrically connected to the decision module, and the second decryption module is electrically connected to the host body; the control machine body is electrically connected to the power motor, the second encryption module and the second decryption module respectively; the first encryption module, the first decryption module, the second encryption module and the second decryption module are all electrically connected to the control bus; one end of the pulse width modulation line is electrically connected to the decision module, and the other end of the pulse width modulation line is electrically connected to the control machine body.
[0068] The main body in the flight control host is the UAV flight attitude controller and the control core of the UAV. Usually, one UAV corresponds to one main body, which is responsible for calculating the speed or torque required for each propeller of the UAV according to the flight mission given by the ground remote control and the current flight attitude of the UAV.
[0069] See also Figure 2 As shown, starting from the start of the UAV flight mission, the communication system runs in a cycle for multiple times until the ground remote control flight mission stops.
[0070] In each operation, the host body calculates the required speed or torque of each propeller of the drone according to the flight mission of this ground remote control and the current flight attitude of the drone, and issues an adjustment command. The adjustment command issued by the host body has at least 6 bytes of data, among which the first byte data represents the function, and the function represents reading or writing; the second byte data represents the speed or torque of a propeller of the drone, and different data of the second byte represents different propeller speeds or torques; among which, when the function represents reading, the remaining byte data has no meaning; when the function represents writing, the remaining byte data means the specific modification value of the speed or torque of the propeller represented by the second byte data.
[0071] Then, the adjudication module determines whether the communication failure condition is met based on the current communication facts;
[0072] If not, the communication system starts the normal communication mode, that is, the communication channel corresponding to the control bus, which is as follows:
[0073] The arbitration module transmits the adjustment instruction to the first encryption module, the first encryption module encrypts the adjustment instruction into a first ciphertext and transmits it to the control bus, the control bus transmits the first ciphertext to the second decryption module, the second decryption module decrypts the first ciphertext into a first plaintext and transmits it to the control machine body, and the control machine body calls the power motor to drive the propellers of the drone to move according to the first plaintext, so that the propellers of the drone can obtain the required speed or torque.
[0074] The power motor is provided with a temperature sensor and a speed sensor. After each propeller of the drone obtains the required speed or torque, the power motor transmits its own temperature and speed information to the control machine body, and the control machine body fuses its own state information with the temperature and speed information of the power motor to form the first state data and transmits it to the second encryption module. The second encryption module encrypts the first state data into the second ciphertext and transmits it to the control bus. The control bus transmits the second ciphertext to the first decryption module. The first decryption module decrypts the second ciphertext into the second plaintext and transmits it to the host body. The host body obtains the flight attitude of the drone at this time according to the second plaintext and the flight mission of this ground remote control, and enters the next cycle.
[0075] It should be noted that the frequency of feedback from the control body should be much higher than the frequency of the adjustment instructions issued by the host body. This is to facilitate the host body to calculate the required speed or torque of each propeller of the drone based on the flight mission of this ground remote control and the current flight attitude of the drone. The specific algorithm is existing technology and will not be described in detail here.
[0076] If so, the communication system activates the abnormal communication mode, that is, the communication channel corresponding to the pulse width modulation line, the specific form is as follows:
[0077] The arbitration module transmits the adjustment instruction to the pulse width modulation line, and the pulse width modulation line transmits the adjustment instruction to the control machine body. After receiving the adjustment instruction, the control machine body starts the pulse width modulation protocol. The control machine body calls the power motor to drive the propellers of the drone to move according to the pulse width modulation protocol, and then enters the next cycle.
[0078] In this embodiment, the pulse width modulation protocol is specifically described as follows:
[0079] When the control machine body receives the pulse width signal corresponding to the adjustment instruction for the first time with a duty cycle of 90% and a duration of more than 200ms, the control machine body starts the communication with the pulse width modulation line and suspends the communication with the control bus. If the control machine body receives the pulse width signal corresponding to the adjustment instruction for the second time with a duty cycle of 90% and a duration of more than 200ms, the control machine body ends the communication with the pulse width modulation line and starts the communication with the control bus.
[0080] When the control machine receives the pulse width signal corresponding to the adjustment command with a duty cycle of 85% and a duration of more than 200ms, the speed mode is adopted and the power motor is called to adopt the speed corresponding to the duty cycle according to the duty cycle;
[0081] When the control machine receives the pulse width signal corresponding to the adjustment command with a duty cycle of 80% and a duration of more than 200ms, the torque mode is adopted and the power motor is called according to the duty cycle to adopt the torque corresponding to the duty cycle;
[0082] When the duty cycle of the pulse width signal corresponding to the adjustment instruction received by the control body is between 0-75%, the output speed of the power motor is called to be equal to the maximum speed of the power motor multiplied by the duty cycle; or the output torque of the power motor is called to be equal to the maximum torque of the power motor multiplied by the duty cycle.
[0083] The pulse width modulation line (PWM line for short) is usually in a silent state, and the decision module in the flight control host always monitors and analyzes the communication of the control bus. When the abnormal judgment conditions are met, the PWM line communication is immediately activated. Once the PWM line communication is enabled, the priority of the control body to execute the command is higher than the control bus communication.
[0084] See also Figure 3As shown, in this embodiment, the first encryption module includes a first cyclic redundancy check unit, a first encryption unit, and a second cyclic redundancy check unit, wherein the first cyclic redundancy check unit is electrically connected to the arbitration module, the first encryption unit is electrically connected to the first cyclic redundancy check unit, the second cyclic redundancy check unit is electrically connected to the first encryption unit, and the second cyclic redundancy check unit is also electrically connected to the control bus. The first cyclic redundancy check unit performs a cyclic redundancy check on the adjustment instruction to obtain a first check code, and incorporates the first check code into the adjustment instruction to obtain the first check data. The first encryption unit performs group encryption on the first check data to obtain a first pre-check ciphertext. The second cyclic redundancy check unit performs a cyclic redundancy check on the first pre-check ciphertext to obtain a second check code, and incorporates the second check code into the first pre-check ciphertext to obtain the first ciphertext.
[0085] See also Figure 4 As shown, in this embodiment, the second decryption module includes a third cyclic redundancy check unit, a first decryption unit and a fourth cyclic redundancy check unit. The third cyclic redundancy check unit is electrically connected to the control bus, the first decryption unit is electrically connected to the third cyclic redundancy check unit, the fourth cyclic redundancy check unit is electrically connected to the first decryption unit, and the fourth cyclic redundancy check unit is also electrically connected to the control machine body.
[0086] See also Figure 5 As shown, in the second decryption module, after receiving the first ciphertext, the third cyclic redundancy check unit verifies the second check code in the first ciphertext to confirm the integrity of the first ciphertext; if the verification result is incomplete, the third cyclic redundancy check unit sends a first incomplete information and transmits it to the decision module;
[0087] If the verification result is complete, the third cyclic redundancy check unit transmits the first ciphertext to the first decryption unit for decryption to obtain a decryption result. The first decryption unit transmits the decryption result to the fourth cyclic redundancy check unit. The fourth cyclic redundancy check unit performs verification based on the decrypted first check code in the decryption result to confirm the integrity of the decryption result.
[0088] If the check result is incomplete, the fourth cyclic redundancy check unit sends a second incomplete message and transmits it to the decision module;
[0089] If the verification result is complete, the fourth cyclic redundancy check unit uses the decryption result as the first plaintext and transmits it to the control computer body.
[0090] Cyclic redundancy check (CRC for short) is a common error checking code that can effectively ensure the integrity of data. For specific verification methods, please refer to (Algebra and Coding) noted by Xu Yichao et al., which will not be expanded here.
[0091] In this embodiment, the communication failure condition is that at least one of the following failures is satisfied: first, the control bus communication cannot be connected; second, the second decryption module fails to receive the first ciphertext beyond the predetermined time; third, the determination module receives unknown communication data; fourth, the interval between the time when the host body receives the second plaintext and the time when the adjustment instruction issued in this cycle is issued exceeds the predetermined time length, and the event occurs more than a first specific number of times; fifth, the determination module receives the first incomplete information and / or the second incomplete information, and the event occurs more than a second specific number of times.
[0092] See also Figure 2 As shown, it should be noted that if the first fault among the above faults does not occur, that is, the control bus communication can be connected normally, thus, when the control machine body calls the power motor to drive the propellers of the drone to move according to the pulse width modulation protocol so that the propellers of the drone obtain the required speed or torque, the feedback of the temperature and speed information of the power motor can still be carried out normally. At this time, the power motor transmits its own temperature and speed information to the control machine body, and the control machine body integrates its own state information with the temperature and speed information of the power motor to form the first state data and transmits it to the second encryption module. The second encryption module encrypts the first state data into the second ciphertext and transmits it to the control bus. The control bus transmits the second ciphertext to the first decryption module. The first decryption module decrypts the second ciphertext into the second plaintext and transmits it to the host body. The host body obtains the flight attitude of the drone at this time according to the second plaintext and the flight mission of this ground remote control, and enters the next cycle.
[0093] The following is a specific example to illustrate the encryption and decryption process of the first encryption module and the second decryption module. The process of the first decryption module and the second encryption module may be similar.
[0094] As mentioned above, the adjustment instruction sent by the host body has at least 6 bytes of data. In this example, we take 6 bytes of data as an example, which is divided into 6 data bits from 0 to 5. The size of each data bit is 1 byte and has its own meaning. Among them, the 0th bit of data represents the function code, which indicates the functional role of this communication. For example, 0x01 represents a read command and 0x02 represents a write command. The 1st bit of data represents the address. Each control parameter of the control body has a unique address. For example, 0xAA represents the speed of the power motor. According to the address, you can know which parameter is being operated. The 2nd to 5th bits of data represent specific data, which may be meaningless in some cases. For example, the 2nd to 5th bits of data are meaningless in a read command, and in a write command, it means that the value of the target parameter is modified to the 2nd to 5th bits of data.
[0095] When the adjustment instruction is transmitted to the first cyclic redundancy check unit in the first encryption module, the first cyclic redundancy check unit performs a cyclic redundancy check on the adjustment instruction to obtain a first check code, and incorporates the first check code into the adjustment instruction as the sixth bit of data, thereby obtaining the first check data. The sixth bit of data represents the cyclic redundancy check bit before encryption;
[0096] Subsequently, the first encryption unit encrypts the 0th to 6th bits to obtain a first pre-check ciphertext, and the second cyclic redundancy check unit performs a cyclic redundancy check on the first pre-check ciphertext to obtain a second check code, and incorporates the second check code into the first pre-check ciphertext as the 7th bit data, thereby obtaining the first ciphertext, in which the 7th bit data is calculated based on the encrypted 0th to 6th bit data.
[0097] The first encryption module adopts block encryption. There are many block encryption methods, which can be flexibly selected according to actual conditions. This example provides a feasible and reversible encryption method as a reference.
[0098] As mentioned above, the object to be encrypted is the 0th to 6th bits of the above data, a total of 7 bytes of data, and 1 byte of data is 8 bits, that is, composed of 8 numbers of 0 or 1.
[0099] Encryption steps:
[0100] (1) Circularly shift each bit of a byte of data to the left by 2 bits. For example, 0111 0010 becomes 1100 1001 after circularly shifting it to the left by 2 bits.
[0101] (2) The data in the first step is XORed with the key. The key is composed of 8 numbers of 0 or 1. The specific key is determined by the programmers of the first encryption module and the second decryption module. As long as the encryption module and the decryption module use the same key for encryption / decryption of bytes in the same position, it can be used. Different keys can be used for bytes in different positions, which can better increase the complexity of decryption and the security of the system. For example, the XOR operation of 1100 1001 and the key 0101 1111 is 1001 0110.
[0102] (3) Repeat steps 1-2 7 times to obtain the encrypted data of bits 0-6.
[0103] After receiving the first ciphertext, the second decryption module first verifies the 7th bit of data through the third cyclic redundancy check unit. If the verification passes, it means that the received data is complete. Then, the first decryption unit decrypts the 0-6 bits of data. After decryption, the 6th bit of data is verified through the fourth cyclic redundancy check unit. If the verification passes, it means that the data is complete and confirms the correctness of the decryption process. Finally, the control machine body operates a certain power motor according to the function code and address.
[0104] Corresponding to the above encryption method, the decryption method steps are:
[0105] (1) Perform an XOR operation on the byte data at a specific position using the corresponding key. For example, the XOR operation of 1001 0110 and the key 0101 1111 is 1100 1001.
[0106] (2) Circularly shift right each bit of the data obtained in the first step by 2 bits. For example, circularly shift right 1100 1001 by 2 bits to get 0111 0010.
[0107] (3) Repeat steps 1-2 7 times to obtain the decrypted data of bits 0-6.
[0108] In the description of the embodiments of the present application, it should be noted that in the description of the present application, terms such as "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is only for the convenience of description, and does not indicate or imply that the device or component must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present application.
[0109] The communication system for controlling the power motor of the unmanned aerial vehicle disclosed in the embodiment of the present application greatly improves the reliability of the communication system through data encryption and pulse width modulation auxiliary communication lines and arbitration modules, which not only protects the security of communication data, but also meets the special needs of the safety of the unmanned aerial vehicle in the air. The data encryption module and the arbitration module can be implemented through software, and only the pulse width modulation line communication between the host body and the control machine body needs to be increased. There are few changes in the hardware and the modification cost is low. The specific schemes of data encryption, arbitration module, and communication protocols of normal channels can be flexibly modified according to actual conditions and have a wide range of uses. The rapid switching of pulse width modulation communication (switching is completed in less than 1 second after activation) and the limitation of duty cycle ensure accurate speed control and also ensure the safety upper limit of unmanned aerial vehicle control.
[0110] In the description of the present application, the description with reference to the terms "one embodiment", "some embodiments", "in the present embodiment", "specific example", or "some examples" etc. means that the specific features, mechanisms, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, mechanisms, materials or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A communication system for controlling a power motor of an unmanned aerial vehicle, characterized in that: The communication system includes a flight control host, a motor controller, a power motor, a control bus and a pulse width modulation line; The flight control host, the motor controller, and the power motor are all electrically connected to the control bus, one end of the pulse width modulation line is electrically connected to the flight control host, and the other end of the pulse width modulation line is electrically connected to the motor controller; The flight control host comprises a decision module, and the decision module is configured to: transmit the adjustment instruction to the motor controller in a ciphertext manner through the control bus when communication is normal; and transmit the adjustment instruction to the motor controller through the pulse width modulation line when communication fails; The motor controller is configured to: decrypt the ciphertext of the adjustment instruction when communication is normal, and then control the power motor to operate; and control the power motor to operate according to the adjustment instruction when communication fails; The flight control host also includes a host body, a first encryption module and a first decryption module, and the motor controller includes a control machine body, a second encryption module and a second decryption module: The arbitration module is electrically connected to the host body, the first encryption module is electrically connected to the arbitration module, and the second decryption module is electrically connected to the host body; The control machine body is electrically connected to the power motor, the second encryption module, and the second decryption module respectively; The first encryption module, the first decryption module, the second encryption module, and the second decryption module are all electrically connected to the control bus; One end of the pulse width modulation line is electrically connected to the arbitration module, and the other end of the pulse width modulation line is electrically connected to the control machine body; The first encryption module and the second encryption module are both used to perform packet encryption, the second decryption module is used to decrypt the encryption result of the first encryption module, and the first decryption module is used to decrypt the encryption result of the second encryption module; The communication system is configured to operate in multiple cycles until the ground remote control flight mission is terminated; In each operation, the host body calculates the required speed or torque of each propeller of the drone according to the flight mission of the ground remote control and the current flight posture of the drone, so as to issue an adjustment instruction; The decision module determines whether the communication failure condition is met based on the current communication facts: If not, the decision module transmits the adjustment instruction to the first encryption module, the first encryption module encrypts the adjustment instruction into a first ciphertext and transmits it to the control bus, the control bus transmits the first ciphertext to the second decryption module, the second decryption module decrypts the first ciphertext into a first plaintext and transmits it to the control machine body, the control machine body calls the power motor to drive the propellers of the drone to move according to the first plaintext, so that the propellers of the drone obtain the required speed or torque; After each propeller of the UAV obtains the required speed or torque, the power motor transmits its own temperature and speed information to the control machine body, the control machine body merges its own state information with the temperature and speed information of the power motor to form first state data and transmits it to the second encryption module, the second encryption module encrypts the first state data into a second ciphertext and transmits it to the control bus, the control bus transmits the second ciphertext to the first decryption module, the first decryption module decrypts the second ciphertext into a second plaintext and transmits it to the host body, the host body obtains the flight attitude of the UAV at this time according to the second plaintext and the flight mission of this ground remote control, and enters the next cycle; If so, the arbitration module transmits the adjustment instruction to the pulse width modulation line, and the pulse width modulation line transmits the adjustment instruction to the control machine body. After receiving the adjustment instruction, the control machine body starts the pulse width modulation protocol, and the control machine body calls the power motor to drive the propellers of the drone to move according to the pulse width modulation protocol, and then enters the next cycle.
2. The communication system for controlling the power motor of the UAV according to claim 1, characterized in that: The adjustment instruction sent by the host body has at least 6 bytes of data, wherein the first byte of data represents a function, wherein the function represents reading or writing; the second byte of data represents the speed or torque of a propeller of the drone, wherein different data represents different speeds or torques of propellers; When the function represents a read, the remaining bytes of data are unintended; When the function represents writing, the remaining bytes of data mean the specific modification values of the rotation speed or torque of the propeller represented by the sub-byte data.
3. The communication system for controlling the power motor of the UAV according to claim 2, characterized in that: The first encryption module comprises: A first cyclic redundancy check unit, configured to perform a cyclic redundancy check on the adjustment instruction to obtain a first check code, and incorporate the first check code into the adjustment instruction to obtain first check data; A first encryption unit, used for encrypting the first verification data in groups to obtain a first pre-verification ciphertext; A second cyclic redundancy check unit is used to perform a cyclic redundancy check on the first pre-check ciphertext to obtain a second check code, and incorporate the second check code into the first pre-check ciphertext to obtain the first ciphertext; in, The first cyclic redundancy check unit is electrically connected to the arbitration module, the first encryption unit is electrically connected to the first cyclic redundancy check unit, the second cyclic redundancy check unit is electrically connected to the first encryption unit, and the second cyclic redundancy check unit is also electrically connected to the control bus.
4. The communication system for controlling the power motor of the UAV according to claim 3, characterized in that: The second decryption module includes a third cyclic redundancy check unit, a first decryption unit and a fourth cyclic redundancy check unit; The third cyclic redundancy check unit is electrically connected to the control bus, the first decryption unit is electrically connected to the third cyclic redundancy check unit, the fourth cyclic redundancy check unit is electrically connected to the first decryption unit, and the fourth cyclic redundancy check unit is also electrically connected to the control machine body; After receiving the first ciphertext, the third cyclic redundancy check unit verifies the second check code in the first ciphertext to confirm the integrity of the first ciphertext; If the check result is incomplete, the third cyclic redundancy check unit sends a first incomplete message and transmits it to the decision module; If the verification result is complete, the third cyclic redundancy check unit transmits the first ciphertext to the first decryption unit for decryption to obtain a decryption result, and the first decryption unit transmits the decryption result to the fourth cyclic redundancy check unit, and the fourth cyclic redundancy check unit performs verification according to the decrypted first verification code in the decryption result to confirm the integrity of the decryption result; If the check result is incomplete, the fourth cyclic redundancy check unit sends a second incomplete message and transmits it to the decision module; If the verification result is complete, the fourth cyclic redundancy check unit uses the decryption result as the first plaintext and transmits it to the control machine body.
5. The communication system for controlling the power motor of the UAV according to claim 4, characterized in that: The communication failure condition is that at least one of the following failures is met: First, the control bus communication cannot be connected; Second, the second decryption module fails to receive the first ciphertext within a predetermined time; Third, the decision module receives unknown communication data; Fourth, the interval between the time when the host receives the second plaintext and the time when the adjustment instruction is issued in this cycle exceeds a predetermined time, and the number of occurrences of this event exceeds a first specific number; Fifth, the decision module receives the first incomplete information and / or the second incomplete information, and the number of occurrences of the event exceeds a second specific number of times.
6. The communication system for controlling the power motor of an unmanned aerial vehicle according to any one of claims 1 to 5, characterized in that: The pulse width modulation protocol is: When the control machine body receives the pulse width signal corresponding to the adjustment instruction for the first time with a duty cycle of 90% and a duration of more than 200ms, the control machine body starts the communication with the pulse width modulation line and suspends the communication with the control bus. If the control machine body receives the pulse width signal corresponding to the adjustment instruction for the second time with a duty cycle of 90% and a duration of more than 200ms, the control machine body ends the communication with the pulse width modulation line and starts the communication with the control bus. When the control machine body receives the pulse width signal corresponding to the adjustment instruction with a duty cycle of 85% and a duration of more than 200ms, the speed mode is adopted and the power motor is called to adopt a speed corresponding to the duty cycle according to the duty cycle; When the control machine body receives the pulse width signal corresponding to the adjustment instruction with a duty cycle of 80% and a duration of more than 200ms, the torque mode is adopted and the power motor is called according to the duty cycle to adopt a torque corresponding to the duty cycle; When the control machine body receives the duty cycle of the pulse width signal corresponding to the adjustment instruction between 0-75%, the output speed of the power motor is called to be equal to the maximum speed of the power motor multiplied by the duty cycle; or the output torque of the power motor is called to be equal to the maximum torque of the power motor multiplied by the duty cycle.
Citation Information
Patent Citations
Multi-protocol interactive communication system and method for unmanned aerial vehicle hybrid electric propulsion system
CN112027095A
