State Feedback Controller | Ball Balancing Table Example
Automatic Control Example Series: A State Feedback Controller Using Ball Balancing Table
The field of Control Theory encompasses numerous methodologies and applications, eloquently outlined and categorized by Brian Douglas on his blog page at Engineering Media.
Universe of Control Theory by Brian Douglas
Within this series of blog documents, we aim to implement several of these control theory topics utilizing Acrome's accessible control and robotics experiment systems. Examples include Reinforcement Learning, Kalman Filters, LQR/LGQ controllers, and Stability and Bode Plots.
This particular blog focuses on a project employing The Ball Balancing Table to illustrate a State Feedback controller. This post will delve into the foundational aspects of both the hardware and the underlying algorithm.
Details of Hardware and Software:
Introduction to the Ball Balancing Table (BBT)
The Ball Balancing Table is a classic experiment in control systems that bridges academic topics (esp. the control theory) with the industrial processes and projects. It consists of a flat surface (the table) where a ball is placed, and the objective is to control the tilt of the table to guide the ball to specific locations on this table.
Ball Balancing Table in a laboratory
Users/students can learn control concepts -like State Feedback- but also can do simpler or more complex experiments with different types of controllers, such as PID, and reinforcement learning. The open-source software methodology allows users to modify and test advanced control algorithms, change the controllers or other system parts which makes it a versatile tool for both academic and real-world applications.
State Feedback Controller Basics
What is a State Feedback Controller?
A state feedback controller is a control approach where the control action is based on the entire set of state variables of the system, not just the output. By feeding back the system’s states, it allows direct adjustment of the system dynamics, such as stability and response speed. This method gives the designer more flexibility, especially for modern control techniques, and is often combined with observers when not all states are measurable.
Block diagram of constant state feedback control
What is Pole Placement?
Using output or state feedback, the poles or eigenvalues of the system can be assigned subject to system-dependent limitations. This is known as pole placement, pole assignment, or pole allocation. System poles are determined according to the system's overshoot and settling time requirements.
The dynamics of the closed-loop system depend on the eigenstructure (eigenvalues and eigenvectors) of the matrix Acl. Thus, the desired system dynamics can be chosen with appropriate choice of the gain matrix K.
If the pair (A,B) is controllable, then there exists a feedback gain matrix K. It is evaluated the desired characteristic polynomial from specified eigenvalues.
Implementing the State Feedback Controller Example
The State Feedback Controller Example is implemented using Matlab® and Simulink® software of The Mathworks™ and the Acrome’s Ball Balancing Table as a student intern project led by the author of this article. Full application codes are available on request.
The Acrome Ball Balancing Table system consists of two servo motors and a touchscreen sensor. The angle applied by the servo motors is input to the system. The output of the system is the speed and position values in the x and y axes. The system contains multiple state variables (speed and position). A full-state feedback controller is very useful in such systems.
Controllers that only look for errors, such as PIDs, are not fast or stable enough in such systems. Position and velocity are evaluated simultaneously with full-state feedback. The desired system dynamics (overshoot, settling time, etc.) are achieved through pole placement. Unmeasurable situations can be predicted using an observer.
The controller measures, observes, or performs both of the state variables in the system and multiplies them by the calculated K-matrix gain, thus entering them into a feedback loop. How to calculate the K-matrix gain was discussed in the previous section. The purpose of this is to achieve stability and rapid response by controlling all dynamics of the system simultaneously.
Full State Feedback Controller with Observer Design on Simulink
What we want to balance: a ball resting on a platform
Inputs: Angles of the servo motors tilting the platform
Outputs: x and y positions of the ball
State variables: x, ẋ (position and velocity in the x-direction) y, ẏ (position and velocity in the y-direction)
So, our state vector is:
State Vector of Ball Balancing Table
Using this information and the available input and output blocks of the BBT, we are now ready to implement our controller example in software.
State Feedback Controller Design and Simulation Example Matlab Code
This blog post provides a comprehensive overview of implementing a State Feedback Controller using Acrome's Ball Balancing Table. It details the hardware and software aspects, explains the fundamental concepts of state feedback control and pole placement, and presents a practical implementation example using MATLAB and Simulink. The provided code snippets and resulting graphs demonstrate the design and simulation of the controller, showcasing its effectiveness in achieving desired system dynamics for the Ball Balancing Table. This example serves as a valuable resource for understanding and applying modern control techniques in real-world scenarios.
Contact ACROME to learn more about different control and robotics products and different engineering applications that can be done.
[2] Brian L. Stevens; Frank L. Lewis; Eric N. Johnson. Aircraft control and simulation: Dynamics, controls design, and autonomous systems, 3rd edition. John Wiley & Sons Inc, 2016.
Oops! Something went wrong while submitting the form.
Discover Acrome
Acrome was founded in 2013. Our name stands for ACcessible RObotics MEchatronics. Acrome is a worldwide provider of robotic experience with software & hardware for academia, research and industry.