Engee documentation

Voltage Source

A voltage source with optional DC, AC and noise current components.

blockType: AcausalElectricPowerSystems.Sources.Voltage

Path in the library:

/Physical Modeling/Electrical/Sources/Voltage Source

Description

Block Voltage Source It is a model of a voltage source with DC, AC and noise components. The voltage at the + and − terminals is set:

Where

  • — DC voltage component;

  • — the amplitude of the AC voltage component.;

  • — frequency of AC voltage;

  • — phase shift of the AC voltage component;

  • — noise voltage.

You can customize the block Voltage Source as a source of only direct current, only alternating current, or a combination thereof. By default, both AC and DC components are equal 0. Determine the AC/DC voltage by specifying non-zero parameter values after placing the unit in the model.

The noise component is also optional. If you check the box for the parameter Enable noise mode, then the added noise voltage will be determined as follows:

Where

  • — spectral power density of one-sided noise for a load of 1 ohm, in V ^ 2 ^ / Hz;

  • — a random number with zero mean and unit standard deviation;

  • — the period of generation of noise values.

By default check box Enable noise mode removed, and the voltage source does not generate thermal noise.

Noise parameters

The block generates noise according to a normal distribution using a random number generator. You can influence the generation of random numbers by adjusting the parameter Repeatability:

  • Not repeatable — Every time you simulate a model, the block will regenerate the initial value using a random number generator.

  • Specify seed — when selecting this option, an additional parameter Seed allows you to directly specify the initial value.

Restrictions

Modeling with noise enabled slows down the simulation. If you include noise, choose a generation period such that the noise is generated only at the frequencies you are interested in, but not higher.

Ports

Conserving

# + — positive terminal
electricity

Details

The electrical port represents the positive terminal of the source.

Program usage name

p

# – — negative terminal
electricity

Details

The electrical port is the negative terminal of the source.

Program usage name

n

Parameters

DC & AC Components

# DC voltage — Output constant voltage
V | uV | mV | kV | MV

Details

Output constant voltage. Specify a non-zero value to add a DC component to the voltage source.

Units

V | uV | mV | kV | MV

Default value

0.0 V

Program usage name

V_DC

Evaluatable

Yes

# AC voltage peak amplitude — the amplitude of the alternating voltage
V | uV | mV | kV | MV

Details

The amplitude of the output AC voltage. Specify a non-zero value to add an AC voltage component to the voltage source.

Units

V | uV | mV | kV | MV

Default value

0.0 V

Program usage name

V_AC

Evaluatable

Yes

# AC voltage phase shift — phase shift of the AC voltage
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

Phase shift of the AC voltage.

Units

rad | deg | rev | mrad | arcsec | arcmin | gon

Default value

0.0 rad

Program usage name

shift

Evaluatable

Yes

# AC voltage frequency — frequency of alternating voltage
Hz | kHz | MHz | GHz

Details

The frequency of the output AC voltage.

Units

Hz | kHz | MHz | GHz

Default value

50.0 Hz

Program usage name

f

Evaluatable

Yes

Noise

# Enable noise mode — turning on the noise

Details

Check the box to turn on the noise.

Dependencies

Check the box Enable noise mode opens the related parameters.

Default value

false (switched off)

Program usage name

enable_noise

Evaluatable

No

# Power spectral density — spectral power density
V^2/Hz

Details

One-way spectral noise power density.

Dependencies

To use this option, check the box Enable noise mode.

Units

V^2/Hz

Default value

0.0 V^2/Hz

Program usage name

power_spectral_density

Evaluatable

Yes

# Sample time — the period of generating noise values
s | ns | us | ms | min | hr | d

Details

Determines the frequency of random number generation for the noise source. Set this value so that it reflects the frequencies of interest in your model. Too small an interval between the calculation steps will lead to an unjustified slowdown in the simulation.

Dependencies

To use this option, check the box Enable noise mode.

Units

s | ns | us | ms | min | hr | d

Default value

1e-3 s

Program usage name

sample_time

Evaluatable

Yes

# Repeatability — random number sampling management
Not repeatable | Specify seed

Details

To control the random number generation, set this parameter to the following value:

  • Not repeatable — The initial value of the random generator changes every time you model the model.

  • Specify seed — allows you to set an explicit seed value using the parameter Seed.

Dependencies

To use this option, check the box Enable noise mode.

Values

Not repeatable | Specify seed

Default value

Not repeatable

Program usage name

repeatability

Evaluatable

No

# Seed — the initial value for generating random numbers

Details

The initial value used by the pseudorandom number generator. The initial value should be 0 or a positive integer.

Dependencies

To use this option, check the box Enable noise mode and the value Specify seed for the parameter Repeatability.

Default value

0

Program usage name

seed

Evaluatable

Yes