






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Lab; Class: Dynamic System Modeling and Control; Subject: Engineering; University: Grand Valley State University; Term: Fall 2003;
Typology: Lab Reports
1 / 12
This page cannot be seen from the preview
Don't miss anything!
Grand Valley State University Padnos School of Engineering EGR 345: Dynamic Systems Modeling and Control Lab #
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
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
Conclusions
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