Rensselaer Polytechnic Institute

ECSE-4760

Real-Time Applications in Control & Communications

ANALOG AND DIGITAL CONTROL OF A DC MOTOR

Number of Sessions – 4

INTRODUCTION

Over the past several years, the digital computer has been used in a broad range of engineering applications. One of these is in Control Systems. Major advantages of using digital computers in the Control field include the great computational speed and accuracy, the relative ease with which simple parameters or even complete program modules can be modified (with virtually no new equipment cost), and the decision making capability. The last one lately has reached new heights with fuzzy controllers and expert systems, replacing delicate human operators. Large numbers of processes can be controlled simultaneously and effectively by a single computer and detailed reports can be generated, tasks previously unthinkable with an analog computer.

The purpose of this experiment is to acquaint the student with the advantages and shortcomings of using microcomputers in Control System applications, by designing and implementing regulators to control the angular position of an armature controlled DC motor made by Feedback Ltd. Both analog and digital designs will be implemented so that direct comparisons can be made of the pros and the cons of each approach. It is assumed that the experimenter is reasonably familiar with the basic principles of analog feedback control, preferably root locus techniques, and can design compensators to satisfy a set of required specifications.

PROBLEM FORMULATION

The objective of the experiment is to design both analog as well as digital compensators to control the angular position of an armature controlled DC motor. A step input, created by changing the polarity of the motor, will be used as a reference signal. In general an armature controlled motor can be regarded as a linear system over a finite operating range and is described by the following transfer function (p. 1.11 of the ES130 manual appended to this write-up):

For the motor in the ES130 these constants are:

A scaling conversion factor of 34.9 Volts/rad is also present in the feedforward path, resulting in the overall transfer function of the motor given by equation (1):

(1)

Due to the age and wear of the Feedback Ltd. ES130 DC servo system, the parameters in equation (1) are not exact. This will lead to discrepancies between the theoretical and actual responses during the course of the experiment when various controller designs are implemented. Because of this, you must justify why your results do not match the theoretical expectations. For extra credit, you may assume

and estimate K and tm for a step response for the proportional feedback case. The MATLAB System Identification toolbox provides some functions that will simplify this process.

For this motor the following compensators must be designed and implemented:

• A pure proportional feedback controller.

• An analog feedback compensator that will force the motor output to satisfy the following specifications:

1) Overshoot to a step input ≤ 10%.

2) 2% settling time ≤ 0.2 secs.

3) Dead zone at the output ≤ 4˚.

• The Tustin digital approximation to the analog compensator designed previously.

• A digital controller, using the following design schemes:

1) The minimal prototype design criterion.

2) The ripple free response design criterion.

Note that for the analog part relaxing these requirements slightly permits the design of a controller that can be implemented more easily on a digital computer. To ensure success in obtaining the above desired results, it is very important that the compensator design be done on paper before the implementation is attempted.

HARDWARE – SOFTWARE SETUP

EQUIPMENT DESCRIPTION

Attached at the end of this handout are parts of the ES130 technical manual covering the theory and circuit details regarding the DC motor. Parts of the GP-6 Analog Computer Operator's Manual for details on programming the Comdyna have been included in the course handouts. The student is expected to read both manuals and become familiar with the systems before starting the experiment.

The equipment to be used for the experiment consists of the following:

1) An armature controlled DC motor used as the process to be controlled. It is called as such because a constant field current is applied to the motor, and the armature excitation is controlled. This is accomplished by means of an internal feedback path in the servo amplifier. (See p. 5 of the ES130 manual.) The servo system TYPE ES130 manufactured by Feedback Ltd., will provide the motor, the motor power supply, a servo amplifier to drive the motor, the position sensor, and attenuators.

2) The Comdyna analog computer is used to build the analog compensator during the first part of the experiment. All the basic mathematical functions are available here and its usage is straightforward. In case of problems, refer to the Comdyna manual.

3) A PC running the relevant program used to implement the digital compensator. No PC specific knowledge is required other than following the instructions included.

4) A dual trace digital sampling oscilloscope (DSO), for recording the input and motor response. Some experimentation with the time scale will be necessary so that responses are recorded with maximum detail. You will want to save the screens of the digital oscilloscope to floppy disc files.

Setting up the hardware connections is relatively straightforward. Figure 1 shows an "extended" block diagram of the whole process containing all the necessary figures and connection links.

FIGURE 1. DC Motor diagram with proportional feedback.

The ES130 is divided into two sections, the SC125 control unit and the SA135 servo assembly. The SC125 provides all the electrical networks and amplifiers while the SA135 provides the motor and the sensor. Once you have located these sections on the front panel of the ES130, follow the setup procedure outlined below:

• On the SA135, connect socket 1 to socket 4. Connect socket 5 to ground.

• On the SC125, socket 1 outputs a voltage proportional to the difference between the input angular position and the output angular position. The angular difference is multiplied by 34.9 Volts/rad to convert from radians to Volts. Thus, if the input dial on the SA135 is moved one radian with respect to the output dial, the voltage at socket 1 of the SC125 will be 34.9 Volts. This voltage can be attenuated by connecting socket 1 to socket 3, and using socket 4 as the input to the compensator (see the warning at the end of the section). The output of the compensator should go to socket 18, an input to the servo amplifier. The servo amplifier in turn drives the motor. Set the control characteristic switch to ARMATURE.

• The motor is not energized unless the power dial is at ARM ON. Thus, if the motor goes into oscillations, turn the dial to H.T. ON. Each time prior to using the motor, check and recalibrate the Zero adjust on the SC125 when the power dial is on H.T. ON.

• To produce the step input required during the control runs, the polarity switch S1 located on the SA135 is flipped from direct to reverse. When the output has settled, return the switch to direct again before the next run.

Even though adequate, the above explanation is by no means complete. The reader is urged to refer to the ES130 manual for a more complete description of setup procedures as well as answers to probable questions.

The analog controllers are to be built on the Comdyna computer. This distinguishes this lab from the other control labs where the analog computer is used as the plant to be controlled. Here the DC motor is the plant and the Comdyna is the controller. Later the PC running LabVIEW will be used to perform as the digital controller. Special care must be taken when implementing the gains because of the sign inversions at the output of the amplifiers. The Comdyna dial must be on the Pot Set position during setup; during operation the dial must stay on Oper and pushbuttons switched between OP at the start and IC at and end of each run.

You should also note that the analog controllers implemented on the Comdyna analog computer may light the "OVLD" lamp when the amps begin to saturate. There is no problem if the indicator flashes on briefly during operation. A sustained overload condition, however, will affect the controller's operation. These effects may be minimized by reducing the input step size or reducing the overall gain of the analog computer block and proportionally boosting the gain on the SC125 input.

One of the DSO channels must be connected to the process output SA135 socket 6 (and ground), and the other one to the control signal SC125 socket 18 (or BNC-2110 AO 0 port on the PC for the discrete part), or to SC125 socket 4 (and ground) to observe the error. Use the maximum voltage range possible for more detailed results.

WARNING: Even though the D/A converters are protected from overload, an input voltage in excess of +10 or -10 Volts can result in permanent damage to the A/D converter. It is therefore required that the 0.1 attenuator on the SC125 unit be used, before the % error potentiometer, since the voltage at socket 1 can be as high as 50 Volts. The SC125 should be set up so that socket 1 is connected to socket 3, and socket 4 is connected to the PC BNC-2110 AI 0 port. With the above configurations the % error potentiometer must be set to 100%, so that no additional attenuation is inserted. It's suggested that all calculations be done with the original transfer functions (attenuator = 1), and whenever the attenuator .1 is used, the proportional gain is to be augmented accordingly with the amp on the SC125 set to a gain of 10.

There will be cases where even though the control signal will be active, no response will take place. If it is suspected that the error signal is too low, then the following procedure must very cautiously (under the TA's presence), be applied:

• Turn the % error pot to 10% and flip the 0.1 attenuator switch to 1.0;

• Start slowly incrementing the % error pot and run the simulation until the output starts responding;

• Return the settings to their original positions and modify the design so that the proportional gain is increased;

• Try running the experiment again;

• If problems persist, try manually adjusting the parameters around their calculated points and rerun the experiment. The justification for this action stems from the fact that the motor model is a linear function of a nonlinear process and its parameters themselves are estimated.

(DIGITAL) COMPUTER USAGE

To access the LabVIEW program do the following:

• Turn the PC on (if off) and go to the DC_Motor subdirectory (My Computer\Local Disk):
C:\CStudio\RTA_lab\DC_Motor.

• Double click DC Motor DAQmx+.vi to load the program. A LabVIEW program will open with several parameter fields in the front panel.

• Press the right arrow icon at the top left corner of the window to start execution. To abort the program, press the STOP button on the screen, not the stop sign at the top of the page (this will prompt the program to calculate the actual sampling times, and reset the output). Not using the STOP button to halt execution may yield incorrect results on subsequent runs. There may be a few seconds delay before the VI completely halts.

• Although some values can be changed during execution by user input, it is important to note that to properly ensure correct measurements, the controller needs to be stopped (by using the STOP button) before altering input values.

• If you notice the controller isn’t working properly:

o  Press the stop button then run the LabVIEW program again. This should reset the program and enable you to start from scratch.

o  Wiggle the T-connectors; make sure the connection is good. If when wiggling you notice a difference in the response, change connectors. Occasionally the PC may need to be restarted.

Proper sampling time T depends on the algorithm used to derive the gains, and for the continuous implementations the general notion is the faster the sampling, the closer the computer controller resembles the analog model (20 ms or less).

Sometimes the calculated values for the control signal exceed the ±10 Volts (D/A limits). In these cases a software-implemented clipper prevents the D/A control values from "wrapping" around by forcing them to stay at their respective max/min values. Be warned though that if the signal remains at these levels very long (saturated), then erroneous results occur. Try using a different sampling time or coefficients. Using smaller input step changes will also help. Also if the average actual sample time observed on the DSO is higher than the sampling time entered in the front panel, raise it until you find a workable value. In many cases 10 ms will be around the lowest possible time. You could also simply take the average sample time as your sampling time for the test.

PART I - ANALOG CONTROL

PROPORTIONAL FEEDBACK CONTROLLER

Even though the model of the motor is assumed linear, nonlinear (static & Coulomb) friction is present in the motor, resulting in a dead zone at the output of the motor, related to the error velocity constant[1] Kv by:

This friction can be modeled as an external disturbance and must be taken into account during the calculations. Figure 2 shows a typical block diagram with the disturbance fn and the proportional gain g, and Figure 3 shows the phase plane trajectories for such a motor. For more information on these figures and the motor friction in general see [2].

The velocity error constant Kv for a type 1 system (one free integrator) is given by equation (2):

(2)