|
| 1 | +within OpenIPSL.Electrical.Controls.VariableSpeedDrive.ControllerLogic; |
| 2 | +model VoltsHertzController "Volts/Hertz controller model" |
| 3 | + extends OpenIPSL.Electrical.Essentials.pfComponent( |
| 4 | + final enabledisplayPF=false, |
| 5 | + final enablefn=false, |
| 6 | + final enableV_b=false, |
| 7 | + final enableangle_0=false, |
| 8 | + final enablev_0=false, |
| 9 | + final enableQ_0=false, |
| 10 | + final enableS_b=true); |
| 11 | + |
| 12 | + import Modelica.Constants.pi; |
| 13 | + |
| 14 | + parameter Real f_max = 80 "Maximum input voltage frequency" annotation (Dialog(group="VSD project specifics")); |
| 15 | + parameter Real f_min = 40 "Minimum input voltage frequency" annotation (Dialog(group="VSD project specifics")); |
| 16 | + parameter Real m0= 0.1 "Initial PWM Modulation Value" annotation (Dialog(group="VSD project specifics")); |
| 17 | + |
| 18 | + Modelica.Blocks.Interfaces.RealInput motor_speed "Motor speed from motor model" annotation (Placement( |
| 19 | + transformation( |
| 20 | + extent={{-20,-20},{20,20}}, |
| 21 | + rotation=0, |
| 22 | + origin={-120,70}),iconTransformation( |
| 23 | + extent={{-20,-20},{20,20}}, |
| 24 | + rotation=180, |
| 25 | + origin={120,40}))); |
| 26 | + OpenIPSL.NonElectrical.Continuous.SimpleLag Speed_Sensor(K=1, T=Tr, |
| 27 | + y_start=Modelica.Constants.eps) |
| 28 | + annotation (Placement(transformation(extent={{-38,-22},{-18,-2}}))); |
| 29 | + parameter OpenIPSL.Types.Time Tr=0.01 "Time constant for speed sensor filter" |
| 30 | + annotation (Dialog(group="Control Parameters")); |
| 31 | + Modelica.Blocks.Math.Add add(k1=-1) |
| 32 | + annotation (Placement(transformation(extent={{-82,-78},{-62,-58}}))); |
| 33 | + Modelica.Blocks.Nonlinear.Limiter limiter(uMax=we_max, uMin=we_min) |
| 34 | + annotation (Placement(transformation(extent={{60,-50},{80,-30}}))); |
| 35 | + Modelica.Blocks.Math.Gain gain(k=Kp) |
| 36 | + annotation (Placement(transformation(extent={{-48,-60},{-28,-40}}))); |
| 37 | + Modelica.Blocks.Continuous.Integrator integrator(k=Ki, |
| 38 | + initType=Modelica.Blocks.Types.Init.InitialState, |
| 39 | + y_start=m0*(2*Modelica.Constants.pi*SysData.fn)) |
| 40 | + annotation (Placement(transformation(extent={{-48,-92},{-28,-72}}))); |
| 41 | + Modelica.Blocks.Math.Add add1(k1=+1) |
| 42 | + annotation (Placement(transformation(extent={{-14,-76},{6,-56}}))); |
| 43 | + Modelica.Blocks.Math.Add add2(k1=+1) |
| 44 | + annotation (Placement(transformation(extent={{18,-50},{38,-30}}))); |
| 45 | + Modelica.Blocks.Interfaces.RealOutput we(start=0.01*2*Modelica.Constants.pi* |
| 46 | + SysData.fn) |
| 47 | + "Synchronous speed" |
| 48 | + annotation (Placement(transformation(extent={{100,-60},{140,-20}}), |
| 49 | + iconTransformation(extent={{100,-60},{140,-20}}))); |
| 50 | + Modelica.Blocks.Math.Gain gain1(k=1) |
| 51 | + annotation (Placement(transformation(extent={{10,-10},{-10,10}}, |
| 52 | + rotation=0, |
| 53 | + origin={70,10}))); |
| 54 | + Modelica.Blocks.Interfaces.RealOutput m "PWM modulation index" |
| 55 | + annotation (Placement(transformation(extent={{-20,-20},{20,20}}, |
| 56 | + rotation=90, |
| 57 | + origin={60,120}), iconTransformation( |
| 58 | + extent={{-20,-20},{20,20}}, |
| 59 | + rotation=90, |
| 60 | + origin={60,120}))); |
| 61 | + Real Kf= 1/(2*pi*fn) "Gain value multiplied with input signal" |
| 62 | + annotation (Dialog(group="Control Parameters")); |
| 63 | + parameter Real Kp=5 "PI proportional gain" |
| 64 | + annotation (Dialog(group="Control Parameters")); |
| 65 | + parameter Real Ki=0.1 "PI integrator gain" |
| 66 | + annotation (Dialog(group="Control Parameters")); |
| 67 | + parameter Real we_max=2*pi*f_max "Maximum Synchronous Speed" |
| 68 | + annotation (Dialog(group="Control Parameters")); |
| 69 | + parameter Real we_min=2*pi*f_min "Minimum Synchronous Speed" |
| 70 | + annotation (Dialog(group="Control Parameters")); |
| 71 | + Modelica.Blocks.Interfaces.RealInput Vc "Capacitor voltage value" annotation (Placement(transformation( |
| 72 | + extent={{-20,-20},{20,20}}, |
| 73 | + rotation=270, |
| 74 | + origin={-60,120}), iconTransformation( |
| 75 | + extent={{-20,-20},{20,20}}, |
| 76 | + origin={-60,120}, |
| 77 | + rotation=270))); |
| 78 | + Modelica.Blocks.Interfaces.RealInput W_ref "Synchronous speed reference" |
| 79 | + annotation (Placement(transformation(extent={{-140,-20},{-100,20}}), |
| 80 | + iconTransformation(extent={{-140,-20},{-100,20}}))); |
| 81 | + Modelica.Blocks.Nonlinear.Limiter limiter1(uMax=1, uMin=0) annotation ( |
| 82 | + Placement(transformation( |
| 83 | + extent={{-10,-10},{10,10}}, |
| 84 | + rotation=0, |
| 85 | + origin={18,40}))); |
| 86 | + Modelica.Blocks.Math.Gain gain2(k=1/V_b) |
| 87 | + annotation (Placement(transformation(extent={{-32,70},{-12,90}}))); |
| 88 | + Modelica.Blocks.Sources.RealExpression realExpression(y=Kf) |
| 89 | + annotation (Placement(transformation(extent={{-72,36},{-52,56}}))); |
| 90 | + Modelica.Blocks.Math.Product product1 |
| 91 | + annotation (Placement(transformation(extent={{-30,30},{-10,50}}))); |
| 92 | + Modelica.Blocks.Continuous.FirstOrder firstOrder( |
| 93 | + T=0.01, |
| 94 | + initType=Modelica.Blocks.Types.Init.InitialState, |
| 95 | + y_start=m0) |
| 96 | + annotation (Placement(transformation(extent={{46,30},{66,50}}))); |
| 97 | +equation |
| 98 | + connect(motor_speed, Speed_Sensor.u) annotation (Line(points={{-120,70},{-84,70}, |
| 99 | + {-84,-12},{-40,-12}},color={0,0,127})); |
| 100 | + connect(Speed_Sensor.y, add.u1) annotation (Line(points={{-17,-12},{-12,-12},{ |
| 101 | + -12,-34},{-88,-34},{-88,-62},{-84,-62}}, |
| 102 | + color={0,0,127})); |
| 103 | + connect(add.y, gain.u) annotation (Line(points={{-61,-68},{-56,-68},{-56,-50}, |
| 104 | + {-50,-50}}, |
| 105 | + color={0,0,127})); |
| 106 | + connect(integrator.u, gain.u) annotation (Line(points={{-50,-82},{-56,-82},{-56, |
| 107 | + -50},{-50,-50}}, |
| 108 | + color={0,0,127})); |
| 109 | + connect(gain.y, add1.u1) annotation (Line(points={{-27,-50},{-24,-50},{-24,-60}, |
| 110 | + {-16,-60}}, |
| 111 | + color={0,0,127})); |
| 112 | + connect(integrator.y, add1.u2) annotation (Line(points={{-27,-82},{-24,-82},{-24, |
| 113 | + -72},{-16,-72}},color={0,0,127})); |
| 114 | + connect(add2.u1, Speed_Sensor.y) |
| 115 | + annotation (Line(points={{16,-34},{-12,-34},{-12,-12},{-17,-12}}, |
| 116 | + color={0,0,127})); |
| 117 | + connect(add.u2, W_ref) annotation (Line(points={{-84,-74},{-94,-74},{-94,0},{-120, |
| 118 | + 0}}, color={0,0,127})); |
| 119 | + connect(Vc, gain2.u) annotation (Line(points={{-60,120},{-60,80},{-34,80}}, |
| 120 | + color={0,0,127})); |
| 121 | + connect(gain1.u, we) annotation (Line(points={{82,10},{94,10},{94,-40},{120,-40}}, |
| 122 | + color={0,0, |
| 123 | + 127})); |
| 124 | + connect(add1.y, add2.u2) annotation (Line(points={{7,-66},{16,-66},{16,-46}}, |
| 125 | + color={0,0,127})); |
| 126 | + connect(add2.y, limiter.u) |
| 127 | + annotation (Line(points={{39,-40},{58,-40}}, color={0,0,127})); |
| 128 | + connect(limiter.y, we) annotation (Line(points={{81,-40},{120,-40}}, |
| 129 | + color={0,0,127})); |
| 130 | + connect(integrator.u, add.y) annotation (Line(points={{-50,-82},{-56,-82},{-56, |
| 131 | + -68},{-61,-68}}, color={0,0,127})); |
| 132 | + connect(realExpression.y, product1.u1) |
| 133 | + annotation (Line(points={{-51,46},{-32,46}}, color={0,0,127})); |
| 134 | + connect(gain1.y, product1.u2) annotation (Line(points={{59,10},{-32,10},{-32,34}}, |
| 135 | + color={0,0,127})); |
| 136 | + connect(limiter1.y, firstOrder.u) annotation (Line(points={{29,40},{44,40}}, |
| 137 | + color={0,0,127})); |
| 138 | + connect(firstOrder.y, m) annotation (Line(points={{67,40},{72,40},{72,96},{60, |
| 139 | + 96},{60,120}}, color={0,0,127})); |
| 140 | + connect(product1.y, limiter1.u) annotation (Line(points={{-9,40},{6,40}}, |
| 141 | + color={0,0,127})); |
| 142 | + annotation (preferredView = "info", Icon(coordinateSystem(preserveAspectRatio=false, extent={{-100,-100}, |
| 143 | + {100,100}}), graphics={ |
| 144 | + Rectangle( |
| 145 | + extent={{-100,100},{100,-100}}, |
| 146 | + lineColor={28,108,200}), Text( |
| 147 | + extent={{-80,80},{80,-80}}, |
| 148 | + lineColor={28,108,200}, |
| 149 | + textString="V/f |
| 150 | +Control")}), Diagram( |
| 151 | + coordinateSystem(preserveAspectRatio=false, extent={{-100,-100},{100,100}})), |
| 152 | + Documentation(info="<html> |
| 153 | +<p>The VoltsHertzController component represents the controller logic for the variable speed drive. The volts hertz control is a simple and widely used method for controlling the speed of an AC induction motor by adjusting the voltage and frequency supplied to the motor at a constant ratio.</p> |
| 154 | +<p>The model has three inputs and two output connectors. The W_ref input connector represents the reference synchronous speed that is user defined, |
| 155 | +motor_speed input is the motor speed that is generated by the motor model, and the Vc input is the capacitor voltage value from the AC2DCandDC2AC component. |
| 156 | +The m output is the PWM modulation index, and the we output is the synchronous speed that is used in the controllable motor model.</p> |
| 157 | +<p>The modelling of such devices is based, mainly, on the following reference:</p> |
| 158 | +<ul> |
| 159 | +<li>Panasetsky: Variable Speed Drive Modeling\" |
| 160 | +<a href=\"modelica://OpenIPSL.UsersGuide.References\">[Panasetsky2016]</a>,</li> |
| 161 | +</ul> |
| 162 | +</html>")); |
| 163 | +end VoltsHertzController; |
0 commit comments