Carnegie Mellon University

Department of Mechanical Engineering

24-352 Dynamic Systems and Control

Spring 2001

 

Lab 5 - Motor Speed Control

Part I. Introduction

 

In this lab, you will be using proportional feedback control to control the speed of the motor-tach system from Lab 4. A block diagram showing the closed-loop setup is shown below. Note that this diagram does not give the signs of the summer, or any of the content of the blocks.

figure40

This setup is identical to that used in Lab 4 except for the controller closing the feedback loop. This controller is an op-amp circuit set up as an inverting summer/gain. In this lab, you will design a controller gain to meet particular design specifications, such as settling time and steady-state error.

 


Part II. Measurement

1. Open Loop Response

The open loop TF is of the same for as that in Lab 4, i.e.

equation44

 

In this lab, treat the Amplifier as part of the motor-tach system. Since the amplifier's gain always multiplies the motor's gain, the product of the two can be treated as the entire system's gain, and there is no need to deal with them separately. Since you may be using a different motor and tachometer, it is necessary to first identify the motor from its open-loop response.

i. Step Response

The motor's gain and time constant can be computed from the open-loop step response, just as was done in Lab 4.

 

  1. Connect Power Supply to Amplifier
    The amplifier is powered with +/-20V from the dual power supply. This requires three connections: +20V, GND, and -20V.
    • Turn on the power supply.
    • Set the power supply tracking switch to Independent, switch both sides to Volts and set each side of the power supply to 20V. Turn the supply off!
    • Connect the negative terminal of the left side of the supply to the positive terminal of the right side with a jumper wire (see picture), creating the GND signal from either of the connected terminals.
    • Attach a BNC/banana adapter to the left side of the supply, with the GND tab to the right. This gives +20V and GND.
    • Attach a banana cable to the negative terminal of the right side. This gives -20V.
    • Plug the banana cable from the -20V on the power supply to the -V terminal of the amplifier.
    • Attach a BNC/banana adapter to the +V and GND terminals of the amplifier with the GND tab to the right.
    • Connect this to the BNC/banana adapter on the power supply with a BNC cable.

     

    Power Supply Amplifier

  2. Connect Motor and Tach to Amplifier, Oscilloscope and Function Generator
    • Connect jumper wires to IN, OUT and GND terminals of the amplifier.
    • Connect black lead from motor and red lead from tach to the GND terminal on amplifier using a clip cable.
    • Connect the red lead from motor to the OUT terminal of amplifier using a clip cable.
    • Connect a BNC/clip cable to Channel 2 of the oscilloscope. Clip the black lead to the GND wire, and the red lead to the black lead from the tach.
    • Attach a BNC T-connector to the output of the function generator.
    • Connect one side of T-connecter to Channel 1 of the oscilloscope using a BNC cable.
    • Connect a BNC/clip cable to the other side of BNC T-connector. Clip the black lead to the GND wire, and the red lead to the IN terminal of the amplifier.

    Setup for Open-Loop
  3. Set the function generator and oscilloscope.
    • Set function generator to a square wave with amplitude 100mVpp (This is really 200mVpp) and frequency 1Hz.
    • Set the function generator offset to 120mV. (This is really a 240mV offset). This offset is to ensure that the motor is always moving. If the motor is allowed to stop, static friction will affect the response. The step response will occur between a low speed and a high speed, rather than from a stop.
    • Set oscilloscope voltage scale for channel 1 (the input from the function generator) to 100mV/div.
    • Set the time scale to 20ms/div.
    • Set the horizontal delay to 80ms (this moves the step to the left of the screen so that the entire step response can be seen.)
    • Set the trigger source to Channel 1, the trigger mode to Normal and the trigger level to about 240mV.
    • Set the vertical position of channel 1 so the step trace appears on the upper half of the screen.
    • Set the voltage scale for channel 2 (the tach output) to 1V/div.
    • Set the vertical offset so the origin of channel 2 is near the bottom of the screen.
  4. Measure Step Response
    • Turn on power. The motor should spin, and you should get a response similar to that shown below.
    • You may switch to Average Display mode to have better picture on oscilloscope screen.
    • Use the cursors to measure the difference in voltage levels between the initial and final values of the output step response. Be sure to use the cursors for Source 2. Record this value.
    • Print the resulting screen.
    • In Lab, calculate the K and tex2html_wrap_inline193 values from your step response. Use either the settling time or initial slope method for tex2html_wrap_inline195 . You will use these values later.

    Open-Loop Step Response

ii. Frequency Response

Rather than plotting the entire frequency response, you will just evaluate the bandwidth. The bandwidth is defined as the frequency above which the output amplitude in response to a sinusoidal input is 3dB below (-3dB is equivalent to multiplying by 0.707) the output amplitude to a low-frequency sinusoid. The bandwidth is a common characteristic for defining the performance of a control system since a system can respond well only to frequencies below its bandwidth.

 

iii. Disturbance Response

The disturbance, in this lab, will simply be a torque applied to the shaft of the motor by hand. Since we cannot measure this, you will only get a qualitative idea of the effect of the disturbance. In order to best see the disturbance response, a command of zero will be sent to the motor (in this case, it means no input to the motor.)

 

2. Proportional Control

Controller Circuit

In this section, you will add a control loop around the system to improve the step response, improve steady-state error, increase bandwidth, and improve disturbance rejection. The controller will be an inverting summer/gain op-amp circuit as shown below. The gain will first be selected so as to give one-half the time constant as the open loop response. The relationship for this circuit is tex2html_wrap_inline205. Notice the negative on r(t) - this is an assumed negative. That is, if you give it a positive input you should expect a negative output.

figure86

 

Calculate Gain and Set Potentiometer

The relation between closed-loop time constant and open-loop time constant is given as

= / (1 + K Kc)

You will derive this relation in lab question #4. For now, by using this relation;

Op-Amp

You will be using a LM324 quad operational-amplifier chip. This chip has four op-amps, you will only use one in this lab. It requires (+) and (-) power, and a GND signal is needed to form the proper circuit. These three power signals will be taken off the terminals from the amplifier. The chip's pin I/O's are shown below.

figure95

 

i. Closed-Loop Step Response

 

  1. Apply Power to Breadboard
    The pictures following this and the next items may be helpful in assembling the circuit.
    • Be sure the power is turned off.
    • Connect the GND terminal of the amplifier to the GND post on the breadboard with a banana cable.
    • Connect the GND post to the top row of the breadboard with a small jumper wire.
    • Connect the top row of the breadboard to the second column in from the right with a small jumper. This is the GND column.
    • Connect jumper wires to -V and +V terminals of the amplifier.
    • Connect the -V terminal of the amplifier to the rightmost column of the breadboard using a jumper wire and a clip cable. This is the -V column.
    • Connect the +V terminal of the amplifier to the first column to the left of the right half section of the breadboard using a jumper wire and a clip cable.
  2. Insert Op-Amp Chip and apply +/-V
    • Insert the chip in the center of the right half of the breadboard so that it straddles the small gap in the middle with the end with the notch facing up (see picture).
    • Connect the +Vcc pin of the chip to the +V column with a small jumper.
    • Connect the -Vcc pin of the chip to the -V column with a small jumper.
    • Connect the + input pin of one of the op-amps (pin 12 in the picture) to the GND column with a small jumper. This sets the zero reference voltage for the summer.
    Power Connections for Op-Amp Circuit
  3. Set Potentiometer and Build Controller Circuit
    • Use the multimeter to measure the resistance of the potentiometer between the two leads. When measuring resistances, be careful not to touch the multimeter leads.
    • Set the resistance of the potentiometer to the value calculated earlier (R2 value).
    • Attach the potentiometer between the output (pin 14) and negative input (pin 13) terminals on the op-amp. Be careful not to change the setting.
    • Attach two 560K resistors (green-blue-yellow) between the negative input (pin 13) of the op-amp and two different free rows of the breadboard.
  4. Connect Controller to System
    • Detach the red clip from the IN terminal of the amplifier and attach it to the free end of one of the input resistors in the op-amp circuit. This is -r(t), the reference input.
    • Detach the red clip from the tachometer signal wire and attach it directly to the corresponding terminal on the tach. This will free up the wire, and attach this wire (which is the tachometer signal wire) to the row of breadboard containing the free end of the remaining input resistor. This is the output signal being fed back.
    • Connect the output pin of the op-amp (pin 14) and the IN terminal of the amplifier by using a jumper wire and a clip cable. This is the control signal.
    Controller Circuit Layout
    Setup for Closed-Loop
  5. Measure Step Response
    • Check your connections. It is particularly important that the power be applied to the op-amp in the right direction, and that none of the pins on the chip are shorted to each other.
    • Set the function generator to a square wave input of amplitude 2.5Vpp, offset 2.5V (keep in mind these are 5V in reality), and frequency 1Hz.
    • Set Channel 1 voltage scale to 5V/div and Channel 2 voltage scale to 1V/div on the oscilloscope .
    • Set the time scale to 20ms/div, and the time delay to 80ms.
    • Set the trigger level to 5V.
    • Adjust the vertical position of channel 1 so that the input appears in the top half of the screen.
    • Turn on the power. If the voltage levels on the power supply do not go up to 20V, then turn it off immediately since something is most likely shorted.
    • If the motor spins uncontrollably, you are in positive feedback. If this is the case, interchange the two leads from the tachometer.
    • Adjust the vertical position of channel 2 so it appears in the bottom half of the screen. Trace 2 will be negative when trace 1 is positive (see picture for closed loop step response).
    • Average display should be useful again.
    • Use the cursors to measure the output step response amplitude.
    • Print this screen.
    • Using step response determine closed loop gain Kcl and time constant.
    • Move the red oscilloscope lead from the tach output to the output of the op-amp (pin 14). Here, you may use an extra jumper wire to connect output of the op-amp (pin 14) row on protoboard.
    • You are now viewing the control signal to the system. You may set the time scale on the oscilloscope screen to 100ms/div and voltage scale on Channel 2 to 200mV/div.
    • Print this screen and re-attach the red oscilloscope clip to the tach output.
    Closed-Loop Step Response Closed-Loop Control Signal

ii. Closed-Loop Frequency Response

Follow the same procedure as you did when finding the open-loop bandwidth to find the closed-loop bandwidth.

 

iii. Closed-Loop Disturbance Response

Follow the same procedure as you did when examining the open-loop disturbance response to examine the closed-loop disturbance response. The shaft should be more difficult to turn now. To compare this with the open-loop, disconnect the motor from the OUT terminal of the amplifier. After experimenting, connect it back to OUT terminal of the amplifier.

Positive Feedback

In this section, you will put the system in positive feedback and examine the resulting instability.

3. Frequency Response Plots

Now, you will generate a set of Bode plots for both open and closed loop using the signal analyzer. Sample plots appear below this section.

i. Closed Loop Frequency Response

 

ii. Open-Loop Frequency Response

 

Closed-Loop Frequency Response Open-Loop Frequency Response

 


Part III. Lab Report

Note: Please answer all questions by numbering them in the order given here.
  1. Open Loop Step Response
    1. Given your open loop step response, calculate the gain and time constant (K and tex2html_wrap_inline233 ).
    2. Write the open loop transfer function of the amp-motor-tach system.
  2. Open Loop Frequency Response
    1. Analytically show that the bandwidth frequency occurs at tex2html_wrap_inline235. Starting with open loop transfer function, make tex2html_wrap_inline237 substitution and then find the amplitude expression for transfer function. Set this to 0.707 times the maximum value(-3dB below) and solve for tex2html_wrap_inline239.
    2. Given your transfer function obtained earlier, calculate the expected bandwidth frequency. How does this compare to the frequency obtained experimentally.
    3. Compare this frequency to the bandwidth obtained from the spectrum analyzer (by finding -3dB). Why might they be different? Why might the amplitude of the spectrum analyzer's output be different than that obtained by hand? (hint - consider friction).
  3. Open Loop Disturbance Response
    How does the open loop system respond to a disturbance? Why?
  4. Closed Loop Step Response
    1. Assuming negative feedback, given the open-loop transfer function obtained earlier, write down the closed-loop transfer function in terms of the controller gain, Kc, and the open loop parameters K and tex2html_wrap_inline209.
    2. Given the new closed-loop transfer function, solve for the closed loop gain, tex2html_wrap_inline241 , and time constant, tex2html_wrap_inline243, in terms of the open loop parameters, K and tex2html_wrap_inline209, and the controller gain, Kc.
    3. What happens to tex2html_wrap_inline245 and tex2html_wrap_inline247 as Kc is increased?
    4. What happens to the closed-loop pole as Kc is increased?
    5. Calculate the value of Kc that will make tex2html_wrap_inline249 symbolically.
    6. Plug in the numbers and show your calculations for the resistance value of the potentiometer.
    7. Calculate the actual tex2html_wrap_inline251 and tex2html_wrap_inline253 from your step response. Compare this to what is expected. Why might they be different?
    8. Calculate the transfer function from the input to the control signal (the signal between the controller and the amplifier) given your open-loop transfer function.
    9. For the step input given to the system, find the control signal as a function of time.
    10. Compare the observed control signal to the expected control signal. Look at the steady-state value, the shape of the response, and the size of the peaks.
    11. Why might you want to use a very large gain in this controller? Why can't you use an arbitrarily large gain? Think in terms of the control signal and the capabilities of the amplifier.
  5. Closed Loop Frequency Response
    1. What bandwidth would you expect in closed loop, given your theoretical closed loop transfer function? Also calculate it in terms tex2html_wrap_inline255. Compare these values to the observed bandwidth. Why might they be different.
    2. Compare the bandwidth obtained from the signal analyzer to these values. Explain any differences.
    3. Why does bandwidth give a good indication of the performance of the control system?
  6. Closed Loop Disturbance Response
    1. Compare what you observed in closed-loop to what you observed in open-loop.
    2. Physically, how does the system respond to a disturbance? Explain what the controller does in response to the disturbance.
    3. For closed loop, assuming the disturbance adds in at the control signal, calculate the transfer function from the disturbance to the output in terms of Kc. What happens to the steady-state response as Kc is increased? What does this say about Kc?
  7. Positive Feedback
    1. Calculate the closed-loop transfer function in positive feedback.
    2. Compute the pole of this transfer function. What does this say about the final value and the stability?
    3. Compute the response to an impulse input as a function of time. compare this to what you observed and plotted.
    4. Will all systems be unstable in positive feedback?
    5. Will any systems be unstable in negative feedback?

     

     

    About this document ...

    This document was generated using the LaTeX2HTML translator Version 96.1 (Feb 5, 1996) Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit, University of Leeds.
    The translation was initiated by Jonathan E Luntz, last update was made by Kyun Hee Koh