Thursday, June 6, 2019
Motor Speed Control Essay Example for Free
Motor Speed Control EssayIntroduction and ObjectivesIn this lab you bequeath control the vivify of a labour. Figure 1 shows the computer hardware setup, which is the same as for Week 1 of Lab 4. You will routine the potentiometer on your evaluation board to set the desired speed of the motor, and you will control the speed through the PWM output of the HCS12. You will measure the speed of the motor employ an enter capture pin, and display the desired and actual speeds on the terminal. .1. The LabIt is up to you how you design the system to accomplish the goal of this lab, nonetheless, here are some guidelines to assist you in ensuring proper operation of the system. 1. Build the rotary shown in Figure 1. 2. Design a real-time routine that gets executed every 8ms. Develop a method to verify the timing of that routine, e.g., increment LEDs. 3. weapons platform the A/D converter to read the grade from the pot either the one on the micro accountant board or an external one. In the routine highly-developed in Part 1, read the A/D converter (use 8-bit mode). Again develop a method to display the results and verify the operation of the A/D converter as you mixture the input potential.4. garnish up the PWM to generate a 50 kHz PWM signal on one of the four PWM channels. Set it up for high polarity. It will be easiest to set PWPERx to 255. Verify that the PWM works. In the real-time routine, write the eight most signifi ratt bits to the A/D value you read to PWDTYx. The motor speed should change as you use the pot to vary the voltage on the A/D. 5. Measure the speed of the motor by determining the time between two dropping edges of the optical encoder. In your main program display this time on the LCD display. You can use floating point arithmetic to convert this time into RPM. Display the RPM value on the LCD display. What is the maximum motor speed? 6. Measure the speed for several differentduty cycles by varying the voltage with the pot. Plot speed vs. duty cycle.EE 308New Mexico TechSpring 2011Figure 1 Using a PWM signal to adjust the speed of a motor.7. Implement closed-loop speed control. The desired speed Sd should be Sd = (0.2 + 0.8(AD/ADmax)) Smax where Smax is the motor speed at coulomb% duty cycle, AD is the A/D converter reading and ADmax is the maximum A/D converter reading. In this way you will be able to vary the speed between 20% and 100% of Smax.EE 308New Mexico TechSpring 2011To set the motor at the desired speed you can use a simple equation (integral control) such as DC radical = DCold + k(Sd Sm) where Sm is the measured speed. Do this calculation inside the real-time routine, and write the new value to PWDTYx. Try different values of k to see how the motor responds. If k is too small, it will take a long time for the motor to get to its steady-state speed. If k is too large, the motor will be jerky as it tries to settle down to its steady-state speed. It will be much easier to do these calculations using floa ting point numbers rather than using integers. 8. Set the power voltage to 15V. Measure the motor speed for various values of input voltage to the A/D converter. Take about 10 equally-spaced measurements for input voltage between 0 and 5 V. Use the LCD display to show the desolate A/D value and the raw counts between edges on the first line, and show the desired and actual speeds on the second line.9. With the potset at about mid-range, vary the voltage of the voltage powering the motor (say between 8V and 14V). With closed-loop control the speed of the motor should stay the same. Verify that this is the case. 10. Using the data from Part 8, fleck the speed in RPM vs. the input voltage from the pot ,i.e., convert the speed measurement in time difference between two falling edges to speed in RPM. 11. It is much more effective if you have the data from the previous part recorded automatically, this way you can observe the behavior of the controller and how long it takes to make the motor settle at the right speed. To do that change the BAUD rate to 115,200 then once every 8ms send the input capture difference to the serial port. Set Hyperterm to use 115,200 baud rate, capture the serial data and plot in MATLAB. Set the power voltage blanket to 15V.Rather than varying the PWM based on the pot, set it manually inside your code for a while and then change it to different value, this will bring on a step change in the desired set value, and can be used to determine the effectiveness of the controller. 12. Another type of controller that whitethorn be used is known as proportional controller. This type of controller, and unlike the integral type control, only uses the current measurements to set the output rather than accumulating whatsoever history. This is accomplished by DCnew = k(Sd Sm)EE 308New Mexico TechSpring 2011Similar to the previous step, collect the data due to a step change in the desired speed, and plot in MATLAB. Compare this proportional contro ller to the integral controller.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment