Recent Posts

Pages: [1] 2 3 ... 10
1
Vehicles - Fixed Wing / Re: AutoCruise Mode for a FixedWing
« Last post by jdl on June 25, 2019, 11:34:02 am »
Hmm, I sometimes amuse myself how stupid things I can say/write before I think (or at least read more carefully, in this case). I've read the once again your posts and the LP code and understood the way AirspeedToPowerCrossFeed.Kp works.

Cliff, you are absolutely right, of course!

Anyway, out of curiosity, I've tested how much I can raise it before oscillations occur. At AirspeedToPowerCrossFeed.Kp = 1 or 0.8 there are already perceptable oscillations.

I think I've got the ideas you shared but I cannot write the necessary code now. No time to write and further test, maybe no enough knowledge...

A quick and dirty workaround (with the current fixedwingflycontroller code) for avoiding stall condition due to low airspeed I've added is to raise AirspeedToPowerCrossFeed.Kp to 2 if airspeed drops below systemSettings.AirSpeedMin * Safetymargins.Stallspeed and keep it until airspeed raises over HorizontalVelMin * Safetymargins.Lowspeed. With properly set limits for the particular wing
( for Z-84 I set:
systemSettings.AirSpeedMin * Safetymargins.Stallspeed = 30km/h
HorizontalVelMin * Safetymargins.Lowspeed = 35km/h
HorizontalVelMin = 44km/h
HorizontalVelMax = 48km/h
)
this causes instant throttle burst to (or almost to) ThrustLimit.Max if airspeed drops below 30km/h and keeps throttle high until 35km/h are reached. This happens quite rapidly and I cannot really notice thrust oscillations during the throttle burst.

I've made a test flight with higher speed limits just to prove code is working. I'm aware the speed thresholds set higher gave lower effect on speedErrorToPowerCommandComponent from AirspeedToPowerCrossFeed.Kp due to lower airspeedError. That's why I'd like to further test how the extra code behaves with really low airspeed and large airspeedError.

I'll report back results here, hopefully with DVR and telemetry records.

Code: [Select]
// Private constants
uint8_t StallSpeed_Avoidance = 0;
...
...
if (indicatedAirspeedState < systemSettings.AirSpeedMin * fixedWingSettings->Safetymargins.Stallspeed) {
            fixedWingPathFollowerStatus.Errors.Stallspeed = 1;
StallSpeed_Avoidance = 1;
            result = 0;
        }
if (indicatedAirspeedState > fixedWingSettings->HorizontalVelMin * fixedWingSettings->Safetymargins.Lowspeed) {
StallSpeed_Avoidance = 0;
}
...
...
    float speedErrorToPowerCommandComponent = 0.0f;
    if (hasAirspeed) {
        speedErrorToPowerCommandComponent = boundf(
            (airspeedError / fixedWingSettings->HorizontalVelMin) *
((fixedWingSettings->AirspeedToPowerCrossFeed.Kp * (1 - StallSpeed_Avoidance)) + (2.0f * StallSpeed_Avoidance)),
            -fixedWingSettings->AirspeedToPowerCrossFeed.Max,
            fixedWingSettings->AirspeedToPowerCrossFeed.Max
            );
    }
...
...
2
Vehicles - MultiRotors / Re: Hoppin' drone
« Last post by Penthane on June 25, 2019, 12:38:49 am »
Airborne the drone is fine. It was only takeoff that gave me problems. Seems I didn't know how to fly  :o  I'll try better  ;D
3
Vehicles - MultiRotors / Re: Hoppin' drone
« Last post by TheOtherCliff on June 24, 2019, 10:54:10 pm »
If the main problem is that it is hard to get off the ground then I recommend these from:
Fix Instant Flip and Learn to Fly
https://forum.librepilot.org/index.php?topic=4408.msg29978#msg29978

- Stabilization->ZeroTheIntegral must be enabled.
- Do not "help it stay level" during takeoff.  Use just the throttle to "jump" up to knee high.  Do not move any other stick.
- Do not take off from the side of a slope.
- Take off quickly, as soon as you start the motors.  Do not slowly increase motor speed.  Jump up to knee high.

There good are reasons for each of these.  They are mainly related to "I term windup" is worse if you disobey them.
4
You actually bought a Chinese CC3D to experiment?

;D  I bought the Atom as a cheap controller to experiment with a small fast plane and I thought I would try to recreate the issue.
5
Vehicles - MultiRotors / Hoppin' drone
« Last post by Penthane on June 24, 2019, 02:02:15 pm »
I'm mostly a fixed wing builder, but I have a quad too (450 frame, 2216 1250kv, 40A BLHeli LittleBee ESC, 1046 prop, Revolution FC, Ublox GPS/Mag, 10ch RX, 2-4x 2200 3s).
The problem I have is that when setting up, the motors spin up very easy at a low rpm.
But then, when I actually try to fly it,  any initial throttle makes it jump, rock and wobble. Motors spin in the right direction. Props are right side up.
Some times it suddenly works as it should (imho). Motors run evenly and spin up to lowest rpm and stay like that untill I throttle up. Most times however, one or two motors seem to lead their own life and run (much) faster at initial startup or they spontaneously stop running. It's not the same motors all the time, so I ruled out ESC's and motors.
I'll try higher startup revs, but in the meantime ... any suggestions are welcome.

Running LP 16.09 Next

P.S.: Mode 1= Stabilized no GPS Cruise, but I fly with GPS and Vario. Makes no difference in hopping at start up.
Aux Mag only <5% Orientation is correct (000-180-000). Cables are twisted. GPS is on a 35cm pole and at least 25cm (10") from any power source but it's own and >30cm (12") from the motors, ESC's, etc.
In flight it is stable. Pos. Hold works. RTB works. It's just a bitch to get it off the ground.
6
Bathroom finished   :D

I'll try the LP Erase again next time. Did the CF/BF trick again a few days ago. Controller came from a crashed plane, so I had to set it up for it's next 'home' ( http://www.aero-news.net/images/content/general/2013/Velocity-V-Twin-0413a.jpg ) and it didn't save again. I'm not a very patient person anymore, so could be that I don't wait long enough.

You actually bought a Chinese CC3D to experiment?  8)  KUDOS for your effort!
7
Vehicles - MultiRotors / Re: Pirouett compensation
« Last post by TheOtherCliff on June 21, 2019, 07:06:13 pm »
The trim I was talking about was the automatic trim inside the electronic stabilization device.  It is also called "I term wind-up".  The user just sees a correctly flying aircraft if it is working well.  He doesn't actually see for instance an aircraft pitching up or rolling right because this I term wind-up compensates for it.

An unbalanced any-copter with piro comp on gives you wobbly pirouettes at any speed.  Also, when you stop the pirouette it will have moved the "I term wind-up" to the wrong place and so it will drift.

Here is a quad with an imbalance (weight, weak motor, or unmatched props) and piro comp on (new pilot).  It drifts badly after the yaw:


Same quad with piro comp off does not drift:


An unbalanced any-copter with piro comp off gives you good straight flight at any speed, but can show noticeable trim changes with any of several big stick changes (generally mild stunts or more).

If your HELIcopter is balanced correctly but does not have pirouette compensation then when you do pirouettes while flying fast you will see roll and pitch movement.  If it DOES have piro comp, then you will not see roll or pitch movement.  For well balanced HELIcopters, piro comp can be left on all the time, but even for helis I would recommend leaving it off.  Let a pro that doesn't need advice and knows his heli is balanced turn it on because he wants to do stunts.  Don't force a beginner to troubleshoot strange flight behavior caused by imbalance + piro comp that goes away as far as he is concerned by just turning piro comp off.

Others may disagree, but I would say that for multicopters, it should be left turned off until you find a case where it can help and that case could only be very high forward speed with fast pirouettes, but be aware that case acts differently on multicopters and isn't well corrected by using a helicopter feature (piro comp).  There are several things that it will make worse and really only one that it makes better.  Generally getting your PIDs tuned correctly and your multicopter balanced (both weight and power, no weak motors or different props) will have your multicopter flying well.  Every case I have seen of multicopter pitch "blow out" at high speed has been fixed by using higher PIDs.

Piro comp works on a helicopter because (relative to the constant forward travel) the heli always sees the same trim change.  The advancing blade always generates more lift which I assume gets translated by gyroscopic precession into pitch up.  It doesn't matter where the heli body is.  But (also relative to the constant forward travel) in a single 360 pirouette at high speed, a multicopter goes from needing left roll trim to needing right roll trim twice, and it probably always needs some forward pitch (because the front motors have cleaner air).  This happens because in an X configuration you get no roll torque (the left-right motors are counter-rotating) but in a + configuration with CCW side motors you get (simplification) a left roll torque and a little later (after going through an X configuration where there is no roll torque) when your side motors are CW, you get a right roll torque.  The heli piro comp feature will handle the constant forward pitch, but not the changing left-right roll.

Forgive me, but what I saw in your video was a quad acting pretty much like it should, with a new pilot that was maybe expecting something else, like the nose to stay down when you rotate on yaw.  ;)  Although it may be possible to make that happen by abusing a new feature (maybe not even available on CC3D), I wouldn't learn that way.
8
Vehicles - MultiRotors / Re: Pirouett compensation
« Last post by vgwit on June 21, 2019, 08:34:45 am »
Thank you Cliff,
it is a lot clearer now. The only thing

"An X quad does not see left-right trim changes in fast forward flight ..., but it does see fore-aft trim"

I guess it should see fore-aft trim during forward flight in rate mode only if unbalanced?
9
Vehicles - MultiRotors / Re: Pirouett compensation
« Last post by TheOtherCliff on June 20, 2019, 09:24:08 pm »
When you are in Acro mode (called Rate mode here at LP, LP Acro+ is also a rate mode) with the nose tilted down and you yaw 180 degrees, the nose will be tilted up looking out the back and you will be flying backwards.  This is normal and correct whether you are using piro comp or not and whether flying a heli or a quad.

Three paragraphs to explain what piro comp is.  Then why piro comp is not suited to multicopters:

When flying forward at HIGH speed, a stabilized (that is stabilized in 3D, not just yaw) helicopter (one main blade) with a clockwise spinning blade will have to trim itself with a lot of left roll to compensate for the left side main blade flying into the wind (and generating more lift) and the right side flying downwind (and generating less lift).  The stabilization electronics does this by adding more and more "trim" over time until it is stays level (does not roll or pitch).

Starting flying forward at high speed, now what happens if you do a 180 pirouette and are immediately flying backwards at high speed?  All that built up left roll trim is the exact opposite of what you need, but it takes time for it to trim more and more right roll to finally get back past neutral to enough right trim.

Pirouette compensation simply put, instantly moves the current amount of stabilizer induced trim from left roll trim to right roll trim as it yaws.  If you only yaw 90 degrees to the right, it will actually move this trim to be pitch up instead of roll left.  And any partial rotation moves it partially as needed.  It's just a little trig.

So that is all piro comp is.  Moving this stabilizer induced trim that comes from trimming fast forward flight ... around to where ever it should be just by watching how much yaw is happening.

Note that piro comp is often a BAD thing.  Imagine if your 'copter (of any kind) is not balanced perfectly at the center of lift.  Say you sometimes fly with a camera in front and that makes it nose heavy.  The electronic stabilization pitches backward to compensate.  Now you yaw 180 degrees and the piro comp moves that trim from backward pitch to forward pitch, but the that is exactly wrong.  Piro comp must be turned off to make normal flight (not doing a lot of fast flight with pirouettes) of an out of balance 'copter work as expected without a lot of wobbling around.  This out of balance condition also happens if one or more motors of your multicopter is stronger or weaker than the others.  If doing stationary pirouettes is not flat and looks wobbly, try turning piro comp off.

An X quad does not see left-right trim changes in fast forward flight (because the left and right motors counterrotate and lift/torque effects from high speed are the same on both left-front and right-front), but it does see fore-aft trim.  A + quad (or an X flying at 45 degrees forward) can see left-right trim changes in fast forward flight.  For a quad (any multicopter) you can see that trim changes vary (differently than a helicopter) during the pirouette.  They are not constant like they are for a helicopter (one main blade) where the trim is always e.g. left roll when referenced to the direction of travel.  Thus this heli feature is just not well suited to multicopters.  Piro comp can help a quad to hold fore-aft pitch trim better during fast forward flight pirouettes, but will actually hurt left-right roll trim a bit.

Also, there are some flight setups where piro comp is disabled automatically.  I am guessing that self leveling flight modes like Attitude disable this automatically.

Attitude mode pirouettes at high speed require a circular motion on the roll-pitch stick to keep the bank angle facing into the wind as you yaw around.  In forward flight you are holding forward pitch.  For a left yaw pirouette while flying forward, move the roll-pitch stick clockwise (starting from the forward position of normal forward flight), making a circular motion that started with you holding forward pitch, but has you holding right roll when the quad is pointed left, back pitch when it is flying backwards, left roll when the quad is pointed right. and return to forward pitch when the quad is pointed forward.  Roll that stick around in a circle, in sync with the quad position and you can do continuous forward flight pirouettes.  Rotate the stick a LITTLE too slowly and your forward flight turns one way.  Rotate it a little too fast and your forward flight turns the other way. Use this technique to fly around the field while doing continuous pirouettes.
10
Vehicles - MultiRotors / Pirouett compensation
« Last post by vgwit on June 20, 2019, 06:08:00 pm »
Hello guys,

I've tried to assess PiroComp effect but couldn't.
I was flying forward in acro mode and then did a 180 degree yaw. I expected PiroComp will pull quad's nose down or any other action. But could not feel any difference. Quad kept moving the same direction until I did a pitch forward. Here is the footage:

https://drive.google.com/open?id=14hdEhQ_bGZfKULqKq3PYQfew0ESkq5qQ

Have read its description in wiki but still not clear for me.
Thanks
Pages: [1] 2 3 ... 10