Monday, January 6, 2014

Ok, wow!

Today, I attended an exam for a job at ZOHO corporation. It was interesting that it was a content development job. Two interesting things-
Andreas Raptopoulos- person behind matternet, that is, a company working to transport essential drugs and commodities in areas lacking basic transportation infrastructure, by using drones.

http://www.youtube.com/watch?v=9yEl0-bCA9M
On the other hand, raffaelo D'Andrea, a professor at ETH Zurich who made a TED global presentation on atheletic quads.  There are only five kids there. These five young men were able to do all that work. It requires extensive knowledge of the actual physics, apart from the electronics, coding etc.
http://www.youtube.com/watch?v=w2itwFJCgFQ

Friday, January 3, 2014

The jitters!- When someone says they have completed a certain percentage of the project, we feel bad.

http://forum.arduino.cc/index.php?PHPSESSID=o82evrmnjvt7prmr3l9djsgui1&topic=7001.10;wap2
Bonifaz Kauffman has replied to several guys who've had problems with the device software etc, and the HTC cellphones. some of them don't work with amarino because amarino supports arduino 2.x not arduino 1.x. 
The serial monitor resets the arduino 2560 board each time we click it. There are two solutions from here-http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection
One, place a 120 ohm resistor between the reset ande the power pin.
Two, place a 10 uF capacitor between the reset pin and the ground.

How does this work?
The ATMEGA2560 chip gets reset by a pulse resetting it to ground. By two things- on the application of power, and ,when the serial monitor is used after receiving and transmitting data.

Today, everyone is jittery about the project. We need to show results i.e. automation which is very difficult given where we are today.  We need to show results, to get marks for the final year project. What he suggests is preprogrammed flight. Which is the way to go, given our time predicament and the fact that every other person says that their final year projects are done.

I just want to learn as much as I can. As far as this goes, I just want to learn as much as I possibly can. I believe that I have six months before a decision comes for me. So, actually, I can afford to go through this slowly. But, my thesis will suffer.

What were the things that were done?
1. The pentacopter was fabricated.
2. Wireless control of the pentacopter was effected.
3. The ARDUINO platform is used after the other platform was found to not work. We wasted too much time, trying to figure out how to make it work.
4. Ultrasonic sensor was tested, and data was obtained from it.
5. An I.M.U. stopped working, and, We tried to obtain data from the kk multicopter board. Then, we found that there is an impedence mismatch due to which it is not possible to do that. We tried to obtain a module from around Chennai, and, the price was too high- Rs. 4125 for  a two axis gyro, and, Rs. 1200 for a three axis accelerometer. Finally, The bluetooth module based communication link with a cellphone allows us to get I.M.U. data without the need for preprocessing.
6. A simulation for the pentacopter was carried out.
7. We got the pentacopter to thrust upwards. With unequal speeds at each motor.
8. We also redid the pentacopter i.e. refabricated the pentacopter.


There are a couple of problems with the approach.
1. We can bring it to fly upwards. We can bring it to hover. Then what? How do we expect to make it move in any direction?
2.  A simple easily effectable idea is thresholding. The idea suggested is to just take one value eg. roll. Now, using a threshold for roll eg.0,  increase the speed of the motor that is tilted downward. It is a good idea. Simple. Till it comes back to hover mode.
3. What will be the relation between motor speed PWM and the controlled output?

Something that is attainable is just hovering of the pentacopter. It is simple and attainable.
1. Derive the state matrix of the pentacopter. Derive the center of mass. Derive the inertial tensor matrix. Derive the rotational and translational model equations. This is theoretical work.
2. Do not implement the kalman filter and set the PID loop setpoint to 0,0,0 i.e. pitch, roll, yaw.
3. Use Ultrasonic sensors to get upto a particular height. This is practical and two of us needs to do this again and again, to make sure that the penta doesn't fall to ground too fast.
4. Implement the PID loops. I don't know how to derive a relation between the controlled outputs of pitch, roll and yaw PIDs for the five rotors of the pentacopter. So, a solution would be to implement the solution of the quadcopter, as detailed in Dr. Muhannad Ali Omar's paper for a matlab simulation of the same. And, use a Y connector for the pentacopter.

This is definitely possible in three months.

http://teacher.pas.rochester.edu/PHY235/LectureNotes/Chapter11/Chapter11.htm
The great teacher who has uploaded these examples.. she/he is a god! It looks like the inertial tensor will be derived today for sure.

http://www.phys.ufl.edu/~pjh/teaching/phz3113/notes/week10.pdf Another link that comes up for googling 'how to solve inertial tensor sums'.



A


Thursday, January 2, 2014

Garbage overflow 1, nothing much good out of it.

http://stackoverflow.com/questions/11068450/arduino-c-language-parsing-string-with-delimiter-input-through-serial-interfa
This is a useful post, what it says is this. Suppose I have three values separated by two commas or any other non alpha numeric character, what I need to do is, use the subString property. which has the syntax
substring variable.subString(from_point,to_point)
So, the example says first we identify where the given two commas are, by using the .indexOf
int commaindex=myString.indexOf(' ');
int secondcommaindex=myString.indexOf(' ', commanindex +1)

Now, we are using,

string str1=myString.substring(0,commaindex);
string str2=myString.substring(commaindex+1,secondcommaindex);
string str3=myString.substring(secondcommaindex); // this finishes till the end of the string.
// now convert the strings into numeric integers.
int phi= str1.toInt();
int theta=str2.toInt();
int psi=str3.toInt();
 Which brings us to the question How do we even get mystring in the first place?
off topic1: MeetAndroid.Send(value) sends something to the cellphone
http://www.instructables.com/id/Reverse-Engineering-Uzzors2k-Bluecar-Android-App/step1/Amarino/
this tells us that all of the previous things are not required. What we need is just an array, that makes the program damned simple.
http://www.controlguru.com/pages/table.html mentioned by Bret beauregard who wrote the PID autotune library as his teacher who's uploaded a great text cum course on practical aspects of control and real world data.

http://www.youtube.com/watch?v=dlOCuYqTEpI
This link provides an understanding of dynamics of machines by Prof. Amitabh Ghosh at I.I.T. Kharagpur. It explains relation between angular momentum, Ixx etc.

Wednesday, January 1, 2014

Am going home. also updated on Jan4

1. A problem was solved. The clockwise rotors were fitted with clockwise propellers, and, the anticlockwise motors are fitted with anticlockwise propellers. This was not the situation before.
How did we know that? An anna advised us to use a piece of paper over a running motor. If the air and paper was drawn into it, then, the thrust is downwards- hence, the placing is correct. Otherwise, the wrong propeller is on the rotor. So, we changed it that way.
2. Ma'am said to proceed in two ways separately-
   2.a. get the penta to hover and fly, use the data so obtained, in cubic spline interpolation to get the motion equations.
    2.b. do it the intech, AUS paper way.
This means a lot more work.

Today was a waste of time in college. I wish I hadn't gone. College would have been a complete waste of time, if I hadn't seen my good friend, Santosh. It was nice to see him again. I must have bored him out because I talked alot and learned alot from him!

Derived the center of mass of the pentacopter. Have assumed that the mass of the carbon fiber rods are distributed on the point masses of the motors.




Now, I am looking at the lecture by Prof. Amitabh Ghosh  from the dynamics of machines series specifically lecture 3.
 
 
There is a problem with just considering the 6 masses. The rods(carbon fiber), circular sheets and the 5 stands for each motor leg, contribute .047Kg*5=.235 Kg.
The whole pentacopter weight is 1.185 Kg.
Each motor has a weight of 0.085 Kg.
The mass of the battery is 0.525 Kg.
Length of a rod is 23 cm.
So, I made the assumption that 0.047Kg was distributed on a mass of 0.085Kg! I don't want to sound ridiculous, but I apparently tried to have to avoid having to include the rods into the center of mass derivation. It would be time consuming, because, these are five uniform rods at angles to the the considered axis. Apart from five point mass motors and a big battery.
 
So, on substituting the derived formula, making the assumption that the mass of the rest of the penta could be distributed on the motor masses, the center of mass of the pentacopter lies at 0.942 meters from the left hand most two motors(assumed to be parallel to the y axis i.e. becomes the y axis when x1=0.)
 
While the entire length of m2, m1 to m5 is 0.41607 meters.(as in the first image,)
 
 
 

Sunday, December 29, 2013

dec 29

Looks like I've not done the work again. Now, the main priority is to integrate a PID loop with the IMU bluetooth info and speed control of the motors. I have ten hours to do this. I can't believe that I sort of pissed off the guys. I wanted us to go to college. It gives me the spurs to work tonight - that we have to get something working tomorrow. It's been two days of no work and it shows. I felt bad that  Vinod called me and sort of told me that he was really sick. But, we are meeting tomorrow. What are the things we are going to do tomorrow?

Finish the loop control of the motors. This might even be the final project. I know that I can write the code, but LVR is the only one who can make the practical part of it work. IT CAN BE DONE. I believe in us. I believe because ma'am trusts us to do this. And, she has trusted us above all else.


Other long term problems to solve.
1. dynamics of penta
2. inertial tensor matrix of penta== states of the state equation.
3. hardware- the battery charger- this is one whole deal by itself
Look at both these pages, some guys have been waiting since november for the delivery of these products. Is it possible for us to get these propellers from anywhere in India?

5. I've done two more sub programs of the simulation.
 I need to do around 6 more, but I need to understand alot more of the stuff.
6. I should finish the arduino code at least by today, but, when I am looking at it today, after I do write the PID loop then, the controlled value can be translated to the motor velocity but even that needs alot more understanding of the dynamics, which will take some time.


I think we should go to college, because, otherwise, you live in a false fantasy world, anyway, I love SSN. Because ma'am gave us this great opportunity to work on this pentacopter.


Saturday, December 28, 2013

Major doubt 4: to be CLkwise or AntiCLKwise

We have three clockwise rotors and two anticlockwise rotors. My doubt is The anticlockwise rotors push the ground, the clockwise rotors do the opposite. From the previous line, I see how confused I actually am.

http://robots.dacloughb.com/project-2/esc-calibration-programming/ this is a nice site of the university of Victoria, where they put together a quad in the mechatronics lab.

Part of the reasoning in why we are using the ARDUINO board is the ardupilot 2.6 uses an AT2560 mega to process IMU data. Interesting. pointed out by LVR. Anyway, it is possible to demonstrate hover. This is a sure thing that will get done by this monday. Have to place an order for the propellers. LVR told me that too.
I just checked it. No. the ARDUINOMEGA2560 configuration is used to program the APM in ARDUINO software. But, still is worth a shot. 

Major doubt 3

The values that we need to control are x, y, altitude(z), phi, theta, psi. The good news. Thanks to LVR's homecoming, we got the bluetooth transmission of the gyro data going. So, we have phi, theta and psi. As for altitude, it looks like we're putting up an ultrasonic sensor at the center of the setup.

There is a major problem here. Our Ultrasonic sensors are too sensitive to noise i.e. it's better to understand it from here- there are five rotors, as compared to four in a quadcopter.



But, that isn't the big doubt. Ok, I was thinking, 
1.how do we measure the X and Y coordinates of the device?

THE BIG PIC== HOW DO THE DYNAMICS OF THE PENTACOPTER WORK?
In a quad this is the case-