毕业设计-control-of-an-inverted-pendulum-外文文献.doc

上传人:知****量 文档编号:93235743 上传时间:2023-07-01 格式:DOC 页数:11 大小:453.50KB
返回 下载 相关 举报
毕业设计-control-of-an-inverted-pendulum-外文文献.doc_第1页
第1页 / 共11页
毕业设计-control-of-an-inverted-pendulum-外文文献.doc_第2页
第2页 / 共11页
点击查看更多>>
资源描述

《毕业设计-control-of-an-inverted-pendulum-外文文献.doc》由会员分享,可在线阅读,更多相关《毕业设计-control-of-an-inverted-pendulum-外文文献.doc(11页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、Control of an Inverted PendulumJohnny LamAbstract: The balancing of an inverted pendulum by moving a cart along a horizontal track is a classic problem in the area of control. This paper will describe two methods to swing a pendulum attached to a cart from an initial downwards position to an upright

2、 position and maintain that state. A nonlinear heuristic controller and an energy controller have been implemented in order to swing the pendulum to an upright position. After the pendulum is swung up, a linear quadratic regulator state feedback optimal controller has been implemented to maintain th

3、e balanced state. The heuristic controller outputs a repetitive signal at the appropriate moment and is finely tuned for the specific experimental setup. The energy controller adds an appropriate amount of energy into the pendulum system in order to achieve a desired energy state. The optimal state

4、feedback controller is a stabilizing controller based on a model linearized around the upright position and is effective when the cart-pendulum system is near the balanced state. The pendulum has been swung from the downwards position to the upright position using both methods and the experimental r

5、esults are reported.1. INTRODUCTION The inverted pendulum system is a standard problem in the area of control systems. They are often useful to demonstrate concepts in linear control such as the stabilization of unstable systems. Since the system is inherently nonlinear, it has also been useful in i

6、llustrating some of the ideas in nonlinear control. In this system, an inverted pendulum is attached to a cart equipped with a motor that drives it along a horizontal track. The user is able to dictate the position and velocity of the cart through the motor and the track restricts the cart to moveme

7、nt in the horizontal direction. Sensors are attached to the cart and the pivot in order to measure the cart position and pendulum joint angle, respectively. Measurements are taken with a quadrature encoder connected to a MultiQ-3 general purpose data acquisition and control board. Matlab/Simulink is

8、 used to implement the controller and analyze data. The inverted pendulum system inherently has two equilibria, one of which is stable while the other is unstable. The stable equilibrium corresponds to a state in which the pendulum is pointing downwards. In the absence of any control force, the syst

9、em will naturally return to this state. The stable equilibrium requires no control input to be achieved and, thus, is uninteresting from a control perspective. The unstable equilibrium corresponds to a state in which the pendulum points strictly upwards and, thus, requires a control force to maintai

10、n this position. The basic control objective of the inverted pendulum problem is to maintain the unstable equilibrium position when the pendulum initially starts in an upright position. The control objective for this project will focus on starting from the stable equilibrium position (pendulum point

11、ing down), swinging it up to the unstable equilibrium position (pendulum upright), and maintaining this state.2. MODELLING A schematic of the inverted pendulum is shown in Figure 1.Figure 1. Inverted Pendulum SetupA cart equipped with a motor provides horizontal motion of the cart while cart positio

12、n, p, and joint angle, , measurements are taken via a quadrature encoder. By applying the law of dynamics on the inverted pendulum system, the equations of motion are where mc is the cart mass, mp is the pendulum mass, I is the rotational inertia, l is the half-length of the pendulum, R is the motor

13、 armature resistance, r is the motor pinion radius, Km is the motor torque constant, and Kg is the gearbox ratio. Also, for simplicity,and note that the relationship between force, F, and voltage, V, for the motor is:Let the state vector be defined as:Finally, we linearize the system about the unsta

14、ble equilibrium(0 0 0 0)T.Note that = 0 corresponds to the pendulum being in the upright position. The linearization of the cart-pendulum system around the upright position is:WhereFinally, by substituting the parameter values that correspond to the experimental setup:3. STABILIZING CONTROLLER DESIG

15、N The controller design approach for this project is broken up into two components. The first part involves the design of an optimal state feedback controller for the linearized model that will stabilize the pendulum around the upright position. The second part involves the design of a controller th

16、at swings the pendulum up to the unstable equilibrium. When the pendulum approaches the linearized point, the control will switch to the stabilizing controller which will balance the pendulum around the upright position. The state feedback controller responsible for balancing the pendulum in the upr

17、ight position is based on a Linear Quadratic Regulator (LQR) design using the linearized system. In a LQR design, the gain matrix K for a linear state feedback control law u = -Kx is found by minimizing a quadratic cost function of the formwhere Q and R are weighting parameters that penalize certain

18、 states or control inputs. The weighting parameters chosen in the design of the optimal state feedback controller are:Based on this design, the controller gain matrix for the linearized system is:By using this K and the control law u = -Kx, the system is stabilized around the linearized point (pendu

19、lum upright). Since this control law is based on the linearized system, the state feedback optimal controller is only effective when the pendulum is near the upright position.4. STATE ESTIMATION For the inverted pendulum experimental setup, not all the state variables are available for measurement.

20、In fact, only the cart position, p, and the pendulum angle, , are directly measured. This means that the cart velocity and the pendulum angular velocity are not immediately available for use in any control schemes beyond just stabilization. Thus, an observer is relied upon to supply accurate estimat

21、ions of the states at all cart-pendulum positions. A linear full state observer can be implemented based on the linearized system derived earlier. This observer is simple in design and provides accurate estimation of all the states around the linearized point. The observer is implemented by using a

22、duplicate of the linearized system dynamics and adding in a correction term that is simply a gain on the error in the estimates. The observer gain matrix is determined by an LQR design similar to that used to determine the gain of the optimal state feedback stabilizing controller. In this case, the

23、weighting parameters are chosen to be:Based on this design, the observer gain matrix is:Since the linear full state observer is based on the linearized system, it is only effective in estimating the state variables when the cart-pendulum system is near the upright position. Thus, a low-pass filtered

24、 derivative is used to estimate the two unmeasured states, cart velocity and pendulum angular velocity, when the system is not close to the unstable equilibrium. This method approximates the cart velocity and pendulum angular velocity by using a finite difference and then passing it through a low-pa

25、ss filter. The following filter is chosen for this estimation method:The problems with such a method are that it introduces some delay and has a gain that is slightly less than one. The state estimates obtained from the filtered derivative, however, are reasonably accurate for the swing-up controlle

26、rs implemented in this paper.5. SWING-UP CONTROLLER DESIGNTwo different control schemes were implemented to swing the pendulum from the downwards position to the upright position. The first is a heuristic controller that provides a constant voltage in the appropriate direction and, thus, drives the

27、cart back and forth along the track repeatedly. It will repeat this action until the pendulum is close enough to the upright position such that the stabilizing controller can be triggered to maintain this balanced state. The second scheme is an energy controller that regulates the amount of energy i

28、n the pendulum. This controller inputs energy into the cart-pendulum system until it attains the energy state that corresponds to the pendulum in the upright position. Similar to the heuristic control method, the energy control method will also switch to the stabilizing controller when the pendulum

29、is close to the upright position. The switch that triggers the stabilizing controller in both cases is activated when the pendulum is within 5 of the upright position and the angular velocity is slower than 2.5 radians per second.Heuristic Controller The heuristic controller is a logic-based control

30、 design that determines the direction and the moment in time the cart should move depending on the state of the system. A specific voltage gain is applied to the cart motor based on results from repeated experimentation. This controller will make the cart drive forward or back whenever the pendulum

31、crosses the downwards position and depending on the direction that the pendulum is swinging when it reaches the downwards position.The logic-based control design is completely dependent on the pendulum angle, one of the available measured state variables. The control scheme will change the direction

32、 of the cart movement whenever the pendulum angle crosses the downwards position. Since this control design is based solely on the pendulum angle, the downwards position is the optimal moment in time to add energy to the pendulum by moving the cart in the appropriate direction. The direction the car

33、t moves is the opposite sign of the pendulum angle immediately after it crosses the downwards position. When the direction of the cart movement is determined, a constant voltage gain is applied to the cart motor in that same direction until the pendulum returns to the downwards position. This contro

34、l scheme will effectively move the cart back and forth along the track repeatedly until the pendulum swings close enough to the upright position. It is important to note that the nature of this control scheme is that the same cart movement is applied regardless of whether the pendulum is above or be

35、low the horizontal axis (since the sign of the pendulum angle remains the same). The nature of the cart-pendulum system, however, is that the same cart movement that once added energy to the pendulum while it was below the horizontal axis now actually takes away energy from the pendulum. Eventually,

36、 the pendulum will reach a point where it can add no more energy to the pendulum system but it has yet to build enough energy to reach the upright position. To avoid this phenomenon, a switch has been implemented that changes the voltage input to the cart motor to 0 when the pendulum is 135 from the

37、 downwards position. As a result, the cart will not move to take energy away from the pendulum system when the pendulum is higher than 135. This will allow the pendulum to simply return to the downwards position without losing anymore energy. When the pendulum crosses the downwards position again, t

38、he logic-based controller will be able to add more energy to the pendulum until it eventually approaches the upright position. The voltage gain of this control scheme is determined by repeated experimentation. There is a direct correlation between the time it takes to swing the pendulum to its uprig

39、ht position and the magnitude of the voltage gain. A gain that is too high, though, may make the pendulum approach the upright position with too high a velocity and, thus, the stabilizing controller will be unable to balance the pendulum. On the other hand, a gain too low may not provide enough ener

40、gy to the pendulum so that it can reach the upright position. Also, the reliability of the controller in performing the task varies depending on the gain selected. Thus, repeated experimentation is required to finely tune the gain so that the pendulum approaches the upright position with just the ri

41、ght amount of velocity and in a reasonable amount of time with a high success rate. Energy Controller The swinging up of a pendulum from the downwards position can also be accomplished by controlling the amount of energy in the system. The energy in the pendulum system can be driven to a desired val

42、ue through the use of feedback control. By adding in enough energy such that its value corresponds to the upright position, the pendulum can be swung up to its unstable equilibrium. When the pendulum is close to the upright position, the stabilizing controller designed earlier can be triggered to ca

43、tch the pendulum and balance it around the unstable equilibrium.The system is defined such that the energy, E, is zero in the upright position. The energy of the pendulum can be written asWhereand mp is the mass of the pendulum, l is the half-length of the pendulum, g is the acceleration of gravity,

44、 and I is the rotational inertia. Thus, the energy in the pendulum is a function of the pendulum angle and the pendulum angular velocity. Note also that the energy corresponding to the pendulum in the downwards position is -2mpgl. The goal of the control scheme is to add energy into the system until

45、 the value corresponds to the pendulum in the upright position. The control law implemented to achieve the desired energy iswhere k is a design parameter and E0 is the desired energy level. The control output, a, is the acceleration of the pivot which can be translated to a voltage input to the cart

46、 motor by using equation (4) and the fact that:for the system. In this control scheme, the satV function is defined as the value for which the voltage supplied to the cart saturates. This controller essentially uses pendulum angle and pendulum angular velocity to determine the direction the cart sho

47、uld move at any point in time. A proportional controller that scales with the amount of energy still required to achieve the desired energy state dictates the amount of voltage applied to the cart motor. The value of the parameter V in satV dictates the maximum amount of control signal available and

48、 thus the maximum amount of energy increase to the pendulum system. The value of k determines how much the control favors using the maximum control input to achieve the desired energy state. This control is effective in increasing the energy of the pendulum to a desired value. When used as a swing-u

49、p control method, the desired value corresponds to the energy of the pendulum in its upright position. This will allow the switch to be triggered so that the stabilizing controller can be used to catch the pendulum and balance it around the unstable equilibrium point.6. EXPERIMENTAL RESULTS Results were gathered from the implementation of both swing-up control methods. Data were collected from experimental runs where each control scheme swings up th

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁