2011 didn't end too well for the ArduWot, incorrectly fitted undercarriage made for instant nose over on throttle up which broke the prop and fried the ESC. A new ESC arrived Monday which was quickly fitted only to reveal it to be useless at powering the aircraft and APM, luckily we'd also ordered a BEC (for a different project, but ArduWot takes precedence!). With the ESC and BEC fitted we took her out for a shakedown flight which went without drama, only point of note was a noticeable shift forward in CG with the addition of the BEC. Some advantages of the BEC are some nice little battery monitor lights and a switch for APM/RC gear. The switch is particularly useful as powering up the aircraft in a level attitude (hard enough for a tail dragger) by connnecting the battery in a cramped battery bay used to be quite fiddly!
Cramped battery bay with switch
Next flight it was time to put Simulink in control. Our last attempt at this went straight to a closed loop heading hold system, but this approach makes it hard to quantify the performance of individual subsystems (namely the delay in the ZigBee link). So this time we started off with some simple open loop step tests. Simulink was given full attitude and throttle command with the defaults being zero roll and pitch and full throttle (as it was a fairly windy day). In the first test a pitch step of 0.75 radians (~43 degrees) was commanded which ArduWot attempted admirably but fell short by a few degrees due to a lack of power. Second test was a 0.5 radians (~29 degrees) roll step, despite the gusty wind ArduWot managed to maintain this perfectly.
Both tests were plagued with Zigbee connection issues which is down to a combination of poor antennae and a restricted operating area. We are forced to operate fairly high and pretty much over our heads dues to high trees all around, this is not the best place to be when you have a pair of omni antenna mounted vertically. We're in the process of knocking up a tracking rig for a high gain directional Yagi antenna which we hope will help matters. When we do lose Zigbee connection for more than 1.5s, APM goes back to it's "Auto" mode. You can see this in the roll test video when ArduWot rolls level and begins to descend, this is it going back to it's default mission which is to fly a circuit around our test site but as soon as it picks up Zigbee again it goes back to Simulinks command.
Despite the telemetry issues we've demonstrated the viability of closed loop control using Simulink. The pitch test saw Zigbee drop out just at the wrong time to properly assess the delay, but the roll test shows a round trip delay of 0.3s which is more than adequate for outer loop control.
The current status of our code is very much preliminary (proof of concept), so it's not very well written. However if anyone is interested there is more information on our wiki, including a link to download our Simulink and modified APM code.
We've just set up a SIL testbed (soon to be HIL also) which should speed up our development and we hope to have some fancy algorithms running in Simulink and other external code running in the coming months. As this happens I'll keep you guys updated!
Hi Owen ,
Our UAV teams are working on ardupilot with Simulink interface.We want to create a new controller (fuzzy,etc.) with Simulink , so we can try it on our RC glider .Could you send us the simulink blocks which were used in your youtube video?It will be really helpful.Thanks in advance.
Halim-TOBB ETU University UAV Team
If possible, please share the code. It will be really helpful. Thanks.
I use MATLAB to create an individual plot for each frame then use Adobe Premier to make them in to a video and overlay them on the footage. I can dig out the MATLAB code for you if you like.
I'm wondering how it is possible to show telemetry data on movie. Did you use Matlab function or any external software? I'd like to do something similar.
A separate battery would be ideal and I've always run one on my personal kit. However space/weight are at a premium on ArduWot as we've got other things on board besides APM (more details coming soon!). Plus batteries are like gold dust in our lab as we have a number of other projects which all use similar batteries, it doesn't matter how many we buy there is never enough!
That's really neat!
Thanks for documenting the mavlink command implementation so clearly. I have already used it to implement a similar setup on my quadcopter and can now control it using a wiimote. I hope to try the simulink control soon.