ENGR 058 (Control Theory) Laboratory

Rigorous motor control

In this lab you will build on your work from last week, and use some of the theory we've discussed in class.

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.  Please put away any equipment you use when you are done.  There are only two sets of apparatus, so you may need to schedule with other groups to avoid conflicts.

The lab

Task 1

  1. Connect "S3" on the "Univeral Power Module" to the unlabelled connector between "ENCODER" and "MOTOR" on the back of "SRV02."  Connect channel 3 (red) of "To A/D" from "Universal Power Module" to "ADIN2" of "NI E-Series Terminal Board." This connection is for measurement of the speed of the output motor. Measure the voltage as you turn the motor slowly. .
  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. Turn on the "Universal Power Module" (the tall black box with connectors on the top of the front panel).

Task 2: System Identification

  1. Load the model "E58Lab5Template.mdl" into Simulink and compile and run it.  Note - this only runs for 2 seconds. Make sure all of your programs for this lab run until equilibrium is achieved.
    Lab 3 template

  2. This will find the step response of the system (but not the unit step, because the input is multiplied by 5).
  3. Use the data to find the transfer function of the motor in the form:

    To do this, find the step response due to Hm(s) and use the final value and the time constant of your response to find tm and Km.  Don't forget to compensate for the fact that the input is 5 volts instead of a unit step.

    I used the following MatLab code to isolate the interesting part of the data (for curve fitting):
    >> y=y(find((t>=1) & (t<1.4)));
    >> t=t(find((t>=1) & (t<1.4)));
    >> t=t-t(1);
    >> plot(t,y)
    As a quick check, I got Km≈1.7 and tm≈0.02.  Your numbers will be somewhat different, but in the same ballpark.
    Note: in this equation Ωv(s) is the voltage from the output of the tachometer that measures motor speed (it is not the motor speed itself). Vi(s) is the input voltage to the power amplifier (from the D/A convertor).

Task 3: Proportional Control

  1. Put your system in a a loop with a proportional controller.  A Simulink model is shown below.  To do the experiment you will need to send the output of the controller to the D/A output that controls the motor (don't forget a saturation block to limit the range of the output to less than ±10V), and read the speed of the motor in from the A/D convertor and feed that back to the summing block.  Make sure your sampling time is 0.001 S (the easiest thing is probably to save the model from Task 2 under a different name, and modify it).  The step should be a unit step (1 V).

  2. Measure the output with Kp=2, 10, and 50.  For each value of Kp find the time constant and steady state error.

Task 4: Integral Control

  1. Put your system in a a loop with an integral controller. 
    Integral Control

  2. Present data for 3 values of Ki corresponding to heavily overdamped (ζ≥2), heavily underdamped (ζ≤0.2) and near "optimal" (ζ≈1/√2).

For your report

Present at least the following:


Make sure: