Message Boards Message Boards

0
|
7190 Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid problem running an electrical simulation circuit in SystemModeler?

I am not able to determine why the voltage of this circuit climbs to 10^6 volts then just drop to 0 . This is a modification of the voltage regulator from industry examples.

model SFDI_voltageRegulator "Buck converter and Zener regulator comparison."
  extends Modelica.Icons.Example;
  parameter Modelica.SIunits.Resistance r1 = 16 "Resistance for the load";
  parameter Modelica.SIunits.Capacitance c1(displayUnit = "uF") = 4e-006 "Capacitance of the buck converter capacitor";
  parameter Modelica.SIunits.Capacitance c2(displayUnit = "uF") = 4e-006 "Capacitance of the buck converter capacitor 2";
  parameter Modelica.SIunits.Inductance l1(displayUnit = "mH") = 0.02 "Inductance of the buck converter inductor";
  parameter Modelica.SIunits.Time T(displayUnit = "ms") = 5e-005 "Time for one period";
  parameter Real D = 12 / 24 "Duty-ratio";
  parameter Modelica.SIunits.Voltage vin = 24 "Input voltage into the buck converter";
  Modelica.Electrical.Analog.Sources.ConstantVoltage voltage_BuckConverter(V = vin) annotation(Placement(visible = true, transformation(origin = {-116.682, 5}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Resistor load_BuckConverter(R = r1) annotation(Placement(visible = true, transformation(origin = {126.766, -5}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Capacitor capacitor_BuckConverter(C = c1) annotation(Placement(visible = true, transformation(origin = {3.376, 5}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Inductor inductor_BuckConverter(L = l1) annotation(Placement(visible = true, transformation(origin = {-16.624, 25}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Ground ground_BuckConverter annotation(Placement(visible = true, transformation(origin = {-82.533, -52.959}, extent = {{-10, -10}, {10, 10}}, rotation = -720)));
  Modelica.Blocks.Sources.BooleanPulse booleanPulse(period = T, width = D * 100) annotation(Placement(visible = true, transformation(origin = {-107.893, 75}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Ideal.IdealDiode idealDiode_BuckConverter(Vknee = 0.04, T = 308.15) annotation(Placement(visible = true, transformation(origin = {-36.624, 5}, extent = {{-10, -10}, {10, 10}}, rotation = -270)));
  Modelica.Electrical.Analog.Ideal.IdealClosingSwitch idealClosingSwitch annotation(Placement(visible = true, transformation(origin = {-76.624, 25}, extent = {{-10, -10}, {10, 10}}, rotation = 0)));
  Modelica.Electrical.Analog.Basic.Capacitor capacitor_BuckConverter1(C = c2) "Second capacitor" annotation(Placement(visible = true, transformation(origin = {60, 0}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Semiconductors.Diode diode annotation(Placement(visible = true, transformation(origin = {93.172, -16.641}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
  Modelica.Electrical.Analog.Basic.Resistor resistor(R = 300) "Lead light resistor" annotation(Placement(visible = true, transformation(origin = {93.422, 10}, extent = {{-10, -10}, {10, 10}}, rotation = -90)));
equation
  connect(voltage_BuckConverter.n, ground_BuckConverter.p) annotation(Line(visible = true, origin = {-100, -34.49}, points = {{-16.682, 29.49}, {-17.074, -0.51}, {17.074, -0.51}, {17.467, -8.469}}, color = {0, 0, 255}));
  connect(capacitor_BuckConverter.n, voltage_BuckConverter.n) annotation(Line(visible = true, origin = {-51.624, -30}, points = {{55, 25}, {55, -5}, {-65.058, -5}, {-65.058, 25}}, color = {0, 0, 255}));
  connect(capacitor_BuckConverter.n, idealDiode_BuckConverter.p) annotation(Line(visible = true, origin = {-14.88, -32.25}, points = {{18.256, 27.25}, {17.5, -2.75}, {-22.5, -2.75}, {-21.744, 27.25}}, color = {0, 0, 255}));
  connect(load_BuckConverter.n, voltage_BuckConverter.n) annotation(Line(visible = true, origin = {-41.695, -30}, points = {{168.461, 15}, {168.39, -5}, {-75, -5}, {-74.987, 25}}, color = {0, 0, 255}));
  connect(voltage_BuckConverter.p, idealClosingSwitch.p) annotation(Line(visible = true, origin = {-106.663, 21.667}, points = {{-10.019, -6.667}, {-10.019, 3.333}, {20.039, 3.333}}, color = {0, 0, 255}));
  connect(inductor_BuckConverter.n, load_BuckConverter.p) annotation(Line(visible = true, origin = {82.303, 18.333}, points = {{-88.927, 6.667}, {44.463, 6.667}, {44.463, -13.333}}, color = {0, 0, 255}));
  connect(inductor_BuckConverter.p, idealDiode_BuckConverter.n) annotation(Line(visible = true, origin = {-33.291, 21.667}, points = {{6.667, 3.333}, {-3.333, 3.333}, {-3.333, -6.667}}, color = {0, 0, 255}));
  connect(booleanPulse.y, idealClosingSwitch.control) annotation(Line(visible = true, origin = {-73.624, 49.333}, points = {{-23.269, 25.667}, {-3, 25.667}, {-3, -17.333}}, color = {255, 0, 255}));
  connect(inductor_BuckConverter.p, idealClosingSwitch.n) annotation(Line(visible = true, origin = {-46.624, 25}, points = {{20, 0}, {-20, 0}}, color = {0, 0, 255}));
  connect(inductor_BuckConverter.n, capacitor_BuckConverter.p) annotation(Line(visible = true, origin = {3.376, 21.667}, points = {{-10, 3.333}, {0, 3.333}, {0, -6.667}}, color = {0, 0, 255}));
  connect(capacitor_BuckConverter1.p, inductor_BuckConverter.n) annotation(Line(visible = true, origin = {37.792, 20}, points = {{22.208, -10}, {22.208, 5}, {-44.416, 5}}, color = {0, 0, 255}));
  connect(capacitor_BuckConverter1.n, ground_BuckConverter.p) annotation(Line(visible = true, origin = {-11.267, -35.74}, points = {{71.267, 25.74}, {71.267, 0.74}, {-71.267, 0.74}, {-71.266, -7.219}}, color = {0, 0, 255}));
  connect(resistor.p, inductor_BuckConverter.n) annotation(Line(visible = true, origin = {60.073, 23.333}, points = {{33.349, -3.333}, {33.349, 1.667}, {-66.697, 1.667}}, color = {0, 0, 255}));
  connect(resistor.n, diode.p) annotation(Line(visible = true, origin = {93.297, -3.481}, points = {{0.125, 3.481}, {0.125, -0.16}, {-0.125, -0.16}, {-0.125, -3.16}}, color = {0, 0, 255}));
  connect(diode.n, ground_BuckConverter.p) annotation(Line(visible = true, origin = {5.319, -34.9}, points = {{87.852, 8.259}, {87.852, -0.1}, {-87.852, -0.1}, {-87.852, -8.059}}, color = {0, 0, 255}));
  annotation(experiment(StopTime = 5, __Wolfram_SynchronizeWithRealTime = false), __Wolfram(openClass = BuckConverter, useDocumentationTemplate = false), __Wolfram(PlotSet(plots = {Plot(name = "LoadVoltageBuckConvertervsZenerRegulator ", preferred = true, subPlots = {SubPlot(curves = {Curve(x = time, y = load_BuckConverter.v), Curve(x = time, y = load_Zener.v)})}), Plot(name = "BuckConverterBehavior", subPlots = {SubPlot(curves = {Curve(x = time, y = load_BuckConverter.v), Curve(x = time, y = load_Zener.v)}, range = Range(xmin = 0.007985104552499202, xmax = 0.008516085813714526, ymin = 11.9518475877193, ymax = 12.13411793372319)), SubPlot(curves = {Curve(x = time, y = booleanPulse.y)}, range = Range(xmin = 0.007985104552499202, xmax = 0.008516085813714526, ymin = auto, ymax = auto))})})), uses(Modelica(version = "3.2.1")), Documentation(info = "<html><!--WSMINSERTIONTAGSTART BuckConverter.ExampleModel -->
   <head>
   <style type=\"text/css\">

  body {
   padding: 0px;
   margin: 0px;
  }

  a {
   color: #cf1d24;
  }

  a.target {
   padding-top: 40px;
   margin-top: -40px;
  }

  p {
   font-family: arial;
   font-size: 13;
   margin: 9px 40px 5px 40px;
   padding-bottom: 0px;
   color: #555555;
   max-width: 800px;
  }

  h1 {
   font-size: 30;
   color: #cf1d24;
   font-weight: bold;
   margin-left: 20px;
   margin-top: 32px;
   margin-bottom: 15px;
   margin-right: 20px;
   padding-top: 0px;
  }

  h2 {
   font-size: 20;
   color: #cf1d24;
   font-weight: bold;
   margin-left: 20px;
   margin-right: 20px;
   margin-top: 5px;
   margin-bottom: 9px;
  }

  h3 {
   background: url('BuckConverter/DocumentationFiles/dingbat3.png') no-repeat 0 0;
   font-size: 14px;
   font-family: helvetica;
   color: #4B4B4B;
   font-weight: bold;
   padding-left: 18px;
   margin-left: 20px;
   margin-right: 20px;
   margin-top: 12px;
   margin-bottom: 8px;
  }

  ul {
   font-family: arial;
   font-size: 13;
   margin: 9px 40px 5px 40px;
   padding-bottom: 0px;
   color: #555555;
   max-width: 800px;
   list-style-type: square;
  }

  li {
   margin-left: 0px;
   margin-top: 4px;
   margin-bottom: 2px;
   padding-left: 0px;
  }

  div.header {
   background: url('BuckConverter/DocumentationFiles/WSMLogo.png') no-repeat 0 0;
   height: 96px;
   margin-top: 35px;
   background-color: #871613;
  }

  .headerspan {
   font-family: arial;
   text-decoration: none;
   font-size: 12px;
   font-weight: bold;
   display: inline-block;
   height: 35px;
   color: gray;
   padding: 0px;
   margin: 0px;
   margin-left: 20px;
  }

  .headera {
   font-family: arial;
   text-decoration: none;
   font-size: 12px;
   font-weight: bold;
   padding: 0px;
   color: inherit;
   vertical-align: middle;
   margin: 0px;
  }

  .headerlinkdiv {
   background: black;
   padding: 0px;
   height: 35px;
   margin: 0px;
   position: fixed; top: 0px; left: 0px; width: 100%;
  }

  .contenttable {
   -webkit-box-shadow: 3px 3px 3px #DDDDDD;
   border-top: 3px solid #cf1d24;
   background: #f9f9f9;
   max-width: 500px;
   margin: 15px 15px 0px 20px;
   padding: 6px 10px 3px 10px;
  }

  .contenttableheader {
   color: #a4a4a4;
   font-size: 14px;
   font-family: arial;
  }

  .contenttabletable {
   border: 0px solid #FFFFFF;
   padding: 0px;
   padding-left: 20px;
  }

  .contenttable tr td {
   padding: 3px;
   min-width: 200px;
  }

  .contenttable tr td a {
   color: #555555;
   text-decoration: none;
   font-size: 13px;
   font-family: arial;
  }

  .hacek {
   color: #cf1d24;
   font-size: 25px;
   font-weight: plain;
   vertical-align: -40%;
  }

  .mathematicapointerwrapper {
   border: 0px solid #DDDDDD;
   margin: 15px 15px 15px 40px;
   padding: 0px;
   max-width: 500px;
  }

  .mathematicapointertop {
   border: 1px solid #DDDDDD;
   background-color: #F2F2F2;
   padding: 0px;
   max-width: 500px;
   height: 4px;
  }

  .mathematicapointerdiv {
   background: url('./BuckConverter/DocumentationFiles/mathematicabook.png') no-repeat  left center;
   border: 1px solid #DDDDDD;
   background-color: #FFFFFF;
   margin: 0px;
   padding: 15px 9px 9px 89px;
   max-width: 500px;
   min-height: 67px;
  }

  p.mathematicapointer {
   padding: 0px;
   margin: 0px;
   font-size: 12px;
  }

  .infoboxwrapper {
   border: 0px solid #DDDDDD;
   -webkit-box-shadow: 3px 3px 3px #DDDDDD;
   margin: 15px 15px 15px 40px;
   padding: 0px;
   max-width: 500px;
  }

  .infoboxtop {
   background: url('./BuckConverter/DocumentationFiles/infotick.png') no-repeat left center;
   border: 1px solid #DDDDDD;
   background-color: #F2F2F2;
   padding: 0px;
   max-width: 500px;
   height: 37px;
  }

  div.infobox {
   border: 1px solid #DDDDDD;
   background-color: #FFFFFF;
   margin: 0px;
   padding: 15px;
   max-width: 500px;
  }

  p.infobox {
   padding: 0px;
   margin: 0px;
   font-size: 12px;
  }

  h2.legal {
   font-family: arial;
   font-size: 14;
   color: #cf1d24;
   margin: 15px 15px 15px 20px;
   font-weight: bold;
  }

  h3.legal {
   background: url('./BuckConverter/DocumentationFiles/dingbat3.png') no-repeat 0 0;
   font-family: arial;
   font-size: 12;
   color: #808080;
   margin-left: 38px;
   padding-left: 12px;
   font-weight: bold;
  }

  ul.legal {
   font-size: 10px;
   font-family: arial;
   color: #555555;
   margin-left: 28px;
  }

  ul.legal li {
   margin-left: 0px;
   margin-top: 4px;
   margin-bottom: 2px;
   padding-left: 0px;
  }

  p.legallarge {
   font-size: 12px;
   margin-left: 38px;
  }

  p.legalsmall {
   font-size: 11px;
   margin-left: 38px;
   padding-left: 12px;
  }

  .legalend {
   height: 10px;
  }

  .variablename {
   font-family: Courier New, Courier;
  }

  .dialogelement {
   font-weight: bold;
  }

  .menuitem {
   font-weight: bold;
  }

  .mr {
   font-family: Courier New, Courier;
  }

  .ttable {
    border-collapse: collapse;
    width: 100%;
    }

    .ttable td, th {
    border: 1px solid #dddddd;
    text-align: left;
    padding: 8px;
    }

    .ttable tr:nth-child(even) {
       background-color: #dddddd;
    }

   </style>
   </head>
   <body>

  <div class=\"headerlinkdiv\">

   <span class=\"headerspan\" style=\"background: url(BuckConverter/DocumentationFiles/examples.png) no-repeat 0 0;
   padding-left: 24px;
   \"
   onmouseover=\"
    this.style.color = 'white';
    this.style.background = 'url(BuckConverter/DocumentationFiles/examples_active.png) no-repeat 0 0';
   \"
   onmouseout=\"
    this.style.color = 'gray';
    this.style.background = 'url(BuckConverter/DocumentationFiles/examples.png) no-repeat 0 0';
   \"><a href=\"http://www.wolfram.com/system-modeler/industry-examples/\" class=\"headera\">More Examples</a></span>

   <span class=\"headerspan\" style=\"background: url(BuckConverter/DocumentationFiles/video.png) no-repeat 0 0;
   padding-left: 29px;
   \"
   onmouseover=\"
    this.style.color = 'white';
    this.style.background = 'url(BuckConverter/DocumentationFiles/video_active.png) no-repeat 0 0';
   \"
   onmouseout=\"
    this.style.color = 'gray';
    this.style.background = 'url(BuckConverter/DocumentationFiles/video.png) no-repeat 0 0';
   \"><a href=\"http://www.wolfram.com/system-modeler/resources/get-started/\" class=\"headera\">Introductory Videos</a></span>

   <span class=\"headerspan\" style=\"background: url(BuckConverter/DocumentationFiles/docs.png) no-repeat 0 0;
   padding-left: 20px;
   \"
   onmouseover=\"
    this.style.color = 'white';
    this.style.background = 'url(BuckConverter/DocumentationFiles/docs_active.png) no-repeat 0 0';
   \"
   onmouseout=\"
    this.style.color = 'gray';
    this.style.background = 'url(BuckConverter/DocumentationFiles/docs.png) no-repeat 0 0';
   \"><a href=\"http://reference.wolfram.com/system-modeler\" class=\"headera\">Documentation</a></span>

   <span class=\"headerspan\" style=\"background: url(BuckConverter/DocumentationFiles/contact.png) no-repeat 0 0;
   padding-left: 24px;
   \"
   onmouseover=\"
    this.style.color = 'white';
    this.style.background = 'url(BuckConverter/DocumentationFiles/contact_active.png) no-repeat 0 0';
   \"
   onmouseout=\"
    this.style.color = 'gray';
    this.style.background = 'url(BuckConverter/DocumentationFiles/contact.png) no-repeat 0 0';
   \"><a href=\"http://www.wolfram.com/system-modeler/contact-us/\" class=\"headera\">Contact Us</a></span>
  </div><div class=\"header\">&nbsp;</div><h1>Buck Converter</h1><div class=\"contenttable\">
   <span class=\"contenttableheader\">CONTENTS:</span><br/>
   <table class=\"contenttabletable\"><tr><td><a href=\"#\" onClick=\"document.getElementById('headerTag_Introduction').scrollIntoView(); return false;\"><span class=\"hacek\">&#711;</span> Introduction</a></td><td><a href=\"#\" onClick=\"document.getElementById('headerTag_Dynamics').scrollIntoView(); return false;\"><span class=\"hacek\">&#711;</span> Dynamics</a></td></tr><tr><td><a href=\"#\" onClick=\"document.getElementById('headerTag_Simulation').scrollIntoView(); return false;\"><span class=\"hacek\">&#711;</span> Simulation</a></td><td></td></tr></table></div><a id=\"headerTag_Introduction\" class=\"target\">&nbsp;</a>
    <h2>Introduction</h2>
    <p class=\"\">
Using a linear DC?to?DC regulator is one of the simplest ways to reduce the voltage of a DC supply. However, as linear regulators work by converting excess power to heat, they are highly inefficient and inconvenient to use in many applications. A common alternative to reduce DC voltage is instead to use a buck converter. In this example, we study the difference in efficiency between a buck converter and a simple (linear) Zener regulator when converting a supply voltage of 24 V to an output voltage of 12 V.
</p><a id=\"headerTag_Dynamics\" class=\"target\">&nbsp;</a>
    <h2>Dynamics</h2>
    <p class=\"\">
A buck converter is a switched-mode power supply that uses a <a href=\"modelica://Modelica.Electrical.Analog.Ideal.IdealClosingSwitch\">switch</a>, a <a href=\"modelica://Modelica.Electrical.Analog.Ideal.IdealDiode\">diode</a>, an <a href=\"modelica://Modelica.Electrical.Analog.Basic.Inductor\">inductor</a>, and a <a href=\"modelica://Modelica.Electrical.Analog.Basic.Capacitor\">capacitor</a> to convert direct current voltage from a higher to a lower level. When the switch is turned off, the inductor current freewheels through the diode. When the switch is turned on, the inductor current increases and doesn’t pass through the diode.
</p><a id=\"headerTag_Simulation\" class=\"target\">&nbsp;</a>
    <h2>Simulation</h2>
    <p class=\"\">
To simulate the model, perform this step:
</p><ul><li>Click the <span class=\"dialogelement\">Simulate</span> button in the top toolbar <img src=\"./BuckConverter/DocumentationFiles/simulate.png\" alt=\"\"/>.</li></ul><h3>Plot the results</h3>
    <p class=\"\">
When the simulation is done, a stored plot will automatically be displayed:
</p><p class=\"\">
<img src=\"./BuckConverter/DocumentationFiles/plot.png\" alt=\"\"/>
</p><h3>Zoom</h3>
    <p class=\"\">
The switch is continuously being opened and closed by the <a href=\"modelica://Modelica.Blocks.Sources.BooleanPulse\">boolean pulse</a> supplied to it. This happens so fast that it is hard to discern from the graph.
</p><p class=\"\">
Zoom in on the graph to explore the ripple caused by the buck converter. To do this, perform the following steps
</p><ul><li>In the <span class=\"dialogelement\">Plot Window</span>, position your mouse cursor around 13 V on the Y-axis and 0.009 s.</li><li>Draw a small box around the plots (see picture) by clicking and dragging your mouse cursor. When you release the button, you will zoom in on the selected area</li><li>To return to the original view, right click anywhere in the <span class=\"dialogelement\">Plot Window</span> and select <span class=\"dialogelement\">Rescale</span>.</li></ul><p class=\"\">
<img src=\"./BuckConverter/DocumentationFiles/resize.png\" alt=\"\"/>
</p><h3>Change Parameters</h3>
    <p class=\"\">
Changing parameters for the simulation can be done rapidly in Simulation Center. The <span class=\"variablename\">D</span> parameter determines the duty-ration of the buck converter. This is determined by the relative duration between the closed/on period and the open/off period. The standard value for this parameter is 0.5 which means that 50% of the time, the switch will be closed and the voltage source will be connected to the circuit. The resulting voltage over the load will be 50% of the input voltage.
</p><p class=\"\">
Try changing the duty-ration of the converter, <span class=\"variablename\">D</span> and see how this affects the controller:
</p><ul><li>Switch to the <span class=\"dialogelement\">Parameter</span> tab to the left in the Experiment Browser.</li><li>Scroll down to the <span class=\"variablename\">D</span> parameter and change its value to 0.75 by typing into the box to the right of the parameter.</li><li>Simulate again by following the steps in the Simulation section to see the effects of your changes.</li></ul><p class=\"\">
You should now see the graph below, note that the Zener regulator is not affected by the parameter change above:
</p><p class=\"\">
<img src=\"./BuckConverter/DocumentationFiles/plot2.png\" alt=\"\"/>
</p><h2 class=\"legal\"> <a href=\"#\" onclick=\"
   if(document.getElementById('526').style.display == 'none'){
   document.getElementById('526').style.display = 'block';
   document.getElementById('show526').style.display = 'none';
   document.getElementById('hide526').style.display = 'inline';
   } else {
   document.getElementById('526').style.display = 'none';
   document.getElementById('show526').style.display = 'inline';
   document.getElementById('hide526').style.display = 'none';
   };
   return false;\" style=\"text-decoration: inherit; color: inherit\"><img src=\"./BuckConverter/DocumentationFiles/showhide2.png\" alt=\"Show\" id=\"show526\" style=\"display: inline; vertical-align: text-bottom;\" /><img src=\"./BuckConverter/DocumentationFiles/showhide.png\" alt=\"Hide\" id=\"hide526\" style=\"display: none; vertical-align: text-bottom;\" />Terms and Conditions of Use</a> </h2>
    <span id=\"526\" style=\"display: none;\"><p class=\"legallarge\">
This domain example is an informational resource made freely available by Wolfram Research.
</p><h3 class=\"legal\">Use of This Example</h3>
    <span id=\"527\" style=\"display: block;\"><ul class=\"legal\"><li>You may not use this example for any purpose that is unlawful or dangerous.</li><li>You assume total responsibility and risk for your use of this example.</li><li>You may not present this example with any alteration to its trade dress, trademarks, or design.</li></ul></span><h3 class=\"legal\">License</h3>
    <span id=\"528\" style=\"display: block;\"><p class=\"legalsmall\">
All content in this bundle is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. By accessing the content or using it in any way, you accept and agree to be bound by the terms of this license. If you do not agree to these Terms of Use, you may not use this content. Wolfram Research reserves the right to change, modify, add to, or remove portions of these Terms of Use at any time without notice. Please refer back to <a href=\"http://www.wolfram.com\">www.wolfram.com</a> for the latest Terms of Use.
</p><p class=\"legalsmall\">
A summary of the licensing terms can be found at:<br>
        <a href=\"http://creativecommons.org/licenses/by-nc-sa/3.0\">http://creativecommons.org/licenses/by-nc-sa/3.0</a>
</p><p class=\"legalsmall\">
The full legal code can be found at:<br>
        <a href=\"http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode\">http://creativecommons.org/licenses/by-nc-sa/3.0/legalcode</a>
</p></span></span><div class=\"legalend\">&nbsp;</div>
   </body>
   <!--WSMINSERTIONTAGEND BuckConverter.ExampleModel --></html>", revisions = ""), uses(Modelica(version = "3.2.1")), preferredView = "info", Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {10, 10})), Diagram(coordinateSystem(extent = {{-165, -105}, {165, 125}}, preserveAspectRatio = true, initialScale = 0.1, grid = {5, 5}), graphics = {Text(visible = true, origin = {34.179, 100}, extent = {{-69.179, -15}, {69.179, 15}}, textString = "Buck Converter")}));
end SFDI_voltageRegulator;
POSTED BY: Jose Calderon
3 Replies

Jose,

I do know that there is a modelica library that models spice blocks. It is not in the current version of SystemModeler. Maybe one of the WSM engineers can tell us whether that library is supported or what can be done to make it work. Did you try to search for modelica models of the LM307? There may be some out there.

Regards

POSTED BY: Neil Singer

Thank you !! By the way.. Do you know if there is any block that simulates the LM307 lineR regulator chip? My application is looking a solution to avoid the heat when the reference adjustable resistor is set to low.

POSTED BY: Jose Calderon

Jose,

You need to set the initial condition in your inductor to 0 and force it to be true:

enter image description here

I recognized this behavior because I just battled this last week!!! SystemModeler determines the initial conditions of the model. @Patrik Ekenberg will have a better explanation on this but SystemModeler guesses initial conditions and sometimes it guesses horribly wrong (I hope they will improve the algorithm on this but watch for it). The inductor is an undetermined state -- it could have current flowing through it or it may not. Evidently SystemModeler found an initial condition in which a HUGE amount of current was flowing through it. (10^6 amps so I hope you buy very expensive inductors!)

Regards

Neil

POSTED BY: Neil Singer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract