DOC

Lab 5 - MAE 106 Experiment #6

By Rebecca Sanders,2014-05-07 15:37
18 views 0
Lab 5 - MAE 106 Experiment #6

    MAE 106 Laboratory Exercise #5

    PD Control of Motor Position

    University of California, Irvine

    Department of Mechanical and Aerospace Engineering

    REQUIRED PARTS:

    Qty Parts Equipment

    2 1k? resistor, ? W (brown/black/red) Breadboard

    2 10k? resistor, ? W (brown/black/orange) Oscilloscope

    2 100k??resistor, ? W (brown/black/yellow) Function Generator

    1 LM 324 quad op amp chip Motor-Amp-Tach Console

    4 1?F capacitors Position-sensing “pot”

    1 BNC cable IC puller

    1 breakout (BNC to alligator clips) wrist grounding strap

    2 banana-to-banana cable (1 black, 1 red) multimeter

    2 banana-to-alligator clip cable (1 black, 1 red) scope probe

    var wire, 22AWG

    1 ?1/4” shaft coupling (c.1/2”lg)

1 Introduction

In this lab you will build a control system to make a motor shaft move to a position that

    you command. Controlling motor position is a common goal in automation (e.g. multi-

    joint robot arms, radars, numerically controlled milling machines, manufacturing

    systems). In addition, you will need a position controller for your final project.

The controller that you will build is called a “Proportional Plus Derivative (PD) Position

    Feedback System,” and is the most common controller found in industry. The PD control

    law is:

    ? (1) ???K(???)?K?pdd

     Where ? = actual motor angular position

     ? = desired motor angular position d

    ? ?= actual motor angular velocity

     K = position error gain p

     K = derivative gain d

     ??= desired motor torque

    Note that the controller has two terms one proportional to the position error (the “P”

    part), and one proportional to the derivative of position (i.e. velocity, the “D” part). Thus,

    it is called a “PD” controller.

     1

     . (?-?) -Kpd(?-?) - K? pdd-K+ ) d-(?-?K p+ ?d 2? 1/Js - Ks d. - K? d

     R2= 10k . 100k -?-K(?-?) - K? dpdd d?100k Function ? R1= 1k Amp - - motor pot Generator + + R1= 1k Op amp 2 Op amp 1

    C=1?F

    -

    + Op amp 3

     Figure 1 PD Motor Position Control System (Block Diagram and Circuit)

Figure 1 shows the block diagram and op-amp circuit that you will implement to make

    the PD control law for the motor. J is the inertia of the motor shaft.

The lab has the following four parts. You can do Parts 1 and 2 before coming to lab.

Part 1: What is the theoretical behavior of the controlled system?

    The key point to understand here is that the controlled system obeys the same

    differential equation as a mass-spring-damper system. Thus, the controlled system acts

    dynamically like a mass-spring-damper system. The control gains K and K determine pd

    the equivalent stiffness and damping of the system. The desired angular position of the

    motor (?) is equivalent to the rest length of the spring. d

Part 2: How can a circuit implement the control law?

    Op-amp circuits (adder, gain, inverter derivative circuits) can be used to implement the

    control law. The resistors and capacitors set the control gains K and K. pd

Part 3: What is the step response of the actual system?

    One way to characterize the system behavior is to measure how it performs when it is

    commanded to move rapidly from one position to another (i.e. to follow a step function

    input). You will find that the motor will overshoot and oscillate if the damping is too small.

Part 4: What is the frequency response of the actual system?

    Another common way to characterize the system behavior is to measure how it performs

    when it is commanded to follow a sinusoidal position. You will find that the controller

    acts like a low pass filter. It tracks low input frequencies well, and high frequencies

    poorly. Also, if the controller has low enough damping, it will resonate just like the

    spring-mass-damper system you experimented with in Lab 4 (i.e. the vibrating beam).

     2

2 What is the theoretical behavior of the controlled

    system?

In this section, you will derive the theoretical behavior the PD position controlled motor.

    In the time domain, the theoretical behavior is described by a differential equation. In

    the frequency domain, the theoretical behavior is described by the frequency response.

Q1 Derive the dynamical equation that describes how ? evolves with time when the

    controller is attached to the motor. Assume ? is the input. d

Q2 Derive the differential equation for a spring-mass-damper system (assume force is

    the input and position is the output). The differential equation for Q1 should be

    similar to the equation for Q2. This means that the PD position control system has

    the same dynamics as a spring-mass-damper system; i.e. it follows the same

    equations of motion. Thus, you can use your intuition about how the spring-mass-

    damper system works to design the PD controller. Explain what the mass (m),

    spring (k), damper (c) in the mechanical system correspond to in the PD system.

    Q3 Derive the closed-loop transfer function, G(s), for the controlled system (the input is

    ?, the output is ?). Use either block diagram algebra (applied to the block diagram d

    from Figure 1) or take the Laplace Transform of the differential equation that you

    derived in Q1.

Q4 Express the damping ratio and natural frequency of the system in terms of the

    control gains and motor inertia. The damping ratio is important because it

    determines whether the system oscillates. The natural frequency determines the

    frequency at which it oscillates.

P1 Plot the predicted response of the system to a step change in ? from 0 to 1 d

    radians, for damping ratios of 0.1, 1.0, and 2.0.

P2 Plot the predicted frequency response (both scaling and phase shift) for damping

    ratios of 0.1, 1.0, and 2.0. Do this on a Bode plot by plotting {20log(output

    amplitude/input amplitude)} vs. {input frequency on a log scale}, and {phase shift}

    vs. {input frequency on a log scale}.

3 How can a circuit implement the control law?

To implement the PD control law, you need to build the circuit shown in Figure 1.

Q5 By applying the op-amp golden rules, show that the input to the motor amplifier is:

    R2???(???)??VoutRC d2R1

    The derivation will be easier if you substitute the impedance 1/sC for the

    capacitor then treat it as a resistor in the frequency domain, then transform back

    to the time domain.

     3

Q6 Compare this equation with the control law of equation (1). What are K and K in Pd

    terms of the electronic components (resistor and capacitor values)? How would

    you increase the damping of the system?.

Q7 Briefly describe the specific purpose for each of the op-amps in Figure 1.

Part 3 What is the step response of the actual system?

Construct the circuit in Figure 1. Important: wire your circuit neatly! A neat circuit

    requires little extra time to wire, and it’s easier to debug. Circuits often take much more

    time to debug than they do to initially wire! Make sure to hook up the potentiometer correctly! The wiper of the pot should not be connected to the power supply!

If your circuit works correctly, the motor position should follow whatever input signal you

    provide with the function generator (square wave, sinusoid, constant voltage…).

IMPORTANT: Sometimes the circuit will not work and the motor will run uncontrollably

    at a very high speed. This wrecks the pots. If this happens, turn the motor off right

    away by turning of the DC supply to the motor. First, try to fix the instability problem by

    reversing the polarity across the sensing pot (you may have positive feedback instead of

    negative feedback). If this doesn’t work, debug your circuit. Do not try to debug your

    circuit with the motor running! Debug your circuit systematically.

Here are some debugging hints:

    ? Compare your wiring diagram to your circuit to make sure all of the connections are

    correct.

    ? Make sure you don’t have any loose connections. ? Verify that your output pot is working properly by connecting the scope to the wiper

    and moving the motor shaft by hand. The scope trace should move up and down.

    ? Verify that op-amp 1 is inverting and op-amp 3 is following.

    ? Verify that the output of op-amp 2 changes as you adjust ? with ? constant. You d

    can adjust ? using the function generator or another pot. d

Q8 Provide a step-input by using the function generator (4V peak-peak, 1 Hz square

    wave). Is the system underdamped or overdamped? Does the observed response

    agree with the theoretical one? Why is it different? What is the frequency at which

    is oscillates (the damped natural frequency, ?). damped

PRACTICAL EXAM 1: Demonstrate to the TA that your motor is following the step

    input.

P3 Suppose you didn’t want your motor to oscillate so much. This is an important

    issue! PD controllers are used in many applications such as NC milling machines,

    plotters, etc. You usually want your motor to go to a desired value quickly and

    accurately without oscillating! Which variable would you change in your differential

    equation for the PD system to increase damping? Increase the total capacitance

    to 2?F by adding another capacitor (recall that capacitors add in parallel). Observe

    the response to a step input. Repeat this for a total capacitance of 3 ?F and 4 ?F.

    Record the step response for C = 1, 2, 3, and 4 ?F.

     4

P4 In a mechanical system, if you wanted to the system to respond more quickly, you

    would increase the natural frequency (?) by picking a stiffer spring (higher k). n

    Double ? for the PD system by changing the appropriate resistor value. Keep C n

    = 4 ?F. Record the step response of the system and plot it on the same plot as P3.

Part 4: What is the frequency response of the actual

    system?

The goal of this last part of the lab is to characterize the frequency response of the

    system. In particular, you will explore how well the system tracks the desired input

    position when the input is a sinusoid, across a range of frequencies. Remember, you

    can view linear systems such as this one as “filters”. The PD controller acts like a low-

    pass filter, although it has a resonant peak if the damping is not great enough.

Q9 Change R1 to 1 K?? R2 to 10 K?? and C = 1 ?F. Now input a 1.0V amplitude sine

    wave. Start at a low frequency. Keep the voltage scale on the scope the same for

    both input and output. What is the output amplitude and phase shift at 1, 2, 4, 8,

    16, 32 Hz? Does the system have a resonant frequency? The amplitude should

    increase dramatically at this point. What is the resonant frequency and the output

    amplitude at resonance? Do you notice any high frequency oscillations in your

    output signal? What do you think might be causing those? Note: Don’t let the

    motor oscillate for a long time at resonance.

PRACTICAL EXAM 2: Demonstrate to the TA the resonant frequency for your

    motor.

P5 Make a Bode plot of the frequency response of the system. Plot {20log(output

    amplitude/input amplitude)} vs. {input frequency on a log scale}, and {phase shift}

    vs. {input frequency on a log scale}.

WRITE-UP

    - due at your next laboratory session

    - each student must complete his or her own write-up

    - make sure to use your own words and to type the write-up!!

    - include your name and laboratory time on the write-up

    - Graphs for the lab write-up must be generated using Excel or Matlab, and must

    include labels on the axes, voltage and time scales used on the scope, and a legend

    for multiple-line plots.

    Page limit = 2 pages, including graphs

    1. Explain briefly how a PD controller works, using words and not equations.

    2. Briefly describe three engineering applications of a PD controller

    3. Turn in the answers to Q1-Q4; the equations may be hand-written.

    4. Step Response: Turn in the plots for P1, P3 and P4 (use Matlab, but don’t show your

    code)

    5. Frequency Response: Turn in the plot for P2 and P5. (use Matlab, but don’t show

    your code)

     5

Report this document

For any questions or suggestions please email
cust-service@docsford.com