Ticket #6422: BiChopper.mo

File BiChopper.mo, 6.2 KB (added by ahaumer@…, 5 years ago)
Line 
1within ;
2model BiChopper
3 extends Modelica.Icons.Example;
4 Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltageLV(V=12)
5 annotation (Placement(transformation(
6 extent={{-10,10},{10,-10}},
7 rotation=270,
8 origin={-90,0})));
9 Modelica.Electrical.Analog.Basic.Resistor resistorLV(R=0.01)
10 annotation (Placement(transformation(extent={{-90,40},{-70,60}})));
11 Modelica.Electrical.Analog.Basic.Ground ground
12 annotation (Placement(transformation(extent={{-100,-70},{-80,-50}})));
13 Modelica.Electrical.Analog.Sources.ConstantVoltage constantVoltageHV(V=24)
14 annotation (Placement(transformation(
15 extent={{-10,-10},{10,10}},
16 rotation=270,
17 origin={90,0})));
18 Modelica.Electrical.Analog.Basic.Resistor resistorHV(R=0.01)
19 annotation (Placement(transformation(extent={{90,40},{70,60}})));
20 Modelica.Blocks.Sources.Ramp ramp(
21 height=1,
22 duration=1,
23 offset=0,
24 startTime=0.5)
25 annotation (Placement(transformation(extent={{10,-40},{30,-20}})));
26 Modelica.Electrical.Analog.Basic.Resistor resistor(R=1e-3, useHeatPort=false)
27 annotation (Placement(transformation(extent={{-50,40},{-30,60}})));
28 Modelica.Electrical.Analog.Basic.Inductor inductor(i(fixed=true), L=4.7e-6)
29 annotation (Placement(transformation(extent={{-20,40},{0,60}})));
30 Modelica.Electrical.Analog.Ideal.IdealDiode diodeLS(useHeatPort=false)
31 "Free wheeling diode low side" annotation (Placement(
32 transformation(
33 origin={-20,0},
34 extent={{-10,10},{10,-10}},
35 rotation=90)));
36 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor transistorLS(useHeatPort=false)
37 "Switching transistor low side" annotation (
38 Placement(transformation(
39 origin={0,0},
40 extent={{-10,-10},{10,10}},
41 rotation=270)));
42 Modelica.Electrical.Analog.Ideal.IdealDiode diodeHS(useHeatPort=false)
43 "Free wheeling diode high side" annotation (Placement(
44 transformation(
45 origin={30,70},
46 extent={{-10,10},{10,-10}},
47 rotation=0)));
48 Modelica.Electrical.Analog.Ideal.IdealGTOThyristor transistorHS(useHeatPort=false)
49 "Switching transistor hugh side" annotation (
50 Placement(transformation(
51 origin={30,50},
52 extent={{-10,-10},{10,10}},
53 rotation=180)));
54 Modelica.Electrical.PowerConverters.DCDC.Control.SignalPWM pwm(
55 useConstantDutyCycle=false, f=10e3)
56 annotation (Placement(transformation(
57 extent={{-10,-10},{10,10}},
58 rotation=90,
59 origin={40,0})));
60 Modelica.Electrical.Analog.Basic.Capacitor capacitorLV(v(fixed=true, start=12), C=470e-6)
61 annotation (
62 Placement(transformation(
63 extent={{-10,-10},{10,10}},
64 rotation=270,
65 origin={-60,0})));
66 Modelica.Electrical.Analog.Basic.Capacitor capacitorHV(v(fixed=true, start=24), C=100e-6)
67 annotation (
68 Placement(transformation(
69 extent={{-10,10},{10,-10}},
70 rotation=270,
71 origin={60,0})));
72equation
73 connect(constantVoltageLV.p, resistorLV.p)
74 annotation (Line(points={{-90,10},{-90,50}}, color={0,0,255}));
75 connect(constantVoltageLV.n, ground.p)
76 annotation (Line(points={{-90,-10},{-90,-50}}, color={0,0,255}));
77 connect(resistorHV.p, constantVoltageHV.p)
78 annotation (Line(points={{90,50},{90,10}}, color={0,0,255}));
79 connect(resistorLV.n, resistor.p)
80 annotation (Line(points={{-70,50},{-50,50}}, color={0,0,255}));
81 connect(inductor.n, transistorLS.p)
82 annotation (Line(points={{0,50},{0,14},{
83 1.77636e-15,14},{1.77636e-15,10}},
84 color={0,0,255}));
85 connect(diodeLS.n, transistorLS.p)
86 annotation (Line(points={{-20,10},{1.77636e-15,10}}, color={0,0,255}));
87 connect(ground.p, transistorLS.n)
88 annotation (Line(points={{-90,-50},{
89 -1.77636e-15,-50},{-1.77636e-15,-10}},
90 color={0,0,255}));
91 connect(transistorLS.n, diodeLS.p)
92 annotation (Line(points={{-1.77636e-15,-10},
93 {-20,-10}}, color={0,0,255}));
94 connect(ground.p, constantVoltageHV.n)
95 annotation (Line(points={{-90,-50},{90,-50},{90,-10}}, color={0,0,255}));
96 connect(inductor.n, transistorHS.n)
97 annotation (Line(points={{0,50},{20,50}}, color={0,0,255}));
98 connect(transistorHS.p, resistorHV.n)
99 annotation (Line(points={{40,50},{70,50}}, color={0,0,255}));
100 connect(diodeHS.p, transistorHS.n)
101 annotation (Line(points={{20,70},{20,50}}, color={0,0,255}));
102 connect(pwm.notFire, transistorHS.fire)
103 annotation (Line(points={{29,6},{20,6},{20,38}}, color={255,0,255}));
104 connect(pwm.fire, transistorLS.fire)
105 annotation (Line(points={{29,-6},{20,-6},{20,-10},{12,-10}},
106 color={255,0,255}));
107 connect(ramp.y, pwm.dutyCycle)
108 annotation (Line(points={{31,-30},{40,-30},{40,-12}},color={0,0,127}));
109 connect(diodeHS.n, transistorHS.p)
110 annotation (Line(points={{40,70},{40,50}}, color={0,0,255}));
111 connect(transistorHS.p, capacitorHV.p)
112 annotation (Line(points={{40,50},{60,50},{60,10}}, color={0,0,255}));
113 connect(ground.p, capacitorHV.n)
114 annotation (Line(points={{-90,-50},{60,-50},
115 {60,-10}}, color={0,0,255}));
116 connect(ground.p, capacitorLV.n)
117 annotation (Line(points={{-90,-50},{-60,-50},
118 {-60,-10}}, color={0,0,255}));
119 connect(resistor.n, inductor.p)
120 annotation (Line(points={{-30,50},{-20,50}},
121 color={0,0,255}));
122 connect(resistor.p, capacitorLV.p)
123 annotation (Line(points={{-50,50},{-60,50},{-60,10}},
124 color={0,0,255}));
125 annotation (experiment(
126 StopTime=2,
127 Interval=2e-06,
128 Tolerance=1e-06, StartTime = 0),
129 Diagram(coordinateSystem(extent={{-100,-100},{100,100}})),
130 Icon(coordinateSystem(extent={{-120,-100},{100,100}})),
131 uses(Modelica(version="4.0.0")),
132 Documentation(info="<html>
133<p>
134This is a model of a bidirectional DC/DC converter to couple a 12 V battery with a 48 V battery in automotive systems.
135</p>
136<p>
137&copy; Prof. A. Haumer / OTH Regensburg, Germaby
138</p>
139</html>"));
140end BiChopper;