Motor-Propeller Damped Compound Pendulum

Keywords: Control design, hands-on experiment, motor propeller, pendulum


Figure 1: Low cost and maintenance, easy to assemble and store system ideal for
reinforcing classroom theory in dynamics and control design.

Motivation and Audience

Professors, instructors, teaching assistants and students interested in dynamics and control systems may find this article interesting. In particular, described is a system that features: Control systems design is a subject that is best learned with hands-on exercises that both motivate and reinforce theory. Consequently universities often fabricate their own experimental platforms or purchase them from companies like Quanser or ECP. This above audience will find this article interesting if they have experienced any of the following: Time is a big concern for all instructors. Typically, the instructor and teaching assistants need time to set up and test each experimental platform. Once setup, the platform must withstand student abuse, where more time may be needed for re-calibration or repair. If setup is easy, more platforms reduces lab time; multiple student groups perform the same experiment in parallel. The net effect is the need for platforms that do not take time away from more important activities like preparing lectures and discoursing with students as they perform labs

The photo above (Figure 1) showcases a platform used at Drexel University's Mechanical Engineering Department. It's 5 parts quickly assemble into a damped compound pendulum with a motorized propeller at one end. The photos below (Figure 2) illustrate the speed and ease of moving from storage to setup in 10-minutes.


Figure 2: The system is compact and can be easily and rapidly assembled or stored away

A spring desk clamp secures the pendulum to a table. Turning the power supply on starts the motor. The propeller generates lift and induces a torque about the pivot. This torque makes the pendulum rotate counter-clockwise (right). In lab, one designs controllers to achieve desired transient and steady-state responses. This platform's simple construction is robust, assembles and stores away easily, and has been used successfully to demonstrate PID (MEM 351 Undergraduate Dynamic Systems Lab) and fuzzy, sliding mode and adaptive controllers (MEM 800 Graduate Advanced Control Techniques).

This article breakdowns as follows:

Underlying Theory

The above platform is an example of an under-damped second order system. When voltage is applied to the motorized propeller, the pendulum oscillates until dynamic equilibrium is achieved; the pendulum settles at an angle where propeller lift balances pendulum weight.

Figure 3 is a photo sequence. From left to right: the motor is first turned on, the pendulum rotates counter-clockwise, falls clockwise, then rotates counter-clockwise again. The oscillations decay exponentially to a steady-state angle as seen in this video. The step response graph shown in Figure 4 plots the pendulum angle after 2 Volts is applied to the motorized propeller. The angle was captured using an optical encoder mounted on pendulum pivot.


Figure 3: Applying a step voltage results in pendulum oscillations. Click video to see.


Figure 4: Step response plot of pendulum angle in degrees versus time in seconds
Angle settles to 50 degrees in 30 seconds. Motor voltage killed after 30 seconds.

The dynamic equations of motion, block diagram and constants are described the following two PowerPoint slides (Figure 5 below). Essentially, a small angle approximation is used to linearized the dynamic equations of motion. Also assumed is the torque is proportional to motor voltage.


Figure 5 PowerPoint Slides showing open-loop block diagram

Objective

This video depicts the lab objective: Design a controller such that the pendulum reaches a desired angle with desired transient response i.e. overshoot and settling time. The video illustrates a successful PID controller with a 10 second settling time and a 0.707 damping ratio. The visual interface features PID gain-tuning knobs and was designed in LabVIEW. Adjusting these knobs, one gets hands-on experience understanding the effects proportional, integral and derivative gains have on performance. For example, the video shows the motorized pendulum going unstable as integral gain is increased.

Parts List and Sources


Figure 6: With a PC, data acquisition hardware and apx. $200
in parts, an effective lab experiment can be assembled.

Every effort was made to find a single source supplier for all parts. One will note that many of the parts, like resistors, capacitors and screws are common items in engineering supply rooms. PVC bar stock and L-brackets are often found in engineering machine shops. US-based vendors include Jameco, National Instruments, McMaster-Carr, US Digital, Small Parts, C&S Sales, Radio Shack and Hobby Lobby

TABLE 1: PENDULUM
PART DESCRIPTIONVENDORPARTPRICE (2005)QTY
PVC RECTANGULAR BAR 0.5" THICK, 2" WIDEMCMASTER-CARR8740K353.74/FOOT5 FEET
SET SCREW COUPLING 5/8" OD, 1" LENGTH, 5/16" BOREMCMASTER-CARR242K125.77 EA1
ALUMINUM ANGLE 1/8" THICK, 1/2" X 1/2" LEGSSMALL PARTSARA2-08/081.85 FOR 12"1
1/4"-20 HEX BOLT 1.5" LONGSMALL PARTSHBX-1420-241.95 FOR 101
1/4"-20 HEX NUTSMALL PARTSHNX-14201.80 FOR 252
1/4" WASHERSMALL PARTSWXA-1/4R1.25 FOR 101
6-32 MACHINE SCREW 1/2" LONGSMALL PARTSMPX-0632-08F1.15 FOR 252
6-32 NUTSMALL PARTSHNX-06321.00 FOR 252
SPRING CLAMPHOME DEPOT306990202870.991
VELCRO 1/2" WIDE STRIPWALMART306990202872.441
NYLON ROPEHOME DEPOT5.001
ADJUSTABLE CRESENT WRENCHDOLLAR STORE1.001
OPTICAL ENCODERUS DIGITALH5S-360-I65.551
ENCODER CABLEUS DIGITALCA-3132-6FT13.001
MOTOR 0.5-3.0 VJAMECO215263CH2.251
GRAUPNER PROPELLER 5x2 (5" DIAMETER, 2" PITCH)HOBBY LOBBYGP050203.201
2.3 MM COLLET PROP ADAPTERHOBBY LOBBYMJ47014.901
SUB-TOTAL$110.24

Motor and Propeller Choices

Combining various motors and propellers can make for interesting labs in system identification. The key issue is to select a motor and propeller that generates lift to overcome the pendulum's inertia. Once selected, a suitable power op-amp can then be constructed. The pendulum featured in this article was constructed from 19.5 inches (0.495 m) of PVC plastic. The motor and propeller combination listed in Table 1 is good choice; at 2 Volts, the pendulum rotates approximately 50 degrees from rest. This particular motor runs at 80 mA at no load, has low stall torque (25-48 g-cm), operates at 0.5 to 3 Volts at 200 mA start up and rotates from 2500 to 5000 RPM at the maximum efficiency point.

Table 2 lists parts to construct a 3 Amp power op-amp. The section on construction provides the schematic and PCB artwork. The listed power supply has both fixed and adjustable outputs and hence pricey. Any DC power supply that provides 5 Volts at 3 Amps should work fine.

TABLE 2: ELECTRONICS AND POWER SUPPLY
PART DESCRIPTIONVENDORPARTPRICE (2005)QTY
100 OHM RESISTORJAMECO29946CH0.99 FOR 1001
1 KOHM RESISTORJAMECO29663CH0.99 FOR 1001
2" TERMINAL CONNECTOR 2 BLOCKSJAMECO1523460.551
2" TERMINAL CONNECTOR 3 BLOCKSJAMECO1523640.441
HEAT SINKJAMECO1580510.351
1/4" SPACERSJAMECO1756280.194
4-40 SCREWS 3/8"JAMECO409690.175
4-40 NUTJAMECO40942CH2.50 PER 1001
TIP31A POWER TRANSISTORJAMECO330480.491
0.01 UF CAPJAMECO97376CH2.00 FOR 101
0.1 UF CAPJAMECO15271CH1.67 FOR 101
8-PIN SOCKETJAMECO112205CH0.091
LS7804 ENCODER-TO-COUNTER CHIPUS DIGITALLS7084-DIP3.051
30-PIN 0.1" HEADERJAMECO103341CH0.351
DIODE 1N4004RADIO SHACK276-11030.791
5V 3A POWER SUPPLYC&S SALESELENCO XP58175.001
SUB-TOTAL$83.14

TABLE 3: DATA ACQUISITION HARDWARE
PART DESCRIPTIONVENDORPARTPRICE (2005)QTY
PCI-6025 ACADEMIC STARTER KITNATIONAL INSTRUMENTS777448-331295.001
Alternatively:
USB-6008 STUDENT KITNATIONAL INSTRUMENTS779320-22145.001

Data Acquisition and Power Supply Choices

Computer control requires any PC interface featuring an analog voltage output and a digital counter. These respectively power the motor and read the pendulum's optical encoder. National Instruments offers several different lines of PC interface solutions including PCI (e.g. PCI-6025E) and USB (e.g. USB-6008) and are listed in Table 3. Both were successfully tested with the pendulum designed in this article. Beyond cost, the USB solution is attractive because of portability; the pendulum experiment can run on any Windows desktop or laptop featuring a USB port. The pendulum's natural frequency is low enough that even USB 1.1 can sample fast enough for PID control. More computationally intensive designs, like adaptive control, ] would require the faster sampling that PCI hardware offers.

Construction

Pendulum


Figure 7: Pendulum Bar
Click here for SolidWorks eDrawing Animation

Figure 7 illustrates the main part of pendulum; a 19.5 inch long piece of PVC. The 0.25-inch diameter holes provide a wide range of points to mount the pendulum onto the encoder shaft. The motor straps onto the area that has been milled out (see below). Dimensioned machine drawings for the above part and the encoder base are given below:

  • Pendulum part PDF | JPG
  • Encoder base PDF | JPG
  • Solidworks eDrawing animation
  • Motor Prop


    Figure 8: Motor Prop Setup

    The prop adaptor press fits onto the motor shaft as shown in Figure 8. The propeller is held between collet, washer and nut. For this particular propeller, the front side is the one with text on it; as the propeller rotates clockwise (looking from motor shaft side), the pendulum will try to rise. The velcro is screwed onto the pendulum and wraps around the motor to keep it secure.

    Encoder Base

    The encoder base is completed by mounting the encoder onto L-brackets that screw onto a short 4.5-inch piece of PVC. This is shown in Figure 9 below.


    Figure 9: Encoder Base

    Electronics

    PC hardware like the PCI-6025E or USB-6008 can only source tens of milliamps. As such, a power op-amp was constructed with a TIP31 MOSFET using the schematic in Figure 10 and parts listed in Table 2.


    Figure 10: Power op-amp schematic. Click here for PDF Version


    Figure 11: PCB populated with components

    One could wirewrap or breadboard this schematic. Alternatively a printed circuit board (PCB) can be homebrewed or professionally fabricated. Figure 11: depicts two views of a PCB that was fabricated at AP Circuits. The PCB artwork is depicted Figures 12 and 13 (shown at 2X scale) and can be etched at home. For convenience the zip file mem351-022305.zip can be emailed of FTP'ed to AP Circuits and fabricated for about $10 USD per board.


    Figure 12: Solder Side shown at 2X scale. Click here for PDF


    Figure 13: Component Side shown at 2X scale. Click here for PDF

    The PCB also includes pads to include parts for an encoder filter (as given in Table 2). The LS7804 (data sheet) is an encoder-to-counter chip that performs debounce and filters for jitter. Without this chip, miscounts are very likely. The LS7804 also can increase one's encoder resolution four times. As such, a 3-pin header and jumper was used (see Figure 11 above) so that one can use the encoder or is (X1) or at 4-times resolution (X4). The schematic in Figure 14 provides details and pin connections to a PCI-6025E NI-DAQ card.


    Figure 14: Encoder Filter. Click here for PDF Version

    Final Assembly


    Figure 15: A spring clamp (left) holds the encoder base onto the table (middle)
    and the pendulum is then screwed unto the encoder shaft coupling (right)

    The three major components (pendulum, motor-prop and encoder base) assemble together as illustrated in the photo sequence (Figure 15 above). Two more compoents (power supply and driver PCB) require the following connections. The motor leads connect to the +MTR and -MTR headers on the driver PCB. The encoder is attached to the PCB via a 5-wire ribbon cable. Lastly, the power supply connects to the PCB on the headers labeled PWR and GND. The net effect is 5 components that can quickly assemble for a lab or dis-assemble for storage.

    Controller Design

    As described earlier, the objective is to design a controller so that the pendulum reaches a steady-state angle with desired transient response. For example, Figure 16 depicts the pendulum response under closed-loop PID control. Contrast this with the open-loop response given in Figure 4 where oscillations take a long time to die.


    Figure 16: PID response with low overshoot and fast transient response. Click for video.

    PID Control

    Figure 17 depicts the system block diagram. The key point to grasp is that relationship between input voltage and settling angle. As illustrated in Figure 4, the open-loop step input voltage of 2.0 Volts yielded a steady-state angle of 55 degrees. The control objective is to reach the same steady-state angle, but with faster rise and settling times. As such, the input the block diagram is a 55 degree set point angle. An error is formed by subtracting the pendulum's actual angle (as read by the encoder) from the setpoint angle. The command voltage to the motorized prop is formed by applying PID to the error.


    Figure 17: PID block diagram. Click for Simulink file pidpendulum1_0.mdl.

    One notes that right after the PID calculation, there is a gain of 2/55 Volts/deg. This gain is a simple model for the motor; this assumption is that motor reaches speed instantaneously. A first-order model that includes the motor's time constant would be more accurate and would be an excellent lab exercise.

    One advantage of PID control is that a complete system model is not needed before actual implementation. With that in mind, a LabVIEW program can be quickly created. Figure 18 depicts the graphical front end. One notes PID tuning knobs and text boxes to define the setpoint angle and monitor the pendulum's actual angle. Figure 19 is the LabVIEW block diagram. Here, DAQ Assist was used to aquire the encoder angle and write the values to a measurement file.

    A case structure is applied to the encoder angle input. This is transform the angle into a desired coordinate frame; pendulum at rest is called 0-degrees, and the angle increases when rotation counter-clockwise (i.e. positive theta) as drawn in Figure 5. Also within the case structure, the raw angle is divided by four because the jumper on the encoder-to-counter filter (Figure 11) is set to X4 resolution.

    A general rule of thumb in control design is to sample at least 4 to 20 times the rise time. The open-loop step response (like Figure 4) yields a 2.5 second rise time. As such, the sampling time should be at least 0.125 to 0.625 seconds. In LabVIEW, the Wait Until Next ms Multiple was set to cycle the while loop every 25 milliseconds, which is more than fast enough for closed-loop control.

    Figure 19 also shows the PID gains, which use a shift register to differentiate and integrate the error. Figure 16 shows excellent results. This video shows the effects of changing the PID knobs in the front end. This pendulum is a Type 0 system) and hence sensitive to integral gain. The video shows the pendulum going unstable as integral gain is increased. Derivative gain will help kill oscillations and steady-state error but at the cost of longer settling times.


    Figure 18: LabVIEW Front Panel. Click for VI file pidPendulumRecord1_0.vi


    Figure 19: LabVIEW Front Panel. Click for PDF

    Final Words

    This article described a low-cost and low-maintenance platform suitable for lab courses in dynamics and control systems. A complete parts list, schematics and drawings describe a motorized propeller that attaches to a pendulum. This platform stores compactly, assembles quickly and has a low part-count. The net effect is an open architectured system that instructors can quickly learn and implement into lab courses.

    Many interesting experiments, for reinforcing classroom concepts, can be developed. The platform can also be easily modified to investigate complex and higher order systems. At Drexel University, topics like sliding mode, adaptive, fuzzy and lead-lag control were conducted with this platform and listed in the Appendix

    National Instrument's USB-6008 data acquisition unit can yield new paradigms in teaching control system design. Costing less than some engineering textbooks, each student can buy a USB-6008 for class. Alternatively, units can be lent to students each term through the department's lab supply room. Students can then use their laptops to perform system identification, design controllers and validate performance. Critical to such hands-on experiential learning are rugged yet simple and easy-to-use platforms, like the one featured in this article.

    Appendix

    Click here to email me