Parallel double-rotor inverted pendulum experiment platform and control method thereof
By designing a parallel double-actor inverted pendulum experimental platform, using linear motor drive and encoder feedback, combined with MATLAB and LABVIEW control programs, coordinated motion control and synchronous motion control are achieved, solving the problem that the existing platform cannot meet actual engineering applications and improving control accuracy and stability.
Patent Information
- Application Number
- CN202510529206.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-07-18
AI Technical Summary
The existing inverted pendulum experimental platform cannot conduct experiments with coordinated motion control and synchronous motion control, and cannot meet the control needs in actual engineering applications.
A parallel double-actor inverted pendulum experimental platform is designed, which uses linear motor drive, combined with magnetic scale encoder and rotary encoder for real-time feedback, and coordinated motion control and synchronous motion control are achieved through the LQR stable pendulum controller and the Bang-Bang starter controller, and a control program based on MATLAB and LABVIEW is built.
The experiment of coordinated motion control and synchronous motion control is realized, and combined with the experiment of inverted pendulum swing stabilization pendulum control is improved, the control accuracy and stability are reduced, the faults and errors of the transmission mechanism are reduced, and the area of the ground is smaller, so the experimental phenomenon can be observed is more intuitive.
Smart Images

Figure CN120340355A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of inverted pendulum control experimental platforms, and specifically relates to a parallel double-rotor inverted pendulum experimental platform and a control method thereof. Background Art
[0002] In recent years, the control theory of inverted pendulums has developed rapidly. However, in many universities, research experiments on inverted pendulums mostly focus on virtual simulation or traditional linear single-stage inverted pendulums. Existing inverted pendulum experimental platforms can only complete basic pendulum-rising and pendulum-stabilizing experiments, lacking experimental platforms for coordinated motion control and synchronous motion control of multiple motion axes, such as multi-axis mechanisms and multi-joint robots, in practical engineering applications, and unable to conduct algorithm experiments and verifications for coordinated motion control and synchronous motion control in practical engineering applications. Summary of the Invention
[0003] The purpose of the present invention is to address the deficiencies of the above technologies and provide a parallel double-rotor inverted pendulum experimental platform and a control method thereof, which can conduct various experiments on coordinated motion control, synchronous motion control, and combined pendulum-rising and pendulum-stabilizing control of the inverted pendulum.
[0004] To achieve the above purpose, the parallel double-rotor inverted pendulum experimental platform designed by the present invention includes an installation platform. Two parallel guide rails are provided on the installation platform. A rotor seat is provided on each of the guide rails. The drag chain of the linear motor is connected to the L-shaped connecting piece provided on the rotor seat through bolts. Inverted pendulums are installed on the rotor seats. The inverted pendulum includes a pendulum rod bracket vertically installed on the rotor seat. A pendulum rod is hinged to the pendulum rod bracket. A rotary encoder for real-time feedback of the angle of the pendulum rod is installed at the hinge of the pendulum rod bracket and the pendulum rod. A magnetic grating encoder for collecting the position of the pendulum rod bracket is provided on the rotor seat. The linear motor, the rotary encoder, and the magnetic grating encoder are connected to a controller.
[0005] Preferably, limit switches for limiting the position of the inverted pendulum are installed at a certain position away from the edge on both sides of the guide rail to prevent the rotor from exceeding the predetermined range and protect the safety of the equipment.
[0006] Preferably, the pendulum rod bracket is installed on the rotor seat through a base.
[0007] Preferably, two wire arrangement boxes for placing the wire arrangement of the experimental platform are provided between the two guide rails. The wire arrangement box is provided with interfaces for connecting the power supply and the controller.
[0008] Preferably, the controller includes an industrial personal computer and a motion control card. The industrial personal computer obtains the displacement of the inverted pendulum and the angle of the pendulum rod measured by the rotary encoder and the magnetic grating encoder in real time through the motion control card, and decides to control the linear motor to drive the rotor seat to move through a control program to maintain the stable pendulum of the inverted pendulum, forming a closed-loop control.
[0009] A control method for a parallel double-rotor inverted pendulum experimental platform, comprising the following steps:
[0010] 1) Conduct an overall design of the parallel double-rotor inverted pendulum experimental platform driven by a linear motor, and design and select each hardware part;
[0011] 2) Build the parallel double-rotor inverted pendulum experimental platform driven by a linear motor, and conduct test experiments on the magnetic grating ruler encoder, rotary encoder and linear motor;
[0012] 3) Establish a mathematical model of the double-rotor inverted pendulum;
[0013] 4) Design the motion control program and visualization interface of the double-rotor inverted pendulum experimental platform;
[0014] 5) Design the LQR stabilizing controller and Bang-Bang starting controller of the double-rotor inverted pendulum experimental platform, and combine them to achieve the self-starting experiment.
[0015] Preferably, the step 2) includes the following steps:
[0016] 2.1) Install the guide rail;
[0017] 2.2) Install a magnetic grating ruler encoder on the mover seat to measure and feedback the position information of the inverted pendulum;
[0018] 2.3) Install the inverted pendulum on the mover seat, hinge the pendulum rod on the pendulum rod bracket, and install a rotary encoder at the hinge of the pendulum rod to measure and feedback the angle information of the pendulum rod. The drag chain of the linear motor is connected to the L-shaped connecting piece on the mover seat through bolts;
[0019] 2.4) Connect the linear motor, rotary encoder and magnetic grating ruler encoder to the controller.
[0020] Preferably, the step 3) includes the following steps:
[0021] 3.1) Simplify the double-rotor inverted pendulum system model driven by a linear motor into an analysis of two linear first-order inverted pendulum models, ignore air resistance and friction, and abstract the double-rotor inverted pendulum system into two systems composed of a trolley and a homogeneous rod;
[0022] 3.2) By analyzing the forces in the horizontal and vertical directions of the double-rotor inverted pendulum system, the motion equations of the double-rotor inverted pendulum system can be obtained:
[0023]
[0024] Where x is the position of the trolley, M is the mass of the trolley, m is the mass of the pendulum rod, b is the friction coefficient of the trolley, l is the length from the rotation axis of the pendulum rod to the center of mass, Φ is the angle between the pendulum rod and the vertically upward direction, θ is the angle between the pendulum rod and the vertically downward direction, I is the moment of inertia of the pendulum rod, and F is the force applied to the trolley;
[0025] 3.3) Linearize the motion equation and then calculate the state-space equation of the double-rotor inverted pendulum system. Substitute specific data to calculate the state-space equation with the trolley acceleration as the input as follows:
[0026]
[0027] Where
[0028] Preferably, in step 4), a motion control program is written by LABVIEW to design a visual interface. The main interface mainly consists of a controller connection module, an axis motion module, and an inverted pendulum experiment module. The functions of the controller connection module include local connection and disconnection of the controller, reading the connection handle, downloading the Bas file, bus initialization, reading the initialization status, reading the number of bus nodes and the number of axes; the functions of the axis motion module include reading the axis number and axis type, reading the feedback positions of the linear motor and the rotary encoder, setting the pulse equivalent of the linear motor, opening and closing the control enable state, setting the speed and acceleration of the linear motor, reading the motion state and axis state of the linear motor, clearing the alarm of the linear motor, clearing the position of the rotary encoder, setting the command position of the trolley, and controlling the forward and reverse rotation and stop of the linear motor; the functions of the inverted pendulum experiment module include jumping to the control program of the corresponding experiment in MATLAB Simulink by clicking the corresponding experiment button.
[0029] Preferably, in step 5), the following steps are included:
[0030] 5.1) Based on the established state-space equation of the double-rotor inverted pendulum system, design an LQR pendulum stabilizing controller. By writing a MATLAB script and calling the lqr command function of MATLAB to solve the above optimal problem, change the trolley position weight coefficient Q 11 and the pendulum rod angle weight coefficient Q 33 in the script, and solve the control vector matrix K for the subsequent LQR pendulum stabilizing control of the inverted pendulum;
[0031] 5.2) Use MATLAB Simulink to write the LQR pendulum stabilizing control program, calculate the control vector matrix K of the controller using a MATLAB script, input it into the LQR controller for pendulum stabilizing control, control the position of the double-rotor inverted pendulum cart and the angle of the pendulum rod 7. Manually hold the pendulum rod 7 vertically upward to trigger the pendulum stabilizing controller, observe the control effect. If the control effect is not good, adjust the position weight coefficient Q of the cart in the script 11 and the angle weight coefficient Q of the pendulum rod 33 , re-solve the control vector matrix K, and then conduct real-time control experiments. Select the optimal control vector matrix K until the pendulum stabilizing control can be achieved;
[0032] 5.3) Design a Bang-Bang pendulum starting controller. Its principle is to give a force that switches with a fixed angle, make the cart move left and right to drag the pendulum rod to swing, convert the kinetic energy of the cart into the potential energy of the pendulum rod until it reaches the pendulum stabilizing switching angle, and convert it into a control algorithm according to the control principle:
[0033]
[0034] In the formula, θ is the angle of the pendulum rod, θ is based on vertically downward, and the counterclockwise swing is the positive direction, u is the acceleration value. Write the Bang-Bang pendulum starting control program in Simulink according to this control algorithm, combine it with the above-written LQR pendulum stabilizing control program, and design a switching controller from starting to stabilizing. When the pendulum rod meets the pendulum stabilizing condition, that is, the angle between the pendulum rod and the vertically upward direction is less than 15°, switch the starting controller to the pendulum stabilizing controller, and merge them into a self-starting and stabilizing control program for the linear motor-driven double-rotor inverted pendulum. By debugging the coefficients k1 and k2 in the starting controller and the value of the optimal control vector matrix K of the LQR pendulum stabilizing controller, and through formulating control strategies, respectively achieve the individual self-starting and stabilizing experiments, sequential self-starting and stabilizing experiments, and simultaneous self-starting and stabilizing experiments of the double-rotor inverted pendulum, and observe the control effect;
[0035] 5.4) Design an energy control method pendulum starting controller. Set that during the process of the pendulum rod starting to swing from vertically downward, the energy of the pendulum rod is:
[0036]
[0037] In the formula, J is the moment of inertia of the pendulum rod, ω is the angular velocity of the pendulum rod, The energy required for the pendulum rod to swing from the vertically hanging state to the highest position and the speed decreases to 0 is:
[0038] E0 = 2mgl
[0039] The motion equation of the double-rotor inverted pendulum system is:
[0040]
[0041] In the formula, u is the amount of input control force. Combining the above two formulas, we can get the time derivative of the pendulum energy:
[0042]
[0043] According to the analysis of the motion state of the pendulum in the double-motor inverted pendulum system, the external force is taken as:
[0044]
[0045] Where k s is the gain coefficient, according to the formula Write the S-Function program of Simulink, build a self-swing controller based on the energy control method, and combine it with the LQR stable swing program written above to design a switching controller from swinging to stable swing. When the inverted pendulum reaches the stable swing condition, that is, the angle between the pendulum and the vertical upward direction is less than 15°, the swing controller is switched to the stable swing controller, and it is merged into a self-swing and stable swing control program for the double-acting inverted pendulum driven by a linear motor. By debugging the gain coefficient k in the swing controller based on the energy control method, the control program can be realized. s And the optimal control vector matrix K of the LQR stabilization controller, and by formulating control strategies, the separate self-swinging stabilization experiment, sequential self-swinging stabilization experiment and simultaneous self-swinging stabilization experiment of the double-motor inverted pendulum are realized, and the control effect is observed.
[0046] Compared with the prior art, the present invention has the following advantages:
[0047] 1. Compared with the existing inverted pendulum platform, it can not only complete various experiments of starting and stabilizing the inverted pendulum test bench, but also conduct various experiments of coordinated motion control, synchronous motion control and combined with inverted pendulum starting and stabilizing control, which is more in line with the control requirements in actual engineering applications;
[0048] 2. Using MATLAB, the sequential and simultaneous swing control strategies of the parallel double-actuator inverted pendulum were designed, providing a reference for the operator's theoretical research and experiments on control principles;
[0049] 3. The motion control program and visualization interface of the inverted pendulum experimental platform were designed and developed using LABVIEW, realizing the initialization, axis motion control and inverted pendulum experimental control program jump functions, and accurately controlling the precise position movement and information feedback visualization interface before the inverted pendulum swing experiment. Compared with the existing inverted pendulum experimental platform, the operation before the experiment is more accurate and convenient;
[0050] 4. The use of linear motor drive greatly reduces factors unrelated to the control method, such as transmission mechanism failure, error, nonlinearity, etc., and increases the accuracy, stability and reliability of control;
[0051] 5. The double-rotor inverted pendulum structure of the experimental platform is designed as two parallel guide rails, which solves the problems of excessive floor area and excessive length of existing experimental equipment, and the two parallel guide rails can more intuitively observe the experimental phenomena of synchronous motion control and coordinated motion control. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a schematic structural diagram of the parallel double-rotor inverted pendulum experimental platform of the present invention;
[0053] Figure 2 It is a system development flowchart of the control method of the parallel double-rotor inverted pendulum experimental platform of the present invention;
[0054] Figure 3 It is a schematic diagram of the composition of the control system of the experimental platform in the present invention.
[0055] The reference numerals of each component in the figure are as follows:
[0056] Installation platform 1, guide rail 2, rotor seat 3, drag chain 4, L-shaped connecting piece 5, pendulum rod bracket 6, pendulum rod 7, rotary encoder 8, magnetic grating encoder 9, cable box 10 DETAILED DESCRIPTION OF THE INVENTION
[0057] Next, the technical solutions of the present invention will be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
[0058] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is 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 orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.
[0059] Such as Figure 1As shown in the figure, a parallel double-rotor inverted pendulum experimental platform includes an installation platform 1. There are two parallel guide rails 2 on the installation platform 1. Each of the guide rails 2 is provided with a rotor seat 3. The drag chain 4 of the linear motor is connected to the L-shaped connecting piece 5 provided on the rotor seat 3 by bolts. Inverted pendulums are installed on the rotor seats 3. The inverted pendulum includes a pendulum rod support 6 vertically installed on the rotor seat 3. A pendulum rod 7 is hinged on the pendulum rod support 6. A rotary encoder 8 for real-time feedback of the angle of the pendulum rod 7 is installed at the hinged position of the pendulum rod support 6 and the pendulum rod 7. A magnetic grating encoder 9 for collecting the position of the pendulum rod support 6 is provided on the rotor seat 3. The linear motor, the rotary encoder 8, and the magnetic grating encoder 9 are connected to the controller.
[0060] In this embodiment, limit switches for limiting the position of the inverted pendulum are installed at a certain position away from the edges on both sides of the guide rail 2. The pendulum rod support 6 is installed on the rotor seat 3 through a base. There are two cable arrangement boxes 10 for placing the experimental platform cable lines between the two guide rails 2. The cable arrangement box 10 is provided with interfaces for connecting the power supply and the controller. The controller includes an industrial computer and a motion control card. The industrial computer obtains the displacement of the inverted pendulum and the angle of the pendulum rod 7 measured by the rotary encoder 8 and the magnetic grating encoder 9 in real time through the motion control card, and controls the linear motor to drive the rotor seat 3 to move through the control program decision-making to maintain the stable swing of the inverted pendulum, forming a closed-loop control.
[0061] In this embodiment, the linear motor provides accurate and stable linear motion for the system. It can control the two rotor seats 3 for complex control strategy research, or it can also choose to control only one of the rotor seats 3 to realize the experiment of the traditional single-rotor inverted pendulum.
[0062] In this embodiment, the controller uses the XPCIE1032H motion control card of Zmotion Company. The industrial computer is used to realize PC real-time control and data processing. The communication interface is EtherCAT bus communication. The power supply interface accesses the AC220V, 50Hz power supply. A servo motor driver is used to receive control signals and accurately control the motion of the linear motor. The software part uses LABVIEW to complete the initialization of the bus motion control and the data visualization interface, as well as the preliminary work of the experimental control. MATLAB is used to design the Bang-Bang and energy control method starting controllers for the parallel double-rotor inverted pendulum, and combined with the LQR stable swing controller respectively, the starting and stable swing control experiments of the single-rotor inverted pendulum, the sequential starting and stable swing of the double-rotor, and the simultaneous starting and stable swing control experiments are realized.
[0063] In this embodiment, the industrial control computer obtains the displacement of the inverted pendulum and the angle of the pendulum rod 7 measured by the sensor in real time through the motion control card, and controls the movement of the linear motor mover seat 3 through the control program decision-making to maintain the stable swing of the inverted pendulum, forming a closed-loop control. The motion control unit is arranged in the control cabinet, and the control cabinet includes an industrial control computer, a communication interface for EtherCAT bus communication, a power supply interface of AC220V, 50Hz, and a servo motor driver.
[0064] Combined with Figure 2 As shown, the control method of the parallel double-mover inverted pendulum experimental platform in this embodiment includes the following steps:
[0065] 1) Conduct an overall design of the parallel double-mover inverted pendulum experimental platform driven by a linear motor, and design and select each hardware part;
[0066] 2) Build a parallel double-mover inverted pendulum experimental platform driven by a linear motor, and conduct test experiments on the magnetic grating encoder 9, the rotary encoder 8, and the linear motor;
[0067] 3) Establish a mathematical model of the double-mover inverted pendulum;
[0068] 4) Design the motion control program and the visualization interface of the double-mover inverted pendulum experimental platform;
[0069] 5) Design the LQR stable swing controller and the Bang-Bang starting swing controller of the double-mover inverted pendulum experimental platform, and combine them to achieve the self-starting swing experiment.
[0070] Among them, in order to prevent the floor area from being too large and the length from being too long, and the two parallel guide rails 2 can more intuitively observe the experimental phenomena of synchronous motion control and coordinated motion control, the double-mover inverted pendulum structure is designed as a parallel guide rail. In this embodiment, the effective stroke of the guide rail 2 is selected as 640mm, the overall length of the experimental platform is 892mm, and the width is 500mm.
[0071] In this embodiment, step 2) includes the following steps:
[0072] 2.1) Install the guide rail 2;
[0073] 2.2) Install the magnetic grating encoder 9 on the mover seat 3 to measure and feedback the position information of the inverted pendulum. Two limit switches are installed at 100mm from the edge of the guide rail 2 to prevent the mover from exceeding the predetermined range and protect the safety of the equipment. Two handles are installed at both ends of the guide rail 2 to facilitate the handling and movement of the experimental platform;
[0074] 2.3) Install the inverted pendulum on the slider seat 3. The pendulum rod 7 is hinged on the pendulum rod bracket 6, and a rotary encoder 8 is installed at the hinge of the pendulum rod 7 to measure and feedback the angular information of the pendulum rod 7. The drag chain 4 of the linear motor is connected to the L-shaped connecting piece 5 on the slider seat 3 by bolts. When the slider seat 3 slides on the guide rail 2, it drives the pendulum rod 7 of the inverted pendulum to swing to the equilibrium position and keep the pendulum rod 7 balanced.
[0075] 2.4) Connect the linear motor, rotary encoder 8 and magnetic grating ruler encoder 9 to the controller.
[0076] In this embodiment, step 3) includes the following steps:
[0077] 3.1) Simplify the double-slider inverted pendulum system model driven by the linear motor into the analysis of two linear first-order inverted pendulum models. Neglect air resistance and friction, and abstract the double-slider inverted pendulum system into two systems composed of a trolley and a homogeneous rod.
[0078] 3.2) By analyzing the forces on the double-slider inverted pendulum system in the horizontal and vertical directions, the motion equations of the double-slider inverted pendulum system can be obtained:
[0079]
[0080] In the formula, x is the trolley position, M is the trolley mass, m is the mass of the pendulum rod 7, b is the trolley friction coefficient, l is the length from the rotation axis of the pendulum rod 7 to the center of mass, Φ is the angle between the pendulum rod 7 and the vertically upward direction, θ is the angle between the pendulum rod 7 and the vertically downward direction, I is the inertia of the pendulum rod 7, and F is the force applied to the trolley.
[0081] 3.3) Linearize the motion equations and then calculate the state space equations of the double-slider inverted pendulum system. Substitute specific data to calculate the state space equation with the trolley acceleration as the input as follows:
[0082]
[0083] In the formula
[0084] Figure 3 is the composition diagram of the control system of the experimental platform in the present invention. These components form a closed-loop system. The magnetic grating ruler encoder 9 feeds back the displacement and speed signals of the trolley to the servo driver and the motion control card. The position and speed signals of the pendulum rod 7 are fed back to the control card by the rotary encoder 8. The industrial computer reads the real-time data from the motion control card, determines the control decision, and the motion control card implements the control decision to generate the corresponding control quantity to make the motor rotate and drive the trolley to move to keep the pendulum rod balanced.
[0085] In this embodiment, in step 4), a motion control program is written by LABVIEW to design a visual interface. The main interface mainly consists of a controller connection module, an axis motion module, and an inverted pendulum experiment module. The functions of the controller connection module include local connection and disconnection of the controller, reading the connection handle, downloading the Bas file, bus initialization, reading the initialization status, reading the number of bus nodes and the number of axes; the functions of the axis motion module include reading the axis number and axis type, reading the feedback positions of the linear motor and the rotary encoder 8, setting the pulse equivalent of the linear motor, controlling the opening and closing of the enable state, setting the speed and acceleration of the linear motor, reading the motion state and axis state of the linear motor, clearing the alarm of the linear motor, clearing the position of the rotary encoder 8, setting the command position of the trolley, and controlling the forward and reverse rotation and stop of the linear motor; the functions of the inverted pendulum experiment module include jumping to the control program of the corresponding experiment in MATLAB Simulink by clicking the corresponding experiment button, which facilitates the operator to conduct the inverted pendulum control experiment without separately opening the MATLAB Simulink experiment control program.
[0086] In this embodiment, in step 5), the following steps are included:
[0087] 5.1) Based on the established state space equation of the double-rotor inverted pendulum system, design the LQR pendulum stabilizing controller. By writing a MATLAB script and calling the lqr command function of MATLAB, solve the optimal problem of the control vector matrix K = lqr(A, B, Q, R), where A is the system state matrix, B is the control input matrix, Q is the state weight matrix, and R is the weight matrix of the control input. According to the state space equation in step 3.3), it can be obtained that
[0088] Take
[0089] Input the values of A, B, Q, and R into the script. Take R = 1, and by changing the trolley position weight coefficient Q 11 and the pendulum angle weight coefficient Q 33 , solve the control vector matrix K. According to the calculated control vector matrix K and the system state quantity X, design the LQR pendulum stabilizing controller: u(t) = -KX(t), and design the LQR pendulum stabilizing control program based on the LQR pendulum stabilizing controller for subsequent inverted pendulum LQR pendulum stabilizing control;
[0090] 5.2) Write the LQR pendulum stabilization control program using MATLAB Simulink, calculate the control vector matrix K of the controller using a MATLAB script, input it into the LQR controller for pendulum stabilization control, control the position of the double-rotor inverted pendulum cart and the angle of the pendulum rod. Manually hold the pendulum rod vertically upward to trigger the pendulum stabilization controller, observe the control effect. If the control effect is not good, adjust the weight coefficient Q of the cart position in the script 11 and the weight coefficient Q of the pendulum rod angle 33 , re-solve the control vector matrix K, and then conduct real-time control experiments. Select the optimal control vector matrix K until pendulum stabilization control can be achieved;
[0091] 5.3) Design a Bang-Bang swing-up controller. Its principle is to give a force that switches with a fixed angle, make the cart move left and right to drag the pendulum rod 7 to swing, convert the kinetic energy of the cart into the potential energy of the pendulum rod 7 until it reaches the swing-up to stabilization switching angle, and convert it into a control algorithm according to the control principle:
[0092]
[0093] In the formula, θ is the angle of the pendulum rod 7, θ is based on vertically downward, and the counterclockwise swing is the positive direction, u is the acceleration value. Write the Bang-Bang swing-up control program in Simulink according to this control algorithm, combine it with the above-written LQR pendulum stabilization control program, and design a switching controller from swing-up to stabilization. When the pendulum rod 7 meets the stabilization condition, that is, the angle between the pendulum rod 7 and the vertically upward direction is less than 15°, switch the swing-up controller to the stabilization controller, and merge them into a self-swing-up and stabilization control program for the linear motor-driven double-rotor inverted pendulum. By debugging the coefficients k1 and k2 in the swing-up controller and the value of the optimal control vector matrix K of the LQR pendulum stabilization controller, obtain k1 = 4.2 and k2 = 4.6 through the empirical trial-and-error method, and conduct separate self-swing-up and stabilization experiments, sequential self-swing-up and stabilization experiments, and simultaneous self-swing-up and stabilization experiments on the double-rotor inverted pendulum respectively by formulating control strategies, and observe the control effect;
[0094] 5.4) Design an energy control method swing-up controller. Set that during the process of the pendulum rod 7 starting to swing from vertically downward, the energy of the pendulum rod 7 is:
[0095]
[0096] In the formula, J is the moment of inertia of the pendulum rod, ω is the angular velocity of the pendulum rod, The energy required for the pendulum rod 7 to swing from the vertically downward state to the highest position and the speed to decrease to 0 is:
[0097] E0 = 2mgl
[0098] The motion equation of the double-rotor inverted pendulum system is:
[0099]
[0100] In the formula, u is the amount of input control force. Combining the above two formulas, we can get the time derivative of the energy of the pendulum 7:
[0101]
[0102] According to the analysis of the motion state of the pendulum rod 7 in the double-motor inverted pendulum system, the external force is:
[0103]
[0104] In the formula, k s is the gain coefficient, according to the formula Write the S-Function program of Simulink, build a self-swing controller based on the energy control method, and design a switching controller from swinging to stable swing in combination with the LQR stable swing program written above. When the inverted pendulum rod 7 reaches the stable swing condition, that is, the angle between the rod 7 and the vertical upward direction is less than 15°, the swing controller is switched to the stable swing controller, and it is merged into a self-swing and stable swing control program for the double-acting inverted pendulum driven by a linear motor. By debugging the gain coefficient k in the swing controller based on the energy control method, the control program can be realized. s And the optimal control vector matrix K of the LQR stabilization controller, and by formulating control strategies, the separate self-swinging stabilization experiment, sequential self-swinging stabilization experiment and simultaneous self-swinging stabilization experiment of the double-motor inverted pendulum are realized, and the control effect is observed.
[0105] Compared with the existing inverted pendulum platform, the parallel double-acting inverted pendulum experimental platform and the control method thereof of the present invention can not only complete various swing-up and stabilization experiments of the existing inverted pendulum experimental platform, but also can carry out various experiments of coordinated motion control, synchronous motion control and combined inverted pendulum swing-up and stabilization control, which is more in line with the control requirements in practical engineering applications; MATLAB is used to design the sequential swing-up and simultaneous swing-up control strategies of the parallel double-acting inverted pendulum, which provides a reference for the operator to conduct theoretical research and experiments on control principles; LABVIEW is used to design and develop the motion control program and visualization interface of the inverted pendulum experimental platform, which realizes initialization, axis The motion control and inverted pendulum experiment control program jump function can accurately control the precise position movement and information feedback visualization interface before the inverted pendulum swinging experiment. Compared with the existing inverted pendulum experimental platform, the operation before the experiment is more accurate and convenient; the linear motor drive is adopted to greatly reduce the factors unrelated to the control method, such as failure, error, nonlinearity of the transmission mechanism, etc., and increase the control accuracy, stability and reliability; the double-motor inverted pendulum structure of the experimental platform is designed as two parallel guide rails, which solves the problem of excessive footprint and long length of existing experimental equipment, and the two parallel guide rails can more intuitively observe the experimental phenomena of synchronous motion control and coordinated motion control.
[0106] Here, it should be noted that the description of the above technical solution is exemplary. This specification can be embodied in different forms and should not be construed as limited to the technical solutions set forth herein. On the contrary, providing these descriptions will make the disclosure of the present invention thorough and complete, and will fully convey the scope disclosed in this specification to those skilled in the art. In addition, the technical solutions of the present invention are only defined by the scope of the claims.
[0107] The examples used to describe the various aspects of this specification and the claims are merely examples, and thus, this specification and the claims are not limited to the details shown. In the above description, when the detailed description of related known functions or configurations is determined to unnecessarily obscure the key points of this specification and the claims, the detailed description will be omitted.
[0108] When using the terms "comprising", "having", and "including" described in this specification, unless otherwise used, it may also have another part or other parts, and the terms used may generally be in the singular but may also represent the plural form.
[0109] Finally, it should be pointed out that the above content is a further detailed description of the invention in combination with specific embodiments. It cannot be considered that the specific implementation of the present invention is only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, simple substitutions made should be regarded as belonging to the protection scope of the present invention. The above embodiments are only relatively representative examples of the present invention. Obviously, the present invention is not limited to the above embodiments and there can be many variations. Any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention should be considered as belonging to the protection scope of the present invention.
[0110] At the same time, it should be noted that the description of the above technical solution is exemplary. This specification can be embodied in different forms and should not be construed as limited to the technical solutions set forth herein. On the contrary, providing these descriptions will make the disclosure of the present invention thorough and complete, and will fully convey the scope disclosed in this specification to those skilled in the art. In addition, the technical solutions of the present invention are only defined by the scope of the claims. The features of the various embodiments of the present invention can be combined or spliced partially or wholly with each other, and can be implemented in various different configurations as can be fully understood by those skilled in the art. The embodiments of the present invention can be implemented independently of each other, or can be implemented together in a mutually dependent relationship.
[0111] For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions or substitutions can also be made, and the above structures should all be regarded as belonging to the protection scope of the present invention.
Claims
1. A parallel double-rotor inverted pendulum experimental platform, comprising a mounting platform (1), characterized in that: On the installation platform (1), there are two parallel guide rails (2). On each of the guide rails (2), there is a mover seat (3). The drag chain (4) of the linear motor is connected to the L-shaped connecting piece (5) provided on the mover seat (3) by bolts. Inverted pendulums are installed on the mover seats (3). Each inverted pendulum includes a pendulum rod support (6) vertically installed on the mover seat (3). A pendulum rod (7) is hinged on the pendulum rod support (6). A rotary encoder (8) for real-time feedback of the angle of the pendulum rod (7) is installed at the hinge of the pendulum rod support (6) and the pendulum rod (7). A magnetic grating encoder (9) for collecting the position of the pendulum rod support (6) is provided on the mover seat (3). The linear motor, the rotary encoder (8), and the magnetic grating encoder (9) are connected to a controller.
2. The parallel double-rotor inverted pendulum experimental platform according to claim 1, wherein: Limit switches for limiting the position of the inverted pendulum are installed at a certain position away from the edges on both sides of the guide rail (2).
3. The parallel double-rotor inverted pendulum experimental platform according to claim 1, wherein: The pendulum rod support (6) is installed on the mover seat (3) through a base.
4. The parallel double-rotor inverted pendulum experimental platform according to claim 1, wherein: Between the two guide rails (2), there are two cable arranging boxes (10) for placing the cables of the experimental platform. The cable arranging boxes (10) are provided with interfaces for connecting the power supply and the controller.
5. The parallel double-rotor inverted pendulum experimental platform according to claim 1, wherein: The controller includes an industrial personal computer and a motion control card. The industrial personal computer obtains the displacement of the inverted pendulum and the angle of the pendulum rod (7) measured by the rotary encoder (8) and the magnetic grating encoder (9) in real time through the motion control card, and decides to control the linear motor to drive the mover seat (3) to move through a control program to maintain the stable swing of the inverted pendulum, forming a closed-loop control.
6. A control method for the parallel double-rotor inverted pendulum experimental platform as described in claim 1, characterized in that: It includes the following steps: (1) Conduct an overall design of the parallel double-mover inverted pendulum experimental platform driven by a linear motor, and design and select each hardware part; (2) Build a parallel double-mover inverted pendulum experimental platform driven by a linear motor, and conduct test experiments on the magnetic grating encoder (9), the rotary encoder (8), and the linear motor; (3) Establish a mathematical model of the double-mover inverted pendulum; (4) Design the motion control program and the visualization interface of the double-mover inverted pendulum experimental platform; (5) Design the LQR stable swing controller and the Bang-Bang starting swing controller of the double-mover inverted pendulum experimental platform, and combine them to achieve the self-starting swing experiment.
7. The control method of the parallel double-rotor inverted pendulum experimental platform according to claim 6, characterized in that: The step (2) includes the following steps: (2.1) Install the guide rail (2); (2.2) Install a magnetic grating encoder (9) on the mover seat (3) to measure and feedback the position information of the inverted pendulum; (2.3) Install the inverted pendulum on the mover seat (3), hinge the pendulum rod (7) on the pendulum rod support (6), and install a rotary encoder (8) at the hinge of the pendulum rod (7) to measure and feedback the angle information of the pendulum rod (7). The drag chain (4) of the linear motor is connected to the L-shaped connecting piece (5) on the mover seat (3) by bolts; (2.4) Connect the linear motor, the rotary encoder (8), and the magnetic grating encoder (9) to the controller.
8. The control method of the parallel double-rotor inverted pendulum experimental platform according to claim 6, characterized in that: The step (3) includes the following steps: (3.1) Simplify the double-mover inverted pendulum system model driven by a linear motor into an analysis of two linear first-order inverted pendulum models, ignore air resistance and friction, and abstract the double-mover inverted pendulum system into two systems composed of a trolley and a homogeneous rod; (3.2) By analyzing the forces in the horizontal and vertical directions of the double-rotor inverted pendulum system, the motion equations of the double-rotor inverted pendulum system can be obtained: Where x is the position of the cart, M is the mass of the cart, m is the mass of the pendulum rod (7), b is the friction coefficient of the cart, l is the length from the rotation axis of the pendulum rod (7) to the center of mass, Φ is the angle between the pendulum rod (7) and the vertically upward direction, θ is the angle between the pendulum rod (7) and the vertically downward direction, I is the inertia of the pendulum rod (7), and F is the force applied to the cart; (3.3) Linearize the motion equations and then calculate the state-space equations of the double-rotor inverted pendulum system. Substitute specific data to calculate the state-space equation with the cart acceleration as the input: In the formula 9. The control method of the parallel double-rotor inverted pendulum experimental platform according to claim 8, characterized in that: In step 4), a motion control program is written through LABVIEW, and a visualization interface is designed. The main interface mainly consists of a controller connection module, an axis motion module, and an inverted pendulum experiment module. The functions of the controller connection module include local connection and disconnection of the controller, reading the connection handle, downloading the Bas file, bus initialization, reading the initialization status, reading the number of bus nodes and the number of axes; the functions of the axis motion module include reading the axis number and axis type, reading the feedback positions of the linear motor and the rotary encoder (8), setting the pulse equivalent of the linear motor, controlling the opening and closing of the enable state, setting the speed and acceleration of the linear motor, reading the motion status and axis status of the linear motor, clearing the alarm of the linear motor, zeroing the position of the rotary encoder (8), setting the command position of the cart, and controlling the forward and reverse rotation and stop of the linear motor; the functions of the inverted pendulum experiment module include jumping to the control program of the corresponding experiment in MATLAB Simulink by clicking the corresponding experiment button.
10. The control method of the parallel double-rotor inverted pendulum experimental platform according to claim 8, characterized in that: In step 5), the following steps are included: (5.1) Based on the established state - space equations of the double - actuator inverted pendulum system, design the LQR pendulum - stabilizing controller. By writing a MATLAB script and calling the lqr command function in MATLAB to solve the above - mentioned optimal problem, change the trolley - position weight coefficient Q in the script 11 and the pendulum - angle weight coefficient Q 33 , solve the control - vector matrix K for the subsequent LQR pendulum - stabilizing control of the inverted pendulum; (5.2) Write the LQR pendulum stabilization control program using MATLAB Simulink, calculate the control vector matrix K of the controller using a MATLAB script, input it into the LQR controller for pendulum stabilization control, control the position of the double-rotor inverted pendulum cart and the angle of the pendulum rod (7), manually hold the pendulum rod (7) upright to trigger the pendulum stabilization controller, observe the control effect. If the control effect is not good, adjust the position weight coefficient Q of the cart in the script 11 and the angle weight coefficient Q of the pendulum rod 33 , re-solve the control vector matrix K, and then conduct real-time control experiments. Select the optimal control vector matrix K until pendulum stabilization control can be achieved; (5.3) Design a Bang-Bang swing-up controller. Its principle is to give a force that switches with a fixed angle, make the cart move left and right to drag the pendulum rod (7) to swing, convert the kinetic energy of the cart into the potential energy of the pendulum rod (7), until reaching the stable swing switching angle, and convert it into a control algorithm according to the control principle: Where θ is the angle of the pendulum rod (7), θ is based on the vertically downward direction, and the counterclockwise swing is the positive direction, and u is the acceleration value. Write the Bang-Bang swing-up control program in Simulink according to this control algorithm, combine it with the above-written LQR stable swing control program, and design a switching controller from swing-up to stable swing. When the pendulum rod (7) reaches the stable swing condition, that is, the angle between the pendulum rod (7) and the vertically upward direction is less than 15°, switch the swing-up controller to the stable swing controller, and merge it into the self-swing-up and stable swing control program of the linear motor-driven double-rotor inverted pendulum. By debugging the coefficients k1 and k2 in the swing-up controller and the value of the optimal control vector matrix K of the LQR stable swing controller, and by formulating control strategies, respectively implement the single self-swing-up and stable swing experiment, sequential self-swing-up and stable swing experiment, and simultaneous self-swing-up and stable swing experiment of the double-rotor inverted pendulum, and observe the control effect; (5.4) Design an energy control method swing-up controller. Set that during the process of the pendulum rod (7) starting to swing from the vertically downward direction, the energy of the pendulum rod (7) is: where J is the moment of inertia of the swing rod and ω is the angular velocity of the swing rod. The energy required for the swing rod (7) to swing from the vertically downward state to the highest position and the speed to decrease to 0 is: E0 = 2mgl The motion equations of the double-rotor inverted pendulum system are as follows: In the formula, u is the amount of the input control force. By combining the above two formulas, the derivative of the energy of the pendulum rod (7) with respect to time is obtained: According to the analysis of the motion state of the pendulum rod (7) in the double-rotor inverted pendulum system, the external force is taken as: where k s is the gain coefficient, and according to the formula write the S-Function program of Simulink, build a self-swing-up controller based on the energy control method, and combine the above-written LQR swing-stabilization program to design a switching controller from swing-up to swing-stabilization. When the pendulum rod (7) of the inverted pendulum reaches the swing-stabilization condition, that is, the angle between the pendulum rod (7) and the vertically upward direction is less than 15°, switch the swing-up controller to the swing-stabilization controller, and merge it into the self-swing-up and swing-stabilization control program of the linear motor-driven double-rotor inverted pendulum. By debugging the gain coefficient k s and the optimal control vector matrix K of the LQR swing-stabilization controller, and respectively implement the single self-swing-up and swing-stabilization experiment, sequential self-swing-up and swing-stabilization experiment, and simultaneous self-swing-up and swing-stabilization experiment of the double-rotor inverted pendulum by formulating control strategies, and observe the control effects.