A control method and system for a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance
Through the T-S fuzzy sliding mode balance control method, the control model of the unicycle is decoupled and the sliding mode control law is adaptively adjusted, which solves the problem of stability and ease of use of the unicycle in complex environments, improves the dynamic response and anti-interference ability, and realizes achieve higher control accuracy and robustness.
Patent Information
- Application Number
- CN202410369651.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-03-28
AI Technical Summary
Existing unicycle robots lack stability and ease of use in complex environments, making it difficult to achieve complex movements and wide applicability. Moreover, traditional control methods have poor adaptive capabilities and are complicated to maintain.
A dual-inertia balance wheel control method based on T-S fuzzy sliding mode balance is adopted. The motion state data is obtained through the Kalman filter algorithm. The control model is decoupled into three independent sub-units. A sliding mode controller is designed and T-S fuzzy control is added for adaptive adjustment. Switch the item gain to generate a PWM signal to drive the motor to maintain posture balance.
It improves the attitude stability and dynamic response capabilities of the unicycle in complex environments, enhances the anti-interference ability and adaptability, and improves control accuracy and robustness.
Smart Images

Figure CN118348782B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field, and in particular to a control method and system for a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance. Background Art
[0002] With the rapid development of robotics and autonomous navigation systems, the unicycle has shown broad application prospects in urban transportation, entertainment, and logistics due to its unique balance structure and compact design. In particular, its single-wheel design provides excellent flexibility and maneuverability in complex environments in space-constrained situations. Despite this, current research and development activities in this field still face many technical difficulties, which limit the application scope of unicycle robots in practice and the full realization of their performance potential. The unicycle robot has attracted the attention of robotics researchers because of its small size and high flexibility. Its dynamic balance ability enables it to perform transportation and rescue tasks in complex terrains; at the same time, its slender shape and flexible steering function enable it to effectively monitor and explore narrow spaces.
[0003] The research on unicycle robots in China is still in the research stage. The mechanical design of most designed unicycles is based on the control form of flywheel inverted pendulum and balance bar. For example, Southeast University proposed a utility model patent for "a unicycle robot capable of achieving self-balancing" (patent authorization number CN202362474U). The robot can maintain lateral balance and front-to-back balance, but lacks a heading control mechanism, making it difficult to achieve complex movements such as turning. Another example is the invention patent for "a gyroscopic unicycle robot system capable of achieving self-balancing" (patent application number CN105302148A), a unicycle control system based on a gyroscope proposed by the team of Guilin University of Electronic Technology. The gyroscope has the advantages of self-stabilization and is not affected by magnetic fields, and can achieve lateral and front-to-back dual-stable balance control of the vehicle body. However, the complexity of the gyroscope's mechanical structure leads to high maintenance costs. Most of the control methods for unicycles in China use PID controllers to control their motion. For example, the invention patent of "Unicycle Robot System and Control Method Thereof" (Patent Authorization No. CN101590323B) of the Beijing University of Technology team uses the acquired error to perform a predetermined PID calculation and output PWM to achieve lateral and front-to-back dual-stable balance control of the unicycle.
[0004] Existing research often fails to solve the complexity and maintainability problems in the mechanical structure of the unicycle. Most systems require professional knowledge for maintenance and debugging, which to a certain extent hinders the popularization and application expansion of unicycle robot technology. At the same time, although the traditional motion control algorithm is simple to debug, it cannot be dynamically adjusted, resulting in poor system adaptability. Based on the above problems, the existing technical needs point to a control method that can not only meet the stability requirements in complex dynamic environments, but also take into account ease of use and wide applicability. Summary of the invention
[0005] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0006] In view of the above existing problems, the present invention is proposed. Therefore, the present invention provides a dual inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance to solve the problem of not only meeting the stability requirements in complex dynamic environments, but also taking into account ease of use and wide applicability.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0008] In a first aspect, the present invention provides a control method for a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance, comprising:
[0009] Obtain the motion state data of the unicycle, fuse the collected data through the Kalman filter algorithm, and calculate the instantaneous angle and angular velocity of the unicycle;
[0010] Through the decoupling control principle, the control model of the unicycle is simplified into three independent sub-units, including front and rear pitch balance control, left and right roll balance control, and yaw and steering balance control.
[0011] The sliding mode controller is designed, taking the error between the angle of the decoupled subunit and the set target angle as input to make the tracking error approach zero.
[0012] TS fuzzy control is added to fuzzify the sliding mode function and the derivative of the sliding mode function in the sliding mode controller, and the gain of the switching term in the sliding mode control law is adaptively adjusted;
[0013] After processing based on data fusion, sliding mode control and fuzzy operation rules, the three decoupled sub-units generate outputs corresponding to the attitude input errors respectively;
[0014] Perform posture control, convert the output of the three decoupled sub-units to obtain the final motor PWM signal, transmit it to the motor driver, and drive the motor to maintain posture balance
[0015] As a preferred solution of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance described in the present invention, the fusion processing includes:
[0016] In each motion control cycle, the motion controller collects feedback signals and processes them through the Kalman filter algorithm to obtain feedback signals applicable to the control cycle. The processed feedback signals are compared with the preset zero position value to determine the angle, angular velocity and acceleration error signals.
[0017] The actual speed of travel is calculated based on the collected feedback signal, and the actual speed is compared with the target speed signal of the motion controller to determine the speed error signal.
[0018] As a preferred solution of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance of the present invention, wherein: the sub-units simplified include:
[0019] The motion controller decomposes the acquired forward and backward pitch inclination angle and forward and backward pitch angular velocity signals into the forward and backward pitch freedom directions of the robot;
[0020] Decompose the acquired left and right rolling inclination angles and left and right rolling angular velocity signals into the left and right rolling freedom directions of the robot;
[0021] The acquired yaw inclination angle and yaw angular velocity signals are decomposed into the yaw freedom direction of the robot.
[0022] As a preferred solution of the dual-inertia balancing wheel unicycle control method based on TS fuzzy sliding mode balance described in the present invention, the sliding mode controller design includes:
[0023] The state equation of the unicycle dynamics is expressed as:
[0024]
[0025] Among them, A and B represent the coefficients of the unicycle state equation, u represents the torque input of the unicycle motor, f(t) represents the system model error and external interference, and the upper bound is λ f , that is, |f(t)|≤λ f , X represents the matrix set of state variables;
[0026] Define the sliding mode function, expressed as:
[0027] s=B T P x
[0028] Where P∈R 4×4 is a positive definite matrix, x represents the error between the state variable and the set target value;
[0029] The control input includes a sliding mode section and an arrival section. The sliding mode section includes: when the state variable reaches the sliding mode surface, And f(t) = 0, so that x will tend to 0, expressed as:
[0030]
[0031] in, is the time derivative of the sliding mode function s, indicating the rate of change of the sliding mode function over time, B T represents the transpose of matrix B;
[0032] The arrival segment includes when |f(t)|≤λ f ,and When the system reaches the sliding mode stable surface, the control law is designed so that the fuzzy control enters the sliding mode surface. and s=0, expressed as:
[0033] u=u eq +u n
[0034] Among them, u eq is equivalent control, u n For switching control, the exponential reaching law of sliding mode control is: Available
[0035] u eq =-(B T PB) -1 B T PAx(t)
[0036] u n =-(B T PB) -1 [|B T PB|λ f +ε·sgn(s)+ks]
[0037] Where k is the switching gain in the control law, x(t) represents the error between the state variable of the system and the set target value at time t, ε represents the design parameter, and sgn(s) is the sign function.
[0038] As a preferred solution of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance described in the present invention, a Lyapunov function is constructed, which is expressed as:
[0039] V = xT Px
[0040] Derivative the Lyapunov function, when the derivative of the Lyapunov function That is, x→0, and at the same time solve the P matrix, which is expressed as:
[0041]
[0042] AX+XA T <BL+LB T
[0043] in, K1 represents a gain matrix;
[0044] Solve the linear matrix inequality and obtain the P matrix to make the tracking error approach zero.
[0045] As a preferred solution of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance described in the present invention, the TS fuzzy control includes:
[0046] The sliding mode function s and the first-order derivative of the sliding mode function in the sliding mode controller As the input of fuzzy control, the switching term gain k of the control law is used as the output variable;
[0047] Among them, the sliding mode function s and the first-order derivative of the sliding mode function are designed The corresponding fuzzy domain is on [-3, 3], which reduces the number of fuzzy rules and simplifies the controller. The fuzzy subset is expressed as:
[0048] e={N,Z,G}
[0049] ec={N,Z,G}
[0050] Among them, e and ec correspond to the sliding mode function s and the first-order derivative of the sliding mode function respectively. Fuzzy subset, N represents a negative number, Z represents zero, and G represents a positive number;
[0051] Using triangular membership functions at both ends of the domain and trapezoidal functions at positions approaching zero;
[0052] Let R i Represents the i-th rule of TS fuzzy control, and constructs fuzzy rules, which can be expressed as:
[0053] R1: If e is N and ec is N then u=-2.5*(e*ec)-0.5
[0054] R2:If e is N and ec is G then u=0.9*(e*ec)-0.2
[0055] R3: If e is G and ec is N then u=0.9*(e*ec)-0.2
[0056] R4: If e is Z and ec is Z then u=0.08*(e*ec)
[0057] R5:If e is Z and ec is G then u=0.16*(e*ec)
[0058] R6: If e is Z and ec is N then u=0.16*(e*ec)
[0059] R7: If e is G and ec is Z then u=0.16*(e*ec)
[0060] R8: If e is N and ec is Z then u=0.16*(e*ec)
[0061] R9: If e is G and ec is G then u=2.5*(e*ec)+0.5
[0062] The output of the TS fuzzy control is expressed as:
[0063]
[0064] Among them, ω i is the applicability of the i-th fuzzy rule, expressed as:
[0065]
[0066] Among them, y (p-1) (t),u (q-1) (t) represents the antecedent, Represents the membership function value of the two linguistic variables in the antecedent of the i-th fuzzy rule.
[0067] As a preferred solution of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance of the present invention, generating the output comprises:
[0068] The attitude angles decomposed by the subunits, including pitch angle, roll angle and yaw angle, are used as attitude feedback values and compared with the set angles to obtain an error value;
[0069] Based on the sliding mode control and TS fuzzy control, the switching item gain after TS fuzzy processing is obtained, and the final output of each subunit is obtained by calculation.
[0070] In a second aspect, the present invention provides a dual-inertia balance wheel unicycle control system based on TS fuzzy sliding mode balance, comprising:
[0071] The acquisition and processing module is used to obtain the motion state data of the unicycle, fuse the collected data through the Kalman filter algorithm, and calculate the instantaneous angle and angular velocity of the unicycle;
[0072] The simplified module is used to simplify the control model of the unicycle into three independent sub-units through the decoupling control principle, including front and rear pitch balance control, left and right roll balance control and yaw and steering balance control;
[0073] The sliding mode controller module is used to design a sliding mode controller, which takes the error between the angle of the decoupled subunit and the set target angle as input to make the tracking error approach zero;
[0074] A fuzzy control module is used to add TS fuzzy control, perform fuzzy processing on the sliding mode function and the sliding mode function derivative in the sliding mode controller, and perform adaptive adjustment on the gain of the switching term in the sliding mode control law;
[0075] The output module is used to generate outputs corresponding to the attitude input errors of the three decoupled sub-units respectively after processing based on data fusion, sliding mode control and fuzzy operation rules;
[0076] The attitude control module is used for attitude control. It converts the output of the three decoupled sub-units into the final motor PWM signal, transmits it to the motor driver, and drives the motor to maintain attitude balance.
[0077] In a third aspect, the present invention provides an electronic device, comprising:
[0078] Memory and processor;
[0079] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance are implemented.
[0080] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance.
[0081] Compared with the prior art, the present invention has the following beneficial effects: the present invention can effectively decouple the control system by adopting the TS fuzzy sliding mode balance control method, so that the unicycle can maintain its posture more stably in terms of front and rear pitch balance, left and right roll balance and yaw steering balance, and the posture stability is improved; by fuzzifying the sliding mode function and the sliding mode function derivative in the sliding mode controller, and adaptively adjusting the gain of the switching term in the sliding mode control law, the dynamic responsiveness of the system to posture changes can be improved, so that the system can respond to external interference or command changes more flexibly and quickly; the design of the sliding mode controller enables the system to have strong anti-interference ability, and can effectively resist the influence of external interference on the system posture, thereby improving the stability and reliability of the system; through fuzzy operation rule processing and adaptive adjustment, the system can automatically adjust the control parameters according to the actual operating status and environmental conditions, so that the control system has stronger adaptability and robustness, and can improve the accuracy and precision of the data, further improve the control accuracy, fast response speed, small steady-state error, and good robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing 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 creative labor. Among them:
[0083] Figure 1 It is a schematic diagram of the overall process of a dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance according to an embodiment of the present invention;
[0084] Figure 2 This is a schematic diagram of the overall structure of a unicycle device with dual inertia balance wheels according to an embodiment of the present invention;
[0085] Figure 3 It is a schematic diagram of the front view of a unicycle device with dual inertia balance wheels according to an embodiment of the present invention;
[0086] Figure 4 A schematic top view of the structure of a unicycle device with dual inertia balance wheels according to an embodiment of the present invention;
[0087] Figure 5 This is a schematic diagram of electrical connection control of a unicycle device with dual inertia balance wheels according to an embodiment of the present invention;
[0088] Figure 6It is a flow chart of a control method of a unicycle with dual inertia balance wheels based on TS fuzzy sliding mode balance applied to a unicycle device with dual inertia balance wheels according to an embodiment of the present invention;
[0089] Figure 7 It is a TS fuzzy control input membership function diagram of a dual inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance according to an embodiment of the present invention;
[0090] Figure 8 This is a comparison diagram of the balancing performance of two methods of a dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balancing according to an embodiment of the present invention. DETAILED DESCRIPTION
[0091] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0092] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0093] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0094] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0095] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0096] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0097] Example 1
[0098] Reference Figure 1 , is an embodiment of the present invention, and provides a control method for a dual-inertia balance wheel unicycle based on TS (Takagi-Sugeno Fuzzy Sliding Mode Balance Control TS, fuzzy sliding mode balance control), such as Figure 1 ,include:
[0099] S101, obtaining the motion state data of the unicycle, fusing the collected data through the Kalman filter algorithm, and calculating the instantaneous angle and angular velocity of the unicycle.
[0100] Specifically, it mainly includes the acquisition and processing of posture information and motor speed information. Preferably, in each motion control cycle, the motion controller collects feedback signals and processes them through the Kalman filter algorithm to obtain feedback signals within the applicable control cycle, compares the processed feedback signals with the preset zero position value, determines the angle, angular velocity and acceleration error signals, and provides key information for the subsequent control strategy formulation;
[0101] According to the collected feedback signal, the actual speed of travel is calculated, and the actual speed is compared with the target speed signal of the motion controller to determine the speed error signal. The feedback signal is obtained by sampling the output signal multiple times to obtain a feedback signal suitable for the control cycle.
[0102] S102, through the decoupling control principle, the control model of the unicycle is simplified into three independent sub-units, including front and rear pitch balance control, left and right roll balance control and yaw and steering balance control.
[0103] It should be noted that this step is based on the fact that the pitch angle, roll angle and yaw angle of the unicycle are independent of each other, so that the system can be decoupled into three independent sub-units, in order to facilitate the design of the controller.
[0104] Furthermore, the motion controller decomposes the acquired front and rear pitch inclination angle and front and rear pitch angular velocity signals into the front and rear pitch freedom directions of the robot;
[0105] Decompose the acquired left and right rolling inclination angles and left and right rolling angular velocity signals into the left and right rolling freedom directions of the robot;
[0106] The acquired yaw inclination angle and yaw angular velocity signals are decomposed into the yaw freedom direction of the robot.
[0107] S103, designing a sliding mode controller, taking the error value between the angle of the decoupled subunit and the set target angle as input, so that the tracking error tends to zero.
[0108] Furthermore, considering the uncertainty of the control system and external disturbances, the state equation of the unicycle dynamics is expressed as:
[0109]
[0110] Among them, A and B represent the coefficients of the unicycle state equation, u represents the torque input of the unicycle motor, f(t) represents the system model error and external interference, and the upper bound is λ f , that is, |f(t)|≤λ f , X represents the matrix set of state variables;
[0111] In order to achieve stable control of the system, the sliding mode function is defined as:
[0112] s=B T P x
[0113] Where P∈R 4×4 is a positive definite matrix, x represents the error between the state variable and the set target value;
[0114] It should be noted that the above error in the TS FSBC system refers to the error between the pitch angle, roll angle, and yaw angle after the system is decoupled and the set target value. The sliding surface is designed to make the state error x approach zero. Selecting a suitable P matrix can ensure that s = 0. This makes the value of x approach 0.
[0115] The control input is divided into two stages, including the sliding mode stage and the arrival stage;
[0116] The sliding stage includes when the state variable reaches the sliding surface. And f(t) = 0, so that x will tend to 0, expressed as:
[0117]
[0118] in, is the time derivative of the sliding mode function s, indicating the rate of change of the sliding mode function over time, B T represents the transpose of matrix B;
[0119] The arrival segment includes when |f(t)|≤λ f ,and When the system reaches the sliding mode stable surface, the control law is designed so that the fuzzy control enters the sliding mode surface. and s=0, expressed as:
[0120] u=u eq +u n
[0121] Among them, u eq is equivalent control, u n For switching control, the exponential reaching law of sliding mode control is: Available
[0122] u eq =-(B T PB) -1 B T PAx(t)
[0123] u n =-(B T PB) -1 [|B T PB|λ f +εsgns+ks]
[0124] Where k is the switching term gain in the control law, x(t) represents the error between the state variable of the system and the set target value at time t, ε represents the design parameter that determines the strength of the switching term in the control law, and sgn(s) is the sign function that returns +1 or -1 depending on the positive or negative value of the sliding mode variable s.
[0125] It should be noted that when the input follows u=u eq +u n When , the system is forced to enter the sliding surface, thus achieving system stability.
[0126] Furthermore, the Lyapunov function is constructed as:
[0127] V = x T P x
[0128] Derivative of the Lyapunov function, when the derivative of the Lyapunov function That is, x→0, solve the P matrix at the same time, and reconstruct the input form:
[0129]
[0130] Among them, u(t) represents the system input function, v(t) is an auxiliary variable of the system input function, which is used to simplify the expression of the control law, and K1 represents a gain matrix, which is used to adjust the influence of x on u(t);
[0131] Substitute the above formula into the system state equation and change it to:
[0132]
[0133] in,
[0134] After taking the derivative of the Lyapunov function, we get:
[0135]
[0136] Substituting the above state equation into the derived formula, we get:
[0137]
[0138] Utilize T =x T PB=0, simplify the above expression and get:
[0139]
[0140] To ensure So that x→0, we need the following conditions:
[0141]
[0142] exist Multiply the left and right sides by the matrix P-1 to get:
[0143]
[0144] Let X = P-1, L = KX, and
[0145] AX+XA T <BL+LB T
[0146] By solving the above LMI linear matrix inequality, the P matrix is obtained to ensure that the tracking error tends to zero, thus completing the design of the sliding mode controller in the TS FSBC system.
[0147] S104, adding TS fuzzy control, fuzzifying the sliding mode function and the sliding mode function derivative in the sliding mode controller, and adaptively adjusting the gain of the switching term in the sliding mode control law, such as Figure 7 As shown in the figure, it is the input membership function of TS fuzzy control. The upper part is the membership function of the sliding mode function s, and the lower part is the first-order derivative of the sliding mode function. The membership function of .
[0148] It should be noted that the switching item gain k value in the control law of the sliding mode controller designed in step S103 is generally fixed, and the speed at which the sliding mode function slides into the sliding mode surface cannot be adjusted, which will be accompanied by chattering. In order to weaken the chattering, TS fuzzy control is introduced to adjust the k value.
[0149] Furthermore, the sliding mode function s and the first-order derivative of the sliding mode function in the sliding mode controller As the input of fuzzy control, the switching term gain k of the control law is used as the output variable;
[0150] Among them, the design sliding mode function s and the first-order derivative of the sliding mode function The corresponding fuzzy domain is on [-3, 3], which reduces the number of fuzzy rules and simplifies the controller. The fuzzy subset is expressed as:
[0151] e={N,Z,G}
[0152] ec={N,Z,G}
[0153] Among them, e and ec correspond to the sliding mode function s and the first-order derivative of the sliding mode function respectively. Fuzzy subset, N represents a negative number, Z represents zero, and G represents a positive number;
[0154] It should be noted that when the system reaches the sliding surface, it will remain on the sliding surface. At this time, a membership function with a gentle slope or even zero slope should be used. When , we can reduce the k value; when We can increase the value of k; between s and When both are negative and large values, the system output will have a large negative change, making Rapidly reduce, which can effectively weaken the vibration.
[0155] Therefore, a triangular membership function with higher sensitivity is used at both ends of the domain, and a trapezoidal function is used at the position close to zero, so as to obtain a better control effect.
[0156] Let Ri represents the i-th rule of TS fuzzy control, which is expressed as:
[0157]
[0158] in, represents the membership function of the first linguistic variable, B m i represents the membership function of the second linguistic variable, y i (n) (t) is the system output, a n i , b m i Indicates that the two language variables belong to A n i , B m i The membership function value of
[0159] Construct fuzzy rules, expressed as:
[0160] R1: If e is N and ec is N then u=-2.5*(e*ec)-0.5
[0161] R2:If e is N and ec is G then u=0.9*(e*ec)-0.2
[0162] R3: If e is G and ec is N then u=0.9*(e*ec)-0.2
[0163] R4: If e is Z and ec is Z then u=0.08*(e*ec)
[0164] R5: If e is Z and ec isG then u=0.16*(e*ec)
[0165] R6: If e is Z and ec is N then u=0.16*(e*ec)
[0166] R7: If e is G and ec is Z then u=0.16*(e*ec)
[0167] R8: If e is N and ec is Z then u=0.16*(e*ec)
[0168] R9: If e is G and ec is G then u=2.5*(e*ec)+0.5
[0169] The output of the TS fuzzy controller system designed in the TS FSBC system is obtained using the weighted average method, where the weight of each rule output is the applicability of the rule.
[0170] The output of TS fuzzy control is expressed as:
[0171]
[0172] Among them, ω i is the applicability of the i-th fuzzy rule, expressed as:
[0173]
[0174] Among them, y (p-1) (t),u (q-1) (t) represents the antecedent, Represents the membership function value of the two linguistic variables in the antecedent of the i-th fuzzy rule.
[0175] S105, after processing based on data fusion, sliding mode control and fuzzy operation rules, the three decoupled sub-units respectively generate output quantities corresponding to the posture input errors, that is, output control quantities of the decoupled sub-units.
[0176] In step S102, the TS (FSBC) system uses the decoupling control principle to simplify the complex control model of the unicycle into three independent sub-units, and compares the attitude angles decomposed by the sub-units, including the pitch angle, the roll angle, and the yaw angle, as attitude feedback values with the set angles to obtain an error value;
[0177] Through the sliding mode control of step S103 and the TS fuzzy control of step S104, the switching item gain after TS fuzzy processing is obtained, and the final output of each sub-unit is obtained by calculation.
[0178] S106, performing posture control, converting the outputs of the three decoupled sub-units to obtain a final PWM signal of the motor, transmitting the signal to the motor driver, and driving the motor to maintain posture balance.
[0179] Further, the outputs of the three decoupled subunits are converted to obtain the PWM signal and steering signal of the final motor, wherein the outputs of the front and rear pitch balance control subunits are converted into a 0-100% PWM duty cycle and a steering signal through a conversion function and a limiting function to maintain the balance of the front and rear pitch degrees of freedom; and in the motor control program of the outputs of the left and right roll balance control and steering yaw balance control subunits, first, the positive and negative rotation polarities of the motors in the units are determined, and the direction in which the motors rotate to the same side of the car model is defined as positive polarity, and the direction in which the motors rotate to the other side is defined as negative polarity. When the car model moves alone on the left and right roll degrees of freedom, the rotation polarities of the two motors should be positive or negative at the same time, and when the car model turns on the steering yaw degree of freedom, the rotation polarities of the two motors should be one positive and the other negative. Then, the outputs of the left and right roll balance control and steering yaw balance control subunits are subjected to addition and subtraction operations, conversion functions and limiting functions according to the polarities to obtain the corresponding PWM duty cycles of the front and rear two drivers of the car model, which are used to maintain the left and right roll balance and steering yaw balance.
[0180] It should be noted that the present invention can effectively decouple the control system by adopting the TS fuzzy sliding mode balance control method, so that the wheelbarrow can maintain its posture more stably in terms of front and rear pitch balance, left and right roll balance, and yaw steering balance, and the posture stability is improved; by fuzzifying the sliding mode function and the sliding mode function derivative in the sliding mode controller, and adaptively adjusting the gain of the switching term in the sliding mode control law, the dynamic responsiveness of the system to posture changes can be improved, so that the system can respond to external interference or command changes more flexibly and quickly; the design of the sliding mode controller enables the system to have strong anti-interference ability, and can effectively resist the influence of external interference on the system posture, thereby improving the stability and reliability of the system; through fuzzy operation rule processing and adaptive adjustment, the system can automatically adjust the control parameters according to the actual operating status and environmental conditions, so that the control system has stronger adaptability and robustness, and can improve the accuracy and precision of the data, further improve the control accuracy, fast response speed, small steady-state error, and good robustness.
[0181] The above is a schematic scheme of a dual-inertia balancing wheel unicycle control method based on TS fuzzy sliding mode balance in this embodiment. It should be noted that the technical scheme of the dual-inertia balancing wheel unicycle control system based on TS fuzzy sliding mode balance and the technical scheme of the dual-inertia balancing wheel unicycle control method based on TS fuzzy sliding mode balance belong to the same concept. The details of the technical scheme of the dual-inertia balancing wheel unicycle control system based on TS fuzzy sliding mode balance in this embodiment that are not described in detail can all be referred to the description of the technical scheme of the dual-inertia balancing wheel unicycle control method based on TS fuzzy sliding mode balance.
[0182] The dual-inertia balance wheel unicycle control system based on TS fuzzy sliding mode balance in this embodiment includes:
[0183] The acquisition and processing module is used to obtain the motion state data of the unicycle, fuse the collected data through the Kalman filter algorithm, and calculate the instantaneous angle and angular velocity of the unicycle;
[0184] The simplified module is used to simplify the control model of the unicycle into three independent sub-units through the decoupling control principle, including front and rear pitch balance control, left and right roll balance control and yaw and steering balance control;
[0185] The sliding mode controller module is used to design a sliding mode controller, which takes the error between the angle of the decoupled subunit and the set target angle as input to make the tracking error approach zero;
[0186] A fuzzy control module is used to add TS fuzzy control, perform fuzzy processing on the sliding mode function and the sliding mode function derivative in the sliding mode controller, and perform adaptive adjustment on the gain of the switching term in the sliding mode control law;
[0187] The output module is used to generate outputs corresponding to the attitude input errors of the three decoupled sub-units respectively after processing based on data fusion, sliding mode control and fuzzy operation rules;
[0188] The attitude control module is used for attitude control. It converts the output of the three decoupled sub-units into the final motor PWM signal, transmits it to the motor driver, and drives the motor to maintain attitude balance.
[0189] This embodiment further provides an electronic device, which is applicable to the control of a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance, and includes:
[0190] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the control method of the dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance as proposed in the above embodiment.
[0191] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the control method of a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance proposed in the above embodiment is implemented.
[0192] The storage medium proposed in this embodiment and the control method for a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0193] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccessMemory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.
[0194] Example 2
[0195] Reference Figure 2-6 , which is an embodiment of the present invention, provides a unicycle device with dual inertia balance wheels, including: a support frame body 200, a front and rear balance component 300 arranged on the support frame body 200, a left and right balance steering component 400 arranged on both sides of the support frame body 200, and a control circuit component 500 arranged at the upper end of the support frame body 200.
[0196] In this embodiment, the support frame body 200 includes a main support frame 201, an upper extension bracket 202 arranged at the upper end of the main support frame 201, and an inertia wheel fixing bracket 203 arranged on both sides of the main support frame 201. An extension column 204 and a circuit board fixing plate 205 are fixedly connected to the upper end of the main support frame 201. Preferably, the main support frame 201 is made of high-strength aluminum alloy material to provide a rigid skeleton for fixing all other mechanical components, including but not limited to the upper extension bracket 202, the inertia wheel fixing bracket 203 and the extension column 204. The upper extension bracket 202 is an extension structure composed of aluminum alloy. The circuit board fixing plate 205 is a structure with a shockproof function, which is used to stably fix the circuit board. Four extension columns 204 are provided, which are vertically fixedly connected to the main support plate 201.
[0197] The front and rear balancing assembly 300 includes a traveling component 301 arranged on the main support frame 201, a traveling wheel servo driver 302 and a first encoder 303 arranged on the traveling component 301, wherein the traveling component 301 includes a traveling wheel 304 movably arranged at the lower end of the main support frame 201, a traveling wheel belt transmission wheel 304a is arranged on one side of the traveling wheel 304, a traveling wheel motor transmission wheel 305 is arranged at a position vertically above the traveling wheel belt transmission wheel 304a on the upper extension bracket 202, a transmission belt 305a is arranged between the traveling wheel motor transmission wheel 305 and the traveling wheel belt transmission wheel 304a, and the traveling wheel motor transmission wheel 305 is arranged on the upper extension bracket 202. A traveling wheel motor gear 305b is arranged on one side of the transmission wheel 305 of the machine near the upper extension bracket 202, an encoder gear 303a meshing with the traveling wheel motor gear 305b is arranged on the upper end of the traveling wheel motor gear 305b, the first encoder 303 is connected to the encoder gear 303a, a traveling wheel motor 305c is arranged on one end of the traveling wheel motor transmission wheel 305 near the traveling wheel motor gear 305b, the upper extension bracket 202 is used to install the traveling wheel motor 305c and the first encoder 303, the traveling wheel motor 305c is connected to the traveling wheel servo driver 302, and the front and rear balancing assembly 300 is used for the unicycle to maintain the front and rear pitch balance.
[0198] In this embodiment, the left and right balancing steering assembly 400 includes an inertial component 401 arranged on both sides of the main support frame 201, an inertial wheel servo driver 402 and a second encoder 403 arranged on the inertial component 401, wherein the inertial component 401 includes an inertial wheel 404 arranged on one side of the inertial wheel fixing bracket 203, an inertial wheel motor 405 arranged on the other side of the inertial wheel fixing bracket 203 and rotatably connected to the inertial wheel 404, for driving the inertial wheel 404, the inertial wheel motor 405 is connected to the inertial wheel servo driver 402, the second encoder 403 is arranged on the other side of the inertial wheel servo driver 402, the inertial wheel fixing bracket 203 is an extended structure made of aluminum alloy, for installing the inertial wheel motor 405 and the inertial wheel 404, and the left and right balancing steering assembly 400 is provided with two groups, which are respectively located on both sides of the main support frame 201, and are used for the unicycle to maintain left and right rolling balance and steering control.
[0199] The control circuit assembly 500 includes a motion controller 501, a gyroscope 502, a wireless receiving module 503, a servo drive controller and a power supply arranged on the upper end of the circuit board fixing plate 205. The circuit board fixing plate 205 can ensure the accuracy of the gyroscope 502 and the stability of the signal. Among them, the wireless receiving module 503 is of model CH9141, which provides a wireless communication interface for the remote control and debugging of the unicycle, receives external command signals, and feeds back real-time posture data to the control host computer. The gyroscope 502 is a high-precision six-axis gyroscope 502 for real-time feedback of the posture data of the unicycle, supports the motion controller 501 to perform accurate dynamic closed-loop balance control, and has a model of ICM20602. As the control core, the motion controller 501 is responsible for processing the data input from the encoder and the gyroscope 502, executing the preset motion control program, and generating the corresponding servo drive command to accurately control the posture and balance of the unicycle. The model is Infineon single-chip microcomputer TC264, and there are 3 servo drive controllers.
[0200] In this embodiment, preferably, there are 3 encoders in total, and the model is 1024-line orthogonal mini encoder, which are respectively installed on the back of the two inertial wheel motors 405 and the upper extension bracket 202, and the gear meshing transmission is performed through the traveling wheel motor 305c gear 305b and the encoder gear 303a, and the function is to feed back the motor speed to the motion controller 501 for closed-loop control. The axial design of the inertial wheel 404 is to maintain the same plane as the traveling wheel 304 while fixing a downward 90° angle. This unique layout can produce a stable gyro effect on two orthogonal planes, assisting the robot to maintain or restore balance when rolling left and right, and achieve precise steering through differential rotation. The inertial wheel 404 adopts a modular detachable design, consisting of multiple aluminum alloy discs, allowing the operator to flexibly adjust the number of inertial wheel discs according to specific application requirements while maintaining the best balance between maneuverability and stability.
[0201] like Figure 5 As shown, the electrical connection relationship of the device is summarized as follows: the motion controller 501 receives the sensor data of the first encoder 303, the second encoder 403 and the gyroscope 502, and communicates with the wireless receiving module 503 in a two-way manner. The motion controller 501 obtains the control logic output signal to the three servo controllers, and the corresponding servo controllers drive the corresponding motors to achieve the predetermined motion. Among them, the three servo drivers are two inertia wheel servo drivers 402 and one traveling wheel servo driver 302, which respectively control two inertia wheel motors 405 and one traveling wheel motor 305c.
[0202] like Figure 6As shown in FIG. 1 , the TS (FSBC) control method is divided into 6 steps. Step S101, obtains the measurement data of two encoders, accelerometer and gyroscope 502, collects the motion state data of the unicycle in real time, applies Kalman filter algorithm to fuse the collected data, accurately calculates the instantaneous angle and angular velocity of the unicycle, and provides a reliable data basis for the TS (FSBC) system; Step S102, adopts the decoupling control principle, simplifies the complex control model of the unicycle into three independent sub-units: front and rear pitch balance control, left and right roll balance control and yaw steering balance control; Step S103, designs a sliding mode controller. Aiming at the nonlinear system of the unicycle, TS (FSBC) introduces A sliding mode controller based on the exponential approach law is introduced, and the input is the error value between the angle of the decoupled subunit and the set target angle; Step S104, TS fuzzy processing, in view of the possible shaking phenomenon of the unicycle, TS (FSBC) introduces TS fuzzy control, and fuzzifies the sliding function s and the sliding function derivative ds in the sliding mode controller, so as to adaptively adjust the gain of the switching term in the sliding mode control law and suppress the shaking in the sliding mode control; Step S105, output TS (FSBC) decoupled subunit control quantity: through data fusion, sliding mode control, fuzzy operation, and rule processing, the three decoupled subunits respectively generate output quantities corresponding to the posture input error. Step S106, posture control: in the set timer interrupt loop, the decoupled subunit converts the output quantities of the three decoupled subunits through the written motor output control program to obtain the PWM signals of the final three servo motors, and transmits them to the motor driver, and finally drives the motor to maintain posture balance.
[0203] Specifically, in step S101 of the control method, the motion controller 501 collects the feedback signal of the gyroscope 502, and after processing it with the Kalman filter algorithm, obtains a feedback signal suitable for the control cycle, and compares it with the preset zero position value to determine the angle, angular velocity and acceleration error signal, providing key information for the subsequent control strategy formulation. Then, the motion controller 501 collects the feedback signals of the first encoder 303 and the second encoder 403, calculates the actual speed of the inertia wheel motor 405 and the travel wheel motor 305c, and compares it with the target speed signal provided by the motion controller 501 to determine the speed error signal. The feedback signal is obtained by sampling the output signals of the gyroscope 502, the first encoder 303 and the second encoder 403 for multiple times to obtain a feedback signal suitable for the control cycle; in step S102, the obtained front and rear pitch inclination angle and front and rear pitch angular velocity signals are obtained by the motion controller 501 from the gyroscope 502; in step S106, it is the output control of the motor, which means that the output of the three sub-units after decoupling is converted to obtain the PWM signal and steering signal of the final three servo motors. The output of the front and rear pitch balance control subunit is converted into a 0-100% PWM duty cycle and a steering signal through a conversion function and a limiting function to act on the traveling wheel servo driver 302, and finally drives the traveling wheel motor 305c to rotate to maintain the balance of the front and rear pitch degrees of freedom; and in the motor control program of the output of the left and right roll balance control and steering yaw balance control subunits, firstly, the positive and negative rotation polarity of the inertial wheel motor 405 is determined, and the direction in which the two inertial wheel motors 405 rotate to the same side of the car model is defined as positive polarity, and the direction in which they rotate to the other side is defined as negative polarity. When the car model moves alone in the left and right rolling freedom, the rotation polarities of the two inertial wheel motors 405 should be positive or negative at the same time, and when the car model turns in the steering yaw freedom, the rotation polarities of the two inertial wheel motors 405 should be one positive and the other negative. Then, the outputs of the left and right rolling balance control and steering yaw balance control sub-units are added and subtracted according to the polarity, and the conversion function and the limiting function are performed to obtain the corresponding PWM duty cycle of the front and rear inertial wheel servo drivers 402 of the car model, and the two inertial wheels 404 are driven to maintain the left and right rolling balance and the steering yaw balance.
[0204] Example 3
[0205] Reference Figure 8 , which is an embodiment of the present invention, provides a control method for a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance. In order to verify its beneficial effects, comparison results of two schemes are provided.
[0206] The control method of the unicycle with dual inertia balance wheels of the present invention is adopted, and the main controller adopts the Infineon TC264 single chip microcomputer, and runs the TS (FSBC) control system. The unicycle communicates with the computer host computer through the wireless serial port module, and the attitude and inclination data of the unicycle are uploaded at a baud rate of 115200bps.
[0207] The balancing program of the unicycle TS (FSBC) control system is set to maintain upright balance. In order to compare with the ordinary PID control, we run two control methods on the vehicle model respectively. For the convenience of comparison, both control systems analyze the X-axis data.
[0208] from Figure 8 It can be seen from the X-axis data of the two control methods that the wheelbarrow has an initial inclination angle when the power is turned on. The TS (FSBC) control method quickly stabilizes the vehicle after about 3 seconds, and then the inclination angle of the vehicle does not fluctuate greatly and stabilizes at around 0 degrees. The PID control method stabilizes the vehicle after about 5 seconds, and then there are still small fluctuations, which verifies the effectiveness of the TS (FSBC) control method designed in this paper.
[0209] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A control method for a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance. It is characterized in that include: Obtain the motion state data of the unicycle, fuse the collected data through the Kalman filter algorithm, and calculate the instantaneous angle and angular velocity of the unicycle; Through the decoupling control principle, the control model of the unicycle is simplified into three independent sub-units, including front and rear pitch balance control, left and right roll balance control, and yaw and steering balance control. The sliding mode controller is designed, taking the error between the angle of the decoupled subunit and the set target angle as input to make the tracking error approach zero. Wherein, the sliding mode controller design includes: The state equation of the unicycle dynamics is expressed as: Among them, A and B represent the coefficients of the unicycle state equation, u represents the torque input of the unicycle motor, f(t) represents the system model error and external interference, and the upper bound is λ f , that is, |f(t)|≤λ f , X represents the matrix set of state variables; Define the sliding mode function, expressed as: s=B T Px Where P∈R 4×4 is a positive definite matrix, x represents the error between the state variable and the set target value; The control input includes a sliding mode section and an arrival section. The sliding mode section includes: when the state variable reaches the sliding mode surface, And f(t) = 0, x tends to 0, expressed as: in, is the time derivative of the sliding mode function s, indicating the rate of change of the sliding mode function over time, B T represents the transpose of matrix B; The arrival segment includes when |f(t)|≤λ f ,and When the system reaches the sliding mode stable surface, the control law is designed so that the fuzzy control enters the sliding mode surface. and s=0, expressed as: in=in eq +in n Among them, u eq is equivalent control, u n For switching control, the exponential reaching law of sliding mode control is: Available u eq =-(B T PB)- 1 B T PAx(t) you n =-(B T PB) -1 [|B T PB|λ f +ε·sgn(s)+ks] Where k is the switching gain of the control law, x(t) represents the error between the state variable of the system and the set target value at time t, ε represents the design parameter, and sgn(s) is the sign function; TS fuzzy control is added to fuzzify the sliding mode function and the derivative of the sliding mode function in the sliding mode controller, and the gain of the switching term in the sliding mode control law is adaptively adjusted; Wherein, the TS fuzzy control includes: The sliding mode function s and the first-order derivative of the sliding mode function in the sliding mode controller As the input of fuzzy control, the switching term gain k of the control law is used as the output variable; Among them, the sliding mode function s and the first-order derivative of the sliding mode function are designed The corresponding fuzzy domain is on [-3, 3], which reduces the number of fuzzy rules and simplifies the controller. The fuzzy subset is expressed as: e={N,Z,G} ec={N,Z,G} Among them, e and ec correspond to the sliding mode function s and the first-order derivative of the sliding mode function respectively. Fuzzy subset, N represents a negative number, Z represents zero, and G represents a positive number; Using triangular membership functions at both ends of the domain and trapezoidal functions at positions approaching zero; Let R i Represents the i-th rule of TS fuzzy control, and constructs fuzzy rules, which are expressed as: R 1 :If e is N and ec is N then u=-2.5*(e*ec)-0.5 R 2 :If e is N and ec is G then u=0.9*(e*ec)-0.2 R 3 :If e is G and ec is N then u=0.9*(e*ec)-0.2 R 4 :If e is Z andecis Z thenu=0.08*(e*ec) R 5 :Ife is Z and ec is G then u=0.16*(e*ec) R 6 :If e is Z and ec is N then u=0.16*(e*ec) R 7 :If e is G and ec is Z then u=0.16*(e*ec) R 8 :If e is N and ec is Z then u=0.16*(e*ec) R 9 :If e is G and ec is G then u=2.5*(e*ec)+0.5 The output of the TS fuzzy control is expressed as: Among them, ω i is the applicability of the i-th fuzzy rule, expressed as: Among them, y (p-1) (t),u (q-1) (t) represents the antecedent, represents the membership function value of the two linguistic variables in the antecedent of the i-th fuzzy rule; After processing based on data fusion, sliding mode control and fuzzy operation rules, the three decoupled sub-units generate outputs corresponding to the attitude input errors respectively; To perform posture control, the outputs of the three decoupled sub-units are converted into a final PWM signal of the motor, which is transmitted to the motor driver to drive the motor to maintain posture balance.
2. The dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance as claimed in claim 1, It is characterized in that The fusion process includes: In each motion control cycle, the motion controller collects feedback signals and processes them through the Kalman filter algorithm to obtain feedback signals applicable to the control cycle. The processed feedback signals are compared with the preset zero position value to determine the angle, angular velocity and acceleration error signals. The actual speed of travel is calculated based on the collected feedback signal, and the actual speed is compared with the target speed signal of the motion controller to determine the speed error signal.
3. The control method of a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance as claimed in claim 1 or 2, It is characterized in that The simplification into three independent sub-units includes: The motion controller decomposes the acquired forward and backward pitch inclination angle and forward and backward pitch angular velocity signals into the forward and backward pitch freedom directions of the robot; Decompose the acquired left and right rolling inclination angles and left and right rolling angular velocity signals into the left and right rolling freedom directions of the robot; The acquired yaw inclination angle and yaw angular velocity signals are decomposed into the yaw freedom direction of the robot.
4. The control method of a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance as claimed in claim 3, It is characterized in that Construct the Lyapunov function, expressed as: V=x T Px Derivative the Lyapunov function, when the derivative of the Lyapunov function That is, x→0, and at the same time solve the P matrix, which is expressed as: AX+XA T <BL+LB T in, K 1 represents a gain matrix; Solve the linear matrix inequality and obtain the P matrix to make the tracking error approach zero.
5. The control method of a dual-inertia balance wheel unicycle based on TS fuzzy sliding mode balance as claimed in claim 4, It is characterized in that Generating the output comprises: The attitude angles decomposed by the subunits, including pitch angle, roll angle and yaw angle, are used as attitude feedback values and compared with the set angles to obtain an error value; Based on the sliding mode control and TS fuzzy control, the switching item gain after TS fuzzy processing is obtained, and the final output of each subunit is obtained by calculation.
6. A dual inertia balance wheel unicycle control system based on TS fuzzy sliding mode balance, It is characterized in that include: The acquisition and processing module is used to obtain the motion state data of the unicycle, fuse the collected data through the Kalman filter algorithm, and calculate the instantaneous angle and angular velocity of the unicycle; The simplified module is used to simplify the control model of the unicycle into three independent sub-units through the decoupling control principle, including front and rear pitch balance control, left and right roll balance control and yaw and steering balance control; The sliding mode controller module is used to design a sliding mode controller, which takes the error between the angle of the decoupled subunit and the set target angle as input to make the tracking error approach zero; Wherein, the sliding mode controller design includes: The state equation of the unicycle dynamics is expressed as: Among them, A and B represent the coefficients of the unicycle state equation, u represents the torque input of the unicycle motor, f(t) represents the system model error and external interference, and the upper bound is λ f , that is, |f(t)|≤λ f , X represents the matrix set of state variables; Define the sliding mode function, expressed as: s=B T P x Where P∈R 4×4 is a positive definite matrix, x represents the error between the state variable and the set target value; The control input includes a sliding mode section and an arrival section. The sliding mode section includes: when the state variable reaches the sliding mode surface, And f(t) = 0, x tends to 0, expressed as: in, is the time derivative of the sliding mode function s, indicating the rate of change of the sliding mode function over time, B T represents the transpose of matrix B; The arrival segment includes when |f(t)|≤λ f ,and When the system reaches the sliding mode stable surface, the control law is designed so that the fuzzy control enters the sliding mode surface. and s=0, expressed as: in=in eq +in n Among them, u eq is equivalent control, u n For switching control, the exponential reaching law of sliding mode control is: Available u eq =-(B T PB) -1 B T PAx(t) you n =-(B T PB) -1 [|B T PB|λ f +ε·sgn(s)+ks] Where k is the switching gain of the control law, x(t) represents the error between the state variable of the system and the set target value at time t, ε represents the design parameter, and sgn(s) is the sign function; A fuzzy control module is used to add TS fuzzy control, perform fuzzy processing on the sliding mode function and the sliding mode function derivative in the sliding mode controller, and perform adaptive adjustment on the gain of the switching term in the sliding mode control law; Wherein, the TS fuzzy control includes: The sliding mode function s and the first-order derivative of the sliding mode function in the sliding mode controller As the input of fuzzy control, the switching term gain k of the control law is used as the output variable; Among them, the sliding mode function s and the first-order derivative of the sliding mode function are designed The corresponding fuzzy domain is on [-3, 3], which reduces the number of fuzzy rules and simplifies the controller. The fuzzy subset is expressed as: e={N,Z,G} ec={N,Z,G} Among them, e and ec correspond to the sliding mode function s and the first-order derivative of the sliding mode function respectively. Fuzzy subset, N represents a negative number, Z represents zero, and G represents a positive number; Using triangular membership functions at both ends of the domain and trapezoidal functions at positions approaching zero; Let R i Represents the i-th rule of TS fuzzy control, and constructs fuzzy rules, which are expressed as: R 1 :If e is N and ec is N then u=-2.5*(e*ec)-0.5 R 2 :If e is N and ec is G then u=0.9*(e*ec)-0.2 R 3 :If e is G and ec is N then u=0.9*(e*ec)-0.2 R 4 :If e is Z and ec is Z thenu=0.08*(e*ec) R 5 :Ifeis Z and ec is G then u=0.16*(e*ec) R 6 :If e is Z and ec is N then u=0.16*(e*ec) R 7 :If e is G and ec is Z then u=0.16*(e*ec) R 8 :If e is N and ec is Z then u=0.16*(e*ec) R 9 :If e is G and ec is G then u=2.5*(e*ec)+0.5 The output of the TS fuzzy control is expressed as: Among them, ω i is the applicability of the i-th fuzzy rule, expressed as: Among them, y (p-1) (t),u (q-1) (t) represents the antecedent, represents the membership function value of the two linguistic variables in the antecedent of the i-th fuzzy rule; The output module is used to generate outputs corresponding to the attitude input errors of the three decoupled sub-units respectively after processing based on data fusion, sliding mode control and fuzzy operation rules; The attitude control module is used for attitude control. It converts the output of the three decoupled sub-units into the final motor PWM signal, transmits it to the motor driver, and drives the motor to maintain attitude balance.
7. An electronic device, include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the dual-inertia balance wheel unicycle control method based on TS fuzzy sliding mode balance as described in any one of claims 1 to 5.
