annuncio

Comprimi
Ancora nessun annuncio.

Quesito ai programmatori

Comprimi
X
  • Filtro
  • Ora
  • Visualizza
Elimina tutto
nuovi messaggi

  • #16
    Originariamente inviato da redfox74 Visualizza il messaggio
    Guarda non sei l'unico ... ;) negli ultimi tempi sto' veramente facendomi venire il mal di fegato rispetto alla quantita' di PID annidati che si stanno inventando per stabilizzare tutto lo scibile su di un quad ... nell'ultimo periodo per non farti capire proprio piu' niente sono passati anche al PIPI che in italiano vuol dire un'altra cosa ...
    quasi quasi mi metto a fare una rete neurale con apprendimento automatico cosi se c'e' qualcosa che non funzione e' colpa della rete neurale del quad che non converge ;)
    Mihhhh paura !!!
    ECCO , a proposito di apprendimento automatico, mi hai fatto venire in mente un'altra cosa che volevo chiedere e mi ero scordato..
    Allora, nel mondo delle auto, da diversi anni ormai con le accensioni elettroniche , le centraline hanno un sensore per il battito in testa e variano di continuo l'anticipo con cui far scoccare la scintilla, in modo da avere le massime prestazioni . In pratica la centralina anticipa sempre più il comando alla candela finchè il sensore di detonazione non riferisce che ha esagerato..

    Perchè non è possibile fare ciò anche nei quad con i parametri, almeno il parametro P ? sappiamo che aumentando troppo quel parametro, il mezzo inizia ad oscillare.. sicuramente la fc è in grado di capire che ci sono delle oscillazioni non comandate dal pilota, e potrebbe abbassare il valore P finchè non spariscono...

    ho dormito male eh ?

    Commenta


    • #17
      Il level mode è esattamente come lo descrivi, lo stick non rappresenta la velocità voluta ma l'angolo voluto.

      E da quel che vedo nel codice di multiwii:

      codice:
      if (accMode == 1 && axis<2 ) { //LEVEL MODE
            errorAngle = constrain(2*rcCommand[axis],-700,+700) - angle[axis] + accTrim[axis]; //16 bits is ok here
            #ifdef LEVEL_PDF
              PTerm      = -(int32_t)angle[axis]*P8[PIDLEVEL]/100 ;
            #else  
              PTerm      = (int32_t)errorAngle*P8[PIDLEVEL]/100 ;                         //32 bits is needed for calculation: errorAngle*P8[PIDLEVEL] could exceed 32768   16 bits is ok for result
            #endif
      
            errorAngleI[axis] += errorAngle;                                              //16 bits is ok here
            errorAngleI[axis]  = constrain(errorAngleI[axis],-10000,+10000); //WindUp     //16 bits is ok here
            ITerm              = (int32_t)errorAngleI[axis]*I8[PIDLEVEL]/4000;            //32 bits is needed for calculation:10000*I8 could exceed 32768   16 bits is ok for result
          } else { //ACRO MODE or YAW axis
            error = (int32_t)rcCommand[axis]*10*8/P8[axis] - gyroData[axis];              //32 bits is needed for calculation: 500*5*10*8 = 200000   16 bits is ok for result if P8>2 (P>0.2)
            PTerm = rcCommand[axis];
      
            errorGyroI[axis] += error;                                                    //16 bits is ok here
            errorGyroI[axis]  = constrain(errorGyroI[axis],-16000,+16000); //WindUp       //16 bits is ok here
            if (abs(gyroData[axis])>640) errorGyroI[axis] = 0;
            ITerm = (int32_t)errorGyroI[axis]*I8[axis]/1000/8;                            //32 bits is needed for calculation: 16000*I8  16 bits is ok for result
          }
      PTerm         -= (int32_t)gyroData[axis]*dynP8[axis]/10/8;                      //32 bits is needed for calculation            16 bits is ok for result
      C'e' qualcosa che non torna. Non vedo codificato il comportamento descritto da giovanni ma vedo quello di redfox.
      Ultima modifica di ciskje; 11 novembre 11, 10:33.
      Informatico Professionista, Amante dei 4x4 e delle auto ibride, costruttore di quadricotteri.

      Commenta


      • #18
        Originariamente inviato da ciskje Visualizza il messaggio
        Il level mode è esattamente come lo descrivi, lo stick non rappresenta la velocità voluta ma l'angolo voluto.

        E da quel che vedo nel codice di multiwii:

        codice:
        if (accMode == 1 && axis<2 ) { //LEVEL MODE
              errorAngle = constrain(2*rcCommand[axis],-700,+700) - angle[axis] + accTrim[axis]; //16 bits is ok here
              #ifdef LEVEL_PDF
                PTerm      = -(int32_t)angle[axis]*P8[PIDLEVEL]/100 ;
              #else  
                PTerm      = (int32_t)errorAngle*P8[PIDLEVEL]/100 ;                         //32 bits is needed for calculation: errorAngle*P8[PIDLEVEL] could exceed 32768   16 bits is ok for result
              #endif
        
              errorAngleI[axis] += errorAngle;                                              //16 bits is ok here
              errorAngleI[axis]  = constrain(errorAngleI[axis],-10000,+10000); //WindUp     //16 bits is ok here
              ITerm              = (int32_t)errorAngleI[axis]*I8[PIDLEVEL]/4000;            //32 bits is needed for calculation:10000*I8 could exceed 32768   16 bits is ok for result
            } else { //ACRO MODE or YAW axis
              error = (int32_t)rcCommand[axis]*10*8/P8[axis] - gyroData[axis];              //32 bits is needed for calculation: 500*5*10*8 = 200000   16 bits is ok for result if P8>2 (P>0.2)
              PTerm = rcCommand[axis];
        
              errorGyroI[axis] += error;                                                    //16 bits is ok here
              errorGyroI[axis]  = constrain(errorGyroI[axis],-16000,+16000); //WindUp       //16 bits is ok here
              if (abs(gyroData[axis])>640) errorGyroI[axis] = 0;
              ITerm = (int32_t)errorGyroI[axis]*I8[axis]/1000/8;                            //32 bits is needed for calculation: 16000*I8  16 bits is ok for result
            }
        PTerm         -= (int32_t)gyroData[axis]*dynP8[axis]/10/8;                      //32 bits is needed for calculation            16 bits is ok for result
        C'e' qualcosa che non torna. Non vedo codificato il comportamento descritto da giovanni ma vedo quello di redfox.
        Come non lo vedi?
        else { //ACRO MODE or YAW axis etc. etc.

        quello e' il rate mode.
        Quadricottero News
        http://www.facebook.com/Quadricottero

        Commenta

        Sto operando...
        X