The first thing we did was construct our iTouch motor. We decided to control our motor using the Arduino. We determined the physical and electrical properties of the motor, such as the motor constant, resistance, motor inertia and damping. We simulated our model using Simulink in MATLAB.
Motor Assembly:
The motor was constructed out of laser cut pieces of wood, magnetic wire, screws, and extremely hefty magnets. A picture of the semi complete motor is embedded below. The motor is not a traditional rotary motor. Instead it has ~70 degrees of motion. (A reliable commutator is kinda hard to make.)
The construction steps were incredibly easy, thanks to Hasan's hard preparatory work. The hardest part of assembly was winding the motor with ~ 114 winds of magnetic wire. (The windings are hidden behind the magnets. After that, all the parts fit into their spots relatively easily. Construction instructions can be found on the cTools site....
Motor Instrumentation:
Since this motor is not rotary it is relatively useless without some form of sensory input for position control. (Otherwise is is constantly at the edge stops...) To attain sensory control we put a Hall Effect sensor and magnet combination onto the frame. As the spindle moves the magnetic field would change and we would get a position reading. Sadly, the magnetic field generated was extremely low. We were only able to get a gradation of ~ 13 values on our 10 bit ADC. That resulted in ~ 7 degrees of travel per each adc reading value. This, as well as timing issues, would come to haunt us when we tried to implement a position controller.
We also attempted to set up a current sensor. A current sensor would allow us to perceive/control how much torque was being output by the system. This is because T=I*Km. The current sensor was a chip from Pololu that gave ~150 mV per each amp of current flowing through our motor. We initially thought that this value would be sufficient. However, our motor did not draw much current. So, once again the resolution on our ADC lead to issues when attempting torque control.
For our model, we needed to find the values for the resistance R, moment of inertia J, motor constant Km, and motor damping b. We used a multimeter to determine the resistance of the motor windings and found that R = 10.1Ohms.
We found the moment of inertia by suspending the armature of the motor with two threads equidistant from the center of mass. We aligned the threads so the motor armature was level to the ground and provided a small torque about the vertical axis. We recorded the time it took for the motor armature to complete ten oscillations and used the equations of motion of a bifilar pendulum to calculate the moment of inertial. We found that J = 4.11e-5 kg m^2.
At first we found the damping of the motor bearings to be extremely high and we would not get even a single oscillation of the motor armature. However, after oiling the bearings significantly, we noticed that the motor armature completed about 2-3 full oscillations before coming to a stop. We also noted the amplitudes of the each oscillation, so we can use the logarithmic decrement equations to find the damping ratio zeta. We found that zeta = 0.015 and b = wn*zeta*2 = 0.368, where wn is the natural frequency of the pendular motor armature, determined by wn = sqrt(g/l).
To find the motor constant, Km, we applied several torques to the motor (by handing weights of known mass from it) and measuring the current the motor is drawing. Using this method, we found Km = 0.105.
Plugging these values into our model, and using a Kp=1, tauL = 0 and iDes = 1, we found our theta over time:
This output makes sense, since our motor is simulated as a simple rotary motor. This means that with a constant current input, it will rotate and theta will increase at a constant slope. However, it takes time to get up to speed, which is shown in the figure above. Note how quickly it manages to do so.
A better way of looking at our step response is by looking at the change in theta over time:
Proportional Control:
We implemented a very elementary P control on position. Using the Hall Effect Sensor and an adjustable target point we were able to tune the system so that it would reside there. As discussed earlier... our sensor inputs had extremely coarse resolution. Additionally, our controller had no sense of "real time." (We didn't implement a interrupt routine to guarantee timely and consistent execution of code) As such, the system tended to vibrate in place a lot. Additionally, we could feel definitive torque impulses when holding the rotor. These impulses could be from the coarse nature of the timing loop or that the electrical system does not completely filter the pwm input. As such, the torque would flicker. We also noted that using the serial port was an extremely expensive operation. The timing loop was slowed down a lot when that occurred; resulting in wider oscillations... more hectic responses... and a worse behaving system. Look at the video below!
No comments:
Post a Comment