Control of an inverted pendulum (or any other dynamic system in general), how to implement it?

In summary: Where do other elements like sensors and actuators be in the block diagram?Sensors and actuators are typically depicted as a transfer function of 1, so they don't need to appear in the block diagram.
  • #1
thegreengineer
54
3
Good afternoon people. I wanted to implement a physical system using control just to put into practice what I have learned in school. To be more specific: I would like to implement an inverted pendulum like the one on the photo
screenshot.png

In this system a control input (a force u) drives the cart (mass m1) which moves the massless rod (with l) with a mass m2 attached at the end. The goal is to keep the mass m2 vertical by making the control output (an angle θ) zero.
The control paradigm I would like to use is modern control, which means I would require first to derive the differential equations of the system; then identify control input, control output, and state variables, in order to find the state and output equations we all know:
[itex]\mathbf{\dot{x}}=\mathbf{A}\mathbf{x}+\mathbf{B}u[/itex]
[itex]\mathbf{y}=\mathbf{C}\mathbf{x}+\mathbf{D}u[/itex]
The next series of steps would be determining controllability, observability. After that then building the gain matrix K and (if necessary) build the observer. The result would be a block diagram like this:
Typical_State_Space_model_with_feedback_and_input.png

My main questions would be: where do other elements like sensors and actuators (like a rotary encoder and a motor) be in the block diagram? Would they be part of the plant (the inverted pendulum) block that includes the A, B, C and D matrices? or would they be treated outside the plant?
Also how would the controller be implemented? Is it an electrical network made of opamps? Is it a mechanical system? What is it? The same would be for how an observer would be implemented on a real system.

This is the main disadvantage I see about using modern control instead of classic control, since classic control deals with transfer functions and I could easily see where the sensor, the actuator, the plant and other signal conditioning blocks would fit:
close.gif

Easily the input could be a voltage (corresponding to the angle), the controller could be a PID controller made with op-amps, the actuator could be a motor, the process is the inverted pendulum, the sensor could be a rotary encoder or a potentiometer, and the output could be the output angle. Other elements like amplifiers, filters, and so on could be put between the controller and the actuator. Also the comparator could be an electronic op-amp since the input and feedback path signals are electrical in nature.

I would appreciate your answers to this problem.
 

Attachments

  • screenshot.png
    screenshot.png
    5.9 KB · Views: 2,899
  • Typical_State_Space_model_with_feedback_and_input.png
    Typical_State_Space_model_with_feedback_and_input.png
    893 bytes · Views: 1,521
  • close.gif
    close.gif
    15.2 KB · Views: 2,094
Engineering news on Phys.org
  • #2
The inverted pendulum is notoriously difficult because it is unstable. The most successful control approach with inverted pendulums is not classical, nor modern, it is fuzzy logic. Are you familiar with that?

Search "fuzzy logic" "inverted pendulum" and you'll find lots of hits.
 
  • #3
anorlunda said:
The inverted pendulum is notoriously difficult because it is unstable. The most successful control approach with inverted pendulums is not classical, nor modern, it is fuzzy logic. Are you familiar with that?

Search "fuzzy logic" "inverted pendulum" and you'll find lots of hits.
Ok, but that doesn't answer my questions. Let's imagine the plant could have been other dynamic system like a robotic arm, a liquid level system, a system in general. The questions were:
Where do other elements like sensors and actuators be in the block diagram? Would they be part of the plant block that includes the A, B, C and D matrices? or would they be treated outside the plant?
Also how would the controller be implemented? Is it an electrical network made of opamps? Is it a mechanical system? What is it? The same would be for how an observer would be implemented on a real system.
 
  • #4
MarcusAu314 said:
Also how would the controller be implemented? Is it an electrical network made of opamps? Is it a mechanical system? What is it?
What do you want it to be?

You may consider doing a search on "inverted pendulum control project", and see how others have approached the problem.
 
  • #5
MarcusAu314 said:
Where do other elements like sensors and actuators be in the block diagram?

Sensors and actuators convert one kind of signal to another. Perhaps electrical to/from mechanical. Most often, we depict them in the block diagrams as a transfer function of 1, so they don't need to appear at all. But if they have a transfer function other than one, they need to be included as in the block diagram you posted.

The controller can be anything, electrical, mechanical, pneumatic, or digital. In the modern world, digital controllers (meaning computers) are frequently used. It is up to the engineer designing the system to choose what type of controller to use based on its total advantages.
 

1. What is an inverted pendulum and why is it important in control systems?

An inverted pendulum is a physical system consisting of a pendulum attached to a cart that moves along a horizontal track. The pendulum is in an unstable equilibrium position, making it a challenging system to control. It is important in control systems because it serves as a model for other dynamic systems that require precise control, such as robots and vehicles.

2. What are the basic principles of controlling an inverted pendulum?

The basic principles of controlling an inverted pendulum involve using feedback control to stabilize the system. This involves measuring the position and velocity of the pendulum and using this information to make adjustments to the cart's movement in real-time. The goal is to keep the pendulum in an upright position by constantly making small corrections to the cart's movement.

3. What are some common control strategies for an inverted pendulum?

Some common control strategies for an inverted pendulum include proportional-integral-derivative (PID) control, state-space control, and model predictive control. Each of these strategies uses different mathematical approaches to stabilize the system and can be implemented using various technologies such as microcontrollers or specialized control software.

4. How do you physically implement control strategies for an inverted pendulum?

To physically implement control strategies for an inverted pendulum, you will need to have a physical system set up, such as a pendulum attached to a cart and a way to measure its position and velocity. Then, you will need to use a controller, such as a microcontroller or a computer, to process the measurements and make adjustments to the cart's movement. The specific implementation will vary depending on the chosen control strategy and technology.

5. What are some common challenges when implementing control for an inverted pendulum?

Some common challenges when implementing control for an inverted pendulum include accurately measuring the position and velocity of the pendulum, dealing with external disturbances that can affect the system, and tuning the control parameters to achieve stable and precise control. It is also important to have a good understanding of the underlying dynamics of the system and the chosen control strategy to effectively implement it.

Similar threads

Replies
8
Views
7K
Replies
9
Views
2K
  • Mechanical Engineering
Replies
1
Views
1K
Replies
46
Views
3K
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
3K
  • Electrical Engineering
Replies
2
Views
4K
  • Electrical Engineering
2
Replies
49
Views
5K
Replies
16
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
Back
Top