Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROTTLE

This forum is dedicated to all issues and questions related to your individual setups and configurations
Post Reply
Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROTTLE

Post by Goetz »

Hello I'm Newbee and I try to understand the working of the parameters.

Thats what I understood til now:

MINTHROTTLE: given to esc's when throttlestick is at minimum (without correcting influence from arduino).

MINCOMMAND: given to esc'c when armed, minimum value given from arduino to esc's.

MAXTHROTTLE: given to esc's when throttlestick is at maximum (without correcting influence from arduino).


IF this understanding is right, the range for corrections (sensors, arduino) during sinking from MINCOMMAND to MINTHROTTLE (or actual Sickvalue) and during climbing from MAXTHROTTLE (or aktual Stickvalue) to 2000.

Additional is it fact, that there is no correction from sensors/arduino when Throttlestick is ar minimum (why not? would be easy and stable sinking)?

Could please somebody who knows better than me put corrections to my understanding?






Gestern 15:22
















Seiten (121): « Erste < Vorherige 117 118 119 120 [121] Letzte »

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by kos »

Goetz wrote:Additional is it fact, that there is no correction from sensors/arduino when Throttlestick is ar minimum (why not? would be easy and stable sinking)?

yes, this is true ,

looking a the code it apears that the rcData[THROTTLE] < MINCHECK is an historic way of determining the quad as 'not armed' and in 'stick configuration mode' ..

Code: Select all

 if (rcData[THROTTLE] < MINCHECK) {
      errorGyroI[ROLL] = 0; errorGyroI[PITCH] = 0; errorGyroI[YAW] = 0;
      errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;


.. could and should be moved to another block (this function is not linked with the stick configuration )

Code: Select all

if (!armed){
   errorGyroI[ROLL] = 0; errorGyroI[PITCH] = 0; errorGyroI[YAW] = 0;
      errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;
}



also, it look like a question mark is missing in your post .. the question is unclear.

you should have a look at the source file anyway , everything is pretty clear

Code: Select all

 if (maxMotor > MAXTHROTTLE) // this is a way to still have good gyro corrections if at least one motor reaches its max.
      motor[i] -= maxMotor - MAXTHROTTLE;
    motor[i] = constrain(motor[i], MINTHROTTLE, MAXTHROTTLE);   

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Alexinparis »

MINCOMMAND is the signal the ESC received when the multi is not amed
MINTHROTTLE - MAXTHROTTLE is the range used once the multi is amred

There is not correction when the stick is low: it's for security reason to prevent unwanted flip when arming the multi.
It might change in the future.

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

Thank you for the explanation.

Unfortunately or me the Code is not so selfexplaning (because I'm not an too good programmer), but I will have a look at the code and try to change it, I think about something like: "In stablemode correktion is on during low throttle". When I made my changes I'll Post, hoping somebody does my fault-correction ;-)

In my opinion best thing would be to switch this option in GUI - like sensors etc. then everybody would have the flexibility to turn on/off the "stable sinking" with wich switch or combination he wants to, but this is defenitly not whithin my programming knowledge.

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

When I want to change the code to get a stable sinking during throttlestick at minimum when in stablemode, I guess the following should work:
Original:

Code: Select all

    if (rcData[THROTTLE] < MINCHECK) {
      errorGyroI[ROLL] = 0; errorGyroI[PITCH] = 0; errorGyroI[YAW] = 0;
      errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;
      rcDelayCommand++;


with Changes:

Code: Select all

    if (rcData[THROTTLE] < MINCHECK) {
                 if (armed == 1 && accMode == 1) {
                   errorGyroI[ROLL] = 0; errorGyroI[PITCH] = 0; errorGyroI[YAW] = 0;
                   errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;
                 } rcDelayCommand++;


I'm not a good Programmer and I can't find in the code what the 0-Settings are used for. Could please Somebody who knows arduino-programming and is able to read multiwii-code have a look at my Code-Changes above?

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by kos »

if (rcData[THROTTLE] < MINCHECK) {
if ( ! armed && !(failsafeCnt > (5*FAILSAVE_DELAY)) ) {
errorGyroI[ROLL] = 0; errorGyroI[PITCH] = 0; errorGyroI[YAW] = 0;
errorAngleI[ROLL] = 0; errorAngleI[PITCH] = 0;
} rcDelayCommand++;[/code]


we set error angle to 0 (ie : no correction) only if your are not armed and not in safe fail mode .. thats should do the trick

no need to test on accMode here , it is done on line697

the copters may have difficulties to lose altitude ..


waiting for something like

landing(){
#ifdef gps
stopGps()
#endif
resetCorrection();
switchLightOff();
..
}
...
}

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

we set error angle to 0 (ie : no correction) only if your are not armed and not in safe fail mode .. thats should do the trick

I don't understand: Why do you want no correction in failsafemode?

the copters may have difficulties to lose altitude ..


?? I don't understand this. Reason for the Codechange is to get an stable sinkingflight with minimum throttle... you think sensordata is pushing motors to much?

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by kos »

Goetz wrote:
we set error angle to 0 (ie : no correction) only if your are not armed and not in safe fail mode .. thats should do the trick

I don't understand: Why do you want no correction in failsafemode?

let me reverse the statment : if we are in fail safe mode , we do not set the error angle to 0

Goetz wrote:
the copters may have difficulties to lose altitude ..


?? I don't understand this. Reason for the Codechange is to get an stable sinkingflight with minimum throttle... you think sensordata is pushing motors to much?

corrections = motor are spinning = more thrust .. certe negligeable , but more thrust

edit : you will also need to remove this code from output.pde... and it will require a way to disarm the quad or to set rcDelayCommand to something very low , so this pretty unsafe unless an alternate way to disarm is proposed .

Code: Select all

if ((rcData[THROTTLE]) < MINCHECK)
      #ifndef MOTOR_STOP
        motor[i] = MINTHROTTLE;
      #else
        motor[i] = MINCOMMAND;
      #endif
    if (armed == 0)
      motor[i] = MINCOMMAND;
  }

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

Thank you for your Tipps, it seems to get more complicated then I thought.

I agree with you, that there are safety Reasons to look at, I don't want to loose my Copter to the Sky because shaky Wind is causing Corrections whitch let the Copter go up and up and up...

So there should (or has to be) a Possibility to switch this Option "stable sinking" duruing flight e.g. with Aux2...

I found

Code: Select all

 for(i=0;i<CHECKBOXITEMS;i++) {
      rcOptions[i] = (
      ( (rcData[AUX1]<1300)    | (1300<rcData[AUX1] && rcData[AUX1]<1700)<<1 | (rcData[AUX1]>1700)<<2
      [code] |(rcData[AUX2]<1300)<<3 | (1300<rcData[AUX2] && rcData[AUX2]<1700)<<4 | (rcData[AUX2]>1700)<<5) & activate1[i][/code]
      )||(
      ( (rcData[AUX3]<1300)    | (1300<rcData[AUX3] && rcData[AUX3]<1700)<<1 | (rcData[AUX3]>1700)<<2
       |(rcData[AUX4]<1300)<<3 | (1300<rcData[AUX4] && rcData[AUX4]<1700)<<4 | (rcData[AUX4]>1700)<<5) & activate2[i]);
    }


where activate1[i] and AUX2-State sets the rcOptions[i]. I don't want to change the Code of the GUI because it's too complicated for me, when I change

Code: Select all

 |(rcData[AUX2]<1300)<<3 | (1300<rcData[AUX2] && rcData[AUX2]<1700)<<4 | (rcData[AUX2]>1700)<<5) & activate1[i]
with

Code: Select all

 |(rcData[AUX2]>1700)

I expect the Funktionality of switching rcOptions[i] with AUX2-switch on my Transmitter is given (?) (can please somebody have a Look at)

A new Parameter has to be created, I think changing

Code: Select all

#define BOXACC       0
#define BOXBARO      1
#define BOXMAG       2
#define BOXCAMSTAB   3
#define BOXCAMTRIG   4
#define BOXARM       5
#define BOXGPSHOME   6
#define BOXGPSHOLD   7
#define BOXPASSTHRU  8
#define BOXHEADFREE  9
#define BOXBEEPERON  10

#define CHECKBOXITEMS 11


to

Code: Select all

...
#define BOXBEEPERON  10
#define BOXSTABLESINKING 11

#define CHECKBOXITEMS 12


should do that

The setting of an Mode-Variable (to be deklared in Header) should be placed at the End of rc-loop:

Code: Select all

       ...GPSModeHold = 0;
      }
    #endif
      if (rcOptions[BOXSTABLESINKING]) {
        stablesinkMode=1;
       } else stablesinkMode = 0;
    if (rcOptions[BOXPASSTHRU]) {passThruMode = 1;}
    else passThruMode = 0;
  } else { //not in rc loop


This way I hope to get an Variable "stablesinkMode", switched by AUX2 (from Transmitter) whitch can be used to decide whether Errorvariables are set to 0 or not.

As I said above I'm not too good with programming and I would be glad somebody have a Look at my Ideas...

Thank you, Götz

User avatar
kos
Posts: 286
Joined: Thu Feb 16, 2012 4:51 am
Location: Fr

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by kos »

Goetz wrote:Thank you for your Tipps, it seems to get more complicated then I thought.

I agree with you, that there are safety Reasons to look at, I don't want to loose my Copter to the Sky because shaky Wind is causing Corrections whitch let the Copter go up and up and up...


if we enable level at all time , we must allow the motor to spin up at all time
if we allow the motor to spin up at all time , applying full yaw left to disarm will cause the motor to actually spin up very fast

this is the main safety reason :)

the safe way :

1 - arm the quad
2 - trim throttle on your transmitter to be above 1100 (the value of MINCHECK)
3 - done , auto level is always one
4 - landing ,trim down throttle
5 - disarm the quad

only downside : you can only use the upper range of your throttle trim ..

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

Oh my God... what a simple Solution... seem's I'm not only a bad Programmer :oops:

Thank you for this Idea, I'll do it like this.

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

OK, back again with the next Question:

I want to set MINTHROTTLE as low as possible because sensorcorrections are driving my Copter up during hoover.

The MINTHROTTLE is defined somewhere at the Beginning of config.h, it's commented as ESC-related. Now I have to try out, what my ESC's need as a Minimum to get the Motors spinning. I know, that the ESC's are sensitive to Temprature (I have Suppo 2212/13@25A Suppo ESC)and could get a solid Start of the Motors with 1120 inhouse and getting a Problem on a colder Flyingfield. I suppose once Motors running the Temperature should not be an Problem because ESC's are warming up themself (?), but I don't want to risk a Motorstop during Flight...

Has anybody experienced Problems with low MINTHROTTLE?

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

OK, nobody seems to have experience with this, so at least I tell what I found for others suching this Forum, that Rhosewhite has MINTHROTTLE at 1150 @ most of his Copters.

Of course you have to check yourself that Motors are running stable with this.

DimitriQX
Posts: 10
Joined: Mon Feb 06, 2012 9:14 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by DimitriQX »

i dont know is someone awnser this question al redy

but i als want the gyros on when i am at min throttle so when i fly acro and i go at min throttle for a flip the gyro stays on en when i give back up throttle the quad keeps flying whit out losing control
like i had exp before

grtz

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

I know - the Answer is the last Post on the previous page... easy and brilliant. you can check in the gui of mwc how much trimming your tx needs....

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

a few weeks and many flights later I recognise following:

The Problem ist, that the copter flips, when throttle ist lower than MINCHECK. A few Weeks ago (Posts above) it was a big Problem for me, because I was flying stablemode and very slowly. Now my prefered mode is acro, there are many more Stininputs from me and the copter is movin almost all the time. I remembered the Problems from th beginning and did some tests:

A) low throttle while copter moves: Is not a Problem
B) low throttle hoovering in stablemode: same Problem as decribed in the Posts above: (fast) Flip
C) low throttle hoovering in acromode: Copter is not stable any more, but it's very different from stablemode, it sinks slowly on one edge, no Problem to catch him again

So a new, undiskussed Fact is: hoovering in stablemode near MINCHECK is very dangerous, much more than in acromode. But stablemode is not only for Beginers but also to get more security taking Fotos or for FPV... so very bad "behavior" in my Opinion.
There is a Difference with ACC aktivated or not, is this a BUG?

Can Anybody emplain?

bill516
Posts: 334
Joined: Sun Aug 07, 2011 12:27 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by bill516 »

As I understand it

Mincommand is the level the controller needs to see from your Tx to allow you to arm the motors, if you dont reach this level the motors will not arm.

Min throttle, is the lowest set speed you motors will run at. Orginally it was set at a low level to allow the motors to turn slowly so you knew the motors were armed. You can set this figure to whatever you want from 0 to 100% power.

Max throttle is the max you can get out of your motors, can be set at a lower figure than 100% .

You should not have any flips at any speed or mode unless you command it by stick input. Vibration is the main enemy of multi copters, if the display on the GUI is flat or almost flat with no big peaks, then it is likely you have no vibration issues. If the display is all over the place like a manic heart monitor then you have problems, you need to get rid of virbration, balance props and motors and make sure your gyros and accelerometers are not bouncing around. I have mine wrapped in polystyrene and depron, and held down to my board.

If you have your machine trimmed correctly there should be very little to no difference in either mode, other than in stable mode your machine will counteract any outside forces acting on it, i.e gust of wind.

Goetz
Posts: 82
Joined: Sun Mar 04, 2012 3:40 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Goetz »

So a new, undiskussed Fact is: hoovering in stablemode near MINCHECK is very dangerous, much more than in acromode. But stablemode is not only for Beginers but also to get more security taking Fotos or for FPV... so very bad "behavior" in my Opinion.
There is a Difference with ACC aktivated or not, is this a BUG?

Update:
The Experience above was with V1.9 (maybe same with early 2.0, not shure), the aktual Release (4.5.2012 I think) is MUCH better (with exactly same equipment). The Copter still flips when throttle is lower than mincheck, but very slowly, same in stable and acromode; this seems to be a question of downwash and not a question of regulation. Same thinking the other way round: there was an bug before, with the new software I see the big difference.

Many thanks to the developers

ulkar
Posts: 2
Joined: Wed Aug 22, 2012 4:19 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by ulkar »

Hi,

Sorry for uping this post but I think it's very related to a behaviour on my quad.
I had a normal f450 quad running on multiwii with no problems.
I changed a while ago to a spider type quad.
Now I have this behaviour :

If I cut throttle (even not completely, anything below say 25% on the tx does it) the quad decreases altitude fastly (which is normal) but also stops being stabilised and starts gaining an error to the required position, as if the correction was not done any more, then I usually put back throttle to prevent this, and then the quad overreacts in oscillating very hard on each side, if I put back medium throttle it stops.

Note this is the only situation on which it does this, when I fly easy it's insanely smooth.
I usually encounter this problem when flying fpv not los, as I distances and throttle management are very different from one another, but that's the point of my quad to fly fpv so :D

I think this could be related to :

too high minthrottle : the quad considers that I'm at 0 even though I'm at let's say 20% on the tx as my minthrottle is too high
too low minthrottle
or even maybe maxthrottle

Let me know what you think about it

thanks

tovrin
Posts: 705
Joined: Tue Sep 20, 2011 4:08 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by tovrin »

someone will correct me if I'm wrong, but i believe this is related to the wash created under your copter when descending rapidly. my copter gets very unstable too when i descend too quickly, its not that it quit trying to stabilize, but the air patterns directly below your copter are not stable.

Alexinparis
Posts: 1630
Joined: Wed Jan 19, 2011 9:07 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by Alexinparis »

There is no stabilization is throttle value is under 1100 (MINCHECK).
It's a security feature to avoid a wrong sensor setup leading to unexpected flip when you arm the multi.

ulkar
Posts: 2
Joined: Wed Aug 22, 2012 4:19 pm

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by ulkar »

Okay so in my case increasing the minthrottle could help preventing me from going under the minimum amount of throttle required to stabilize the copter (which looks like it's what's happening here)

User avatar
haydent
Posts: 583
Joined: Sun Jun 17, 2012 1:35 am
Location: NSW, AU

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by haydent »

Alexinparis wrote:There is no stabilization is throttle value is under 1100 (MINCHECK).
It's a security feature to avoid a wrong sensor setup leading to unexpected flip when you arm the multi.


finally now i know why this has been happening (no corrections as low throttle)

i just checked in 2.2 code and it is 1120 there

handsomejackuk
Posts: 97
Joined: Mon Sep 08, 2014 12:25 am

Re: Exact Definition of MINCOMMAND, MINTHROTTLE and MAXTHROT

Post by handsomejackuk »

bump this post as need for reference

Post Reply