Frequency Estimation Blocks
Blocks that expose the frequency RAMSES estimates at the bus a device is connected to. Which block to use depends on the model type.
Computes , an estimate of the frequency (in per unit) at a given bus, from the evolution of the rectangular components and of the bus voltage. A measurement time constant is involved. Can be used in the model of an injector only.
Syntax
& f_injf{T}f is the name of the estimated frequency variable; T is the measurement time constant (data name, parameter name, or math expression). The voltage components and are automatically inherited and must not be declared.
Internal states: and (measured/filtered voltage components)
Discrete variables: none
Equations
Initialization
Explanation
The voltage components and are the projections of the bus voltage phasor onto the reference axes rotating at angular speed (rad/s). The instantaneous angular frequency is:
The per-unit frequency is therefore:
where is the nominal frequency (known from the system data). To filter transients, and are passed through first-order filters with time constant , yielding the measured values and . Substituting the filter derivatives into the frequency expression yields the third equation above.
Notes
- A recommended value for is in the range – s.
- is not allowed. If is too small, the solver may encounter a singularity and the simulation may fail.
f_twop_bus1
Section titled “f_twop_bus1”Similar to f_inj. Computes , an estimate of the frequency (in per unit) at the first bus of a given two-port. Can be used in the model of a two-port only.
Syntax
& f_twop_bus1f{T}f is the name of the estimated frequency variable; T is the measurement time constant (data name, parameter name, or math expression).
Internal states: and (filtered voltage components at bus 1)
Discrete variables: none
Equations, initialization, and notes: identical to f_inj, refer to that block for the full mathematical description. The only difference is that this block uses the voltage at the first bus of a two-port rather than an injector bus.
f_twop_bus2
Section titled “f_twop_bus2”Similar to f_inj. Computes , an estimate of the frequency (in per unit) at the second bus of a given two-port. Can be used in the model of a two-port only.
Syntax
& f_twop_bus2f{T}f is the name of the estimated frequency variable; T is the measurement time constant (data name, parameter name, or math expression).
Internal states: and (filtered voltage components at bus 2)
Discrete variables: none
Equations, initialization, and notes: identical to f_inj, refer to that block for the full mathematical description. The only difference is that this block uses the voltage at the second bus of a two-port rather than an injector bus.
See Also
Section titled “See Also”- Block Index, all CODEGEN blocks by category
- CODEGEN Model Examples, complete models built from these blocks
- User-Defined Models, the DSL file format