SlideShare a Scribd company logo
1 of 3
Download to read offline
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

What's hot

Controller design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqrController design of inverted pendulum using pole placement and lqr
Controller design of inverted pendulum using pole placement and lqreSAT Publishing House
 
Iaetsd modelling and controller design of cart inverted pendulum system using...
Iaetsd modelling and controller design of cart inverted pendulum system using...Iaetsd modelling and controller design of cart inverted pendulum system using...
Iaetsd modelling and controller design of cart inverted pendulum system using...Iaetsd Iaetsd
 
1 mrac for inverted pendulum
1 mrac for inverted pendulum1 mrac for inverted pendulum
1 mrac for inverted pendulumnazir1988
 
Real-time PID control of an inverted pendulum
Real-time PID control of an inverted pendulumReal-time PID control of an inverted pendulum
Real-time PID control of an inverted pendulumFrancesco Corucci
 
Iaetsd position control of servo systems using pid
Iaetsd position control of servo systems using pidIaetsd position control of servo systems using pid
Iaetsd position control of servo systems using pidIaetsd Iaetsd
 
Inverted Pendulum Control: A Brief Overview
Inverted Pendulum Control: A Brief OverviewInverted Pendulum Control: A Brief Overview
Inverted Pendulum Control: A Brief OverviewIJMER
 
Backstepping control of cart pole system
Backstepping  control of cart pole systemBackstepping  control of cart pole system
Backstepping control of cart pole systemShubhobrata Rudra
 
Mathematical model analysis and control algorithms design based on state feed...
Mathematical model analysis and control algorithms design based on state feed...Mathematical model analysis and control algorithms design based on state feed...
Mathematical model analysis and control algorithms design based on state feed...hunypink
 
Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...Linear quadratic regulator and pole placement for stabilizing a cart inverted...
Linear quadratic regulator and pole placement for stabilizing a cart inverted...journalBEEI
 
Transfer function, determination of transfer function in mechanical and elect...
Transfer function, determination of transfer function in mechanical and elect...Transfer function, determination of transfer function in mechanical and elect...
Transfer function, determination of transfer function in mechanical and elect...Saad Mohammad Araf
 
study of yaw and pitch control in quad copter
study  of yaw and pitch  control in quad copter study  of yaw and pitch  control in quad copter
study of yaw and pitch control in quad copter PranaliPatil76
 
Electromagnetic Levitation (control project)
Electromagnetic Levitation (control project)Electromagnetic Levitation (control project)
Electromagnetic Levitation (control project)Salim Al Oufi
 
Thesis presentation on inverted pendulum
Thesis presentation on inverted pendulum Thesis presentation on inverted pendulum
Thesis presentation on inverted pendulum Nowab Md. Aminul Haq
 
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...
Troubleshooting and Enhancement of Inverted Pendulum System Controlled by DSP...Thomas Templin
 
Analysis of a pendulum problem
Analysis of a pendulum problemAnalysis of a pendulum problem
Analysis of a pendulum problemSuman Lata
 
Transient three dimensional cfd modelling of ceilng fan
Transient three dimensional cfd modelling of ceilng fanTransient three dimensional cfd modelling of ceilng fan
Transient three dimensional cfd modelling of ceilng fanLahiru Dilshan
 
Experimental and numerical stress analysis of a rectangular wing structure
Experimental and numerical stress analysis of a rectangular wing structureExperimental and numerical stress analysis of a rectangular wing structure
Experimental and numerical stress analysis of a rectangular wing structureLahiru Dilshan
 

What's hot (20)

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

Viewers also liked

Viewers also liked (15)

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

Similar to Ballingham_Levine_FinalProject

Design and Implementation of Model Reference Adaptive Controller using Coeffi...
Design and Implementation of Model Reference Adaptive Controller using Coeffi...Design and Implementation of Model Reference Adaptive Controller using Coeffi...
Design and Implementation of Model Reference Adaptive Controller using Coeffi...IOSR Journals
 
Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...
Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...
Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...IJECEIAES
 
Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...
Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...
Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...journalBEEI
 
A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...
A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...
A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...IJSRD
 
ijccms paper 29--04--22.pdf
ijccms paper  29--04--22.pdfijccms paper  29--04--22.pdf
ijccms paper 29--04--22.pdfijccmsjournal
 
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...IJERA Editor
 
EENG517FinalReport
EENG517FinalReportEENG517FinalReport
EENG517FinalReportDaniel K
 
Compensator Design for Speed Control of DC Motor by Root Locus Approach using...
Compensator Design for Speed Control of DC Motor by Root Locus Approach using...Compensator Design for Speed Control of DC Motor by Root Locus Approach using...
Compensator Design for Speed Control of DC Motor by Root Locus Approach using...IRJET Journal
 
ECE147C_Midterm_Report
ECE147C_Midterm_ReportECE147C_Midterm_Report
ECE147C_Midterm_ReportLars Brusletto
 
A comparative study of controllers for stabilizing a rotary inverted pendulum
A comparative study of controllers for stabilizing a rotary inverted pendulumA comparative study of controllers for stabilizing a rotary inverted pendulum
A comparative study of controllers for stabilizing a rotary inverted pendulumijccmsjournal
 
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
A Comparative study of controllers for stabilizing a Rotary Inverted PendulumA Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulumijccmsjournal
 
Deal_Final_Paper_PY525f15
Deal_Final_Paper_PY525f15Deal_Final_Paper_PY525f15
Deal_Final_Paper_PY525f15Jacob Deal
 
Tracking and control problem of an aircraft
Tracking and control problem of an aircraftTracking and control problem of an aircraft
Tracking and control problem of an aircraftANSUMAN MISHRA
 

Similar to Ballingham_Levine_FinalProject (20)

Flight Control System
Flight Control SystemFlight Control System
Flight Control System
 
Design and Implementation of Model Reference Adaptive Controller using Coeffi...
Design and Implementation of Model Reference Adaptive Controller using Coeffi...Design and Implementation of Model Reference Adaptive Controller using Coeffi...
Design and Implementation of Model Reference Adaptive Controller using Coeffi...
 
Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...
Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...
Optimal tuning linear quadratic regulator for gas turbine by genetic algorith...
 
Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...
Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...
Signature PSO: A novel inertia weight adjustment using fuzzy signature for LQ...
 
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Tuning of PID, SVFB and LQ Controllers Using Genetic AlgorithmsTuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
Tuning of PID, SVFB and LQ Controllers Using Genetic Algorithms
 
Integration schemes in Molecular Dynamics
Integration schemes in Molecular DynamicsIntegration schemes in Molecular Dynamics
Integration schemes in Molecular Dynamics
 
A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...
A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...
A Survey On Real Time State Estimation For Optimal Placement Of Phasor Measur...
 
ijccms paper 29--04--22.pdf
ijccms paper  29--04--22.pdfijccms paper  29--04--22.pdf
ijccms paper 29--04--22.pdf
 
Jw3417821791
Jw3417821791Jw3417821791
Jw3417821791
 
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
Design and Simulation of Different Controllers for Stabilizing Inverted Pendu...
 
EENG517FinalReport
EENG517FinalReportEENG517FinalReport
EENG517FinalReport
 
Compensator Design for Speed Control of DC Motor by Root Locus Approach using...
Compensator Design for Speed Control of DC Motor by Root Locus Approach using...Compensator Design for Speed Control of DC Motor by Root Locus Approach using...
Compensator Design for Speed Control of DC Motor by Root Locus Approach using...
 
ECE147C_Midterm_Report
ECE147C_Midterm_ReportECE147C_Midterm_Report
ECE147C_Midterm_Report
 
A comparative study of controllers for stabilizing a rotary inverted pendulum
A comparative study of controllers for stabilizing a rotary inverted pendulumA comparative study of controllers for stabilizing a rotary inverted pendulum
A comparative study of controllers for stabilizing a rotary inverted pendulum
 
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
A Comparative study of controllers for stabilizing a Rotary Inverted PendulumA Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
A Comparative study of controllers for stabilizing a Rotary Inverted Pendulum
 
Deal_Final_Paper_PY525f15
Deal_Final_Paper_PY525f15Deal_Final_Paper_PY525f15
Deal_Final_Paper_PY525f15
 
Tracking and control problem of an aircraft
Tracking and control problem of an aircraftTracking and control problem of an aircraft
Tracking and control problem of an aircraft
 
2 vol1no1
2 vol1no12 vol1no1
2 vol1no1
 
C045051318
C045051318C045051318
C045051318
 
sirishfinalpropsal
sirishfinalpropsalsirishfinalpropsal
sirishfinalpropsal
 

More from Ryland Ballingham (8)

FEA_project1
FEA_project1FEA_project1
FEA_project1
 
MOMLabFinalProject-1
MOMLabFinalProject-1MOMLabFinalProject-1
MOMLabFinalProject-1
 
LabReport5
LabReport5LabReport5
LabReport5
 
LabReport4
LabReport4LabReport4
LabReport4
 
Lab3report
Lab3reportLab3report
Lab3report
 
LabReport2
LabReport2LabReport2
LabReport2
 
Staircase Design Report
Staircase Design ReportStaircase Design Report
Staircase Design Report
 
Transmission Design Report
Transmission Design ReportTransmission 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”