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 ?
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 ?
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
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)
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
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)
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager