We need more channels to flying modes in planes as it is in copter, I have switches in my radio and can rescue an expensive flying wing when dive, much easier to react during an emergency than rotary switch, Im try to add to github.
I agree. It is a very nice copter feature that should easily port to plane.
did you perform AUTOTUNE, not Q_AUTOTUNE ( http://ardupilot.org/plane/docs/automatic-tuning-with-autotune.html#automatic-tuning-with-autotune ) ?
Q_Autotune only tunes the parameters for the Q modes. For plane modes like FBWA, Autotune is the corresponding mode.
For security reasons you could also activate Q_ASSIST_ALT (Plane 4.01).
I was planning on Autotune in my next flight, but hadn’t gotten to it. Wanted to get the vertical modes correct first.
I flew today for a bit. Before flying, I tweaked a few of the PID values for pitch and modified the mixing gain value. I was going to autotune forward flight today, but I neglected to hit save in Mission Planner when I changed the mode. So, that will take another flight.
I will consider setting Q_ASSIST_ALT. It would have helped in this incident.
I performed a forward flight Autotune this morning. Ended up with
PTCH2SRV_D = .197955
PITCH2SRV_I = .125
PITCH2SRV_P = 2.639
RLL2SRV_D = .09439
RLL2SRV_I = .125
RLL2SRV_P = 1.2586
FYI, my plane is about 2 KG. My CG is about 55mm front the front edge of the wing.
These values seem to work much better than those I had previously. Roll used to be close enough to work, but pitch was quite different (old values were D of .04, I of .3, and P of 1).
However, I notice that the plane doesn’t seem able to hold pitch during sharp turns. Even with full up elevator, it loses altitude.
I’ve also determined that my Q_Autotune values for yaw are not good. There was very light wind today and the plane would yaw around. Attempts to stop this with stick input resulted in faster circling. Only when the plane was pitched or banked did the yaw settle down.
Thanks for share your values. Check if your arms are enought stiff, thats a common yau issue in vtols.
A bad day today. There was a wind of about 10-12 MPH.
I was attempting to resolve the yaw issue mentioned above. Plane lifted off facing the wind in QHover (aimed at about 200 degrees). It was doing fine for 30 to 40 seconds. Then, it started to yaw at an extreme rate. The heading changed thru a full 360 degrees about 6 times, each revolution of the plane taking about 2 seconds.
Since the wind was fairly strong and I couldn’t control the angle of the aircraft, the plane blew downfield. I then attempted to switch into forward flight w/o success. The plane was coming down and landed fairly hard. Damage seems limited to one of the quad motor mounts and the prop on that motor.
Here’s the graph of ATT Des Yaw vs ATT Yaw. The blue line is the barometric altitude.
I don’t understand why Des Yaw is doing the circle. I was very definitely not using extreme rudder input.
It’s usually a series of unfortunate events that cause a crash. There are times when I have wanted a Mulligan on some of my mistakes but I try to learn from each one.
First, and foremost, you need to have a mindset that QSTABILIZE or QHOVER is your emergency go-to flight mode. You have the following flight modes set up.
I would recommend that you do not use MANUAL for a VTOL and place a Q-mode at either or both ends of the S3 knob. Something like this below so that you are ready to turn the knob all the way in a panic situation. AUTOTUNE can change to CRUISE or LOITER later on. For windy days, using QLOITER will keep it hovering in place.
My Q_A_RAT_YAW_P is set to 0.4 and yours is set to 1.6. I am not sure why they are so different but perhaps yours has an oscillation so try a lower value like 0.8.
Your Q_WVANE_GAIN is set to 0 which means that you must manually keep the vehicle pointed towards the wind. If the wind comes from any other direction, bad things happen. From the Wiki:
A value of 0.1 is to start with and will give a slow turn into the wind. Use a value of 0.4 for more rapid response.
I can’t remember what your VTOL looks like or if you had completed your hover testing so good luck on your repairs and next flight!
Thanks for the input Greg!
A few comments:
My flight modes are on a combination of the rotary switch AND a 3 position switch.
The only way manual can be reached is with the three-way switch in the fully down position. Manual is the only selection that guarantees that the motors stop immediately (and throttle is forced to zero as well).
FBWA and Autotune can only be reached with the three-way switch in the middle position. This selects my “forward” options.
The Q_modes are only available on the top position of the three-way switch. This selects my Q_options.
I successfully performed Q_Autotune on the yaw axis and got the P value you see. I did manually reduce the Q-Autotune I value from .16 to .08. The major goal of this flight was to see if this change helped reduce the circling (which it clearly did NOT).
I will look at adjusting Q_WVANE_GAIN for my next flight. I’d never changed it before. But the description indicates it doesn’t operate in QHover, so that doesn’t explain the sudden yaw circling.
What’s funny is that the yaw control looks good early in the flight when I test it briefly. Note the RC yaw input at ~15:25 and the resultant Des Yaw and Yaw. It looks perfect to me:
But at ~ 15:40, w/o any RC input, the ATT yaw (green line) abruptly changes PRIOR to ATT Des Yaw changing?
A blow up of the divergence shows that it appears to be “commanded” (as evidenced by RCOU.C2 and C4, the V-Tail outputs changing before or in sync with the actual yaw) by the flight controller despite the absence of Des yaw input.
You’re right, weathervaning is only active in QLOITER, QLAND and QRTL modes…so the need to control yaw manually is there in QSTABILIZE and QHOVER modes.
I have never used the AUTOTUNE features and have only needed a slight tweak on the P values. Many QuadPlanes work great on default Q-PIDs. Tweaking a tricopter like the Nimbus VTOL takes more time on the yaw control.
I suspect that your RCOU.C2 and RCOU.C4 is merely the tail trying to fix the spinning issue from the quad motors. In other words, it is effect, not cause.
Something caused your two CCW motors to peg out…again either causing the spin or fighting the spin. I still suspect the Q_A_RAT_YAW values. You are using a newer firmware build.
I’m a bit hard-headed, but you’ve helped me see the light.
I was definitely looking at the wrong data with the V-Tail servo outputs. DOH! And now that you’ve suggested looking at the 4 quad motors, I can see something very wrong.
The moment of yaw control “failure” occurs when the motor on channel 6 flat lines with full power on (PPM=1949). Simultaneously, the motor on channel 5 flat lines at the bottom (PPM=1150). The other two channels continue to adjust and appear normal. The channel 5 value only stays pegged in the “off” state (1150 for about 1.5 seconds, but the channel 6 value stays at 1949 about 12 seconds.
If motor 6 had more headroom, I’m pretty sure the problem would not have occurred. But, then the question becomes, why does this motor need to provide so much more thrust than the others? In a high wind environment, they don’t have enough authority to resist when the wind catches them.
I’m going to guess that this is because my motors are not properly aligned. When I installed them, I eyeballed what appeared to be straight up. But, as I look now, it’s pretty clear that I failed to achieve straight up. And there’s a bit of slop in the front carbon tube that allows it to rotate a couple of degrees. I believe that I need to correct and augment the mounting setup so that the motors start and stay “straight up”. And that this should help level the amount of power required by each motor.
Can you post an image of your setup? What size quad props are you using?
I didn’t realize that you were using H-frame instead of X-frame so it’s the same two motors but they are spinning CW instead of CCW. It shouldn’t matter.
On my X-frame setup below, the two CW motors (blue and yellow) increase RPMs and the two CCW motors (red and green) decrease RPM to make it turn one way (around the 32 second mark) and the opposite around the 40 second mark. It’s a piloting habit I have gotten into to verify that I have yaw control.
I can’t remember why the two front motors are working slightly harder than the two back motors. It could be balance or wind.
There’s a picture of my plane in this thread, posted on Oct 17, 2019.
You indicated that you think I’m running a Q_FRAME_TYPE of H?
I set it up for X and just checked my params…which show a “1” which is X.
I also just found this statement in the Ardupilot "Building a QuadPlane Guide:
Due to their greater mass and surface area, most QuadPlanes do not have as robust YAW authority as compared to small quadcopters. It is extremely important that the motors be very well aligned, as just a few degress offset can sometimes effectively eliminate the ability to yaw in one or both directions. In fact, this effect can be used to actually increase yaw authority by purposely tilting one or both pairs of adjacent rotating motors in the natural direction of their torque 1 or 2 degrees (inward for H frame, outward for X and + frames).
I could redesign and reprint the motor mounts to provide a degree or two of outward tilt.
Sorry, I got my 1 and 3 setting reversed. I am running H-frame and you are running X-frame.
Thanks for the pic link. It looks like your booms are shorter than mine, which could affect yaw authority. I can’t tell if you have the 5 degree forward offset for better transitions to forward flight.
Haven’t you hover tested this before? Was this the first time it started spinning?
It would be interesting to re-test and verify that your yaw works properly. You could hover low, say 5 meters, in QLOITER mode (so it won’t drift) and move the yaw back and forth with the sticks. It would also be a good time to test the Q_WVANE_GAIN setting from 0.1 to 0.4. If it’s windy, keep it mostly pointed into the wind.
I made the booms fairly short to minimize wind resistance in forward flight. I knew that would reduce roll authority, but didn’t realize it would impact yaw.
I’ve done a fair amount of hover testing previously. The plane has started circling before, but in the absence of significant wind, I would just wait it out and eventually the circling would stop. Pitching forward also seemed to help.
I’m going to investigate changes in motor mounting to make sure I get them vertical. UPDATE-I just measured and my rear motor tube has a 2 degree angle. This makes the channel 8 motor tilted out 2 degrees (which should be OK), but makes the channel 6 motor tilted inwards 2 degrees (which is probably bad).
I may then tilt the motors out a degree or two (since that supposedly improves yaw authority). UPDATE: I think I’ll start by printing a new motor mount for the channel 6 motor with a 4 degree angle so that it tilts out 2 degrees rather than tilting in 2 degrees.
I’m also going to look at the motor calibrations and limits to make sure I’m using the entire range of motor throttle.
There’s a parameter called “Q_M_YAW_HEADROOM”. It defaults to 200 PPM with a range of 0 to 500 PPM. The definition says “Yaw control is given at least this PWM in microseconds range”. I may try increasing this value a small amount. There’s an interesting thread on this topic at https://discuss.ardupilot.org/t/yaw-on-large-aircraft-steals-lift/27180 where they again focus on getting the mounts vertical and on having sufficient power.
Back in the air today for some quick testing. While having low wind (3-4 MPH) is generally a good thing, it didn’t blow hard enough to allow a complete test. However, small steps can be beneficial.
I made several changes.
I tilted the left rear motor out 4 degrees to cancel out the 2 degree tilt in the motor boom and to leave the motor tiled out a net 2 degrees.
I adjusted Q_WVANE_GAIN from 0 to .2
I adjusted Q_M_SPIN_MAX from .95 to .98. My ESCs have 1960 as their max value.
I adjusted Q_M_SPIN_MIN from .15 to .10. My ESCs have 1040 as their lower value.
I adjusted Q_M_YAW_HEADROOM from 200 PPM to 220 PPM.
However, I believe that only the first (and possibly the last change) was significant in today’s test. All of the quad motors stayed far away from their limits during flight. In particular, the left rear motor on channel 6 significantly reduced it’s relative output compared to the other motors:
Now the two rear motors are significantly below the front motors in output at almost all times. This seems like it may be reasonable due to CG and quad boom placement.
Now the big question. Did this work to fix the yaw authority problem? My answer is that it seemed to help, but more needs to be done. I felt that I was controlling yaw well most of the time…but at least once or twice the plane started to turn due to wind. It never went a full 360 while doing this, but the wind was very light.
I suspect the trick in reading ATT Des Yaw (red) vs ATT Yaw (green) is that the Desired Yaw should lead the Yaw…not vice versa. Roll and Pitch lines are at the bottom (brown and blue)
I believe I probably need to re-run the yaw autotune since I’ changed the motor mount. And perhaps I should angle out the front motors a couple of degrees each.
I agree. Looks good.
OK…I’ve got a new concern. This one is less specific to the Mini Talon as a quadplane and more just about the Mini Talon.
A few weeks back I was showing off the quadplane. I quickly ascended as a quad, went into forward flight. Motor power was almost constant and fairly high (14-16 Amps at 6S…so about 360 watts). Speed was almost constant and fairly high at ~24 m/s (about 50 MPH).
As a turn was started, I was at 30 meters altitude and climbing at a good rate. Halfway thru the turn, I was at 45 meters. By the end of the turn, I was at 20 meters and very close to a tree.
During the 1st half of the turn, desired pitch and actual pitch were about the same. Mostly up at about 8-10%. Just before apogee, the actual pitch falls toward zero and desired pitch increases…briefly at 25%, then 16% falling to ~11% after a couple of seconds. This coincides with input from me on the rudder (edited this to rudder on 1/15-it used to say elevator). Actual pitch bounced around a bit, but averaged around zero until going substantially negative at the last two seconds of the turn (-9.4 degrees at peak). And the plane was losing substantial altitude.
With some input from a friend, I figured out why this happened. The V-Tail is angled at about 45 degrees. This means that when the plane rolls into a turn at 45 degrees, one V-tail surface is perfectly horizontal and one is perfectly vertical. Effectively, one vtail looks like a horizontal stabilizer with an elevator and the other looks like a vertical stabilizer with a rudder.
So…if I power up the servos on my plane, in manual mode and hold it in my hands:
With the plane commanded to do a max roll and max pitch up, one vtail banks to horizontal and provides a single surface (of the two vtails) effectively providing full upward elevator deflection. The other vtail looks like a rudder and it is properly deflecting to assist the turn (kicking the aft end out so that the nose points inside the turn).
For example, with a turn to left (port) the TX stick is moved to bottom and to left. The ailerons command the roll. The port vtail becomes horizontal and the control surface is an elevator asking for max upward pitch. The right vtail becomes vertical and pushes the aft end of the plane way from the direction of the turn (thus pushing the plane to yaw into the turn). All good so far.
When full left rudder is added, the horizontal vtail (port) goes to neutral (no longer calling for any pitch up). The vertical vtail (starboard) doesn’t move from its already deflected position.
Thus, the rudder stick, instead of commanding more yaw becomes an anti-elevator control (when the plane is banked 45 degrees and is commanded to have full pitch up). It does nothing for yaw.
In FBWA mode the behavior is the same.
So, I can see why my attempt to tighten the turn by adding rudder failed (I’d use the term “spectacularly” except that it barely avoided a crash). Adding rudder fully cancels any elevator up pitch and lets the plane head towards the ground.
Is this just an indication that the Vtail for a Mini Talon is just too small (or the control surface on the Vtail) for it to turn well?
I would post your question here on the RC Groups thread for the MT. The FPV guys fly them like they stole them but I keep things more level in FBWA or CRUISE modes.