You are on page 1of 5

The cart with an inverted pendulum, shown below, is "bumped" with an impulse force, F.

To Determine the dynamic equations of motion for the system, and linearize about the pendulum's angle, theta = Pi (in other words, assume that pendulum does not move more than a few degrees away from the vertical, chosen to be at an angle of Pi).

For this example, let's assume that


M m b l I F x theta mass of the cart mass of the pendulum friction of the cart length to pendulum center of mass inertia of the pendulum force applied to the cart cart position coordinate pendulum angle from vertical 0.5 kg 0.5 kg 0.1 N/m/sec 0.3 m 0.006 kg*m^2

we will assume that the system starts at equilibrium, and experiences an impulse force of 1N. The pendulum should return to its upright position within 5 seconds, and never move more than 0.05 radians away from the vertical.

The design requirements for this system are:


Settling time of less than 5 seconds. Pendulum angle never more than 0.05 radians from the vertical.

However, with the state-space method we are more readily able to deal with a multioutput system. Therefore, for this section of the Inverted Pendulum example we will attempt to control both the pendulum's angle and the cart's position. To make the design more challenging we will be applying a step input to the cart. The cart should achieve it's desired position within 5 seconds and have a rise time under 0.5 seconds. We will also limit the pendulum's overshoot to 20 degrees (0.35 radians), and it should also settle in under 5 seconds. The design requirements for the Inverted Pendulum state-space example are:

Settling time for x and theta of less than 5 seconds. Rise time for x of less than 0.5 seconds. Overshoot of theta less than 20 degrees (0.35 radians).

Force analysis and system equations


Below are the two Free Body Diagrams of the system.

Summing the forces in the Free Body Diagram of the cart in the horizontal direction, you get the following equation of motion:

Note that you could also sum the forces in the vertical direction, but no useful information would be gained.

Summing the forces in the Free Body Diagram of the pendulum in the horizontal direction, you can get an equation for N:

If you substitute this equation into the first equation, you get the first equation of motion for this system:
(1)

To get the second equation of motion, sum the forces perpendicular to the pendulum. Solving the system along this axis ends up saving you a lot of algebra. You should get the following equation:

To get rid of the P and N terms in the equation above, sum the moments around the centroid of the pendulum to get the following equation:

Combining these last two equations, you get the second dynamic equation:
(2)

Since Matlab can only work with linear functions, this set of equations should be linearized about theta = Pi. Assume that theta = Pi + ( represents a small angle from the vertical upward direction). Therefore, cos(theta) = -1, sin(theta) = -, and (d(theta)/dt)^2 = 0. After linearization the two equations of motion become (where u represents the input):

1. Transfer Function To obtain the transfer function of the linearized system equations analytically, we must first take the Laplace transform of the system equations. The Laplace transforms are:

NOTE: When finding the transfer function initial conditions are assumed to be zero. Since we will be looking at the angle Phi as the output of interest, solve the first equation for X(s),

then substituting into the second equation:

Re-arranging, the transfer function is:

where,

From the transfer function above it can be seen that there is both a pole and a zero at the origin. These can be canceled and the transfer function becomes:

2. State-Space After a little algebra, the linearized system equations equations can also be represented in state-space form:

The C matrix is 2 by 4, because both the cart's position and the pendulum's position are part of the output. For the state-space design problem we will be controlling a multi-output system so we will be observing the cart's position from the first row of output and the pendulum's with the second row.

You might also like