Engee documentation

Current Source

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

blockType: AcausalElectricPowerSystems.Sources.Current

Path in the library:

/Physical Modeling/Electrical/Sources/Current Source

Description

Block Current Source It is a current source with DC, AC and noise components. The current flowing through the source from terminal − to terminal + is determined as follows:

Where

  • — the DC component;

  • — the amplitude of the alternating current component;

  • — frequency of alternating current;

  • — phase shift of the alternating current component;

  • — noise current.

You can customize the block Current 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 current by specifying non-zero parameter values after placing the block in the model.

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

Where

  • — spectral power density of one-sided noise for a load of 1 ohm, in АГц ;

  • — 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 current 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 specify directly Seed.

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 current — Direct current output
A | pA | nA | uA | mA | kA | MA

Details

Direct current output. Specify a non-zero value to add a DC component to the current source.

Units

A | pA | nA | uA | mA | kA | MA

Default value

0.0 A

Program usage name

I_DC

Evaluatable

Yes

# AC current peak amplitude — the amplitude of the alternating current
A | pA | nA | uA | mA | kA | MA

Details

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

Units

A | pA | nA | uA | mA | kA | MA

Default value

0.0 A

Program usage name

I_AC

Evaluatable

Yes

# AC current phase shift — phase shift of alternating current
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

Phase shift of alternating current.

Units

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

Default value

0.0 rad

Program usage name

shift

Evaluatable

Yes

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

Details

The frequency of the output alternating current.

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
A^2*s | A^2/Hz

Details

One-way spectral noise power density.

Dependencies

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

Units

A^2*s | A^2/Hz

Default value

0.0 A^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 initial 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