MATLAB MATLAB/Simulink - inverted pendulum swing-up problem

  • Thread starter tatenka
  • Start date
I'm trying to implement a pendulum swing-up controller to work with my model of a single inverted pendulum on a cart with a motor (the only input is the motor voltage, the outputs are the cart position and the pendulum velocity). The controller has the form
u = -umax*sign(thetadot), or
u = -umax*sign(thetadot*cos(theta))
where theta is the pendulum angle, thetadot is the pendulum angular velocity (derivative of the angle), umax is the maximum voltage and u is the actual input voltage applied to the system. A couple of blocks in Simulink, nothing special, or so it would seem.
I've seen this kind of controller implemented in a variety of sources ( pages 19-21) but I'm having a problem with it. To be specific about how the system behaves (see first figure of the attachment):
- the pendulum angle (purple) and angular velocity (thetadot, blue) have the normal sinusoid behavior and the pendulum swings increase (this has been normal behavior so far)
- at one moment, when the pendulum is quite close to the upper equilibrium and thetadot is crossing the zero, thetadot SUDDENLY goes mad and starts oscillating with approximately an amplitude of 1e-4 and period of less than 1e-3 seconds. This means that the controller adopts the same oscillating behavior (second figure of the attachment), and if you change the input voltage of a system (yellow) hundreds of times per second, the system behaves as if there was no input at all
Could anybody help me please?? I have to put this into my thesis and it is starting to drive me mad.
Thanks a lot in advance.


Want to reply to this thread?

"MATLAB/Simulink - inverted pendulum swing-up problem" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving