c.cc

Parallel programming for the rest of us.




Download the tools you need to try doing two things at the same time on your Arduino.

We've got videos, tutorials, and books designed for the beginner. Give it a go!

Dino Disco!



Success ? Maybe so!


So after our meeting with Dr. Jadud, we found that we needed to incorporate a rate of climb to control our pitch. Today we started on trying to implement this, and we feel that we have succeeded! Our plane is able to obtain our desired alititude (+-25 ft). This is a major breakthrough for us because we haven’t been able to obtain such success yet. We were able to test decreasing and increasing altitude and all worked as desired. Although it does go down a bit fast, it doesn’t fall out of control, and everything went well.

Whats next?

Our next goal is to fine tune our controls a bit more, and then try to implement GPS. Although we only have 2 weeks of class left we are setting high goals to motivate ourselves, I mean who else would go to class till midnight on their own?

Did You know?

Thanksgiving fact! Why is it always on the last Thursday of November?

Abraham Lincoln issued a ‘Thanksgiving Proclamation’ on third October 1863 and officially set aside the last Thursday of November as the national day for Thanksgiving.


Analyzing the ArduPilot


We have decided to go through our code and compare it to one that is known to work, the ArduPilot. Since we have known issues with our pitch controller, we decided to look there. At first we were confused, as this is a rather large program with many files, and we had to figure out where variables were coming from and where they were being set. We had to understand the parameters of the functions before we can figure out how the functions work.

About an hour later, we feel like we have a good understanding of how they work and where we went wrong.

Our Errors

Currently our Pitch PID is not using the constraints to properly set which is what is causing our plane to stall when changing altitudes. We have come to the realization that our PID is returning the value that is similar to the contrain value mentioned in the psudocode above. If we send the values that we are currenlty obtaining to a PID, we might be able to achive our desired outcome.

The biggest difference between our approach and the approach of the Ardui Piolot is the use of a timing method. We need to figure out how to implement this into our Ruby scripts.

Once we cal the Pitch PID and the throttle PID, we can send these commands to the plane and it should fly as desired…. hopefully.

Did You Know

That we didn’t physically meet for class today? But we used teamViewer to have a video meeting and shared our desktop!! HOW AWESOME!


Rewrite Completed (Sort of)


We have finished our rewrite of the old python control to our ruby class model. Everything seems to work, but there is something wrong with our Pitch controller. We can’t seem to figure it out. Our plane flies and doesn’t crash, but it doesn’t change altitude as we desire. The plane cannot descend, it simply falls when we try to do this, but when it needs to go back up, it works as desired. We have a bug in our algorithm, and we need to fix it.

SMALL VICTORY!

Although it might not seem like much, this was a pretty large step forward for us, and we are proud of our progress so far. We wish we could’ve gotten more done at this point, but we are moving at a good pace, and hopefully we can start to get our GPS working before Thanksgiving break.

Did You Know?

That the pitch levels are reverse of what you would think? A positive pitch means the plane is going down, and a negative pitch means the plane will ascend.


Python to Ruby Continued


We have continued our desire to rewrite past code from python to ruby, and we have the PID fully rewritten, as well as a class written for the controls of the plane. We did make slight changes to the structure of the code, as well as a plan to fix the elevation change.

New Elevation Controller

We are planning to change the elevation of the plane by using a proportional control method. The method itself will take the current altitude from the desired altitude, and we convert it to a number that we can use to adjust the pitch. We refer to this value as the desired pitch. We have a max pitch to prevent the plane from going out of control, and this value is used in the pitch PID.

We feel that this will give the plane a more realistic and faster accent / decent to desired altitudes.

Complications

We ran into a small error when converting the Python to Ruby due to syntax differences. We were missing and end statement, and we couldn’t figure out why. This was causing errors with our class functions when we tried to call them , since the methods were being created in an If / Else statement. Once we found this error, which took forever, it was smooth sailing to get the code to run.

Whats Next

In order to finish in time, we figured we need to meet more during the semester since we need access to the simulator. We are discussing these plans, and something will be worked out soon.

Our next step in our development plan is to finish getting the ruby working, then we plan to try and implement the GPS, but we are unsure due to time constraints.

Did You Know?

We don’t have anything, since we don’t know anything either to share!


Setting the Pitch


So, we previously explained that the current autopilot code would “fish-tail” its way up to the desired altitude. Today, we believed that we found out why it was behaving in such ways. Initially, we researched and brainstormed to gain a better understanding how this PID thing really worked. After reading a couple of papers and discussing them, we arrived to the understanding that what we needed to control was the Constant multipliers in the PID controllers.

Consequently we altered values being passed to the PID class to see the effect it would have on the flight. Miraculously, decreasing the P constant from 0.38 to 0.15 resulted in the plane making a smoother change in altitude (no fish-tailing). Yay!!!

However, upon further discussion, we came to the conclusion that this was not enough and could be done more efficiently. The plane was taking an eternity to climb the desired altitude since the pitch was only being adjusted by really small values.

The behavior that we would like is to have a steep ascent or descent that would decrease as we approach the desired value. So, we investigated more.

Pitch and Altitude

Since pitch and altitude are directly related, we believe it to be a great idea if the code reflects this. At the moment, it does not.

Plans

We plan to try and use the pitch to figure out the angle of which the plane is ascending / descending, and compute the change in vertical distance based on the velocity of the plane. We will then be able to adjust the pitch accordingly as time changes to obtain the desired altitude. We feel that if we eliminate the PID in regards to Pitch and altitude, and use simple math, we will have more control over how the plane is reacting to the changes. The black box method here does not seem to be ideal.

Did You Know?

That in a PID controller, the D, or the derivative responds poorly to noise in the data and can effect the controller greatly. That is why many PID’s don’t use the D, they are simply referred to as PI’s.

Renaldo likes pizza.


⇐ Previous Page Page 2 of 7 Next Page ⇒