Вы находитесь на странице: 1из 2

connector Signal Real val; end Signal; block SinusoidalSignal "import Modelica.

SIunits;" output Signal out_sig; parameter Real A=1.0; parameter Real o set=1.0; parameter "Modelica.SIunits.!re"uenc#" Real !=1.0; e"uation out_sig.val=o set$A%sin&'.0%(.1)*%!%time+; end SinusoidalSignal; block Summation input Signal in_sig1,in_sig'; output Signal out_sig; parameter Real scale1 =1.0; parameter Real scale'=1.0; e"uation out_sig.val=scale1%in_sig1.val$scale'%in_sig'.val; end Summation; block Integrator parameter Real init_val=0; input Signal in_sig; output Signal out_sig&val&start=init_val++; e"uation der&out_sig.val+=in_sig.val; end Integrator; block -rans er!unction input Signal in_sig; output Signal out_sig; parameter Real c1=0..; parameter Real c'=0.1; e"uation c1%der&out_sig.val+$c'%out_sig.val=in_sig.val; end -rans er!unction; block /ain input Signal in_sig; output Signal out_sig; parameter Real k=1.0; e"uation out_sig.val=k%in_sig.val; end /ain;

model 0ontrolS#stem' SinusoidalSignal sinsig&A=0.',!=0.(,o set=1.0+; Summation di &scale'=11.0+,sum; /ain 23&k=0.)+, 2I&k=1.0+; Integrator integrator; -rans er!unction motor&c1=0..,c'=0.1+; e"uation connect &sinsig.out_sig,di .in_sig1+; connect&di .out_sig,23.in_sig+; connect&23.out_sig,2I.in_sig+; connect&23.out_sig,sum.in_sig1+; connect&2I.out_sig,integrator.in_sig+; connect&integrator.out_sig,sum.in_sig'+; connect&sum.out_sig,motor.in_sig+; connect&motor.out_sig,di .in_sig'+; end 0ontrolS#stem';