Changeset 57

Show
Ignore:
Timestamp:
03/27/08 00:13:56 (16 years ago)
Author:
peroutka
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • simulator_zdenek/ekf_example/simul.cpp

    r52 r57  
    1 /* Hlavni simulacni program 
     1/* Hlavni simulacni program 
    22 
    33   Simulace tramvaje s PMSM v plovouci radove carce 
     
    103103  h=1e-6; 
    104104 
    105   t_end=5.;    // profil Isq 5s, rozbeh 12s, rozbeh +/- 20s, reverzace 12s 
     105  t_end=9.;    // profil Isq 5s, rozbeh 12s, rozbeh +/- 20s, reverzace 12s 
    106106  t_sense=0.0; // 1. 
    107107  t=h; 
     
    145145//                Ww=2.*M_PI*180; 
    146146                // jednoducha reverzace - cely dej cca 11s 
    147                 Ww+=k_rampa*2.*M_PI*0.125/2.;    //1000Hz/s 
     147/*              Ww+=k_rampa*2.*M_PI*0.125/2.;    //1000Hz/s 
    148148                if (Ww>2.*M_PI*150.) {Ww=2.*M_PI*150.; if (k_rampa_tmp<8000) k_rampa_tmp++; else {k_rampa=-1;k_rampa_tmp=0;}} 
    149149                if (Ww<-2.*M_PI*150.) Ww=-2.*M_PI*150.;   /* */ 
     150/**/ 
    150151          // skokova zmena napeti troleje 
    151152//          Ut=500;       // nutno zadat konstantni Isdw pri startu 
    152153        } 
     154 
     155 
     156        if (t>0.2) x[8]=1.2;    // 1A 
     157        if (t>0.4) x[8]=10.8;   // 9A 
     158        if (t>0.6) x[8]=25.2;  // 21A 
     159 
     160        if (t>0.7) Ww=2.*M_PI*10.; 
     161        if (t>1.0) x[8]=1.2;    // 1A 
     162        if (t>1.2) x[8]=10.8;   // 9A 
     163        if (t>1.4) x[8]=25.2;  // 21A 
     164 
     165        if (t>1.6) Ww=2.*M_PI*50.; 
     166        if (t>1.9) x[8]=1.2;    // 1A 
     167        if (t>2.1) x[8]=10.8;   // 9A 
     168        if (t>2.3) x[8]=25.2;  // 21A 
     169 
     170        if (t>2.5) Ww=2.*M_PI*100; 
     171        if (t>2.8) x[8]=1.2;    // 1A 
     172        if (t>3.0) x[8]=10.8;   // 9A 
     173        if (t>3.2) x[8]=25.2;  // 21A 
     174 
     175        if (t>3.4) Ww=2.*M_PI*150; 
     176        if (t>3.7) x[8]=1.2;    // 1A 
     177        if (t>3.9) x[8]=10.8;   // 9A 
     178        if (t>4.1) x[8]=25.2;  // 21A 
     179 
     180        if (t>4.3) Ww=2.*M_PI*0; 
     181        if (t>4.8) x[8]=-1.2;    // 1A 
     182        if (t>5.0) x[8]=-10.8;   // 9A 
     183        if (t>5.2) x[8]=-25.2;  // 21A 
     184 
     185        if (t>5.4) Ww=2.*M_PI*(-10.); 
     186        if (t>5.7) x[8]=-1.2;    // 1A 
     187        if (t>5.9) x[8]=-10.8;   // 9A 
     188        if (t>6.1) x[8]=-25.2;  // 21A 
     189 
     190        if (t>6.3) Ww=2.*M_PI*(-50.); 
     191        if (t>6.7) x[8]=-1.2;    // 1A 
     192        if (t>6.9) x[8]=-10.8;   // 9A 
     193        if (t>7.1) x[8]=-25.2;  // 21A 
     194 
     195        if (t>7.3) Ww=2.*M_PI*(-100.); 
     196        if (t>7.7) x[8]=-1.2;    // 1A 
     197        if (t>7.9) x[8]=-10.8;   // 9A 
     198        if (t>8.1) x[8]=-25.2;  // 21A 
     199        if (t>8.3) x[8]=10.8;   // 9A 
     200        if (t>8.5) x[8]=25.2;  // 21A 
     201 
    153202 
    154203        // letmy start s nenulovym momentem