modelSimpleGen

Model of a simple generator with mechanical connectors

Extends from BaseClasses.Power2Torque (Converts a power signal to a torque in the rotational domain), OpenHPL.Icons.Generator (Generator icon).

Information

Simple Generator Model

Simple model of an ideal generator with friction based on angular momentum balance.

Energy Balance

The kinetic energy stored in the rotating generator is \(K_a = \frac{1}{2}J_a\omega_a^2\), where ωa is angular velocity and Ja is moment of inertia.

From energy balance:

$$ \frac{\mathrm{d}K_a}{\mathrm{d}t} = \dot{W}_s - \dot{W}_{f,a} - \dot{W}_g $$

where:

  • s is turbine shaft power
  • f,a is frictional power loss
  • g is power taken by generator
Friction

Frictional power loss (mainly from bearings):

$$ \dot{W}_{f,a} = \frac{1}{2}k_{f,b}\omega_a^2 $$

where kf,b is the bearing friction factor.

Electric Power

Electric power available on grid:

$$ \dot{W}_e = \eta_e \dot{W}_g $$

where ηe is electrical efficiency.

Loading Options

The generator can be loaded either:

  • via the mechanical shaft connector (e.g., using the Grid model). Set Pload input to 0 in this case.
  • or via the input connector Pload specifying the connected electrical load.
Connectors
  • RealInput: grid power (Pload) and shaft power
  • RealOutput: angular velocity and frequency
Parameters

User specifies: moment of inertia, electrical efficiency, bearing friction factor, number of poles, and initial angular velocity.

Parameters

TypeNameDefaultDescription
SI.Frequencyf_nom (from TorqueEquation)data.f_grid/(p/2)Nominal mechanical rotational frequency
Mechanical
BooleanuseH (from TorqueEquation)falseIf checked, calculate the inertia from a given H value
SI.PowerPmax (from TorqueEquation)100e6Maximum rated power (for torque limiting and H calculation)
SI.TimeH (from TorqueEquation)2.75Inertia constant H, typical 2s (high-head hydro) to 6s (gas or low-head hydro) production units
SI.MomentOfInertiaJ (from TorqueEquation)2e5Moment of inertia of the unit (GD2/4)
Integerp (from TorqueEquation)12Number of poles for mechanical speed calculation (Not pole pairs!)
SI.PowerPloss (from TorqueEquation)0Friction losses of the unit at nominal speed
Initialization
SI.PerUnitf_0 (from TorqueEquation)1Initial speed of the unit
Booleanenable_nomSpeed (from TorqueEquation)falseIf checked, unit runs at fixed speed f_0
Booleanfixed_iniSpeed (from TorqueEquation)falseIf checked, unit initialises with fixed speed. When connecting several units mechanically only one can be fixed.
I/O › Inputs
Booleanenable_f_in (from TorqueEquation)falseIf checked, get a connector for speed input
I/O › Outputs
Booleanenable_w (from TorqueEquation)falseIf checked, get a connector for angular velocity output
Booleanenable_f (from TorqueEquation)falseIf checked, get a connector for speed output

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealOutputf (from TorqueEquation)Speed output of the unit [pu]
Modelica.Blocks.Interfaces.RealOutputw (from TorqueEquation)Mechanical angular velocity output of the unit [rad/s]
Modelica.Mechanics.Rotational.Interfaces.Flange_bflange (from TorqueEquation)Flange of right shaft
Modelica.Blocks.Interfaces.RealInputf_in (from TorqueEquation)Speed input of the unit [pu]
Modelica.Blocks.Interfaces.RealInputPloadElectrical load power demand

Components

TypeNameDefaultDescription
OpenHPL.Datadata (from TorqueEquation)Using standard class with global parameters
Modelica.Mechanics.Rotational.Sensors.SpeedSensorspeedSensor (from TorqueEquation)
Modelica.Mechanics.Rotational.Components.Inertiainertia (from TorqueEquation)
Modelica.Electrical.Machines.Losses.Frictionfriction (from TorqueEquation)
Modelica.Mechanics.Rotational.Components.Fixedfixed (from TorqueEquation)
Modelica.Blocks.Math.Gainw_m2pu (from TorqueEquation)Convert from rad/s to pu
Modelica.Mechanics.Rotational.Sensors.PowerSensorfrictionLoss (from TorqueEquation)
Modelica.Mechanics.Rotational.Sources.SpeedsetSpeed (from TorqueEquation)
Modelica.Mechanics.Rotational.Components.IdealGeartoSysSpeed (from TorqueEquation)Converts to system speed based on p = 2
Modelica.Blocks.Sources.RealExpressionnominalSpeed (from TorqueEquation)
Modelica.Blocks.Math.Gainpu2w_s (from TorqueEquation)
Modelica.Mechanics.Rotational.Sources.Torquetorque (from TorqueEquation)
Modelica.Blocks.Math.Divisionpower2torque (from Power2Torque)
Modelica.Blocks.Nonlinear.Limiterdiv0protect (from Power2Torque)
Modelica.Blocks.Nonlinear.LimitertorqueLimit (from Power2Torque)
Modelica.Blocks.Sources.RealExpressionpower (from Power2Torque)