Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present invention, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Referring to fig. 1, fig. 1 shows a block schematic diagram of a multi-rotor aircraft 100 according to an embodiment of the present invention. Multi-rotor aircraft 100 may be, but is not limited to, a four-rotor aircraft, a six-rotor aircraft, an eight-rotor aircraft, and the like. The multi-rotor aircraft 100 includes a power system control distribution device 200, a memory 110, a storage controller 120, and a processor 130.
The memory 110, the memory controller 120 and the processor 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The powertrain control distribution unit 200 includes at least one software function module that may be stored in the memory 110 in the form of software or firmware (firmware) or may be embedded in the Operating System (OS) of the rotorcraft 100. The processor 130 is configured to execute executable modules stored in the memory 110, such as software functional modules or computer programs included in the powertrain control distribution apparatus 200.
The Memory 110 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 110 is used for storing a program, and the processor 130 executes the program after receiving the execution instruction.
The processor 130 may be an integrated circuit chip having signal processing capabilities. The Processor 130 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), a voice Processor, a video Processor, and the like; but may also be a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor 130 may be any conventional processor or the like.
In an embodiment of the present invention, the multi-rotor aircraft 100 further includes a plurality of power systems, each of which is electrically connected to the processor 130, and the number of the power systems corresponds to the number of the rotors of the multi-rotor aircraft 100, for example, a four-rotor aircraft includes four power systems, a six-rotor aircraft includes six power systems, and the like.
First embodiment
Referring to fig. 2, fig. 2 is a flowchart illustrating a control distribution method for a powertrain system according to a first embodiment of the present invention. The control distribution method of the power system comprises the following steps:
in step S101, a plurality of virtual control amounts are acquired.
In an embodiment of the present invention, the virtual control variables are calculated by virtual controllers on multi-rotor aircraft 100, which may be controllers that generate generalized force outputs, such as model-reference adaptive controllers, backstepping controllers, and dynamic inversion controllers. The virtual control commands include a roll torque command, a pitch torque command, a yaw torque command and a tension command.
Step S102, carrying out one-to-one amplitude limiting on the plurality of virtual control quantities by utilizing a plurality of preset maximum virtual control quantities which are in one-to-one correspondence with the plurality of virtual control quantities to obtain a plurality of amplitude limiting control quantities.
In the embodiment of the present invention, the preset maximum virtual control quantities are obtained by obtaining a plurality of maximum moments generated by actual outputs of all power systems in a time step and multiplying the maximum moments by preset safety factors, where the plurality of maximum moments include a maximum roll moment, a maximum pitch moment, a maximum yaw moment, and a maximum pulling force, and the preset safety factors may be, but are not limited to, values in (0, 1).
That is, firstly, the roll moment, the pitch moment, the yaw moment and the pulling force generated by the actual output of each power system in a time step are obtained; then, selecting the maximum rolling moment, the maximum pitching moment, the maximum yawing moment and the maximum pulling force from the rolling moment, the pitching moment, the yawing moment and the pulling force which are generated by the actual output of all power systems in time step length; and finally, multiplying the selected maximum rolling moment, maximum pitching moment, maximum yawing moment and maximum pulling force by a preset safety factor respectively to obtain a plurality of preset maximum virtual control quantities, wherein the plurality of preset maximum virtual control quantities comprise a rolling item, a pitching item, a yawing item and a pulling force item.
As an embodiment, the roll term, the pitch term, and the yaw term in the plurality of preset maximum virtual control amounts are all bidirectional parameters, and the pull term is a single parameter, that is, the roll term, the pitch term, and the yaw term are in the range of [ -1,1], and the pull term is in the range of [0,1] by using the normalization process.
In this embodiment of the present invention, the method for performing one-to-one clipping on the plurality of virtual control quantities may be: and determining a smaller one of the virtual control quantity and the corresponding preset maximum virtual control quantity as the amplitude limiting control quantity corresponding to the virtual control quantity. In other words, the roll moment instruction, the pitch moment instruction, the yaw moment instruction and the tension instruction are compared with the preset maximum virtual control quantities of the roll item, the pitch item, the yaw item and the tension item one by one to obtain a plurality of amplitude limiting control quantities, wherein the plurality of amplitude limiting control quantities comprise the roll item, the pitch item, the yaw item and the tension item.
That is to say, the roll moment instruction and the roll item preset maximum virtual control quantity, the pitch moment instruction and the pitch item preset maximum virtual control quantity, the yaw moment instruction and the yaw item preset maximum virtual control quantity, and the tension instruction and the tension item preset maximum virtual control quantity are respectively compared, the smaller one of the roll moment instruction and the roll item preset maximum virtual control quantity is selected as the roll item amplitude limiting control quantity, and the rest is done in sequence to respectively obtain the pitch item amplitude limiting control quantity, the yaw item amplitude limiting control quantity and the tension item amplitude limiting control quantity.
In the embodiment of the invention, the generalized force is used as the virtual control quantity, and the actually reachable change range of the virtual control quantity under the time step is estimated through the dynamic characteristic of the power system, so that each generalized force is subjected to preliminary amplitude limiting before control distribution, and each virtual control quantity can not exceed the actual capacity of the multi-rotor aircraft 100.
And S103, determining a control distribution matrix according to the mechanical model and the installation position of each power system.
In an embodiment of the invention, the mechanical model of each powertrain system may be a parameter reflecting a characteristic of the powertrain system, the mechanical model of the powertrain system including a powertrain force data table and a first order inertia time constant.
The power system force data table can represent the capability of the power system to generate tension and rotation resistance torque, the direction of the rotation resistance torque is opposite to the rotation direction of a propeller of the power system, and the power system force data table comprises propeller rotation speed (omega), tension (T), voltage (V) and current (A) corresponding to different power system control commands (delta).
The first order inertia time constant can represent the dynamic response capability of the power system, and the first order inertia time constant can be represented by KTimeAnd (4) showing. The first order inertia time constant, which is typically the time required for the test powertrain control command to reach 63% of the steady state speed when changing, may be obtained by measuring 63% of the time required for the powertrain speed to stabilize when the powertrain control command is output from a 0 step to a 1. Additionally, the powertrain control command (δ) may be, but is not limited to, a PWM pulse width.
In an embodiment of the invention, the mounting location of each power system comprises the wheelbase (L) of the power systemmotor) And mounting angle (χ)motor) Wherein wheelbase represents the linear distance of the power system to the center of gravity of multi-rotor aircraft 100; the setting angle represents the connection line between the projection point of the axis of the power system on the XY plane of the body coordinate system of the multi-rotor aircraft 100 and the center of gravity of the multi-rotor aircraft 100, and the sum angle in the positive direction of the X axis of the body coordinate system of the multi-rotor aircraft 100.
In the embodiment of the invention, after the mechanical model and the installation position of each power system are obtained, the system parameters and the position parameters corresponding to each power system are input into the preset power system estimation model to obtain the control distribution matrix, and the specific estimation process is shown in substeps S1031 to S1034.
Referring to fig. 3, step S103 specifically includes the following sub-steps:
and a substep S1031 of obtaining a mechanical model and an installation position of each power system, wherein the mechanical model comprises a first-order inertia time constant.
And a substep S1032 of optimizing the hovering state of the multi-rotor aircraft by using preset optimization targets and constraint conditions to obtain hovering control instructions corresponding to each power system.
In an embodiment of the invention, the predetermined powertrain system estimation model includes predetermined optimization objectives and constraints.
The preset optimization objectives include a first optimization objective and a second optimization objective, and particularly, the first optimization objective can be expressed as
Wherein m is
UAVThe weight of
multi-rotor aircraft 100 is indicated, i indicates the serial number of each power system,
hoverindicating a hover condition, L, M, N represent the powered system generated roll, pitch, and yaw moments, respectively. The first optimization objective may be expressed as
The preset optimization condition comprises a first constraint condition and a second constraint condition, and the first constraint condition can be formulated by formula
Is represented by, wherein
minAnd DR
maxRespectively a preset dynamic response lower limit value and a dynamic response upper limit value, K
DR_TAnd K
DR_TimeRespectively are preset tension weight factors and time constant weight factors. K
DR_TAnd K
DR_TimeThe method has two functions: first, the tension of each power systemNormalizing the relative size of the first-order inertia time constant; and secondly, the proportion of the time constant of the power system in the dynamic response of the power system is adjusted, if the specification difference of the power system is not large, the weight factor of the time constant of the power system can be set to be smaller, and if the specification difference of the power system is large, the weight factor of the time constant of the power system can be set to be larger.
The second constraint may be represented by the formula deltahover_min<δi_hover<δhover_maxIs represented by, whereinhover_minAnd deltahover_maxThe control instruction lower limit value and the control instruction upper limit value of the power system are preset respectively. Deltahover_minAnd deltahover_maxThe control instruction of each power system in the hovering state is prevented from being too small or too large, so that the controllability of part or all of the power systems is lost due to saturation in the state adjustment process.
In the embodiment of the invention, a multi-objective multi-constraint global optimization algorithm can be adopted, preset optimization objectives and constraint conditions are utilized to optimize the hovering state of the multi-rotor aircraft 100, and after the optimization is completed, a reasonable hovering control instruction of each power system can be obtained.
And a substep S1033, estimating the control torque generated by each power system according to the hovering control instruction corresponding to the power system.
In an embodiment of the present invention, first, the X-axis moment arm and the Y-axis moment arm of each power system in the body coordinate system of
multi-rotor aircraft 100 can be obtained according to the installation position of each power system. This process can be formulated using moment arm calculations
Performing a calculation wherein L
i_motorFor each wheelbase, cos χ, of the powertrain
i_motorFor each power system mounting angle.
And then, after force data of each power system is calculated, setting the positive direction represented by the hovering control instruction corresponding to any one power system to be increased by 5% -30% according to the calculated hovering control instruction of each power system, keeping the hovering control instructions of other power systems unchanged, and estimating control torque generated by the power system according to the force data and the position parameters of the power system, wherein the control torque comprises pulling force, rolling force, pitching force and yawing torque.
As an embodiment, the control torque may be estimated using the following equation:
ΔTi=Ti_hover_+(5%~30%)-Ti_hover
ΔLi=ΔTi·Li_motor_Y
ΔMi=ΔTi·Li_motor_X
Di=Vi.Ai/ωi
ΔDi=Di_hover_+(5%~30%)-Di_hover
ΔNi=ΔDi
wherein, i _ hover _ + (5% -30%) represents that the positive direction represented by the hovering control instruction corresponding to any power system is increased by 5% -30%, delta represents the increment generated by increasing the positive direction represented by the hovering control instruction by 5% -30%, and T isi,Li,Mi,NiRespectively showing that the positive direction represented by the hovering control instruction corresponding to any one power system is increased by 5-30% to generate pulling force, rolling moment, pitching moment and yawing moment.
And a substep S1034, determining the control distribution matrix according to the control moment and the first-order inertia time constant of each power system.
In the embodiment of the invention, firstly, a static distribution matrix is obtained according to the control torque generated by each power system
Wherein L is
i_B_s、M
i_B_s、N
i_B_s、T
i_B_sRoll moment, pitch moment, yaw moment and pulling force generated by each power system respectively; then, the time constant of each power system is determined according to the static distribution matrixCounting to obtain a dynamic distribution matrix B
SD=B
StaticB
DynamicWherein, in the step (A),
K
i_Timea first-order inertia element time constant of each power system; finally, normalizing the dynamic distribution matrix, calculating the control distribution matrix, and normalizing the dynamic distribution matrix B in the four directions of rolling, pitching, yawing and pulling force
SDEach column of (1) takes infinite norm | · | | non-woven phosphor
∞And dividing each column element by the corresponding infinite norm value to obtain the normalized control distribution matrix B.
And step S104, converting the plurality of amplitude limiting control quantities into virtual control commands of each power system by using the control distribution matrix.
In the embodiment of the present invention, the virtual control command may be, but is not limited to, a PWM pulse width.
And step S105, carrying out amplitude limiting on the virtual control instruction of each power system to obtain an amplitude limiting control instruction of each power system.
In the embodiment of the invention, after the virtual control command of each power system is obtained, the virtual control command of each power system needs to be limited, so that the maximum amplitude of the change of the rotating speed of the power system in a time step can be further limited, and the possible too fast change of the control command can be directly limited.
As an embodiment, taking a single power system as an example, the method for limiting the virtual control command of the power system may be: firstly, subtracting an actual control instruction of the power system from a virtual control instruction to obtain a control instruction change rate; then, comparing the control instruction change rate with the maximum control instruction change rate of the power system, and if the control instruction change rate is greater than the maximum control instruction change rate, the amplitude limiting control instruction of the power system is the product of the virtual control instruction superposition maximum control instruction change rate of the power system and the time step length; and if the control command change rate is smaller than the maximum control command change rate, the amplitude limiting control command of the power system is a virtual control command of the power system.
The method for obtaining the maximum control command change rate of a certain power system can be as follows: and taking the control command change rate corresponding to the maximum change rate generated by the actual output rotating speed of the power system in the time step as the maximum control command change rate.
It should be noted that, the above is a method for performing amplitude limiting on a virtual control command of a single power system, and the above method is used for performing virtual control command amplitude limiting on all power systems, so that an amplitude limiting control command of each power system can be obtained, and a specific process for performing amplitude limiting on a virtual control command of each power system is shown in substeps S1051 to substep S1054.
Referring to fig. 4, step S105 specifically includes the following sub-steps:
and substep S1051, obtaining a desired control torque for the multi-rotor aircraft.
In an embodiment of the invention, the desired control moments comprise a roll desired moment, a pitch desired moment, a yaw desired moment and a desired drag.
And a substep S1052, inputting the expected control torque into the control distribution matrix to obtain an actual control command of each power system.
In the embodiment of the invention, after the expected control torque and the control distribution matrix are obtained, the expected control torque is firstly distributed to each power system according to the control distribution matrix, and a static control instruction of each power system without considering the dynamic characteristic is obtained; then, adding a first-order inertia link to each static control command of the power system without considering the dynamic characteristics
And obtaining an actual control command of each power system.
And a substep S1053 of subtracting the actual control command and the virtual control command to obtain the control command change rate of each power system.
And a substep S1054 of performing amplitude limiting on the virtual control instruction of each power system by using the preset maximum control instruction change rate and the control instruction change rate of each power system to obtain the amplitude limiting control instruction of each power system.
In the embodiment of the invention, the control instruction change rate of each power system is compared with the maximum control instruction change rate; if the control instruction change rate of any power system is greater than the maximum control instruction change rate, the amplitude limiting control instruction of the power system is the product of the virtual control instruction superposition maximum control instruction change rate of the power system and the time step length; and if the control instruction change rate of any power system is smaller than the maximum control instruction change rate, the amplitude limiting control instruction of the power system is a virtual control instruction of the power system.
It should be noted that the maximum virtual control quantity and the maximum control command change rate in the embodiment of the present invention are both obtained in the vicinity of the hovering state of the multi-rotor aircraft 100, so that the influence of the nonlinear characteristics of the power system on the maximum virtual control quantity and the maximum control command change rate can be weakened.
Compared with the prior art, the power system control distribution method provided by the embodiment of the invention has the following beneficial effects:
1. the generalized force is used as the virtual control quantity, and the actually reachable change range of the virtual control quantity under the time step is estimated through the dynamic characteristic of the power system, so that each generalized force is subjected to preliminary amplitude limiting before control distribution, and each virtual control quantity can not exceed the actual capacity of the rotor craft 100.
2. By limiting the virtual control commands for each powertrain system, the maximum magnitude of change in powertrain system speed in time steps is further limited, thereby directly limiting the potential for excessive rapid changes in control commands.
3. Through twice amplitude limiting, the matching of the change amplitude of the virtual control quantity and the virtual control command within a certain time step and the actual dynamic response capability of the power system is realized, the sharp reduction of the phase margin caused by too fast response can be avoided, and the robustness of the multi-rotor aircraft 100 is improved.
Second embodiment
Referring to fig. 3, fig. 3 is a block diagram illustrating a power system control distribution device 200 according to a second embodiment of the present invention. The powertrain system control distribution apparatus 200 includes a virtual control quantity acquisition module 210, a first clipping module 220, a control distribution matrix determination module 230, a conversion module 240, and a second clipping module 250.
The virtual control amount obtaining module 210 is configured to obtain a plurality of virtual control amounts.
In the embodiment of the present invention, the virtual control amount obtaining module 210 may be configured to execute step S101.
The first amplitude limiting module 220 is configured to perform amplitude limiting on the multiple virtual control quantities one by using multiple preset maximum virtual control quantities one-to-one corresponding to the multiple virtual control quantities, so as to obtain multiple amplitude limiting control quantities.
In an embodiment of the present invention, the first clipping module 220 may be configured to perform step S102.
And the control distribution matrix determining module 230 is used for determining a control distribution matrix according to the mechanical model and the installation position of each power system.
In an embodiment of the present invention, the control allocation matrix determining module 230 may be configured to execute step S103.
In this embodiment of the present invention, the control allocation matrix determining module 230 may be specifically configured to execute sub-steps S1031 to S1034 of step S103.
And a conversion module 240, configured to convert the plurality of clipping control amounts into a virtual control command for each power system by using the control distribution matrix.
In this embodiment of the present invention, the converting module 240 may be configured to execute step S104.
And the second amplitude limiting module 250 is configured to amplitude limit the virtual control instruction of each power system to obtain an amplitude limit control instruction of each power system.
In an embodiment of the present invention, the second clipping module 250 may be configured to perform step S105.
In the embodiment of the present invention, the second slicing module 250 may be specifically configured to perform the sub-steps S1051 to S1054 of the step S105.
Also disclosed is a computer readable storage medium having a computer program stored thereon, which when executed by the processor 130, implements the powertrain control allocation method disclosed in the first embodiment of the present invention.
In summary, the embodiment of the present invention provides a control distribution method for a power system and a related apparatus, where the method includes: acquiring a plurality of virtual control quantities; carrying out one-to-one amplitude limiting on the plurality of virtual control quantities by utilizing a plurality of preset maximum virtual control quantities which are in one-to-one correspondence with the plurality of virtual control quantities to obtain a plurality of amplitude limiting control quantities; determining a control distribution matrix according to the mechanical model and the installation position of each power system; converting the plurality of amplitude limiting control quantities into virtual control commands of each power system by using the control distribution matrix; and carrying out amplitude limiting on the virtual control instruction of each power system to obtain an amplitude limiting control instruction of each power system. According to the embodiment of the invention, a plurality of virtual control quantities are obtained, and a plurality of preset maximum virtual control quantities corresponding to the virtual control quantities one by one are utilized to carry out one-to-one amplitude limiting on the virtual control quantities to obtain a plurality of amplitude limiting control quantities, so that each amplitude limiting control quantity can not exceed the actual capacity of the multi-rotor aircraft; and then, determining a control distribution matrix according to the mechanical model and the installation position of each power system, converting a plurality of amplitude limiting control quantities into a virtual control instruction of each power system by using the control distribution matrix, and then carrying out amplitude limiting on the virtual control instruction of each power system, so that the possible over-fast change of the virtual control instruction is directly limited, and the amplitude limiting control instruction of each power system is obtained. According to the embodiment of the invention, through twice amplitude limiting, the matching of the change amplitude of the virtual control quantity and the virtual control command within a certain time step and the actual dynamic response capability of the power system is realized, the sharp reduction of the phase margin caused by too fast response can be avoided, and the robustness of the multi-rotor aircraft is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.