Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The embodiment of the application provides an unmanned aerial vehicle control method, equipment and medium based on random key stream, which solve the problems that an aircraft encryption algorithm in the prior art cannot meet the real-time encryption requirement of measurement data in a transitional flight stage due to delay, and an executor is saturated and out of control due to encryption delay of the measurement data, so that disasters are further caused.
The following describes the technical scheme provided by the embodiment of the application in detail through the attached drawings.
Fig. 1 is a flowchart of a control method of an unmanned aerial vehicle based on random key stream according to an embodiment of the present application. As shown in fig. 1, the unmanned aerial vehicle control method based on random key stream provided by the embodiment of the application specifically includes the following steps:
And 10, presetting a chaotic initial value for the main chaotic system at the encryption end based on the chaotic system comprising the main chaotic system and the auxiliary chaotic system.
The embodiment of the application consists of a chaos encryption part based on a key stream coefficient and an aircraft control part, and particularly relates to a saturation control algorithm of a vertical take-off and landing fixed-wing aircraft based on a lengthened key and encryption of a switching chaos system. A specific algorithm architecture diagram is shown in fig. 2. The two parts of content will be described separately below.
First, it can be understood that the Lorenz nonlinear system is a typical chaotic system, and its dynamics equation is composed of three nonlinear differential equations, and parameters include σ (plantty), ρ (rayleigh number), and β. The system is known as a butterfly effect, shows typical chaotic characteristics of track index divergence caused by small difference of initial conditions, and has an attractor with a double-scroll structure, wherein the state equation is as follows:
Wherein, the ,,Is the state of the system and,Is the output of the system. When (when),,When Lorenz system appears as a chaos phenomenon. Notably, lorenz chaotic system stateIs at the amplitude of。
The Chen chaotic system is regarded as an expansion of the Lorenz system, the equation form of the Chen chaotic system is similar to that of the Lorenz system, but the Chen system shows more complex dynamic behaviors, such as an attractor structure with folding and rotating characteristics, and richer chaos and periodic state switching exist in a parameter interval by adjusting parameters and coupling items. The system is widely used for secret communication and chaotic synchronization control research due to high parameter sensitivity. The state space expression of Chen nonlinear system is given as follows:
Wherein, the ,,Is the state of the system and,Is the output of the system. When (when),,When Chen systems appear as chaos.
In this step, for the Lorenz chaotic system and the Chen chaotic system, the embodiment of the application firstly considers that the plaintext to be encrypted is respectively injected into the output equations of the two systems, and then the key stream is respectively multiplied by a coefficientAndThe method comprises the following steps:
Lorenz plaintext injection system :
Chen plaintext injection system:
Two plain texts are then injected into the systemAndThe generalized switching chaotic system is composed, namely:
Wherein, the Is a switching signal, indicated at the momentChaotic systemOr alternativelyIs activated.
Switching signalsThe switching strategy of (2) is as follows:
In the encryption module, the embodiment of the application considers the Lorenz chaotic system as the basis to judge the model, and sets the initial value of the chaotic system Under the condition, the encryption end judges the state of the Lorenz chaotic systemIf (3)ThenIf (3)Then. The mathematical expression is as follows:
The chaotic encryption algorithm based on the switching chaotic system is shown in fig. 3. Note that the encryption scheme can be extended to switch between multiple hybrid systems. Specifically, consider a Lorenz chaotic system, a Chen chaotic system, and a Rossler chaotic system. The Rossler system is a chaotic model with a relatively simple structure, only comprises one nonlinear term, and can present the mixing characteristic of a spiral attractor and a folding track under the parameter adjustment, and typical behaviors comprise single vortex chaos and periodic oscillation. The Rossler system is often used for chaos fundamental mechanism analysis due to low-dimensional characteristics, and is used as a reference model for theoretical research in interdisciplinary fields such as chemical oscillation and biological rhythm. The state equation of the Rossler chaotic system is as follows:
Wherein, the ,,Is the state of the system and,Is the output of the system. When (when),,,When the Rossler system appears as a chaos phenomenon.
And step 20, selecting a switching strategy according to the current state component of the main chaotic system so as to switch the auxiliary chaotic system.
As an alternative embodiment, a switching strategy is selected according to the current state component of the main chaotic system to switch the auxiliary chaotic system, specifically, the method comprises the steps of calculating the state component of the main chaotic system in real time according to an initial value, activating the first auxiliary system when the state component is smaller than a preset value, and activating the second auxiliary system when the state component is larger than the preset value based on the auxiliary chaotic system, wherein the step 201 is implemented.
In the step, the Lorenz chaotic system is still used as a basic model, but the switching signal is switched at the momentThe switching strategy of (c) needs to be updated as follows:
When Lorenz chaotic system state ThenWhen the state of Lorenz chaotic systemThenState of Lorenz chaotic systemThen. The mathematical expression is as follows:
as shown in fig. 3, note that the key stream coefficient is further introduced ,AndThe key stream coefficient can be generated by matching with the Lorenz system state initial value as a chaos encryption and decryption private key, so that the length of the private key can be increased, and meanwhile, the key stream coefficient can be a real number, so that the encryption and decryption scheme greatly improves the safety.
The key stream coefficients are explained below.
Step 30, generating a random key stream coefficient through a seed random number generator, and combining the random key stream coefficient with the chaos initial value to obtain a private key.
As an alternative embodiment, a random key stream coefficient is generated through a seed random number generator, and the random key stream coefficient is combined with a chaos initial value to obtain a private key, specifically, the method comprises the steps of taking a digital sequence with a preset length as a seed, inputting the seed into the random number generator to generate the random key stream coefficient, and combining the seed as a prefix of the private key with the chaos initial value to obtain the private key, wherein the step of 302 is carried out.
In this step, in order to increase system security, the embodiment of the present application adopts an extended key scheme of random key stream coefficients, which is specifically described as followsThe 9 digits of the key are used as seed and also used as the first two digits of private key, the encryption unit and decryption unit share the seed, and then a random number generator is used to generate the key according to the seedEncryption unit and decryption unit simultaneously generate same random numberThese two random numbers are used as key stream coefficients to prepare for subsequent plaintext encryption and decryption.
The chaotic encryption system realizes good encryption performance by utilizing the high sensitivity and unpredictability of the chaotic sequence, and is particularly suitable for communication scenes which are sensitive to initial values and require high complexity. However, system security depends to a large extent on the secret and synchronicity of the key, initial conditions and system parameters. Therefore, key distribution becomes an indispensable ring in the security architecture of the chaotic encryption system. If the key distribution process is unsafe, even if the encryption algorithm has strong chaos, the whole system is easy to fail due to key leakage. A safe and reliable key distribution mechanism not only ensures the synchronous generation of chaotic sequences by both communication parties, but also prevents man-in-the-middle attacks and replay attacks, and is a basic premise of practical application of a chaotic encryption system.
The chaotic sequence generated by the chaotic system is extremely sensitive to the initial value of the system, and the chaotic sequence generated by the chaotic system can be changed drastically by slight initial value perturbation. The initial value of the chaotic system is typically used as a key for chaotic encryption. Because the switching chaotic system adopted by the scheme is used as a key stream generator, the key is selected as follows:
Thus, the private key structure is As shown in fig. 5.
And 40, acquiring the plaintext of the aircraft measurement data, injecting the plaintext into the chaotic system, and generating the ciphertext by combining the random key stream coefficient.
And 50, transmitting the ciphertext to a decryption end, and synchronizing the private key and the switching strategy at the decryption end to restore the plaintext.
In this step, in the chaotic encryption communication system, the existence of the decryption module is critical, and because the chaotic sequence is introduced in the encryption process to carry out complex nonlinear transformation on the original information, the receiving end must have an effective decryption mechanism to accurately reconstruct the original data based on the known key information. The decryption failure is also caused by a tiny parameter error due to the high sensitivity of the chaotic system, so that the decryption module is required to realize synchronous reproduction of the chaotic sequence and ensure certain robustness to disturbance and noise. The lack of a decryption module will result in encrypted information not being correctly recovered, making the whole communication process meaningless. Therefore, the decryption module with high precision, strong synchronism and good robustness is designed, and is a basic guarantee for reliable application of the chaotic encryption system.
As an alternative embodiment, the ciphertext is transmitted to the decryption end, and the private key and the switching strategy are synchronized at the decryption end to restore the plaintext, which specifically comprises the steps of distributing seeds to the decryption end through a secure channel, step 502, synchronously running the same random number generation algorithm at the encryption end and the decryption end, and step 503, synchronously running the main chaotic system and determining the auxiliary chaotic system according to the chaotic initial value in the private key.
In this step, the encryption unit shares the seed with the decryption unit as in step 302, and then uses a random number generator to generate a random number based on the seedEncryption unit and decryption unit simultaneously generate same random number. And the decryption end reproduces the same chaotic sequence according to the chaotic initial value.
Then, the ciphertext is used to subtract the key stream to obtain a measurement plaintext, as shown in fig. 4, and the decryption equation is as follows:
and 60, inputting the restored plaintext into a state feedback controller to generate an anti-saturation control instruction, wherein the state feedback controller comprises a nonlinear compensation function.
First, it can be appreciated that the vertical take-off and landing fixed wing aircraft is an innovative aircraft combining the capability of multiple rotor vertical take-off and landing with the long endurance and high speed flight characteristics of the fixed wing, and the core design of the aircraft realizes vertical take-off and landing through multiple rotor or tilting power systems, and then switches to the fixed wing mode for efficient cruising.
Typically, a fixed-wing vertical take-off and landing aircraft is characterized by 12 states, namely, its dynamics and kinematics modelsThe position, velocity, attitude, and angular velocity are represented, respectively. Because the states of the vertical take-off and landing fixed wing aircrafts are coupled with each other, the dynamics system of the vertical take-off and landing fixed wing aircrafts has strong nonlinear characteristics, is influenced by aerodynamic force change, attitude large-amplitude adjustment, propulsion system coupling and other factors, and directly aims at the problems that the complete nonlinear model design controller is complex in modeling, difficult to analyze and difficult to solve in control law.
Therefore, in the step, in order to simplify the design of the controller, the system linearization can be performed near a specific working point related to the flight mission, and a local linear approximation model can be obtained through the working point linearization, so that the traditional linear control theory such as pole allocation, optimal control, robust control and the like can be applied, thereby greatly reducing the complexity of the design and stability analysis of the controller, and simultaneously being convenient for realizing efficient engineering deployment and performance verification. Thus, the linear system obtained after linearization of the operating point is described as follows:
Wherein the method comprises the steps of ,,
The system comprises a system matrix, an input matrix, a control input vector and a controller, wherein x (t) is a state vector of the system and comprises a position, a speed, an attitude angle, an angular speed and the like, the system matrix is a group of variables describing the current state of the aircraft, A is a system matrix and reflects the inertia, aerodynamic coupling and the like of the dynamics characteristics of the aircraft, the natural change rule of the state along with time is determined, B is an input matrix and describes how the influence degree of control input on the state, such as control surface deflection, changes the attitude of the aircraft, and u (t) is a control input vector, such as motor thrust, control surface deflection angle and the like, and the control input vector is generated by the controller. This equation describes how the aircraft state changes over time—the current state x and the control input u together determine the state at the next moment.
The output equation of the system is;
The encryption function may be defined as in the embodiment of the applicationI.e.The decryption function isI.e.
As an alternative embodiment, the restored plaintext is input into a state feedback controller to generate an anti-saturation control instruction, which specifically includes a step 601 of establishing a linear state space model of the vertical take-off and landing fixed-wing aircraft at a preset working point, wherein the linear state space model includes output saturation constraint.
In this step, it is assumed that the decryption error is 0, and considering that the vertical take-off and landing fixed wing aircraft actuator needs clipping, it is necessary to study the actuator saturation problem, in which the linearization equation of the vertical take-off and landing fixed wing aircraft is changed to:
Wherein the saturation function is expressed as follows:
Wherein, the Being the upper bound on the saturated input, embodiments of the present application utilize the hyperbolic tangent function to limit the magnitude of the state control input, that is, to do contain constraints that include upper and lower limits on the physical output capabilities of the actuator.
Step 602, approaching saturation constraint by adopting hyperbolic tangent function;
In this step, a smooth and continuous function is constructed to simulate and approximate the physical output limit of the actuator by using the mathematical characteristics of the hyperbolic tangent function, and a smooth function is defined:
The saturation function can then be expressed as:
Approximation error Is a bounded unknown function, assuming an upper bound ofThenThe linearization equation for a fixed-wing vertical take-off and landing aircraft is converted into:
Step 603, collecting an aircraft state vector, wherein the state vector comprises position, speed, attitude angle and angular speed components, and step 604, designing a state feedback control law to enable an output value of a state feedback controller to be an anti-hyperbolic tangent function of a product of the state vector and a preset gain matrix, wherein the gain matrix is used for enabling all characteristic values of the state vector to have negative real parts.
In the step, the control command value finally output is equal to the result vector obtained by multiplying the current state vector of the aircraft by a preset gain matrix, each element of the result vector is subjected to mathematical operation of an inverse hyperbolic tangent function, and then the specific parameter value of the gain matrix is adjusted and determined, so that the internal dynamic of the control system formed by applying the control law has stable characteristics.
As an alternative embodiment, the design of the state feedback control law, the output value is an inverse hyperbolic tangent function of the state vector and the preset gain matrix, and specifically includes the steps of 6041, calculating the product of the state vector and the feedback gain parameter to generate an intermediate control vector, 6042, applying the inverse hyperbolic tangent function to each component of the intermediate control vector to obtain an operation result, and 6043, outputting the operation result to an executing mechanism to drive the control surface and the motor.
The embodiment of the application assumes a simple state feedback control scheme, namely:
Wherein the method comprises the steps of In order to control gain parameters, in a control system, state feedback can directly utilize all or part of state variables of the system, and accurate adjustment of the dynamic performance of the system is realized by adjusting input in real time, so that a control law is solved as follows:
where symbol arh = arctanh.
Compared with a control method which only depends on output feedback, the state feedback can remarkably improve the stability, response speed and robustness of the system, can optimize the dynamic characteristics of the system through pole allocation, can enhance the resistance to disturbance and model uncertainty, and is the basis for realizing high-performance control strategies such as optimal control, self-adaptive control and robust control. The equation of state of the closed loop control system of the fixed-wing aircraft for vertical take-off and landing is as follows:
In the process of adjusting parameters of a control system, only the control gain is selected So thatThe real part of the eigenvalue of the closed loop system is smaller than 0, and the state from the saturated function approximation error to the state is stable in input state, so that the state bounty of the system near the working point can be met.
As an alternative embodiment, after the hyperbolic tangent function is adopted to approach the saturation constraint, the method can further comprise the steps of calculating the approximation error of the output value of the hyperbolic tangent function and the saturation constraint, estimating the upper bound of the approximation error, injecting the upper bound into a state feedback control law, obtaining the compensation gain, and carrying out self-adaptive adjustment on the compensation gain.
In the step, the limitation of the traditional static saturation compensation can actively inhibit the influence of the hyperbolic tangent function approximation error on the stability through an error observer and an adaptive injection mechanism, and the deviation between the actual output of the actuator and a theoretical instruction is reduced.
As an alternative embodiment, the method can further comprise freezing the current control command when the number of continuous decryption failures exceeds a threshold number, switching to a preset gain matrix, and calculating the conservative control command according to the preset gain matrix.
In the step, a cross-domain action of encryption failure and control safety is established, a control instruction is forcedly limited in an actuator linear working area through a safety gain matrix, and instantaneous saturation runaway caused by malicious attack or channel fault is avoided.
In conclusion, the application designs a vertical take-off and landing fixed wing aircraft saturation control algorithm based on encryption of a key stream coefficient switching chaotic system by utilizing the characteristic that the chaotic nonlinear system is extremely sensitive to an initial value, the encryption algorithm relies on different chaotic systems, and according to the designed switching strategy, the aircraft measurement data are encrypted by utilizing key streams generated by different chaotic systems and key stream coefficients generated randomly, so that the measurement data are transmitted in a ciphertext mode, and after the decryption module receives the ciphertext measurement data, the key stream switching strategy is obtained by utilizing a key, and then the measurement data original text is calculated. In the key distribution module, a seed random number generator is utilized to distribute key stream coefficients, the private key length is increased, the keys are distributed, and the security of plaintext encryption is improved. The embodiment of the application is applied to the encryption of the measurement data of the vertical take-off and landing aircraft, so that the sensitive measurement data of the aircraft are protected.
In addition, the scheme designs an anti-actuator saturation state feedback control algorithm based on hyperbolic tangent function characteristics, and the control algorithm is combined with the proposed chaotic encryption and decryption algorithm, so that the aircraft flies more safely and is further applied to actual scenes.
The above is a method embodiment of the present application. Based on the same inventive concept, the embodiment of the application also provides unmanned aerial vehicle control equipment based on random key stream, and the structure of the unmanned aerial vehicle control equipment is shown in fig. 6.
Fig. 6 is a schematic diagram of an internal structure of an unmanned aerial vehicle control device based on a random key stream according to an embodiment of the present application. As shown in fig. 6, the apparatus includes:
At least one processor 601;
and a memory 602 communicatively coupled to the at least one processor;
The memory 602 stores instructions executable by at least one processor, the instructions are executed by at least one processor 601, so that the at least one processor 601 can preset a chaotic initial value for a main chaotic system at an encryption end based on the chaotic system comprising the main chaotic system and an auxiliary chaotic system, select a switching strategy according to a current state component of the main chaotic system to switch the auxiliary chaotic system, generate a random key stream coefficient through a seed random number generator, combine the random key stream coefficient with the chaotic initial value to obtain a private key, acquire an aircraft measurement data plaintext, inject the plaintext into the chaotic system to generate the ciphertext by combining the random key stream coefficient, transmit the ciphertext to a decryption end, synchronize the private key and the switching strategy at the decryption end, restore the plaintext, input the restored plaintext into a state feedback controller to generate an anti-saturation control instruction, and the state feedback controller comprises a nonlinear compensation function.
The non-volatile computer storage medium which corresponds to the unmanned aerial vehicle control based on the random key stream and is provided by some embodiments of the application is provided with a computer executable instruction, wherein the computer executable instruction is set to preset a chaotic initial value for a main chaotic system of an encryption end based on the chaotic system comprising the main chaotic system and an auxiliary chaotic system, select a switching strategy according to the current state component of the main chaotic system to switch the auxiliary chaotic system, generate a random key stream coefficient through a seed random number generator, combine the random key stream coefficient with the chaotic initial value to obtain a private key, acquire an aircraft measurement data plaintext, inject the plaintext into the chaotic system, combine the random key stream coefficient to generate ciphertext, transmit the ciphertext to a decryption end, synchronize the private key and the switching strategy at the decryption end, restore the plaintext, input the restored plaintext into a state feedback controller to generate an anti-saturation control instruction, and the state feedback controller comprises a nonlinear compensation function.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for the internet of things device and the medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and the relevant points are referred to in the description of the method embodiment.
The system, the medium and the method provided by the embodiment of the application are in one-to-one correspondence, so that the system and the medium also have similar beneficial technical effects to the corresponding method, and the beneficial technical effects of the method are explained in detail above, so that the beneficial technical effects of the system and the medium are not repeated here.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and variations of the present application will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.