Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Dead band Compensation for Bi-Directional Motion - Lab 4 | EGR 345, Lab Reports of Engineering

Material Type: Lab; Class: Dynamic System Modeling and Control; Subject: Engineering; University: Grand Valley State University; Term: Fall 2003;

Typology: Lab Reports

2009/2010

Uploaded on 02/24/2010

koofers-user-02c
koofers-user-02c 🇺🇸

4.5

(4)

10 documents

1 / 12

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Grand Valley State University
Padnos School of Engineering
EGR 345: Dynamic Systems Modeling and Control
Lab #4
Deadband Compensation for Bi-directional Motion
Jonathon E. Dyer
October 24, 2003
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Dead band Compensation for Bi-Directional Motion - Lab 4 | EGR 345 and more Lab Reports Engineering in PDF only on Docsity!

Grand Valley State University Padnos School of Engineering EGR 345: Dynamic Systems Modeling and Control Lab #

Deadband Compensation for Bi-directional Motion

Jonathon E. Dyer October 24, 2003

________________________________________________________________________

Abstract Bi-directional motors will not turn when very small voltages are applied due to a friction force in the motor. This force can be compensated for using software. Without deadband compensating software, the motors used had no rotation at voltages between –1.5V and +1.1V. With deadband compensating software, the motor rotated at any desired voltage. Purpose This lab uses C programming to compensate for “stiction” in a bi-directional motor. Background “Stiction” is a word that describes the static friction force that causes electric motors to remain motionless when small voltages are applied. This “stiction” only applies before the motor breaks free and begins to move. After this point, the kinetic friction is a constant torque. There must be enough of a voltage drop across the motor to overcome this initial static friction force. The range of voltages that do not overcome the “stiction” force is called the deadband. This range of voltages can be experimentally approximated, and software can be used to compensate for this range. This software will assure that voltage levels do not drop into the deadband range. Any values desired within that range will be compensated for to prevent the motor from sticking. With ideal software, the applied voltage would never be in the deadband range. Equipment/Software Equipment:  Computer with Internet Access  Axiom M68HC11 board  1 DC Motor Nissei Denki Model #9J  1 Digital Multimeter  1 Strobe Tachometer  1 L293D Push-pull four channel driver chip  External Power Supply Software:  EVBU  Gcc6811 Compiler Background / Theory Deadband limits can be found by applying known voltage to a motor that starts motionless, and increasing the voltage until the motor breaks free. The voltage at which the motor breaks free is the deadband limit. There will be two limits for a bi-directional motor, one in each direction, corresponding to two voltages. These numbers may be

First, if the desired voltage is zero, the applied voltage must be zero. The next equations needed are code that adjusts a positive desired voltage to a voltage outside of the deadband region, and a desired negative voltage to a voltage outside of the deadband region. This is implemented with syntax shown in Figure 4. Figure 4: Adjusting Positive and Negative Voltage The code shown in Figure 4 adjusts the voltage outside of the range, but does not take into account the fact that the adjusted voltage may become larger than the pulse width modulation of the 68HC11 is capable of. Further code must be used to “clip” voltages into the range useable. This syntax should check the adjusted voltage, and if it is above 255 or below –255, set it to these maximum and minimum useable values. The syntax used for clipping is shown as the void v_output(c_adjusted) subroutine in the final program used. This is shown in Appendix A. After the desired voltage values have been adjusted and clipped, the resulting voltage graph should look like the graph shown in Figure 5. Figure 5: Adjusting and Limiting Output Voltage Circuitry and Components A simple transistor can be used to drive a motor in one direction. An H-bridge is a circuit of 4 transistors that allows the motor to be driven both clockwise and counterclockwise. Transistors are still used to switch current flow. A diagram showing the H-bridge circuitry is shown in Figure 6. If(c_wanted = = 0){ c_adjusted = 0; } If(c_wanted >0){ c_adjusted = c_stick_pos + c_wanted * (c_max – c_stick_pos) / c_max; } If(c_wanted <0){ c_adjusted = -c_stick_neg – c_wanted * (c_min – c_stick_neg) / c_min; }

Figure 6: H-bridge Circuit for Motor Control The H-bridge circuitry works by applying voltages to pairs of transistors. Applying voltages to A1 and A2 would allow the voltage to travel from left to right through the motor. Applying voltages to B1 and B2 would allow the voltage to travel from right to left across the motor. These would correspond to clockwise and counter-clockwise rotation. This circuitry could easily be damaged if A1 and B1 or B2 and A2 were turned on. It would act as a short circuit in the chip, and eventually, the chip would be damaged. To prevent this, protective circuitry is used. This protective circuitry is built into the H- bridge chip, and ensures that either the clockwise or counter-clockwise direction is enabled, but not both. Software for Deadband Compensation Software is used to implement the plan for deadband compensation discussed thus far. It should implement the theory behind deadband compensation, clip the values to keep them within the useable range of the 68HC11, and interface between the 68HC11 and a bi-directional DC motor. A block diagram that shows the process desired is shown in Figure 7 below. Where: Cd = desired speed of the motor (-255  255) Ca = adjusted speed of the motor (-255  255) Co = PWM output (0  255) Vo = Effective PWM output voltage (0V  5V) Vs = Effective motor supply voltage (0V  Supply V) ω = the motor speed Figure 7: Block Diagram for Deadband Compensation Software ω

Table 1: Determining Deadband Limits c_wanted Vs (volts) Motor Speed (RPM) -251 -3.6 - -218 -3.0 - -170 -2.8 - -130 -1.8 - -120 -1.5 0 0 0 0 124 1.1 0 165 2.4 5101 201 2.8 6010 240 3.4 7039 251 3.5 7422 Note that at c_wanted = -120 and +124, the speed of the motor is zero. This data is also shown as a graph in Figure 9 below. Motor Without Deadband Compensation

  • 0 2000 4000 6000 8000 10000 -251 -218 -170 -130 - 0 124 165 201 240 251 Desired Speed RPM Figure 9: Graphing Deadband Limits This graph has the same trend in applied voltages and motor speed as Figure 1. From this graph and the data in Table 1, the deadbands of this motor are found to be –120 and +124. These deadband limits can be used in the C program. The C program was modified such that c_stick_pos was defined as 124, and c_stick_neg was defined as 120. Table 2 contains data recorded after compensating for the deadband.

Table 2: Motor Speed with Deadband Compensation c_wanted Vs (volts) Motor Speed (RPM) -251 -3.6 - -218 -3.0 - -170 -2.9 - -130 -2.7 - -90 -2.4 - -20 -1.7 - -1 -1.5 - 0 0 0 1 1.7 3489 10 1.8 3731 20 1.9 3944 90 2.4 5203 124 2.7 5679 165 2.9 6014 201 3.1 6413 251 3.6 7498 This data is also shown in Figure 10 below. Motor With Deadband Compensation

  • 0 2000 4000 6000 8000 10000 -251 -218 -170 - -90 - -1^01102090 124165201251 Desired Speed RPM Figure 10: Motor Speed with Deadband Compensation Figure 10 shows that the motor speed is only zero when the user wants it to be. The software adjusts voltage in the deadband region to set a voltage that will always turn the motor. The results of these two sets of graphs can be combined to graphically show the difference between a motor with and without deadband compensation. This comparison is shown in Figure 11.

Conclusions

  1. Using software can compensate for deadbands in bi-directional motors.
  2. The C program developed successfully compensates for the deadband of the bi-directional motor. Deadband limits were found to be +124 and -120. This equates to -1.5V and +1.1V.
  3. The natural resistance of the components of the circuitry used to drive the motor causes a drop in the applied voltage, and maximum possible voltage.
  4. Software deadband compensation saves money in designs by allowing the use of inferior (less expensive) motors. References
  5. Jack, H. “Deadband Compensation for Bidirectional Motion”. October 24,

http://claymore.engineer.gvsu.edu/~jackh/eod/courses/egr345/media/lab4_deadband.pdf

Appendix A : C Program for Deadband Compensation //Jon Dyer – Deadband Compensation //EGR-345 9-16- #include <hc11e9.h> #include <buffalo.h> #include "pwm.h" int c_adjusted; //voltage adjusted for deadband int c_wanted; //desired voltage from user //#define c_stick_pos 0 //used to find deadband limits //#define c_stick_neg 0 //used to find deadband limits #define c_stick_pos 124 //positive sticking voltage #define c_stick_neg 120 //negative sticking voltage #difine c_max 255 //maximum possible voltage #define c_min 255 //minimum possible voltage int c_adjusted = 0; //voltage adjusted for deadband int c_wanted = 0; //desired voltage from user int deadband(int c_wanted) //deadband compensation subroutine { if(c_wanted == 0) //turn off output { c_adjusted = 0; } else if(c_wanted > 0) //positive compensation { c_adjusted = c_stick_pos + c_wanted * (c_max - c_stick_pos) / c_max; } else if(c_wanted < 0) //negative compensation { c_adjusted = c_stick_neg - c_wanted * (c_min - c_stick_neg) / c_min; } return c_adjusted; } void v_output(int c_adjusted) //call from interrupt loop, clips voltages, changes direction { if(c_adjusted >=0) { PORTD = 0x04; //set the direction to CW if(c_adjusted > 255) { RefSignal = 255; //clip output over max } else { RefSignal = c_adjusted; } } else if(c_adjusted <=0) { PORTD = 0x08; //set the direction to CCW if(c_adjusted < -255) { RefSignal = 255; //clip output below min } else { Refsignal = -c_adjusted; } } }  Continued