Engee documentation

Resistor (Advanced)

A resistor that takes into account the error of setting the resistance and noise.

blockType: AcausalElectricPowerSystems.Passive.Resistor

Path in the library:

/Physical Modeling/Electrical/Passive/Resistor (Advanced)

Description

Block Resistor (Advanced) It is a model of a linear resistor with the ability to simulate the following effects:

  • Errors in the resistance value.

  • Noise during operation.

  • Thermal dependences of the parameters.

You can independently turn on and off the listed options. When all additional options are disabled, the behavior of the component is identical to the block Resistor.

In its simplest form, the block Resistor (Advanced) simulates a linear resistor described by the following equation:

where

  • — current;

  • — tension;

  • — resistance.

Errors

You can add the error to the nominal value set for the parameter. Resistance. Such an error is usually indicated in the technical descriptions. The table shows how the unit applies the error and calculates the resistance depending on the selected parameter value. Tolerance application.

Parameter value Tolerance application The value of resistance

None - use nominal value

Random tolerance

Uniform distribution:

Normal distribution:

Apply maximum tolerance value

Apply minimum tolerance value

In the table:

  • — nominal resistance, parameter value Resistance;

  • — error, parameter value Tolerance (%)/100;

  • — parameter value Number of standard deviations for quoted tolerance;

  • and — standard functions for generating random numbers with uniform and normal distribution.

Thermal noise

The resistor block can generate a thermal noise current. If you check the box for the parameter Enable noise mode, then a discrete variable is added to the defining equations to represent thermal noise:

If the interval between the calculation steps is , then the thermal noise is defined as follows:

where

  • — Boltzmann constant, 1.3806504e-23 J/K;

  • — temperature;

  • — resistance;

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

  • — two-way thermal noise power distribution (the one-way equivalent is ).

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

  • Not repeatable — The seed of the random generator changes every time you run the model.

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

Modeling of thermal effects

You can open the heat port to specify how the resistance value changes depending on the temperature, and set the heat capacity. To open the thermal port, enable the parameter Enable thermal port.

Limitations

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 is a positive terminal.

Program usage name

p

# — negative
electricity

Details

The electrical port is a negative terminal.

Program usage name

n

# H — thermal port
warm

Details

The thermal port.

Dependencies

To use this port, check the box Enable thermal port.

Program usage name

thermal_port

Parameters

Main

# Resistance — nominal resistance value
Ohm | mOhm | kOhm | MOhm | GOhm

Details

Nominal resistance value. The resistance value must be greater than zero.

Units

Ohm | mOhm | kOhm | MOhm | GOhm

Default value

1.0 Ohm

Program usage name

R_nominal

Evaluatable

Yes

# Tolerance application — applying the margin of error
None - use nominal value | Random tolerance | Apply maximum tolerance value | Apply minimum tolerance value

Details

Choose how to apply the error during the simulation:

  • None - use nominal value — the unit does not apply an error, uses a nominal resistance value.

  • Random tolerance — The unit applies a random offset to the resistance value within the margin of error. You can choose a uniform or normal distribution for calculating a random number using the parameter Tolerance distribution.

  • Apply maximum tolerance value — the resistance increases by the specified error value.

  • Apply minimum tolerance value — the resistance is reduced by the specified error value.

Values

None - use nominal value | Random tolerance | Apply maximum tolerance value | Apply minimum tolerance value

Default value

None - use nominal value

Program usage name

tolerance_application_type

Evaluatable

No

# Tolerance (%) — resistance error

Details

The resistance error specified in the technical data sheet.

Default value

5.0

Program usage name

tolerance

Evaluatable

Yes

# Tolerance distribution — type of error distribution
Uniform | Gaussian

Details

Select the type of distribution:

  • Uniform — uniform distribution.

  • Gaussian — normal distribution.

Dependencies

To use this parameter, set for the parameter Tolerance application meaning Random tolerance.

Values

Uniform | Gaussian

Default value

Uniform

Program usage name

tolerance_distribution_type

Evaluatable

No

# Number of standard deviations for quoted tolerance — It is used to calculate normally distributed random numbers.

Details

The number of standard deviations for calculating normally distributed random numbers.

Dependencies

To use this parameter, set for the parameter Tolerance distribution meaning Gaussian.

Default value

4.0

Program usage name

number_of_standard_deviations

Evaluatable

Yes

Noise

# Enable noise mode — enable noise effect modeling

Details

Check the box to simulate the noise effect.

Dependencies

Check the box Enable noise mode opens the related parameters.

Default value

false (switched off)

Program usage name

enable_noise

Evaluatable

No

# Device simulation temperature — Device simulation temperature
K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR

Details

The value of the temperature at which the resistor will be modeled.

Dependencies

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

Units

K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR

Default value

25.0 degC

Program usage name

T_device

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 — managing the random number generator
Not repeatable | Specify seed

Details

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

  • Not repeatable — The seed of the random generator changes every time you run 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 of random number generation

Details

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

Thermal

# Enable thermal port — turning on the heat port

Details

Is it necessary to turn on the thermal port of the unit and simulate the effect of the generated heat and the temperature of the device?

Default value

false (switched off)

Program usage name

has_thermal_port

Evaluatable

No

# Resistance temperature coefficient — coefficient of resistance dependence on temperature
1/K | 1/degR | 1/deltaK | 1/deltadegC | 1/deltadegF | 1/deltadegR

Details

Ratio α in the equation α , describing resistance as a function of temperature.

The default value is for copper.

Dependencies

To use this parameter, enable the parameter Enable thermal port.

Units

1/K | 1/degR | 1/deltaK | 1/deltadegC | 1/deltadegF | 1/deltadegR

Default value

0.00393 1/K

Program usage name

alpha

Evaluatable

Yes

# Measurement temperature — Device simulation temperature
K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR

Details

Temperature , for which the nominal resistance is set .

Dependencies

To use this parameter, enable the parameter Enable thermal port.

Units

K | degC | degF | degR | deltaK | deltadegC | deltadegF | deltadegR

Default value

25.0 degC

Program usage name

T_measurement

Evaluatable

Yes

# Thermal mass — the thermal mass associated with the thermal port
J/K | kJ/K

Details

The thermal mass associated with the thermal port H. It represents the energy needed to increase the temperature of the heating port by one degree.

Dependencies

To use this parameter, enable the parameter Enable thermal port.

Units

J/K | kJ/K

Default value

100.0 J/K

Program usage name

thermal_mass

Evaluatable

Yes