Engee documentation

Mean (Variable Frequency)

Calculates the average value of the signal.

blockType: SubSystem

Path in the library:

/Physical Modeling/Electrical/Control/Measurements/Mean (Variable Frequency)

Description

Block Mean (Variable Frequency) calculates the average value of the signal connected to the input of the In block. The average value is calculated using a moving average equal to one cycle of the signal frequency.:

where

  • — input signal;

  • — the period is defined as , where — frequency.

This block uses a moving average. Therefore, to output the calculated average value, the block needs to complete one simulation cycle. In the first simulation cycle, the output value remains constant and corresponds to the specified initial value.

Ports

Input

# Freq — signal frequency
scalar | vector

Details

The frequency of the signal.

Data types

Float64

Complex numbers support

No

# In — The input signal
scalar | vector

Details

The connection port to the analyzed signal.

Data types

Float64

Complex numbers support

No

Output

# X — the average value of the input signal
scalar | vector

Details

The average value of the input signal.

Data types

Float64

Complex numbers support

No

Parameters

Parameters

# Initial frequency, Hz: — Initial frequency

Details

Specify the frequency of the first simulation cycle in Hz.

Default value

50.0

Program usage name

f_start

Evaluatable

Yes

# Minimum frequency, Hz: — minimum frequency

Details

The minimum frequency value determines the block buffer size. Variable Time Delay, used inside the block to calculate the average value.

Default value

45.0

Program usage name

f_min

Evaluatable

Yes

# Initial input (DC component): — initial input value (DC component)

Details

Specify the initial value of the DC component input signal during the first simulation cycle.

Default value

0.0

Program usage name

V_start

Evaluatable

Yes

# Sample time: — sampling period

Details

Specify the sampling period of the block in seconds. Set the value 0 to implement a continuous block.

Default value

0.01

Program usage name

sample_time

Evaluatable

Yes