Given the following system
Need to find control law to stabilize the inverted pendulum. First we need to obtain the equations of motions.
Let the Lagrangian coordinates be and as shown. Let be the Lagrangian. Let be the kinetic energy of the system and let be the potential energy. Hence
Where is the linear velocity of the blob relative to the inertial system.
Hence, since , we obtain
And since the blob is losing potential energy as it move downwards, we obtain as (assuming zero potential energy is the ground level)
Therefore the Lagrangian is
To obtain the equation of motions, we need to evaluate for each Lagrangian coordinate and is the generalized force for that coordinate. Hence for we obtain
Hence EQM for is
Now we need to obtain for the coordinate . Apply a virtual displacement and determine the work done by
Hence the work done by is making virtual displacement is zero, since is not in the line of force along this displacement. Therefore, the EQM for is from Eq (1) above
Now we find EQM for coordinate
Hence EQM for is
Now we need to find for . Apply virtual displacement in the direction, and find work done by
But , hence we see that , therefore, the EQM becomes
Conclusion: The two equations of motion are
Assuming small angle approximation gives
Now we solve for and from Eqs (4) and (5). From Eq (5)
Substituting the above into Eq (4) gives
Using result for found in Eq (6) and substituting into (5) gives
To summarize what we have so far. We have obtained two linearized equations of motion for and and they are the following
Now we convert the equations to state space. Let , hence
Writing the above in the form we obtain
To determine the stability of the above system (now that it is a linear system since we have linearized it), we first find the equilibrium point. This is found by setting , and this results in , i.e. and . Notice that the value of is not important for the equilibrium point. Now we need to determine if this point is stable or not.
Since are all positive, we see that one root will be in the RHS of the complex plane. Therefore the open loop system is unstable.
To stabilize it, we need to supply a control law to force the roots of the new matrix to be all in the LHS of the complex plane.
Hence Eq (7) becomes
We now need to determine and . Assume we require that the closed loop poles be located at
Hence, the characteristic polynomial is
Compare Eqs (8,9) we obtain the following
Therefore, given we can find which will generate force which will keep the poles of the closed loop system in the LHS of the complex plane, and keep the inverted pendulum stable. For example, for , we obtain
We will now generate the solution for some initial conditions and plot these solutions against time. In the first case, we assume is zero. Hence we will observe that the system is unstable, i.e. will grow away from the marginally stable position which is and will not return back. Next, we will introduce as determined in the previous section, and observe the new solution to see that it remains near or at the position.
First, we need to decide on some initial conditions. These must be such that close to zero and for we can use . Hence, let
To determine , which is the solution of the system, we first must solve equation (7) and (8) for the above IC.
The solution to (7) is given by solution to
Taking Laplace transform of (10) we obtain
Therefore, the solution to
Therefore, the solution to which is is given by
Let , we plot the above solution for up to seconds
We plot the solution to (8), which is the state space equation with the stabilizing control law derived above,which is the following
Where the above values determined to cause the closed loop poles to be located at
To make the computation easier, we now substitute numerical values for all the above parameters, which are , and we obtain
Using and solving for we obtain
Using CAS system to matrix inverse the above and obtain the inverse Laplace transform, and pick the solution and plot it, we observe that now the system becomes stable as expected.
We observe from the above plots and the plots shown in the computation section that with the control law derived to force the poles of the closed loop to be stable, the inverted pendulum has been stabilized.
The final angle that the inverted pendulum makes with the vertical does go to zero.
From the plot of the position , we see that the cart moves to the right and away from the position, then it return back to position, while in the same time, the pendulum swings back and forth about the position before it finally settles down at the stable position.
This shows the using pole placement resulted in an effective control law which stabilized the system. Small angle approximation was used and the initial angle used was also assumed to be small.