ENGR 058 (Control Theory) Laboratory

Seat-of-the-pants motor control

In this lab you will build on the last lab to control a motor, a much faster (and more linear) system than the hairdryer/box system.  In this lab I want you to become familiar with the system and try to control the system without much recourse to theory.\

You will need a PC with data acquisition card a "Universal Power Module" and a "Srv-02 Plant."  The Power modules has two purposes: 1) it takes signals from the motor set up and converts them to appropriate levels for the computer, and 2) it takes low power signals from the computer and sends much higher power signals to the motor.  The "Plant" is just Control Theory jargon for the system being controlled.

These are all in 310.  There are only two sets of apparatus, so you may need to schedule with other groups to avoid conflicts.

The lab

First steps

  1. Connect "S1 & S2" on back of "SRV-02 PLANT" to "S1 & S2" on "Universal Power Module." Connect channel 1 (yellow) of "To A/D" from "Universal Power Module" to "ADIN0" of"NI E-Series Terminal Board." This connection is for measurement of the angle of the output of the plant. Measure the voltage as you turn the motor slowly. Try this as you do a full revolution and note the discontinuity in the voltage. In particular, record the voltage when the motor is at 0 degrees (the line on the disc attached to the motor is at 0 degrees - this should give close to 0 volts), and at 45 degrees counter clockwise (close to -1.5 volts).
  2. Now connect the "DAC0" output from the terminal board to the "From D/A" input on the Power Module. Connect the "To Load" output from the Power Module to the "MOTOR" input of the plant. Now, you can turn the motor by applying a voltage from the computer.
  3.  Note: all your connections should be robust - there should be no need for banana clips or twisted wires...
  4. Turn on the "Universal Power Module" (the tall black box with connectors on the top of the front panel).
  5. Load the model "E58Lab3Template.mdl" into Simulink and compile and run it.  The pulse generator gives an output between 0 and -1.5 V.

Here is the output when I ran it (note: -1.5V corresponds to about 45°).

The blue is the command input, the red is the output of the controller, and green represents the angle of the motor.  Note that the output tries to follow the input.

The fact that the gain is 1.5 and the voltage corresponding to 45° is -1.5V is purely coincidental.  Keep the -1.5V angle, and try adjusting the gain and note how the response behaves.  You might need to slow the square wave down to let the system achieve equilibrium.

Linear controller

Your first task is to see if you can get "better" response by replacing the simple gain block (set to 1.5) with something else. 

Anything goes

Repeat the first task, with no restrictions on the blocks used or the output of the controller.  You may want to use a saturation block to saturate the output at ±9.9V (I got strange behavior if I tried to output larger voltages).  Record your best attempt.

For your report

This should be a short report.

Present:

 

Bring your results to class on 2/28.  We will discuss these in class.