marvin:ecp3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
marvin:ecp3 [2009/01/28 23:38] – deva | marvin:ecp3 [2009/01/29 11:01] (current) – rieper | ||
---|---|---|---|
Line 15: | Line 15: | ||
* Create a Motor Control class that can append extra power to the motors individually to control how the robot is behaving. | * Create a Motor Control class that can append extra power to the motors individually to control how the robot is behaving. | ||
- | =====The Motor in Theory===== | + | =====Theory===== |
- | === DC Motor Drives === | + | ====DC Motor Drives==== |
{{ : | {{ : | ||
- | The Lego Mindstorm kit comes with a set of DC Motors and therefore we shall give a short introduction to the DC motor and the DC motor controller. This will hopefully add nicely to the presentation of the H-bridge and DC servo motors | + | The Lego Mindstorm kit comes with a set of DC Motors and therefore we shall give a short introduction to the DC motor and the DC motor controller. This will hopefully add nicely to the presentation of the H-bridge and DC servo motors(([[http:// |
{{ : | {{ : | ||
Line 26: | Line 26: | ||
{{ : | {{ : | ||
- | === Power Electronic Converter === | + | ====Power Electronic Converter==== |
We see that the four quadrants refers to the four combinations of voltage and current directions. As mentioned the motor is actually transferring energy back to the supply when breaking and this requires special attention when designing a motor controller. In order to control the DC motor a Power Electric Converter (PEC) that satisfies the following conditions is needed. ((Power Electronics, | We see that the four quadrants refers to the four combinations of voltage and current directions. As mentioned the motor is actually transferring energy back to the supply when breaking and this requires special attention when designing a motor controller. In order to control the DC motor a Power Electric Converter (PEC) that satisfies the following conditions is needed. ((Power Electronics, | ||
* The converter must allow both output voltage and current to reverse in order to yield a four-quadrant operation. | * The converter must allow both output voltage and current to reverse in order to yield a four-quadrant operation. | ||
Line 43: | Line 43: | ||
Fortunately the motor control is linear, which is a requirement in our control loop as it is a linear controller. However, the average voltage output does not vary linear with the control input voltage during the blanking time, which occurs when the motor direction changes. In our case this happens all the time to keep the robot in state of equilibrium and we may therefore expect some non linear behaviour from the motors. | Fortunately the motor control is linear, which is a requirement in our control loop as it is a linear controller. However, the average voltage output does not vary linear with the control input voltage during the blanking time, which occurs when the motor direction changes. In our case this happens all the time to keep the robot in state of equilibrium and we may therefore expect some non linear behaviour from the motors. | ||
- | === Motor Encoder/ | + | ====Motor Encoder/ |
- | When designing the motors, wheels and drive train, it will almost always be important to have some sort of encoder feedback. In the LeJOS framework there are methods to get readings from the tacho counters and these sensor readings have proven to be very useful when designing a balancing robot cf. the research literature in the [[http:// | + | When designing the motors, wheels and drive train, it will almost always be important to have some sort of encoder feedback. In the LeJOS framework there are methods to get readings from the tacho counters and these sensor readings have proven to be very useful when designing a balancing robot cf. the research literature in the [[http:// |
{{ : | {{ : | ||
- | =====Driving the Robot===== | + | =====Implementation===== |
====Right/ | ====Right/ | ||
Now that the robot is balancing it ought to be simple to make it drive around. We expect the controller to maintain its balance even though we apply the necessary offset to the PWM in order to make it move. At first we added a small offset to one wheel and subtracted from the other, which caused the robot to drive in a circle. The robot actually seemed to be more robust when turning and we were able to reach a high speeds when pivoting "on the spot" | Now that the robot is balancing it ought to be simple to make it drive around. We expect the controller to maintain its balance even though we apply the necessary offset to the PWM in order to make it move. At first we added a small offset to one wheel and subtracted from the other, which caused the robot to drive in a circle. The robot actually seemed to be more robust when turning and we were able to reach a high speeds when pivoting "on the spot" | ||
Line 78: | Line 78: | ||
All of these considerations lead to the programming of the '' | All of these considerations lead to the programming of the '' | ||
- | =====The MotorControl | + | ====The MotorControl |
{{ : | {{ : | ||
The MotorControl class handles the motors exclusively. It works as a control interface on top of the actual Motor ports, and can report angle and angle velocity (using the TACHO counter) of both of them, as well as set the power and direction.\\ | The MotorControl class handles the motors exclusively. It works as a control interface on top of the actual Motor ports, and can report angle and angle velocity (using the TACHO counter) of both of them, as well as set the power and direction.\\ | ||
Line 135: | Line 135: | ||
- | =====Ctrl===== | + | ====Ctrl==== |
{{ : | {{ : | ||
The Ctrl class is used to handle the control parameters of Marvin. | The Ctrl class is used to handle the control parameters of Marvin. |
marvin/ecp3.1233182288.txt.gz · Last modified: 2009/01/28 23:38 by deva