# ME 104 Sensors and Actuators Fall 2003

Laboratory 6 Closed Loop Analog Control Of DC Motor Velocity

Department of Mechanical and Environmental Engineering University of California, Santa Barbara

Fall 2003 Revision

integral (I).8 and Sections 5. Sections 5.Introduction In this laboratory. DC Motor Control Module User Manual. and proportional-integral (PI) control of a DC motor. The blue wire indicates –12V voltage supply. Your electronic circuit board has already been equipped with the LMC6484 op-amp chips and the MC7905 negative voltage regulator such that red wire indicates +5V voltage supply.11.10-5. Introduction to Mechatronics. you will power LMC6484 op-amp chips using V+ = 5V and V. For this laboratory. and black wire indicates 0V (GND). you will build analog circuits to implement proportional (P). you will use a LabVIEW VI to drive a DC motor.= -5V. which you should not use. - Background Reading Please read the following material prior to this lab: 1. 2 .1-5. Your ultimate goal is to control your DC motor such that the velocity (voltage) output VOUT is equal to a (desired) reference (voltage) input r. Pages 3-7 and 14-16. purple wire indicates –5V voltage supply. A MC7905 negative voltage regulator is used to convert the -12V signal from the DC Power Supply to a 5V signal for the op-amp. LJ Technical Systems Inc. similar to what you did in Laboratory #4. Histand and Alciatore. 2. You will observe both the motor drive input VIN and the tachogenerator output VOUT (velocity feedback) on an oscilloscope. Experiment 1: Open Loop Control of DC Motor Velocity In this experiment.

Open loop control of DC motor velocity In control system terminology. * The P(s) notation indicates that the Plant is represented mathematically by its transfer function. r = u. you will drive the DC motor such that the reference value is equal to the control input. this system is described as an “open loop control” system. That is. 3 . For this experiment. Figure 2 shows the open loop control system in block diagram form in which the following notation has been used: P(s) = Plant (DC Motor module)* I = Identity block (D/A Converter) rVI = reference signal from LabVIEW (VI) r = reference signal u = control input = VIN y = plant output = VOUT rVI I r=u Plant P(s) y Figure 2. Open loop control block diagram The D/A converter is represented by an identity block to indicate that the reference value seen by your system should be equal to the reference value specified by your LabVIEW VI. This is because the control (drive) signal VIN to your plant (the DC motor module) does not directly (automatically) depend on the output signal VOUT.Oscilloscope Channel 1 Channel 2 DC Motor Module D/A Converter PC Velocity DAQ board VOUT Sensor VIN Drive Circuits DC Motor Shaft Rotatio Figure 1.

00 V to +4. connect your motor control module to the CB-68LP connector block according to Table 1. Prepare (set the appropriate switches on) your DC motor control module so that you can drive the motor with analog voltage input and also obtain analog velocity feedback from the tachogenerator output. make sure it is in the 0 position. For best viewing. • • MOTOR DRIVE switch: VIN position – selects analog motor drive input TACHOGENERATOR switch: VOUT position – enables analog velocity feedback output 2. 7. *Note that AIGND (Pin 67) and AOGND (Pin 55) has been grounded to the bread board which is grounded to the power supply. Open and run yourname_lab4_ex5. CB-68LP connector block pin assignments for open loop control of DC motor velocity.00 V (inclusive) for the Motor Drive Input Control. Make sure that no wires or cables interfere with the moving parts of your motor. 3. DC Motor Control Module VIN socket (Analog voltage) on MOTOR DRIVE INPUT panel VOUT socket (Analog voltage) on TACHOGENERATOR OUTPUT panel Connect to: Pin 22 (DAC0OUT) Pin 68 (ACH0) 5. That is. 9. 8. Make sure the Eddy Current Brake is disengaged. Connect the 0V socket (Analog ground) on MOTOR DRIVE INPUT panel & TACHOGENERATOR OUTPUT panel to common ground. To drive the motor using the analog voltage output from the DAQ board. Incrementing by units of 1. 4. Table 1. Turn ON your Tektronix PS280 DC Power Supply. Connect your DC motor control module to your oscilloscope such that the reference r ( = VIN ) is viewed on Channel 1 and the velocity feedback VOUT ( = y) is viewed on Channel 2. Use a banana connector to connect the E (Enable Input) socket to the 0V socket to enable the input to drive the motor.1. 4 . 6.vi by clicking the Run Continuously button. This will provide power to the motor control module.00 V from -4. set your vertical scales to 1volt/division and your horizontal scale to 400 ms/division.

the boundary reference values of [–5. 10.00 V to 5. Save this VI as yourname_lab6_ex1. in the absence of output information. Experiment 2: Proportional (P) Control of DC Motor Velocity In this experiment. your plant P(s) has a steady-state error for nonzero reference values.y u = control input to VIN socket on Motor Drive Input panel y = plant output from VOUT socket on Tachogenerator Output panel * To avoid saturation effects.00 V] is reset to [-4. That is.00 and stop running the VI by clicking the Abort Execution (stop) button. make a sketch of the transient behavior and write down the steady state† values of r and VOUT (as displayed by the digital indicators on your VI front panel). This situation can be improved using closed loop (feedback) control. Although one would like (and expect) VIN ( = y) and VOUT ( = r ) to be equal. Set the Eddy Current Brake to the 1 position and repeat Step 7. 5 .observe the voltage signals on Channels 1 and 2 of your oscilloscope.00 V to 4. † “Steady state” means that you have waited long enough that transient motion has ceased. This brake acts as an external disturbance to your system. Set your Motor Drive Input Control to 0. except when VIN = 0V. In other words. 11. 12. the magnitude of your plant (motor) velocity is slightly different from what you would like it to be.vi.* For each increment. you should have observed that they are not equal. you will use a LabVIEW VI and a proportional (P) feedback control circuit to control a DC motor. Figure 3 shows the closed loop control system in block diagram form in which the following notation has been used: P(s) = Plant (DC Motor module) K(s) = Controller I = Identity block (D/A Converter) rVI = reference signal from LabVIEW (VI) r = reference signal e = error signal = r .00V].

rVI I r D/A Converter + Σ e Controller K(s) u Plant P(s) y - Figure 3. DC Motor Module rVI PC D/A Converter r u Control Circuit Drive Circuits DC Motor Velocity DAQ board Channel 1 Oscilloscope Figure 4. Closed loop control of DC motor velocity y Sensor Shaft Rotation Channel 2 6 . Closed loop (feedback) control block diagram Mathematically. the proportional controller can be described in the time domain as u P (t ) = K P e(t ) where uP is the output and KP is a constant gain. Figure 4 shows the system diagram for the closed loop control system of the DC motor.

R 2 1 Figure 5. The circuit consists of a difference amplifier (that calculates the error) followed by a noninverting amplifier that multiplies the error by a constant gain KP. Then.Build the circuit shown in 1. use your voltmeter to verify the values of your positive and negative supply voltages. Figure 5 on the left LMC6484 on the breadboard.= -5V ⇒ purple wire) to LMC6484 Pin 11*. Remember to provide positive power (V+ = 5V ⇒ red wire) to LMC6484 Pin 4 and negative power (V.) * As a safety precaution.7 MΩ. Proportional control circuit. KP = 1+ RF = 48 . Choose your resistors such that R = 100 kΩ and RF = 4. (Note that power supply connections are not shown for clarity. 7 . The connection diagram for the op-amp is shown in Figure 6.

vi by clicking the Run Continuously button. 3. 7. DC Motor Control Module VIN socket (Analog voltage) on MOTOR DRIVE INPUT panel Connect to: P feedback circuit output (uP connection). and observe the voltage 8 . That is. 6. Table 2. Increment the Motor Drive Input Control by 1V from –4. make sure it is in the 0 position. 5. Connect the reference signal r from Pin 22(DAC0OUT) to the proportional control circuit as shown in Figure 5.Figure 6.00 V to 4. To drive the motor using the proportional control signal uP from the proportional control circuit. inclusive. CB-68LP connector block pin assignments for proportional control of DC motor velocity. That is. connect your DC motor control module to your oscilloscope such that the reference r (DAC0OUT) is viewed on Channel 1 and the velocity feedback y = VOUT (ACH0) is viewed on Channel 2.00 V. Make sure the Eddy Current Brake is disengaged. Retain your oscilloscope connections from Experiment #1. 4. Retain the ground connections from Experiment #1. LMC6484 op-amp connection diagram 2. connect your motor control module and proportional control circuit to the CB-68LP connector block according to Table 2. Run yourname_lab6_ex1. VOUT socket (Analog voltage) on TACHOGENERATOR OUTPUT panel Pin 68 (ACH0) and P feedback circuit input (y connection).

8. Experiment 3: Integral (I) Control of DC Motor Velocity In this experiment. you will use a LabVIEW VI and an integral feedback control circuit to control a DC motor as shown in Figures 3 and 4. Make a sketch of the transient behavior and write down the steady state values of r and y (as displayed by the digital indicators on your VI front panel).1 µF. Set the Eddy Current Brake to the 1 position and repeat Step 5. Use the two remaining op-amps on the LMC6484 chip to build the integral control circuit shown in Figure 7. Provide the error input (e) to this circuit from the (first half of the) circuit you built in Experiment #2. Set your Motor Drive Input Control to 0. the two signals are still unequal.signals on Channels 1 and 2 of your oscilloscope. tracking has improved. but your plant P(s) still shows a steady-state error for nonzero reference values. Then. RF = RI = 1 MΩ. and C = 0. Although the velocity signal y ( = VOUT ) is closer to the reference value r than in the open loop case (Experiment #1). In other words. 1. 9. Choose your resistors and capacitor such that R = 100 kΩ.  1  RF  KI = −   R C  − R  = 100 . Mathematically. This steady-state error can be eliminated using closed loop integral control.00 and stop running the VI by clicking the Abort Execution (stop) button.  I   9 . the integral (I) controller can be described in the time domain as u I (t ) = K I ∫ e(η )dη 0 t where uI is the output and KI is a constant gain.

This circuit consists of an integrator (that calculates the error integral) followed by an inverting amplifier that multiplies the error integral by a constant gain KI.00 V to +4. Open and run yourname_lab6_ex1.00 V. DC Motor Control Module VIN socket (Analog voltage) on MOTOR DRIVE INPUT panel Connect to: I feedback circuit output (uI connection). That is. . VOUT socket (Analog voltage) on TACHOGENERATOR OUTPUT panel 3.I 3 4 Figure 7. Integral control circuit. To drive the motor using the integral control signal uI from the feedback control circuit. Increment your Motor Drive Input Control by 1V from -4. 4. (Note that power supply connections are not shown for clarity. Table 3. 6. CB-68LP connector block pin assignments for integral control of DC motor velocity. That is. connect your DC motor control module to your oscilloscope such that the reference r (DAC0OUT) is viewed on Channel 1 and the velocity feedback y = VOUT (ACH0) is viewed on Channel 2. 10 Pin 68 (ACH0) and feedback circuit input (y connection). make sure it is in the 0 position. 5. . Make sure the Eddy Current Brake is disengaged. Make a sketch of the transient behavior and write down the steady state values of r and VOUT as displayed by the digital indicators on your VI front panel. Retain your oscilloscope connections from Experiment 1.) 2. inclusive.vi by clicking the Run Continuously button. Retain the ground connections. connect your motor control module and feedback circuit to the CB-68LP connector block as shown in Table 3. and observe the voltage signals on Channels 1 and 2 of your oscilloscope.

In other words. Provide the inputs (uP and uI) to this circuit from the circuits you built in Experiment #2 and #3. 11 . Namely. Mathematically. this has been achieved at a price. you will use a LabVIEW VI and a proportional-integral (PI) feedback control circuit to control a DC motor as shown in Figure 4 and Figure 3. However. 8. Your plant P(s) should show zero steady-state error for all reference values. although the velocity signal y = VOUT will equal the reference value r after a sufficient amount of time has passed. Set the Eddy Current Brake to the 1 position and repeat Step 5. Choose the resistors such that R = 10 kΩ. Use op-amps 1 and 2 on the right LMC6484 chip on the breadboard to build the circuit shown in Figure 8. 1.00 and stop running the VI by clicking the Abort Execution (stop) button. Experiment 4: Proportional-Integral (PI) Control of DC Motor Velocity In this experiment. Set your Motor Drive Input Control to 0.7. Then. the PI controller can be described in the time domain as u PI (t ) = u P (t ) + u I (t ) = K P e(t ) + K I ∫ e(η )dη 0 t where KP and KI are constant gains. By combining proportional and integral control. the (desired) zero steady-state error condition can be maintained. but with significantly reduced overshoot. the velocity has a tendency to overshoot its intended target at the onset. KP and KI will remain unchanged from Experiment #2 and #3. your system experiences transient oscillations that you did not observe previously.

12 . Retain your oscilloscope connections from Experiment 1. DC Motor Control Module VIN socket (Analog voltage) on MOTOR DRIVE INPUT panel Connect to: PI feedback circuit output (uPI connection). This portion consists of a summer (that sums the proportional and integral control signals) followed by an inverting amplifier with unity gain. make sure it is in the 0 position. (Note that power supply connections are not shown for clarity). connect your DC motor control module to your oscilloscope such that the reference r (DAC0OUT) is viewed on Channel 1 and the velocity feedback VOUT (ACH0) is viewed on Channel 2.1 2 Figure 8. VOUT socket (Analog voltage) on TACHOGENERATOR OUTPUT panel Pin 68 (ACH0) and PI feedback circuit input (y connection). Make sure the Eddy Current Brake is disengaged. Table 4. CB-68LP connector block pin assignments for PI control of DC motor velocity. That is. 2. 3. connect your motor control module and feedback circuit to the CB-68LP connector block as shown in Table 4. A portion of the PI control circuit. That is. 4. To drive the motor using the PI control signal uPI from the feedback control circuit.