Developer

ArduCopter in action: Testing the QuadCopter (HIL mode) on X-Plane v9

Here a video a the ArduMega board (2560 or 1280) with the firmware ArduCopter v2.1.1b (JLN update for X-Plane) connected on the X-Plane simulator throught the APM Planner in HIL mode. The QuadCopter QRO has been modelized for X-Plane v9.0 (or greater) so as get a closest replication of a true QuadCopter UAV.

This is a very good method for testing all the features of the ArduCopter firmware. For conducting a such test, only an ArduMega board (APM1280, APM2560, APM2) is used, no IMU shield or sensor are required here...


Setup:

- Receiver: Turnigy 9X8C v2 connected to the APM board

- Transmitter: Turnigy 9x

- APM planner v1.1.1x

- ArduMega board (APM v1 or APM v2)

- firmware ArduCopter v2.x.x + the JLN mod for X-Plane

- Software: X-Plane v9 or greater

- QRO_X: the quadcopter model (by JLN) for X-Plane

 
More infos at:

http://diydrones.com/profile/JeanLouisNaudin

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Developer

    So... For ArduMega test pilots Xplane is greatly sufficient.... One of the most important feature of Xplane is that it use real digitized maps (at true scale) which can be very helpful for preparing true flight missions with the APM Planner and Google Map. I use also this feature for testing the ridge soaring capability of my ThermoPilot firmware...

    Regards, Jean-Louis

  • Hi Jean-Louis

    I guess we are messing concepts here. By definition, for a HIL system in hard-real time dealing with fixed discrete time systems (like our autopilots), the host (X-Plane) shall guarantee this requirement throughout the simulation. But X-Plane does not do that, actually as a flight simulator, it tries to keep the fps by any means. Thus if your avionics are expecting gyros readings @100Hz for your algorithms, you can not rely on them, because they are not "instant" values, they heavily depend on the variable-time-step of the simulator, which is "unpredictable" or not deterministic (a requirement for a hard-real-time host).

    Remember that FAA certifies HW+SW for specific scenarios, XPlane alone is not certified for instance, actually they state this in their webpage.

    Does it mean that XP is useless for GNC stuff? I haven't said that!, of course not! you have posted videos about it, and there are a lot of more in the web. You can prototype "high-level" stuff, plot control loops, etc.

    However, let see a really simple example. If you post process "true-value" gryos from XPlane (fixing the frame rate to monitor refresh for instance @60Hz), just integrating them with RK4 to obtain attitude. The Actual attitude and estimated one diverge very quickly.

    My post was just a tip, XPlane was not design for validating avionics in a formal way. Knowing its limits will save you weeks of headache.

  • Developer

    As far as I am concerned, X-Plane is one of the best simulator for conducting tests flights in HIL mode with the ArduMega and the APM planner. I am frequently use a such tool for the PIDs tuning and debugging the firmware of the ArduPlane and now on the ArduCopter firmware before field tests. This avoid to spend time in the field and also to spend money in expensive crashes... If the 3D models are well designed, the flights models can be very close to the real life. This allows to conduct intensive simulations with various weather conditions (strong wind, gust, wind shear...).

    Below some demonstrative examples from my recent flights experiences:

    The HIL mode test with the MAJA drone:

     

    The MAJA drone in real life:

     

    The HIL mode test with the Thermopilot glider drone:

     

    The Thermopilot project in real life:

     

  • Just a tip for further works:

    In my experience, X-Plane is not a "good" platform for testing avionics, this is not a real time software and it normally does not run in a hard-real time machine neither. You can not employ control techniques expecting a fixed time step for instance. Moreover, because of that you will realize that it does not have reliable "low-level" signals such as accelerometers, so Navigation algorithms (like the DCM) simply won't work as expected, leading to false results.

    Of course, for "high-level" stuff like Guidance or "gross" Control loops (or whatever that does not rely so much in time-step) is ok.

    Another consequence, is that one second in X-Plane (non-real time) is not the same second in your Hardware (real time).

  • Really impressive!!! I am very interested in HIL simulations. Thank you very much.

    Good Job!

    Javio

  • Developer

    The firmware for the HIL mode with X-Plane is now updated for the version v2.1.1r3... The LOITER is really impressive and very stable.

    Good work Jason...

    Regards, Jean-Louis

  • Developer

    Below some informations about the installation:

    1) How to install the QRO_X model for X Plane:

    you need only to copy the folder QRO_X to the Aircraft folder of Xplane

    2) How to install the firmware ArduCopter:

    The full ready set firmware is in the folder: firmware ArduCopter v2.1.1xp

    You need only to compile it and download with arduino in a APM board.

    To run the HIL mode, you may use a simple ArduMega board (APM1280, APM2560) without the IMU shield... You may of course use a full ArduMega (1280,2560) with the IMU shield installed on your quad and also the latest APM v2.

    3) if you do a setup, reset on your APM board in CLI mode, the working PID for X-Plane are installed.

    4) you may also set the good PID with the APM planner (AC21_Xplane_QRO.param)

    DO NOT check the box Quad in the Simulation screen of the APM

    If you want to use the original or your own version of the ArduCopter firmware, you need only to copy, the files:

    APM_Config.h

    APM_PID_HIL_JLN.h

    GCS_Mavlink.pde

    into your ArduCopter firmware.

    Enjoy to flight with the QRO_X mod for X_Plane with your APM...

    Regards, Jean-Louis

    3692326066?profile=original

  • Distributor

    You can find the model in the file above that Jean-Louis provided, or if you just want the individual files you can find that in the Arducopter XPlane Quadcopter Model

    http://www.arducopter.co.uk/uploads/6/7/0/2/6702064/xplane-quad.zip
  • Jean-Louis, Where can we get the QuadCopter model for Xplane ?

    Thx

  • Developer

    You will find everything you need for testing yourself the ArduCopter v2.1.1 on X-Plane at:

    http://ardupilotdev.googlecode.com/files/ArduCopter%20for%20Xplane.zip

    Enjoy,

    Jean-Louis

    3692325920?profile=original

This reply was deleted.