Table of Contents | ||||||
---|---|---|---|---|---|---|
|
...
Background Color | ||
---|---|---|
| ||
See also: How to Build UCM Devices in HYPERSIM |
Once the load flow solution is found, the UCM initializes from this solution into an EMT simulation. The User Coded Model (UCM) is a HYPERSIM utility allowing users to create their own templates that can not otherwise be built using existing templates. UCM is coded by users, in C, according to HYPERSIM rules.
...
To implement the power flow solution in the User Coded Model (UCM) of HYPERSIM, the UCM form was updated to take into account the model type (Admittance or Generation) in the Model description section of the form to indicate to HYPERSIM whether the UCM is participating or not in the power flow solution.
The added variable is UCM_LOADFLOW_TYPE and can have the following values:
Default | If not included in Section 1, the UCM does not participate in the power flow solution. |
---|---|
Admittance | Model UCM participates in power flow solution as being considered as a load. |
Generation | Model UCM participates in the power flow solution as a generator. |
Figure 1 In case of selecting the Generation type for the load flow option, a new tab is introduced to the component's interface.
...
It is important to note that this tab becomes visible following the update of the UCM code. To perform the update, the user should right-click on the UCM, and in the UCM section, the Update option should be selected.
Figure 2 shows the code in Section 1 for the UCM Linear Impedance Model RL. Note that in this case the variable UCM_LOADFLOW_TYPE is equal to Admittance.
...
Function of the Admittance Calculation (Section 8.3.3)
...
The figure below shows the code in Section 8.3.3 for the UCM Linear Impedance Model RL. Note that the actual (ucmYlfReal) and imaginary (ucmYlfImag) values of the UCM must be defined separately in the nodal admittance matrix.
...
Function of Updating Historical Values (Section 8.3.4)
...
The figure below shows the code in Section 8.3.4 for the UCM Linear Impedance Model RL. Note that the ucmVlfHist and ucmIlfHist variables correspond to the voltage and current histories respectively.
...
Function of Model Parameter Update (Section 8.3.5)
...
The figure below shows the code in Section 8.3.5 for a UCM model of voltage source with internal impedance. Note that the variables ucmVintReal and ucmVintImag correspond to the initial values of internal voltage (voltage behind impedance) calculated from the power flow solution.
...
Important considerations of using variables in load flow and initialization sections
Variables in the "Loadflow Historical Values" section should only be set based on those defined in "Historical Currents."
Variables in the "Loadflow Model parameters" section should only be set based on those defined in "Calculated Parameters."
The voltage refers to the peak voltage of the phase to ground in the variables ucmVlfHist, ucmVlfActual, ucmVintReal, and ucmVintImag.
Variables ucmVlfHist and ucmVlfActual provide voltage of terminal component while variables ucmVintReal and ucmVintImag provide voltage of voltage source within the component
The current refers to the peak current of the phase in the variables ucmIlfHist and ucmIlfActual.
The variable results of load flow, namely ucmIlfHist, ucmIlfActual, ucmVlfHist, ucmVlfActual, ucmVintReal, and ucmVintImag, are accessible after the function of the Admittance Calculation (Section 8.3.3).
Defined variables
This section explains available variables to the user. These are for advanced users only.
ucmYini(i,j) | retrieves the equivalent impedance of EMT method between nodes i and j. This variable is used for dynamic simulation. |
---|---|
ucmYfill(i,j) | retrieves one in case ucmYini(i,j) is not zero, otherwise it retrieves zero. This variable is used for dynamic simulation. |
ucmTimeStep | returns the timeStep of simulation. |
ucmYlfReal(i,j) | retrieves the real part of the equivalent impedance of the phasor method between nodes i and j. This variable is used for load flow calculation. |
ucmYlfImag(i,j) | retrieves the imaginary part of the equivalent impedance of the phasor method between nodes i and j. This variable is used for load flow calculation. |
ucmIlfHist(i) | retrieves current at one time-step before starting the simulation. |
ucmIlfActual(i) | retrieves current at starting the simulation. |
ucmVlfHist(i) | retrieves voltage at one time-step before starting the simulation. |
ucmVlfActual(i) | retrieves voltage at starting the simulation. |
ucmVintReal(i) | retrieves the real part of an internal source in the phasor domain from load flow calculation. |
ucmVintImag(i) | retrieves the imaginary part of an internal source in the phasor domain from load flow calculation. |