Skip to content

Commit

Permalink
Merge branch 'ControlledDrives' of https://github.com/AHaumer/Modelic…
Browse files Browse the repository at this point in the history
…aStandardLibrary into ControlledDrives

# Conflicts:
#	Modelica/Electrical/Machines/Examples/ControlledDCDrives/UsersGuide/References.mo
  • Loading branch information
AHaumer committed May 24, 2021
2 parents f8cf181 + 17df77e commit 2f31c4d
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ equation
connect(loadInertia.flange_b, loadTorque.flange)
annotation (Line(points={{70,-30},{80,-30}}));
connect(speedController.y, tau2i.u)
annotation (Line(points={{-59,0},{-52,0},{-52,1.55431e-15}},
color={0,0,127}));
annotation (Line(points={{-59,0},{-52,0}}, color={0,0,127}));
annotation (experiment(StopTime=2.5, Interval=0.5e-04, Tolerance=1e-06), Documentation(info="<html>
<p>This model demonstrates how a position controller for a speed controlled DC PM drive works.</p>
<p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ equation
connect(speedSensor.w, speedController.u_m) annotation (Line(points={{50,-71},
{50,-90},{-76,-90},{-76,-12}}, color={0,0,127}));
connect(speedController.y, tau2i.u)
annotation (Line(points={{-59,0},{-56,0},{-56,1.77636e-15},{-52,1.77636e-15}},
color={0,0,127}));
annotation (Line(points={{-59,0},{-56,0} ,{-52,0}}, color={0,0,127}));
connect(step.y, slewRateLimiter.u) annotation (Line(points={{-139,0},{-130,0},
{-130,-20},{-122,-20}}, color={0,0,127}));
connect(speedController.u, preFilter.y) annotation (Line(points={{-82,0},{-90,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ within Modelica.Electrical.Machines.Examples.ControlledDCDrives.UsersGuide;
class CascadedControl "Concept of cascaded control"
extends Modelica.Icons.Information;
annotation (DocumentationClass=true, Documentation(info="<html>
<p>The concept of cascaded control is hown in Fig.1.</p>
<p>The concept of cascaded control is shown in Fig. 1.</p>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
<caption align=\"bottom\"><strong>Fig. 1:</strong> Structure of cascaded control</caption>
<tr>
Expand All @@ -12,7 +12,7 @@ class CascadedControl "Concept of cascaded control"
</tr>
</table>
<p>
Fig.2 shows the euqations describing the drive, using for parameterizing the controllers.
Fig. 2 shows the equations describing the drive, using for parameterizing the controllers.
The behaviour of the actuator is a delay which can be approximated by a first order.
Additionally, filtering or sampling the current defines an additional delay which can be approximated by a first order.
Both delays define the sum of small time constants T<sub>&sigma;</sub>.
Expand Down Expand Up @@ -52,7 +52,7 @@ which aims at optimal transfer function with respect to disturbance (load torque
<li>Limitation of the output (reference torque) to the possible torque (current)</li>
<li>Subsequently, an anti-windup method</li>
<li>If reference speed is not prescribed by a correctly parameterized position controller which is commanded by a kinematicPTP (optimal path planning),
reference has to be filtered or limited in slew rate.</li>
reference has to be filtered or limited in slew rate</li>
</ul>
<table border=\"0\" cellspacing=\"0\" cellpadding=\"2\">
<caption align=\"bottom\"><strong>Fig. 4:</strong> Parameterization of the speed controller</caption>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ There are two choices for the DC-DC inverter that can be compared:
</p>
<ul>
<li>Switching inverter: Reference voltage and actual current are sampled once during the switching interval, thus defining the delays (see Fig. 1).</li>
<li>Averaging inverter: The delays are approximated using first order - blocks.</li>
<li>Averaging inverter: The delays are approximated using first order blocks.</li>
</ul>
<p>
Investigating the correct parameterization of the controller or the energy consumption, the averaging inverter is sufficient and shows much higher performance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within Modelica.Electrical.Machines.Examples.ControlledDCDrives.Utilities;
model DcdcInverter "DC-DC inverter"
model DcdcInverter "DC/DC inverter"
import Modelica.Electrical.Machines.Examples.ControlledDCDrives.Utilities.FilterType;
parameter Boolean useIdealInverter=true "Use ideal averaging inverter, otherwise switching inverter";
parameter SI.Frequency fS "Switching frequency";
Expand Down Expand Up @@ -204,7 +204,7 @@ equation
extent={{-100,-50},{-80,-70}},
textColor={128,128,128},
textString="i")}), Documentation(info="<html>
<p>This is a model of a DC-DC inverter. The level of detail of the DC-DC inverter may be chosen from ideal averaging or switching.</p>
<p>This is a model of a DC/DC inverter. The level of detail of the DC/DC inverter may be chosen from ideal averaging or switching.</p>
<p>Reference voltage is limited to actual battery voltage.</p>
<p>Battery voltage and motor current are measured.</p>
</html>"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ record DriveDataDCPM
parameter SI.Inertia JL=motorData.Jr "Load inertia"
annotation(Dialog(group="Load"));
//Limits
parameter SI.Voltage VaMax=1.2*motorData.VaNominal "Maximum Voltage"
parameter SI.Voltage VaMax=1.2*motorData.VaNominal "Maximum voltage"
annotation(Dialog(tab="Controller", group="Limits"));
parameter SI.Current IaMax=1.5*motorData.IaNominal "Maximum current"
annotation(Dialog(tab="Controller", group="Limits"));
parameter SI.Torque tauMax=kPhi*IaMax "Maximum el. torque"
parameter SI.Torque tauMax=kPhi*IaMax "Maximum electrical torque"
annotation(Dialog(tab="Controller", group="Limits", enable=false));
parameter SI.AngularVelocity wMax=w0 "Maximum speed"
annotation(Dialog(tab="Controller", group="Limits"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within Modelica.Electrical.Machines.Examples.ControlledDCDrives.Utilities;
model IdealDcDc "Ideal DC-DC inverter"
model IdealDcDc "Ideal DC/DC inverter"
parameter SI.Frequency fS "Switching frequency";
parameter SI.Time Tdv=0.5/fS "Dead time of inverter voltage";
parameter SI.Time Ti=1e-6 "Time constant of integral power controller";
Expand Down Expand Up @@ -122,6 +122,6 @@ equation
extent={{-40,-60},{40,-80}},
textColor={128,128,128},
textString="Mot")}), Documentation(info="<html>
<p>This is a model of an ideal DC-DC inverter based on a power balance achieved by an integral controller.</p>
<p>This is a model of an ideal DC/DC inverter based on a power balance achieved by an integral controller.</p>
</html>"));
end IdealDcDc;
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ equation
annotation (Documentation(info="<html>
<p>This is a partial model of a controlled DC PM drive.</p>
<p>
Electrical power is taken from a battery (constant voltage with inner resistance) and fed to the motor via a DC-DC inverter.
The level of detail of the DC-DC inverter may be chosen from ideal averaging or switching.
The DC-DC inverter is commanded by the current controller.
Electrical power is taken from a battery (constant voltage with inner resistance) and fed to the motor via a DC/DC inverter.
The level of detail of the DC/DC inverter may be chosen from ideal averaging or switching.
The DC/DC inverter is commanded by the current controller.
The current controller is parameterized according to the absolute optimum.
</p>
<p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
within Modelica.Electrical.Machines.Examples.ControlledDCDrives.Utilities;
model SwitchingDcDc "Switching DC-DC inverter"
model SwitchingDcDc "Switching DC/DC inverter"
parameter SI.Frequency fS "Switching frequency";
parameter SI.Voltage VMax "Maximum Voltage";
parameter SI.Resistance RonT=1e-05
Expand Down Expand Up @@ -91,6 +91,6 @@ equation
extent={{-40,-60},{40,-80}},
textColor={128,128,128},
textString="Mot")}), Documentation(info="<html>
<p>This is a model of a switching DC-DC inverter based on a H-bridge.</p>
<p>This is a model of a switching DC/DC inverter based on a H-bridge.</p>
</html>"));
end SwitchingDcDc;

0 comments on commit 2f31c4d

Please sign in to comment.