1 | model Filter |
---|
2 | Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Resistor Rf(R_ref = 1) annotation( |
---|
3 | Placement(visible = true, transformation(extent = {{-36, -4}, {-16, 16}}, rotation = 0))); |
---|
4 | Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Inductor Lf(L = 0.01) annotation( |
---|
5 | Placement(visible = true, transformation(extent = {{0, -4}, {20, 16}}, rotation = 0))); |
---|
6 | Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Capacitor Cf(C = 100e-6) annotation( |
---|
7 | Placement(visible = true, transformation(origin = {26, -16}, extent = {{-10, -10}, {10, 10}}, rotation = -90))); |
---|
8 | Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Resistor Rl(R_ref = 50) annotation( |
---|
9 | Placement(visible = true, transformation(origin = {56, -16}, extent = {{-10, -10}, {10, 10}}, rotation = -90))); |
---|
10 | Modelica.Electrical.QuasiStationary.SinglePhase.Sources.VariableVoltageSource variableVoltageSource annotation( |
---|
11 | Placement(visible = true, transformation(origin = {-58, -16}, extent = {{-10, 10}, {10, -10}}, rotation = -90))); |
---|
12 | Modelica.ComplexBlocks.Sources.ComplexConstant const(k = Complex(1, 0)) annotation( |
---|
13 | Placement(visible = true, transformation(extent = {{-96, 6}, {-76, 26}}, rotation = 0))); |
---|
14 | Modelica.Electrical.QuasiStationary.SinglePhase.Basic.Ground ground annotation( |
---|
15 | Placement(visible = true, transformation(extent = {{-28, -64}, {-8, -44}}, rotation = 0))); |
---|
16 | Modelica.Blocks.Sources.RealExpression realExpression(y = time) annotation( |
---|
17 | Placement(visible = true, transformation(extent = {{-94, -46}, {-74, -26}}, rotation = 0))); |
---|
18 | equation |
---|
19 | connect(const.y, variableVoltageSource.V) annotation( |
---|
20 | Line(points = {{-75, 16}, {-68, 16}, {-68, -12}}, color = {85, 170, 255})); |
---|
21 | connect(variableVoltageSource.pin_p, Rf.pin_p) annotation( |
---|
22 | Line(points = {{-58, -6}, {-58, 6}, {-36, 6}}, color = {85, 170, 255})); |
---|
23 | connect(Rf.pin_n, Lf.pin_p) annotation( |
---|
24 | Line(points = {{-16, 6}, {0, 6}}, color = {85, 170, 255})); |
---|
25 | connect(Lf.pin_n, Cf.pin_p) annotation( |
---|
26 | Line(points = {{20, 6}, {26, 6}, {26, -6}}, color = {85, 170, 255})); |
---|
27 | connect(Cf.pin_n, variableVoltageSource.pin_n) annotation( |
---|
28 | Line(points = {{26, -26}, {26, -38}, {-58, -38}, {-58, -26}}, color = {85, 170, 255})); |
---|
29 | connect(Rl.pin_p, Cf.pin_p) annotation( |
---|
30 | Line(points = {{56, -6}, {56, 6}, {26, 6}, {26, -6}}, color = {85, 170, 255})); |
---|
31 | connect(Rl.pin_n, variableVoltageSource.pin_n) annotation( |
---|
32 | Line(points = {{56, -26}, {56, -38}, {-58, -38}, {-58, -26}}, color = {85, 170, 255})); |
---|
33 | connect(ground.pin, variableVoltageSource.pin_n) annotation( |
---|
34 | Line(points = {{-18, -44}, {-18, -38}, {-58, -38}, {-58, -26}}, color = {85, 170, 255})); |
---|
35 | connect(realExpression.y, variableVoltageSource.f) annotation( |
---|
36 | Line(points = {{-73, -36}, {-68, -36}, {-68, -20}}, color = {0, 0, 127})); |
---|
37 | annotation( |
---|
38 | Icon(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -80}, {80, 60}}, initialScale = 0.1)), |
---|
39 | Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -60}, {80, 40}}, initialScale = 0.1), graphics = {Text(origin = {174.8, -12.002}, lineColor = {238, 46, 47}, extent = {{-220.8, 46.002}, {-128.8, 34.002}}, textString = "tensioni sul carico\nprima in scala lineare, poi log", horizontalAlignment = TextAlignment.Left)}), |
---|
40 | experiment(StopTime = 10000, StartTime = 1, Tolerance = 1e-06, Interval = 9.999)); |
---|
41 | end Filter; |
---|