Inverted Pendulum Balancing

J

Thread Starter

Javier

Hi there!

I am developing a controller for my final career project. My problem is the swing-up and balance of an inverted pendulum mounted on a cart.

I am at the stage of design and simulate the different control strategies which I am going to implement in a real time target using Lab-view.

I have some questions which I´d like to share with you in order to get some kind of orientation, regarding the control strategies of the balance problem. We are going to use the State Space formulation and theory and the state selected is going to be (x,x_dot,theta,theta_dot), this is, the position and velocity of both the cart along the rail and the pendulum (angular), from the vertical.

First of all,I have to stabilize the pendulum in his vertical position using the movement of the cart, which I can control by a small voltage controlled DC motor. I have available for measuring (with relative precision) only 2 variables of the state for measuring, (x and theta).

If I choose Theta as my output, I have a SISO system and an obvious regulator problem.

My doubt here is when doing this, a mode cancellation occurs and the representation loses his observability (although is still controllable), so what is the point to develop a state feedback controller by pole placement or LQR technique if the system is not observable? I am asking that because my tutor told me to do it, but I am reluctant because I am not able to have all of the state available to measure. Despite of the fact that I think that the condition that leads to the existence of a solution if that you have controllability + observability.

Another thing I would want to ask is that in the literature I have consulted (K.Ogata books, mostly) it states that in the Inverted Pendulum the plant has no an integrator, but in my system appears a pole at the origin. (It cancels with a zero when you choose Theta as the output, but not when you choose the X of the cart).

And finally, and I am sorry for the size of this post!, choosing X as the output leads to a SISO system which is controllable and Observable so a solution can be obtained, and therefore you can implement a state feedback plus observer (full or reduced order) controller.

Here the objective is that the position of the cart must follow a reference while maintaining the pendulum vertical. My problem here is with the pre-compensation constant used to adequate the reference prior to the sum block with the feedback branch. It seems that it tends to infinity so no useful control action is obtained.

If the formula is Kr=-1/(C*(A-B*K)^-1*B), that matrix in the denominator tends to a non singular matrix so the inverse dose not exists.
I am trying to do a fine tuning of the poles in closed loop in order to avoid this problem but I am not be able to obtain a valid solution.
I am also trying to do that by choosing a properly stated optimum root loci that leads to a LQR design.

So any help would be very appreciated. Best regards!
 
I'm going to start by saying I've not done an inverted pendulum before but I understand some of the concepts.

You need to monitor your theta primarily and your theta velocity. If, in your system you know you're not going to go past the end of your tracks, you can ignore X and dX.

You're going to have two different "modes" as I see it - "Swing up" and "Balance vertical". Each mode will require a different control approach.

What I might suggest is that you work on the "balance vertical" problem first as it's the easier of the two. Assume your system starts off vertical then gravity takes over. Design your PID control for that set of parameters. Ideally your theta is going to be zero and any change in angle should be met with an appropriate position change on the track to maintain zero angle within a specified tolerance.

One thing that will help for sure is a noise filter. :)

I hope this helps, and I'm sorry if I didn't answer your question directly.
 
Thank Paul!

I have to note that I have already the work in an intermediate "tuning the controller phase". I am accomplishing the task separating the two control phases "swing-up" and "balance".

I am attacking the "swing-up" phase by a energy control approach following the work of Astrom-Furuta.

For the balance, I have to develop a state space approach, I have to design by pole placement, an LQR and compare results. This two strategies are going to be implemented in real time in order to be presented in front of a tribunal. The physical plant has two quadrature encoders attached to the pendulum and the DC motor shaft, so only the pendulum´s angle and the cart position are available for proper measure, if I need the velocities for feedback either I have to differentiate the positions (with noise problems attached) or implement an observer.(Both full order and reduced order are going to be implemented in order to comparison)

My specific question is regarding that if my plant has a pole at the origin, it means that the plan has an integrator, so if I am choosing the X as output variable (because therefore the system is controllable + observable) the proper way to control using state feedback is using an properly chosen constant to adequate the reference (K1 as I stated before).

So then, why in the K. Ogata book it says that the inverted pendulum has not an integrator and therefore it adds one to the feed-forward path? Maybe it is because I am including the DC motor dynamic into the state space representation (using the armature voltage Vm as the input instead the force applied directly to the cart)and how I could overcome the problem of choosing K1 properly?
Should I add another integrator into the feed-forward path?

Hope someone could trow some light for those questions!

Best regards.
 
Any further help or tips about how to tune an LQR is still needed and will be very appreciated!!
 
Top