An inverted pendulum control method using inversion sliding mode PID hybrid switching

By employing a control method that combines inversion sliding mode PID hybrid switching with a second-order delayer and an adaptive approach, and switching the control strategy according to the magnitude of the error, the problem of balancing stability and response speed of the inverted pendulum under different error conditions is solved, thus achieving efficient control of the inverted pendulum.

CN117130259BActive Publication Date: 2026-04-17CHONGQING COLLEGE OF HUMANITIES SCI & TEHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING COLLEGE OF HUMANITIES SCI & TEHNOLOGY
Filing Date
2022-12-26
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing inverted pendulum control methods struggle to balance stability and response speed under different error conditions. Inversion control offers good speed under small errors but stability decreases under large errors. PID control offers good speed under small errors but is unstable under large errors. Sliding mode control offers good stability under large errors but has low accuracy under small errors.

Method used

A hybrid control method with inverted sliding mode PID switching is adopted. By installing a miniature gyroscope and a rate gyroscope to measure the swing angle and speed, and combining a second-order delayer and an adaptive method to design the control law, the control can be freely switched according to the error magnitude, thus making full use of the advantages of the three control methods.

Benefits of technology

This study achieves a balance between stability and response speed of the inverted pendulum under different error conditions, improving control effectiveness and experimental application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117130259B_ABST
    Figure CN117130259B_ABST
Patent Text Reader

Abstract

The application provides an inverted pendulum control method adopting inversion sliding mode PID hybrid switching, which measures the swing angle of the inverted pendulum by installing a micro gyroscope and measures the swing angular velocity by installing a rate gyroscope; then, a nonlinear integral is adopted to obtain integral signals of the swing angle error and the swing angular velocity error and a sliding mode integral signal; then, a second-order delay device is adopted to solve the swing angle expected differential signal, the swing angle error differential signal, the swing angular velocity error differential signal and the sliding mode differential signal through a transfer function; finally, three methods of inversion self-adaption, sliding mode self-adaption and improved PID are adopted to design the inverted pendulum control law, and switching control is carried out based on different ranges of the swing angle error, so that the sliding mode control is adopted when the error is large, the inversion control is adopted when the error is medium and the PID control is adopted when the error is small, thereby the advantages of the three kinds of controls can be combined and the quality of the inverted pendulum control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of inverted pendulum control, and more specifically, to an inverted pendulum control method employing inverse sliding mode PID hybrid switching. Background Technology

[0002] The inverted pendulum system is a typical experimental device for studying control theory, possessing advantages such as low cost, simple structure, and easy adjustment of physical parameters and structure. It is an unstable system with high-order, unstable, multivariable, nonlinear, and strongly coupled characteristics. In the control process, it can effectively reflect many key control issues such as stabilization, robustness, servoing, and tracking, thus holding significant research value in industrial applications both in my country and worldwide. Currently, the advantages of inverted pendulums using inversion control lie in their relatively ideal stability and response speed under moderate errors; while inverted pendulums using PID control exhibit good speed and stability under small errors, but their speed decreases as the error increases, and increasing the gain by adjusting parameters leads to instability. Inverted pendulums using sliding mode control show excellent stability and response speed under large errors; however, their steady-state accuracy is not high when the error decreases. Based on the above background reasons, this invention proposes an inverted pendulum control law that combines the advantages of inversion, sliding mode and improved PID, and can be freely switched according to the error magnitude, ultimately achieving better control effect, and making this inverted pendulum device highly valuable for experimental promotion.

[0003] It should be noted that the information in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide an inverted pendulum control method that employs inverse sliding mode PID hybrid switching, thereby overcoming the problem that the advantages of multiple control methods for inverted pendulum control cannot be simultaneously achieved due to defects in related technologies.

[0005] According to one aspect of the present invention, an inverted pendulum control method employing inverted sliding mode PID hybrid switching is provided, comprising the following six steps:

[0006] Step S10: Install a miniature gyroscope on the inverted pendulum to measure the pendulum's swing angle; then set the desired swing angle and compare it to obtain the swing angle error signal; then perform a nonlinear transformation on the error signal and integrate it to obtain the nonlinear integral signal of the swing angle error; then pass the desired swing angle signal through a second-order delay circuit to obtain the desired second-order delayed swing angle signal; then compare the desired second-order delayed swing angle signal with the swing angle signal to calculate the desired differential swing angle signal.

[0007] Step S20: Pass the pendulum angle error signal through a second-order delay circuit to obtain a second-order delayed pendulum angle error signal; then compare the second-order delayed pendulum angle error signal with the pendulum angle error signal to calculate the differential pendulum angle error signal; based on the aforementioned differential pendulum angle error signal, the pendulum angle error signal, the nonlinear integral pendulum angle error signal, and the differential pendulum angle error signal, construct the desired pendulum angle velocity signal; then install a miniature rate gyroscope on the inverted pendulum to measure the pendulum angle velocity, and then compare the pendulum angle velocity with the desired pendulum angle velocity signal to obtain the pendulum angle velocity error signal; then perform a nonlinear transformation and integration on the pendulum angle velocity error signal to obtain the nonlinear integral pendulum angle velocity error signal.

[0008] Step S30: The pendulum angular velocity error signal is passed through a second-order delay circuit to obtain a second-order delayed pendulum angular velocity error signal; then, the second-order delayed pendulum angular velocity error signal is compared with the pendulum angular velocity error signal to calculate the differential pendulum angular velocity error signal; based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an angular velocity coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angular velocity coefficient estimation signal; based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an angle coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angle coefficient estimation signal; finally, the pendulum angular velocity error signal, the differential pendulum angular velocity error signal, and the nonlinear integral pendulum angular velocity error signal are superimposed to obtain the inverted pendulum inversion control signal.

[0009] Step S40: Perform a nonlinear transformation on the swing angle error signal to obtain a nonlinear transformation signal of the swing angle error; perform a nonlinear transformation on the swing angle velocity error signal to obtain a nonlinear transformation signal of the swing angle velocity error; then superimpose the nonlinear transformation signal of the swing angle error, the nonlinear transformation signal of the swing angle velocity error, and the differential signal of the swing angle velocity error to obtain a second-order sliding mode signal of the swing angle error; and then perform a nonlinear transformation and integration to obtain a sliding mode nonlinear integral signal.

[0010] Step S50: The second-order sliding mode signal of the pendulum angle error is passed through a second-order delay circuit to obtain a second-order delayed sliding mode signal of the pendulum angle error; then, the second-order delayed sliding mode signal of the pendulum angle error is compared with the second-order sliding mode signal of the pendulum angle error to calculate the differential sliding mode signal of the pendulum angle error; based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle velocity signal, an angular velocity sliding mode coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angular velocity sliding mode coefficient estimation signal; based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle signal, an angle sliding mode coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angle sliding mode coefficient estimation signal; finally, the differential sliding mode signal of the pendulum angle error, the second-order sliding mode signal of the pendulum angle error, and the sliding mode nonlinear integral signal are superimposed to obtain the inverted pendulum sliding mode control signal.

[0011] Step S60: Based on the pendulum angle error signal, pendulum angular velocity signal, pendulum angle error nonlinear integral signal, and pendulum angular velocity error differential signal, an improved PID control signal for the inverted pendulum is formed. Then, the pendulum angle error signal is compared with the interval parameters to solve for the inversion weight parameters, sliding mode weight parameters, and PID weight parameters. Finally, the improved PID control signal for the inverted pendulum, the sliding mode control signal for the inverted pendulum, the inversion control signal for the inverted pendulum, and the inversion weight parameters, sliding mode weight parameters, and PID weight parameters are combined to obtain the total switching control signal for the inverted pendulum, thereby achieving stable control of the inverted pendulum.

[0012] In one exemplary embodiment of the present invention, the swing angle error signal is nonlinearly transformed and integrated to obtain a nonlinear integral signal of the swing angle error; then the desired swing angle signal is passed through a second-order delay circuit to obtain a second-order delayed swing angle signal; then the second-order delayed swing angle signal is compared with the swing angle signal to calculate the desired differential swing angle signal, including:

[0013] e1=θ-θ d ;

[0014]

[0015]

[0016]

[0017] Where θ is the swing angle signal of the inverted pendulum; θ d e1 is the desired swing angle signal, e1 is the swing angle error signal; T is the constant integration time parameter, ε0 is the constant nonlinear transformation parameter, and θ is the constant nonlinear transformation parameter. a1 e is the constant integral anti-saturation parameter. s1 θ is the nonlinear integral signal of the swing angle error; T1 and T2 are the constant time parameters of the second-order delay, and q is the differential operator of the transfer function; d1 The desired second-order delayed signal is the swing angle; θ dd The desired differential signal for the swing angle.

[0018] In one exemplary embodiment of the present invention, the desired angular velocity signal is constructed by superimposing the desired differential signal of the pendulum angle, the pendulum angle error signal, the nonlinear integral signal of the pendulum angle error, and the pendulum angle error differential signal; then, a miniature rate gyroscope is installed on the inverted pendulum to measure the pendulum angle velocity; the pendulum angle velocity is then compared with the desired pendulum angle velocity signal to obtain the pendulum angle velocity error signal; then, the pendulum angle velocity error signal is nonlinearly transformed and integrated to obtain the nonlinear integral signal of the pendulum angle velocity error, including:

[0019]

[0020]

[0021] ω d =-k1e1-k2e 1d -k0e s1 +θ dd ;

[0022] e2=ω-ω d ;

[0023]

[0024] Where e 11 e is the second-order delayed signal of the swing angle error; 1d The differential signal of the swing angle error; k1, k2, k0 are constant parameters, ω d ω is the desired angular velocity signal of the inverted pendulum; e2 is the angular velocity error signal of the pendulum; θ a2 e is the constant integral anti-saturation parameter. s2 This is the nonlinear integral signal of the angular velocity error.

[0025] In one exemplary embodiment of the present invention, the pendulum angular velocity error signal is passed through a second-order delay circuit to obtain a second-order delayed pendulum angular velocity error signal; then, the second-order delayed pendulum angular velocity error signal is compared with the pendulum angular velocity error signal to calculate the differential pendulum angular velocity error signal; based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an angular velocity coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angular velocity coefficient estimation signal; based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an angle coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angle coefficient estimation signal; finally, the pendulum angular velocity error signal, the differential pendulum angular velocity error signal, and the nonlinear integral pendulum angular velocity error signal are superimposed to obtain the inverted pendulum inversion control signal, including:

[0026]

[0027]

[0028]

[0029]

[0030]

[0031]

[0032]

[0033] Where e 21 e is the second-order delayed signal of the angular velocity error. 2d The differential signal of the angular velocity error; kb1 This is a constant parameter used to control the convergence speed of the estimated angular velocity coefficient. The signal is the angular velocity coefficient estimation law signal. The angular velocity coefficient estimation signal; k b2 This is a constant parameter used to control the convergence speed of the angle coefficient estimate; For the angle coefficient estimation law signal, k3, k4, and k5 are constant parameters, and a1 is the inverted pendulum inversion control signal.

[0034] In one exemplary embodiment of the present invention, a nonlinear transformation is performed on the swing angle error signal to obtain a nonlinear transformation signal of the swing angle error; a nonlinear transformation is performed on the swing angular velocity error signal to obtain a nonlinear transformation signal of the swing angular velocity error; then, the nonlinear transformation signals of the swing angle error and the swing angular velocity error are superimposed to obtain the swing angle error signal, the swing angular velocity error signal, and the differential signal of the swing angular velocity error to obtain a second-order sliding mode signal of the swing angle error; and finally, a nonlinear transformation is performed and integrated to obtain a sliding mode nonlinear integral signal, including:

[0035]

[0036]

[0037] s = e1 + c2e2 + c3f1 + c4f2 + c5e 2d ;

[0038]

[0039] Where f1 is the nonlinear transformation signal of the swing angle error; f2 is the nonlinear transformation signal of the swing angle velocity error; c2, c3, c4, and c5 are constant sliding mode parameters; s is the second-order sliding mode signal of the swing angle error; and θ is the nonlinear transformation signal of the swing angle velocity error. a3 For constant integral antisaturation parameter, s s2 It is a sliding mode nonlinear integral signal.

[0040] In one exemplary embodiment of the present invention, the second-order sliding mode signal of the pendulum angle error is passed through a second-order delay circuit to obtain a second-order delayed sliding mode signal of the pendulum angle error; then, the second-order delayed sliding mode signal of the pendulum angle error is compared with the second-order sliding mode signal of the pendulum angle error to calculate the differential sliding mode signal of the pendulum angle error; based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle velocity signal, an angular velocity sliding mode coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angular velocity sliding mode coefficient estimation signal; based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle signal, an angle sliding mode coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angle sliding mode coefficient estimation signal; finally, the differential sliding mode signal of the pendulum angle error, the second-order sliding mode signal of the pendulum angle error, and the sliding mode nonlinear integral signal are superimposed to obtain the inverted pendulum sliding mode control signal, including:

[0041]

[0042]

[0043]

[0044]

[0045]

[0046]

[0047]

[0048] Where s a The second-order sliding mode delay signal represents the swing angle error; s d k is the sliding mode differential signal for the swing angle error; b3 This is a constant parameter used to control the convergence speed of the estimated angular velocity sliding mode coefficient. The signal is the estimation law for the angular velocity sliding mode coefficient. The signal for estimating the sliding mode coefficient of angular velocity; k b4 This is a constant parameter used to control the convergence speed of the estimated angle sliding mode coefficient. For the angle sliding mode coefficient estimation law signal, is the angle sliding mode coefficient estimation signal; k6, k7, and k8 are constant control parameters, and a2 is the inverted pendulum sliding mode control signal.

[0049] In one exemplary embodiment of the present invention, an improved PID control signal for the inverted pendulum is composed of the pendulum angle error signal, pendulum angle velocity signal, pendulum angle error nonlinear integral signal, and pendulum angle velocity error differential signal. Then, the pendulum angle error signal is compared with interval parameters to solve for the inversion weight parameters, sliding mode weight parameters, and PID weight parameters. Finally, the improved PID control signal for the inverted pendulum, the sliding mode control signal for the inverted pendulum, the inversion control signal for the inverted pendulum, and the inversion weight parameters, sliding mode weight parameters, and PID weight parameters are combined to obtain the overall switching control signal for the inverted pendulum as follows:

[0050]

[0051]

[0052]

[0053] a3=c1e1+c6ω+c7e s1 +c8e 2d ;

[0054] a = a1t1 + a2t2 + a3t3;

[0055] Where θ b1 θ b2 t1 is the constant switching interval parameter; t2 is the inversion weight parameter; t3 is the sliding mode weight parameter; t4 is the PID weight parameter; c1, c6, c7, and c8 are constant control parameters; a3 is the improved PID control signal for the inverted pendulum; and a is the total switching control signal for the inverted pendulum.

[0056] Beneficial effects

[0057] This invention presents an inverted pendulum control method employing a hybrid switching approach of inversion, sliding mode, and PID control. Its main innovations are as follows: First, it proposes using a second-order delayer to uniformly solve for the differentials of the pendulum angle expectation, pendulum angle error, pendulum angular velocity error, and sliding mode differential, along with solving the nonlinear integral. This ensures good consistency and simplifies the design of the entire control scheme. Second, it proposes an organically and freely unified switching control method that uses sliding mode for large errors, inversion for medium errors, and improved PID for small errors. This allows the inverted pendulum control to combine the advantages of all three control methods.

[0058] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description

[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0060] Figure 1 This is a flowchart of an inverted pendulum control method using inverted sliding mode PID hybrid switching provided by the present invention.

[0061] Figure 2 This is the swing angle signal curve (unit: degrees) of the inverted pendulum provided by the method in the embodiments of the present invention;

[0062] Figure 3 This is the swing angle error signal curve (unit: degrees) of the method provided in the embodiments of the present invention;

[0063] Figure 4 This is the nonlinear integral signal curve of the swing angle error (unitless) of the method provided in the embodiments of the present invention;

[0064] Figure 5 This is the angular velocity signal curve (unit: degrees per second) of the inverted pendulum provided by the method in the embodiments of the present invention;

[0065] Figure 6 This is the nonlinear integral signal curve of the pendulum angular velocity error (unitless) provided by the method in the embodiments of the present invention;

[0066] Figure 7 This is the sliding mode nonlinear integral signal curve (unitless) of the method provided in the embodiments of the present invention;

[0067] Figure 8 This is the total switching control signal curve (unitless) of the inverted pendulum provided in the embodiments of the present invention;

[0068] Figure 9 This is the switching amplification curve (unitless) of the method provided in the embodiments of the present invention. Detailed Implementation

[0069] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make the invention more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention may be practiced with one or more of these specific details omitted, or other methods, components, apparatus, steps, etc., may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the invention.

[0070] This invention provides an inverted pendulum control method employing a hybrid switching approach of inversion, sliding mode, and PID control. It measures the pendulum's swing angle using a miniature gyroscope and its angular velocity using a rate gyroscope. Then, nonlinear integration is used to obtain the integral signals of the swing angle error and angular velocity error, as well as the sliding mode integral signal. A second-order delay is then used to solve for the differential signals of the desired swing angle, swing angle error, angular velocity error, and sliding mode through a transfer function. Finally, three control laws for the inverted pendulum are designed using inversion adaptive, sliding mode adaptive, and improved PID control methods. The control is then switched based on different ranges of the swing angle error, allowing sliding mode control to be used when the error is large, inversion control to be used when the error is moderate, and PID control to be used when the error is small. This combines the advantages of all three control methods, improving the quality of the inverted pendulum control.

[0071] The following will, with reference to the accompanying drawings, further explain and illustrate an inverted pendulum control method employing inverse sliding mode PID hybrid switching according to the present invention. (Reference) Figure 1 As shown, this inverted pendulum control method employing inverted sliding mode PID hybrid switching may include the following steps:

[0072] Step S10: Install a miniature gyroscope on the inverted pendulum to measure the pendulum's swing angle; then set the desired swing angle and compare it to obtain the swing angle error signal; then perform a nonlinear transformation on the swing angle error signal and integrate it to obtain the nonlinear integral signal of the swing angle error; then pass the desired swing angle signal through a second-order delay circuit to obtain the desired second-order delayed swing angle signal; then compare the desired second-order delayed swing angle signal with the swing angle signal to calculate the desired differential signal of the swing angle.

[0073] Specifically, this can be broken down into the following four steps. First, install a miniature gyroscope on the inverted pendulum to measure its swing angle; then set the desired swing angle and compare the results to obtain the swing angle error signal as follows:

[0074] e1=θ-θ d ;

[0075] Where θ is the swing angle signal of the inverted pendulum; θ d e1 is the desired swing angle signal, and e2 is the swing angle error signal.

[0076] The second step involves performing a nonlinear transformation on the swing angle error signal and then integrating it to obtain the nonlinear integral signal of the swing angle error, as follows:

[0077]

[0078] Where T is the constant integration time parameter, ε0 is the constant nonlinear transformation parameter, and θ a1 e is the constant integral anti-saturation parameter. s1 This is the nonlinear integral signal of the swing angle error.

[0079] The third step is to pass the desired swing angle signal through a second-order delay circuit to obtain the desired second-order delayed swing angle signal as follows:

[0080]

[0081] Where T1 and T2 are the constant time parameters of the second-order delay, and q is the differential operator of the transfer function; θ d1 The desired second-order delay signal is the swing angle.

[0082] The fourth step involves comparing the expected second-order delayed signal of the pendulum angle with the pendulum angle signal to calculate the expected differential signal of the pendulum angle as follows:

[0083]

[0084] Where θ dd The desired differential signal for the swing angle.

[0085] Step S20: Pass the pendulum angle error signal through a second-order delay circuit to obtain a second-order delayed pendulum angle error signal; then compare the second-order delayed pendulum angle error signal with the pendulum angle error signal to calculate the differential pendulum angle error signal; based on the aforementioned differential pendulum angle error signal, the pendulum angle error signal, the nonlinear integral pendulum angle error signal, and the differential pendulum angle error signal, construct the desired pendulum angle velocity signal; then install a miniature rate gyroscope on the inverted pendulum to measure the pendulum angle velocity, and then compare the pendulum angle velocity with the desired pendulum angle velocity signal to obtain the pendulum angle velocity error signal; then perform a nonlinear transformation and integration on the pendulum angle velocity error signal to obtain the nonlinear integral pendulum angle velocity error signal.

[0086] Specifically, it can be broken down into the following five steps. The first step is to pass the swing angle error signal through a second-order delay circuit to obtain the second-order delayed swing angle error signal as follows:

[0087]

[0088] Where e 11 This is the second-order delay signal of the swing angle error.

[0089] The second step involves comparing the second-order delayed signal of the swing angle error with the swing angle error signal to calculate the differential signal of the swing angle error as follows:

[0090]

[0091] Where e 1d This is the differential signal of the swing angle error.

[0092] The third step involves superimposing the swing angle error signal, the swing angle error nonlinear integral signal, and the swing angle error differential signal onto the desired differential signal of the swing angle, as follows:

[0093] ω d =-k1e1-k2e 1d -k0e s1 +θ dd ;

[0094] Where k1, k2, and k0 are constant parameters, ω d This represents the desired angular velocity signal.

[0095] The fourth step is to install a miniature rate gyroscope to measure the angular velocity of the inverted pendulum. The angular velocity is then compared with the expected angular velocity signal to obtain the following angular velocity error signal:

[0096] e2=ω-ω d ;

[0097] Where ω is the angular velocity signal of the inverted pendulum, and e2 is the angular velocity error signal.

[0098] The fifth step involves performing a nonlinear transformation and integration on the pendulum angular velocity error signal to obtain the following nonlinear integral signal of the pendulum angular velocity error:

[0099]

[0100] Where θ a2 e is the constant integral anti-saturation parameter. s2 This is the nonlinear integral signal of the angular velocity error.

[0101] Step S30: The pendulum angular velocity error signal is passed through a second-order delay circuit to obtain a second-order delayed pendulum angular velocity error signal; then, the second-order delayed pendulum angular velocity error signal is compared with the pendulum angular velocity error signal to calculate the differential pendulum angular velocity error signal; based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an angular velocity coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angular velocity coefficient estimation signal; based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an angle coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angle coefficient estimation signal; finally, the pendulum angular velocity error signal, the differential pendulum angular velocity error signal, and the nonlinear integral pendulum angular velocity error signal are superimposed to obtain the inverted pendulum inversion control signal.

[0102] Specifically, it can be broken down into the following five steps. The first step is to pass the pendulum angular velocity error signal through a second-order delay circuit to obtain the second-order delayed pendulum angular velocity error signal as follows:

[0103]

[0104] Where e 21 This is the second-order delay signal of the angular velocity error.

[0105] The second step involves comparing the second-order delay signal of the pendulum angular velocity error with the pendulum angular velocity error signal to calculate the differential signal of the pendulum angular velocity error, as follows:

[0106]

[0107] Where e 2d This is the differential signal of the angular velocity error.

[0108] The third step involves designing an angular velocity coefficient estimation law signal based on the pendulum angular velocity error signal and the pendulum angular velocity signal using an adaptive method, and then integrating the results to obtain the angular velocity coefficient estimation signal as follows:

[0109]

[0110]

[0111] Where k b1 This is a constant parameter used to control the convergence speed of the estimated angular velocity coefficient. The signal is the angular velocity coefficient estimation law signal. This is the signal for estimating the angular velocity coefficient.

[0112] The fourth step involves designing an angle coefficient estimation law signal using an adaptive method based on the angular velocity error signal and the angular signal, and then integrating the results to obtain the following angle coefficient estimation signal:

[0113]

[0114]

[0115] Where k b2 This is a constant parameter used to control the convergence speed of the angle coefficient estimate; For the angle coefficient estimation law signal, This is the angle coefficient estimation signal.

[0116] The fifth step involves using the estimated angular velocity coefficient signal, the estimated angle coefficient signal, the superimposed pendulum angular velocity error signal, the differential pendulum angular velocity error signal, and the nonlinear integral pendulum angular velocity error signal to obtain the inverted pendulum inversion control signal as follows:

[0117]

[0118] Where k3, k4, and k5 are constant parameters, and a1 is the inverted pendulum inversion control signal.

[0119] Step S40: Perform a nonlinear transformation on the swing angle error signal to obtain a nonlinear transformation signal of the swing angle error; perform a nonlinear transformation on the swing angle velocity error signal to obtain a nonlinear transformation signal of the swing angle velocity error; then superimpose the nonlinear transformation signal of the swing angle error, the nonlinear transformation signal of the swing angle velocity error, and the differential signal of the swing angle velocity error to obtain a second-order sliding mode signal of the swing angle error; and then perform a nonlinear transformation and integration to obtain a sliding mode nonlinear integral signal.

[0120] Specifically, it can be broken down into the following four steps. The first step is to perform a nonlinear transformation on the aforementioned swing angle error signal to obtain the nonlinear transformed swing angle error signal as follows:

[0121]

[0122] Where f1 is the nonlinear transformation signal of the swing angle error.

[0123] The second step involves performing a nonlinear transformation on the aforementioned pendulum angular velocity error signal to obtain the nonlinear transformed pendulum angular velocity error signal as follows:

[0124]

[0125] Where f2 is the nonlinear transformation signal of the angular velocity error.

[0126] The third step involves superimposing the nonlinear transformation signals of the swing angle error and the nonlinear transformation signals of the swing angular velocity error, along with the differential signals of the swing angle error, to obtain the second-order sliding mode signal of the swing angle error as follows:

[0127] s = e1 + c2e2 + c3f1 + c4f2 + c5e 2d ;

[0128] Where c2, c3, c4, and c5 are constant sliding mode parameters, and s is the second-order sliding mode signal of the swing angle error.

[0129] The fourth step involves performing a nonlinear transformation on the second-order sliding mode signal of the swing angle error and then integrating it to obtain the sliding mode nonlinear integral signal as follows:

[0130]

[0131] Where θ a3 For constant integral antisaturation parameter, s s2 It is a sliding mode nonlinear integral signal.

[0132] Step S50: The second-order sliding mode signal of the pendulum angle error is passed through a second-order delay circuit to obtain a second-order delayed sliding mode signal of the pendulum angle error; then, the second-order delayed sliding mode signal of the pendulum angle error is compared with the second-order sliding mode signal of the pendulum angle error to calculate the differential sliding mode signal of the pendulum angle error; based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle velocity signal, an angular velocity sliding mode coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angular velocity sliding mode coefficient estimation signal; based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle signal, an angle sliding mode coefficient estimation law signal is designed using an adaptive method, and then integrated to obtain the angle sliding mode coefficient estimation signal; finally, the differential sliding mode signal of the pendulum angle error, the second-order sliding mode signal of the pendulum angle error, and the sliding mode nonlinear integral signal are superimposed to obtain the inverted pendulum sliding mode control signal.

[0133] Specifically, it can be broken down into the following five steps. The first step is to pass the second-order sliding mode signal of the swing angle error through a second-order delay circuit to obtain the second-order delayed second-order sliding mode signal of the swing angle error as follows:

[0134]

[0135] Where s a The second-order sliding mode second-order delay signal represents the swing angle error.

[0136] The second step involves comparing the second-order sliding mode delay signal of the swing angle error with the second-order sliding mode signal of the swing angle error to calculate the sliding mode differential signal of the swing angle error as follows:

[0137]

[0138] Where s d This is the sliding mode differential signal for the swing angle error.

[0139] The third step involves designing an angular velocity sliding mode coefficient estimation law signal using an adaptive method based on the second-order sliding mode signal of the pendulum angle error and the pendulum angular velocity signal. This law signal is then integrated to obtain the angular velocity sliding mode coefficient estimation signal as follows:

[0140]

[0141]

[0142] Where k b3 This is a constant parameter used to control the convergence speed of the estimated angular velocity sliding mode coefficient. The signal is the estimation law for the angular velocity sliding mode coefficient. This is the signal for estimating the sliding mode coefficient of angular velocity.

[0143] The fourth step involves designing an angle sliding mode coefficient estimation law signal using an adaptive method based on the second-order sliding mode signal of the swing angle error and the swing angle signal. This law is then integrated to obtain the angle sliding mode coefficient estimation signal as follows:

[0144]

[0145]

[0146] Where k b4 This is a constant parameter used to control the convergence speed of the estimated angle sliding mode coefficient. For the angle sliding mode coefficient estimation law signal, This is the estimated signal for the sliding mode coefficient of the angle.

[0147] The fifth step involves superimposing the angular velocity sliding mode coefficient estimation signal, the angle sliding mode coefficient estimation signal, the pendulum angle error sliding mode differential signal, the pendulum angle error second-order sliding mode signal, and the sliding mode nonlinear integral signal to obtain the inverted pendulum sliding mode control signal as follows:

[0148]

[0149] Where k6, k7, and k8 are constant control parameters, and a2 is the inverted pendulum sliding mode control signal.

[0150] Step S60: Based on the pendulum angle error signal, pendulum angular velocity signal, pendulum angle error nonlinear integral signal, and pendulum angular velocity error differential signal, an improved PID control signal for the inverted pendulum is formed. Then, the pendulum angle error signal is compared with the interval parameters to solve for the inversion weight parameters, sliding mode weight parameters, and PID weight parameters. Finally, the improved PID control signal for the inverted pendulum, the sliding mode control signal for the inverted pendulum, the inversion control signal for the inverted pendulum, and the inversion weight parameters, sliding mode weight parameters, and PID weight parameters are combined to obtain the total switching control signal for the inverted pendulum, thereby achieving stable control of the inverted pendulum.

[0151] Specifically, it can be broken down into the following three steps. The first step is to assemble the improved PID control signal for the inverted pendulum based on the aforementioned pendulum angle error signal, pendulum angular velocity signal, pendulum angle error nonlinear integral signal, and pendulum angular velocity error differential signal, as follows:

[0152] a3=c1e1+c6ω+c7es1 +c8e 2d ;

[0153] Where c1, c6, c7, and c8 are constant control parameters, and a3 is the improved PID control signal for the inverted pendulum.

[0154] The second step involves comparing the swing angle error signal with the interval parameters to determine the inversion weight parameters, sliding mode weight parameters, and PID weight parameters as follows:

[0155]

[0156]

[0157]

[0158] Where θ b1 θ b2 t1 is the constant switching interval parameter; t2 is the inversion weight parameter; t3 is the sliding mode weight parameter; and t4 is the PID weight parameter.

[0159] The third step involves combining the improved PID control signal of the inverted pendulum, the sliding mode control signal of the inverted pendulum, the inverted pendulum inversion control signal with inversion weight parameters, sliding mode weight parameters, and PID weight parameters to obtain the overall switching control signal of the inverted pendulum as follows:

[0160] a = a1t1 + a2t2 + a3t3;

[0161] Where 'a' is the overall switching control signal for the inverted pendulum.

[0162] Case Implementation and Computer Simulation Results Analysis

[0163] In step S10, θ is selected. d =-16 degrees, ε0 = 0.22, T = 0.001, θ a1 =0.3; T1=0.02, T2=0.1; the swing angle signal of the inverted pendulum is obtained as follows: Figure 2 As shown, the swing angle error signal is obtained as follows: Figure 3 As shown; the nonlinear integral signal of the swing angle error is obtained as follows: Figure 4 As shown.

[0164] In step S20, k1 = 5.6, k2 = 0.7, and k0 = 1.2 are selected to obtain the angular velocity signal of the inverted pendulum, as shown below. Figure 5 As shown; the nonlinear integral signal of the pendulum angular velocity error is obtained as follows. Figure 6 As shown.

[0165] In step S30, k is selected. b1 =0.001, k b2=0.002; In step S40, select θ a3 =1.2, the sliding mode nonlinear integral signal is obtained as follows Figure 7 As shown.

[0166] In step S50, k is selected. b3 =0.001, k b4 =0.002; In step S60, select θ b1 =0.05, θ b2 =0.1, thus obtaining the total switching control signal for the inverted pendulum as follows: Figure 8 As shown, its switching amplification curve is as follows: Figure 9 As shown.

[0167] Depend on Figure 3 It can be seen that the control error converges to 0 for the first time in about 1 second, indicating good control speed. Figure 9 The magnified curve clearly shows that the total switching control signal exhibits five notch-shaped spikes, which are formed due to the switching; however, due to... Figure 2 It can be seen that the inverted pendulum can quickly track the expected value of -16 degrees, and Figure 8 The spikes caused by the switching of the control signal did not make the pendulum angle uneven, indicating that the switching does not affect the smoothness of the inverted pendulum control.

[0168] The experimental results show that the inverted pendulum control method using inverted sliding mode PID hybrid switching provided by this invention exhibits good stability and accuracy, thus demonstrating the effectiveness of the method and possessing high theoretical and engineering application value.

Claims

1. An inverted pendulum control method using a hybrid switching of inversion sliding mode PID, characterized in that, Includes the following steps: Step S10: Install a miniature gyroscope on the inverted pendulum and measure the swing angle of the inverted pendulum; Then, the desired swing angle is set and compared to obtain the swing angle error signal; the swing angle error signal is then nonlinearly transformed and integrated to obtain the nonlinear integral signal of the swing angle error; the desired swing angle signal is then passed through a second-order delay circuit to obtain the second-order delayed swing angle signal; finally, the second-order delayed swing angle signal is compared with the swing angle signal to calculate the desired differential swing angle signal as follows: ; ; ; ; in This is the swing angle signal of the inverted pendulum; For the desired swing angle signal, This is the swing angle error signal; For constant integral time parameters, For constant nonlinear transformation parameters, This is a constant integral anti-saturation parameter. This is the nonlinear integral signal of the swing angle error; , These are the constant time parameters of the second-order delay unit. For the differential operator of the transfer function; The desired second-order delay signal for the swing angle; The differential signal of the desired swing angle; Step S20: The pendulum angle error signal is passed through a second-order delay circuit to obtain a second-order delayed pendulum angle error signal. Then, the second-order delayed pendulum angle error signal is compared with the pendulum angle error signal to calculate the differential pendulum angle error signal. The pendulum angle error signal, the nonlinear integral pendulum angle error signal, and the differential pendulum angle error signal are superimposed on the desired differential pendulum angle signal to form the desired pendulum angle velocity signal. Then, a miniature rate gyroscope is installed on the inverted pendulum to measure the pendulum angle velocity. The pendulum angle velocity is then compared with the desired pendulum angle velocity signal to obtain the pendulum angle velocity error signal. Finally, the pendulum angle velocity error signal is nonlinearly transformed and integrated to obtain the nonlinear integral pendulum angle velocity error signal as follows: ; ; ; ; ; in This is the second-order delayed signal of the swing angle error; This is the differential signal of the swing angle error; , , For constant parameters, The desired signal for the angular velocity; This is the angular velocity signal of the inverted pendulum. This is the angular velocity error signal; This is a constant integral anti-saturation parameter. The nonlinear integral signal of the angular velocity error; Step S30: The pendulum angular velocity error signal is passed through a second-order delay circuit to obtain a second-order delayed pendulum angular velocity error signal. Then, the second-order delayed pendulum angular velocity error signal is compared with the pendulum angular velocity error signal to calculate the differential pendulum angular velocity error signal. Based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an adaptive method is used to design an angular velocity coefficient estimation law signal, which is then integrated to obtain the angular velocity coefficient estimation signal. Based on the pendulum angular velocity error signal and the pendulum angular velocity signal, an adaptive method is used to design an angle coefficient estimation law signal, which is then integrated to obtain the angle coefficient estimation signal. Finally, the pendulum angular velocity error signal, the differential pendulum angular velocity error signal, and the nonlinear integral pendulum angular velocity error signal are superimposed to obtain the inverted pendulum inversion control signal as follows: ; ; ; ; ; ; in This is the second-order delayed signal of the angular velocity error; This is the differential signal of the angular velocity error; This is a constant parameter used to control the convergence speed of the estimated angular velocity coefficient. The signal is the angular velocity coefficient estimation law signal. This is the signal for estimating the angular velocity coefficient; This is a constant parameter used to control the convergence speed of the angle coefficient estimate; For the angle coefficient estimation law signal, This is the angle coefficient estimation signal; , , For constant parameters, For inverted pendulum inversion control signal; Step S40: Perform a nonlinear transformation on the swing angle error signal to obtain a nonlinear transformation signal for the swing angle error; perform a nonlinear transformation on the swing angular velocity error signal to obtain a nonlinear transformation signal for the swing angular velocity error; then superimpose the nonlinear transformation signals for the swing angle error signal, the swing angular velocity error signal, and the differential signal of the swing angular velocity error to obtain a second-order sliding mode signal for the swing angle error; perform a nonlinear transformation and integration to obtain the sliding mode nonlinear integral signal as follows: ; ; ; ; in This is a nonlinear transformation signal of the swing angle error; This is a nonlinear transformation signal of the angular velocity error. , , , These are constant sliding mode parameters. This is the second-order sliding mode signal for the swing angle error. This is a constant integral anti-saturation parameter. This is a sliding mode nonlinear integral signal; Step S50: Pass the second-order sliding mode signal of the swing angle error through a second-order delay circuit to obtain the second-order sliding mode delay signal of the swing angle error; then compare the second-order sliding mode delay signal of the swing angle error with the second-order sliding mode signal of the swing angle error to calculate the sliding mode differential signal of the swing angle error; based on the second-order sliding mode signal of the swing angle error and the swing angular velocity signal, use an adaptive method to design the angular velocity sliding mode coefficient estimation law signal, and then integrate to obtain the angular velocity sliding mode coefficient estimation signal; Based on the second-order sliding mode signal of the pendulum angle error and the pendulum angle signal, an adaptive method is used to design the angle sliding mode coefficient estimation law signal, which is then integrated to obtain the angle sliding mode coefficient estimation signal. Finally, the pendulum angle error sliding mode differential signal, the second-order sliding mode signal of the pendulum angle error, and the sliding mode nonlinear integral signal are superimposed to obtain the inverted pendulum sliding mode control signal as follows: ; ; ; ; ; ; ; in The second-order sliding mode second-order delay signal represents the swing angle error. This is the sliding mode differential signal for the swing angle error; This is a constant parameter used to control the convergence speed of the estimated angular velocity sliding mode coefficient. The signal is the estimation law for the angular velocity sliding mode coefficient. This is the signal for estimating the sliding mode coefficient of angular velocity; This is a constant parameter used to control the convergence speed of the estimated angle sliding mode coefficient. For the angle sliding mode coefficient estimation law signal, This is the estimated signal for the sliding mode coefficient of the angle; , , For constant control parameters, For inverted pendulum sliding mode control signal; Step S60: An improved PID control signal for the inverted pendulum is constructed based on the pendulum angle error signal, pendulum angular velocity signal, pendulum angle error nonlinear integral signal, and pendulum angular velocity error differential signal. Then, the pendulum angle error signal is compared with the interval parameters to solve for the inversion weight parameters, sliding mode weight parameters, and PID weight parameters. Finally, the improved PID control signal, sliding mode control signal, and inversion control signal are combined with the inversion weight parameters, sliding mode weight parameters, and PID weight parameters to obtain the overall switching control signal for the inverted pendulum, achieving stable control of the inverted pendulum as follows: ; ; ; ; ; in , The parameter is used to switch the range between constant values; For inversion weight parameters, For sliding mode weight parameters, These are the PID weight parameters; , , , For constant control parameters, Improve the PID control signal for the inverted pendulum; This is the overall switching control signal for the inverted pendulum.

Citation Information

Patent Citations

  • Inverted pendulum control method, device and system based on low-pass filtering

    CN110568755A

  • Intelligent PID control method

    US20210157281A1