Engee documentation

Programmable Voltage Source

A single-phase AC voltage source with the ability to program amplitude, frequency, phase shift and DC offset.

blockType: AcausalElectricPowerSystems.Sources.ProgrammableVoltage

Path in the library:

/Physical Modeling/Electrical/Sources/Programmable Voltage Source

Description

Block Programmable Voltage Source simulates a single-phase AC voltage source with programmable amplitude, frequency, phase shift, and DC offset. Select the external mode to set these values using the input signals M, F, Phi and DC. Higher harmonics can also be included in the voltage source.

Limitations

Modeling with higher harmonics enabled slows down the simulation. If you include harmonics, choose the interval between the calculation steps so that harmonics are generated only at the frequencies you are interested in, and not higher.

Modeling with noise enabled slows down the simulation. If you include noise, choose an interval between the calculation steps so that noise is generated only at the frequencies you are interested in, but not higher.

Variables

Use the parameter group Initial Targets to set the priority and initial target values for the block parameter variables before modeling. For more information, see Configuring physical blocks using target values.

Ports

Conserving

# + — positive
electricity

Details

The electrical port corresponding to the positive terminal of the source.

Program usage name

p

# — negative
electricity

Details

The electrical port corresponding to the negative terminal of the source.

Program usage name

n

Input

# DC — the DC component
scalar

Details

The input port that sets the constant component of the voltage.

Data types

Float64

Complex numbers support

I don’t

# Phi — phase shift, rad
scalar

Details

The input port that sets the phase shift.

Data types

Float64

Complex numbers support

I don’t

# F — Frequency, rad
scalar

Details

The input port that sets the frequency.

Data types

Float64

Complex numbers support

I don’t

# M — amplitude
scalar

Details

The input port that sets the amplitude.

Data types

Float64

Complex numbers support

I don’t

Parameters

AC Magnitude

# AC magnitude configuration — voltage amplitude configuration
Constant | Ramp | Step | Modulation | External

Details

Setting the AC voltage amplitude

Dependencies

Choosing a value Constant, Ramp, Step or Modulation opens the corresponding parameters.

Choosing a value External opens the input port M.

Values

Constant | Ramp | Step | Modulation | External

Default value

Constant

Program usage name

V_AC_type

Evaluatable

No

# AC voltage peak magnitude — peak AC voltage amplitude
V | uV | mV | kV | MV

Details

The peak amplitude of the alternating voltage.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Constant, Ramp, Step or Modulation.

Units

V | uV | mV | kV | MV

Default value

100.0 V

Program usage name

V_AC

Evaluatable

Yes

# Rate of change — the rate of change of the AC voltage amplitude
V/s | V/us

Details

The rate of change of the AC voltage amplitude.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Ramp.

Units

V/s | V/us

Default value

1.0 V/s

Program usage name

V_AC_ramp

Evaluatable

Yes

# Step amplitude — the step of changing the amplitude of the alternating voltage
V | uV | mV | kV | MV

Details

The step of changing the amplitude of the alternating voltage.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Step.

Units

V | uV | mV | kV | MV

Default value

1.0 V

Program usage name

V_AC_step

Evaluatable

Yes

# Modulation magnitude — amplitude of AC voltage modulation
V | uV | mV | kV | MV

Details

The amplitule of the AC voltage modulation.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Modulation.

Units

V | uV | mV | kV | MV

Default value

1.0 V

Program usage name

V_AC_modulation_mag

Evaluatable

Yes

# Modulation frequency — frequency of AC voltage modulation
Hz | kHz | MHz | GHz

Details

The frequency of AC voltage modulation.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Modulation.

Units

Hz | kHz | MHz | GHz

Default value

1.0 Hz

Program usage name

V_AC_modulation_frequency

Evaluatable

Yes

# Start time — the time of the beginning of the voltage amplitude change
s | ns | us | ms | min | hr | d

Details

The time of the beginning of the voltage amplitude change.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Ramp, Step or Modulation.

Units

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

Default value

1.0 s

Program usage name

V_AC_start_time

Evaluatable

Yes

# Stop time — The end time of the voltage amplitude change
s | ns | us | ms | min | hr | d

Details

The end time of the voltage amplitude change.

Dependencies

To use this parameter, set for the parameter AC magnitude configuration meaning Ramp, Step or Modulation.

Units

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

Default value

2.0 s

Program usage name

V_AC_stop_time

Evaluatable

Yes

Frequency

# AC frequency configuration — AC voltage frequency configuration
Constant | Ramp | Step | Modulation | External

Details

Setting the frequency of the alternating voltage.

Dependencies

Choosing a value Constant, Ramp, Step or Modulation opens the corresponding parameters.

Choosing a value External opens the input port F.

Values

Constant | Ramp | Step | Modulation | External

Default value

Constant

Program usage name

f_type

Evaluatable

No

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

Details

The frequency of the alternating voltage.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Constant, Ramp, Step or Modulation.

Units

Hz | kHz | MHz | GHz

Default value

50.0 Hz

Program usage name

f

Evaluatable

Yes

# Rate of change — rate of change of AC voltage frequency
Hz^2 | GHz^2 | MHz^2 | kHz^2 | Hz/s

Details

The rate of change of the AC voltage frequency.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Ramp.

Units

Hz^2 | GHz^2 | MHz^2 | kHz^2 | Hz/s

Default value

1.0 Hz/s

Program usage name

f_ramp

Evaluatable

Yes

# Step amplitude — the step of changing the frequency of alternating voltage
Hz | kHz | MHz | GHz

Details

The step of changing the frequency of the alternating voltage.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Step.

Units

Hz | kHz | MHz | GHz

Default value

1.0 Hz

Program usage name

f_step

Evaluatable

Yes

# Modulation magnitude — amplitude of AC voltage frequency modulation
Hz | kHz | MHz | GHz

Details

The amplitude of the AC voltage frequency modulation.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Modulation.

Units

Hz | kHz | MHz | GHz

Default value

1.0 Hz

Program usage name

f_modulation_mag

Evaluatable

Yes

# Modulation frequency — frequency of AC voltage frequency modulation
Hz | kHz | MHz | GHz

Details

The frequency of the AC voltage frequency modulation.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Modulation.

Units

Hz | kHz | MHz | GHz

Default value

1.0 Hz

Program usage name

f_modulation_frequency

Evaluatable

Yes

# Start time — start time of AC voltage frequency change
s | ns | us | ms | min | hr | d

Details

The start time of the AC voltage frequency change.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Ramp, Step or Modulation.

Units

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

Default value

1.0 s

Program usage name

f_start_time

Evaluatable

Yes

# Stop time — The end time of the AC voltage frequency change
s | ns | us | ms | min | hr | d

Details

The end time of the AC voltage frequency change.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Ramp, Step or Modulation.

Units

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

Default value

2.0 s

Program usage name

f_stop_time

Evaluatable

Yes

Phase

# AC phase shift configuration — configuration of phase shift of alternating voltage
Constant | Ramp | Step | Modulation | External

Details

Setting the phase shift of the AC voltage.

Dependencies

Choosing a value Constant, Ramp, Step or Modulation opens the corresponding parameters.

Choosing a value External opens the Phi input port.

Values

Constant | Ramp | Step | Modulation | External

Default value

Constant

Program usage name

shift_type

Evaluatable

No

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

Details

Phase shift of the alternating voltage.

Dependencies

To use this parameter, set the AC phase shift parameter to Constant, Ramp, Step or Modulation.

Units

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

Default value

0.0 deg

Program usage name

shift

Evaluatable

Yes

# Rate of change — rate of change of phase shift of alternating voltage
rad/s | deg/s | rad/min | deg/min | rpm | rps

Details

The rate of change of the AC voltage frequency.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Ramp.

Units

rad/s | deg/s | rad/min | deg/min | rpm | rps

Default value

1.0 deg/s

Program usage name

shift_ramp

Evaluatable

Yes

# Step amplitude — the step of changing the frequency of alternating voltage
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

The step of changing the frequency of the alternating voltage.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Step.

Units

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

Default value

1.0 deg

Program usage name

shift_step

Evaluatable

Yes

# Modulation magnitude — amplitude of AC voltage frequency modulation
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

The amplitude of the AC voltage frequency modulation.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Modulation.

Units

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

Default value

1.0 deg

Program usage name

shift_modulation_mag

Evaluatable

Yes

# Modulation frequency — frequency of AC voltage frequency modulation
Hz | kHz | MHz | GHz

Details

The frequency of the AC voltage frequency modulation.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Modulation.

Units

Hz | kHz | MHz | GHz

Default value

1.0 Hz

Program usage name

shift_modulation_frequency

Evaluatable

Yes

# Start time — The start time of the AC voltage frequency change
s | ns | us | ms | min | hr | d

Details

The start time of the AC voltage frequency change.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Ramp, Step or Modulation.

Units

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

Default value

1.0 s

Program usage name

shift_start_time

Evaluatable

Yes

# Stop time — The end time of the AC voltage frequency change
s | ns | us | ms | min | hr | d

Details

The end time of the AC voltage frequency change.

Dependencies

To use this parameter, set for the parameter AC frequency configuration meaning Ramp, Step or Modulation.

Units

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

Default value

2.0 s

Program usage name

shift_stop_time

Evaluatable

Yes

DC Voltage

# DC voltage configuration — configuration of the constant voltage component
Constant | Ramp | Step | Modulation | External

Details

Setting the constant voltage component.

Dependencies

Choosing a value Constant, Ramp, Step or Modulation opens the corresponding parameters.

Choosing a value External opens the DC input port.

Values

Constant | Ramp | Step | Modulation | External

Default value

Constant

Program usage name

V_DC_type

Evaluatable

No

# DC voltage — the value of the constant voltage component
V | uV | mV | kV | MV

Details

The value of the constant voltage component.

Dependencies

To use this parameter, set for the parameter DC voltage configuration meaning Constant, Ramp, Step or Modulation.

Units

V | uV | mV | kV | MV

Default value

0.0 V

Program usage name

V_DC

Evaluatable

Yes

# Rate of change — the rate of change of the constant voltage component
V/s | V/us

Details

The rate of change of the constant component of the voltage.

Dependencies

To use this parameter, set for the parameter DC voltage configuration meaning Ramp.

Units

V/s | V/us

Default value

1.0 V/s

Program usage name

V_DC_ramp

Evaluatable

Yes

# Step amplitude — the step of changing the constant component of the voltage
V | uV | mV | kV | MV

Details

The step of changing the constant component of the voltage.

Dependencies

This parameter is available when for the parameter DC voltage configuration meaning Step.

Units

V | uV | mV | kV | MV

Default value

1.0 V

Program usage name

V_DC_step

Evaluatable

Yes

# Modulation magnitude — the amplitude of the modulation of the constant voltage component
V | uV | mV | kV | MV

Details

The amplitude of the modulation of the constant voltage component.

Dependencies

To use this parameter, set for the parameter DC voltage configuration meaning Modulation.

Units

V | uV | mV | kV | MV

Default value

1.0 V

Program usage name

V_DC_modulation_mag

Evaluatable

Yes

# Modulation frequency — the frequency of modulation of the constant voltage component
Hz | kHz | MHz | GHz

Details

The frequency of modulation of the constant component of the voltage.

Dependencies

To use this parameter, set for the parameter DC voltage configuration meaning Modulation.

Units

Hz | kHz | MHz | GHz

Default value

1.0 Hz

Program usage name

V_DC_modulation_frequency

Evaluatable

Yes

# Start time — the time of the beginning of the change in the constant component of the voltage
s | ns | us | ms | min | hr | d

Details

The time of the beginning of the change in the constant component of the voltage.

Dependencies

To use this parameter, set for the parameter DC voltage configuration meaning Ramp, Step or Modulation.

Units

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

Default value

1.0 s

Program usage name

V_DC_start_time

Evaluatable

Yes

# Stop time — the end time of the change in the constant voltage component
s | ns | us | ms | min | hr | d

Details

The end time of the change in the constant component of the voltage.

Dependencies

To use this parameter, set for the parameter DC voltage configuration meaning Ramp, Step or Modulation.

Units

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

Default value

2.0 s

Program usage name

V_DC_stop_time

Evaluatable

Yes

Harmonics

# Source harmonics — generation of higher harmonics

Details

If this option is unchecked, then there are no higher harmonics.

If this option is selected, the higher harmonics are added to the main harmonics.

Dependencies

Checking this box opens the related options.

Default value

false (switched off)

Program usage name

harmonic_option

Evaluatable

No

# Harmonic orders — harmonic orders

Details

Harmonic orders.

Dependencies

To use this option, check the box for the option Source harmonics.

Default value

[5, 7, 11, 13]

Program usage name

harmonic_orders

Evaluatable

Yes

# Harmonic magnitude to peak magnitude ratios — the ratio of harmonic amplitudes to the amplitude of the fundamental harmonic

Details

Harmonic coefficients. Specify the same number of elements as for the parameter Harmonic orders.

Dependencies

To use this option, check the box for the option Source harmonics.

Default value

[0.1, 0.1, 0.1, 0.1]

Program usage name

harmonic_ratios

Evaluatable

Yes

# Harmonic phase shifts — phase shifts of higher harmonics
rad | deg | rev | mrad | arcsec | arcmin | gon

Details

Phase shifts of higher harmonics. Specify the same number of elements as for the parameter Harmonic orders.

Dependencies

To use this option, check the box for the option Source harmonics.

Units

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

Default value

[0, 0, 0, 0] deg

Program usage name

harmonic_shifts

Evaluatable

Yes

# Start time — harmonic generation start time
s | ns | us | ms | min | hr | d

Details

The start time of harmonic generation.

Dependencies

To use this option, check the box for the option Source harmonics.

Units

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

Default value

-Inf s

Program usage name

harmonics_start_time

Evaluatable

Yes

# Stop time — the end time of harmonic generation
s | ns | us | ms | min | hr | d

Details

The end time of harmonic generation.

Dependencies

To use this option, check the box for the option Source harmonics.

Units

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

Default value

Inf s

Program usage name

harmonics_stop_time

Evaluatable

Yes