Underwater mechanical fish control method and system based on neural fuzzy combined control

Through the joint neural fuzzy control method, combined with fuzzy reasoning and BP neural network, the control problem of underwater mechanical fish under nonlinear perturbation and high-frequency perturbation is solved, and rapid convergence and stable depth and posture control are achieved.

CN120507975AInactive Publication Date: 2025-08-19FUJIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510636626.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-17
Publication Date
2025-08-19
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing underwater mechanical fish control methods cannot adapt to nonlinear disturbances. The depth overshoot is large during high-frequency disturbances, the posture fine adjustment is lagging behind, and the attitude time-sharing control has a low tolerance to mechanical noise, so high-frequency disturbances cannot be suppressed.

Method used

The neural fuzzy joint control method is adopted to collect real-time posture and water pressure data of mechanical fish through sensors, perform data processing and state estimation, and use the fuzzy inference controller to generate preliminary control variables, and learn online through the pre-trained BP neural network, and finally generate defuzzy control instructions to drive the tail fin three-joint servo, propeller power module and slider displacement mechanism.

Benefits of technology

The adaptability to nonlinear perturbation is achieved, the depth overshoot during sudden water flow is reduced, the rapid convergence speed and disturbance resistance are improved, and the depth stability and pitch attitude accuracy of mechanical fish are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120507975A_ABST
    Figure CN120507975A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of underwater mechanical fish motion control, in particular to an underwater mechanical fish control method and system based on neural fuzzy combined control, and the method comprises the steps: firstly carrying out the data processing and state estimation processing of real-time initial attitude data and water pressure data, and outputting a first estimation variable; secondly, inputting the first estimation variable into a fuzzy reasoning controller for transformation to generate a first preliminary control variable; respectively inputting the first preliminary control variable and the first estimation variable into a pre-trained BP neural network, and carrying out online learning on the network weight through a preset objective function to generate a final control variable; and finally, defuzzification is conducted on the final control variable, and a tail fin three-joint steering engine, a propeller power module and a sliding block displacement mechanism are driven through a defuzzification control instruction. The method disclosed by the invention not only adapts to non-linear disturbance, but also can reduce the depth overshoot when the water flow suddenly changes, and effectively improves the rapid convergence speed, the anti-disturbance capability and the utilization rate of the thrust mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater mechanical fish motion control, and in particular to an underwater mechanical fish control method and system based on neuro-fuzzy combined control. Background Art

[0002] With the further implementation of the national marine strategy, underwater robotic fish are being industrialized in a variety of scenarios, such as marine environment monitoring, underwater infrastructure inspection, and aquaculture monitoring.

[0003] At present, there are usually two ways to control underwater robotic fish. One is to solidify the parameters of the proportional-integral-differential algorithm based on error feedback, but this method cannot adapt to nonlinear disturbances; the other is to use fuzzy PID to adjust the control quantity through an empirical rule library, but its membership function is fixed, and the membership function and weight cannot be optimized online. When the water flow changes suddenly, the depth overshoot is high; in addition, the depth / attitude time-sharing control leads to a lag in attitude fine-tuning, has a low tolerance for mechanical noise, and cannot suppress high-frequency disturbances. Summary of the Invention

[0004] The purpose of the present invention is to provide an underwater mechanical fish control method and system based on neural fuzzy joint control, which can not only adapt to nonlinear disturbances, but also better suppress high-frequency disturbances and reduce depth overshoot when water flow changes suddenly.

[0005] To achieve the above object, the present invention provides a method for controlling an underwater mechanical fish based on neural-fuzzy combined control, the method comprising:

[0006] Collect the real-time initial posture data and water pressure data of the mechanical fish based on sensors;

[0007] performing data processing and state estimation processing on the real-time initial posture data and the water pressure data, and outputting a first estimated variable;

[0008] Inputting the first estimated variable into a fuzzy inference controller for transformation to generate a first preliminary control variable;

[0009] Inputting the first preliminary control variable and the first estimated variable into a pre-trained BP neural network respectively, performing online learning on the network weights through a preset objective function, and generating a final control variable;

[0010] Defuzzifying the final control variable to obtain a defuzzified control instruction;

[0011] The defuzzified control instructions are used to drive the tail fin three-joint servo, the propeller power module and the slider displacement mechanism.

[0012] Optionally, the sensor-based acquisition of the real-time initial posture data and water pressure data of the mechanical fish specifically includes:

[0013] A six-axis motion sensor and a thin-film pressure sensor placed in the circuit area of the fish's head are used to collect the real-time initial posture data and water pressure data of the mechanical fish. The initial posture data includes acceleration and angular velocity, and the water pressure data is the water pressure information at the location.

[0014] Optionally, the step of inputting the first estimated variable into a fuzzy inference controller for transformation to generate a first preliminary control variable specifically includes:

[0015] generating a fuzzy control table based on the second estimated variable and the second preliminary control variable;

[0016] Determine whether the parameters in the first estimated variable exceed the upper and lower limits; if so, reset the upper and lower limit thresholds; if not, perform fuzzification operations on the first estimated variable according to fuzzy rules, and search the fuzzy control table to generate a first preliminary control variable.

[0017] Optionally, generating a fuzzy control table based on the second estimated variable and the second preliminary control variable specifically includes:

[0018] Using the second estimated variable as an input variable and the second preliminary controlled variable as an output variable, normalizing parameters other than the pitch angle θ and the depth error change rate Δd / dt;

[0019] The normalized parameters, pitch angle θ and depth error change rate Δd / dt are divided into fuzzy subsets according to the underwater mechanical fish dynamics model to obtain the fuzzy subsets corresponding to each parameter;

[0020] Constructing a fuzzy definition table corresponding to each parameter according to the fuzzy subset corresponding to each parameter;

[0021] Constructing a plurality of fuzzy control rules according to the fuzzy definition table corresponding to each parameter;

[0022] The fuzzy control table is generated by deleting the mergeable and redundant rules among the multiple fuzzy control rules.

[0023] Optionally, the specific formula of the underwater mechanical fish dynamics model is:

[0024]

[0025] Where λ 11 is the vertical additional mass, λ 55 is the additional moment of inertia for pitching, C d is the resistance coefficient, A ref is the reference cross-sectional area, C m is the pitch damping coefficient, w is the vertical navigation speed, is the vertical acceleration, α is the pitch angle, is the angular velocity, is the angular acceleration, I y is the moment of inertia. b -z g is the height difference between the center of buoyancy and the center of gravity, D drag is the vertical resistance, τ prop Pitch torque provided to the propeller, τ s The pitch torque provided to the slider, τ hydro is the resistance torque, τ restore is the static restoring moment, ρ is the water density, s is the displacement of the slider, m is the total mass, m s is the mass of the slider, and L is the length of the fish body.

[0026] Optionally, the method further comprises: constructing a BP neural network, the specific steps of which include:

[0027] Constructing a training data set; the training data set includes a 6-dimensional historical input feature set and a 5-dimensional historical output feature set;

[0028] Preprocessing each data in the training data set to obtain a time series continuous feature data set;

[0029] The time series continuous feature data set is used to perform network weight learning on the shared layer-decoupled branch structure to obtain a pre-trained BP neural network.

[0030] Optionally, the method further includes:

[0031] Feedback is given based on the deviation between the pitch angle and the depth in the first estimated variable, and the BP neural network reversely optimizes the inference rules and membership function of the fuzzy controller to form a closed-loop self-correction mechanism.

[0032] The present invention also provides an underwater mechanical fish control system based on neuro-fuzzy combined control, the system comprising:

[0033] A data acquisition module is used to collect the real-time initial posture data and water pressure data of the mechanical fish based on sensors;

[0034] a first estimated variable generating module, configured to perform data processing and state estimation processing on the real-time initial posture data and the water pressure data, and output a first estimated variable;

[0035] A first preliminary control variable generating module, configured to input the first estimated variable into a fuzzy inference controller for transformation to generate a first preliminary control variable;

[0036] a final control variable generation module, configured to input the first preliminary control variable and the first estimated variable into a pre-trained BP neural network, perform online learning on the network weights through a preset objective function, and generate a final control variable;

[0037] a defuzzification module, configured to defuzzify the final control variable to obtain a defuzzified control instruction;

[0038] The instruction drive module is used to drive the tail fin three-joint servo, the propeller power module and the slider displacement mechanism using the defuzzification control instruction.

[0039] Optionally, the first preliminary control variable generating module specifically includes:

[0040] a fuzzy control table generating unit, configured to generate a fuzzy control table based on the second estimated variable and the second preliminary control variable;

[0041] A judgment unit is used to judge whether the parameters in the first estimated variable exceed the upper and lower limits; if so, reset the upper and lower limit thresholds; if not, perform fuzzification operations on the first estimated variable according to fuzzy rules, and search the fuzzy control table to generate a first preliminary control variable.

[0042] Optionally, the fuzzy control table generating unit specifically includes:

[0043] a normalization processing subunit, configured to use the second estimated variable as an input variable and the second preliminary controlled variable as an output variable, and perform normalization processing on parameters other than the pitch angle θ and the depth error change rate Δd / dt;

[0044] The fuzzy subset division subunit is used to perform fuzzy subset division on the normalized parameters, the pitch angle θ, and the depth error change rate Δd / dt according to the underwater mechanical fish dynamics model, and obtain the fuzzy subset corresponding to each parameter;

[0045] A fuzzy definition table construction subunit is used to construct a fuzzy definition table corresponding to each parameter according to the fuzzy subset corresponding to each parameter;

[0046] A fuzzy control rule generating subunit, configured to construct a plurality of fuzzy control rules according to the fuzzy definition table corresponding to each parameter;

[0047] The fuzzy control table generating subunit is used to delete the mergeable and redundant rules in the plurality of fuzzy control rules to generate a fuzzy control table.

[0048] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0049] The present invention discloses a method and system for controlling an underwater robotic fish based on a neural-fuzzy combined control system. The method first processes real-time initial posture data and water pressure data and performs state estimation to output a first estimated variable. The first estimated variable is then input into a fuzzy inference controller for transformation to generate a first preliminary control variable. The first preliminary control variable and the first estimated variable are then respectively input into a pre-trained BP neural network, where network weights are online learned using a preset objective function to generate a final control variable. Finally, the final control variable is defuzzified, and the defuzzified control instructions are used to drive the tail fin three-joint servo, propeller power module, and slider displacement mechanism. The method disclosed in the present invention not only adapts to nonlinear disturbances but also reduces depth overshoot during sudden changes in water flow, effectively improving rapid convergence speed, anti-disturbance capability, and thrust mechanism utilization. Furthermore, through real-time iteration and dynamic parameter correction of the neural-fuzzy algorithm, the robustness of multi-degree-of-freedom motion control of the robotic fish in complex underwater environments can be addressed, significantly improving depth stability, pitch attitude accuracy, and dynamic response efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0051] Figure 1 This is a flow chart of an underwater mechanical fish control method based on neuro-fuzzy combined control according to an embodiment of the present invention;

[0052] Figure 2 This is a schematic diagram of a shared layer-decoupled branch structure according to an embodiment of the present invention;

[0053] Figure 3 This is a structural diagram of an underwater mechanical fish control system based on neuro-fuzzy combined control according to an embodiment of the present invention;

[0054] Figure 4 This is the underwater control effect diagram of the traditional fuzzy PID algorithm;

[0055] Figure 5 This is a control effect diagram under the combined algorithm of neural network and fuzzy controller in an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0057] The purpose of the present invention is to provide an underwater mechanical fish control method and system based on neural fuzzy joint control, which can not only adapt to nonlinear disturbances, but also better suppress high-frequency disturbances and reduce depth overshoot when water flow changes suddenly.

[0058] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0059] like Figure 1 As shown, the present invention discloses a method for controlling an underwater mechanical fish based on neural fuzzy combined control, the method comprising:

[0060] Step S1: Collecting the real-time initial posture data and water pressure data of the mechanical fish based on the sensor.

[0061] Step S2: Perform data processing and state estimation on the real-time initial posture data and water pressure data, and output a first estimated variable; the first estimated variable is the actual predicted estimated variable, including the pitch angle θ', the depth error Δd' and the depth error change rate Δd' / dt.

[0062] Step S3: Input the first estimated variable into the fuzzy inference controller for transformation to generate the first preliminary control variable; the first preliminary control variable is the actual predicted preliminary control variable, including the regulating variable P' of the rudder vibration frequency and amplitude, the dynamic adjustment variable F' of the propeller speed and steering, and the decision variable Δx' of the front and rear displacement of the slider.

[0063] Step S4: Input the first preliminary control variable and the first estimated variable into the pre-trained BP neural network respectively, perform online learning on the network weights through the preset objective function, and generate the final control variables; the final control variables include the tail fin swing intensity, the dual propeller speed and the slider displacement.

[0064] Step S5: Defuzzify the final control variable to obtain a defuzzified control instruction; the defuzzified control instruction is an electrical signal instruction corresponding to the final control variable.

[0065] Step S6: using the defuzzified control instruction to drive the tail fin three-joint servo, propeller power module and slider displacement mechanism.

[0066] The following describes each step in detail:

[0067] Step S1: Collecting the real-time initial posture data and water pressure data of the mechanical fish based on sensors, specifically including:

[0068] A six-axis motion sensor and a thin-film pressure sensor placed in the circuit area of the fish's head collect real-time initial posture data and water pressure data. Initial posture data includes acceleration and angular velocity, while water pressure data represents the water pressure at the specific location. These sensors accurately measure the robot's underwater posture and water pressure, which are then used for subsequent data processing and state estimation.

[0069] Step S3: Inputting the first estimated variable into the fuzzy inference controller for transformation to generate a first preliminary control variable, specifically including:

[0070] Step S31: Generate a fuzzy control table based on the second estimated variable and the second preliminary control variable, specifically including:

[0071] Step S311: Using the second estimated variable as the input variable and the second preliminary control variable as the output variable, normalize all parameters except the pitch angle θ and the depth error change rate Δd / dt. The second estimated variable is a historical estimate variable, which includes the pitch angle θ, the depth error Δd, and the depth error change rate Δd / dt. The second preliminary control variable is a historical preliminary control variable, which includes the adjustment variable P for the rudder vibration frequency and amplitude, the dynamic adjustment variable F for the propeller speed and steering, and the decision variable Δx for the slider's fore-aft displacement.

[0072] Step S312: performing fuzzy subset division on the normalized parameters, the pitch angle θ, and the depth error change rate Δd / dt according to the underwater mechanical fish dynamics model to obtain the fuzzy subset corresponding to each parameter.

[0073] Based on the motion characteristics and mechanical principles of the specific robotic fish model under study, this paper integrates the three-degree-of-freedom coupling of bionic propulsion, vector thrust, and center of mass adjustment. To describe the coupled motion characteristics of the robotic fish in the vertical plane, the force-torque balance relationship is used to quantify the coupling effects of mechanical drive, fluid action, and posture adjustment. The Newton-Euler equations are extended in an underwater environment, and a dynamic model of the underwater robotic fish is constructed. The specific formula is:

[0074]

[0075] Where λ 11 is the vertical additional mass, λ 55 is the additional moment of inertia for pitching, C d is the resistance coefficient, A ref is the reference cross-sectional area, Cm is the pitch damping coefficient, w is the vertical navigation speed, is the vertical acceleration, α is the pitch angle, is the angular velocity, is the angular acceleration, I y is the moment of inertia. b -z g is the height difference between the center of buoyancy and the center of gravity, D drag is the vertical resistance, τ prop Pitch torque provided to the propeller, τ s The pitch torque provided to the slider, τ hydro is the resistance torque, τ restore is the static restoring moment, ρ is the water density, s is the displacement of the slider, m is the total mass, m s is the mass of the slider, and L is the length of the fish body.

[0076] The above formula describes the physical connection between the power mechanism and the motion output, provides a decoupled input-output channel for the fuzzy controller, and is also the theoretical basis for the definition of each input and output fuzzy control set and the design of fuzzy rules.

[0077] Existing underwater robotic fish dynamics models have a single control objective, fail to address multi-DOF motion coordination, and lack a dynamics model for multiple power mechanisms, making them unable to address the synergistic effects of vertical propulsion and center of gravity adjustment. This invention overcomes the problem of existing models' single control objective and inability to achieve multi-DOF motion coordination by providing overall dynamics modeling and integrating the three-DOF coupling effects of bionic propulsion, vector thrust, and center of gravity adjustment.

[0078] The present invention analyzes the maximum values and maximum value intervals of the above six parameters based on the physical connection between the power mechanism and the motion output (i.e., the underwater mechanical fish dynamics model), and divides the normalized Δd into seven fuzzy subsets: negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), and positive large (PB). Δd / dt (actual range) is divided into five fuzzy subsets: negative large (NB), negative medium (NM), stable (ZO), positive medium (PM), and positive large (PB). θ (actual range) is divided into five fuzzy subsets: negative large (NB), negative medium (NM), stable (ZO), positive medium (PM), and positive large (PB). The normalized F is divided into seven fuzzy subsets: negative large (NB), negative medium (NM), negative small (NS), zero (ZO), positive small (PS), positive medium (PM), and positive large (PB). The normalized P is divided into 6 fuzzy subsets: extremely small (NB), small (NM), medium (NS), zero (ZO), large (PS), and maximum (PM). The normalized Δx is divided into 6 fuzzy subsets: zero (NO), extremely small (NB), relatively small (NM), medium (ZO), large (PS), and maximum (PB).

[0079] Step S313: constructing a fuzzy definition table corresponding to each parameter according to the fuzzy subset corresponding to each parameter.

[0080] Table 1 gives the fuzzy definition table corresponding to Δd. According to the depth control (ascending and diving) studied, the depth error is divided into three adjustable areas and one stable area, where the stable area is the termination stage of the control.

[0081] Table 1 Fuzzy definition table corresponding to Δd

[0082]

[0083] Table 2 gives the fuzzy definition table corresponding to Δd / dt, Table 3 gives the fuzzy definition table corresponding to θ, Table 4 gives the fuzzy definition table corresponding to F, Table 5 gives the fuzzy definition table corresponding to P, and Table 6 gives the fuzzy definition table corresponding to Δx.

[0084] Table 2 Fuzzy definition table corresponding to Δd / dt

[0085]

[0086] Table 3 Fuzzy definition table corresponding to θ

[0087]

[0088]

[0089] Table 4F corresponding fuzzy definition table

[0090]

[0091] Table 5 Fuzzy definition table corresponding to P

[0092]

[0093] Table 6 Fuzzy definition table corresponding to Δx

[0094]

[0095] Step S314: construct multiple fuzzy control rules according to the fuzzy definition table corresponding to each parameter; this process can construct fuzzy control rules based on expert experience or based on modeling and simulation, and the specific selection can be made according to actual needs.

[0096] Step S315: Delete the rules that can be merged and are redundant among the multiple fuzzy control rules to generate a fuzzy control table. As shown in Table 7, the fuzzy control table includes 25 fuzzy control rules.

[0097] Table 7 Fuzzy control table

[0098]

[0099]

[0100] Step S32: Determine whether the parameters in the first estimated variable exceed the upper and lower limits; if so, reset the upper and lower limit thresholds; if not, perform fuzzification operations on the first estimated variable according to fuzzy rules, and search the fuzzy control table to generate the first preliminary control variable.

[0101] Fuzzy rules can be divided into three control strategies A, B and C. At the same time, 5 special rules are set according to special strategies (the rule weight is set to be greater than the general rule to prevent overlapping and conflict with the general rules).

[0102] A. Staged Strategy (General): a. Coarse Adjustment Phase (NB / PB): When Δd ≤ -0.3 or Δd ≥ 0.3, propellers are at full power, the slider moves forward or aft, and the tail fin is at maximum strength to accelerate descent or ascent. b. Transition Phase (NM / PM): When -0.3 ≤ Δd ≤ -0.1 or 0.1 ≤ Δd ≤ 0.3, propeller power is reduced proportional to the error, and tail fin strength is reduced to suppress overshoot. c. Fine Adjustment Phase (NS / PS): When -0.1 < Δd < 0.1, only propeller forward and reverse fine adjustment is used, the slider is reset to eliminate attitude interference, and minimum tail fin strength ensures steady-state accuracy. d. Steady-State Phase (ZO): When -0.01 < Δd < 0.01, all power systems remain stopped, and only propeller forward and reverse low speed fine adjustment is enabled.

[0103] B. Dynamic Anti-Disturbance Strategy: When the depth rate of change is excessive (absolute value) and the fine-tuning phase has already been entered at the previous moment, exceeding the preset depth rate control set range, an over-limit or overshoot trend is determined, and reverse braking is immediately triggered. Specifically, when Δd is NS and Δd / dt exceeds the NB range, P changes to PB, F changes to NB, and Δx changes to NO. When Δd is PS and Δd / dt exceeds the PB range, P changes to NB, F changes to NB, and Δx changes to PB. At any stage, if the pitch angle exceeds the set mechanical limit angle (45 degrees absolute limit) or exceeds the preset pitch angle control set range, attitude control is determined to be out of control, the propellers are forced to stop, the slider is reset, and only the tail fin is maintained in propulsion. The pitch angle is brought back into the controllable range through the impact of water flow to prevent attitude control loss. Specifically, when θ is NB, P changes to ZO, F changes to NM, and Δx changes to NO. When θ is PB, P changes to ZO, F changes to NM, and Δx changes to PB.

[0104] C. Hardware coordination strategy: Due to the general initial state, generating the pitch angle requires a certain time delay, and the water impact caused by the movement of the tail fin will hinder the generation of the pitch angle. Therefore, the tail fin is set to be activated only at medium and high pitch angles (absolute values). When starting in the fine adjustment area, the tail fin strength decays linearly, that is, when θ is Z0, then F is Z0. In different stages, the slider will execute various time-varying rules. In the coarse adjustment stage, due to the fast speed, the slider movement has weak control over the overall posture. In the fine adjustment stage, the speed is slow, and the slider movement does not need to be too frequent. Therefore, the interval between single slider movements is extended to avoid frequent mechanical wear.

[0105] Before step S4, the method further includes: step S7: constructing a BP neural network, which specifically includes:

[0106] Step S71: Construct a training dataset. The training dataset includes a 6-dimensional historical input feature set and a 5-dimensional historical output feature set. The historical input feature set includes the second estimated variable and the second preliminary control variable. The historical output feature set includes three control variables and fuzzy correction parameters. The three control variables are propeller speed, tail fin strength, and slider displacement. The fuzzy correction parameters include the membership function scaling factor μ and the rule weight correction coefficient ω. The membership function scaling factor μ is the scaling factor ratio of the trapezoidal membership functions corresponding to the two fine-tuning zones in the depth error control subset, and the rule weight correction coefficient ω is the ratio of the adjustable weights of the fuzzy rules in the fine-tuning zone and the stable zone. The data is captured using a sliding window to capture steady-state and dynamic ramp conditions, ensuring coverage of the control-parameter coupling characteristics.

[0107] Step S72: Preprocessing each data in the training data set to obtain a time series continuous feature data set, specifically including:

[0108] Perform initial preprocessing on each data in the training dataset. The specific steps include:

[0109] The pitch angle is encoded with cosine rings to eliminate 360° jumps. The depth error and the rate of change of the depth error are normalized to their maximum values. The control instructions of the three actuators are directly dimensionally normalized. The above data processing is performed at the input layer. The fuzzy parameters (i.e., the membership function scaling factor μ and the rule weight correction coefficient ω) are compressed using inverse hyperbolic tangent. The control output layer retains the physical units of the control instructions.

[0110] The data after initial preprocessing are subjected to sliding average filtering to construct a time series continuous feature data set and eliminate high-frequency noise interference.

[0111] Step S73: Using the time series continuous feature data set, the network weights of the shared layer-decoupled branch structure are learned to obtain a pre-trained BP neural network.

[0112] like Figure 2As shown in the figure, the configuration of the shared layer-decoupled branch structure specifically includes: the input layer contains 6 nodes, the shared hidden layer 1 contains 64 nodes (ReLU+Dropout) to extract common features; the shared hidden layer 2 contains 32 nodes (swish) to fuse common features and decouple them into two branches; the control branch hidden layer contains 8 nodes, and the ELU layer outputs a 3-dimensional control quantity; the fuzzy parameter branch hidden layer contains a 4-node Swish layer; the control output layer contains 3 nodes, and the fuzzy output layer contains a 2-node Sigmoid layer, the Sigmoid outputs μ and applies a scaling Sigmoid of 0.8-1.2 to ω.

[0113] Network Weight Learning: The loss function (MSE) calculates the mean squared error (MSE) between the predicted and true values, taking a weighted sum based on the weighted control instructions (60%) and fuzzy parameters (40%). The Nadam optimizer is used, with the first 50 rounds focusing on control accuracy (loss weight 0.9). Later, the fuzzy parameters are optimized to 0.4. A gradient clipping threshold is used to prevent oscillations in dual-task coupling.

[0114] The present invention further comprises step S8: according to the deviation feedback of the pitch angle and the depth during the actual movement, the BP neural network reversely optimizes the inference rules and the membership function of the fuzzy controller to form a closed-loop self-correction mechanism.

[0115] Existing solutions lack decoupling control of the power mechanism and fail to achieve hardware collaborative optimization, resulting in large path overshoot in complex flow fields. Control parameter optimization relies on preset rules, lacks an online self-correction mechanism, and fails to form a closed-loop feedback loop to reversely optimize the fuzzy controller. This invention addresses this problem by integrating fuzzy adaptive control with neural network optimization.

[0116] like Figure 3 As shown, the present invention also discloses an underwater mechanical fish control system based on neural fuzzy combined control, the system comprising:

[0117] The data acquisition module 301 is used to collect the real-time initial posture data and water pressure data of the mechanical fish based on sensors.

[0118] The first estimated variable generating module 302 is configured to perform data processing and state estimation on the real-time initial posture data and the water pressure data, and output a first estimated variable.

[0119] The first preliminary control variable generating module 303 is configured to input the first estimation variable into the fuzzy inference controller for transformation to generate a first preliminary control variable.

[0120] The final control variable generation module 304 is used to input the first preliminary control variable and the first estimated variable into a pre-trained BP neural network respectively, perform online learning on the network weights through a preset objective function, and generate a final control variable.

[0121] The defuzzification module 305 is configured to defuzzify the final control variable to obtain a defuzzified control instruction.

[0122] The instruction driving module 306 is used to drive the tail fin three-joint servo, the propeller power module and the slider displacement mechanism using the defuzzified control instruction.

[0123] As an optional implementation manner, the first preliminary control variable generating module 303 of the present invention specifically includes:

[0124] The fuzzy control table generating unit is configured to generate a fuzzy control table based on the second estimated variable and the second preliminary control variable.

[0125] A judgment unit is used to judge whether the parameters in the first estimated variable exceed the upper and lower limits; if so, reset the upper and lower limit thresholds; if not, perform fuzzification operations on the first estimated variable according to fuzzy rules, and search the fuzzy control table to generate a first preliminary control variable.

[0126] As an optional implementation manner, the fuzzy control table generating unit of the present invention specifically includes:

[0127] a normalization processing subunit, configured to use the second estimated variable as an input variable and the second preliminary controlled variable as an output variable, and to perform normalization processing on parameters other than the pitch angle θ and the depth error change rate Δd / dt; wherein the second estimated variable is a historical estimated variable, and the historical estimated variables include the pitch angle θ, the depth error Δd, and the depth error change rate Δd / dt; and the second preliminary controlled variable is a historical preliminary controlled variable, and the historical preliminary controlled variables include the adjustment variable P of the rudder vibration frequency and amplitude, the dynamic adjustment variable F of the propeller speed and steering, and the forward and backward displacement decision variable Δx of the slider.

[0128] The fuzzy subset partitioning subunit is used to perform fuzzy subset partitioning on the normalized parameters, the pitch angle θ and the depth error change rate Δd / dt according to the underwater mechanical fish dynamics model, and obtain the fuzzy subset corresponding to each parameter.

[0129] The fuzzy definition table construction subunit is used to construct a fuzzy definition table corresponding to each parameter according to the fuzzy subset corresponding to each parameter.

[0130] The fuzzy control rule generating subunit is used to construct a plurality of fuzzy control rules according to the fuzzy definition table corresponding to each parameter.

[0131] The fuzzy control table generating subunit is used to delete the mergeable and redundant rules in the plurality of fuzzy control rules to generate a fuzzy control table.

[0132] The parts that are the same as the method will not be discussed again here. For details, please refer to the description of the above method.

[0133] Experimental verification

[0134] Experimental operating environment: AMD Ryzen 5 4600U with Radeon Graphics six-core, GPU is AMD Radeon Graphics, memory is 16GB, operating system is Windows 10 Professional Edition (64-bit), and development software is MatlabR2023a.

[0135] To verify the effectiveness of a combined neural network and fuzzy controller control algorithm and a traditional fuzzy PID algorithm in diving under nonlinear, complex water conditions, the comparison algorithms were based on identical experimental conditions and initial parameters. The researchers studied the effects of various dynamic mechanisms and the adjustment of the attitude angle upon reaching the desired depth, all while maintaining the same desired depth. In the initial phase, downward movement was defined as positive, with the initial depth of the submerged surface being 0m. Given a given desired depth, a dive was considered complete when the fish reached the desired depth, converged, and adjusted its attitude.

[0136] The control performance of the traditional fuzzy PID algorithm and the neural fuzzy joint algorithm is analyzed. The simulation experimental results are shown in Table 8 and the control effect diagram is shown in Figure 4 and Figure 5 As shown in the simulation, the neuro-fuzzy joint algorithm achieves faster convergence time, faster control response, and higher efficiency in underwater control performance compared to the traditional fuzzy PID algorithm. It is also sensitive to feedback from underwater nonlinear resistance. Through multimodal feature fusion using a neural network, control-parameter parallel optimization is achieved, resolving the depth / attitude timing lag issue of the traditional fuzzy PID. The multi-level control feedback of the neuro-fuzzy controller ensures the independence of the vertical thrust mechanism and attitude adjustment logic, avoiding multi-objective coupled oscillation. Simulation experimental results demonstrate that the proposed neuro-fuzzy joint algorithm achieves excellent underwater control performance, effectively improving rapid convergence speed, anti-disturbance capability, and thrust mechanism utilization. Through real-time iteration and dynamic parameter correction of the neuro-fuzzy algorithm, robustness issues in multi-degree-of-freedom motion control of robotic fish in complex underwater environments are addressed, significantly improving depth stability, pitch attitude accuracy, and dynamic response efficiency. This provides an effective control method for autonomous ascent and submersion in complex water environments.

[0137] Table 8 Comparison of simulation experiment performance indicators

[0138]

[0139] Compared with the traditional fuzzy PID algorithm, the neuro-fuzzy combined algorithm disclosed in this invention has the following advantages:

[0140] 1. Through simulation experiments, compared with traditional fuzzy PID algorithms, the proposed neural-fuzzy joint algorithm significantly reduces the depth convergence time and significantly improves the convergence speed. Compared with the significant time misalignment of traditional algorithms, this algorithm achieves dual-objective decoupled control of depth and pitch angle, and significantly improves the coordination of attitude adjustment timing. Compared with the smooth curve of the traditional algorithm, it is proved that the coordinated optimization of multiple power mechanisms significantly improves the dynamic response efficiency. The control performance is significantly improved, and the convergence speed and steady-state accuracy are significantly superior.

[0141] 2. In the face of nonlinear water environment disturbances, this algorithm dynamically adjusts fuzzy rule weights through a BP neural network, enabling vertical thrust to quickly converge from initial oscillations to a state of drag-thrust equilibrium. This effectively addresses the traditional algorithm's low sensitivity to sudden hydrodynamic changes. Through neural network reverse optimization, overshoot is reduced, overshoot is predicted in real time, and reverse braking is triggered. This, combined with hardware coordination, effectively prevents attitude loss and improves control stability in complex environments.

[0142] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0143] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only intended to help understand the method and core concept of the present invention. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concept of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A method for controlling underwater mechanical fish based on neuro-fuzzy joint control, characterized in that: The method comprises: Collect the real-time initial posture data and water pressure data of the mechanical fish based on sensors; performing data processing and state estimation processing on the real-time initial posture data and the water pressure data, and outputting a first estimated variable; Inputting the first estimated variable into a fuzzy inference controller for transformation to generate a first preliminary control variable; Inputting the first preliminary control variable and the first estimated variable into a pre-trained BP neural network respectively, performing online learning on the network weights through a preset objective function, and generating a final control variable; Defuzzifying the final control variable to obtain a defuzzified control instruction; The defuzzified control instructions are used to drive the tail fin three-joint servo, the propeller power module and the slider displacement mechanism.

2. The underwater mechanical fish control method based on neuro-fuzzy combined control according to claim 1 is characterized in that: The sensor-based collection of real-time initial posture data and water pressure data of the mechanical fish specifically includes: A six-axis motion sensor and a thin-film pressure sensor placed in the circuit area of the fish's head are used to collect the real-time initial posture data and water pressure data of the mechanical fish. The initial posture data includes acceleration and angular velocity, and the water pressure data is the water pressure information at the location.

3. The underwater mechanical fish control method based on neuro-fuzzy combined control according to claim 1 is characterized in that: Inputting the first estimated variable into the fuzzy inference controller for transformation to generate a first preliminary control variable specifically includes: generating a fuzzy control table based on the second estimated variable and the second preliminary control variable; Determine whether the parameters in the first estimated variable exceed the upper and lower limits; if so, reset the upper and lower limit thresholds; if not, perform fuzzification operations on the first estimated variable according to fuzzy rules, and search the fuzzy control table to generate a first preliminary control variable.

4. The underwater mechanical fish control method based on neuro-fuzzy combined control according to claim 1 is characterized in that: The generating of the fuzzy control table based on the second estimated variable and the second preliminary control variable specifically includes: Using the second estimated variable as an input variable and the second preliminary controlled variable as an output variable, normalizing parameters other than the pitch angle θ and the depth error change rate Δd / dt; The normalized parameters, pitch angle θ and depth error change rate Δd / dt are divided into fuzzy subsets according to the underwater mechanical fish dynamics model to obtain the fuzzy subsets corresponding to each parameter; Constructing a fuzzy definition table corresponding to each parameter according to the fuzzy subset corresponding to each parameter; Constructing a plurality of fuzzy control rules according to the fuzzy definition table corresponding to each parameter; The fuzzy control table is generated by deleting the mergeable and redundant rules among the multiple fuzzy control rules.

5. The underwater mechanical fish control method based on neural fuzzy joint control according to claim 4 is characterized in that: The specific formula of the underwater mechanical fish dynamics model is: Where λ 11 is the vertical additional mass, λ 55 is the additional moment of inertia for pitching, C d is the resistance coefficient, A ref is the reference cross-sectional area, C m is the pitch damping coefficient, w is the vertical navigation speed, is the vertical acceleration, α is the pitch angle, is the angular velocity, is the angular acceleration, I y is the moment of inertia. b -z g is the height difference between the center of buoyancy and the center of gravity, D drag is the vertical resistance, τ prop Pitch torque provided to the propeller, τ s The pitch torque provided to the slider, τ hydro is the resistance torque, τ restore is the static restoring moment, ρ is the water density, s is the displacement of the slider, m is the total mass, m s is the mass of the slider, and L is the length of the fish body.

6. The underwater mechanical fish control method based on neuro-fuzzy combined control according to claim 1 is characterized in that: The method further comprises: constructing a BP neural network, the specific steps of which include: Constructing a training data set; the training data set includes a 6-dimensional historical input feature set and a 5-dimensional historical output feature set; Preprocessing each data in the training data set to obtain a time series continuous feature data set; The time series continuous feature data set is used to perform network weight learning on the shared layer-decoupled branch structure to obtain a pre-trained BP neural network.

7. The underwater mechanical fish control method based on neural fuzzy joint control according to claim 6 is characterized in that: The method further comprises: Feedback is given based on the deviation between the pitch angle and the depth in the first estimated variable, and the BP neural network reversely optimizes the inference rules and membership function of the fuzzy controller to form a closed-loop self-correction mechanism.

8. An underwater mechanical fish control system based on neuro-fuzzy joint control, characterized in that: The system comprises: A data acquisition module is used to collect the real-time initial posture data and water pressure data of the mechanical fish based on sensors; a first estimated variable generating module, configured to perform data processing and state estimation processing on the real-time initial posture data and the water pressure data, and output a first estimated variable; A first preliminary control variable generating module, configured to input the first estimated variable into a fuzzy inference controller for transformation to generate a first preliminary control variable; a final control variable generation module, configured to input the first preliminary control variable and the first estimated variable into a pre-trained BP neural network, perform online learning on the network weights through a preset objective function, and generate a final control variable; a defuzzification module, configured to defuzzify the final control variable to obtain a defuzzified control instruction; The instruction drive module is used to drive the tail fin three-joint servo, the propeller power module and the slider displacement mechanism using the defuzzification control instruction.

9. The underwater mechanical fish control system based on neuro-fuzzy joint control according to claim 8, characterized in that: The first preliminary control variable generating module specifically includes: a fuzzy control table generating unit, configured to generate a fuzzy control table based on the second estimated variable and the second preliminary control variable; A judgment unit is used to judge whether the parameters in the first estimated variable exceed the upper and lower limits; if so, reset the upper and lower limit thresholds; if not, perform fuzzification operations on the first estimated variable according to fuzzy rules, and search the fuzzy control table to generate a first preliminary control variable.

10. The underwater mechanical fish control system based on neuro-fuzzy joint control according to claim 9, characterized in that: The fuzzy control table generating unit specifically includes: a normalization processing subunit, configured to use the second estimated variable as an input variable and the second preliminary controlled variable as an output variable, and perform normalization processing on parameters other than the pitch angle θ and the depth error change rate Δd / dt; The fuzzy subset division subunit is used to perform fuzzy subset division on the normalized parameters, the pitch angle θ, and the depth error change rate Δd / dt according to the underwater mechanical fish dynamics model, and obtain the fuzzy subset corresponding to each parameter; A fuzzy definition table construction subunit is used to construct a fuzzy definition table corresponding to each parameter according to the fuzzy subset corresponding to each parameter; A fuzzy control rule generating subunit, configured to construct a plurality of fuzzy control rules according to the fuzzy definition table corresponding to each parameter; The fuzzy control table generating subunit is used to delete the mergeable and redundant rules in the plurality of fuzzy control rules to generate a fuzzy control table.