# What is the relationship between classical control: transfer functions/frequency domain and the swing-up problem of an inverted pendulum

I am still pretty new to control theory, but I have been studying both classical and modern state space/optimal control ideas. I am having trouble understanding what the frequency domain/transfer function view is on some of the challenges of optimal control, for example the inverted pendulum swing-up problem.

Problem definition:

So in optimal control I may have an inverted pendulum system where the pendulum is currently facing down--at a stable fixed point. The objective is to move the pendulum from the stable fixed point to the unstable fixed point where the pendulum is pointing straight up. Now I have some actuation on the pendulum, but there are some torque limits.

Trajectory Optimization:

There are a few ways to solve this inverted pendulum problem. One way is "trajectory optimization" which uses convex optimization ideas to find the control policy to drive the pendulum to the top location, meaning the unstable fixed point. I might also be able to use something like fitted value iteration to find a swing-up policy, but generally the fitted value iteration solution is not very robust.

Question:

So I can understand why the "swing-up" problem seems difficult in optimal control, but I don't have a clear sense of how to formulate this same problems as a transfer function or in the frequency domain? I mean I could compute the transfer function for the pendulum equation. However, I am not sure if a PID controller could find a suitable control law to bring the pendulum to the top? Of course, as the pendulum approaches the linear region of the unstable fixed point at the top, I could linearize and use LQR control to stabilize the dynamics. But I am still not clear how this swing-up problem is modeled in the classical control sense.

Thanks.

• PID control would be unsuitable anyway, because it is marginal to useless in systems with a double integrator such as a pendulum (which, when including the actuator itself, can end up being a 3-pole system). More broadly, classical control can readily cope with higher order. Nonlinearity requires more modification, but can still be done classical ish style. Finally if actuator isn't strong enough to lift the pendulum in one swing, and has to swing/pump, would pretty much force you to give up a generalized solution from that point of view - though you could pre-program a trajectory as a hack Commented Mar 30 at 18:37
• @PeteW interesting point. I was watching Russ Tedrake's videos on robotics, so he covers nonlinear problems very well. Does it make practical sense to try classical methods on nonlinear problems? Meaning that I could probably solve a small class of problems this way, but I imagine that using modern control methods on nonlinear control problems would be a better investment of time/effort? Or would a classical controller still be my first try when I explore a new nonlinear system? Commented Mar 30 at 18:44
• If you can locally linearize, you can in principle do some form of gain programming, and use that to follow a pre-programmed trajectory of $(\theta , \dot{\theta})$. It would complicate other aspects of a classical controller, like ARW (but there are generalized approaches to that also). More powerful methods would certainly be appropriate though Commented Mar 30 at 18:45
• Yep, I get what you mean. Thanks for suggesting an approach, I have seen this method before, so I know how to implement it. Thanks again. Commented Mar 30 at 18:54

## 1 Answer

how to formulate this same problems as a transfer function or in the frequency domain? I mean I could compute the transfer function for the pendulum equation.

The range of motion involved in bringing a pendulum from down position to up position means that the systems needs to be treated as a non-linear system unlike the stabilise-in-the-up-position for angles near to the equilibrium case. So transfer function approaches may not exist as they are intended for linear systems.

I am not sure if a PID controller could find a suitable control law to bring the pendulum to the top?

IMO, this should be possible by intentionally designing a controller to make the closed system unstable for the down position. The oscillations of the the unstable system would grow (if designed properly) until the amplitude reaches 180 deg; i.e. up positionSee comment below..

But I am still not clear how this swing-up problem is modelled in the classical control sense.

This may be because of the range of motion prevents it from being represented as a linear system. I don't know if there exists any literature which tackles swing-up problem using classical methods.

• Ahh so the issue is really about linear versus nonlinear, which makes sense. In linear systems, then you can write a transfer function and corresponding controller. I was trying to understand the details of both classical and modern/nonlinear systems and was missing that practical understanding. Thanks for your help. Commented Mar 30 at 16:14
• Yeah, I will have to look for articles on designing classical controllers for nonlinear systems. I am not sure how efficient such a controller would be versus other types of controllers for nonlinear systems, but it is worth investigating. Commented Mar 30 at 16:19
• There may be special choices of coordinates which hide the non linearity and allow one to derive a TF and make a PID controller. An example : rather than using angle of the pendulum as a state, some papers choose momentum or energy as the state. I don't know if such techniques exist for this system.
– AJN
Commented Mar 30 at 16:20
• "The oscillations of the the unstable system would grow (if designed properly) until the amplitude reaches 180 deg; i.e. up position." That wouldn't guarantee that the amplitude would reach 180 degrees, or that it would do so at a low enough velocity that the controller could "catch" the thing and keep it upright. The obverse, however, is certainly true: a controller that can erect an inverted pendulum would, when the pendulum is hanging, have a linearized model that would be unstable. Commented Apr 1 at 3:43