IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MATLAB Discussion :

programme de la turbine éolienne


Sujet :

MATLAB

  1. #1
    Candidat au Club
    Femme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations forums :
    Inscription : Janvier 2011
    Messages : 3
    Points : 2
    Points
    2
    Par défaut programme de la turbine éolienne
    salut
    mon projet sur l'eolienne, j'ai modélisé la génératrice sans turbine (programme .m)
    comment peux-je écrire et ajouter le programme de la turbine ?

  2. #2
    Expert confirmé
    Avatar de duf42
    Homme Profil pro
    Formateur en informatique
    Inscrit en
    Novembre 2007
    Messages
    3 111
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France

    Informations professionnelles :
    Activité : Formateur en informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2007
    Messages : 3 111
    Points : 4 661
    Points
    4 661
    Par défaut
    Bonjour,

    Pourrais-tu préciser ton problème?

    Quel est le code que tu as écrit pour le moment? Quels sont les points qui te bloquent pour avancer? As-tu des erreurs?

    Duf
    Simulink & Embedded Coder

    Au boulot : Windows 7 , MATLAB r2016b
    A la maison : ArchLinux mais pas MATLAB

  3. #3
    Candidat au Club
    Femme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations forums :
    Inscription : Janvier 2011
    Messages : 3
    Points : 2
    Points
    2
    Par défaut programme de la turbine éolienne
    Bonjour,

    Mon problème est: normalement quand j'ajoute le programme de la turbine je trouve les même résultats puisque dans le programme 1 j'ai entré la valeur de la vitesse mais pour le 2ème programme j'ai ajouté le programme de la turbine et l'équation de la vitesse est liée avec ce programme et voilà les deux programmes 1 et 2
    Dans le 1er j'ai un bon résultat mais pour le 2ème je ne trouve pas un bon résultat

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    1er programme
     
     
    clc
    clear
     
    xx0=1e-2*[1 1 1 1 0 0]';
    h=.0001;
    t0=0;t=0;
     tfin=2;
     n=1;
    f=60;
    p=2;
    lm=0;
    Rs=1.66;
    Rr=2.74;
    lsr=11.4*1e-3;
    ws=2*pi*f;
    c=60*1e-6  ;
    tea=0;
    w2=f*2*pi;
    v=0;
    r=45000;
    l=25;
    w=2*pi*f;
    z=sqrt(r^2+(l*w)^2);
    while t<tfin
     
    %      if t<=1
    %         c=60*1e-6;
    % 
    %      else
    %         c=10*1e-6;
    %      end
        lm=-1.56*(1e-11)*(v^4)+2.44*(1e-8)*(v^3)-1.19*(1e-5)*(v^2)+1.42*(1e-3)*v+0.245;
             ls=lsr+lm;
             lr=lsr+lm; 
             L=[ls 0 lm 0 0 0;
             0 ls 0 lm 0 0;
             lm 0 lr 0 0 0;
             0 lm 0 lr 0 0;
             0 0 0 0 1 0  ;
             0 0 0 0 0 1 ];
         %Gas_a vide 
    %      B=[-Rs 0 0 0 -1 0;
    %         0 -Rs 0 0 0 -1;
    %         0 -lm*w2 -Rr -lr*w2 0 0;
    %         lm*w2 0 lr*w2 -Rr 0 0;
    %         1/c 0 0 0 0 0;
    %         0 1/c 0 0 0 0];
     
    %Gas_on charge_r
    B=[-Rs 0 0 0 -1 0;
             0 -Rs 0 0 0 -1;
            0 -lm*w2 -Rr -lr*w2 0 0;
             lm*w2 0 lr*w2 -Rr 0 0;
             1/c 0 0 0 -1/(c*r) 0;
            0 1/c 0 0 0 -1/(c*r)];
    %   %Gas_on charge_z
    % B=[-Rs 0 0 0 -1 0;
    %          0 -Rs 0 0 0 -1;
    %         0 -lm*w2 -Rr -lr*w2 0 0;
    %          lm*w2 0 lr*w2 -Rr 0 0;
    %          1/c 0 0 0 -1/(c*z) 0;
    %         0 1/c 0 0 0 -1/(c*z)];
        %RK4
     
         t=t0;xx1=h*inv(L)*B*xx0;
         t=t0+h/2;xx2=h*inv(L)*(B*(xx0+(xx1/2)));
         xx3=h*inv(L)*(B*(xx0+(xx2/2)));
         t=t0+h;xx4=h*inv(L)*(B*(xx0+(xx3/2)));
        xx=xx0+(xx1+2*xx2+2*xx3+xx4)/6;
     
     
          isd(n)=xx(1);
          isq(n)=xx(2);
          ird(n)=xx(3);
          irq(n)=xx(4);
          vsd(n)=xx(5);
          vsq(n)=xx(6);
     
          %xx=[isd isq ird irq vsd vsq];
     
         temp(n)=t;
         v=sqrt(xx(5)^2+xx(6)^2)/sqrt(2);
          vsa(n)=sqrt(2/3)*(xx(5)*cos(tea)-xx(6)*sin(tea));
           coupl(n)=p*lm*(xx(2)*xx(3)-xx(1)*xx(4));
          n=n+1;
           t0=t;
           xx0=xx;
           vv(n)=v;
           lmm(n)=lm;
     
       end
     
          subplot(3,1,1)
         plot(temp, vsa)
          subplot(3,1,2)
          plot(vv,lmm)
          subplot(3,1,3)
          plot(temp, coupl)
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    2ème programme
     
    clc
    clear
     
    xx0=1e-2*[1 1 1 1 0 0]';
    h=.0001;
    t0=0;t=0;
    tfin=2;
    n=1;
    f=60;
    p=2;
    lm=0;
    Rs=1.66;
    Rr=2.74;
    lsr=11.4*1e-3;
    % ws=2*pi*f;
    c=60*1e-6  ;
    tea=0;
    w2=0.01;
    v=0;
    r=45000;
    l=25;
    w=2*pi*f;
    z=sqrt(r^2+(l*w)^2);
    %%%%%%%%%%%%%%%%%%%%%%%%turbine%%%%%%%%%%
    r=23.2;
    b=2;
    r0=1.225;
    s=pi*r^2;
    V(1)=0.01;
    f=0.0024;
    G=23.75;
    Jt=102.838;%%%linertie totale des parties tournantes (turbine + génératrice) (Kg.m2).
    Vvent=9;
    lan=V(k)*r/Vvent;
    Pv=r0*s*(Vvent^3)/2;
    cp=(0.5-(0.00167*(b-2)))*sin((pi*(lan+0.1))/(18.5-(0.3*(b-2))))-0.00184*(lan-3)*(b-2);
    P1=cp*Pv;
    Taer=P1/V(k);
    Tg=Taer/G;
    T(1)=0;
    V(k+1)=(h/Jt)*(Tg+T(k))-V(k)-f*V(k);
    w=p*V(k+1);
     
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    while t<tfin
     
        %      if t<=1
        %         c=60*1e-6;
        %
        %      else
        %         c=10*1e-6;
        %      end
        lm=-1.56*(1e-11)*(v^4)+2.44*(1e-8)*(v^3)-1.19*(1e-5)*(v^2)+1.42*(1e-3)*v+0.245;
        ls=lsr+lm;
        lr=lsr+lm;
        L=[ls 0 lm 0 0 0;
            0 ls 0 lm 0 0;
            lm 0 lr 0 0 0;
            0 lm 0 lr 0 0;
            0 0 0 0 1 0  ;
            0 0 0 0 0 1 ];
        %Gas_a vide
        %      B=[-Rs 0 0 0 -1 0;
        %         0 -Rs 0 0 0 -1;
        %         0 -lm*w2 -Rr -lr*w2 0 0;
        %         lm*w2 0 lr*w2 -Rr 0 0;
        %         1/c 0 0 0 0 0;
        %         0 1/c 0 0 0 0];
     
        %Gas_on charge_r
        B=[-Rs 0 0 0 -1 0;
            0 -Rs 0 0 0 -1;
            0 -lm*w2 -Rr -lr*w2 0 0;
            lm*w2 0 lr*w2 -Rr 0 0;
            1/c 0 0 0 -1/(c*r) 0;
            0 1/c 0 0 0 -1/(c*r)];
        %   %Gas_on charge_z
        % B=[-Rs 0 0 0 -1 0;
        %          0 -Rs 0 0 0 -1;
        %         0 -lm*w2 -Rr -lr*w2 0 0;
        %          lm*w2 0 lr*w2 -Rr 0 0;
        %          1/c 0 0 0 -1/(c*z) 0;
        %         0 1/c 0 0 0 -1/(c*z)];
        %RK4
     
        t=t0;xx1=h*inv(L)*B*xx0;
        t=t0+h/2;xx2=h*inv(L)*(B*(xx0+(xx1/2)));
        xx3=h*inv(L)*(B*(xx0+(xx2/2)));
        t=t0+h;xx4=h*inv(L)*(B*(xx0+(xx3/2)));
        xx=xx0+(xx1+2*xx2+2*xx3+xx4)/6;
     
     
        isd(n)=xx(1);
        isq(n)=xx(2);
        ird(n)=xx(3);
        irq(n)=xx(4);
        vsd(n)=xx(5);
        vsq(n)=xx(6);
     
        %xx=[isd isq ird irq vsd vsq];
     
        temp(n)=t;
        v=sqrt(xx(5)^2+xx(6)^2)/sqrt(2);
        vsa(n)=sqrt(2/3)*(xx(5)*cos(tea)-xx(6)*sin(tea));
        coupl(n)=p*lm*(xx(2)*xx(3)-xx(1)*xx(4));
        n=n+1;
        t0=t;
        xx0=xx;
        vv(n)=v;
        lmm(n)=lm;
     
    end
     
    subplot(3,1,1)
    plot(temp, vsa)
    subplot(3,1,2)
    plot(vv,lmm)
    subplot(3,1,3)
    plot(temp, coupl)

  4. #4
    Membre du Club Avatar de 123djimy
    Homme Profil pro
    Inscrit en
    Décembre 2009
    Messages
    36
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : Algérie

    Informations professionnelles :
    Secteur : Industrie

    Informations forums :
    Inscription : Décembre 2009
    Messages : 36
    Points : 41
    Points
    41
    Par défaut
    tu as supposé que si la vitesse du vent est constante, la vitesse angulaire du rotor sera aussi constante et c'est faux,
    la vitesse angulaire est au fonction du temps, donc elle devrait être incluse dans la boucle:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    while t<tfin
    .......
    end

  5. #5
    Candidat au Club
    Femme Profil pro
    Inscrit en
    Janvier 2011
    Messages
    3
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations forums :
    Inscription : Janvier 2011
    Messages : 3
    Points : 2
    Points
    2
    Par défaut programme de la turbine éolienne
    salut

    j'ajoute le programme dans la boucle mais je n'obtiens toujours pas de bon résultat
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    clc
    clear
     
    xx0=1e-2*[1 1 1 1 0 0]';
    h=.0001;k=1;
    t0=0;t=0;
    tfin=2;
    n=1;
    f=60;
    p=2;
    lm=0;
    Rs=1.66;
    Rr=2.74;
    lsr=11.4*1e-3;
    % ws=2*pi*f;
    c=60*1e-6  ;
    tea=0;
    w2=0.01;
    v=0;
    r=45000;
    l=25;
    w=2*pi*f;
    z=sqrt(r^2+(l*w)^2);
    r=23.2;
    b=2;
    r0=1.225;
    s=pi*r^2;
    f=0.0024;
    G=23.75;
    Jt=102.838;%%%linertie totale des parties tournantes (turbine + génératrice) (Kg.m2).
    Vvent=9;
    while t<tfin
        %%%%%%%%%%%%%%%%%%%%%%%%turbine%%%%%%%%%%
     
     
        V(1)=0.01;
     
        lan=V(k)*r/Vvent;
        Pv=r0*s*(Vvent^3)/2;
        cp=(0.5-(0.00167*(b-2)))*sin((pi*(lan+0.1))/(18.5-(0.3*(b-2))))-0.00184*(lan-3)*(b-2);
        P1=cp*Pv;
        Taer=P1/V(k);
        Tg=Taer/G;
        T(1)=0;
        V(k+1)=(h/Jt)*(Tg+T(k))-V(k)-f*V(k);
        w=p*V(k+1);
     
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
     
        %      if t<=1
        %         c=60*1e-6;
        %
        %      else
        %         c=10*1e-6;
        %      end
        lm=-1.56*(1e-11)*(v^4)+2.44*(1e-8)*(v^3)-1.19*(1e-5)*(v^2)+1.42*(1e-3)*v+0.245;
        ls=lsr+lm;
        lr=lsr+lm;
        L=[ls 0 lm 0 0 0;
            0 ls 0 lm 0 0;
            lm 0 lr 0 0 0;
            0 lm 0 lr 0 0;
            0 0 0 0 1 0  ;
            0 0 0 0 0 1 ];
        %Gas_a vide
        %      B=[-Rs 0 0 0 -1 0;
        %         0 -Rs 0 0 0 -1;
        %         0 -lm*w2 -Rr -lr*w2 0 0;
        %         lm*w2 0 lr*w2 -Rr 0 0;
        %         1/c 0 0 0 0 0;
        %         0 1/c 0 0 0 0];
     
        %Gas_on charge_r
        B=[-Rs 0 0 0 -1 0;
            0 -Rs 0 0 0 -1;
            0 -lm*w2 -Rr -lr*w2 0 0;
            lm*w2 0 lr*w2 -Rr 0 0;
            1/c 0 0 0 -1/(c*r) 0;
            0 1/c 0 0 0 -1/(c*r)];
        %   %Gas_on charge_z
        % B=[-Rs 0 0 0 -1 0;
        %          0 -Rs 0 0 0 -1;
        %         0 -lm*w2 -Rr -lr*w2 0 0;
        %          lm*w2 0 lr*w2 -Rr 0 0;
        %          1/c 0 0 0 -1/(c*z) 0;
        %         0 1/c 0 0 0 -1/(c*z)];
        %RK4
     
        t=t0;xx1=h*inv(L)*B*xx0;
        t=t0+h/2;xx2=h*inv(L)*(B*(xx0+(xx1/2)));
        xx3=h*inv(L)*(B*(xx0+(xx2/2)));
        t=t0+h;xx4=h*inv(L)*(B*(xx0+(xx3/2)));
        xx=xx0+(xx1+2*xx2+2*xx3+xx4)/6;
     
     
        isd(n)=xx(1);
        isq(n)=xx(2);
        ird(n)=xx(3);
        irq(n)=xx(4);
        vsd(n)=xx(5);
        vsq(n)=xx(6);
     
        %xx=[isd isq ird irq vsd vsq];
     
        temp(n)=t;
        v=sqrt(xx(5)^2+xx(6)^2)/sqrt(2);
        vsa(n)=sqrt(2/3)*(xx(5)*cos(tea)-xx(6)*sin(tea));
        coupl(n)=p*lm*(xx(2)*xx(3)-xx(1)*xx(4));
        n=n+1;
        t0=t;
        xx0=xx;
        vv(n)=v;
        lmm(n)=lm;
     
    end
     
    subplot(3,1,1)
    plot(temp, vsa)
    subplot(3,1,2)
    plot(vv,lmm)
    subplot(3,1,3)
    plot(temp, coupl)

Discussions similaires

  1. Programme de boot qui passe la main à Windows
    Par Bob dans le forum Assembleur
    Réponses: 7
    Dernier message: 25/11/2002, 03h08
  2. [Kylix] Probleme d'execution de programmes...
    Par yopziggy dans le forum EDI
    Réponses: 19
    Dernier message: 03/05/2002, 14h50
  3. communication entre programmes
    Par jérôme dans le forum C
    Réponses: 12
    Dernier message: 16/04/2002, 08h05
  4. Comment débuter en programmation ?
    Par Marc Lussac dans le forum Débuter
    Réponses: 0
    Dernier message: 08/04/2002, 11h29
  5. [Kylix] icone associée à un programme
    Par Anonymous dans le forum EDI
    Réponses: 1
    Dernier message: 22/03/2002, 09h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo