Dual-motor tailsitters

Hi David,

i’m developing my tailsitter now.

it has 3.8.4 Arduplane FW
Tailsitter without motor tilt.
good enough PID in Copter Mode.

i’m doing PID tuning using transmitter as Dennis Baldwins do.

what i have to do next is, to tune so the plane will do the transition smoothly.

you can follow my progress here : https://www.youtube.com/channel/UCLzf60G_cHfC-XLJQKss5iQ/playlists?shelf_id=0&sort=dd&view=1

Here you see an example of (what I think) how the scaling code works:

Example hover throttle 70%

image

Depending on the actual throttle level a scaling of the servo output is applied. The scaling is limited to a factor of 5 and 1/5. (so scaling allowed from 20% to 500%)

When you fly at half throttle needed for hover your servo outputs are being doubled. When you have your throttle at zero, outputs being 5x.

Code is the few lines here on the very bottom: https://github.com/ArduPilot/ardupilot/blob/plane3.8/ArduPlane/tailsitter.cpp

This code does simplyfy things:

  • doubling output does not actually doubling effect, effect is less (depends on actual flap positon and servo lever kinematics)
  • it does not distinguish between left and right flaps, but they can have diffrent airflows!
  • its not scaling the PIDs as I first thought, its just scaling the output (donno if this makes a difference at all…)
  • it does not take the actual airflow over the flap into account (just the one from throttle level, but not airspeed)

my two cents…

My understanding of the code is the same, I think this scaling of the is responsible for the low throttle D oscillations a few people are seeing. I have plotted your scaling graph for a range of hover thrust values.
Throttle%20scale

For high power craft with low hover thrust value this causes a very rapid change in scale factor in as the throttle is increased from zero to the hover thrust value. A possible solution would be to scale the maximum scale factor with the hover thrust setting the maximum scale value to 10 * the hover throttle. This results in this graph
Throttle%20scale2

This might mess up existing air-frames, so probably a better solution would be to expose the maximum scale factor as a parameter.

As for tuning the best thing seems to be to in flight tuning. Some sort of jig that allows each axis to be tuning independently works well. I think the main benefit of the tuning rigs is just that it stops you from damaging the air-frame if the tune is incorrect. We tried the Ziegler Nichols method initially, using only the P values resulted in a aircraft that would fly but was quite sluggish, the I and D values calculated using time period from the logs were both too high.

So far I have got good tunes using PID’s only with no feed forward, does anyone have any tips for tuning the feed forward? If we’re flying well is there much benefit to using feed forward?

A little teaser, my FT Arrow TVBS (~600g). Flys well in vertical flight mode hope to try forward flight soon.

Thanks,

Peter

Hi Peter, I opend an issue. Please share your thoughs there also

FF: also interested in tuning this. Anybody an idea??

I’m working on a PR for quad-motor tailsitter support, which involves changes to method QuadPlane::tailsitter_speed_scaling to deal with the need for reducing elevon gains at high airspeeds: https://github.com/ArduPilot/ardupilot/pull/8113
Note that I’ve set the scaling to 1 instead of 5 when throttle is zero.

It assumes that airspeed increases with pitch or roll angle, and linearly ramps down the aileron and elevator controls by a factor of 4 at maximum angle.
That is working pretty well in RF8 at airspeeds up to about 40 mph: https://www.youtube.com/watch?v=dDfmZhdMK2w

The idea of scaling gains with pitch angle is great.
According to my experience, as soon as the wing produce some lift, this is around 40°, control surfaces and motor tilt begin to oscillate. Around 50° these oscillation are not manageable and this is a strong limit to the speed that can be reached when flying Q_hover. The maximum airspeed in Q_hover my wing can reach is around 7m/s and this is not enough to fly safely when there is some wind.
Ideally the scaling factor would be a parameter.

Good idea, I also would like to set this.

Please keep in mind that RF8 is not doing so well of a job here. EG: My tailsitter which has a symmetrical airfoil NACA00XX flies totally fine in RF8. It glides fine and slowly pitches up when gaining some speed. Only problem is that symmetrical airfoils don’t do that in reality. They are unstable.

Same here. I want to try a more loaded wing, because the speed at which the Tailsitter hovers at a fixed angle depends on the weight of the craft.

More weight → more thrust need to hover → more horizontal thrust component. (And also more airflow over the flaps and therefore more control authority, especially when descending)

Actually aiming for a 1 m wing with AUW of 2.5 kg

Hi everyone!

Quick question regarding the max operating temperature of the pixhawk.
In normal flight use (Roughly 10 min) i’m seeing the temperature in my logs reach ~58.1C from a starting temperature of ~30-35. Should this be a concern or is this considered a normal operating temp?

PH1, yes -> get better cooling
PH2, no -> has intentionally heated IMU core

Hello All,

I have a small team who have developed and flown our first tail sitter. Right now, hover, forward flight, and both transitions are great and smooth. The only issue we’re running into is on our descent. When we descend quicker than approximately 2 m/s, the craft tips over and starts to nose dive. We have experimented with larger elevons, but this made our hover and forward flight very uncontrollable. So I believe that keeping the descent rate under the critical threshold is pretty much on the back of our pilot. We have tried to reduce the max allowable vertical speed (Q_VelZ_DN I believe) to 1 m/s, but this has not solved our issue. We have been able to successfully land while in Q_Stabilize, but it has only been a handful of times, so we are looking to make this more consistent. We have recently tried Q_Hover, which has been somewhat promising, but has not solved the issue either. If anyone has any suggestions on what to do, I would greatly appreciate it!

Can you post some pics?
Whats the span and weight?

Here’s a picture, without electronics of course. It has a 1m wingspan and weight 813g fully loaded with a 3s 1800mah battery.
Edit: We went out to fly it again this afternoon. I believe I was correct in saying that it was caused and solved by our pilot. We decided to descend 30 yards away from our launch site, and our pilot brought it down successfully in Q_Stabilize. With a better angle for his line of sight, he kept our descent rate under 2 m/s (confirmed in log).

Have got around to doing some maximum throttle scaling tests, a low value shows a significant improvment in flight at low throttle in my case. The oscillations are caused by the D value in the PID gain so there is quite a sharp change between oscillation and no oscillation. Hope fully this change will allow people to better tune for hover without being restricted by low throttle oscillations.

The only change is reduce the max scale value, this graph shows the difference.

Throttle%20scale3

I hope to add this value as a proper parameter rather than just hard-coding it and submit a PR.

I have done a pull request for the above fix,

2 Likes

I think some are happy. But:

What are the names of the new params?
And what the values recommended or to start with?
How to enable it?

Thanks, Otto

When descending are you descending straight down (i.e. through your prop wash) or are you flying forward/backward whilst descending?

If you are descending straight down, it might be worth trying an angled descent (flying forward or backward whilst descending). If this makes your a/c more stable then it suggests that your aircraft is struggling because of its own messy prop wash. If this is the case you can try using smaller rotor blades with a higher advance. It may help to improve the decent rate by increasing the disc loading and therefore increasing the induced velocity from the rotor. This will come at the cost of reduced hover efficiency though.

I have added two new parameters, which will if left as default have no effect.

The first is Q_TAILSIT_THSCMX this is the maximum throttle scaling value as shown above, the default is 5, this was previously hard coded. In order to tune it i would recommend tuning for hover. This however may result in some oscillation at low throttle due to the d term. The oscillation may be hard to see unless they are bad enough to shake the aircraft while on the ground as you very quickly pass through low throttle on take off. A suspension rig as i use above makes them clearer. Then you just reduce the Q_TAILSIT_THSCMX until the oscillations go away. Because they are D ossialitons there is quite a sharp change, for my aircraft I found 1.5 oscillation but 1.4 does not. I wound recommend staying above 1 or you will change the throttle scaling at hover.

The second parameter is Q_TAILSIT_TH_SC, if left at the default value of zero this has no effect. If it is changed it will over ride the hover throttle parameter used for throttle scaling.

the curve goes from (hover_throttle / throttle) to (Q_TAILSIT_TH_SC/ throttle).

This allows you to isolate the throttle scaling from the hover throttle parameter use for Q_hover and Q_lotter. For example if you enable hover learning currently this will change the curve, this is useful to compensate for voltage drop of battery, but if you drop a payload for example it will cause a change in response. So in order to override the Q_M_THST_HOVER value set the Q_TAILSIT_TH_SC to the same value. you can then tune up Q_M_THST_HOVER or enable auto learning.

Alternatively you can try changing the throttle curve directly for example you may want a stepper curve for more response at high throttle. This will however cause the hover point to no longer be at 1 you will there for need to scale back the PID’s for pitch and yaw accordingly. They should scale in accordance with the new hover point. ie if your new hover throttle point results in a scale of 0.5 instead of 1 you should be able to double you PID’s and get the same performance at hover (I have not tested this)

If it would be useful I can post a matlab script to visualize the effect of the parameters on a graph as i have done above.

2 Likes

Thanks for the precise description.
Otto

Thanks for this!

Is there any way we can testfly this right now? Is there a daily built that we can flash, or do wee need to wait till its merged to master? (I dont know how this all works…)

you can compile it from my fork:

otherwise i think you will have to wait for it to be merged for it to be in the daily’s