Hovercraft control method, device, equipment and storage medium
By installing four diagonal drive fans on the hovercraft and using the control algorithm of target speed and control mode flag position drive, the problem of limited movement of the hovercraft in a small space is solved, achieving more flexible and efficient motion.
Patent Information
- Application Number
- CN202411776669.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Existing hovercrafts are difficult to move effectively in relatively small spaces such as indoors, resulting in limited applicable scenarios.
The hovercraft control system using four diagonally installed drive fans is used to obtain the target speed and control mode flags, determine the control mode and use corresponding control algorithms (first control algorithm and second control algorithm) to control the drive fans to achieve flexible movement of the hovercraft.
It improves the movement flexibility of hovercraft in a narrow space, reduces the turning range, and allows hovercraft to effectively complete work tasks in indoor and other scenarios, expanding its applicable scenarios.
Smart Images

Figure CN119218188B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of hovercraft, and in particular to a hovercraft control method, device, equipment and storage medium. Background Art
[0002] The air cushion is formed by using high-pressure air to form an air cushion between the bottom of the ship and the water surface (or the ground), which makes the hull rise completely or partially, thereby greatly reducing the resistance of the hull during navigation and achieving the goal of high-speed navigation. The air cushion is formed by using a high-power blower to press air into the bottom of the ship, and the air sealing devices such as the flexible skirt around the bottom of the ship or the rigid sidewalls restrict its escape.
[0003] Existing hovercraft are usually powered by two fans located in the same plane at the rear side of the hull, and the steering is controlled by the differential speed of the two fans. The hovercraft can be controlled to move forward or turn through the existing centripetal force algorithm; however, when the existing centripetal force algorithm controls the hovercraft to turn, the hovercraft turns with a large amplitude, so that the hovercraft is mostly used in scenes with open spaces such as water transportation, and it is difficult to cope with relatively small spaces such as indoors, resulting in limited application scenarios of the hovercraft. Summary of the invention
[0004] In order to help solve the problem that current hovercraft are difficult to cope with relatively small spaces such as indoors and the applicable scenarios of hovercraft are relatively limited, the present application provides a hovercraft control method, device, equipment and storage medium.
[0005] In a first aspect, the present application provides a hovercraft control method, which adopts the following technical solution: the method is applied to a hovercraft control system, the hovercraft control system includes drive fans installed at four diagonal positions of the hovercraft, and the method includes:
[0006] Obtaining a target speed and a control mode flag, and determining the type of the control mode flag;
[0007] If the control mode flag is a forward control flag, a first control algorithm is used to control the speed of the driving fan according to the target speed to control the forward movement of the hovercraft;
[0008] If the control mode flag is a lateral control flag, a second control algorithm is used to control the speed of the driving fan according to the target speed to control the translational motion of the hovercraft.
[0009] In a specific implementation scheme, the hovercraft control system further includes a first speed measurement module, the target speed includes a target speed magnitude and a target speed angle, and the use of the first control algorithm to control the speed of the driving fan includes:
[0010] Using the first speed measurement module to measure the current speed of the hovercraft, the current speed includes the current speed magnitude and the current speed direction;
[0011] Calculating a speed error between the target speed and the current speed, wherein the speed error includes a speed magnitude error and a speed angle error;
[0012] Optimizing a preset first PID control algorithm according to the speed error, and using the optimized first PID control algorithm to calculate and output a first speed according to the speed error;
[0013] Optimizing a preset second PID control algorithm according to the speed angle error, and using the optimized second PID control algorithm to calculate and output a second speed according to the speed angle error;
[0014] The first rotation speed, the second rotation speed and a preset third rotation speed are loaded to the driving fan.
[0015] In a specific implementation scheme, the optimizing the preset first PID control algorithm according to the speed error, and using the optimized first PID control algorithm to calculate and output the first speed according to the speed error comprises:
[0016] Constructing a magnitude error value function according to the speed magnitude error, and optimizing parameters of a preset first PID control algorithm using the magnitude error value function;
[0017] When the speed error is the smallest, the optimal parameters of the preset first PID control algorithm are obtained, and a speed PID control algorithm is generated;
[0018] The speed magnitude PID control algorithm is used to calculate and generate a first speed according to the minimum speed magnitude error.
[0019] In a specific implementation scheme, the hovercraft control system further includes a second speed measurement module, and the second speed measurement module includes: optimizing the preset second PID control algorithm according to the speed angle error, and using the optimized second PID control algorithm to calculate and output the second speed according to the speed angle error.
[0020] Constructing an angle error value function according to the speed angle error, and optimizing parameters of a preset second PID control algorithm using the angle error value function;
[0021] When the speed angle error is minimum, obtaining the optimal parameters of the preset second PID control algorithm, and generating a speed angle PID control algorithm;
[0022] Calculating a target angular velocity of the hovercraft according to the target velocity;
[0023] Measuring the current angular velocity of the hovercraft by using the second velocity measurement module, and calculating the angular velocity error between the current angular velocity and the target angular velocity;
[0024] A preset angular velocity PID control algorithm is used to calculate and generate a second rotation speed according to the angular velocity error.
[0025] In a specific implementation scheme, the four driving fans are sequentially set as a first driving fan, a second driving fan, a third driving fan and a fourth driving fan; the driving fans include a first diagonal driving fan and a second diagonal driving fan, the first diagonal driving fan includes a second driving fan and a third driving fan, and the second diagonal driving fan includes a first driving fan and a fourth driving fan;
[0026] The step of loading the first speed, the second speed and the preset third speed to the driving fan comprises:
[0027] The direction of movement of the hovercraft is set as a forward direction, and the direction opposite to the forward direction is set as a backward direction;
[0028] Determine whether the current speed is less than the target speed;
[0029] If the current speed is smaller than the target speed, the first speed is applied to the two rearward driving fans of the hovercraft;
[0030] If the current speed is not less than the target speed, the first speed is applied to the two forward driving fans of the hovercraft;
[0031] Determine whether the angle corresponding to the current speed direction is smaller than the angle corresponding to the target speed direction;
[0032] If the angle corresponding to the current speed direction is smaller than the angle corresponding to the target speed direction, the second speed is applied to the first pair of diagonally driven fans to generate a clockwise torque;
[0033] If the angle corresponding to the current speed direction is not less than the angle corresponding to the target speed direction, then applying the second speed to the second pair of diagonally driven fans to generate a counterclockwise torque;
[0034] The third rotation speed is applied to the two driving fans on the same side consistent with the turning direction of the hovercraft.
[0035] In a specific implementation scheme, the hovercraft control system further includes a first speed measurement module, and the use of a second control algorithm to control the speed of the driving fan according to the target speed to control the translational motion of the hovercraft includes:
[0036] Using the first speed measurement module to measure the current speed of the hovercraft, the current speed includes the current speed magnitude and the current speed direction;
[0037] Calculating a speed error between the target speed and the current speed, wherein the speed error includes a speed magnitude error and a speed angle error;
[0038] Constructing a joint error value function according to the speed magnitude error and the speed angle error, and optimizing parameters of the third PID control algorithm and the fourth PID control algorithm using the joint error value function;
[0039] When the speed magnitude error and the speed angle error are both minimum, the optimal parameters of the third PID control algorithm and the fourth PID control algorithm are obtained, and a speed PID control algorithm and a direction PID control algorithm are generated;
[0040] The speed PID control algorithm is used to calculate and generate a first force vector according to the speed magnitude error, and the direction PID control algorithm is used to calculate and generate a second force vector according to the speed angle error;
[0041] Performing force synthesis calculation on the first force vector and the second force vector to generate a resultant force;
[0042] The resultant force is decomposed according to the directions of the four driving fans and loaded onto two corresponding adjacent driving fans, and the rotation speed of the driving fans is calculated according to the magnitude of the decomposed force.
[0043] In a specific implementation scheme, the step of calculating the rotation speed of the driving fan according to the decomposed force includes:
[0044]
[0045] Wherein, F represents the force driving the fan, represents the air density, D represents the propeller diameter of the driving fan, k represents the rotation speed of the driving fan, and P represents the propeller pitch of the driving fan.
[0046] In a second aspect, the present application provides a hovercraft control device, which adopts the following technical solution: the device is applied to a hovercraft control system, the hovercraft control system includes drive fans installed at four diagonal positions of the hovercraft, and the device includes:
[0047] A data acquisition module, used to acquire a target speed and a control mode flag, and determine the type of the control mode flag;
[0048] a forward motion control module, configured to, if the control mode flag is a forward control flag, use a first control algorithm to control the speed of the driving fan according to the target speed, so as to control the forward motion of the hovercraft;
[0049] The lateral motion control module is used to control the speed of the driving fan according to the target speed by using a second control algorithm if the control mode flag is a lateral control flag, so as to control the translational motion of the hovercraft.
[0050] In a third aspect, the present application provides a computer device, which adopts the following technical solution: it includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute any of the above-mentioned hovercraft control methods.
[0051] In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solution: storing a computer program that can be loaded by a processor and execute any of the above-mentioned hovercraft control methods.
[0052] In summary, this application has the following beneficial technical effects:
[0053] Four fans are installed on the hovercraft to drive the movement of the hovercraft, and the user determines the control mode flag to select an appropriate control mode algorithm to control the movement of the hovercraft, thereby improving the flexibility of the hovercraft; in addition, in the forward motion mode, the forward movement and turning of the hovercraft are controlled by the speed size, speed direction and centripetal force compensation algorithm. The turning amplitude is smaller than that of the traditional method, so that the hovercraft can move in other small spaces such as indoors to complete work tasks, thereby improving the flexibility of the hovercraft and expanding the applicable scenarios of the hovercraft, thereby improving the working efficiency in small indoor environments such as factories. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of a hovercraft control method in an embodiment of the present application;
[0055] Figure 2 It is a schematic diagram of the structure of the hovercraft equipped with a driving fan in the embodiment of the present application;
[0056] Figure 3 is a schematic diagram of a hovercraft coordinate system constructed in an embodiment of the present application;
[0057] Figure 4 is a schematic diagram of the hovercraft moving in one mode in an embodiment of the present application;
[0058] Figure 5is a schematic diagram of the hovercraft moving in another mode in an embodiment of the present application;
[0059] Figure 6 is a schematic diagram of a control framework of a forward motion mode of an air cushion vehicle in an embodiment of the present application;
[0060] Figure 7 is a schematic diagram of a control framework of a hovercraft translational motion mode in an embodiment of the present application;
[0061] Figure 8 is a schematic diagram of force synthesis and decomposition in the translational motion mode of the hovercraft in an embodiment of the present application;
[0062] Fig. 9 is a schematic diagram of a hovercraft control device in an embodiment of the present application;
[0063] Fig.10 It is a schematic diagram used to embody a computer device in an embodiment of the present application.
[0064] Figure numerals: 801, data acquisition module; 802, forward motion control module; 803, lateral motion control module. DETAILED DESCRIPTION
[0065] The following combination Figure 1-Figure 10 This application is described in further detail.
[0066] The embodiment of the present application discloses a hovercraft control method, which is applied to a hovercraft control system. The method can realize flexible control of the movement of the hovercraft, and can be selected between forward movement and lateral movement modes to adapt to different work tasks; at the same time, in the forward movement mode, it can cope with work tasks in a small space, so that the task can be completed quickly and accurately.
[0067] The air cushion is formed by using high-pressure air to form an air cushion between the bottom of the ship and the water surface (or the ground), which makes the hull rise completely or partially, thereby greatly reducing the resistance of the hull during navigation and achieving the goal of high-speed navigation. The air cushion is formed by using a high-power blower to press air into the bottom of the ship, and the air sealing devices such as the flexible skirt around the bottom of the ship or the rigid sidewalls restrict its escape.
[0068] Existing hovercraft are usually powered by two fans located in the same plane at the rear of the hull, and the steering is controlled by the differential speed of the two fans. The hovercraft can be controlled to move forward or turn by the existing centripetal force algorithm; however, when the existing centripetal force algorithm controls the hovercraft to turn, the hovercraft turns a large amount, so that the hovercraft is mostly used in scenes with open spaces such as water transportation, and it is difficult to cope with relatively small spaces such as indoors, resulting in limited application scenarios of the hovercraft. For example, in indoor cargo transfer scenes inside factories, traditional control algorithms may have difficulty completing tasks indoors due to their large turning range. In order to help improve the flexibility of the hovercraft and expand the use scenarios of the hovercraft, the present application provides a hovercraft control method.
[0069] Reference Figure 1 , the method comprises the following steps:
[0070] S10, obtaining the target speed and the control mode flag, and determining the type of the control mode flag.
[0071] Specifically, the host computer transmits the corresponding target speed and motion mode flag to the hovercraft according to the path planning required by the user. The transmitted target speed includes the magnitude and direction of the target speed. The user can select different flags to select different motion modes. For example, a flag position of 0 indicates entering the forward motion mode, and a flag position of non-0 indicates entering the lateral motion mode. The fan is controlled according to the control algorithm in different modes to control the motion direction and motion posture of the hovercraft.
[0072] The hovercraft used in the embodiment of the present application includes four driving fans and two speed measuring modules. Specifically, the four driving fans are installed at four diagonal positions of the hovercraft. Figure 2 The four driving fans are distributed in an eight-shaped pattern, and the angle between adjacent fans is fixed at 45°. The four driving fans can generate corresponding opposite forces on the air cushion hull by blowing outwards. Figure 3 , with the ship's forward direction as the x-axis, the left-hand driving fan is set as the first driving fan, and the remaining three fans are set as the second, third and fourth driving fans in a clockwise order. Figure 3 The four driving fans are numbered 1-4, blowing outwards, generating inward force. Two speed measuring modules are installed at the bottom of the hull, which can be optical flow speed measuring module and gyroscope (IMU module). The optical flow speed measuring module can measure the speed and direction of the hovercraft, and the gyroscope can measure the angular velocity of the hovercraft.
[0073] S20: If the control mode flag is a forward control flag, a first control algorithm is used to control the speed of the driving fan according to the target speed to control the forward movement of the hovercraft.
[0074] Specifically, when the flag bit transmitted by the host computer is a forward control flag, for example, 0 is set as the forward control flag. When the host computer outputs 0, it means that the hovercraft needs to be controlled to move forward. The first control algorithm can be used to control the speed of different driving fans through speed magnitude, speed direction and centripetal force compensation to achieve the forward movement of the hovercraft. Among them, the forward movement can be understood as the bow of the hull always facing the speed direction. When moving forward and turning, the bow faces the direction of movement. Figure 4 , the hull itself will change along with the trajectory of the operation, and the direction of the bow will change.
[0075] S30, if the control mode flag is a lateral control flag, a second control algorithm is used to control the speed of the driving fan according to the target speed to control the translational motion of the hovercraft.
[0076] Specifically, when the control mode flag transmitted by the host computer is a lateral control flag, for example, a non-zero value is set as the lateral control flag. When the host computer outputs a non-zero value, it means that only translation movement is required in this task, and no turning movement is required. At this time, the coordinate system of the hovercraft coincides with the earth coordinate system, and the hovercraft always performs translation movement. The force vector is calculated by calculating the velocity magnitude and velocity direction through the second control algorithm, and then the calculated force is decomposed on the fan in the corresponding area. The fan speed is obtained by converting the force and the fan speed. Figure 5 During translational motion, the penetration direction of the hovercraft remains unchanged, and the hull moves according to a preset trajectory through the translational motion of the hull.
[0077] In the present application scheme, four fans are installed on the hovercraft to drive the movement of the hovercraft, and the user determines the control mode flag to select an appropriate control mode algorithm to control the movement of the hovercraft, thereby improving the flexibility of the hovercraft; in addition, in the forward motion mode, the forward movement and turning of the hovercraft are controlled by the speed size, speed direction and centripetal force compensation algorithm, and the turning amplitude is smaller than that of the traditional method, so that the hovercraft can move in other small spaces such as indoors to complete work tasks, thereby improving the flexibility of the hovercraft and expanding the applicable scenarios of the hovercraft, thereby improving the working efficiency in small indoor environments such as factories.
[0078] In one embodiment, the hovercraft control system further includes a first speed measurement module, the target speed includes a target speed magnitude and a target speed angle, and the method of using the first control algorithm to control the speed of the driving fan can be specifically implemented as follows:
[0079] When it is determined that the hovercraft is controlled to move in the forward mode, the system uses the first speed measurement module to measure the current speed of the hovercraft, wherein the first speed measurement module can be an optical flow speed measurement module, which is used to measure the current speed of the hovercraft, and the measured current speed includes the current speed magnitude and the current speed direction. The first speed measurement module used can also use other speed measurement modules, as long as the speed measurement module used includes the function of measuring the speed magnitude and the speed direction, which is not limited here. After measuring the speed magnitude and direction of the hovercraft, the speed error between the current speed and the target speed is calculated. The speed error includes the speed magnitude error e1 and the speed angle error e2, that is, the speed magnitude error can be obtained by subtracting the measured current speed magnitude from the target speed magnitude (e1=target speed-current speed), and the speed angle error is obtained by calculating the angle difference between the target speed direction and the measured current speed direction (e2=angle of the direction corresponding to the target speed-angle of the direction corresponding to the current speed).
[0080] After the speed error is calculated, the preset first PID control algorithm is optimized according to the speed error, and the optimized first PID control algorithm is used to calculate and output the first speed according to the speed error. Figure 6 The speed closed loop in the example constructs a speed error value function according to the speed error, and uses the speed error value function to optimize the parameters of the preset first PID control algorithm. The speed error value function constructed can be expressed as:
[0081] ;
[0082] Among them, t represents the time, J(t) represents the value function at time t, and e1( ) represents the speed error;
[0083] The purpose of constructing a value function to optimize the PID control algorithm is to make the value function converge to the minimum. By introducing the gradient descent algorithm to solve the value function, the parameters of the PID control algorithm are optimized. The introduced gradient descent algorithm can be expressed as:
[0084] ;
[0085] Among them, J(t) represents the value function at time t, K(t) represents the PID parameter vector composed of the parameters of the PID control algorithm at time t, Represents the corresponding learning rate, which can be adjusted by the user according to the convergence situation;
[0086] Among them, the parameter vector of the PID control algorithm can be expressed as:
[0087] ;
[0088] Among them, kp , k d , k i Represents the parameters of the PID control algorithm.
[0089] When the error value function and gradient descent algorithm are used to adjust the parameters of the PID control algorithm, when the speed error in the value function is the smallest, the optimal parameters of the preset first PID control algorithm are obtained, and the speed PID control algorithm is generated; the speed PID control algorithm is used to calculate and generate the first fan speed according to the smallest speed error. Figure 6 The PID controller in the figure is also the PID controller implemented by the PID control algorithm. The parameters of the PID controller are adaptively updated through the error value function and the gradient descent algorithm, so that the measured ship speed error e1 value is minimized. At this time, the first speed k1 is directly output by the PID controller.
[0090] Afterwards, the preset second PID control algorithm is optimized according to the speed error angle, and the optimized second PID control algorithm is used to calculate and output the second speed according to the speed angle error. Figure 6 In the middle direction closed loop, an angle error value function is constructed according to the speed angle error, and the angle error value function is used to optimize the parameters of the preset second PID control algorithm, wherein the constructed angle error value function is the same as the above-mentioned size error value function, and the speed size error e1 in the representation is replaced with the speed angle error e2, and the gradient descent algorithm is also introduced to adjust and optimize the parameters in the second PID control algorithm. The specific formula is the same as the above, and will not be repeated here. When the error value function and the gradient descent algorithm are used to adaptively adjust the parameters of the PID control algorithm, when the speed angle error e2 is minimum, the optimal parameters of the preset second PID control algorithm are obtained, and the speed angle PID control algorithm is generated.
[0091] In the embodiment of the present application, a two-stage PID controller cascade is used to implement the closed loop of the hovercraft speed direction. Therefore, after adjusting and optimizing the preset second PID control algorithm parameters to obtain the angle PID control algorithm, the target angular velocity of the hovercraft is calculated according to the target speed; Figure 6Specifically, the speed angle error is first calculated according to the target speed, and the minimum speed angle error e2 obtained in the process of optimizing the PID controller parameters is input into the optimized angle PID controller. The result output by the PID control algorithm is processed by the gain K to obtain the target angular velocity. After that, the current angular velocity of the hovercraft is measured by the second speed measurement module. The second speed measurement module used in the embodiment of the present application is a gyroscope, that is, an IMU module. The angular velocity of the hovercraft on the Z axis can be directly measured by the IMU module. In addition, the second speed measurement module can also be other modules that can measure angular velocity. Here, the IMU module is only used as an example for explanation without limitation. In actual applications, users can continue to select according to their needs; after measuring the angular velocity of the hovercraft, the angular velocity error between the current angular velocity and the target angular velocity is calculated; the second speed k2 is generated according to the angular velocity error calculation using the preset angular velocity PID control algorithm, wherein the angular velocity PID control algorithm is a PID controller with fixed parameters. In the process of using the control algorithm, the parameters of the angle PID controller will not be adaptively adjusted with the weight of the hull. In the embodiment of the present application, the cascade PID of position and angular velocity is used to realize the closed loop of angle, the outer loop is the angle loop, and the inner loop is the angular velocity loop. Considering that the embodiment of the present application pays more attention to the control effect of the outer loop for the cascade PID, and in order to reduce the amount of calculation, only the parameters of the angle PID controller of the outer loop are adaptively adjusted.
[0092] The first speed, the second speed and the preset third speed are loaded to the driving fan. The purpose of the preset third speed k3 is to control the turning of the hull. Considering that there is a centripetal force when the hull turns, there can be friction on land to resist the centripetal force. Since the hovercraft has no corresponding friction to resist the centripetal force, it is necessary to establish a corresponding relationship between the centripetal force and the current speed and angular velocity, and make corresponding feedforward compensation. The user can calculate and set it according to the current speed and current angular velocity of the hovercraft, refer to Figure 6 In the centripetal force compensation, when the angle error e2 is minimum, the final third rotation speed k3 is output through the gain, the current speed and the current angular velocity.
[0093] Applying the three calculated speeds to the corresponding driving fans can be specifically performed as follows:
[0094] First, set the direction of the hovercraft's movement to forward, and the direction opposite to the forward direction to backward. Figure 2, that is, the two driving fans numbered 1 and 2 are the two driving fans in the forward direction, and the two driving fans numbered 3 and 4 are the two driving fans in the backward direction. Afterwards, it is determined whether the current speed is less than the target speed, that is, it can be achieved by determining the positive or negative of the speed error e1; if the current speed is less than the target speed, that is, the speed error is positive, then the first speed is loaded to the two driving fans in the backward direction of the hovercraft, that is, the first speed k1 is loaded to the driving fans No. 3 and No. 4, and the fans No. 3 and No. 4 are controlled to blow out at the same speed k1, generating a resultant force F parallel to the forward direction of the hull, so that the hull is accelerated; if the current speed is not less than the target speed, that is, the speed error is less than or equal to 0, then the first speed is loaded to the two driving fans in the forward direction of the hovercraft, that is, the first speed k1 is loaded to the driving fans No. 1 and No. 2, and the fans No. 1 and No. 2 are controlled to blow out at the same speed k1, generating a resultant force F parallel to the backward direction of the hull, so that the hull is decelerated.
[0095] Afterwards, determine whether the angle corresponding to the current speed direction is smaller than the angle corresponding to the target speed direction, that is, it can be achieved by determining the positive or negative of the speed angle error; if the angle corresponding to the current speed direction is smaller than the angle corresponding to the target speed direction, that is, the speed angle error is positive, then the second speed k2 is loaded to the first pair of diagonal drive fans to generate a clockwise torque. Since the current angle is small, it is necessary to generate a clockwise torque to expand the angle. Therefore, in this embodiment of the application, the second fan speed k2 is loaded to the No. 2 and No. 3 drive fans to generate a clockwise torque to make the hull turn left; if the angle corresponding to the current speed direction is not less than the angle corresponding to the target speed direction, that is, the speed angle error is less than or equal to 0, then the second speed is loaded to the second pair of diagonal drive fans to generate a counterclockwise torque. Since the current angle is large, it is necessary to generate a counterclockwise torque to reduce the angle. Therefore, in this embodiment of the application, the second speed k2 is loaded to the No. 1 and No. 4 drive fans to generate a counterclockwise torque to make the hull turn right.
[0096] Finally, the third speed k3 is loaded to the two driving fans on the same side consistent with the direction of the hovercraft. For example, if the hull turns right, the third speed is loaded on the two driving fans on the right side, that is, loaded on fans No. 2 and No. 4, and fans No. 2 and No. 4 are controlled to blow air at the same speed k3, generating a rightward force F to act as the centripetal force; if the hull turns left, the third speed is loaded on the two driving fans on the left side, that is, loaded on fans No. 1 and No. 3, and fans No. 1 and No. 3 are controlled to blow air at the same speed k3, generating a leftward force F to act as the centripetal force.
[0097] In this application, considering that the weight, wind resistance and other uncertain parameters of the hovercraft will change when loading different cargoes, in order to increase the stability of the hull in subsequent control, the hovercraft is controlled by an adaptive PID controller, and the various parameters of the learning PID are adjusted autonomously to optimize to achieve the best control situation. The adaptive setting reduces human interference and improves the efficiency of the hovercraft in operations such as cargo transportation. In addition, by controlling the speed of the hovercraft in three dimensions, namely, speed size, speed direction and centripetal force compensation, the flexibility of the hovercraft can be improved, and the turning can be flexible, so that the hovercraft can be used in narrow space scenes such as indoors, making the application scenarios of the hovercraft more extensive.
[0098] In one embodiment, the hovercraft control system further includes a first speed measurement module, and the second control algorithm is used to control the speed of the driving fan according to the target speed, so that the method of controlling the translational motion of the hovercraft can be specifically implemented as follows:
[0099] First, the first speed measurement module is used to measure the current speed of the hovercraft, the current speed includes the current speed magnitude and the current speed direction, and then the speed error between the target speed and the current speed is calculated, the speed error includes the speed magnitude error e1 and the speed angle error e2; it should be noted that the method of measuring the hull speed and calculating the error between the current hull speed and the target speed is consistent with the measurement and calculation method in the first control algorithm, which will not be repeated here.
[0100] After the speed magnitude error e1 and the speed angle error e2 are calculated, a joint error value function is constructed according to the speed magnitude error and the speed angle error, and the joint error value function is used to optimize the parameters of the third PID control algorithm and the fourth PID control algorithm; the constructed joint error value function can be expressed as:
[0101] ;
[0102] Where t represents the time, e1( ) represents the velocity magnitude error, and e2( ) represents the velocity angle error.
[0103] The purpose of constructing a value function to optimize the PID control algorithm is to make the value function converge to the minimum. By introducing the gradient descent algorithm to solve the value function, the parameters of the PID control algorithm are optimized. The introduced gradient descent algorithm can be expressed as:
[0104] ;
[0105] Among them, J(t) represents the value function at time t, K(t) represents the PID parameter vector composed of the parameters of the PID control algorithm at time t, Represents the corresponding learning rate, which can be adjusted by the user according to the convergence situation;
[0106] In the embodiment of the present application, the parameters of the third and fourth PID control algorithms are adjusted simultaneously. Therefore, in the embodiment of the present application, the PID control algorithm vector K can be expressed as:
[0107] ;
[0108] in, represents the parameters in the third PID control algorithm, Indicates the parameters in the fourth PID control algorithm, refer to Figure 7 , That is, the parameters of the PID controller in the speed closed loop, That is, the parameters of the PID controller in the directional closed loop.
[0109] When the error value function and gradient descent algorithm are used to adjust the parameters of the PID control algorithm, when the speed magnitude error e1 and the speed angle error e2 are both minimized, the optimal parameters of the third PID control algorithm and the fourth PID control algorithm are obtained, and the speed PID control algorithm and the direction PID control algorithm are generated. Afterwards, the speed PID control algorithm is used to calculate and generate the first force vector F1 based on the speed magnitude error, and the direction PID control algorithm is used to calculate and generate the second force vector F2 based on the speed angle error; the first force vector F1 and the second force vector F2 are combined to generate a resultant force. Finally, the resultant force is decomposed according to the directions of the four drive fans and loaded to the two adjacent drive fans in the corresponding area, and the speed of the drive fan is calculated according to the decomposed force magnitude.
[0110] Since the second control algorithm controls the hull to do only translational motion, vector control fans are used to achieve translation. The hull needs to translate and cannot spin, so during vector control, only two adjacent fans will blow air, and the angle between adjacent fans is 45 degrees, so the combined force of each two adjacent fans will only be distributed in a 90-degree fan-shaped area. Figure 8 Establish a rectangular coordinate system according to the direction of the fan, and divide the plane rectangular coordinate system into four areas along y = x, y = -x as shown in the figure ( Figure 8 The area divided by the dashed line in the middle) is then decomposed into two adjacent fans in the corresponding area. Figure 8 ,Through calculation, the resultant force F_ is obtained in the ,IV area divided by the curve, the resultant force can be decomposed into the adjacent No. 1 and No. 2 driving fans.
[0111] The method of calculating the speed of the driving fan according to the decomposed force can be expressed as:
[0112]
[0113] Where F is the force driving the fan, represents the air density, D represents the propeller diameter of the driving fan, k represents the speed of the driving fan, and P represents the propeller pitch of the driving fan.
[0114] In this application, considering that the hull makes translational motion, the head of the ship will not change according to the motion trajectory, so vector control fans are used to achieve translation. By calculating the resultant force required for the hull movement, and then decomposing the resultant force to the corresponding two adjacent fans, the hull is driven to move, thereby improving the flexibility of the ship; in addition, another control algorithm is provided, so that users can choose to adapt to different operating tasks and achieve the optimal motion cost and motion effect.
[0115] Figure 1 FIG. 1 is a flow chart of a method for controlling a hovercraft in one embodiment. It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in the order indicated by the arrows; unless otherwise specified in this document, there is no strict order restriction for the execution of the steps, and the steps may be executed in other orders; and Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0116] Based on the above method, an embodiment of the present application also discloses a hovercraft control device.
[0117] Reference Fig. 9 , the device includes the following modules:
[0118] The data acquisition module 801 is used to acquire the target speed and the control mode flag, and determine the type of the control mode flag;
[0119] A forward motion control module 802 is used to control the speed of the driving fan according to the target speed by using a first control algorithm to control the forward motion of the hovercraft if the control mode flag is a forward control flag;
[0120] The lateral motion control module 803 is used to control the speed of the driving fan according to the target speed by using the second control algorithm to control the translational motion of the hovercraft if the control mode flag is the lateral control flag.
[0121] In one embodiment, the forward motion control module 802 is specifically used to measure the current speed of the hovercraft using the first speed measurement module, the current speed including the current speed magnitude and the current speed direction; calculate the speed error between the target speed and the current speed, the speed error including the speed magnitude error and the speed angle error; optimize the preset first PID control algorithm according to the speed magnitude error, and use the optimized first PID control algorithm to calculate and output the first speed according to the speed magnitude error; optimize the preset second PID control algorithm according to the speed angle error, and use the optimized second PID control algorithm to calculate and output the second speed according to the speed angle error; load the first speed, the second speed and the preset third speed to the drive fan.
[0122] In one embodiment, the forward motion control module 802 is specifically used to construct a size error value function based on the speed size error, and use the size error value function to optimize the parameters of the preset first PID control algorithm; when the speed size error is minimized, the optimal parameters of the preset first PID control algorithm are obtained, and a speed size PID control algorithm is generated; and the speed size PID control algorithm is used to calculate and generate a first rotational speed based on the minimum speed size error.
[0123] In one embodiment, the forward motion control module 802 is specifically used to construct an angle error value function according to the speed angle error, and use the angle error value function to optimize the parameters of the preset second PID control algorithm; when the speed angle error is minimum, obtain the optimal parameters of the preset second PID control algorithm, and generate a speed angle PID control algorithm; calculate the target angular velocity of the hovercraft according to the target speed; use the second speed measurement module to measure the current angular velocity of the hovercraft, and calculate the angular velocity error between the current angular velocity and the target angular velocity; use the preset angular velocity PID control algorithm to calculate and generate a second rotation speed according to the angular velocity error.
[0124] In one embodiment, the forward motion control module 802 is specifically used to set the direction of movement of the hovercraft as forward, and the direction opposite to the forward direction as backward; determine whether the current speed is less than the target speed; if the current speed is less than the target speed, load the first speed to the two driving fans in the rear direction of the hovercraft; if the current speed is not less than the target speed, load the first speed to the two driving fans in the front direction of the hovercraft; determine whether the angle corresponding to the current speed direction is less than the angle corresponding to the target speed direction; if the angle corresponding to the current speed direction is less than the angle corresponding to the target speed direction, load the second speed to the first pair of diagonal driving fans to generate a clockwise torque; if the angle corresponding to the current speed direction is not less than the angle corresponding to the target speed direction, load the second speed to the second pair of diagonal driving fans to generate a counterclockwise torque; load the third speed to the two driving fans on the same side consistent with the direction of the hovercraft.
[0125] In one embodiment, the lateral motion control module 803 is specifically used to measure the current speed of the hovercraft using the first speed measurement module, and the current speed includes the current speed magnitude and the current speed direction; calculate the speed error between the target speed and the current speed, and the speed error includes the speed magnitude error and the speed angle error; construct a joint error value function according to the speed magnitude error and the speed angle error, and use the joint error value function to optimize the parameters of the third PID control algorithm and the fourth PID control algorithm; when the speed magnitude error and the speed angle error are both minimized, obtain the optimal parameters of the third PID control algorithm and the fourth PID control algorithm, and generate a speed PID control algorithm and a direction PID control algorithm; use the speed PID control algorithm to calculate and generate a first force vector based on the speed magnitude error, and use the direction PID control algorithm to calculate and generate a second force vector based on the speed angle error; perform force synthesis calculation on the first force vector and the second force vector to generate a resultant force; decompose the resultant force according to the directions of the four driving fans and load it to the corresponding two adjacent driving fans, and calculate the speed of the driving fan according to the decomposed force magnitude.
[0126] In one embodiment, in the lateral motion control module 803, the speed of the driving fan is calculated according to the decomposed force magnitude as follows:
[0127]
[0128] Where F is the force driving the fan, represents the air density, D represents the propeller diameter of the driving fan, k represents the speed of the driving fan, and P represents the propeller pitch of the driving fan.
[0129] The hovercraft control device provided in the embodiment of the present application can be applied to the hovercraft control method provided in the above embodiment. For relevant details, refer to the above method embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0130] It should be noted that: the hovercraft control device provided in the embodiment of the present application only uses the division of the above-mentioned functional modules / functional units as an example to illustrate when controlling the hovercraft. In practical applications, the above-mentioned functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the hovercraft control device is divided into different functional modules / functional units to complete all or part of the functions described above. In addition, the implementation method of the hovercraft control method provided in the above method embodiment and the implementation method of the hovercraft control device provided in this embodiment belong to the same concept. The specific implementation process of the hovercraft control device provided in this embodiment is detailed in the above method embodiment, which will not be repeated here.
[0131] The embodiment of the present application also discloses a computer device.
[0132] Specifically, if Fig.10 As shown, the computer device can be a computer device such as a desktop computer, a laptop computer, a PDA, and a cloud server. The computer device may include, but is not limited to, a processor and a memory. The processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, graphics processors (GPU), embedded neural network processors (NPU) or other dedicated deep learning coprocessors, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above chips.
[0133] As a non-transient computer-readable storage medium, the memory can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above-mentioned embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, the method in the above-mentioned method implementation is realized. The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0134] The embodiment of the present application also discloses a computer-readable storage medium.
[0135] Specifically, the computer-readable storage medium is used to store a computer program, and when the computer program is executed by the processor, the method in the above-mentioned method implementation is implemented. Those skilled in the art can understand that the implementation of all or part of the process in the above-mentioned implementation method of the present application can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include the process of the implementation of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0136] This specific embodiment is merely an explanation of the present invention and is not a limitation of the present invention. After reading this specification, those skilled in the art may make non-creative modifications to the present embodiment as needed. However, as long as they are within the scope of the claims of the present invention, they are protected by the patent law.
Claims
1. A method for controlling a hovercraft, characterized in that: The method is applied to a hovercraft control system, wherein the hovercraft control system includes drive fans installed at four diagonal positions of the hovercraft, and the method includes: Obtaining a target speed and a control mode flag, and determining the type of the control mode flag; If the control mode flag is a forward control flag, a first control algorithm is used to control the speed of the driving fan according to the target speed to control the forward movement of the hovercraft; If the control mode flag is a lateral control flag, a second control algorithm is used to control the speed of the driving fan according to the target speed to control the translational motion of the hovercraft; The hovercraft control system further includes a first speed measurement module, and the use of a second control algorithm to control the speed of the driving fan according to the target speed to control the translational motion of the hovercraft includes: Using the first speed measurement module to measure the current speed of the hovercraft, the current speed includes the current speed magnitude and the current speed direction; Calculating a speed error between the target speed and the current speed, wherein the speed error includes a speed magnitude error and a speed angle error; Constructing a joint error value function according to the speed magnitude error and the speed angle error, and optimizing parameters of the third PID control algorithm and the fourth PID control algorithm using the joint error value function; When the speed magnitude error and the speed angle error are both minimum, the optimal parameters of the third PID control algorithm and the fourth PID control algorithm are obtained, and a speed PID control algorithm and a direction PID control algorithm are generated; The speed PID control algorithm is used to calculate and generate a first force vector according to the speed magnitude error, and the direction PID control algorithm is used to calculate and generate a second force vector according to the speed angle error; Performing force synthesis calculation on the first force vector and the second force vector to generate a resultant force; The resultant force is decomposed according to the directions of the four driving fans and loaded onto two corresponding adjacent driving fans, and the rotation speed of the driving fans is calculated according to the magnitude of the decomposed force.
2. The method according to claim 1, characterized in that: The hovercraft control system further includes a first speed measurement module, the target speed includes a target speed magnitude and a target speed angle, and the use of a first control algorithm to control the speed of the driving fan includes: Using the first speed measurement module to measure the current speed of the hovercraft, the current speed includes the current speed magnitude and the current speed direction; Calculating a speed error between the target speed and the current speed, wherein the speed error includes a speed magnitude error and a speed angle error; Optimizing a preset first PID control algorithm according to the speed error, and using the optimized first PID control algorithm to calculate and output a first speed according to the speed error; Optimizing a preset second PID control algorithm according to the speed angle error, and using the optimized second PID control algorithm to calculate and output a second speed according to the speed angle error; The first rotation speed, the second rotation speed and a preset third rotation speed are loaded to the driving fan.
3. The method according to claim 2, characterized in that: The step of optimizing a preset first PID control algorithm according to the speed error, and using the optimized first PID control algorithm to calculate and output a first speed according to the speed error comprises: Constructing a magnitude error value function according to the speed magnitude error, and optimizing parameters of a preset first PID control algorithm using the magnitude error value function; When the speed error is the smallest, the optimal parameters of the preset first PID control algorithm are obtained, and a speed PID control algorithm is generated; The speed magnitude PID control algorithm is used to calculate and generate a first speed according to the minimum speed magnitude error.
4. The method according to claim 2, characterized in that: The hovercraft control system further includes a second speed measurement module, wherein the second PID control algorithm is optimized according to the speed angle error, and the optimized second PID control algorithm is used to calculate and output a second speed according to the speed angle error, including: Constructing an angle error value function according to the speed angle error, and optimizing parameters of a preset second PID control algorithm using the angle error value function; When the speed angle error is minimum, obtaining the optimal parameters of the preset second PID control algorithm, and generating a speed angle PID control algorithm; Calculating a target angular velocity of the hovercraft according to the target velocity; Measuring the current angular velocity of the hovercraft by using the second velocity measurement module, and calculating the angular velocity error between the current angular velocity and the target angular velocity; A preset angular velocity PID control algorithm is used to calculate and generate a second rotation speed according to the angular velocity error.
5. The method according to claim 2, characterized in that: The four driving fans are sequentially set as a first driving fan, a second driving fan, a third driving fan and a fourth driving fan; the driving fans include a first diagonal driving fan and a second diagonal driving fan, the first diagonal driving fan includes the second driving fan and the third driving fan, and the second diagonal driving fan includes the first driving fan and the fourth driving fan; The step of loading the first speed, the second speed and the preset third speed to the driving fan comprises: The direction of movement of the hovercraft is set as a forward direction, and the direction opposite to the forward direction is set as a backward direction; Determine whether the current speed is less than the target speed; If the current speed is smaller than the target speed, the first speed is applied to the two rearward driving fans of the hovercraft; If the current speed is not less than the target speed, the first speed is applied to the two forward driving fans of the hovercraft; Determine whether the angle corresponding to the current speed direction is smaller than the angle corresponding to the target speed direction; If the angle corresponding to the current speed direction is smaller than the angle corresponding to the target speed direction, the second speed is applied to the first pair of diagonally driven fans to generate a clockwise torque; If the angle corresponding to the current speed direction is not less than the angle corresponding to the target speed direction, then applying the second speed to the second pair of diagonally driven fans to generate a counterclockwise torque; The third rotation speed is applied to the two driving fans on the same side consistent with the turning direction of the hovercraft.
6. The method according to claim 1, characterized in that: The step of calculating the rotation speed of the driving fan according to the decomposed force comprises: Wherein, F represents the force driving the fan, represents the air density, D represents the propeller diameter of the driving fan, k represents the rotation speed of the driving fan, and P represents the propeller pitch of the driving fan.
7. A hovercraft control device, applied to the hovercraft control method according to any one of claims 1 to 6, characterized in that: The device is applied to a hovercraft control system, wherein the hovercraft control system includes drive fans installed at four diagonal positions of the hovercraft, and the device includes: A data acquisition module (801) is used to acquire a target speed and a control mode flag, and determine the type of the control mode flag; A forward motion control module (802), configured to, if the control mode flag is a forward control flag, use a first control algorithm to control the speed of the driving fan according to the target speed, so as to control the forward motion of the hovercraft; The lateral motion control module (803) is used to, if the control mode flag is a lateral control flag, use a second control algorithm to control the speed of the driving fan according to the target speed, so as to control the translational motion of the hovercraft.
8. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Full-hovering hovercraft control method based on slip and rotating speed dual-drive and lift force matching mode
CN115092371A
System for controlling an air cushion vehicle by propeller towers and a propeller tower
US20210101579A1