View Full Version : Discussion Ateryx 2.1 (new ap coming online)
rbeall
Dec 23, 2008, 04:31 PM
Figured I would share a little of my experience and status on the autopilot I have been working on for about 6 months. I have been teaching myself this stuff through osmosis so forgive me if my nomenclature is a tad non-technical.
hardware status:
3 axis magnetometer
3 axis accelerometer
3 single axis gyros
9 xtend 900mhz rf
3400 rabbit core module
fully conditioned pitot statics (16 bit a2d shared with IMU)
2 aux analog channels
1 aux serial channel
Unique features:
tight form factor
conventional servo jacks
temp comped fixed gain kalman IMU
ground link up and down
Work needed:
anything for a ground station gui and hardware
aschuck
Dec 24, 2008, 12:19 AM
Hi rbeall,
Do you plan for a GPS?
Does it do data logging?
Do you plan on selling it?
Is there another thread about your AP?
Please more info.
rbeall
Dec 24, 2008, 06:51 AM
Data logging would be done on the ground station side but I currently don't have anything working in that reguard. The variables are sent down in a checksummed packet scheme but I don't have anything other than some matlab code that receives them. Still just pressing hard into the hardware.
Yes I have an external gps which is working (popular ublox breakout)
As far as production no not really. It isn't far enough in my pinion and I'm working on it by myself. Possibly later but much more developement. I have a lull in my occupation for the next few months so I hope to press in again after all of my holiday parts orders come in.
EddieWeeks
Dec 25, 2008, 08:02 PM
I could write a ground station program... I just need to change
a unmanned boat program witch reads many comm ports and displays
current pos on a map, amps, volts, and many more.... I just added a false
horizon.... I can post some screen shots if you like.. All Visual Basic 6, XP
Eddie Weeks
rbeall
Dec 27, 2008, 09:04 AM
That would be cool. Send some pics. I've been trying to learn visual anything and am having a hard time getting over the steep learning curve. I have never taken any programming classes so codeing up the autopilot in C was my sink or swim experience with programming. I got good enough to write a kalman filter for the imu but can't figure out visual to save my life
EddieWeeks
Dec 27, 2008, 10:02 AM
Here is one screen shot..
This is a autopilot program for a small electric boat...
Eddie
EddieWeeks
Dec 27, 2008, 12:13 PM
If you can get a comm port with some data to XP... GPS, voltage.. attitude...ect
you make the list... I will display it as a dial, strip chart, gauge.. what ever..
This is the active X add on that I will use..
Eddie
http://www.globalmajic.com/ActiveX-Instrumentation-Library-v35-c61.html
rbeall
Jan 05, 2009, 03:14 PM
Sorry I have been away on holiday. The comms havn't been specifically written but they follow a very specific pattern. As of right now I have the autopilot sending to a comport in XP wirelessly using 9xtend modems. Its just rs232 on 384 baud I believe. I can turn off and on what ever words I want to send down but here is what variables I have online so far:
Airspeed, Alt, cog, sog, lat, lon, phi, theta, psi
I don't know if the activex controls you have have aircraft gauges but I know that company makes a slick set of controls that would work great. If you don't have it, try the demo and if we can get something working I may purchase it.
If you need more specifics on the comm sentence structure pm me.
-Ryan
rbeall
Jan 10, 2009, 08:43 PM
Here is the Kalman output on the roll axis. I'd say its working quite well. This wasn't with any centripetal acceleration but you can see from the previous post that the centripetal compensation works fairly well also. Parts all in. I am just waiting on the boards now. Should be about a week!
rbeall
Jan 11, 2009, 04:15 AM
Finally got Simulink and Guide to talk to the aircraft instruments! So now I can start my GUI.
Also got the RS232 sending and receiving through Simulink!
This is just a quick layout to test some code and get familiar with the ActiveX stuff but it is coming together.
rbeall
Jan 13, 2009, 02:31 PM
Someone asked about my Pitot statics so here is what I'm using.
http://www.freescale.com/files/sensors/doc/data_sheet/MPX2010.pdf
http://www.freescale.com/files/sensors/doc/data_sheet/MPXA6115A.pdf
-Ryan
rbeall
Jan 15, 2009, 03:21 AM
Just more GUI work. I got my DX7 to run the manual controls through a virtual joystick (ppjoy and propo) in Simulink which is nice because it only requires a mono headphone cable and a mic jack on my laptop. Switching from manual to the different levels of autonomous flight (as chosen by the tick marks in the GUI) is as easy as flipping the gear or aux switch.
rbeall
Jan 15, 2009, 05:33 PM
I'm a perfectionist....what can I say? I like this version a lot better! Still a little I want to do but almost there.
rbeall
Jan 19, 2009, 07:17 AM
Finally got the way points to edit/load/save on the fly...took for ever.
Just need all of my parts to come in so I can work on the AP side of things.
You guys think of any other cool feature this needs. I am thinking I am going to add an extra tab for PID tuning but that's almost unnecessary. I have tuned up two planes so far with out using graphs so... just a luxury at this point. But I guess if I have nothing but time until the parts arrive I might as well HA
-Ryan
rbeall
Feb 07, 2009, 09:59 PM
Finally got all of the hardware in yesterday. Couldn't help myself and finished it mostly up in about a day. Everything is working hardware wise I just need to speed a good couple of days calibrating everything. Thankgoodness I had written most of the software first! Sorry for the crappy pics...got to love the iphone...not
-Ryan
airmcn_3
Feb 07, 2009, 10:48 PM
Finally got all of the hardware in yesterday. Couldn't help myself and finished it mostly up in about a day. Everything is working hardware wise I just need to speed a good couple of days calibrating everything. Thankgoodness I had written most of the software first! Sorry for the crappy pics...got to love the iphone...not
-Ryan
Nice and compact! Good job.
AXI Motor Models
Feb 08, 2009, 02:14 AM
That looks great!
rbeall
Feb 09, 2009, 09:11 PM
Thanks, It feels great to finally have it up and working. Now I'm busy with work and don't have much time to calibrate it. Next weekend for sure! Hopefully I'll be flying soon!
Paul_BB
Feb 10, 2009, 04:43 PM
Hi rbeall,
Congratulations.
How do you correct the accelerometers for the inertial effects ?
Regards,
Paul
rbeall
Feb 10, 2009, 11:26 PM
The Kalman is coupled with the GPS. I simplified the problem significantly, but in short you use the ground speed times your bias tracked rates which ends up being your centripetal on pitch and roll axis. The physics depicts you must use an inertially referenced speed so gps speed over ground works perfect. Its not very fast and somewhat low resolution in my example, but I didn't have my gps routine running properly. I still got some decent results.
I did see that when i didn't use the compensation my Kalman would drift 20-30 degrees in a .7G turn in my car quite rapidly actually. But with a very poorly calibrated test run using compensation it only varried by 5-10 deg from actual. You can see that (because the board was held flat during the turns) the centripeal wasn't compeletly subtracted out but I contribute that to competely guessing the calibration of the gyros. An interesting idea would be calibrate the gyros from the centripetal in a known orientation. Now that the board is made and my friend has his gyro tester up and running, I plan to calibrate them this weekend and hopefully get some more accurate results. Then I will compare the constant of proportionality to the corrected/cal'ed gyros and see how close the centripetal is. If this proves to be an accurate method of calibration I would say its quite the convienence.
rbeall
Feb 11, 2009, 12:35 AM
Rate of change of Translational Velocity
udot = X /m - g*S(theta) + rv - qw
vdot = Y /m + g*S(phi)C(theta) - ru + pw
wdot = Z /m + g*C(phi)C(theta) + qu - pv
Paul_BB
Feb 11, 2009, 04:08 PM
Rate of change of Translational Velocity
udot = X /m - g*S(theta) + rv - qw
vdot = Y /m + g*S(phi)C(theta) - ru + pw
wdot = Z /m + g*C(phi)C(theta) + qu - pv
Hi rbeall,
I'm not sure about what you wrote. In fact [udot, vdot and wdot] is the derivative of the speed vector in the body frame and this is why you have the cross product [rv - qw, -ru + pw, qu - pv].
The GPS gives us directly the speed vector in earth inertial frame [vkx, vky, vkz]. So [vkxdot, vkydot, vkzdot] is the acceleration of the CoG expressed in the earth inertial frame. Now to get the values of the accelerometers you have to express this acceleration in the body frame. If you have the rotation matrix R then you apply [axb, ayb, azb] = R.[vkxdot, vkydot, vkzdot]
If [Xm, Ym, Zm] is the measured accelerometer vector then the acceleration corresponding to Earth gravity is (you want the direction of this vector for your update):
[X, Y, Z] = [Xm, Ym, Zm] - (1/m).R.[vkxdot, vkydot, vkzdot]
Do you represent the plane attitude with a cosine matrix or a quaternion or Euler angles ?
R11 = cp.ct // R12 = sp.ct // R13 = -st
R21 = -sp.cf + cp.st.sf // R22 = cp.cf + sp.st.sf // R23 = ct.sf
R31 = sp.sf + cp.st.cf // R32 = -cp.sf + sp.st.cf // R33 = ct.cf
With: cp = cos(Psi) ct = cos(Teta) cf = cos(Phi) etc.
What do you think ?
Regards,
Paul
rbeall
Feb 11, 2009, 09:45 PM
those equations come from the equations of motion for a rigid body. My method is a very crude approximation. I assume a lot of things are zero if not close to zero for example:
I assume that the aircraft (helicopters don't apply) tracks mainly in the forward direction and sideslip or beta is very small. This leads to the assumption that the speed over ground is fully comprised of in the x direction (out the nose of the aircraft) captured in the variable u (body velocity in the x direction, xdot). This then means that v and w are zero or close to zero (steady level flight). In my experience the 3d velocity dertermination of gps isn't that accurate in the vertical direction so like I said I grab SOG and assume its u.
I also assume (because aircraft is close to steady level) the forces are equal in all directions (XYZ).
Therefore almost all of the variables drop out and you can resolve:
acc_y_corrected = acc_y -ru
acc_x_corrected = acc_w + qu
Then you use the corrected acc to come up with your angles. So in my plot above I drove my car in a tight circle and kept theta and phi = 0 deg (as close as possible obviously). So all of the ay acceleration should have been centripetal. There fore my algorythm should have subtracted all of it out making the ay_corr term go to zero. You see that it doesn't. It drops the curve a little but not all the way. When I ran the test the gyros were not calibrated nor was the sog coming from the gps anything worth using so that could significantly be why the results are what they are. I suspect the bigest culpret is the gryos. I added a compensation factor in the post processed data and I got almost all of the centripetal out on most cases. Gryo spin test this weekend will confirm my theory.
Like I said this is a pretty crude approximation but I am getting very usable results even with my first run non calibrated example. I'll keep you posted as to what more research develops.
I am using Euler's, The person working all the math has pathetic math skills (me ha).
It was more a proof of concept run than anything.
fireisborn
Feb 11, 2009, 10:26 PM
Your autopilot looks allot like this one:
http://www.aessuav.org/images/20070406_8344.jpg
But it probably costs allot less!
Any plans of selling it?
Finally got all of the hardware in yesterday. Couldn't help myself and finished it mostly up in about a day. Everything is working hardware wise I just need to speed a good couple of days calibrating everything. Thankgoodness I had written most of the software first! Sorry for the crappy pics...got to love the iphone...not
-Ryan
rbeall
Feb 11, 2009, 11:39 PM
Close but mine has better hardware in some reguards. I don't really plan on selling it at this point. I would have to hand make everyone and honestly that would bring the price up pretty high. Although the going price for a hobby auto pilot is 800-1000 anyway. Parts wise you are right most autopilots are cheap. The Ateryx has a full working IMU and the price of the parts is a third of the attopilot (which doesn't but you are paying for his engineering).
That's why I am attempting to build my own. I figured I prolly have the skillset but not the budget so why not try?
So far so good. I finally have all of the tools at my fingertips and very little unknowns of the final solution are left. Just a matter of hours invested in programming at this point. If I ever do decide to go public it will probably be on here first so stay posted but as of yet I have a lot to finish unless you are very avid programmer.
-Ryan
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.