Detailed Description
It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict. The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions of the present invention better understood, 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. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged as appropriate in order to facilitate the embodiments of the invention described herein. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an embodiment of the invention, a method of controlling the motion of a spacecraft is provided.
Fig. 1 is a flowchart of a method for controlling the motion of a spacecraft, according to an embodiment of the invention. As shown in fig. 1, the present invention comprises the steps of:
and S101, acquiring control force for controlling the spacecraft and engine thrust of the spacecraft in real time.
Step S102, determining the elongation of a servo mechanism by a quaternion algorithm according to the control force and the thrust of an engine, wherein the servo mechanism is used for controlling the motion angle of the spacecraft and is connected with the engine of the spacecraft;
and step S103, controlling the servo mechanism to drive the spray pipe to perform vector motion according to the elongation of the servo mechanism, wherein the servo mechanism is connected with the spray pipe.
According to the method for controlling the operation of the spacecraft, the control force and the engine thrust of the spacecraft are obtained, and the elongation of the servo mechanism is determined.
Specifically, as shown in fig. 2, fig. 2 is a schematic structural diagram of a servo mechanism controlled by a dual-thrust vector under a preset coordinate system, where a spacecraft in the diagram includes a first servo mechanism 10 and a second servo mechanism 20, it should be noted that a spacecraft including two servo mechanisms is one of embodiments provided in the present application, and a spacecraft including one servo mechanism and a spacecraft including multiple servo mechanisms are optional embodiments of the present application, and details of the present application are not repeated here.
The control requirement of the spacecraft such as the rocket, the missile and the like on the motion attitude is more and more accurate, the space motion calculation requirement of the thrust vector control servo mechanism is also improved, compared with the Euler angle, the quaternion is a simpler mode for describing rotation, and the quaternion is essentially rotated around a certain rotation axis, so that the rotation can be described by adopting the rotation angle and the axis vector, the calculation is simple, the problems of large calculation amount and complex process of the Euler angle are solved, and when the spacecraft engine is recycled in the future, the spacecraft can act at a large angle, at the moment, the calculation process can be greatly simplified by adopting the quaternion, and at the moment, the quaternion calculation method of the servo mechanism is conveniently butted with the quaternion calculation method of the motion state of the spacecraft, and the problem of converting the Euler angle into the quaternion does not exist.
According to the method for controlling the spacecraft to move, provided by the embodiment of the invention, the first control force, the second control force and the engine thrust of the spacecraft are acquired in real time; acquiring control force for controlling the spacecraft and engine thrust of the spacecraft in real time; the elongation of the servo mechanism is determined by a quaternion calculation method according to the control force and the thrust of the engine, wherein the servo mechanism is used for controlling the motion angle of the spacecraft and is connected with the engine of the spacecraft, so that the technical problems that in the related technology, the motion attitude of the spacecraft is calculated through the Euler angle, a large amount of calculation data is caused, and the process is complicated are solved, and the technical effect of accurately calculating the motion attitude of the spacecraft is achieved.
In an alternative embodiment, obtaining control forces for controlling the spacecraft in real time comprises: acquiring a first control force and a second control force of the spacecraft in real time, wherein the first control force is the control force of the spacecraft in the pitching direction, and the second control force is the control force of the spacecraft in the yawing direction; and calculating the control force according to the first control force and the second control force.
In an alternative embodiment, calculating the control force based on the first control force and the second control force comprises: respectively presetting the first control force and the second control force to obtain a normalized first control force and a normalized second control force; calculating the control force through a first formula according to the first control force and the second control force after the preset processing, wherein the first formula is as follows:
, F
c to control the force, F
y Is a first control force, F
z Is the second control force.
In the above, the equation for representing the motion of the servo mechanism by using the quaternion method is essentially that a certain rotating shaft is assumed, and spatial description is performed by using a rotating angle and an axial vector. The control force (the resultant force of the force in the pitching direction and the force in the yawing direction) required by the swinging angle of the spacecraft is converted into the movement amount of the two servo mechanisms, and the actual swinging angle of the rocket is converted into an included angle between the control force and the thrust of the engine.
As shown in fig. 3, fig. 3 is a schematic coordinate diagram of the control force of the spacecraft engine, and the control force in the pitch direction acquired by the sensor is F y Acquiring a control force F in the yaw direction through a sensor z The resultant force (control force) of the two is F c The engine thrust is P. The axis of rotation being F c The coordinate axis and the X axis are based on the S axis determined by the right-hand rule.
The pitching force and the yawing force are subjected to normalized processing and then:
wherein, P
y And P
z Is a component of P, F
y ,F
z Is according to P
y And P
z And calculating the specification. In rocket applications, F
y ,F
z Calculated by the control subsystem.
As described above, the predetermined coordinate system determined by the right-hand rule is shown in FIG. 3, in which the four fingers of the right hand are defined by a coordinate axis F along the circular arc direction c Towards the other coordinate axis P, the direction of the thumb of the right hand is the direction of the S axis.
In an alternative embodiment, before determining the amount of servo extension by quaternion calculations based on the control force and the engine thrust, the method further comprises: calculating a swing angle of the spacecraft in the actual motion process according to the thrust and the control force of the engine; determining a preset coordinate system, determining a first control force, a second control force and a rotating shaft coordinate equation among the control forces according to the preset coordinate system, and presetting the equation; and determining a quaternion expression corresponding to the rotation behavior of the spacecraft according to the swing angle and the normalized rotating shaft coordinate equation.
In the above, the synthetic tilt angle of the rocket in the actual motion process is:
;
determining a coordinate equation of the rotating shaft according to a right-hand rule, and simultaneously carrying out standardization treatment:
wherein F is
c To control the force, F
y Is a first control force, F
z Is the second control force.
According to the derivation, after the rocket swings for a certain angle, the expression of the quaternion is as follows:
wherein q is a quaternion,
is the resultant tilt angle of the rocket in actual motion.
In an alternative embodiment, determining the servo extension by quaternion calculations based on the control force and the engine thrust comprises: determining the initial length of a servo mechanism and the target length of the servo mechanism after swinging in a preset coordinate system; calculating the absolute value of the difference between the initial length and the target length; and determining the absolute value of the difference as the elongation.
In an alternative embodiment, determining the initial length of the servo mechanism and the target length of the servo mechanism after swinging the swing angle in the preset coordinate system comprises: determining the coordinate of a lower fulcrum of the servo mechanism as a first coordinate; under the condition that a preset coordinate system is adopted and the state of the servo mechanism is an initial state, determining the coordinate of an upper fulcrum of the servo mechanism as a second coordinate; under a preset coordinate system and after the spacecraft swings at a swing angle, determining the coordinate of the upper fulcrum as a third coordinate; calculating a first difference absolute value between the second coordinate and the first coordinate, and determining the first difference absolute value as the initial length of the servo mechanism; and calculating a second absolute difference value between the third coordinate and the first coordinate, and determining the second absolute difference value as the target length of the servo mechanism.
In the above, the coordinate of the lower fulcrum (the point of connection with the engine) of the servo mechanism is assumed to be the first coordinate (X) d ) In the initial state, the coordinate of the upper supporting point is X 0 (second coordinate), after swinging a certain angle, upper supporting point coordinate X 1 (third coordinate).
Therefore, in the initial state of the rocket, the initial length of the servo mechanism is as follows:
;
the length of the servo mechanism after the rocket swings for a certain angle is as follows:
;
assume that the quaternion of the upper pivot point in the initial state is expressed as
After the rocket swings for a certain angle, the quaternion of the upper pivot point is expressed as
Wherein
Is the conjugate of q, then
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the invention also provides a device for controlling the spacecraft to move, and it should be noted that the device for controlling the spacecraft to move of the embodiment of the invention can be used for executing the method for controlling the spacecraft to move provided by the embodiment of the invention. The following describes an apparatus of a method for controlling the motion of a spacecraft according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of an apparatus for controlling a method of spacecraft motion according to an embodiment of the invention. As shown in fig. 4, the apparatus includes: a first obtaining unit 401, configured to obtain a control force for controlling a spacecraft and an engine thrust of the spacecraft in real time; a first determining unit 402, configured to determine an elongation of a servo mechanism by a quaternion algorithm according to a control force and an engine thrust, where the servo mechanism is used to control a motion angle of the spacecraft and the servo mechanism is connected to an engine of the spacecraft; and a first control unit 403, configured to control the servo mechanism to drive the nozzle to perform vector motion according to the elongation of the servo mechanism, where the servo mechanism is connected to the nozzle.
In an alternative embodiment, the first obtaining unit includes: the spacecraft control system comprises an acquisition subunit, a control unit and a control unit, wherein the acquisition subunit is used for acquiring a first control force and a second control force of a spacecraft in real time, the first control force is the control force of the spacecraft in the pitching direction, and the second control force is the control force of the spacecraft in the yawing direction; the first calculating subunit is used for calculating the control force according to the first control force and the second control force.
In an alternative embodiment, calculating the control force from the first control force and the second control force comprises: respectively presetting the first control force and the second control force to obtain a normalized first control force and a normalized second control force; calculating the control force through a first formula according to the first control force and the second control force after the preset processing, wherein the first formula is as follows:
,F
c to control the force, F
y Is a first control force, F
z Is the second control force.
In an alternative embodiment, the apparatus further comprises: the computing unit is used for computing a swing angle of the spacecraft in the actual motion process according to the engine thrust and the control force before determining the elongation of the servo mechanism through a quaternion calculation method according to the control force and the engine thrust; the second determining unit is used for determining a preset coordinate system, determining the first control force, the second control force and a rotating shaft coordinate equation among the control forces according to the preset coordinate system, and presetting the equation; and the third determining unit is used for determining a quaternion expression corresponding to the rotation behavior of the spacecraft according to the swing angle and the normalized rotating shaft coordinate equation.
In an alternative embodiment, the first determining unit includes: the first determining subunit is used for determining the initial length of the servo mechanism and the target length of the servo mechanism after swinging in a preset coordinate system; the second calculating subunit is used for calculating the absolute value of the difference between the initial length and the target length; and a second determining subunit, configured to determine the absolute value of the difference as the elongation.
In an alternative embodiment, the first determining subunit includes: the first determining module is used for determining the coordinate of the lower fulcrum of the servo mechanism as a first coordinate; the second determining module is used for determining the coordinate of the upper fulcrum of the servo mechanism as a second coordinate under the condition that the preset coordinate system is in the initial state and the state of the servo mechanism is in the initial state; the third determining module is used for determining the coordinate of the upper fulcrum as a third coordinate after the spacecraft swings at a swing angle under a preset coordinate system; the first calculation module is used for calculating a first difference absolute value between the second coordinate and the first coordinate and determining the first difference absolute value as the initial length of the servo mechanism; and the second calculation module is used for calculating a second difference absolute value between the third coordinate and the first coordinate and determining the second difference absolute value as the target length of the servo mechanism.
According to the method and device for controlling the movement of the spacecraft, provided by the embodiment of the invention, the first acquisition unit is used for acquiring the control force for controlling the spacecraft and the engine thrust of the spacecraft in real time; the first determining unit is used for determining the elongation of the servo mechanism through a quaternion algorithm according to the control force and the thrust of the engine, wherein the servo mechanism is used for controlling the motion angle of the spacecraft and is connected with the engine of the spacecraft; the first control unit is used for controlling the servo mechanism to drive the spray pipe to perform vector motion according to the elongation of the servo mechanism, wherein the servo mechanism is connected with the spray pipe, the technical problems that a large amount of calculation data and a complicated process are caused by the fact that the motion attitude of the spacecraft is calculated through the Euler angle in the related technology are solved, and the technical effect of accurately calculating the motion attitude of the spacecraft is achieved.
The device for controlling the spacecraft motion method comprises a processor and a memory, wherein the first acquisition unit and the like are stored in the memory as program units, and the program units stored in the memory are executed by the processor to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the technical problems that the motion attitude of the spacecraft is calculated through the Euler angle in the related technology, a large amount of calculation data is caused, and the process is complicated are solved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the invention provides a storage medium having a program stored thereon, which when executed by a processor implements a method of controlling the motion of a spacecraft.
The embodiment of the invention provides a processor, which is used for running a program, wherein the program executes a method for controlling the motion of a spacecraft during running.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: acquiring a first control force, a second control force and engine thrust of the spacecraft in real time; acquiring control force for controlling the spacecraft and engine thrust of the spacecraft in real time; determining the elongation of a servo mechanism by a quaternion algorithm according to the control force and the thrust of the engine, wherein the servo mechanism is used for controlling the motion angle of the spacecraft and is connected with the engine of the spacecraft; and controlling the servo mechanism to drive the spray pipe to perform vector motion according to the elongation of the servo mechanism, wherein the servo mechanism is connected with the spray pipe.
In an alternative embodiment, acquiring control forces for controlling the spacecraft in real time comprises: acquiring a first control force and a second control force of the spacecraft in real time, wherein the first control force is the control force of the spacecraft in the pitching direction, and the second control force is the control force of the spacecraft in the yawing direction; and calculating the control force according to the first control force and the second control force.
In an alternative embodiment, calculating the control force based on the first control force and the second control force comprises: respectively presetting the first control force and the second control force to obtain a normalized first control force and a normalized second control force; calculating the control force through a first formula according to the first control force and the second control force after the preset processing, wherein the first formula is as follows:
,F
c to control the force, F
y Is a first control force, F
z Is the second control force.
In an alternative embodiment, before determining the amount of servo extension by quaternion calculations based on the control force and the engine thrust, the method further comprises: calculating a swing angle of the spacecraft in the actual motion process according to the thrust and the control force of the engine; determining a preset coordinate system, determining a first control force, a second control force and a rotating shaft coordinate equation among the control forces according to the preset coordinate system, and presetting the equation; and determining a quaternion expression corresponding to the rotation behavior of the spacecraft according to the swing angle and the normalized rotating shaft coordinate equation.
In an alternative embodiment, determining the servo extension by quaternion calculations based on the control force and the engine thrust comprises: determining the initial length of a servo mechanism and the target length of the servo mechanism after swinging in a preset coordinate system; calculating the absolute value of the difference between the initial length and the target length; and determining the absolute value of the difference as the elongation.
In an alternative embodiment, determining the initial length of the servo mechanism and the target length of the servo mechanism after swinging the swing angle in the preset coordinate system comprises: determining the coordinate of a lower fulcrum of the servo mechanism as a first coordinate; under the condition that a preset coordinate system is adopted and the state of the servo mechanism is an initial state, determining the coordinate of an upper fulcrum of the servo mechanism as a second coordinate; under a preset coordinate system and after the spacecraft swings at a swing angle, determining the coordinate of the upper fulcrum as a third coordinate; calculating a first difference absolute value between the second coordinate and the first coordinate, and determining the first difference absolute value as the initial length of the servo mechanism; and calculating a second absolute difference value between the third coordinate and the first coordinate, and determining the second absolute difference value as the target length of the servo mechanism.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The invention also provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: acquiring a first control force, a second control force and engine thrust of the spacecraft in real time; acquiring control force for controlling the spacecraft and engine thrust of the spacecraft in real time; and determining the elongation of the servo mechanism by a quaternion algorithm according to the control force and the thrust of the engine, wherein the servo mechanism is used for controlling the motion angle of the spacecraft and is connected with the engine of the spacecraft.
In an alternative embodiment, obtaining control forces for controlling the spacecraft in real time comprises: acquiring a first control force and a second control force of the spacecraft in real time, wherein the first control force is the control force of the spacecraft in the pitching direction, and the second control force is the control force of the spacecraft in the yawing direction; and calculating the control force according to the first control force and the second control force.
In an alternative embodiment, calculating the control force from the first control force and the second control force comprises: respectively presetting the first control force and the second control force to obtain a normalized first control force and a normalized second control force; calculating the control force through a first formula according to the first control force and the second control force after the preset processing, wherein the first formula is as follows:
,F
c to control the force, F
y Is a first control force, F
z Is the second control force.
In an alternative embodiment, before determining the amount of servo extension by quaternion calculations based on the control force and the engine thrust, the method further comprises: calculating a swing angle of the spacecraft in the actual motion process according to the thrust and the control force of the engine; determining a preset coordinate system, determining a first control force, a second control force and a rotating shaft coordinate equation among the control forces according to the preset coordinate system, and presetting the equation; and determining a quaternion expression corresponding to the rotation behavior of the spacecraft according to the swing angle and the normalized rotating shaft coordinate equation.
In an alternative embodiment, determining the servo extension by quaternion calculations based on the control force and the engine thrust comprises: determining the initial length of a servo mechanism and the target length of the servo mechanism after swinging in a preset coordinate system; calculating the absolute value of the difference between the initial length and the target length; and determining the absolute value of the difference as the elongation.
In an alternative embodiment, determining the initial length of the servo mechanism and the target length of the servo mechanism after swinging the swing angle in the preset coordinate system comprises: determining the coordinate of a lower fulcrum of the servo mechanism as a first coordinate; under the condition that a preset coordinate system is adopted and the state of the servo mechanism is an initial state, determining the coordinate of an upper fulcrum of the servo mechanism as a second coordinate; under a preset coordinate system and after the spacecraft swings at a swing angle, determining the coordinate of the upper fulcrum as a third coordinate; calculating a first difference absolute value between the second coordinate and the first coordinate, and determining the first difference absolute value as the initial length of the servo mechanism; and calculating a second absolute difference value between the third coordinate and the first coordinate, and determining the second absolute difference value as the target length of the servo mechanism.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.