Full-State Control of Rotary Pendulum Using LQR Controller

Full-State Control of Rotary Pendulum Using LQR Controller

Horacio Alain Millan-Guerrero, Jose Antonio Nuñez-Lopez, Fabian N. Murrieta-Rico, Lars Lindner, Oleg Sergiyenko, Julio C. Rodríguez-Quiñonez, Wendy Flores-Fuentes
DOI: 10.4018/978-1-7998-9795-8.ch007
OnDemand:
(Individual Chapters)
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

In this chapter, the authors design, simulate, and implement an optimal controller for a rotary pendulum while addressing real-world phenomena. The controller, called linear-quadratic-regulator (LQR), minimizes a cost function based on weights that penalize the system's state error and controller effort. The control objective is to reach the desired system state in an optimal way. The rotary pendulum consists of a pendulum attached to a rotary arm actuated by a motor. It is a great system to design and analyze different types of controllers. This system is underactuated, nonlinear, sensitive to initial conditions, and has 2 DOF. This chapter's main contributions are the mathematical modeling of the system taking into account nonlinear friction, the characterization of the plant using measured data from the physical system using the nonlinear squares and the trust-region reflective algorithms, comparison of linear and nonlinear behaviors, and implementation on real hardware considering discrete phenomena while using hardware-provided tools such as position decoding and PWM generation.
Chapter Preview
Top

Main Objective Of The Chapter

This chapter’s objective is to design, simulate, and implement an LQR controller that stabilizes the rotary pendulum in the upward direction. The controller is implemented on an STM32 microcontroller. The implementation takes advantage of the dedicated hardware the STM32 provides to decode the sensors' angular positions, control the motor via a PWM signal and execute the control loop in a precisely timed manner. This simplifies the C code of the LQR controller, leaving the CPU only for calculating the control signal and other important tasks such as angular velocity estimation.

Key Terms in this Chapter

H-Bridge Motor Driver: This electronic circuit represents a switch-mode power amplifier generally used to reverse the polarity/direction of the DC motor. It is essential to transmit electrical power for the applied actuator in the motion control system. Still, it can also be used to 'brake' the motion system, where the motion comes to a sudden stop as the system control input is effectively disconnected from the power source.

Microcontroller: This is a programmable integrated microcircuit capable of executing commands stored in its memory. It is composed of several functional modules that fulfill a specific task. A microcontroller includes a computer's three main functional units: central processing unit, memory, and input/output ports. Currently, these types of devices are widely used in industry or research due to the fact that they offer great value.

Breakaway Torque: This is the torque needed to start the rotational motion necessary to cause an object to rotate around an axis. In most cases, more torque is required to create the rotational motion than is needed to keep it going once it has begun. The amount of break-away torque required to move something is determined in part by static friction.

Underactuated Systems: Are systems in which the control input cannot arbitrarily change the state of the system. As a consequence, unlike in fully actuated systems, the underactuated systems cannot be commanded to follow arbitrary trajectories.

Motion Control System: Comprises the integration of different components of various disciplines such as mechanical, electronic, and control. Each of these performs a unique role in achieving precise motion control and improving the system's efficiency. Despite various design uncertainties, the control objective is to synthesize a control input to track the desired motion trajectory as closely as possible. Selecting the right motion control components concerning the system design is crucial as it largely determines the machine's performance or the automated system.

Cogging Torque: This is the torque needed to overcome the opposing torque created by the attractive magnetic force between magnets on the rotor and the iron teeth of the stator. There are multiple rotor positions within a revolution where the cogging torque is high. By design, motors that use ironless winding for their rotors do not have cogging torque.

Rotary Pendulum: This consists of a driven arm that rotates horizontally inside the XY plane and a pendulum attached to the edge of the driven arm. The pendulum is free to turn in a plane that is perpendicular to the pendulum’s arm and coincides with the edge of said arm. It is an example of a complex non-linear oscillator. Such systems are of interest in control system theory. The rotary pendulum is underactuated and highly non-linear due to the gravitational forces and the coupling arising from the Coriolis and centripetal forces.

Complete Chapter List

Search this Book:
Reset