EE471 Inverted Pendulum Design Project |
||||||
|
[ Home | Members by Group | Schedule | Status | Documentation | Data | Q & A ] |
||||||
Those who have asked questions.
Those who have answered questions.
Group I Questions
Group II Questions
Group III Questions
Group IV Questions
Group VII Questions
We handed out the grey scale to every one but if you didn't get it here it is:
| # of degrees | Grey Code |
| 0 | 00001 |
1 |
00011 |
2 |
00010 |
3 |
00110 |
4 |
00111 |
5 |
00101 |
6 |
00100 |
7 |
01100 |
8 |
01101 |
9 |
01111 |
10 |
01110 |
11 |
01010 |
12 |
01011 |
13 |
01001 |
14 |
01000 |
15 |
11000 |
16 |
11001 |
17 |
11011 |
18 |
11010 |
19 |
11110 |
20 |
11111 |
21 |
11101 |
22 |
11100 |
23 |
10100 |
24 |
10101 |
25 |
10111 |
26 |
10110 |
27 |
10010 |
28 |
10011 |
29 |
10001 |
30 |
10000 |
| Bit position >> 654321 | |
The number six bit is so that we can mirror the grey code and the sixth bit will tell what side the pendulum is on. As you can see the grey code changes one bit at a time so it has one degree of resolution.
Michael Taylor
James nailed down the final length for us because of technical difficulties so what I will tell you is the theory behind the length because I believe that is your question. The car is supposed to present an acceleration to the pendulum. That acceleration is the force used in determining the length. We were given the acceleration measured by Group 2.
The pendulum has a moment of inertia at 30 degrees (the maximum angle). The inertia is a function of the length of the pendulum. The main task was to pick a length which would result in a moment of inertia which the force from the car could move while still considering other factors.
Scott Hailey, Michael Taylor, and Jarod Taylor
The angle that we are using is 30 degrees. This is supposedly the maximum angle that the motor can up right using the pendulum that we designed. We got this angle from the equations we used to design the pendulum from length,weight, and angle. To be absolutely truthful we just chose the values, stuck them in the equation and they worked. So the max angle could be a few degrees more.
Michael Taylor, Scott Hailey, Jarod Taylor
The inertia of the wooden pendulum plus the Silvered mass is 2.048*10^-3 Kg*m^2. We did not calculate the inertia of the wooden section alone because we knew we would not use it without the silvered mass.
Scott Hailey, Michael Taylor, and Jarod Taylor
We found the equations we needed on the Internet. Taking the laplace of the equation gets rid of the angular acceleration. The angular acceleration was not needed to find the moment of inertia. The equation we started with and ended up with are in the answer to question 6 below.
Scott Hailey, Michael Taylor, and Jarod Taylor
In class James put the following equation on the board: I d2q/dt = V l sin q - H l cos q . Through derivation and taking the laplace we found the following equation: q(s)/H(s) = 1 / [( I s2/ l)-mg]. Simply, we just guessed (James told us) the value for the length and weight that would satisfy our equations. What we were after was a height and mass which would put the moment of inertia high enough so that the amount of torque produced by the motor could effectively move the pendulum.
Scott Hailey, Michael Taylor, and Jarod Taylor
I should answer this question since Group 2 didn't actually determine this.
Using a spring loaded scale, I pulled the vehicle at a constant speed and read the grams force indicated. I then converted from grams force to Newtons. A very simple and probably very inacurate method, but it will have to do. Also, the rolling resistance was probably never really needed but I was thinking of getting more detailed about the force output from the motor.
To determine the quantity "b" given on the report assignment, I used the data from the acceleration experiments. Using the values for the lowest applied voltage (4 volts) I chose those values that should indicate a constant speed (the last couple of readings) and, using the value I had already determined for the force of rolling resistance (as described in the previous paragraph), I calculated "b" using F = b(dx/dt).
In words: (force of rolling resistance) = (coefficient of resistance)*(velocity)
James
I do not know the angle that would make the accelerations in either directions equal. That would not be an adequate solution because the relationship between the voltage and acceleration varies. If you get the information posted by group II on the web page I think the chart of voltage vs. acceleration will help to answer your question.
Mark Haas
A program in qbasic was written by James in order to collect output frequencies of the motor at different times. It also measured the time it took the car to get up to the maximum output frequency. We connnected the motor by way of a port connection to the o-scope, with a great deal of help from James, and the program took the data from the o-scope. We took 3 sets of data in each direction for voltages of : 4, 5, 8, 10, and 12 volts. Then from there we took the time the voltage was first applied to when the o-scope finished taking about 12 measurements of output frequency. We converted the frequency to RPM's using the number of shaft rotations per period (of the servo motor's output). Then converted from RPM's to speed. (See the Motor and Drive Notes) We calculated the acceleration of the motor by taking the final velocity minus the intial or first recorded velocity when the voltage was first applied and divided all that by the intial and final times in seconds. These calculations were carried out for every voltage and direction. From there, we were able to construct the acceleration vs. voltage, speed vs. voltage, and force vs. voltage graphs.
Phillip Lipson
The acceleration was found by connecting the cart to an oscilloscope and then determining the freq. of the cart at different voltages, in a given set of time. From, this the R.P.M and then the linear Velocity was calculated. By using the formula Acc.= Change in Vel/Change in Time, we calculated the acceleration. The final and initial, Vel and times were used, for the different voltages.
Fouad Akbar (in response to the duplicate question by Jarod Taylor)
We assumed negligible gear friction and that the speed of the car approached a linear behavior (risky).
Phillip Lipson
Because James picked that speed so it would not go faster than we can run. Therefore it will not get away from us.
Mark Haas
You question is overly broad to type a complete reply. I will attempt to give you the subfunctions associateded with the program, which may help clarify the microcontrollers role.
- Start process when push to start button is mashed.
- Read encoder input
- convert negative logic to positive logic.
- convert Gray code to absolute value of degrees
- determine and set polarity register
- convert integer values to floating point values
- perform floating point math operations to determine U(t) in integer form (see software section of Documents page)
- generate a pwm output to the motor based on U(t)
- control and set motor polarity
- recognize a failled attempt to pull the pendulum off of the peg.
Scott Morstatt
The PIC 14000 offered the advantage of an internal clock (less hardware,) but it did not have a dedicated PWM function. So the 16C63 was chosen due to it abundance of I/O, PWM control, and 4K memory. As I have reviewed many assembly coded routines, I have found a scheme for generating PWM with a normal D/O, although this method does limit the resolution of the pwm generated.
Scott Morstatt
There were no literal "drawbacks" to the hardware selection. One of the inhibitors was the requirement to program in the base language of assembly, verses a more embedded language like C.
Scott Morstatt
Within the MicroChip product lineup, a six bit chip doesn't exist. The cost is irrelevant with the long standard of 4, 8, 16, and 32 bit processors. You would be correct in stating that the capacity of the 16C63 appears in excess of our requirements, but in order to meet all minimums (zB: PWM dedicated output) we get an abundance of digital I/O lines. Any way, it was James' money....Think Big $$$$!!!
Scott Morstatt
After examining some more complicated and accurate numerical methods to evaluate the PID equation, we decided that simpler is better. We found several routines in C but were limited by the compiler to a small number of lines that could be compiled. That left us programming in assembly. And as we are not too accomplished in that language, we thought we should keep it as simple as possible. So the simplest methods that we could come up with were the rectangle approximation for the integral (area under the curve) and the slope of the measured variable between two points for the derivative.
Paul Richmond
A digital out <RB1> will be set / cleared by the polarity register controlling the DPDT relay which will swap the power leads on the dc motor (reversing the direction of rotation.) See the picture link in Documents for the schematic representation graycode.bmp.
Scott Morstatt