I am about to build a new plane for fpv flight and uav using Ardupilot.

I have both an empty EasyStar and Easyglider foamy.
Do I have more chance for success using the EasyStar, or there is no significant difference? I mean the Ardupilot firmware handles both or it's optimized more for one or the other plane?

In case of the EasyStar, not sure if it worth to add ailerons?

The Ardupilot is equipped with the standard gps, horizontal and vertical infra, pitot sensors.
Power system: brushless motor + Lipo.

Views: 188

Reply to This

Replies to This Discussion

I installed the Pitot tube to the wing, and did some more tests on the robotpilot. While it kept the track and got all the waypoints, it badly wobbled. The PID loop needs tuning.
The first test was without this wobbling, probably because it flew at much higher speed - full throttle because of the lack of the Pitot feedback.

The plan was Home + 4 waypoints, target altitude 100m. I tried aileron+rudder and aileron alone with fixed rudder. The wobbling was the same.

The mode and the distance to the next waypoint displayed in the upper left corner. The arrow at the bottom shows the home direction, the number below the distance from home. Altitude is on the right. The 1% is the remote control receiver's packet loss error percent (actually 0%, but inaccurate analog signal)

In the second circle I activated RTL mode (it's activatinng on signal loss/receiver fail-safe as well).
The fasst receiver has fail-safe on ch3 only (shame on Futaba) so I had to use ch3 as ctrl channel and ch5 as throttle (easy to do on my Multiplex Evo ).

http://www.vimeo.com/6802222

My "to do" list:
- serching for a possible bug - Ardupilot starts the motor even in manual mode at the moment it captured gps fix
- writing an air speed display item and calibrate it to the gps speed
- trim the infra sensors, writing an angle display during "jumper on mode"
- fly-by-wire test to check if the stabilization or the waypoint direction part is more responsible for the wobbling
- clean up the throttle loop code (it seems to be "under construction")
- writing in-flight selectable "fly-by-wire" mode
- replacing the uncomfortable jumper with some automatic startup
Impressive work! Keep at it!

BTW, Jordi has already incorporated your altitude hold bug fixes in the next code rev (2.4), so please ping us with any other bugs you catch.
Thank you.

I found a possible bug and have some ideas for further modifications (please tell me what you think about them):

The above mentioned motor start problem is a possible bug. I can't tell for sure, as I added some additional display items, so can't be sure if the problem is in the original code or I did something the wrong way.

The throttle loop needs some cleaning:
in the .h file the throttle_max is defined in 7-24 and again in 7-30, and the constant values are obviously belongs to very different calculations, and the line that uses throttle_max is commented out: //OCR2A=(((porcent*(long)(throttle_max-throttle_min))/100L)+throttle_min)/8L;

There is a general Arduino problem: no serial output buffer. It's really painful in a real-time multitask program like Ardupilot: the Serial.print() just holds the tasks and waits for the last character.
I think it can't be to difficult to write an output buffer, and well worth the time. Something similar to the input solution, using the port's interrupt.
Without the buffer better to use the highest possible baud rate, and comment out the not used prints.

Making the "fly-by-wire" mode in-flight selectable could be very comfortable. On the Ardu side no problem detecting 4 pulse lengths instead of the current 3. On the radio side, one switch selects Manual mode vs Auto, and another switch selects which auto mode: fly-by-wire/Waypoint/return-home.
Easy to setup on most radios using a free mix.
I tuned a little bit the heading error constants, the result is pretty good.
Today I did many starts, the plane flew the line of route at least 20 times.
I even switched off the radio - RTL did it's job.

http://www.rcgroups.com/forums/showpost.php?p=13247441&postcoun...

http://www.vimeo.com/6857423

The altitude control is not perfect - the lane slowly climbes above the target altitude. I suspect that it doesn't use the elevator for diving, and the minimum speed is enough for a very slow climb.

Vecses, EasyGlider with Ardupilot and remzibi from mmormota on Vimeo.


Here is is embedded. Great flight! It looks like you were using a 50m radius for your waypoints?

Can you upload your [airframe].h file for the EasyGlider? We're creating a library of them and it looks like you've got your tuned in pretty well.
Here is the .h file. It's a copy of the original easystar.h, just lower heading gains.
All the two aileron servos and the rudder servo are connected parallel.

I use it with the 2.31 version. The altitude control is not perfect, sometimes it slowly climbs much higher then the target altitude.
I tried the 2.4 but the first test was unsuccesful. A possible reason that I inserted the necessary HappyKillmore mods on the field in hurry.

---------

/***********************************/
/*ArduPilot Header file, good luck!*/
/***********************************/

// Airframe settings
//1-1
//1-2
#define REVERSE_X_SENSOR 1 //XY Thermopiles Sensor, 1 = cable behind, 0 = cable in front
//1-3
#define MIXING_MODE 0 //Servo mixing mode 0 = Normal, 1 = V-tail (v tail not tested yet).
//1-4
#define REVERSE_ROLL -1 //To reverse servo roll, PUT -1 to invert it!!!
//1-5
#define REVERSE_PITCH -1 //To reverse servo pitch, PUT -1 to invert it!!!
//1-6
#define RADIO_SWITCH_ACTION 0 // 0: TX Switch centered = waypoint mode & full = RTL mode. 1: TX Switch centered = RTL & full = waypoint mode.
//1-7
#define GPS_PROTOCOL 0 // 0 = NMEA, 1=SIRF, 2=uBlox, Choose protocol
//1-8
#define ATTITUDE_RATE_OUTPUT 250 //the output rate of attitude data in milliseconds. Useful if you want to increase the output rate. [JORDI: PLS EXPLAIN WHAT THIS MEANS. IS THAT ms? WHY IS IT USEFUL TO CHANGE THIS?]
//1-9
#define POSITION_RATE_OUTPUT 4 //This number will be multiplied by ATTITUDE_RATE_OUTPUT, the result is the refresh rate in milliseconds.
//1-10
#define REMEMBER_LAST_WAYPOINT_MODE 0 //If set 1 = will remember the last waypoint even if you restart the autopilot. 0 = Will start from zero everytime you restart the system.
//1-11
#define INTPUT_VOLTAGE 5200.0 //voltage in millis your power regulator is feeding your ArduPilot to have an accurate pressure and battery level readings. (you need a multimeter to measure and set this of course)
//1-12
#define REVERSE_THROTTLE 0 // 0 = Normal mode. 1 = Reverse mode...


// Fly by wire settings
//
//(Note: If you disconnect the GPS you will fly by wire.)
//ALWAYS leave your stick's centered when you ArduPilot is booting up.

//2-1
#define FLY_BY_WIRE_GAIN_ROLL .5 //Decrease the value to increase the response of the sticks. DESIRED_ROLL = //STICK_POSITION*FLY_BY_WIRE_GAIN_ROLL
//2-2
#define FLY_BY_WIRE_GAIN_PITCH .5 //The same as roll.
//2-3
#define FLY_BY_WIRE_SPEED_SETPOINT 20 //The airspeed you want to hold in fly by wire mode.
//2-4
#define GPS_ERROR_SPEED_SETPOINT 3 // In -m/s; , in case of GPS failure the airplane will enter into stabilization mode only and will try to maintain the airspeed set here.
//2-5
#define REV_FLY_BY_WIRE_CH1 -1 //-1 will invert it
//2-6
#define REV_FLY_BY_WIRE_CH2 -1 //-1 will invert it


//Autopilot PID gains.
//(Note: All the PID control loop gains and limits...)
//3-1
#define SERVO_AILE_MAX 2400 //Range of Ailerons
//3-2
#define SERVO_AILE_MIN 600
//3-3
#define SERVO_ELEV_MAX 2400 //Range of Elevator
//3-4
#define SERVO_ELEV_MIN 600

//HEADING GAINS
//4-5
#define head_P .5 //.7 Heading error proportional (same used to move the rudder)... DO not add too much or you will oscillate left and right. (drunk driver effect)
//4-6
#define head_I 0 //.1heading error integrator. Do not add too much or you will overshoot.
//4-7
#define head_D 0 //Derivative not used, but someday....
//4-8
#define head_error_max 35 //35 The maximum output in degrees to control the roll setpoint
//4-9
#define head_error_min -35 //-35 The min output in degrees to control the roll setpoint

//ROLL GAINS
//5-10
#define roll_abs .2 //Set point absolute...(Not Used)
//5-11
#define roll_P .35 //roll PID proportional
//5-12
#define roll_I .35 //roll PID integrator
//5-13
#define roll_min -25 //PID output limit in servo degrees
//5-14
#define roll_max 25 //PID output limit in servo degrees
//5-15
#define roll_Integrator_max 10 //Limit the integrator, to avoid overshoots
//5-16
#define roll_Integrator_min -10

//PITCH GAINS
//3-17
#define pitch_P .65 //Pitch Proportional
//6-18
#define pitch_I .35 //Pitch integrator
//6-19
#define pitch_min -25 //Pitch limits
//6-20
#define pitch_max 25
//6-21
#define pitch_Integrator_max 10 //Pitch integrator limits
//6-22
#define pitch_Integrator_min -10
//6-23
#define PITCH_COMP .30 //<------Very important, Pitch compensation vs. Roll bank angle.

//THROTTLE GAINS
//7-24
#define throttle_max 1180 //Servo range In milliseconds.
//7-25
#define throttle_min 1160 //
//7-26
#define throttle_dead_zone 20 //In percent %
//7-27
#define throttle_absolute 3 //Absolute
//7-28
#define throttle_kp 3 //Proportional
//7-29
#define throttle_ki 1 //Integrator
//7-30
#define throttle_max 85 //Limits
//7-31
#define throttle_Integrator_max 70 //Integrator limit.


//More PID gains for altitude and speed.
//8-1
#define ALTITUDE_ERROR_MAX 2 //
//8-2
#define ALTITUDE_ERROR_MIN -10 //
//8-3
#define ALTITUDE_ERROR_PITCH_PROPORTIONAL 1.5 //Altitude error proportional, pitch setpoint
//8-4
#define ALTITUDE_ERROR_PITCH_MAX 2 //Limits, EasyStar climb by itself, you don't need to up the elevator (you may stall)...
//8-5
#define ALTITUDE_ERROR_PITCH_MIN -14
//8-6
#define AIRSPEED_CENTRAL 22 //Airspeed central point in m/s, normal flight... This value is the lowest airspeed that makes your plane flight steady.
//8-7
#define ALTITUDE_ERROR_AIRSPEED_PROPORTIONAL 2
//8-8
#define ALTITUDE_ERROR_AIRSPEED_MAX 10
//8-9
#define ALTITUDE_ERROR_AIRSPEED_MIN -10


/*****************/
/*Debugging Stuff*/
/*****************/

//9-1
#define FAKE_BEARING 0 //If set to 1, will fake the bearing and will try to always head to the defined DESIRED_FAKE_BEARING
//9-2
#define DESIRED_FAKE_BEARING 45 //Will try to go NorthEast, you can change that to 0 = NORTH, 90 = EAST, 180 = SOUTH, 270 = WEST or whatever!
//9-3
#define FAKE_GPS_LOCK 0 //If is set to 1 will jump the GPS lock process to set home position. FOR TESTING ONLY!
//9-4
#define PRINT_WAYPOINTS 1 //If set to 1, at bootup will print all the waypoints set in the eeprom!
//9-5
#define TEST_THROTTLE 0 // If set 1 will test the throttle increasing the speed slowly.
//9-6
#define WALK_AROUND 1 //Must be "0" to test the GPS and heading against the servo and "1" for normal operation
//9-7
#define CALIBRATE_SERVOS 0// Use to move the servos center, left and right or center right and left. You must adjust using 3-1 and 3-2.
//9-8
#define TEST_SENSORS 0 // Set 1 for enable, overwrite the servos with the raw IR sensors data, to test orientation. This will overwrite everything.
I am using the v2.31, and the plane slowly climbes above the target altitude, and no observable reaction against it.

I enabled the print_remzibi_debug function, because I was curious what happens with pitch_set_point when Ardupilot is above the target altitude.

I found that pitch_set_point was correct, it became more and more negative as the plane slowly climbed above the target, and reached the -14 limit.

So the problem is not the pitch_set_point, the algorithm has the correct input, just the response is not what expected.
Altitude hold/control was rewritten in 2.4. You might want to check that out and see if it solves your problems.
Thank you, I'll check it soon.

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service