Abstract— In this lab, students were tasked with calculating
the Furuta pendulum system gain values using the LQR method
for the pendulum up position. The LQR (linear-quadratic
regulator) method is a way to calculate system gains that allows
for optimal control of a dynamic system at a minimum or optimal
cost. This is done by using the system inputs (A and B matrices),
system outputs (C and D matrices) and weightings for cost and
control. Using these values along with Matlab, the system gains
can be calculated.
Index Terms—Furuta pendulum, LQR method, optimization,
pendulum up
I. INTRODUCTION
his lab tasked students to calculate the Furuta pendulum
system gain values using the LQR method for the
pendulum up position. This was done by using the LQR
method. The LQR method is frequently used to optimize
control systems in real-world applications where the amount
(or weighting) of control effort must be weighed against the
cost of the controller. This is done typically because the
amount of control effort is directly proportional to the cost of
implementing the controller. This is due to the fact that
increasing control effort typically requires more feedback
sensors and programming which all contribute to a higher
overall cost of implementing the controller. The goal of this
lab is for students to find a good balance with regards to cost
and control effort while still balancing the pendulum in an
upward position.
II. PROCEDURE
A. System hardware setup
This lab has the same setup that has been used in both lab 3
and lab 4. The Furuta pendulum consists of a swing-arm and a
pendulum arm that are controlled using full-state feedback.
Each arm has its own encoder and motor that allows for
students to control the system using the DAQ and LabView.
B. Implementation of LQR method
The LQR method is performed by first obtaining the input
matrices A and B described by the following equations:
𝑥 = 𝐴𝑥 + 𝐵𝑢̇ (1)
The A and B matrices are obtained from the parameterized
system values/state-space system representation found in labs
3 & 4. The quadratic cost function that is used in the LQR
method is found using the following equation:
𝐽 = 𝑥 𝑇(𝑡1)𝐹(𝑡1)𝑥(𝑡1) + ∫ (𝑥 𝑇
𝑄𝑥 + 𝑢 𝑇
𝑅𝑢)𝑑𝑡
𝑡1
𝑡0
(2)
Where R is the matrix which sets the cost/weightings of the
control and Q is the matrix that sets the cost/weightings of the
errors in the states. The input vector u is the full-state
feedback law:
𝑢 = −𝐾𝑥 (3)
And where the vector of gains, K, are found using the
following formula:
𝐾 = 𝑅−1
(𝐵 𝑇
𝑃(𝑡)) (4)
Where B is one of the input matrices and P is found by
solving the continuous time Riccati differential equation. [1]
The system gains using the LQR method were found using
Matlab. In the Matlab code, the user is required to input the
input (A and B) and output (C and D) matrices found using the
parameterized system values found in lab 3 and the targeted
pole locations found in lab 4 using the pole placement subVI
in LabView. These matrices represent the input/output
dynamics of the system in a state-space fashion and are
necessary for implementing the LQR method Matlab code. In
addition, the user must input the R vector which sets the
cost/weightings of the control and the Q matrix sets the
cost/weightings of the errors in the states. Figure 1 shows the
Matlab code that was used to find the system gain values using
the LQR method.
Final Project: Calculating Furuta Pendulum
System Gains Using LQR Method
Ballingham, Ryland & Levine, Tevan
Section 7042 12/7/16
T
<Section####_Lab#> Double Click to Edit 2
2
Fig.1. Matlab code used to implement LQR method
The code outputs four vectors of gain values. Using the lab
4 LabView VI, these gains are then tested on the actual
system. Table 1 in the results section shows the gain values
that were obtained using this code. The R matrix was found
through a lot of trial and error experimenting with a range of
different R values on the physical Furuta pendulum system.
The Q matrix was determined based on trying to get gain
values similar to the gains found by using pole-placement in
LabView. [1]
C. Quantifying System Performance
System performance is quantified using the root mean
square formula to solve for errors. RMS error is shown below:
𝑥 𝑟𝑚𝑠 = √
1
𝑛
(𝑥1
2
+ 𝑥2
2
+ ⋯ + 𝑥 𝑛
2) (5)
RMS error was calculated for 𝜃1 and 𝜃2, where 𝜃1
represents the swing arm and 𝜃2 represents the pendulum arm.
III. RESULTS
TABLE I
GAIN/STATE VARIABLES
Gain Gain
Classification
State Variable State Variable
Measurement
𝒌 𝟏 Proportional 𝜃1 Swing arm
position
𝒌 𝟐 Proportional 𝜃2 Pendulum arm
position
𝒌 𝟑 Derivative 𝜃̇3 Swing arm
angular velocity
𝒌 𝟒 Derivative 𝜃4
̇ Pendulum arm
angular velocity
𝒌 𝟓 Proportional 𝑖 Motor current
TABLE II
SYSTEM WEIGHTINGS AND GAIN VALUES
R
value
Q value 𝒌 𝟏 𝒌 𝟐 𝒌 𝟑 𝒌 𝟒 𝒌 𝟓
1 40 -0.2635 1.3008 -0.1614 0.1966 0.0006
5 40 -0.1179 0.8997 -0.0913 0.1369 0.0005
7.5 40 -0.0962 0.8348 -0.0802 0.1271 0.0005
10 40 -0.0833 0.7948 -0.0734 0.1210 0.0005
Fig.2. Plot of swing arm position/vertical pendulum position and desired
swing arm position vs. time for R=1.
Fig.3. Plot of swing arm position/vertical pendulum position and desired
swing arm position vs. time for R=5.
<Section####_Lab#> Double Click to Edit 3
3
Fig.4. Plot of swing arm position/vertical pendulum position and desired
swing arm position vs. time for R=7.5.
Fig.5. Plot of swing arm position/vertical pendulum position and desired
swing arm position vs. time for R=7.5.
TABLE III
RMS ERROR
R Value Q Value RMS Error
𝜽 𝟏
RMS Error
𝜽 𝟐
1 40 0.343 0.101
5 40 0.710 0.119
7.5 40 0.328 0.074
10 40 0.544 0.125
IV. DISCUSSION
The purpose of the Final Project assignment was to build on
the full-state feedback controllers designed to control the
Furuta Pendulum system. Students are asked to find the
balance between cost effectiveness and control effort. This is
done by utilizing the LQR method. The matlab code was
implemented to find desired gain vectors based on the state-
space model that was found using LabView in previous labs.
Once the gains values were established, they were tested on
the physical Furuta Pendulum setup in lab. Using the rms
method, errors were calculated for both 𝜃1 and 𝜃2, where 𝜃1
corresponds to the swing arm and 𝜃2 corresponds to the
pendulum arm.
Referencing Table II, it can be seen that an R value of 7.5
yielded better results than any other R value. At an R value of
7.5, RMS error of both 𝜃1 and 𝜃2 was the smallest. Using an R
value of 1 yielded the next best results as RMS errors for both
theta’s were the next smallest. From the data taken, it is clear
that there is not a clear correlation in terms of R value
selection and lower RMS errors. Instead, certain values of R
yield more desired results than others, in no order. Given more
time to experiment with different R values and the Furuta
Penduum setup, RMS error could potentially be reduced even
further. Using R values that were too large, greater than ten,
the system was not able to command pendulum motion
efficiently. Large R values caused the system to become
unstable, yielding results that were undesirable.
For all gains used, the system yielded reasonably stable
results.
REFERENCES
[1] S. Banks, “EML 4314C Fall 2016 Lecture Notes”

More Related Content

DOCX
ControlsLab2
DOCX
ControlsLab1
DOCX
Ballingham_Severance_Lab4
PDF
2_DOF_Inverted_Pendulum_Laboratory_Session
PDF
Inverted Pendulum Control System
PDF
MODELLING AND SIMULATION OF INVERTED PENDULUM USING INTERNAL MODEL CONTROL
PDF
Raymond.Brunkow-Project-EEL-3657-Sp15
PPTX
Simulation of inverted pendulum presentation
ControlsLab2
ControlsLab1
Ballingham_Severance_Lab4
2_DOF_Inverted_Pendulum_Laboratory_Session
Inverted Pendulum Control System
MODELLING AND SIMULATION OF INVERTED PENDULUM USING INTERNAL MODEL CONTROL
Raymond.Brunkow-Project-EEL-3657-Sp15
Simulation of inverted pendulum presentation

What's hot (20)

PDF
Controller design of inverted pendulum using pole placement and lqr
PDF
Iaetsd modelling and controller design of cart inverted pendulum system using...
DOCX
PPT
1 mrac for inverted pendulum
PDF
Real-time PID control of an inverted pendulum
PDF
Iaetsd position control of servo systems using pid
PDF
Inverted Pendulum Control: A Brief Overview
PPSX
Backstepping control of cart pole system
PDF
Mathematical model analysis and control algorithms design based on state feed...
PDF
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
PPTX
Transfer function, determination of transfer function in mechanical and elect...
PDF
study of yaw and pitch control in quad copter
PDF
Electromagnetic Levitation (control project)
PPTX
Thesis presentation on inverted pendulum
PDF
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
PPT
Analysis of a pendulum problem
PDF
Transient three dimensional cfd modelling of ceilng fan
PDF
Control of a Quadcopter
DOCX
Full report complete
PDF
Experimental and numerical stress analysis of a rectangular wing structure
Controller design of inverted pendulum using pole placement and lqr
Iaetsd modelling and controller design of cart inverted pendulum system using...
1 mrac for inverted pendulum
Real-time PID control of an inverted pendulum
Iaetsd position control of servo systems using pid
Inverted Pendulum Control: A Brief Overview
Backstepping control of cart pole system
Mathematical model analysis and control algorithms design based on state feed...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Transfer function, determination of transfer function in mechanical and elect...
study of yaw and pitch control in quad copter
Electromagnetic Levitation (control project)
Thesis presentation on inverted pendulum
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Analysis of a pendulum problem
Transient three dimensional cfd modelling of ceilng fan
Control of a Quadcopter
Full report complete
Experimental and numerical stress analysis of a rectangular wing structure
Ad

Viewers also liked (15)

PDF
PDF
The Materiel Readiness of the future 8 Sept 16
PDF
อุปกรณ์พื้นฐานคอมพิวเตอร์
DOCX
Linea del tiempo
PPT
Desempenho de inglês 2º bimestre
PPTX
Principios de distribucion de la planta
PDF
A árvore da vida israel regardie
PPTX
Arte de la guerra
PDF
2011 copy writing module mastermind group
PDF
394 1976-1-pb
PPS
Sabedoria com humor1
PDF
Apresentação Intermediária P1
PDF
Syllabus 2016 dec-20
PPSX
Just in time 1
The Materiel Readiness of the future 8 Sept 16
อุปกรณ์พื้นฐานคอมพิวเตอร์
Linea del tiempo
Desempenho de inglês 2º bimestre
Principios de distribucion de la planta
A árvore da vida israel regardie
Arte de la guerra
2011 copy writing module mastermind group
394 1976-1-pb
Sabedoria com humor1
Apresentação Intermediária P1
Syllabus 2016 dec-20
Just in time 1
Ad

Similar to Ballingham_Levine_FinalProject (20)

PDF
Comparative analysis of observer-based LQR and LMI controllers of an inverted...
PDF
Controller design of inverted pendulum using pole placement and lqr
DOCX
Dynamic systems project (1)
PDF
Navigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
PDF
Aa4506146150
PDF
Servo systems-integral-state-feedback-lecture-2020
PDF
Using real interpolation method for adaptive identification of nonlinear inve...
PDF
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
PDF
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
PDF
Tuning of pid controller of inverted pendulum using genetic algorithm
PDF
Tuning of pid controller of inverted pendulum using genetic algorithm
PDF
ijccms paper 29--04--22.pdf
PDF
Optimal c ontrol
PPTX
Robust Presentation on h ifiinity based full state feedback controller design...
PDF
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
PDF
Servo systems
PDF
Comparison of a triple inverted pendulum stabilization using optimal control ...
PDF
A comparative study of controllers for stabilizing a rotary inverted pendulum
PDF
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
PDF
Centralized Optimal Control for a Multimachine Power System Stability Improve...
Comparative analysis of observer-based LQR and LMI controllers of an inverted...
Controller design of inverted pendulum using pole placement and lqr
Dynamic systems project (1)
Navigation of Mobile Inverted Pendulum via Wireless control using LQR Technique
Aa4506146150
Servo systems-integral-state-feedback-lecture-2020
Using real interpolation method for adaptive identification of nonlinear inve...
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Tuning of pid controller of inverted pendulum using genetic algorithm
Tuning of pid controller of inverted pendulum using genetic algorithm
ijccms paper 29--04--22.pdf
Optimal c ontrol
Robust Presentation on h ifiinity based full state feedback controller design...
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
Servo systems
Comparison of a triple inverted pendulum stabilization using optimal control ...
A comparative study of controllers for stabilizing a rotary inverted pendulum
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
Centralized Optimal Control for a Multimachine Power System Stability Improve...

More from Ryland Ballingham (8)

DOCX
FEA_project1
DOCX
MOMLabFinalProject-1
DOCX
LabReport5
DOCX
LabReport4
DOCX
Lab3report
DOCX
LabReport2
PDF
Staircase Design Report
PDF
Transmission Design Report
FEA_project1
MOMLabFinalProject-1
LabReport5
LabReport4
Lab3report
LabReport2
Staircase Design Report
Transmission Design Report

Ballingham_Levine_FinalProject

  • 1. Abstract— In this lab, students were tasked with calculating the Furuta pendulum system gain values using the LQR method for the pendulum up position. The LQR (linear-quadratic regulator) method is a way to calculate system gains that allows for optimal control of a dynamic system at a minimum or optimal cost. This is done by using the system inputs (A and B matrices), system outputs (C and D matrices) and weightings for cost and control. Using these values along with Matlab, the system gains can be calculated. Index Terms—Furuta pendulum, LQR method, optimization, pendulum up I. INTRODUCTION his lab tasked students to calculate the Furuta pendulum system gain values using the LQR method for the pendulum up position. This was done by using the LQR method. The LQR method is frequently used to optimize control systems in real-world applications where the amount (or weighting) of control effort must be weighed against the cost of the controller. This is done typically because the amount of control effort is directly proportional to the cost of implementing the controller. This is due to the fact that increasing control effort typically requires more feedback sensors and programming which all contribute to a higher overall cost of implementing the controller. The goal of this lab is for students to find a good balance with regards to cost and control effort while still balancing the pendulum in an upward position. II. PROCEDURE A. System hardware setup This lab has the same setup that has been used in both lab 3 and lab 4. The Furuta pendulum consists of a swing-arm and a pendulum arm that are controlled using full-state feedback. Each arm has its own encoder and motor that allows for students to control the system using the DAQ and LabView. B. Implementation of LQR method The LQR method is performed by first obtaining the input matrices A and B described by the following equations: 𝑥 = 𝐴𝑥 + 𝐵𝑢̇ (1) The A and B matrices are obtained from the parameterized system values/state-space system representation found in labs 3 & 4. The quadratic cost function that is used in the LQR method is found using the following equation: 𝐽 = 𝑥 𝑇(𝑡1)𝐹(𝑡1)𝑥(𝑡1) + ∫ (𝑥 𝑇 𝑄𝑥 + 𝑢 𝑇 𝑅𝑢)𝑑𝑡 𝑡1 𝑡0 (2) Where R is the matrix which sets the cost/weightings of the control and Q is the matrix that sets the cost/weightings of the errors in the states. The input vector u is the full-state feedback law: 𝑢 = −𝐾𝑥 (3) And where the vector of gains, K, are found using the following formula: 𝐾 = 𝑅−1 (𝐵 𝑇 𝑃(𝑡)) (4) Where B is one of the input matrices and P is found by solving the continuous time Riccati differential equation. [1] The system gains using the LQR method were found using Matlab. In the Matlab code, the user is required to input the input (A and B) and output (C and D) matrices found using the parameterized system values found in lab 3 and the targeted pole locations found in lab 4 using the pole placement subVI in LabView. These matrices represent the input/output dynamics of the system in a state-space fashion and are necessary for implementing the LQR method Matlab code. In addition, the user must input the R vector which sets the cost/weightings of the control and the Q matrix sets the cost/weightings of the errors in the states. Figure 1 shows the Matlab code that was used to find the system gain values using the LQR method. Final Project: Calculating Furuta Pendulum System Gains Using LQR Method Ballingham, Ryland & Levine, Tevan Section 7042 12/7/16 T
  • 2. <Section####_Lab#> Double Click to Edit 2 2 Fig.1. Matlab code used to implement LQR method The code outputs four vectors of gain values. Using the lab 4 LabView VI, these gains are then tested on the actual system. Table 1 in the results section shows the gain values that were obtained using this code. The R matrix was found through a lot of trial and error experimenting with a range of different R values on the physical Furuta pendulum system. The Q matrix was determined based on trying to get gain values similar to the gains found by using pole-placement in LabView. [1] C. Quantifying System Performance System performance is quantified using the root mean square formula to solve for errors. RMS error is shown below: 𝑥 𝑟𝑚𝑠 = √ 1 𝑛 (𝑥1 2 + 𝑥2 2 + ⋯ + 𝑥 𝑛 2) (5) RMS error was calculated for 𝜃1 and 𝜃2, where 𝜃1 represents the swing arm and 𝜃2 represents the pendulum arm. III. RESULTS TABLE I GAIN/STATE VARIABLES Gain Gain Classification State Variable State Variable Measurement 𝒌 𝟏 Proportional 𝜃1 Swing arm position 𝒌 𝟐 Proportional 𝜃2 Pendulum arm position 𝒌 𝟑 Derivative 𝜃̇3 Swing arm angular velocity 𝒌 𝟒 Derivative 𝜃4 ̇ Pendulum arm angular velocity 𝒌 𝟓 Proportional 𝑖 Motor current TABLE II SYSTEM WEIGHTINGS AND GAIN VALUES R value Q value 𝒌 𝟏 𝒌 𝟐 𝒌 𝟑 𝒌 𝟒 𝒌 𝟓 1 40 -0.2635 1.3008 -0.1614 0.1966 0.0006 5 40 -0.1179 0.8997 -0.0913 0.1369 0.0005 7.5 40 -0.0962 0.8348 -0.0802 0.1271 0.0005 10 40 -0.0833 0.7948 -0.0734 0.1210 0.0005 Fig.2. Plot of swing arm position/vertical pendulum position and desired swing arm position vs. time for R=1. Fig.3. Plot of swing arm position/vertical pendulum position and desired swing arm position vs. time for R=5.
  • 3. <Section####_Lab#> Double Click to Edit 3 3 Fig.4. Plot of swing arm position/vertical pendulum position and desired swing arm position vs. time for R=7.5. Fig.5. Plot of swing arm position/vertical pendulum position and desired swing arm position vs. time for R=7.5. TABLE III RMS ERROR R Value Q Value RMS Error 𝜽 𝟏 RMS Error 𝜽 𝟐 1 40 0.343 0.101 5 40 0.710 0.119 7.5 40 0.328 0.074 10 40 0.544 0.125 IV. DISCUSSION The purpose of the Final Project assignment was to build on the full-state feedback controllers designed to control the Furuta Pendulum system. Students are asked to find the balance between cost effectiveness and control effort. This is done by utilizing the LQR method. The matlab code was implemented to find desired gain vectors based on the state- space model that was found using LabView in previous labs. Once the gains values were established, they were tested on the physical Furuta Pendulum setup in lab. Using the rms method, errors were calculated for both 𝜃1 and 𝜃2, where 𝜃1 corresponds to the swing arm and 𝜃2 corresponds to the pendulum arm. Referencing Table II, it can be seen that an R value of 7.5 yielded better results than any other R value. At an R value of 7.5, RMS error of both 𝜃1 and 𝜃2 was the smallest. Using an R value of 1 yielded the next best results as RMS errors for both theta’s were the next smallest. From the data taken, it is clear that there is not a clear correlation in terms of R value selection and lower RMS errors. Instead, certain values of R yield more desired results than others, in no order. Given more time to experiment with different R values and the Furuta Penduum setup, RMS error could potentially be reduced even further. Using R values that were too large, greater than ten, the system was not able to command pendulum motion efficiently. Large R values caused the system to become unstable, yielding results that were undesirable. For all gains used, the system yielded reasonably stable results. REFERENCES [1] S. Banks, “EML 4314C Fall 2016 Lecture Notes”