Control method, device and equipment of ornithopter, medium and ornithopter
Through the fuzzy control method, a predictive control amount is generated based on the current state quantity and expected value of the flapping wing vehicle, which solves the problems of slow response and control delay of the flapping wing vehicle, and achieves fast and accurate control effects.
Patent Information
- Application Number
- CN202510101273.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-27
AI Technical Summary
The prior art is difficult to effectively control the control response lag problems caused by large inertia and dynamic response delay of flapping aircraft.
By obtaining the current state quantity and expected value of the flapping wing aircraft, determining the deviation and deviation change rate, and performing fuzzy processing, fuzzy reasoning is performed according to the preset fuzzy control rules, and a control quantity with predictive effects is generated to make actions in advance and overcome the problem of slow response.
It effectively avoids the control response lag of the flapping wing aircraft, achieves the required control effect, and the fuzzy control calculation is simple and suitable for fast response.
Smart Images

Figure CN120044975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of flapping-wing aircraft, and specifically relates to a control method, device, equipment, medium and flapping-wing aircraft for a flapping-wing aircraft. Background Art
[0002] There are many types of unmanned aircraft. According to their wings, they are mainly divided into rotors, fixed wings, flapping wings, etc. Different wings have very different flight methods and phenomena. The flight of rotors and fixed wings is relatively stable and the controllability is also relatively strong. However, the flight of flapping wings has relatively severe vibrations, a large body inertia, a large dynamic response delay, and is also relatively difficult to control. However, it has good bionic characteristics and good concealment, so it has high research value.
[0003] Most of the existing general attitude controller design methods use the PID (Proportional, Integral, Derivative) control algorithm, or some other feedback control algorithms. These are all lag control algorithms, which are applicable to rotor and fixed-wing aircraft. However, for a system with a large inertia like a flapping-wing aircraft, the dynamic response is not as fast as that of rotor and fixed-wing aircraft, and the delay is large, so it is impossible to control the flapping-wing aircraft well. Summary of the Invention
[0004] In view of this, the present invention provides a control method, device, equipment, medium and flapping-wing aircraft for a flapping-wing aircraft to solve the problem of large delay in controlling a flapping-wing aircraft.
[0005] In a first aspect, the present invention provides a control method for a flapping-wing aircraft, including:
[0006] Obtain the current state quantity of the parameter to be adjusted of the flapping-wing aircraft, and determine the current expected value of the parameter to be adjusted;
[0007] Determine the current deviation between the current expected value and the current state quantity, and the current change rate of the current deviation;
[0008] Fuzzify the current deviation and the current change rate, and perform fuzzy inference on the fuzzified current deviation and current change rate according to a preset fuzzy control rule to determine a fuzzy inference result related to the control quantity; the fuzzy control rule represents the corresponding relationship between the deviation and change rate of the parameter to be adjusted and the corresponding control quantity;
[0009] Determine the corresponding current control quantity according to the fuzzy inference result;
[0010] Control the actuator for adjusting the parameter to be adjusted according to the current control quantity.
[0011] In some alternative embodiments, determining the current deviation between the current expected value and the current state quantity includes:
[0012] Determining the difference between the current expected value and the current state quantity;
[0013] Determining the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within a preset time period;
[0014] Based on the difference between the current expected value and the current state quantity, adding a preset proportion of the cumulative difference to obtain the current deviation between the current expected value and the current state quantity.
[0015] In some alternative embodiments, the preset time period is a time period starting from a fixed time point, and determining the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within the preset time period includes:
[0016] In the current control cycle, determining the previous cumulative difference, where the previous cumulative difference is the cumulative difference between the state quantity of the parameter to be adjusted and the expected value determined in the previous control cycle;
[0017] Based on the previous cumulative difference, adding the difference between the current expected value and the current state quantity to obtain the cumulative difference of the current control cycle;
[0018] Recording the cumulative difference of the current control cycle;
[0019] Alternatively, the preset time period is a time period of a fixed duration, and determining the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within the preset time period includes:
[0020] In the current control cycle, determining the previous cumulative difference, where the previous cumulative difference is the cumulative difference between the state quantity of the parameter to be adjusted and the expected value determined in the previous control cycle;
[0021] Determining the difference between the historical expected value and the historical state quantity; the historical expected value is the expected value of the parameter to be adjusted determined in the historical control cycle, the historical state quantity is the state quantity of the parameter to be adjusted determined in the historical control cycle, and the interval between the historical control cycle and the current control cycle is the fixed duration;
[0022] Based on the previous cumulative difference, adding the difference between the current expected value and the current state quantity and subtracting the difference between the historical expected value and the historical state quantity to obtain the cumulative difference of the current control cycle;
[0023] Recording the cumulative difference of the current control cycle.
[0024] In some alternative embodiments, the current deviation between the current expected value and the current state quantity satisfies:
[0025]
[0026] where k represents the index of the current control period, e(k) represents the current deviation, r(k) represents the current expected value, c(k) represents the current state quantity, λ represents the weight coefficient, i represents the index of the start period within the preset time period, m represents the index of a certain control period within the preset time period, r(m) represents the expected value determined in the m-th control period, and c(m) represents the state quantity determined in the m-th control period.
[0027] In some alternative embodiments, the fuzzification of the current deviation and the current rate of change, and the fuzzy inference of the fuzzified current deviation and current rate of change according to preset fuzzy control rules to determine the fuzzy inference result related to the control quantity include:
[0028] Mapping the current deviation to the deviation universe of discourse of the parameter to be adjusted to determine the deviation fuzzy value corresponding to the current deviation;
[0029] Mapping the current rate of change to the rate of change universe of discourse of the parameter to be adjusted to determine the rate of change fuzzy value corresponding to the current rate of change;
[0030] Determining the deviation membership degree of the deviation fuzzy value belonging to the corresponding deviation fuzzy set according to the membership function of the deviation fuzzy set, and determining the rate of change membership degree of the rate of change fuzzy value belonging to the corresponding rate of change fuzzy set according to the membership function of the rate of change fuzzy set; the value range of the deviation fuzzy set is a partial range of the deviation universe of discourse, and the value range of the rate of change fuzzy set is a partial range of the rate of change universe of discourse;
[0031] Determining the control quantity fuzzy set corresponding to the deviation fuzzy set and the rate of change fuzzy set according to the preset fuzzy control rules, and determining the control quantity membership degree corresponding to the control quantity fuzzy set according to the deviation membership degree and the rate of change membership degree; the value range of the control quantity fuzzy set is a partial range of the control quantity universe of discourse;
[0032] Determining the membership region less than the control quantity membership degree according to the membership function of the control quantity fuzzy set;
[0033] Taking the union of the membership regions of all the control quantity fuzzy sets as the result region, and taking the value in the control quantity universe of discourse corresponding to the center of the result region as the fuzzy inference result.
[0034] In some alternative embodiments, determining a corresponding current control amount according to the fuzzy inference result includes:
[0035] Performing a linear mapping on the fuzzy inference result, and using the linear mapping result as the corresponding current control amount.
[0036] In some alternative embodiments, the parameter to be adjusted includes a steering parameter and / or a pitch angle;
[0037] When the parameter to be adjusted includes a steering parameter, the current control amount is used to control the steering servo of the flapping-wing aircraft;
[0038] When the parameter to be adjusted includes a pitch angle, the current control amount is used to control the pitch servo of the flapping-wing aircraft; both the steering servo and the pitch servo are actuators of the flapping-wing aircraft.
[0039] In a second aspect, the present invention provides a control device for a flapping-wing aircraft, including:
[0040] A sensing module, configured to obtain a current state quantity of a parameter to be adjusted of the flapping-wing aircraft and determine a current expected value of the parameter to be adjusted;
[0041] A calculation module, configured to determine a current deviation between the current expected value and the current state quantity, and a current change rate of the current deviation;
[0042] A processing module, configured to fuzzify the current deviation and the current change rate, perform fuzzy inference on the fuzzified current deviation and current change rate according to a preset fuzzy control rule, and determine a fuzzy inference result related to a control amount; the fuzzy control rule represents a corresponding relationship between the deviation and change rate of the parameter to be adjusted and the corresponding control amount; determining a corresponding current control amount according to the fuzzy inference result;
[0043] An execution module, configured to control an actuator for adjusting the parameter to be adjusted according to the current control amount.
[0044] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to execute the control method of the flapping-wing aircraft according to the first aspect or any corresponding embodiment thereof.
[0045] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the control method of the flapping-wing aircraft according to the first aspect or any corresponding embodiment thereof.
[0046] In a fifth aspect, the present invention provides a flapping-wing aircraft, comprising: a fuselage, a controller, and an actuator controlled by the controller; the controller is configured to execute the control method of the flapping-wing aircraft according to the first aspect or any corresponding embodiment thereof.
[0047] Based on the current actual state variables and expected values of the flapping-wing aircraft, the present invention determines the deviation and the rate of change of the deviation therebetween, uses the deviation and the rate of change of the deviation as inputs for fuzzy control, and through fuzzy decision-making reasoning, can generate a control quantity with a predictive effect. Based on this control quantity, certain actions can be taken in advance, thereby being able to overcome the problem of slow response of the flapping-wing aircraft, effectively avoiding the control response lag of the flapping-wing aircraft, and achieving the desired control effect. Moreover, the fuzzy control calculation is relatively simple and there is no large and complex calculation process, which is also conducive to achieving fast response. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the related art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 is a schematic flowchart of the control method of the flapping-wing aircraft according to an embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of the principle of fuzzy control according to an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of controlling a servo motor based on the fuzzy control method according to an embodiment of the present invention;
[0052] Figure 4 is a schematic flowchart of another control method of the flapping-wing aircraft according to an embodiment of the present invention;
[0053] Figure 5 is a schematic diagram of the triangular membership function of each fuzzy set according to an embodiment of the present invention;
[0054] Figure 6 is a schematic diagram of the membership region of the control quantity fuzzy set ZO according to an embodiment of the present invention;
[0055] Figure 7 is a schematic diagram of the membership region of the control quantity fuzzy set PS according to an embodiment of the present invention;
[0056] Figure 8Schematic diagram of the membership region of the control quantity fuzzy set PM according to an embodiment of the present invention;
[0057] Figure 9 Schematic diagram of the result region according to an embodiment of the present invention;
[0058] Figure 10 Schematic diagram of a process for realizing steering and pitching control according to an embodiment of the present invention;
[0059] Figure 11 Schematic diagram of controlling the left - right steering of a flapping - wing aircraft according to an embodiment of the present invention;
[0060] Figure 12 Schematic diagram of controlling the up - down pitching of a flapping - wing aircraft according to an embodiment of the present invention;
[0061] Figure 13 Block diagram of the control device of a flapping - wing aircraft according to an embodiment of the present invention;
[0062] Figure 14 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed implementation manners
[0063] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts fall within the scope of protection of the present invention.
[0064] The power of a rotary - wing and fixed - wing aircraft comes from the airflow generated by the propeller. The generation time is extremely short, basically generated when the propeller starts to rotate. The magnitude of the generated airflow is controllable and stable according to the rotational speed of the propeller. Therefore, the response of the airframe changing from a relatively stable state to a maneuverable state is very timely and well - controlled. In a highly maneuverable state, the airframe is also relatively stable, and the influence of the airframe inertia can be better overcome. This enables the rotary - wing and fixed - wing aircraft to respond quickly when performing actions such as climbing, descending and turning during flight, and the response to restore the balance state is also very fast.
[0065] Due to the characteristics of the bionic flapping - wing aircraft itself, the related impacts on the flight process are as follows:
[0066] 1. The airframe inertia of the bionic flapping - wing aircraft is relatively strong. When changing from a relatively stable flight state to a highly maneuverable state, for example, when it is necessary to complete climbing, descending in height or turning, it takes a relatively long time to complete. During the process from the actuator action to the state change, there is a certain time lag in the response.
[0067] 2. It is difficult to control the attitude, flight speed, etc. of a bionic flapping-wing aircraft. Since the main source of flight power for a flapping-wing aircraft is the airflow force generated by the flapping of the wings and the torque generated by the change in the shape of the tail wing to change the airflow, the control response of the airframe is much slower than that of rotary-wing and fixed-wing aircraft.
[0068] Most of the existing general attitude controller design methods are applicable to rotary-wing and fixed-wing aircraft. Since the research on rotary-wing and fixed-wing aircraft is relatively mature and has relatively complete kinematic, dynamic, and control models, relevant control methods can directly apply these models for controller design, and theoretical analysis and simulation experiments are easier to implement intuitively. Moreover, as mentioned above, since the main power source of rotary-wing and fixed-wing aircraft is the airflow generated by the rotation of the motor-driven propeller, compared with the flapping of the wings of a flapping-wing aircraft, it has stronger maneuverability, which makes the control response of rotary-wing and fixed-wing aircraft faster, making the fuselage more robust, anti-interference, and stable.
[0069] However, for bionic flapping-wing aircraft, its research is relatively slow, and it is difficult to establish kinematic, dynamic, and control models. There is no authoritative model for relevant control methods to directly apply, making it difficult to implement theoretical analysis and simulation experiments; since the main power source of bionic flapping-wing aircraft is the airflow generated by the flapping of the wings, compared with the rotation of the propellers of rotary-wing and fixed-wing aircraft, the maneuverability of flapping-wing aircraft is poor, resulting in a relatively lagged control response of bionic flapping-wing aircraft, and its anti-interference, stability, and robustness are poor. Therefore, most of the general aircraft attitude controller design methods are not applicable to flapping-wing aircraft and cannot achieve the ideal tracking effect.
[0070] The embodiment of the present invention provides a control method for a flapping-wing aircraft. Based on the current actual state quantity and expected value of the flapping-wing aircraft, the deviation and the rate of change of the deviation between the two are determined, and a control quantity with a predictive effect is generated using fuzzy control. Based on this control quantity, certain actions can be taken in advance, thereby being able to overcome the problem of slow response of the flapping-wing aircraft, effectively avoiding the lag of the control response of the flapping-wing aircraft, and being able to achieve the required control effect.
[0071] According to the embodiment of the present invention, an embodiment of a control method for a flapping-wing aircraft is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0072] In this embodiment, a control method for a flapping-wing aircraft is provided, which can be applied to a controller for controlling a flapping-wing aircraft. This controller can be, for example, a single-chip microcomputer. Figure 1is a flowchart of a control method for a flapping-wing aircraft according to an embodiment of the present invention. As Figure 1 shown, the process includes the following steps.
[0073] Step S101, obtain the current state quantity of the parameter to be adjusted of the flapping-wing aircraft, and determine the current expected value of the parameter to be adjusted.
[0074] In this embodiment, when controlling the flapping-wing aircraft, its motion parameters need to be adjusted. For the convenience of description, the motion parameters to be adjusted are referred to as parameters to be adjusted. For example, the parameter to be adjusted may include a steering parameter for realizing the steering control of the flapping-wing aircraft, or may include a pitch parameter for realizing the pitch control of the flapping-wing aircraft, such as the pitch angle, etc. Moreover, the number of parameters to be adjusted may be one or multiple, specifically determined based on actual requirements.
[0075] The flapping-wing aircraft is controlled with sensors for collecting the motion parameters of the flapping-wing aircraft. For example, the flapping-wing aircraft has a six-axis sensor, a satellite positioning module, etc. Based on these sensors, the actual values of the parameters to be adjusted of the flapping-wing aircraft can be collected in real time. The actual value can describe the state of the flapping-wing aircraft at the current moment, which is the current state quantity of the flapping-wing aircraft. Among them, information such as the actual value collected by the sensor can be sent to a controller such as a single-chip microcomputer through serial port or bus communication for processing and calculation, so that the controller can process all the acquired real-time information online during flight. The controller of the flapping-wing aircraft calculates according to the acquired real-time information, obtains the control quantity, and transmits it to the actuator for action response.
[0076] Moreover, the value that the parameter to be adjusted should have at the current moment, that is, the current expected value, can also be determined. Among them, the current expected value of the parameter to be adjusted can be determined in real time based on the current task planning of the flapping-wing aircraft, etc.
[0077] Since in an embedded system, the entire control timing is discrete and the control method performs a control action once in a control cycle, the aircraft generally adopts a periodic control method to determine the control quantity of the aircraft in each control cycle to achieve real-time control of the aircraft. For example, every 10 ms, 20 ms, etc. can be used as a control cycle. In the current control cycle, the state quantity and the expected value of the parameter to be adjusted of the flapping-wing aircraft, that is, the current state quantity and the current expected value, can be determined, so as to be able to determine the control quantity of the flapping-wing aircraft based on the current state quantity and the current expected value in the current control cycle.
[0078] It can be understood that if the number of parameters to be adjusted is multiple, for each parameter to be adjusted, its current state quantity and current expected value are determined.
[0079] Step S102, determine the current deviation between the current expected value and the current state quantity, and the current change rate of the current deviation.
[0080] In this embodiment, in the current control cycle, after determining the current expected value and the current state quantity of the parameter to be adjusted, the deviation between the two, that is, the current deviation, can be determined. For example, if k represents the index of the current control cycle, that is, the current control cycle is the k-th control cycle, if the current expected value of the parameter to be adjusted is r(k) and the current state quantity of the parameter to be adjusted is c(k), the difference between the two can be used as the corresponding current deviation e(k), that is: e(k) = r(k) - c(k).
[0081] Moreover, the change rate of the current deviation, that is, the current change rate, can also be determined. The current change rate specifically represents the change of the deviation between the current expected value and the current state quantity over time. For example, based on the deviation e(k - 1) in the previous control cycle (i.e., the (k - 1)-th control cycle), the current change rate e c (k) of the current control cycle can be calculated. For example, where T is the duration of the control cycle.
[0082] Step S103, fuzzify the current deviation and the current change rate, and perform fuzzy inference on the fuzzified current deviation and current change rate according to the preset fuzzy control rules to determine the fuzzy inference result related to the control quantity; the fuzzy control rules represent the corresponding relationship between the deviation and change rate of the parameter to be adjusted and the corresponding control quantity.
[0083] Since the dynamic response of the flapping-wing aircraft is not as fast as that of the rotary-wing and fixed-wing aircraft, during turning and ascending / descending, there is a certain time delay in the process from the action of the actuator to the state change. In this embodiment, based on fuzzy control, the attitude control of the flapping-wing aircraft is carried out to be able to predict the state of the flapping-wing aircraft, so that the attitude controller of the flapping-wing aircraft has a certain prediction ability, and certain actions can be taken in advance for the current state and the target state, thereby being able to overcome the problem of slow response and accelerating the control response to a certain extent.
[0084] In this embodiment, the current deviation and the current change rate are used as the basis for fuzzy control to be able to obtain the comparison between the control target (i.e., the parameter to be adjusted) and the current state and its change trend, and based on the numerical magnitudes of the two to make a decision on how the actuator will act, which can not only make the current deviation smaller, but also make the adjustment faster and more advanced while the deviation becomes smaller, so as to achieve the purpose of prediction.
[0085] Specifically, the current deviation and the current rate of change of the parameter to be adjusted are fuzzified to map the current deviation and the current rate of change to corresponding fuzzy sets respectively; and a fuzzy control rule is preset in advance, which specifically represents the correspondence between the deviation and the rate of change of the parameter to be adjusted and the corresponding control quantity. For example, the fuzzy control rule can be set based on a table or a conditional statement.
[0086] According to the fuzzy control rule, fuzzy inference is performed on the fuzzified current deviation and the current rate of change, and the fuzzy value of the control quantity can be determined. Then, defuzzification is performed on this fuzzy value, and the fuzzy inference result of the control quantity can be determined. This fuzzy inference result can represent the magnitude of the control quantity.
[0087] Step S104, determine the corresponding current control quantity according to the fuzzy inference result.
[0088] In this embodiment, the fuzzy inference result is data related to the control quantity, and it cannot be directly used as the control quantity of the flapping-wing aircraft; by converting the fuzzy inference result, it can be converted into a control quantity that can control the flapping-wing aircraft, and this control quantity is the current control quantity determined in the current control cycle.
[0089] Figure 2 shows a schematic diagram of the principle of fuzzy control; as Figure 2 shown, the current expected value r(k) and the current state quantity c(k) collected by the detection sensor are used as the inputs of the fuzzy control. After fuzzification, fuzzy inference, and defuzzification, the corresponding fuzzy inference result can be obtained. After a certain conversion process ( Figure 2 P in represents the conversion process), the corresponding current control quantity U(k) is generated. Then, the detection sensor can continue to collect the state quantity c(k + 1) of the next control cycle, and repeat the above process to realize the real-time determination of the control quantity of each control cycle.
[0090] Step S105, control the actuator for adjusting the parameter to be adjusted according to the current control quantity.
[0091] In this embodiment, after the current control quantity is determined, the corresponding actuator can be controlled based on this current control quantity, so that the parameter to be adjusted of the flapping-wing aircraft can be adjusted, and the parameter to be adjusted can be adjusted from the current state quantity to the current expected value.
[0092] For example, the actuating structure of a flapping-wing aircraft may include a motor and a servo. The motor can drive the wings of the flapping-wing aircraft through gears, and the servo can drive the tail wing of the flapping-wing aircraft. Moreover, the flapping-wing aircraft includes two types of servos, one of which is used to control steering and the other is used to control pitching. If the parameter to be adjusted is the pitching angle of the flapping-wing aircraft, the corresponding actuating mechanism is the servo for controlling pitching. The servo is controlled based on the calculated current control amount to achieve attitude adjustment of the flapping-wing aircraft.
[0093] Figure 3 Fig. shows a schematic diagram of controlling a servo based on a fuzzy control method. As Figure 3 shown, after controlling the servo based on the current control amount U(k), the attitude of the flapping-wing aircraft can be changed. In the next control cycle, the detection sensor can collect the state quantity c(k + 1) of the next cycle to achieve predictive control of the flapping-wing aircraft.
[0094] The control method of the flapping-wing aircraft provided in this embodiment determines the deviation and the rate of change of the deviation between the current actual state quantity and the expected value of the flapping-wing aircraft based on the current actual state quantity and the expected value of the flapping-wing aircraft. The deviation and the rate of change of the deviation are used as the inputs of fuzzy control. Through fuzzy decision-making reasoning, a control amount with a predictive effect can be generated. Based on this control amount, certain actions can be taken in advance, thereby being able to overcome the problem of slow response of the flapping-wing aircraft, effectively avoiding the control response lag of the flapping-wing aircraft, and achieving the required control effect. Moreover, the fuzzy control calculation is relatively simple and there is no large and complex calculation process, which is also beneficial to achieving fast response.
[0095] In this embodiment, a control method of a flapping-wing aircraft is provided, which can be applied to a controller for controlling the flapping-wing aircraft. The controller can be, for example, a single-chip microcomputer. Figure 4 is a flowchart of the control method of the flapping-wing aircraft according to an embodiment of the present invention. As Figure 4 shown, the process includes the following steps.
[0096] Step S401, obtain the current state quantity of the parameter to be adjusted of the flapping-wing aircraft, and determine the current expected value of the parameter to be adjusted.
[0097] For details, please refer to Figure 1 step S101 of the embodiment shown, which will not be elaborated here.
[0098] Step S402, determine the current deviation between the current expected value and the current state quantity, and the current rate of change of the current deviation.
[0099] Specifically, the above step S402 "determine the current deviation between the current expected value and the current state quantity" includes the following steps S4021 to S4023.
[0100] Step S4021: Determine the difference between the current expected value and the current state quantity.
[0101] In this embodiment, let k denote the index of the current control period, that is, the current control period is the k-th control period. Also, assume that the current expected value of the parameter to be adjusted is r(k), and the current state quantity of the parameter to be adjusted is c(k). Then the difference between the two is r(k) - c(k).
[0102] Step S4022: Determine the cumulative difference between the state quantity and the expected value of the parameter to be adjusted within a preset time period.
[0103] In this embodiment, a time period for calculating the cumulative difference is preset in advance, that is, the preset time period. This preset time period can be a sliding time window; or, it can also start from a fixed time point to form this preset time period. For example, starting from the starting time point of controlling the flapping-wing aircraft, the time period from the starting time point to the current time point is used as the preset time period. Since the difference between the expected value and the state quantity can be positive or negative, and the control objective is to make the expected value and the state quantity close, starting from a fixed time point, the determined cumulative difference also has a tendency to be 0.
[0104] Specifically, within this preset time period, there are multiple control periods. The difference between the state quantity and the expected value in each control period can be determined, and these differences are accumulated to obtain the corresponding cumulative difference.
[0105] For example, let i denote the index of the starting period within the preset time period, and the end time point of this preset time period is the current control period, that is, the index k of the current control period is also the index of the termination period within the preset time period. Also, let m denote the index of a certain control period within the preset time period, that is, i ≤ m ≤ k; and let r(m) denote the expected value determined in the m-th control period, and c(m) denote the state quantity determined in the m-th control period. Then within this preset time period, the cumulative difference between the state quantity and the expected value of the parameter to be adjusted can be expressed as:
[0106] Step S4023: On the basis of the difference between the current expected value and the current state quantity, add a preset proportion of the cumulative difference to obtain the current deviation between the current expected value and the current state quantity.
[0107] In this embodiment, since the flapping-wing aircraft has a large response delay during attitude adjustment operations such as turning and pitching, it is prone to accumulate large control errors during the control process. To further reduce the impact caused by the body delay, the cumulative difference of the parameter to be adjusted is introduced, and the cumulative difference is used as a supplementary item for the required deviation, that is, the cumulative difference is added to the deviation of the parameter to be adjusted, so as to reduce the impact of the cumulative difference on the body delay to a certain extent and further improve the response speed of the flapping-wing aircraft.
[0108] Specifically, based on the difference between the current expected value and the current state quantity, the cumulative difference can be added to obtain the current deviation between the current expected value and the current state quantity; that is, the current deviation includes not only the difference between the current expected value and the current state quantity, but also the cumulative difference within a preset time period. Moreover, a certain weight coefficient λ is set for the cumulative difference, and the weight coefficient λ is used to adjust the proportion of the cumulative difference in the deviation, so as to adjust the influence of the cumulative difference on the deviation.
[0109] Optionally, the current deviation e(k) between the current expected value r(k) and the current state quantity c(k) satisfies the following formula (1):
[0110]
[0111] Wherein, as described above, k represents the index of the current control period, e(k) represents the current deviation, r(k) represents the current expected value, c(k) represents the current state quantity, λ represents the weight coefficient, i represents the index of the start period within the preset time period, m represents the index of a certain control period within the preset time period, r(m) represents the expected value determined in the mth control period, and c(m) represents the state quantity determined in the mth control period.
[0112] In this embodiment, the cumulative difference is introduced into the deviation of the parameter to be adjusted, so that the control quantity generated subsequently based on this deviation can effectively reduce the influence of the cumulative difference, and can make the state quantity of the parameter to be adjusted approach the expected value faster, reducing the response delay of the flapping-wing aircraft.
[0113] Optionally, as described above, the preset time period can be a time period starting from a fixed time point. For example, the index i in the above formula (1) is a fixed value, for example, i = 1, that is, starting from the first control period, the differences are accumulated.
[0114] In this case, the above step S4022 "determine the cumulative difference between the state quantity and the expected value of the parameter to be adjusted within the preset time period" can specifically include the following steps A1 to A3.
[0115] Step A1: In the current control period, determine the previous cumulative difference, which is the cumulative difference between the status quantity of the parameter to be adjusted determined in the previous control period and the expected value.
[0116] Step A2: On the basis of the previous cumulative difference, add the difference between the current expected value and the current status quantity to obtain the cumulative difference in the current control period.
[0117] Step A3: Record the cumulative difference in the current control period.
[0118] In this embodiment, in the previous control period of the current control period, that is, the (k - 1)-th control period, the cumulative difference in the previous control period is recorded. In the current control period, the cumulative difference between the status quantity of the parameter to be adjusted determined in the previous control period and the expected value can be obtained. For the sake of description, this cumulative difference is referred to as the "previous cumulative difference"; for example, the previous cumulative difference can be:
[0119] In the current control period, after determining the difference r(k) - c(k) between the current expected value r(k) and the current status quantity c(k), the previous cumulative difference can be added to obtain the cumulative difference in the current control period. For example,
[0120] And record the calculated cumulative difference in the current control period. In the next control period, by reading the cumulative difference in the current control period, the cumulative difference in the next control period can be calculated. For example, the cumulative difference in the next control period is It can be understood that when recording the cumulative difference in the current control period, the previous cumulative difference can be overwritten, that is, only the latest cumulative difference needs to be recorded.
[0121] In this embodiment, when calculating the cumulative difference, using the recorded previous cumulative difference, the cumulative difference in the current control period can be calculated simply and quickly without performing cumulative operations, and the calculation efficiency is high.
[0122] Alternatively, the preset time period can also be a time period with a fixed duration, that is, the preset time period is a sliding time window; for example, the index i in the above formula (1) is a variable, but k - i is a fixed value. Correspondingly, the above step S4022 "determine the cumulative difference between the status quantity of the parameter to be adjusted and the expected value within the preset time period" can specifically include the following steps B1 to B4.
[0123] Step B1: In the current control period, determine the previous cumulative difference, which is the cumulative difference between the status quantity of the parameter to be adjusted determined in the previous control period and the expected value.
[0124] Step B2: Determine the difference between the historical expected value and the historical state quantity. The historical expected value is the expected value of the parameter to be adjusted determined in the historical control period, the historical state quantity is the state quantity of the parameter to be adjusted determined in the historical control period, and the interval between the historical control period and the current control period is a fixed duration.
[0125] Step B3: On the basis of the previous cumulative difference, add the difference between the current expected value and the current state quantity, and subtract the difference between the historical expected value and the historical state quantity to obtain the cumulative difference of the current control period.
[0126] Step B4: Record the cumulative difference of the current control period.
[0127] In this embodiment, similar to the above Step A1, in the current control period, the previous cumulative difference can also be determined. The duration of the preset time period is fixed. If the fixed duration corresponds to the i-th control period to the k-th control period, then the preset time period of the previous cumulative difference corresponds to the (i - 1)-th control period to the (k - 1)-th control period. The previous cumulative difference can be expressed as:
[0128] Moreover, in the current control period, the control period with an interval of the above fixed duration from the current control period can be determined, that is, the historical control period. It can be understood that if the fixed duration corresponds to the i-th control period to the k-th control period, then the (i - 1)-th control period is the historical control period.
[0129] When calculating the cumulative difference of the current control period, on the basis of the previous cumulative difference add the difference rk - ck between the current expected value rk and the current state quantity ck, and subtract the difference r(i - 1) - c(i - 1) between the historical expected value r(i - 1) and the historical state quantity c(i - 1), then the cumulative difference of the current control period can be obtained:
[0130] Moreover, record the calculated cumulative difference of the current control period, and the difference r(k) - c(k) of the current control period can also be recorded for the calculation of subsequent control periods.
[0131] In this embodiment, when calculating the cumulative difference, using the recorded previous cumulative difference and the difference of the historical control period, the cumulative difference of the current control period can also be calculated simply and quickly. Moreover, the preset time period is a sliding window, which can also reduce the influence of premature control periods (such as the (i - 1)-th, (i - 2)-th control periods, etc.) on the current control period.
[0132] It should be noted that when calculating the current change rate e c (k) of the current control cycle, the deviation can be determined and calculated based on the above formula (1). Alternatively, it can also be directly calculated based on the difference between the expected value and the state quantity, that is, the cumulative difference is not considered. For example, the current change rate e c (k) of the current control cycle can be:
[0133] Step S403: Fuzzify the current deviation and the current change rate, and perform fuzzy inference on the fuzzified current deviation and the current change rate according to the preset fuzzy control rules to determine the fuzzy inference result related to the control quantity; the fuzzy control rules represent the corresponding relationship between the deviation and the change rate of the parameter to be adjusted and the corresponding control quantity.
[0134] For details, please refer to Figure 1 Step S103 of the illustrated embodiment, which will not be elaborated here.
[0135] In some optional embodiments, the above step S403 "fuzzify the current deviation and the current change rate, and perform fuzzy inference on the fuzzified current deviation and the current change rate according to the preset fuzzy control rules to determine the fuzzy inference result related to the control quantity" may include the following steps C1 to C6.
[0136] Step C1: Map the current deviation to the deviation domain of the parameter to be adjusted to determine the deviation fuzzy value corresponding to the current deviation.
[0137] Step C2: Map the current change rate to the change rate domain of the parameter to be adjusted to determine the change rate fuzzy value corresponding to the current change rate.
[0138] In this embodiment, to facilitate the establishment of fuzzy control rules, input quantities such as deviation and change rate need to be mapped to a certain interval range, that is, the domain. Specifically, the domain corresponding to the deviation is called the deviation domain, and the domain corresponding to the change rate is called the change rate domain. For example, the deviation domain and the change rate domain can be the same, such as [-3, 3], [-6, 6], [-9, 9], etc.
[0139] Moreover, when mapping the input quantity to the corresponding domain, there is a corresponding mapping function. For example, this mapping function can be an equal-proportion linear mapping function. After determining the current deviation and the current change rate, based on the corresponding mapping function, the two can be respectively mapped to the deviation domain and the change rate domain, so as to determine the corresponding deviation fuzzy value and change rate fuzzy value.
[0140] For example, when the deviation domain and the change rate domain are both [-3, 3], the mapping process of the current deviation and the current change rate can be expressed as: e′(k) = K e·e(k), e' c (k) = K ec ·e c (k). Wherein, e'(k) represents the deviation fuzzy value, and e'(k) ∈ [-3, 3], e' c (k) represents the rate of change fuzzy value, and e' c (k) ∈ [-3, 3]; K e and K ec are respectively the mapping coefficients of the deviation mapping function and the rate of change mapping function.
[0141] Step C3, determine the deviation membership degree of the deviation fuzzy value belonging to the corresponding deviation fuzzy set according to the membership function of the deviation fuzzy set, and determine the rate of change membership degree of the rate of change fuzzy value belonging to the corresponding rate of change fuzzy set according to the membership function of the rate of change fuzzy set; the value range of the deviation fuzzy set is a partial range of the deviation universe of discourse, and the value range of the rate of change fuzzy set is a partial range of the rate of change universe of discourse.
[0142] In this embodiment, within the corresponding range of the universe of discourse, multiple fuzzy sets can be set; and, each fuzzy set is provided with a corresponding membership function, and the membership function can be, for example, a triangular membership function, a trapezoidal membership function, a normal distribution membership function, etc. In this embodiment, through simulation reasoning and comparing different membership degree functions, it is found that the triangular membership function has better local linear characteristics and the reasoning result is more intuitive and sensitive, so the triangular membership function can be adopted.
[0143] For example, if the universe of discourse of [-3, 3] is divided into seven fuzzy sets: negative big (NB), negative middle (NM), negative small (NS), zero (ZO), positive small (PS), positive middle (PM), positive big (PB), the triangular membership degree functions of each fuzzy set can be seen in Figure 5 as shown.
[0144] Among them, the expression of the triangular membership function of each fuzzy set is as follows:
[0145]
[0146] Among them, \(x\) represents the fuzzy value mapped to the universe of discourse, such as the deviation fuzzy value, the rate of change fuzzy value, etc. \(A(x)\) represents the membership degree of the fuzzy value \(x\) belonging to the corresponding fuzzy set, and \(A(x)\in[0,1]\). \(a\), \(b\), and \(c\) respectively correspond to the left boundary, the middle value, and the right boundary of the fuzzy set. Taking the fuzzy set NM as an example, \(a = - 3\), \(b=-2\), \(c = - 1\). It can be understood that for the edge fuzzy sets NB and PB, there are no corresponding left boundary \(a\) and right boundary \(c\), and the corresponding part of the membership function can be ignored.
[0147] After determining the corresponding fuzzy value (for example, the deviation fuzzy value, the rate of change fuzzy value), the membership degree of the fuzzy value belonging to the corresponding fuzzy set can be determined based on the membership function of each fuzzy set.
[0148] For example, as Figure 5 shown, if the fuzzy value \(x=-1.5\), then the membership degrees of the fuzzy value \(x\) belonging to the fuzzy set NM and the fuzzy set NS are both 0.5, and the membership degrees belonging to other fuzzy sets are all 0. Or, if the fuzzy value \(x = - 1.75\), then the membership degrees of the fuzzy value \(x\) belonging to the fuzzy set NM and the fuzzy set NS are 0.75 and 0.25 respectively, and the membership degrees belonging to other fuzzy sets are all 0.
[0149] It can be understood that for the deviation fuzzy value and the rate of change fuzzy value, the corresponding membership degrees, that is, the deviation membership degree and the rate of change membership degree, can be determined in the above manner, which will not be elaborated here.
[0150] Step C4, according to the preset fuzzy control rules, determine the control quantity fuzzy set corresponding to the deviation fuzzy set and the rate of change fuzzy set, and determine the control quantity membership degree corresponding to the control quantity fuzzy set according to the deviation membership degree and the rate of change membership degree; the value range of the control quantity fuzzy set is a partial range of the universe of discourse of the control quantity.
[0151] In this embodiment, for the output control quantity, its universe of discourse (i.e., the universe of discourse of the control quantity) is also divided into multiple fuzzy sets, that is, the control quantity fuzzy sets, and corresponding membership functions are set; this process is similar to the process of setting the fuzzy sets of the input quantity above. For example, seven control quantity fuzzy sets can also be set in the manner Figure 5 shown, and corresponding membership functions are set for each control quantity fuzzy set.
[0152] And, the fuzzy control rules are preset, and the fuzzy control rules specifically represent the corresponding relationship between the deviation fuzzy set, the rate of change fuzzy set, and the control quantity fuzzy set. For example, if the deviation fuzzy set, the rate of change fuzzy set, and the control quantity fuzzy set are all seven, and correspond to negative large, negative medium, negative small, zero, positive small, positive medium, and positive large, then a kind of fuzzy control rule can be as shown in Table 1 below.
[0153] Table 1
[0154]
[0155] In Table 1, in order to intuitively reflect the magnitude relationship between the corresponding input quantities (i.e., deviation and rate of change) and the output quantity (i.e., control quantity), the vertices -3, -2, -1, 0, 1, 2, 3 of each fuzzy set are used in Table 1. The horizontal header of Table 1 represents each deviation fuzzy set, and the vertical header represents each rate-of-change fuzzy set. Each element in the 7×7 matrix represents a control quantity fuzzy set.
[0156] After determining the deviation membership degree and the rate-of-change membership degree, based on this fuzzy control rule, the membership degree corresponding to the corresponding control quantity fuzzy set can be determined, that is, the control quantity membership degree. Among them, the maximum value, minimum value, and average value in the deviation membership degree and the rate-of-change membership degree can be used as the control quantity membership degree of the corresponding control fuzzy set, which can be specifically determined based on actual requirements.
[0157] For example, if the deviation membership degree of the deviation fuzzy value belonging to the deviation fuzzy set NM (corresponding to -2 in Table 1) is 0.6, and the rate-of-change membership degree of the rate-of-change fuzzy value belonging to the rate-of-change fuzzy set NS (corresponding to -1 in Table 1) is 0.4; based on the third row (corresponding to the rate-of-change fuzzy set NS) and the second column (corresponding to the deviation fuzzy set NM) of Table 1, it can be known that the deviation fuzzy set NM and the rate-of-change fuzzy set NS correspond to the control quantity fuzzy set PM (corresponding to 2 in Table 1). Therefore, based on the deviation membership degree of 0.6 and the rate-of-change membership degree of 0.4, the control quantity membership degree of this control quantity fuzzy set PM can be determined. For example, this control quantity membership degree is the average value of the two, that is, 0.5.
[0158] Among them, since there may be multiple non-zero deviation membership degrees and rate-of-change membership degrees, and different deviation fuzzy sets and rate-of-change fuzzy sets may correspond to the same control quantity fuzzy set, multiple control quantity membership degrees of a certain control quantity fuzzy set can be determined. At this time, the maximum value, minimum value, average value, or median value of the multiple control quantity membership degrees can also be used as the finally determined control quantity membership degree, which will not be elaborated here.
[0159] Step C5: According to the membership function of the control quantity fuzzy set, determine the membership region smaller than the control quantity membership degree.
[0160] Step C6: Take the union of the membership regions of all control quantity fuzzy sets as the result region, and take the value in the control quantity universe of discourse corresponding to the center of the result region as the fuzzy inference result.
[0161] In this embodiment, if the membership degree of a control quantity fuzzy set corresponding to a certain control quantity is 0, then this control quantity fuzzy set can be not considered. If multiple control quantity fuzzy sets with non-zero membership degrees of the control quantity are currently determined, then the effective membership regions in each control quantity fuzzy set can be determined. This membership region is the region less than the corresponding membership degree of the control quantity. Moreover, the union of the membership regions of all control quantity fuzzy sets is taken to obtain the result region, and the position where the center (such as the centroid) of this result region is located can be determined. Thus, the fuzzy value in the control quantity universe of discourse corresponding to this center can be determined, and this fuzzy value is used as the fuzzy inference result to realize the defuzzification of the control quantity.
[0162] Figures 6 to 9 Fig. shows a schematic diagram of defuzzifying the control quantity. Among them, the membership degree of the control quantity fuzzy set ZO for the control quantity is 0.25, the membership degree of the control quantity fuzzy set PS for the control quantity is 0.75, and the membership degree of the control quantity fuzzy set PM for the control quantity is 0.5. Then, the membership regions of the control quantity fuzzy set ZO, the control quantity fuzzy set PS, and the control quantity fuzzy set PM can be referred to Figure 6 、 Figure 7 、 Figure 8 the shaded regions in.
[0163] Taking the union of the membership regions of the control quantity fuzzy set ZO, the control quantity fuzzy set PS, and the control quantity fuzzy set PM, the corresponding result region can be determined. This result region can be specifically referred to Figure 9 the shaded region in. After that, the center point of this shaded part can be calculated, and then the corresponding fuzzy value of the control quantity can be obtained. As Figure 9 shown, if the center of the result region is point P, then the value of point P on the x-axis is the finally determined fuzzy value of the control quantity, that is, the fuzzy inference result.
[0164] Among them, the point at the position where the area of the result region is equally divided can be used as the center of the result region. For example, using the membership functions of each control quantity fuzzy set, the total area S of this result region can be determined by integration, and then the position corresponding to half of the area S / 2 can be determined. Finally, the fuzzy inference result can be calculated.
[0165] In this embodiment, the control quantity fuzzy set corresponding to the deviation fuzzy set and the change rate fuzzy set can be determined according to the fuzzy control rules, and the membership degree of the control quantity corresponding to the control quantity fuzzy set can be determined according to the deviation membership degree and the change rate membership degree. Moreover, the union of the membership regions of each control quantity fuzzy set is taken to determine the center of the final region, so as to realize the defuzzification of the control quantity. This method can combine the membership regions of all control quantity fuzzy sets, can generate the fuzzy inference result more accurately, and the calculation method is not complicated, which can ensure the fast control response of the flapping-wing aircraft.
[0166] Step S404: Determine the corresponding current control quantity according to the fuzzy inference result.
[0167] For details, please refer to Figure 1 Step S104 of the illustrated embodiment, which will not be elaborated here.
[0168] Optionally, the above step S404, "Determine the corresponding current control quantity according to the fuzzy inference result", may include: performing a linear mapping on the fuzzy inference result and using the linear mapping result as the corresponding current control quantity.
[0169] As described above, the fuzzy inference result is the fuzzy value of the control quantity in the control quantity domain. For example, the value range of the fuzzy inference result is [-3, 3]. In this embodiment, a linear mapping is performed on the fuzzy inference result to map the fuzzy inference result to the actually required control quantity, that is, the current control quantity.
[0170] For example, if the corresponding fuzzy inference result is u(k) based on the current difference and current transformation rate between the current expected value r(k) and the current state quantity c(k), the effective current control quantity U(k) can be expressed as: U(k) = P * u(k). Where P represents the mapping coefficient of the linear mapping.
[0171] The calculated current control quantity U(k) can be directly applied to the actuator of the flapping-wing aircraft, enabling the actuator to act quickly, accurately, and stably, and causing the airframe to make an accurate response.
[0172] Step S405: Control the actuator for adjusting the parameter to be adjusted according to the current control quantity.
[0173] For details, please refer to Figure 1 Step S105 of the illustrated embodiment, which will not be elaborated here.
[0174] In some alternative embodiments, the parameter to be adjusted may include a steering parameter and / or a pitch angle; and the actuator of the flapping-wing aircraft includes at least a steering servo and a pitch servo.
[0175] When the parameter to be adjusted includes a steering parameter, the current control quantity is used to control the steering servo of the flapping-wing aircraft; when the parameter to be adjusted includes a pitch angle, the current control quantity is used to control the pitch servo of the flapping-wing aircraft. Wherein, both the steering servo and the pitch servo are actuators of the flapping-wing aircraft.
[0176] In this embodiment, fuzzy inferences can be performed on the steering parameter and the pitch angle respectively to determine the respective control quantities for controlling steering and pitching.
[0177] Specifically, as Figure 10As shown, based on the detection sensor, the state variables of the steering parameter and the pitch angle can be collected, namely the steering state variable and the pitch state variable. Moreover, the difference between the expected value of the steering calculation and the current steering state value is calculated to obtain the steering deviation. Similarly, the pitch deviation can be calculated. Then, the differential solution of the steering deviation value and the pitch deviation value is carried out to obtain the differential value of the steering deviation and the differential value of the pitch deviation, and the two are used as the steering change rate and the pitch change rate respectively.
[0178] The above four values are input into the attitude controller based on fuzzy control. Two controllers can be set, namely the steering attitude fuzzy controller and the pitch attitude fuzzy controller, for separate solutions. Specifically, the steering deviation value and the steering change rate are input into the steering attitude fuzzy controller and fuzzified to determine the fuzzy values of the steering deviation and the steering change rate. Based on this, fuzzy inference and defuzzification are carried out to obtain the corresponding steering fuzzy inference result, and then the steering control amount is determined through linear mapping, so that the corresponding steering servo can be controlled based on this steering control amount.
[0179] Similarly, the pitch deviation value and the pitch change rate are input into the pitch attitude fuzzy controller and fuzzified to determine the fuzzy values of the pitch deviation and the pitch change rate. Based on this, fuzzy inference and defuzzification are carried out to obtain the corresponding pitch fuzzy inference result, and then the pitch control amount is determined through linear mapping, so that the corresponding pitch servo can be controlled based on this pitch control amount. Diverse control can be achieved by using the steering control amount and the pitch control amount, which can meet the control requirements.
[0180] The control method of the flapping-wing aircraft provided in this embodiment determines the deviation and the deviation change rate between the two based on the current actual state variables and the expected values of the flapping-wing aircraft. The deviation and the deviation change rate are used as the inputs of fuzzy control. Through fuzzy decision-making inference, a control amount with a predictive effect can be generated. Based on this control amount, certain actions can be taken in advance, so as to overcome the problem of slow response of the flapping-wing aircraft, effectively avoid the control response lag of the flapping-wing aircraft, and achieve the required control effect. Moreover, a cumulative difference is introduced for the deviation, which can reduce the influence of the cumulative difference on the body delay to a certain extent and further improve the response speed of the flapping-wing aircraft.
[0181] This embodiment also provides a flapping-wing aircraft, which includes: a body, a controller, and an actuator controlled by the controller; the controller is used to execute the control method of the flapping-wing aircraft provided in any of the above embodiments.
[0182] In this embodiment, the body of the flapping-wing aircraft may specifically include mechanical structures such as wings and tail fins, and the actuator may specifically include motors, servos, etc. The actuator drives the mechanical structure to act, so that the flapping-wing aircraft can complete the required flight tasks.
[0183] For example, the execution structure includes a steering servo and a pitching servo located on the tail fin. Based on the controller determining the steering control amount and the pitching control amount, the steering servo and the pitching servo can be controlled respectively.
[0184] Among them, steering is achieved by the action of the steering servo driving the steering rudder blade to generate an airflow change. The directionality of the steering control amount output by the controller determines the direction of left and right steering. Figure 11 Fig. shows a schematic diagram of controlling the left and right steering of a flapping-wing aircraft.
[0185] Similarly, pitching is achieved by the action of the pitching servo driving the pitching rudder blade to generate an airflow change. The directionality of the pitching control amount output by the controller determines the direction of pitching up and down. Figure 12 Fig. shows a schematic diagram of controlling the up and down pitching of a flapping-wing aircraft.
[0186] In this embodiment, a control device for a flapping-wing aircraft is further provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" may be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0187] This embodiment provides a control device for a flapping-wing aircraft, as Figure 13 shown, including:
[0188] A sensing module 1301, configured to obtain the current state quantity of the parameter to be adjusted of the flapping-wing aircraft and determine the current expected value of the parameter to be adjusted;
[0189] A calculation module 1302, configured to determine the current deviation between the current expected value and the current state quantity, and the current change rate of the current deviation;
[0190] A processing module 1303, configured to fuzzify the current deviation and the current change rate, and perform fuzzy inference on the fuzzified current deviation and current change rate according to a preset fuzzy control rule to determine a fuzzy inference result related to the control quantity; the fuzzy control rule represents the corresponding relationship between the deviation and change rate of the parameter to be adjusted and the corresponding control quantity; determine the corresponding current control quantity according to the fuzzy inference result;
[0191] An execution module 1304, configured to control an actuator for adjusting the parameter to be adjusted according to the current control quantity.
[0192] In some alternative embodiments, the computing module 1302 determines the current deviation between the current expected value and the current state quantity, including:
[0193] Determine the difference between the current expected value and the current state quantity;
[0194] Determine the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within a preset time period;
[0195] On the basis of the difference between the current expected value and the current state quantity, add a preset proportion of the cumulative difference to obtain the current deviation between the current expected value and the current state quantity.
[0196] In some alternative embodiments, the preset time period is a time period starting from a fixed time point, and the computing module 1302 determines the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within the preset time period, including:
[0197] In the current control cycle, determine the previous cumulative difference, where the previous cumulative difference is the cumulative difference between the state quantity of the parameter to be adjusted and the expected value determined in the previous control cycle;
[0198] On the basis of the previous cumulative difference, add the difference between the current expected value and the current state quantity to obtain the cumulative difference of the current control cycle;
[0199] Record the cumulative difference of the current control cycle;
[0200] Alternatively, the preset time period is a time period of a fixed duration, and the computing module 1302 determines the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within the preset time period, including:
[0201] In the current control cycle, determine the previous cumulative difference, where the previous cumulative difference is the cumulative difference between the state quantity of the parameter to be adjusted and the expected value determined in the previous control cycle;
[0202] Determine the difference between the historical expected value and the historical state quantity; the historical expected value is the expected value of the parameter to be adjusted determined in the historical control cycle, the historical state quantity is the state quantity of the parameter to be adjusted determined in the historical control cycle, and the interval between the historical control cycle and the current control cycle is the fixed duration;
[0203] On the basis of the previous cumulative difference, add the difference between the current expected value and the current state quantity and subtract the difference between the historical expected value and the historical state quantity to obtain the cumulative difference of the current control cycle;
[0204] Record the cumulative difference of the current control period.
[0205] In some alternative embodiments, the current deviation between the current expected value and the current state quantity satisfies:
[0206]
[0207] where k represents the index of the current control period, e(k) represents the current deviation, r(k) represents the current expected value, c(k) represents the current state quantity, λ represents the weight coefficient, i represents the index of the start period within the preset time period, m represents the index of a certain control period within the preset time period, r(m) represents the expected value determined in the m-th control period, and c(m) represents the state quantity determined in the m-th control period.
[0208] In some alternative embodiments, the processing module 1303 fuzzifies the current deviation and the current rate of change, and performs fuzzy inference on the fuzzified current deviation and current rate of change according to preset fuzzy control rules to determine a fuzzy inference result related to the control quantity, including:
[0209] Map the current deviation to the deviation universe of discourse of the parameter to be adjusted, and determine the deviation fuzzy value corresponding to the current deviation;
[0210] Map the current rate of change to the rate-of-change universe of discourse of the parameter to be adjusted, and determine the rate-of-change fuzzy value corresponding to the current rate of change;
[0211] Determine the deviation membership degree of the deviation fuzzy value belonging to the corresponding deviation fuzzy set according to the membership function of the deviation fuzzy set, and determine the rate-of-change membership degree of the rate-of-change fuzzy value belonging to the corresponding rate-of-change fuzzy set according to the membership function of the rate-of-change fuzzy set; the value range of the deviation fuzzy set is a partial range of the deviation universe of discourse, and the value range of the rate-of-change fuzzy set is a partial range of the rate-of-change universe of discourse;
[0212] Determine the control quantity fuzzy set corresponding to the deviation fuzzy set and the rate-of-change fuzzy set according to the preset fuzzy control rules, and determine the control quantity membership degree corresponding to the control quantity fuzzy set according to the deviation membership degree and the rate-of-change membership degree; the value range of the control quantity fuzzy set is a partial range of the control quantity universe of discourse;
[0213] Determine the membership region smaller than the control quantity membership degree according to the membership function of the control quantity fuzzy set;
[0214] Take the union of the membership regions of all the control quantity fuzzy sets as the result region, and take the value in the control quantity universe corresponding to the center of the result region as the fuzzy inference result.
[0215] In some alternative embodiments, the processing module 1303 determines the corresponding current control quantity according to the fuzzy inference result, including:
[0216] Perform a linear mapping on the fuzzy inference result, and take the linear mapping result as the corresponding current control quantity.
[0217] In some alternative embodiments, the parameter to be adjusted includes a steering parameter and / or a pitch angle;
[0218] When the parameter to be adjusted includes a steering parameter, the current control quantity is used to control the steering servo of the flapping-wing aircraft;
[0219] When the parameter to be adjusted includes a pitch angle, the current control quantity is used to control the pitch servo of the flapping-wing aircraft; both the steering servo and the pitch servo are actuators of the flapping-wing aircraft.
[0220] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding above embodiments, and will not be repeated here.
[0221] The control device of the flapping-wing aircraft in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0222] The embodiment of the present invention also provides a computer device having the above Figure 14 shown control device of the flapping-wing aircraft.
[0223] Please refer to Figure 14 , Figure 14 is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 14As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Each component communicates with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, multiple processors and / or multiple buses can be used together with multiple memories if needed. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 14 In the figure, one processor 10 is taken as an example.
[0224] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.
[0225] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0226] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0227] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.
[0228] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
[0229] Embodiments of the present invention also provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0230] A part of the present invention can be applied as a computer program product, for example, computer program instructions. When executed by a computer, through the operation of the computer, the method and / or technical solution according to the present invention can be invoked or provided. Those skilled in the art should be able to understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0231] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A control method for a flapping-wing aircraft, characterized in that: The method comprises: Acquire the current state quantity of the to-be-adjusted parameter of the flapping-wing aircraft, and determine the current expected value of the to-be-adjusted parameter; Determining a current deviation between the current expected value and the current state quantity, and a current rate of change of the current deviation; The current deviation and the current change rate are fuzzified, and fuzzy reasoning is performed on the fuzzified current deviation and the current change rate according to a preset fuzzy control rule to determine a fuzzy reasoning result related to the control amount; the fuzzy control rule represents the corresponding relationship between the deviation and the change rate of the parameter to be adjusted and the corresponding control amount; Determine the corresponding current control amount according to the fuzzy reasoning result; An actuator for adjusting the parameter to be adjusted is controlled according to the current control amount.
2. The method according to claim 1, characterized in that The determining of the current deviation between the current expected value and the current state quantity comprises: Determine the difference between the current expected value and the current state quantity; Determining the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within a preset time period; On the basis of the difference between the current expected value and the current state quantity, the accumulated difference is increased by a preset proportion to obtain a current deviation between the current expected value and the current state quantity.
3. The method according to claim 2, characterized in that The preset time period is a time period starting from a fixed time point, and the determining of the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within the preset time period includes: In the current control cycle, determining a previous cumulative difference, wherein the previous cumulative difference is a cumulative difference between a state quantity of the parameter to be adjusted determined in the previous control cycle and an expected value; On the basis of the previous cumulative difference, the difference between the current expected value and the current state quantity is added to obtain the cumulative difference of the current control cycle; Recording the accumulated difference of the current control cycle; Alternatively, the preset time period is a time period of fixed length, and the determining of the cumulative difference between the state quantity of the parameter to be adjusted and the expected value within the preset time period includes: In the current control cycle, determining a previous cumulative difference, wherein the previous cumulative difference is a cumulative difference between a state quantity of the parameter to be adjusted determined in the previous control cycle and an expected value; Determine a difference between a historical expected value and a historical state quantity; the historical expected value is an expected value of the parameter to be adjusted determined in a historical control cycle, the historical state quantity is a state quantity of the parameter to be adjusted determined in the historical control cycle, and the interval between the historical control cycle and the current control cycle is the fixed duration; On the basis of the previous cumulative difference, the difference between the current expected value and the current state quantity is added, and the difference between the historical expected value and the historical state quantity is subtracted to obtain the cumulative difference of the current control cycle; The accumulated difference of the current control cycle is recorded.
4. The method according to claim 2, characterized in that: The current deviation between the current expected value and the current state quantity satisfies: Among them, k represents the index of the current control cycle, e(k) represents the current deviation, r(k) represents the current expected value, c(k) represents the current state quantity, λ represents the weight coefficient, i represents the index of the starting cycle within the preset time period, m represents the index of a control cycle within the preset time period, r(m) represents the expected value determined in the mth control cycle, and c(m) represents the state quantity determined in the mth control cycle.
5. The method according to claim 1, characterized in that The fuzzification of the current deviation and the current change rate, and fuzzy reasoning of the fuzzified current deviation and the current change rate according to a preset fuzzy control rule to determine a fuzzy reasoning result related to the control amount, include: Mapping the current deviation to the deviation domain of the parameter to be adjusted, and determining a deviation fuzzy value corresponding to the current deviation; Mapping the current change rate to the change rate domain of the parameter to be adjusted, and determining a change rate fuzzy value corresponding to the current change rate; Determine the deviation membership of the deviation fuzzy value to the corresponding deviation fuzzy set according to the membership function of the deviation fuzzy set, and determine the change rate membership of the change rate fuzzy value to the corresponding change rate fuzzy set according to the membership function of the change rate fuzzy set; the value range of the deviation fuzzy set is a partial range of the deviation domain, and the value range of the change rate fuzzy set is a partial range of the change rate domain; According to a preset fuzzy control rule, a control quantity fuzzy set corresponding to the deviation fuzzy set and the change rate fuzzy set is determined, and the control quantity membership corresponding to the control quantity fuzzy set is determined according to the deviation membership and the change rate membership; the value range of the control quantity fuzzy set is a partial range of the control quantity domain; Determining a membership region whose membership degree is less than the control amount according to the membership function of the control amount fuzzy set; The union of all the membership regions of the control quantity fuzzy sets is taken as the result region, and the value in the control quantity domain corresponding to the center of the result region is taken as the fuzzy reasoning result.
6. The method according to claim 1, characterized in that Determining the corresponding current control amount according to the fuzzy inference result includes: The fuzzy inference result is linearly mapped, and the linear mapping result is used as the corresponding current control amount.
7. The method according to claim 1, characterized in that The parameters to be adjusted include steering parameters and / or pitch angles; In the case where the parameter to be adjusted includes a steering parameter, the current control amount is used to control a steering servo of the flapping-wing aircraft; In the case where the parameter to be adjusted includes a pitch angle, the current control amount is used to control the pitch servo of the flapping-wing aircraft; the steering servo and the pitch servo are both actuators of the flapping-wing aircraft.
8. A control device for a flapping-wing aircraft, characterized in that: The device comprises: A perception module, used to obtain the current state quantity of the parameter to be adjusted of the flapping-wing aircraft, and determine the current expected value of the parameter to be adjusted; A calculation module, used to determine a current deviation between the current expected value and the current state quantity, and a current rate of change of the current deviation; A processing module, used for fuzzifying the current deviation and the current change rate, and performing fuzzy reasoning on the fuzzified current deviation and the current change rate according to a preset fuzzy control rule to determine a fuzzy reasoning result related to the control amount; the fuzzy control rule represents the corresponding relationship between the deviation and the change rate of the parameter to be adjusted and the corresponding control amount; and determining the corresponding current control amount according to the fuzzy reasoning result; An execution module is used to control an execution mechanism for adjusting the parameter to be adjusted according to the current control amount.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the control method of the flapping-wing aircraft according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the control method of the flapping-wing aircraft according to any one of claims 1 to 7.
11. A flapping-wing aircraft, characterized in that: include: A machine body, a controller and an actuator controlled by the controller; The controller is used to execute the control method of the flapping-wing aircraft according to any one of claims 1 to 7.