Thursday, March 28, 2013

ECC -13 acceptance and new article to CDC -13

I just realized that have not written about the newest development in my articles. My article, "Full Quaternion Based  Attitude Control for a Quadrotor", was accepted to ECC 2013 in Zurich, Switzerland! So this summer I will go there and present my results to the people there. This is really huge for me, I have still not finished my master thesis and I was able to publish in one of the biggest conferences. I'm really looking forward to this and I hope the response will be very good.
     One of the critiques on the article was the lack of experimental results but a new article has been submitted to Conference on Decision and Control (CDC) -13 with the experimental results. I can't reveal much because of confidentiality but I can say this much; the controller works perfectly and very close to the simulation results! So now it's just to wait and see if it will be accepted. Wish me luck!

What's up and new boards

There has been some time since the last update but here are some updates. Sadly a lot of time has gone to my master thesis so not as much time as I have wanted has gone to the KFly Project but that does not mean it has been standing still.
     I'm currently writing a post on the difference between different Kalman Filters such as the normal linear one, the Extended Kalman Filter (EKF), the Unscented Kalman Filter (UKF) and finally the Cubature Kalman Filter (CKF). I will also go into  how you tune these filters, what a "square-root" implementation is and what an adaptive filter is and how it works. I'm also thinking of adding how a Square-Root Adaptive Cubature Kalman Filter (SR-ACKF) implementation I'm working on works and it's benefits over a few other implementations.
     Some hardware changes has also been done and three new boards have been built. A friend of mine has been porting TauLabs (OpenPilot) for my board and yesterday we tried some code. We ended up bricking two of the boards so the JTAG programmer could not find them. In a small act of desperation we took an STM32F4Discovery and used the onboard ST-Link programmer via SWD and we were able to flash the boards again!
     The hardware changes we made because of a poor choice of ESD protection, the chip chosen was so small it was virtually impossible to get soldered properly (0.25  mm pitch UDF chip). Because of this I changed it to an SO-70 chip and now the board is ESD safe and working!

Three new KFly boards assembled and tested!

(On a side note, this was my first post written on a tablet. Yay!)

Saturday, February 23, 2013

Another test video

Here is another video taken during testing. Not much to say really. It has a loop where it goes from 0, 60, -60, 0, 30, -30, 0 degrees in 5 second intervals. As seen in the video it is rock solid! Unfortunately I don't have a video when we are striking it with disturbances but, suffice to say, it handles it without any problems. Some offset can be seen after a few movements, this comes from one engine being a bit broken and thus creating a lot of vibrations. This causes some offset in the filter.


As soon as I know if my article was accepted to ECC -13 I will post more theory on the controller with simulation and experimental results. So stay tuned for more info!

Wednesday, February 20, 2013

First controlled test of the Quaternion controller!

Today was a big day: The first real test of the Quaternion based controller. It was some work to get it to work as expected, as an example a program to calibrate the speed controllers was needed so some time was put into that.
     After guessing the gains of the controller I started it up and it worked! As shown in the video (this is the first actual start up, none before this one) it really works! It is programmed to go from "flat" to about 60 degrees angle and it does it really well. There is a constant offset because of one of the engines being some what broken but it still works! Now it time to start tuning the controller!


Thursday, February 7, 2013

Worst bug ever! (in ST's USB CDC driver)

Today a lot has been done for the preparations to do the first controlled "flight test", "flight test" as in a Quadrotor strapped to a frame and trying the rate and attitude controller. However during the development of the controller I noticed a very strange thing happening (it actually started when I sent a lot of data over the USB VCP (Virtual Com Port), after some time the board just stopped doing anything. But it happened very sporadically, from within minutes to hours. But today I finally caught it with he debugger (I've been trying for two weeks)!
     The program got stuck in a function called " DCD_WriteEmptyTxFifo" - one of the USB interrupt handlers and for some reason it got in an infinite loop here. I can directly tell you all that I'm no expert in USB, I have just adapted the ST drivers to fit my purpose, so I started to wonder how I should fix this but Google is you friend. After some research I found this post where one had solved the problem! Apparently ST had a bug in the driver where they had forgotten to clear the interrupt and this was causing the infinite interrupt loop. After adding those lines of code my system stopped to hang randomly!

Now that's one good thorn out of my paw! But I must say I expected ST's drivers to work, not to have a bug like this.