Professional Documents
Culture Documents
Lawrence Bush
Computer Science Department
Rensselaer Polytechnic Institute
Troy, New York
November 27, 2001
Abstract
A Proportional Integral-Derivative
controller uses a three-term transfer
function to calculate a signal (u) from an
error signal (e). The signal (u) is equal
to the proportional gain (Kp) times the
magnitude of the error plus the integral
Solution Evaluation Criteria: gain (Ki) times the integral of the error
plus the derivative gain (Kd) times the
The primary objective of this problem is derivative of the error. This signal (u)
to keep the pendulum and cart in a will be sent to the plant, and the new
controlled state over the simulation output (Y) will be obtained.
period (6 seconds). This means that the
controlled system variables are not A neural network approach to the
monotonically increasing or decreasing inverted pendulum problem was
and that the controlled system variables presented by Osamu Fujita and Kuniharu
are within a certain band. Our Uchimura. Their approach used trial-
benchmark for the system variable and-error correlation learning to train a
control band is for θ to be within .5 four input neural controller with two
radians and x to be within .5 meters. hidden neurons.
2
3. Solution Description
3
The st45.m function was created to If this notion is extrapolated to 4
automate the construction of the dimensions, the result is a 4 dimensional
consequent functions. Then the matrix of 17 diagonally layered
controller uses st45 to create a set of n isogramatic hyper-planes.
(17) evenly spaced horizontally
symmetrical orthogonal trapezoidal An example of a rule derived from the
consequent functions across a given rule-base formula is as follows:
range [-5.4 : +5.4]. The support of each
consequent function is 3 times the width Inputs
of the core.
Angle is large positive.
Each of these consequent functions is Angular Velocity is large positive.
indexed from 1 to 17. Cart Position is large negative.
Cart Velocity is large negative.
Each rule in the rule-base is associated
with a consequent function using the Rule( 5, 5, 1, 1 )
formula:
= cmf( i + (j-1) + (-k+5) + (-l+5) )
cmf( i + (j-1) + (-k+5) + (-l+5) ) = cmf( 17 )
= large positive force
for i, j, k, l = [ 1 : 5 ]
The 54-FLC then defuzzies the qualified
The variables i, j, k and l pertain to the consequent matrix using the center of
membership of x, x, θ and θ. This area method to determine the overall
formula requires that the positive- output.
negative orientation of the MF-set be
appropriately matched to the consequent 4. Solution Analysis
MF-set. However, the polarity of k and l
were reversed by adjusting the formula. The following graphs show the results of
The resulting composed rule-base is a 4 the three controllers for an initial
dimensional matrix of diagonally layered disturbance force of .2N and -.5N.
isogramatic hyper planes. For example,
the following diagonalized matrix is 52-FLC
produced by applying the above formula
in 2 dimensions resulting in 9 diagonally
layered iso-lines.
4
24-FLC
This FLC keeps the pendulum in tight The following controller performs
control over the simulation period. reasonably well under the standard test
However, after the first .5 seconds, the and the robustness test. However, the
cart position is moving in the negative controller is unable to reduce the size of
direction. This is due to the fact that this the oscillations in both tests. This is due
controller only uses the pendulum angle to the fact that the controller has only 2
and angular velocity as inputs and MFs for each variable. Therefore, it
therefore, does not directly control the behaves linearly. In order for a
cart position. It works well for this controller to gradually reduce the size of
disturbance force because it was tuned the oscillations, it needs a polynomially
for this force. We can see from the shaped relationship between the input
following graph that this controller does and the output. This controller has the
not do very well on the robustness test advantage of being simpler and easier to
(-.5N). The controller is able to keep the tune because it only has a 16 element
pendulum from falling down, however, rule-base.
the cart moves far away from the starting
point. The oscillations are larger but are
within the .5m benchmark. 24-FLC
52-FLC
5
54-FLC 5. Conclusion
The following controller performs very
well under the standard test and the Manually tuned Fuzzy Logic Controllers
robustness test. The controller was able can be effectively applied to control the
to reduce the size of the oscillations in inverted pendulum problem. The
both tests. This is due to the fact that the controllers were able to recover quickly
controller has 5 MFs for each variable. from various deviations and stabilize the
Therefore, it behaves polynomially. pendulum within a tight band of control.
This controller has the disadvantage of The 54-FLC is by far the most accurate
being more complicated and more and robust model presented here. The
difficult to tune because it uses 5 MFs 54-FLC produced a quick and smooth
for each of the 4 input variables, 17 recovery on both tests. One drawback of
consequent functions and has a 625 the 54-FLC is its long processing time.
element rule-base. It also takes much A possible next step is to improve the
more computing time. running time by converting the iterative
calculations to matrix calculations.
6
References: Appendix:
1. Copyright (C) 1997 by the Regents of The following source code for the
the University of Michigan. 54-FLC is provided in the appendix: