Download TOP_1.0 - University of Portland

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Electrical engineering wikipedia , lookup

Wien bridge oscillator wikipedia , lookup

Regenerative circuit wikipedia , lookup

Opto-isolator wikipedia , lookup

Electronic engineering wikipedia , lookup

Negative-feedback amplifier wikipedia , lookup

Negative feedback wikipedia , lookup

Transcript
University of Portland
School of Engineering
5000 N. Willamette Blvd.
Portland, OR 97203-5798
Phone 503 943 7314
Fax 503 943 7316
Theory of Operations
Project Nuthatch: The Inverted
Pendulum
Contributors:
Jason Boyce
Jennifer Miller
Approvals
Name
Dr. Albright
UNIVERSITY OF PORTLAND
Date
Date
Name
Dr. Lillevik
SCHOOL OF ENGINEERING
Date
Date
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE II
Revision History
Rev.
0.1
0.9
0.91
1.0
Date
02/02/03
02/06/03
02/09/03
02/14/03
UNIVERSITY OF PORTLAND
Author
J. Boyce, J. Miller
J. Boyce, J. Miller
J. Boyce, J. Miller
J. Boyce, J. Miller
Reason for Changes
Began Initial Draft
Completed Initial Draft
Advisor Feedback
Industry Rep Feedback
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE III
Table of Contents
Summary....................................................................................................................... 1
Introduction .................................................................................................................. 2
Background .................................................................................................................. 3
Architecture .................................................................................................................. 4
General Description ................................................................................................................................4
System Components and Interfacing .....................................................................................................4
Power Supply ...................................................................................................................................4
Control Circuit ...................................................................................................................................4
Motor .................................................................................................................................................4
Position and Velocity Sensor ...........................................................................................................5
Track .................................................................................................................................................5
Cart ...................................................................................................................................................5
Pendulum .........................................................................................................................................5
Pendulum Sensor ............................................................................................................................5
Cart-Track Architecture ...........................................................................................................................6
Tachometer ......................................................................................................................................6
Motor .................................................................................................................................................6
Pulleys and Belt................................................................................................................................6
Potentiometers .................................................................................................................................6
Cart and Track..................................................................................................................................6
Pendulum .........................................................................................................................................6
Feedback Diagram and Transfer Functions ..........................................................................................8
The Plant, G(s) .................................................................................................................................8
The Motor, M(s) ................................................................................................................................8
The Compensator, K(s) ...................................................................................................................8
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE IV
Input and Output...............................................................................................................................8
k’ ........................................................................................................................................................8
bs+c ..................................................................................................................................................8
Design Overview.......................................................................................................... 9
Circuit Schematics...................................................................................................................................9
Circuit Design ....................................................................................................................................... 10
Unity Gain Buffers ......................................................................................................................... 10
Summing Junctions....................................................................................................................... 10
Integrator........................................................................................................................................ 11
Amplifiers ....................................................................................................................................... 11
Power Transistor Block ................................................................................................................. 11
Motor and Tachometer ................................................................................................................. 11
Potentiometers .............................................................................................................................. 11
Determination of Values....................................................................................................................... 11
Stability.................................................................................................................................................. 14
Conclusions ...............................................................................................................15
Research Appendix ...................................................................................................16
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE V
List of Figures
Figure 1. System Block Diagram… …………………………………………. ………………….. …..
4
Figure 2. Cart-Track Schematic .................................................................................................................5
Figure 3. Classic Feedback Diagram ........................................................................................................7
Figure 4. Transfer Functions ......................................................................................................................7
Figure 5. Control Circuit Schematic ....................................................................................................
9
Figure 6. Color-Coded Circuit Schematic ............................................................................................. 10
Figure 7. Matlab Plot: Impulse Response at the Output of M(s)........................................................ 14
Figure 8. Matlab Plot: Impulse Response at  ...................................................................................... 14
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
UNIVERSITY OF PORTLAND
REV. 0.9
SCHOOL OF ENGINEERING
PAGE VI
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
Chapter
REV. 0.9
PAGE 1
Summary
1
This document contains an introduction, background, architecture description,
design overview, and conclusion.
The introduction and background define the scope of this document and provide
a review of accomplishments prior to this document. Project Nuthatch is a solution to the
classic inverted pendulum problem. A cart with an inverted pendulum on top is situated on
a track. The cart will move back and forth in an attempt to balance the pendulum. The
design has been completed and a first cut prototype is currently being implemented.
The architecture section begins with a high-level system block diagram of Project
Nuthatch and proceeds to explain each system block with diagrams and descriptions. The
high level system blocks include the power supply, control circuit, motor, cart position and
velocity sensors, pendulum sensor, pendulum, cart, and track. The diagrams and
descriptions in the architecture section explain each block and the interactions between
blocks. One of these diagrams is a slightly lower level cart-track schematic, and the classic
feedback diagram for Project Nuthatch is also provided.
The design overview is where the design of our control circuit can be found, along
with an explanation of the design process and each circuit block. The control circuit
implements the classic feedback diagram for our system that is shown in the architecture
section. Matlab plots that demonstrate system stability are also included.
After our conclusion, the research appendix section documents the research we
have used to help us in our design.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
Chapter
PAGE 2
Introduction
2
The purpose of the Theory of Operations document is not only to aid the reader in
understanding the technical design, but also to assist in future projects or maintenance. If
the project develops any problems in the future, this document will be helpful in
understanding the layout of our system so that the problems are fixed quickly. Future
pendulum designs may be more complex, such as using a hinged pendulum, but our
basic design scheme may be used and modified. That information will be contained in this
document.
The document will also help advisors, industry representatives, students, and
other interested engineers to understand how Project Nuthatch works. The Theory of
Operations will provide high level models such as major mechanical blocks and their
interfacing and feedback diagrams for the control system. The bulk of the document will
show and explain the lower level circuit implementation.
The document begins with a background section to set the scene and review
product features. Then we will move to the architecture where we will see the foundation
of the design including architectural block diagrams and explanations of major
components. The key pieces and how they fit together are made clear in the architecture
section. In the design overview section, which is the bulk of the document, we will include
system block diagrams at a lower level including circuit schematics. Finally, the conclusion
will
recap
UNIVERSITY OF PORTLAND
key
points
and
make
recommendations
SCHOOL OF ENGINEERING
for
future
work.
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
Chapter
REV. 0.9
PAGE 3
Background
3
Project Nuthatch is a control system demonstration. The intended use is purely
instructive and educational. The only users of this system will be students and other
members of the University community. It is also an important academic exercise for the
designers because it will reinforce prior knowledge of control systems and greatly expand
upon that knowledge.
Nuthatch is a classic control system known as the “inverted pendulum.” The inverted
pendulum is composed of three main visible elements: a cart, track, and inverted
pendulum. The car is situated on a short, straight track. It may only move along the track.
A hinged inverted pendulum is located on the top of the car. Only one degree of freedom
exists for both the pendulum and the car. The car may only move to the left or the right,
and this also holds true for the pendulum. The ultimate goal is to balance the pendulum by
moving the car either left or right on the track, as necessary to maintain equilibrium.
This can be equated to tasks that the average person may be familiar with, like
attempting to balance an object, such as a baseball bat, on the palm of the hand. The
hand must be moved in the direction that the bat begins to fall in order to keep the bat
balanced. The project is somewhat simplified from this example by only allowing the car
and pendulum to move in one fixed plane of motion, as described above. Balance will be
kept using a control system with negative feedback circuitry rather than by physical human
means.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
Chapter
PAGE 4
Architecture
4
General Description
Pendulum
Stoppers
Pendulum
Power Supply
Pendulum
Sensor
Control Circuit
Position
and
Velocity
Sensors
Cart
Motor
Track
Cart and Pendulum Movement
Figure 1. System Block Diagram
System Components and Interfacing
Power Supply
Will supply +15 to –15 volts DC to power the control circuit, pendulum sensor, position
sensor, and motor.
Control Circuit
An analog feedback circuit to control the cart using the motor.
Motor
A DC motor.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 5
Position and Velocity Sensor
Components which sense the position of the cart on the track, as well as the velocity of the
cart.
Track
A straight track for the cart to move along.
Cart
The cart that moves along the track.
Pendulum
The inverted pendulum is attached to the top of the cart by a hinge.
Pendulum Sensor
A mechanism for sensing the position of the pendulum.
Cart-Track Schematic
Pendulum
(t)
V(t)
X(t)
Hinge
Motor
Motor Shaft
Pulley
Cart
Track
Belt
15
15
15
15
Potentiometer
Voltage proportional
to (t)
Ground
Multi-turn potentiometer
Voltage proportional to x(t)
Ground
From William McC. Siebert, Circuits, Signals, and Systems, MIT Press, Cambridge,
Mass., 1986
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 6
Figure 2. Cart-Track Schematic
Cart-Track Architecture
Tachometer
The tachometer attaches to the motor shaft to convert the rotational velocity of the motor
shaft into a voltage. This is used for the velocity feedback.
Motor
A 24-volt DC motor with one end of the shaft attached to the voltage tachometer and the
other end of the shaft turning a pulley and a multi-turn potentiometer.
Pulleys and Belt
One pulley is connected to the motor shaft and the other is free-ended at the other end of
the track. A belt wraps around the two pulleys and is attached to the cart. As the motor
shaft turns, the belt pulls the cart back and forth on the track.
Potentiometers
A multi-turn potentiometer is attached to the shaft of the motor to sense the position of the
cart. This potentiometer adds variable resistance and is connected between +15 and –15
volts DC. Another potentiometer is located on the hinge of the pendulum and is used to
measure .
Cart and Track
The metal cart rests on a single, straight metal rail allowing motion only along the rail.
Friction is kept to a minimum using ball bearings, which are the only interface between the
cart and the track.
Pendulum
The lightweight metal inverted pendulum is attached to the center of the top of the cart by
a hinge. It is also attached to a potentiometer to sense its position.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 7
Classic Feedback Diagram
bs + c
Qc +
+
-1
-
Q
k´
M(s)
-
G(s)
K(s)
Figure 3. Classic Feedback Diagram
X ( s)
kM

V ( s ) s( M s  1)
 s 1
K ( s)  K
Ks
M ( s) 
G( s ) 
 s2 / g
( L s  1)( L s  1)
L 
l
g
Figure 4. Transfer Functions
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 8
Feedback Diagram and Transfer Functions
The Plant, G(s)
This transfer function describes the cart-pendulum system and is derived using Newtonian
Physics, LaPlace transforms, and a lot of research.
The Motor, M(s)
This transfer function describes the motor and is derived using the circuit model for a DC
motor and control theory.
The Compensator, K(s)
This transfer function describes the compensation used to obtain stability by moving poles
and zeros into the left half of the plane.
Input and Output
The input, C, is the reference position at 90 relative to the track, or fully erect. The output,
, is the angular position of the pendulum relative to C.
k’
This is simply an adjustable gain block.
bs+c
This block implements velocity feedback, where b and c are gain blocks and s is a
differentiation block representing the tachometer.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
Chapter
PAGE 9
Design Overview
4
Circuit Schematics
+15 V
R2
10k
C2
9.3 uF
+15V
10k
10k
+
+
+
_
10k
+
33
_
_
100
10k
_
+
10k Rotary Pot 1
_
10k
-15V
-15V
+15V
10M
10k Multi-turn
Potentiometer
+ _
1k
+
24 V DC
MOTOR
_
_
+
-15 V
Figure 5. Control Circuit Schematic
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
+15 V
R2
PAGE 10
C2
10k
+15V
9.3 uF
10K Rotary Pot 1
100
10k
10k
+
+
+
_
10k
+
33
_
_
_
+
10k
_
10k
-15V
-15V
+15V
10M
10K Multi-turn
potentiometer
+ _
1k
+
24 V DC
MOTOR
_
_
+
-15 V
Figure 6. Color-Coded Circuit Schematic
Circuit Design
In the following descriptions, we will be referring to the colored circuit schematic in Figure
6.
Unity Gain Buffers
The orange-colored blocks are unity gain buffers. Unity gain buffers are used to isolate
resistance values. For example, we do not want the resistance of the potentiometers in
series with the resistance of our amplifiers because the behavior of the amplifier would
change.
Summing Junctions
The red-colored blocks represent our summing junctions. The summing junction located
at the bottom of our schematic is used to sum the two velocity feedback gains, bs and c.
The upper summing junction is used to add the negative feedback of the compensator,
K(s), to the velocity feedback portion of the circuit.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 11
Integrator
The blue-colored block is our compensator, which is just a simple integrator.
represents our K(s) block in the feedback diagram.
This
Amplifiers
The purple-colored blocks are basic amplifier blocks, which represent k, b, and c.
Power Transistor Block
The green-colored block is our power transistor block. This is used to generate enough
current to power the DC motor.
Motor and Tachometer
The 24V DC motor is connected to the tachometer by the shaft. The tachometer serves
as a voltage generator that is controlled by the velocity of the motor shaft.
Potentiometers
The multi-turn potentiometer connected to the motor shaft is used to measure the position
of the cart with a zero voltage equivalent to the cart being positioned in the center of the
track. The other rotary potentiometer is used to measure the angle of the pendulum with
zero voltage referenced to a fully erect pendulum.
Determination of Values
The inverted pendulum with no control circuit is an inherently unstable fourth-order
system. Our goal was to design an analog control system to stabilize this system.
Using Newtonian physics, we derived a mathematical model and transfer function for
the inverted pendulum. This portion of the system is known as the plant, G(s), which is
clearly labeled in our feedback diagram. The plant is what we want to control. This is
intrinsic to the system, therefore is not part of the circuit design, but is represented in our
feedback diagram for the purpose of mathematical understanding. We have also included
the well-known motor transfer function, which is represented by M(s) in our feedback
diagram. In implementation, this is simply the DC motor that will be controlled by our
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
circuit.
REV. 0.9
PAGE 12
Through research, we found the system could be made stable by adding
compensation (Lundberg). This compensator is represented in the feedback diagram by
K(s) and is implemented in circuitry by an integrator. Through further research, we found
that adding velocity feedback contributes additional stability and reduces the undesired
drift of the cart (Siebert). The velocity feedback is implemented by the bs+c block on our
feedback diagram. The bs portion is implemented in circuitry by a tachometer and an
operational amplifier and the c portion is simply another operational amplifier. The bs
portion of the velocity feedback is used to stabilize the position of the pendulum more
quickly, while the c portion is used to prevent the cart from drifting and eventually moving
to the end of the track.
The success of this project is contingent on designing the correct compensator for
the particular traits of the pendulum and the motor. This was accomplished through
research and the help of Matlab. Research suggested that the time constant of our
compensator transfer function , K(s), should be between the time constant of our motor
transfer function , M(s), and the plant transfer function, G(s) (Siebert). Please refer to
Figure 4 for the transfer functions. The plant time constant is simply a function of the
pendulum length. The time constant of the compensator is the product of the capacitor
value C2 and the resistor value R2. The motor time constant was determined using the
data sheet for our DC motor. After deciding on the pendulum length and finding the motor
constants, we selected a value for the compensator time constant that was directly
between the motor and plant time constants. From our motor data sheet, we determined
the following constants:
k M  18.559
 M  12.4ms
N *m
A
The plant constants are:
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 13
l  0.43m
L 
l
 0.2094 s
g
Therefore, we needed to pick a compensator time constant in the range
.01245s   K  .2094s
We then picked a compensator time constant of
 K  0.093s  R2 C 2
R2  10k
C 2  9.3F
With these determined values, we could construct the following transfer functions for
Matlab simulations.
18.559
s (0.0124s  1)
0.093s  1
K ( s) 
0.093s
2
s
9.81
G ( s) 
(0.2094s  1)(0.2094s  1)
M (s) 
Once all the values of the transfer function were obtained, it was time to prove
that the compensator stabilizes the inverted pendulum. A Matlab script was developed to
show the impulse response of our system at both the output (s) and at the output M(s).
The output of M(s) can be realized as the position of the cart as a function of frequency.
The impulse response of the system at (s) represents the stabilization of the pendulum
and the impulse response at M(s) shows the stability of the position of the cart. Please
refer to Figures 7 and 8 to see the Matlab simulations. As seen clearly from the Matlab
plots, both plots depict a stable system. It should be noted that these two plots show the
impulse response of our system with no velocity feedback included. It is not seen in
Figure 7, but if we zoom out of this plot, it is apparent that the position of the cart will drift.
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 14
This drift is very subtle and may not be a problem. If it is a problem, we will use velocity
feedback to compensate.
Stability
Figure 7. Matlab Plot: Impulse Response at the Output of M(s)
UNIVERSITY OF PORTLAND
SCHOOL OF ENGINEERING
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
REV. 0.9
PAGE 15
Figure 8. Matlab Plot: Impulse Response at 
Conclusions
5
This document outlined the implementation of Project Nuthatch. The problem was
revisited, and our solution to the problem was to design a control circuit that will stabilize
the cart-pendulum system. The design of the control circuit was presented and the
derivation of the circuit was thoroughly explained. As shown in the Matlab plots of the
impulse response, the system is stable.
The layout of the project has been determined as shown in our system block
diagrams, and the circuit design has been completed. The construction of a first cut
prototype is in process. The first time we construct the circuit we will leave out the velocity
feedback portion. If the cart drift is a problem then velocity feedback will be implemented
during the debugging process.
In the future it would be interesting to try to solve this problem using a mixed digital
and analog solution or by using computer control. Another fascinating approach would be
to use a pendulum that is double-hinged, further complicating the problem. If our project
and research were used as the starting point, this may be a realistic project for a larger
team
UNIVERSITY OF PORTLAND
of
SCHOOL OF ENGINEERING
students.
CONTACT: JASON BOYCE
THEORY OF OPERATIONS
PROJECT NUTHATCH
Chapter
REV. 0.9
PAGE 16
Research Appendix
6
References
Kent Lundberg. http://web.mit.edu/klund/www/pendulum.pdf
William McC. Siebert.
Massachusetts, 1986.
UNIVERSITY OF PORTLAND
Circuits, Signals, and Systems.
SCHOOL OF ENGINEERING
MIT Press, Cambridge,
CONTACT: JASON BOYCE