Inverted Pendulum

1 / 37

Inverted Pendulum - PowerPoint PPT Presentation

Inverted Pendulum. Emily Hamilton ECE Department, University of Minnesota Duluth December 21, 2009. ECE 5831 - Fall 2009. 1. Overview. Fuzzy sets Fuzzy operations Conventional controller Performance objectives and evaluations Fuzzy controller Defining a rule base Fuzzification

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Inverted Pendulum

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

Inverted Pendulum

Emily Hamilton

ECE Department, University of Minnesota Duluth

December 21, 2009

ECE 5831 - Fall 2009

1

Overview
• Fuzzy sets
• Fuzzy operations
• Conventional controller
• Performance objectives and evaluations
• Fuzzy controller
• Defining a rule base
• Fuzzification
• Inference engine
• Defuzzification
• Conclusion

2

2

Fuzzy Controller
• Parts of fuzzy controller
• Rule base: set of If-Then rules
• Inference mechanism: combines rules to obtain the best control
• Fuzzification interface: transforms linguistic inputs into fuzzy inputs
• Defuzzification interface: transforms fuzzy outputs into linguistic terms

3

3

Fuzzy Sets
• Fuzzy set A defined by:

A = {(x, A(x)) | x is in X}

• Where X is the set of elements in the set:

X = {0, 1,… , n}

4

Fuzzy Sets
• X is also known as the universe of a fuzzy set
• A(x) is the membership function of x
• Grade of membership of the set
• Values in the range {0,1}

5

Fuzzy Operations

Some Common Operations

• Union
• Intersection
• Complement

Take the fuzzy sets A and B for these examples.

A = {{1,0.3}, {2,0.7}, {3,0.6}}

B = {{1,0.4}, {2,0.1}, {3,0.9}}

6

Fuzzy Operations
• Union
• represented by AUB
• AUB = max(A(x), B(x))

7

Fuzzy Operations
• Intersection
• represented by A ∩ B
• A∩B = min(A(x), B(x))

8

Fuzzy Operations
• Complement
• represented by A’(x)
• A’(x) = 1 – A(x)

9

Common Membership Functions
• Triangular
• Trapezoidal
• Gaussian

10

Performance Objectives
• Disturbance rejection properties
• Insensitivity to plant parameter variations
• Stability
• Rise-time
• Overshoot
• Settling time

13

Technical Constraints
• Cost
• Computational complexity:
• Manufacturability
• Reliability
• Maintainability
• Understandability
• Politics

14

Performance Evaluation
• Mathematical Evaluation
• To prove that all performance objectives have been met
• Relies on accuracy of mathematical model
• Complex nonlinear mathematical models do not exist yet
• Can be used to enhance confidence that control system will work properly

15

Performance Evaluation
• Simulation-Based Analysis
• Simulation of actual system is built and tested with the control system
• Can be more accurate than the mathematical model because system constraints and changes can be applied easily
• Not perfectly accurate

16

Performance Evaluation
• Experimental Evaluation
• Implementing the control system in the actual process
• Can be helpful to find problems that would not have been found elsewhere
• Can be risky

17

Defining a Rule Base
• Choose inputs and outputs
• Put knowledge into rules:
• Use linguistic descriptions from experts for inputs and outputs
• Relate the inputs and outputs with the experts’ knowledge
• Create a table representing the rule base

19

19

Inverted Pendulum Rules
• If the angle q is positive and the velocity q ' is positive, then decrease a lot.
• If the angle q is positive and the velocity q ' is zero, then decrease .
• If the angle q is positive and the velocity q ' is negative, then do not apply .
• If the angle q is zero and the velocity q ' is positive, then decrease .
• If the angle q is zero and the velocity q ' is zero, then do not apply

22

22

Inverted Pendulum Rules
• If the angle q is zero and the velocity q ' is negative, then increase
• If the angle q is negative and the velocity q ' is positive, then do not apply .
• If the angle q is negative and the velocity q ' is zero, then increase .
• If the angle q is negative and the velocity q ' is negative, then increase a lot.

23

Membership Functions
• Evaluate the certainty of the linguistic values
• We use the certainties of the linguistic value to create out membership functions.
• Input values:
• e(t) = π/4
• d/dt(e(t)) = π/16
• Membership function values:
• Apossmall(e(t)) = 1
• Azero(d/dt(e(t))) = Apossmall(d/dt(e(t))) = 0.5

26

26

Fuzzification
• Example: Certainty of NegAngle
• Angle, θ, is 45˚. F(45 ˚) = 0
• θ = -45 ˚. F(-45 ˚) = 0.4
• θ = -95 ˚. F(-95 ˚) = 1

27

27

Inference Engine
• Premise: the certainty of a rule in a situation. Ex: P(θ, d/dt(θ)) = 0.5
• A rule is “on” if its certainty is greater than zero.
• The inference engine combines the recommendations of all rules that are “on” to find the control output.

31

31

Inference Engine
• Determines relevance of each rule in the given situation using the premises
• Draws information using the rule base and the inputs

32

32

This equation is used to defuzzifiy the outputs of the inference engine in the Center of Gravity (Area) inference engine.

Each inference engine has its own equation for defuzzification.

Defuzzification

33

33

Conclusion
• Fuzzy sets
• Control system should meet performance objectives and pass evaluations
• Use expert knowledge to create inputs, outputs, and rule base.
• Fuzzify crisp inputs
• Inference engine uses rule base to decide control output
• Defuzzify output to crisp value

35

35

References
• [1] K. Passino, S. Yurkovich. Fuzzy Control. 1998. Addison Wesley Longman, Inc.
• J. Jang, C. Sun. “Neuro-Fuzzy Modeling and Control.”

36

36