LibrePilot Forum

Users => Vehicles - MultiRotors => Topic started by: emperorsgroove on August 01, 2017, 09:43:19 pm

Title: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 01, 2017, 09:43:19 pm
Excuse my ignorance on this subject as I just started in the quadcopter hobby.

I enabled AlwaysStablizeWhenArmed so I can perform flips and have authority over the motors at 0% throttle. However, I notice that when I enable this mode via the accessory I assigned, the motors spin at 0% throttle (I guess this is called "idle").

What I expected was for the motors to NOT spin (even with AlwaysStablizeWhenArmed enabled) until I input stick movement (roll/pitch/yaw) without throttle.

Can someone please help me understand why the motors must spin/idle when the throttle is at 0% in order to provide control over the motors?

Is this also how Air Mode works on CleanFlight (motors spinning even at 0% throttle)?
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: mr_w on August 01, 2017, 09:58:20 pm
Imagine you are up in the air, make throttle 0 and use just roll/pitch/yaw to make the quad upside down, or some other funny angle while free-falling. That is what you do with aswa (always-stabilize-when-armed, or air mode, same thing different name).

If the motors are not spinning, your quad would need to use some other magic force (??) to follow your roll/pitch/yaw commands. right? Throttle is 0.

Another thing is that changing motor speed from idle speed to some other is way much easier for motor to do, than to change from 0 to anything else. So it is spinning to make speed changes (follow your stick input) possible.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 01, 2017, 10:07:54 pm
I understand that the quad needs to use the motors to follow my roll/pitch/yaw commands. I think your last point is what I'm referring to- that it's easier for the motors to respond to input while spinning rather than respond while sitting still.

I also read (in reference to Air Mode on CleanFlight) that the motors are idling because they keep the PID loop active. That makes sense, too, if it is what's happening in AlwaysStabilizeWhenArmed.

So, is it common practice for freestyle pilots to have a switch on their transmitter configured to enable/disable AlwaysStabilizeWhenArmed/Air Mode? I guess it's just not what I expected.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: f5soh on August 01, 2017, 10:19:44 pm
You can reuse the the flightmode switch for ASWA, this mean you can configure FM1 as normal for takeoff and landing, FM2 and FM3 with ASWA.

https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/39551030/Always+Stabilized+When+Armed+mode+setup#AlwaysStabilizedWhenArmedmodesetup-UsingFlightModeswitch

Indeed "PID loop active" mean the vehicle is stabilized, same as AlwaysStabilizedWhileArmed
Another reason the motors are spinning is safety : just think one second taking your quad by hand while ASWA is active and motors not spinning...

Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 01, 2017, 10:23:30 pm
You can reuse the the flightmode switch for ASWA, this mean you can configure FM1 as normal for takeoff and landing, FM2 and FM3 with ASWA.

https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/39551030/Always+Stabilized+When+Armed+mode+setup#AlwaysStabilizedWhenArmedmodesetup-UsingFlightModeswitch

Indeed "PID loop active" mean the vehicle is stabilized, same as AlwaysStabilizedWhileArmed
Another reason the motors are spinning is safety : just think one second taking your quad by hand while ASWA is active and motors not spinning...

I tried setting up my Flight Mode switch to also control ASWA before I used a dedicated ASWA switch using those instructions, but I couldn't get it to work properly. All flight modes ended up having ASWA enabled. I'll retry again. Maybe I missed something.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: mr_w on August 01, 2017, 10:49:00 pm
I have all my quads configured to use 3 way arming switch - disarmed-armed-armedwithaswa, but in reality I tend to just arm directly to aswa mode and fly like that, complete with landing. In theory, you could be in trouble if you do a messy landing, touching the ground at odd angle and having the quad try to maintain attitude (or counter the unexpected rotation if in rate mode), but in practice I haven't had as many trouble as I expected.

So to say, while it is nice to have it on 3 way switch, I haven't really used non-aswa mode ever since I discovered it :)

Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 01, 2017, 10:53:22 pm
I have all my quads configured to use 3 way arming switch - disarmed-armed-armedwithaswa, but in reality I tend to just arm directly to aswa mode and fly like that, complete with landing. In theory, you could be in trouble if you do a messy landing, touching the ground at odd angle and having the quad try to maintain attitude (or counter the unexpected rotation if in rate mode), but in practice I haven't had as many trouble as I expected.

So to say, while it is nice to have it on 3 way switch, I haven't really used non-aswa mode ever since I discovered it :)

That sounds pretty clean! Can you share how you configured a switch to work that way?
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: mr_w on August 01, 2017, 11:27:38 pm
First thing is you need to have 3way switch configured correctly in your TX so it sends 3 different values on a channel.
Then you need to set that channel to control your normal arming accessory (for example accessory 0) but adjust the neutral to 30% so that middle position gives just enough value to arm (value that is greater than neutral accessory 0).
After that, you configure another accessory (for example accessory 3) using *same* tx channel, but make neutral at 70% so that 3rd position make it over neutral, and select that accessory for ASWA.

See attached picture, note that acc0 and acc3 are using same sbus channel 5, which I have configured on my tx to send 3 different values from 3way switch. Also note their neutral values (acc0 and acc3).


Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 02:16:34 am
First thing is you need to have 3way switch configured correctly in your TX so it sends 3 different values on a channel.
Then you need to set that channel to control your normal arming accessory (for example accessory 0) but adjust the neutral to 30% so that middle position gives just enough value to arm (value that is greater than neutral accessory 0).
After that, you configure another accessory (for example accessory 3) using *same* tx channel, but make neutral at 70% so that 3rd position make it over neutral, and select that accessory for ASWA.

See attached picture, note that acc0 and acc3 are using same sbus channel 5, which I have configured on my tx to send 3 different values from 3way switch. Also note their neutral values (acc0 and acc3).

Thanks! I'll give it a try and see how it goes.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: TheOtherCliff on August 02, 2017, 03:01:25 am
If your main concern is to control motors when inverted then CruiseControl is an option.

The default settings for CruiseControl is to reduce the motors to 5% (but still allow full power for control and stabilization) when inverted.  You simply don't bother to reduce the throttle stick when inverted because it does it for you.  Another good thing is that if you DO reduce the throttle stick to zero, the motors stop, so you have that safety feature.

The other thing CC does by default is bank angle compensation.  It increases thrust by the amount required to maintain altitude for the current bank angle.  Normally when you bank, you have to increase thrust to avoid loosing altitude.  CC handles that for you.

CC is completely configurable so that if you don't like one of these features you can turn it off or adjust it.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 10:19:42 am
If your main concern is to control motors when inverted then CruiseControl is an option.

The default settings for CruiseControl is to reduce the motors to 5% (but still allow full power for control and stabilization) when inverted.  You simply don't bother to reduce the throttle stick when inverted because it does it for you.  Another good thing is that if you DO reduce the throttle stick to zero, the motors stop, so you have that safety feature.

The other thing CC does by default is bank angle compensation.  It increases thrust by the amount required to maintain altitude for the current bank angle.  Normally when you bank, you have to increase thrust to avoid loosing altitude.  CC handles that for you.

CC is completely configurable so that if you don't like one of these features you can turn it off or adjust it.

Good to know, thanks! I'd still like to get ASWA working though. I think it will provide the level of control for quick flips I'm looking for.

I tried enabling it using both the ASWA enable/ disable switch and the flight mode switch methods, but whenever I switch to disable, the motors keep spinning at idle. Here's what I did:

1) Configured a 2-way switch for CH 6 on my TX.
2) Assigned the switch to Acc 0 during TX setup wizard.
3) Checked the "Motor spin at neutral..." option.
4) Chose Acc 0 to enable ASWA mode.
5) Tested switch while on output page and watched ASWA enable/disable correctly (down=enable, up=disable)

Now here's where things get weird:

6) With Acc 0 switch set to up=disable, arm quad using yaw-right method.
7) Quad arms and motors immediately start spinning at idle speed, even though ASWA switch is set to disable and output page confirms ASWA is not enabled according to Acc 0 position.
8- Move Acc 0 to down=enabled position.
9) Motors start spinning even faster.
10 ) Move Acc 0 to up=disabled.
11) Motors go back to idle speed.

It seems that when I check the "Motor spin at neutral..." option, the motors idle even when Acc 0 is set to disable. Motors idle even faster when Acc 0 is set to enable.

Any idea why this would happen?
Did I configure the 2-way switch for Acc 0 correctly? Maybe I forgot a critical step. Though, I followed everything here (https://librepilot.atlassian.net/wiki/plugins/servlet/mobile?contentId=39551030#content/view/39551030 (https://librepilot.atlassian.net/wiki/plugins/servlet/mobile?contentId=39551030#content/view/39551030)) correctly (I think).
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: f5soh on August 02, 2017, 12:56:43 pm
Quote
I tried enabling it using both the ASWA enable/ disable switch and the flight mode switch methods, but whenever I switch to disable, the motors keep spinning at idle.

The Motor spin at neutral still active, that the normal behavior.
Motor spin at neutral option is not switchable from RC.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: TheOtherCliff on August 02, 2017, 01:03:33 pm
One thing about CruiseControl I forgot to mention is that it should not (cannot) be used with Acro+.  I recall that it won't let you do this without special tweaks.  It at least should be avoided if your Acro+ allows flipping faster than 2000 degrees per second or about 5 flips per second.  That is fast enough to break things in some cases (props, arms, motor mounts) just from the gyroscopic forces and sling batteries off if they are not well secured.

Acro+ can go faster than 2000 degrees per second (gyro max hardware rate), and if it does, the flipping faster than 2000 deg/sec confuses the concept of which way is up.  Acro+ does not need to know this, but CruiseControl does need to know this.
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 03:44:10 pm
Quote
I tried enabling it using both the ASWA enable/ disable switch and the flight mode switch methods, but whenever I switch to disable, the motors keep spinning at idle.

The Motor spin at neutral still active, that the normal behavior.
Motor spin at neutral option is not switchable from RC.

Oh wow. I didn't know that! I just assumed that the motors would only spin at neutral when ASWA is active. I read the words "Motor spin at neutral output when armed and throttle below zero" but didn't stop to think that this would be independent of ASWA being enable or disable. Now I get it. Thanks!

Here's how I configured:

3-way flight mode switch: Up=Rattitude, Mid=Rate, Down=Rate
Acc 0 - same channel as flight mode switch: Up/Mid=ASWA Disabled, Down=ASWA Enabled
Acc 1 - 2-way switch: Up=Disarm, Down=Arm

I tested on the bench this morning without props. I'm able to arm from Rattitude or Rate successfully. I'm able to switch to Rate+ASWA successfully. I'm able to switch back to Rattitude or Rate successfully, which disables ASWA. I'm able to disarm successfully.

Last thing to test is in-flight tonight, and hopefully not crash!

Thanks for helping me through my ignorance!
Title: Re: AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 03:47:21 pm
One thing about CruiseControl I forgot to mention is that it should not (cannot) be used with Acro+. 

Good to know!
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: AerialPerPlexity on August 02, 2017, 04:16:16 pm
If your flying rate mode i would suggest trying acro+ just like rate mode but helps you more on flips and rolls inverted stuff. I have found on ratitude depending on how its set up cuts the power to the motors went your trying to flip when inverted. I noticed it once i got comfortable flipping the 360 fast. I would try to flip upside-down 180 and then would have any power to get the last 180  it would just rely on centrifugal force.
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 04:27:27 pm
If your flying rate mode i would suggest trying acro+ just like rate mode but helps you more on flips and rolls inverted stuff. I have found on ratitude depending on how its set up cuts the power to the motors went your trying to flip when inverted. I noticed it once i got comfortable flipping the 360 fast. I would try to flip upside-down 180 and then would have any power to get the last 180  it would just rely on centrifugal force.

I found the same thing using Rattitude. I only tried flipping once and lost power because AWSA wasn't enabled and crashed (first crash, first broken frame).

I was planning on using the flight modes I setup for the following purposes:

Rattitude: LOS flying, the occasional flip.
Rate: FPV flying, racing, no flips
Rate+ASWA: FPV Flying, freestyle

If I change the 3rd flight mode to Acro+ w/ ASWA, what do you suggest I set the rates to? (I currently have 700 set for rate mode).

Also, what do you suggest for Acro+ factor?
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: AerialPerPlexity on August 02, 2017, 09:54:49 pm
I have my rates at 270  for both yaw, pitch and roll and then on the acro+ setting in the expert tab i bumped both sliders up to 60. And i dont run expo eather. The acro+ is kinda like expo in its own way.  So when your upside down the kwad moves around faster i also have aswa. My flight modes go ratitude, rates aswa and acro+ aswa. I also have been trying the different modes for yaw because i dont know if i can tell the difference between rates, axislock, acro+ on the yaw axis.
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 10:20:55 pm
I have my rates at 270  for both yaw, pitch and roll and then on the acro+ setting in the expert tab i bumped both sliders up to 60. And i dont run expo eather. The acro+ is kinda like expo in its own way.  So when your upside down the kwad moves around faster i also have aswa. My flight modes go ratitude, rates aswa and acro+ aswa. I also have been trying the different modes for yaw because i dont know if i can tell the difference between rates, axislock, acro+ on the yaw axis.

Thanks for the insight!

Have you ever tried ASWA with Rattitude? I'd like to try some line of sight flips.
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: TheOtherCliff on August 02, 2017, 10:34:31 pm
If your flying rate mode i would suggest trying acro+ just like rate mode but helps you more on flips and rolls inverted stuff. I have found on ratitude depending on how its set up cuts the power to the motors went your trying to flip when inverted. I noticed it once i got comfortable flipping the 360 fast. I would try to flip upside-down 180 and then would have any power to get the last 180  it would just rely on centrifugal force.

CruiseControl is the thing that cuts the motors.  It doesn't cut the power completely.  It reduces it to 5% if you leave the stick above 5%.  Anything above zero throttle should allow full 100% power for control and stabilization, but zero throttle cuts the motors off completely; a safety feature.  When using CC, you are supposed to leave the throttle up high (at least above zero) during flips.  Either you are cutting the throttle to zero during flips and still expecting the motors to control and stabilize, or you have found a bug.  I've heard similar things before, but no one has helped to figure this out.
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 02, 2017, 10:53:10 pm
CruiseControl is the thing that cuts the motors.  It doesn't cut the power completely.  It reduces it to 5% if you leave the stick above 5%.  Anything above zero throttle should allow full 100% power for control and stabilization, but zero throttle cuts the motors off completely; a safety feature.  When using CC, you are supposed to leave the throttle up high (at least above zero) during flips.  Either you are cutting the throttle to zero during flips and still expecting the motors to control and stabilize, or you have found a bug.  I've heard similar things before, but no one has helped to figure this out.

This might be by noob brain talking, but here's a question:

If someone is doing flips why wouldn't they want ASWA enabled so they don't have to worry about keeping the throttle up a little bit? Isn't just throwing the throttle all the way to 0% easier than trying to balance it just a little bit above 0%?
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: AerialPerPlexity on August 03, 2017, 05:20:42 am
I think for me about the cruzcontrol is i just started flying 3 to 4 months ago and i am not any where close to being a good pilot. I have just got my craft flying line of sight untill i understood what it  did and then i just went to fpv. Since i have played video games my whole life i just wish i would have used first person instead of third person. But anyways yes i have used aswa in ratitude and it's the way to  go when your trying to flip. I have my flight mode set up to activate it  for position 2 and 3 and if im in the first if you go up 20 to 30 line of sight and just cut throttle it will fall like a rock b
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: TheOtherCliff on August 03, 2017, 05:39:10 am
This might be by noob brain talking, but here's a question:

If someone is doing flips why wouldn't they want ASWA enabled so they don't have to worry about keeping the throttle up a little bit? Isn't just throwing the throttle all the way to 0% easier than trying to balance it just a little bit above 0%?

You don't need to do anything to the throttle when flipping with CruiseControl.  Anywhere between 5% and 100% stick gets changed to 5% when inverted.  The best way to do flips with CC is to give full throttle (or at least more than hover power) and leave it there while you do the flip and for a second or two after the flip.  CC reduces the motors when inverted.  You start with a little upward velocity and end with a little downward velocity, but leaving the throttle above hover will soon check the post flip downward velocity.
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: AerialPerPlexity on August 03, 2017, 06:51:08 am
i just started flying 3 to 4 months ago and i am not any where close to being a good pilot. I had just got my craft flying line of sight untill i understood what it  did and then i jumped into fpv right away. Since i have played video games my whole life i just wish i would have used first person instead of third person. But anyways yes i have used aswa in ratitude and it's the way to  go when your trying to flip or roll period. I have my flight mode switch set up to activate aswa  for position 2 and 3 and if im in the first position if you go up 20ft to 30ft line of sight and just cut throttle it will fall like a rock  and start to rotate. Even though the motors spin at neutral. If you try it with aswa enable in any flight mode i falls level. I recommend doing that experiment yourself so you understand how your quad manuvers. i use ratitude to take off and land and when i freak out and  also to do very precision flying through tight places. But fast flying   i always use aswa cuz  don't plan on when i flip and flop i just do what feels natural. I also can feel that ratitude and altituded handling charcteristics slow down because that extra pid loop for the stabltization.  after i started experimenting with acro+ and manual thrust i feel way more comfortable with that than anything else. But i think the altitude and ratitude flight modes are the reasons why i progressed so efficiently. They are great stepping Stones
Title: Re: [Solved] AlwaysStabilizeWhenArmed Why must motors idle at 0% throttle?
Post by: emperorsgroove on August 03, 2017, 06:41:19 pm
Thanks everyone! I think I now have a good understanding of what ASWA is, how to configure it, and how to use it.

As soon as Toronto starts to get some nice weather again I'll try it out.