GunnsElectConverterInput - nasa/gunns GitHub Wiki

Background

This link models the input, or primary, side of an electrical DC-DC power converter. It is designed to interface with a GunnsElectConverterOutput link, which models the output, or secondary side. Such a pair of links models a one-way DC-DC converter, voltage regulator, transformer, current or power controller. A pair of pairs, arranged in opposite directions, can model a bi-directional converter. See GunnsElectConverterOutput for more info on its modes of operation and how they can model various devices.

This pairing of links has several improvements over the old ConverterElect link:

  • They can combine in the same network, or across different networks or sims, for greater flexibility.
  • Across different networks or sims, they function similarly to the GunnsBasicExternalSupply and GunnsBasicExternalDemand links as a general model-to-model supply and demand interface, to share electrical power between models.
  • They can model more types of equipment, via different control modes on the output side.
  • This input-side link uses a more efficient method for placing the constant power load on the input-side network, which can make the network use less computations to solve, and run faster.

This link has logic for modeling input under-volt and input over-volt trips. The trip logic can either use the truth input node voltage, or they can use sensor models in GunnsSensorAnalogWrapper network spotters.

How To Use In GunnsDraw

(Note this link is not available in the obsolete GunnShow tool.)

This is a one-port link. Connect port 0 to the node supplying power to the converter. This link can be connected to any node. It can also be moved in run-time via the Link Dynamic Node Mapping. It can be connected to the Ground node as a spare; when on the Ground node, it does not function. The pictures below show several configurations of pairings between these input & output converter links:

Below illustrates a pair of links in separate networks in a sim, connected via the sim bus. Current flows from left to right:

Below shows a pair of links in the same network. This is most similar to the old ConverterElect link. Current flows from left to right. In this configuration, the links interface automatically via pointers to each other, and the sim bus is not used to interface them.

Below shows a pair of pairs, one transferring flow in each direction, for modeling a bi-directional converter. They are paired by rows, with the top row flowing left to right, and the bottom row right to left. Depending on network voltages, one pair will flow in its direction, and the other pair will bypass.

Port Connection Rules

These are limitations on the port connections to nodes that the link enforces in run-time:

  • None

Other Rules

These are extra rules you should always try to follow:

  • None

Configuration Data Parameters:

  • inputVoltageSensor (default = 0): This is an optional pointer to a GunnsSensorAnalogWrapper spotter in the network. When provided, the link will use the sensor embedded in that spotter as its input voltage sensor, for feeding the trip logic. To omit using a sensor, leave this value 0. To use a spotter named SensorInV, this field would be &network→SensorInV.
  • tripPriority (default = 0): This is the network solver converged minor step on which the trip logic will be evaluated. Trips with lower priority numbers evaluate before higher numbers. Leave this value 0 to disable all trip logic, and set it > 0 to enable all the trip logic.
  • inputUnderVoltageTripLimit (default 0.0 (V)): This is the trip limit for the input under-volt trip logic. Setting this = 0 will disable this trip logic. However, note that it is highly recommended that you always use a realistic under voltage trip limit, by setting it to something above zero. This allows the link to trip off in under-voltage conditions, which can easily occur when the output side is demanding more power than the input circuit can supply. Otherwise, this link can cause the network to fail to converge to a valid solution.
  • inputOverVoltageTripLimit (default 0.0 (V), must be > inputUnderVoltageTripLimit): This is the trip limit for the input over-volt trip logic. Setting this to a much larger value than could be possible in the network is a good way to disable this trip logic.
  • efficiencyTable (default = 0): This is the name of an optional Data Table that defines the power conversion efficiency as a function of power fraction. The power fraction is the input power demand received from the output side (GunnsElectConverterOutput), divided by the referencePower term described below. The x-axis of the table should list the power fraction data points, from 0 to 1, and the y-axis is the efficiency at those points. Note that efficiency values must be between DBL_EPSILON and 1, inclusive, or the link will throw an initialization error. As an example, if the data table name in the drawing is ConverterEfficiencyTable, then this field would be &network→ConverterEfficiencyTable. This field is optional — leaving it zero will disable the efficiency model in this GunnsElectConverterInput, and it will use an effective efficiency of 1. Note that GunnsElectConverterOutput also has an efficiency value, but unlike here where it is a function of power fraction, in that model it is constant. This gives you flexibility in modeling the total efficiency of the converter on either side. Efficiency values less than 1 cause the actual power drawn from the input node to be larger than the input power demanded by the output converter side.

Input Data Parameters:

  • malfBlockageFlag (default = false): Initial active (true) or inactive (false) state of the blockage malfunction.
  • malfBlockageValue (default = 0.0, must be (0-1)): Initial value of the blockage malfunction. The link uses this malfunction to reduce the power conversion efficiency to zero as this blockage value approaches 1. This can be used to degrade the converter to be worse than its normal efficiency. This applies with the optional efficiencyTable and without it (default efficiency of 1). Note that this malfunction used to have a different effect, but we changed to this new effect with the addition of the efficiency table option. The old function allowed you to effectively disable the converter by using a blockage malfunction of 1, but now a blockage malfunction of 1 causes power demand on the input node to approach infinite (as efficiency approaches zero). Now as before, to simply disable the converter it is better to use the blockage malfunction in the output side link, or set the enabled flag on either side to false.
  • enabled (default = false): This is the initial enabled (true) or disabled (false) state of this side of the converter. Both sides must be enabled for power to flow across the converter.
  • inputPower (default = 0 (W)): This is the initial power load from the output side. If this link isn’t paired with an output-side link, then this value can be used as a constant boundary condition.
  • referencePower (default = 0 (W), must be >= DBL_EPSILON if efficiencyTable is used): This is the initial value of the reference power. When the optional efficiencyTable is used (above), the input power is divided by this reference power value, and the result is the input to the efficiency table lookup. Note that when the efficiencyTable is used, this reference power must be greater than or equal to DBL_EPSILON, or this link will throw an initialization error — this avoids divide-by-zero at runtime. If the efficiency table is not used, this can be left zero. The reference power value can be changed during runtime by calling the link’s setReferencePower function. This gives more flexibility in modeling efficiency, by allowing the efficiency relationship to input power to be varied and controlled as needed.

Common Problems

Network fails to converge. See also GunnsElectConverterOutput. A network that is failing to converge will appear unresponsive, like it’s not updating anymore.

  • There are a couple of ways to tell when this is happening: the network will output warning messages to the Health & Status log, and the solver’s mConvergenceFailCount term is increasing.
  • This link and the GunnsElectConverterOutput link can cause the network to fail to converge in certain conditions if they are not set up properly. For this input side link, this occurs when the output side demands more power than the input circuit can supply, pulling the input voltage lower and lower.
  • Make sure to configure and enable a realistic under-voltage trip limit to avoid this problem. Real-world converters typically protect against both input under-voltage and over-voltage, so it’s advisable to enable both trip limits.

References

  • N/A
⚠️ **GitHub.com Fallback** ⚠️