We started our three day work on simulations by first working in an environment which we were reasonably comfortable with: LabVIEW. Our task was to model the movement of our motor going from 0 to 90 degrees. I worked with Bryn on the simulation module.
Here are some waveform graphs where we changed the value of our initial velocity and our constant. The different colors are from running it multiple times and recording all of the values on the same graph. These are actual graphs from recording values from our NXT.
After we saw what happens in "real life" we started to simulate it on our own.
Our Code |
The above code models a motor rotating 90 degrees. The inner for loop models one motor moving across time. The outer for loop lets us represent multiple constants on one graph and see which constant would be most optimal based on our constraints.
Here are the graphs that we generated from the code.
These graphs show different constants. However, notice that none of these simulations show any values above 90 degrees. To remedy this, we need to add more information to our code. We'll do this in Matlab.