within ; model EMsystem_cosim_frequency Modelica.Blocks.Interfaces.RealOutput AMPLITUDE2 annotation (Placement(transformation(extent={{64,-72},{84,-52}}))); Modelica.Blocks.Interfaces.RealInput VELOCITY2 annotation (Placement(transformation(extent={{136,81},{96,39}}))); Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage(freqHz=2000, V=0.002) annotation (Placement(transformation( extent={{10,-10},{-10,10}}, rotation=90, origin={-76,-4}))); Modelica.Electrical.Analog.Basic.Resistor resistor(R=5) annotation (Placement(transformation(extent={{-54,14},{-34,34}}))); Modelica.Electrical.Analog.Basic.Inductor inductor(L=5e-5) annotation (Placement(transformation(extent={{-18,14},{2,34}}))); Modelica.Electrical.Analog.Sources.SignalVoltage signalVoltage annotation (Placement(transformation(extent={{14,14},{34,34}}))); Modelica.Electrical.Analog.Basic.Ground ground annotation (Placement(transformation(extent={{-86,-62},{-66,-42}}))); Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor annotation (Placement(transformation(extent={{24,-36},{4,-16}}))); Modelica.Blocks.Math.Gain gain(k=3.14159) annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={42,60}))); Modelica.Blocks.Math.Gain gain1(k=3.14159) annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=180, origin={40,-62}))); Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage1( freqHz=2000, V=0.002) annotation (Placement(transformation( extent={{10,-10},{-10,10}}, rotation=90, origin={-74,-162}))); Modelica.Electrical.Analog.Basic.Resistor resistor1( R=5) annotation (Placement(transformation(extent={{-52,-144},{-32,-124}}))); Modelica.Electrical.Analog.Basic.Inductor inductor1( L=5e-5) annotation (Placement(transformation(extent={{-16,-144},{4,-124}}))); Modelica.Electrical.Analog.Sources.SignalVoltage signalVoltage1 annotation (Placement(transformation(extent={{16,-144},{36,-124}}))); Modelica.Electrical.Analog.Basic.Ground ground1 annotation (Placement(transformation(extent={{-84,-220},{-64,-200}}))); Modelica.Electrical.Analog.Sensors.CurrentSensor currentSensor1 annotation (Placement(transformation(extent={{26,-194},{6,-174}}))); Modelica.Blocks.Math.Gain gain2( k=3.14159) annotation (Placement( transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={48,-98}))); Modelica.Blocks.Math.Gain gain3(k=3.14159) annotation (Placement( transformation( extent={{10,-10},{-10,10}}, rotation=180, origin={42,-220}))); Modelica.Blocks.Interfaces.RealOutput AMPLITUDE1 annotation (Placement(transformation(extent={{66,-230},{86,-210}}))); Modelica.Blocks.Interfaces.RealInput VELOCITY1 annotation (Placement(transformation(extent={{142,-77},{102,-119}}))); Modelica.Blocks.Math.Gain gain4(k=1e-3) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={72,60}))); Modelica.Blocks.Math.Gain gain5(k=1e-3) annotation (Placement(transformation( extent={{-10,-10},{10,10}}, rotation=180, origin={80,-98}))); equation connect(sineVoltage.p, resistor.p) annotation (Line( points={{-76,6},{-76,24},{-54,24}}, color={0,0,255}, smooth=Smooth.None)); connect(resistor.n, inductor.p) annotation (Line( points={{-34,24},{-18,24}}, color={0,0,255}, smooth=Smooth.None)); connect(inductor.n, signalVoltage.p) annotation (Line( points={{2,24},{14,24}}, color={0,0,255}, smooth=Smooth.None)); connect(sineVoltage.n, ground.p) annotation (Line( points={{-76,-14},{-76,-42}}, color={0,0,255}, smooth=Smooth.None)); connect(signalVoltage.n, currentSensor.p) annotation (Line( points={{34,24},{70,24},{70,-26},{24,-26}}, color={0,0,255}, smooth=Smooth.None)); connect(currentSensor.n, sineVoltage.n) annotation (Line( points={{4,-26},{-76,-26},{-76,-14}}, color={0,0,255}, smooth=Smooth.None)); connect(gain.y, signalVoltage.v) annotation (Line( points={{31,60},{24,60},{24,31}}, color={0,0,127}, smooth=Smooth.None)); connect(currentSensor.i, gain1.u) annotation (Line( points={{14,-36},{14,-62},{28,-62}}, color={0,0,127}, smooth=Smooth.None)); connect(gain1.y, AMPLITUDE2) annotation (Line( points={{51,-62},{74,-62}}, color={0,0,127}, smooth=Smooth.None)); connect(sineVoltage1.p, resistor1.p) annotation (Line( points={{-74,-152},{-74,-134},{-52,-134}}, color={0,0,255}, smooth=Smooth.None)); connect(resistor1.n, inductor1.p) annotation (Line( points={{-32,-134},{-16,-134}}, color={0,0,255}, smooth=Smooth.None)); connect(inductor1.n, signalVoltage1.p) annotation (Line( points={{4,-134},{16,-134}}, color={0,0,255}, smooth=Smooth.None)); connect(sineVoltage1.n, ground1.p) annotation (Line( points={{-74,-172},{-74,-200}}, color={0,0,255}, smooth=Smooth.None)); connect(signalVoltage1.n, currentSensor1.p) annotation (Line( points={{36,-134},{72,-134},{72,-184},{26,-184}}, color={0,0,255}, smooth=Smooth.None)); connect(currentSensor1.n, sineVoltage1.n) annotation (Line( points={{6,-184},{-74,-184},{-74,-172}}, color={0,0,255}, smooth=Smooth.None)); connect(gain2.y, signalVoltage1.v) annotation (Line( points={{37,-98},{26,-98},{26,-127}}, color={0,0,127}, smooth=Smooth.None)); connect(currentSensor1.i, gain3.u) annotation (Line( points={{16,-194},{16,-220},{30,-220}}, color={0,0,127}, smooth=Smooth.None)); connect(gain3.y, AMPLITUDE1) annotation (Line( points={{53,-220},{76,-220}}, color={0,0,127}, smooth=Smooth.None)); connect(gain4.u, VELOCITY2) annotation (Line( points={{84,60},{116,60}}, color={0,0,127}, smooth=Smooth.None)); connect(gain4.y, gain.u) annotation (Line( points={{61,60},{54,60}}, color={0,0,127}, smooth=Smooth.None)); connect(VELOCITY1, gain5.u) annotation (Line( points={{122,-98},{92,-98}}, color={0,0,127}, smooth=Smooth.None)); connect(gain5.y, gain2.u) annotation (Line( points={{69,-98},{60,-98}}, color={0,0,127}, smooth=Smooth.None)); annotation (uses(Modelica(version="3.2")), Diagram(coordinateSystem( preserveAspectRatio=false,extent={{-100,-100},{100,100}}), graphics)); end EMsystem_cosim_frequency;