GunnsElectConverterOutput - nasa/gunns GitHub Wiki

Background

This link models the output, or secondary, side of an electrical DC-DC power converter. It is designed to interface with a GunnsElectConverterInput link, which models the input, or primary side. See GunnsElectConverterInput for more information.

There are several ways this link can supply power to the output node:

  • Regulate output voltage to a commanded setpoint. This is the most typical use of a DC-DC converter or a voltage regulator — it can up-scale or down-scale the input voltage to a specific output voltage. This acts like a voltage source. Output voltage is controlled, and power and current will vary based on the downstream circuit. This is the same as the old ConverterElect link.
  • Regulate output voltage to a ratio of the input voltage. This is like a transformer with a winding ratio between the input & output coils. The winding ratio can be varied. This is also a voltage source. In addition to a transformer, this mode is used to integrate separate networks or sims at a conductor-like junction between the models. In this case, set this link’s efficiency to 1 and its setpoint to 1.
  • Regulate output current to a commanded setpoint. This acts like a commandable current source. This is typically how we model battery chargers. The output current is controlled, and voltage and power will vary based on the downstream circuit.
  • Regulate output power to a commanded setpoint. This is also a current source, but the current changes to control output power. Output current and voltage will vary based on the downstream circuit.

This link has logic for modeling output over-volt, under-volt, and output over-current trips. The trip logic can either use the truth output node voltage and current, or they can use sensor models in GunnsSensorAnalogWrapper network spotters. Instead of output over-current trips, the model can optionally do current limiting when the output current reaches the trip limit, and return to voltage control when the output voltage reaches the voltage control setpoint. Likewise, in the current and power control modes above, the model can optionally do voltage limiting when the output voltage goes outside of the under-volt and over-volt trip limits, instead of tripping, and return to current control when the output voltage comes back within the volt trip limits.

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 being supplied power from 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. See GunnsElectConverterInput for illustrations of various configurations of these links.

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:

  • regulatorType (default = GunnsElectConverterOutput::VOLTAGE): This configures the link to use one of the four output control modes described above. It is an enumeration that allows these values, respectively: VOLTAGE, TRANSFORMER, CURRENT, and POWER. Include the namespace in the value. For example to use the current control mode, this would be GunnsElectConverterOutput::CURRENT.
  • outputConductance (default = 0 (1/ohm), must be > 0): This is the conductance of the output channel. It controls the droop of the output voltage under load in the voltage source modes (VOLTAGE and TRANSFORMER). In all modes, it adds Pg to the input power and waste heat of the converter in proportion to this resistance (the inverse of this conductance, R), and the output current I by Ohm’s Law: Pg = I2R. Higher values of this conductance mean less output voltage droop and less waste heat and input power increase.
  • converterEfficiency (default = 0, must be > 0 and <= 1): This is the efficiency of the converter. For a given amount of power supplied to the output node, lower efficiency increases the input power demanded from the input side. The input power Pi is a function of this efficiency E, the output conductance loss Pg, and the output power P as: Pi = (P + Pg) / E. This power rise also adds to the total waste heat value.
  • outputVoltageSensor (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 output voltage sensor, for feeding the output over-volt and under-volt trip logic. To omit using a sensor, leave this value 0. To use a spotter named SensorOutV, this field would be &network→SensorOutV.
  • outputCurrentSensor (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 output current sensor, for feeding the output over-current trip logic. To omit using a sensor, leave this value 0.
  • 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.
  • outputOverVoltageTripLimit (default = 0.0 (V)): This is the trip limit for the output 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. However, note that it is highly recommended that you always use a realistic over voltage trip limit when this link is configured to control output current (CURRENT or POWER modes). This allows the link to trip off or limit the output current in over-voltage conditions, which can easily occur when controlling output current. Otherwise, this link can cause the network to fail to converge to a valid solution.
  • outputOverCurrentTripLimit (default = 0.0 (amp)): This is the trip limit for the output over-current trip logic, or the current limit value used in the current-limiting state, when enabled by enableLimiting, below. Setting this to a much larger value than could be possible in the network is a good way to disable this trip logic. However, note that it is highly recommended that you always use a realistic over current trip limit when this link is configured to control output voltage (VOLTAGE or TRANSFORMER modes). This allows the link to trip off or switch to current limiting in over-current conditions, which can easily occur when controlling output voltage. Otherwise, this link can cause the network to fail to converge to a valid solution.
  • inputLink (default = 0): This is an optional pointer to the input-side link, for use when the two links are in the same network. If the input side link is ConverterInput, then this field would be &network→ConverterInput. This also works for super-networks: the links can be directly connected by this pointer if they are in different sub-networks in the same super-network. In that case, this field would be the address of the full variable name of the input link, wherever it is. Note that if this field is set, these links will fail to initialize if they are not in the same network. Don’t supply the address of an object type other than GunnsElectConverterInput; it will end badly.
  • enableLimiting (default = false): This is an optional feature. The flag, if set true, configures the converter to do output current limiting instead of over-current tripping in the VOLTAGE and TRANSFORMER modes, or do output voltage limiting instead of under-voltage tripping in the CURRENT and POWER modes. If false, the flag configures the converter to do output over-current and under-voltage trips instead of the current or voltage limiting. NOTE that if you use this feature (true), then you should set the tripPriority value greater than 1. The model uses trip priority 1 to flip between limiting and normal regulating states. If tripPriority is 1, then the model will over-volt trip instead of returning to normal voltage or current regulation.
  • outputUnderVoltageTripLimit (default = 0.0 (V)): This is the trip limit for the output under-volt trip logic, or the voltage limit value used in the voltage-limiting state for the CURRENT and POWER modes (when enabled by enableLimiting, above). Setting this to a much lower value than could be possible in the network (such as a negative value) is a good way to disable this trip logic.

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 scale the output conductance in the voltage source modes, and output current in the current source modes. A value of 0 has no effect. Increasing values reduce the link’s ability to control to its setpoint.
  • 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.
  • inputVoltage (default = 0.0 (V), must be >= 0): This is the initial voltage from the input side. If this link isn’t paired with an input-side link, then this value can be used as a constant boundary condition.
  • setpoint (default = 0.0, must be >= 0): This is the initial control setpoint for the output control modes. For VOLTAGE mode, this is the output voltage to control. For TRANSFORMER mode, this the ratio of output to input windings, and the ratio of output to input voltage that is controlled. For CURRENT and POWER modes, this the current (amp) and power (W) that is controlled, respectively.

Common Problems

No output current. There are many ways this link pairing can shut off and fail to transfer power. Check all of these if you get no flow:

  • Check all trips. Both links have a mResetTrips flag you can set to manually reset them.
  • Check the mEnabled flag (1 per side). Both sides must be enabled.
  • Check that the input side is not overloaded. If the input side network can’t supply the power demanded by the output side, it will output zero volts to the output side, which shuts the output side down. This is shown by the mOverloadedState flag in the input side link.
  • Check that the output side isn’t reverse biased in voltage source modes. In VOLTAGE and TRANSFORMER modes, if the output voltage is higher than the link is trying to control, it shuts off because this would result in backwards current, which isn’t allowed. This state can be seen by the output link’s mReverseBiasState flag.

Network fails to converge. 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 GunnsElectConverterInput link can cause the network to fail to converge in certain conditions if they are not set up properly. These are conditions in which a real-world converter can’t control, so it is usually designed to trip off to avoid damage. One such condition is an open-circuit downstream when the converter controls current (results in over-voltage).
  • Make sure to configure and enable realistic trip limits to avoid these problems. Real-world converters typically protect against over-voltage, under-voltage and over-current, so it’s advisable to enable all 3 trip limits, regardless of which mode your controller is in.

References

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