Составление программ моделирования. Исследование динамических свойств двигателей постоянного тока

Страницы работы

3 страницы (Word-файл)

Содержание работы

Лабораторная работа №2

Цель работы:

              -закрепить полученные практические навыки составления программ моделирования;

              -исследовать динамические свойства двигателей постоянного тока.


Практическая часть.

Составляем главную форму .

После моделирования процессов получаем следующий график переходных процессов.


А также получили следующие графики динамических процессов.


Также приводим текст программы использованный для моделирования процессов.

procedure TForm1.Button2Click(Sender: TObject);                function sign(x:double):double;

var                                                                                                     begin

a,k,k1,n_ob,p,U_nom,w,I_n,t_start,t_full,t_stop                                    if x>0 then sign:=1

n,r_z,alpha,L_z,F_n,T_z,M_nom,J,t,dt:double;                              else if x=0 then sign:=0

y,yp:darray;                                                                                                   else sign:=-1;

i,kol:integer;                                                                                   end;

function Moment(t,M_nom:double):double;                          function flux(i_1:double):double;

var                                                                                                     var

M:double;                                                                                          i0,kf0,S:double;

Begin                                                                                                begin

if t<=0 then M:=0                                                                           S:=sign(i_1);

       else if t<t_start then M:=0.5*M_nom                                i_1:=abs(i_1);

       else if t<t_full then M:=M_nom                                           i0:=i_1/I_n;

       else M:=M_nom;                                                                     if i0<=0.25 then kf0:=0.4/0.25*i0

Moment:=M;                                                                                             else if i0<=0.5 then kf0:=0.4+(0.28/0.25)*(i0-0.25)

end;                                                                                                                  else if i0<=0.75 then kf0:=0.68+(0.19/0.25)*(i0-0.5)

function u(t,U_nom:double):double;                                                            else if i0<=1 then kf0:=0.87+(0.13/0.25)*(i0-0.75)

begin                                                                                                                        else kf0:=1+(0.12/0.5)*(i0-1);

u:=0;                                                                                                 flux:=s*kf0*k*F_n;

if t<=0 then u:=0                                                                             end;

       else if t<t_start then u:=u_nom                                           function sum(x,y:double):double;

       else if t<t_full then u:=u_nom                                              begin

       else if t<t_stop then u:=0;                                                     sum:=x-y;

end;                                                                                                   end;

function multiplier(x,y:double):double;                                     t_full:=t_start+1;

begin                                                                                                                  t_stop:=t_full+0.5;

multiplier:=x*y;                                                                                                kol:=round(t_stop/dt);

end;                                                                                                                    bar2.MaxValue:=kol;

function ap(x,yp,k,T:double):double;                                                          fillchar(y,sizeof(y),0);

begin                                                                                                                  fillchar(yp,sizeof(yp),0);

  ap:=yp+dt*(k*x-yp)/T;                                                                                  Form3.Series1.Clear;

end;                                                                                                                    Form3.Series2.Clear;

function int(xp,yp,T:double):double;                                                           Form2.series1.clear;

begin                                                                                                                  t:=0;

  int:=yp+dt*xp/T;                                                                                            Form3.Series1.AddXY(t,y[2]);

end;                                                                                                                    Form3.Series2.AddXY(t,y[5]);

procedure scheme(yp:darray;t:double;var y:darray);                              Form2.Series1.AddXY(y[2],y[5]);

var                                                                                                                       bar2.Visible:=true;

m,U_z:double;                                                                                                  for i:=1 to kol do

begin                                                                                                                    begin

U_z:=u(t,U_nom);                                                                                              bar2.Progress:=i;M:=Moment(t,M_nom);

y[1]:=sum(U_z,y[7]);                                                                                         t:=dt*i;

y[2]:=ap(y[1],yp[2],k1,T_z);                                                                            scheme(yp,t,y);

y[3]:=multiplier(y[2],y[6]);                                                                               Form3.Series2.AddXY(t,y[5]);

y[4]:=sum(y[3],M*sign(y[5]));                                                                         Form2.Series1.AddXY(y[2],y[5]);

y[5]:=int(y[4],yp[5],J);                                                                                      yp:=y;

y[6]:=flux(y[2]);                                                                                                  end;

y[7]:=multiplier(y[6],y[5]);                                                                             Button3.visible:=true;

end;                                                                                                                    Button1.Visible:=true;

begin                                                                                                                  bar2.Visible:=false;

bar2.Progress:=0;                                                                                            end;

a:=strtofloat(Edit_2a.text);                                                                           procedure TForm1.Button3Click(Sender: TObject);

n_ob:=strtofloat(Edit_n_ob.text);                                                               begin

p:=strtofloat(Edit_p.text);                                                                             Form3.showmodal;

u_nom:=strtofloat(Edit_u.text);                                                                   end;

r_z:=strtofloat(Edit_r.text);                                                                           procedure TForm1.Button1Click(Sender: TObject);

J:=strtofloat(Edit_J.text);                                                                               begin

I_n:=strtofloat(Edit_I_n.text);                                                                      Form2.ShowModal;

N:=strtofloat(Edit_n.text);                                                                             end;

F_n:=strtofloat(Edit_F_n.text);                                                                     end.

dt:=strtofloat(Edit_dt.text);                                                                         

F_n:=F_n*exp((-2)*ln(10));                                                                            

w:=3.14*n_ob/30;                                                                                          

alpha:=3.9*exp((-3)*ln(10));                                                                         

r_z:=r_z*(1+alpha*(160-20));                                                     

L_z:=0.6*U_nom/(p*w*I_n);                                                                       

k:=p*N/(3.14*a);                                                                                            

T_z:=L_z/R_z;                                                                                                  

M_nom:=k*F_n*I_n;                                                                                      

k1:=1/r_z;                                                                                                         

t_start:=2;                                                                                                        

Похожие материалы

Информация о работе