Ticket #5849: Buck.mo

File Buck.mo, 3.6 KB (added by massimo ceraolo, 4 years ago)
Line 
1model Buck
2 Modelica.Electrical.Analog.Sources.ConstantVoltage V1(V = 100) annotation(
3 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {-66, -4})));
4 Modelica.Electrical.Analog.Ideal.IdealDiode diode annotation(
5 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 90, origin = {-32, -32})));
6 Modelica.Electrical.Analog.Basic.Resistor Rf(R = 0.5) annotation(
7 Placement(transformation(extent = {{-16, -14}, {4, 6}})));
8 Modelica.Electrical.Analog.Basic.Inductor Lf(L = 10e-3) annotation(
9 Placement(transformation(extent = {{14, -14}, {34, 6}})));
10 Modelica.Blocks.Sources.SawTooth sawTooth(period = 1 / 1000) annotation(
11 Placement(transformation(extent = {{10, 10}, {-10, -10}}, rotation = 180, origin = {58, 36})));
12 Modelica.Blocks.Logical.LessThreshold lessThreshold(threshold = 0.55) annotation(
13 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 180, origin = {8, 22})));
14 Modelica.Electrical.Analog.Basic.Ground ground annotation(
15 Placement(transformation(extent = {{-76, -78}, {-56, -58}})));
16 Modelica.Electrical.Analog.Ideal.IdealClosingSwitch SW annotation(
17 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = -90, origin = {-32, 22})));
18 Modelica.Electrical.Analog.Sources.ConstantVoltage V2(V = 50) annotation(
19 Placement(transformation(extent = {{-10, -10}, {10, 10}}, rotation = 270, origin = {56, -28})));
20equation
21 connect(V1.n, diode.p) annotation(
22 Line(points = {{-66, -14}, {-66, -48}, {-32, -48}, {-32, -42}}, color = {0, 0, 255}, smooth = Smooth.None));
23 connect(Rf.p, diode.n) annotation(
24 Line(points = {{-16, -4}, {-32, -4}, {-32, -22}}, color = {0, 0, 255}, smooth = Smooth.None));
25 connect(Lf.p, Rf.n) annotation(
26 Line(points = {{14, -4}, {4, -4}}, color = {0, 0, 255}, smooth = Smooth.None));
27 connect(ground.p, V1.n) annotation(
28 Line(points = {{-66, -58}, {-66, -14}}, color = {0, 0, 255}, smooth = Smooth.None));
29 connect(sawTooth.y, lessThreshold.u) annotation(
30 Line(points = {{69, 36}, {72, 36}, {72, 16}, {28, 16}, {28, 22}, {20, 22}}, color = {0, 0, 127}, smooth = Smooth.None));
31 connect(SW.p, V1.p) annotation(
32 Line(points = {{-32, 32}, {-32, 44}, {-66, 44}, {-66, 6}}, color = {0, 0, 255}, smooth = Smooth.None));
33 connect(SW.n, diode.n) annotation(
34 Line(points = {{-32, 12}, {-32, -22}}, color = {0, 0, 255}, smooth = Smooth.None));
35 connect(lessThreshold.y, SW.control) annotation(
36 Line(points = {{-3, 22}, {-20, 22}}, color = {255, 0, 255}, smooth = Smooth.None));
37 connect(Lf.n, V2.p) annotation(
38 Line(points = {{34, -4}, {56, -4}, {56, -18}}, color = {0, 0, 255}, smooth = Smooth.None));
39 connect(V2.n, diode.p) annotation(
40 Line(points = {{56, -38}, {56, -48}, {-32, -48}, {-32, -42}}, color = {0, 0, 255}, smooth = Smooth.None));
41 annotation(
42 Diagram(coordinateSystem(preserveAspectRatio = false, extent = {{-100, -80}, {100, 60}}), graphics = {Text(lineColor = {238, 46, 47}, fillColor = {255, 255, 255}, pattern = LinePattern.None, fillPattern = FillPattern.Solid, extent = {{-136, 70}, {-28, 46}}, textString = "Es proposto: usare Ra e La di MSL
43fare una simulazione in cui la macchina assorba
44circa 10A, alimentata con 90V (medi)
45f=250 Hz", horizontalAlignment = TextAlignment.Left)}),
46 experiment(StopTime = 0.02),
47 experimentSetupOutput,
48 Documentation(info = "<html>
49<p>Frazionatore abbassatore su carico resistivo con fitro L-C per la regolarizzazione della tensione sul carico.</p>
50</html>"),
51 Icon(coordinateSystem(extent = {{-100, -80}, {100, 80}})));
52end Buck;