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 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 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 Resistance parameter. Such an error is usually indicated in the technical descriptions. The table shows how the block applies the error and calculates the resistance depending on the selected value of the Tolerance application parameter.

The value of the Tolerance application parameter 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, the value of the parameter Resistance.

  • — error, the value of the parameter Resistance tolerance (%)/100.

  • — the value of the parameter 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 Noise mode parameter, 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 Repeatability parameter.:

  • 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 Seed parameter.

Modeling of thermal effects

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

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.

Ports

Non-directional

+ — positive
electricity

The electrical port is a positive terminal.

— negative
electricity

The electrical port is a negative terminal.

H — thermal port
warm

The thermal port.

Dependencies

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

Parameters

Main

Resistance — nominal value of the pass resistance:q[<br>] 1 Ohm (default) | positive | scalar

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

Tolerance (%) — pass resistance error:q[<br>] 5 (default)

The resistance error specified in the technical data sheet.

Tolerance application — application of the pass error:q[<br>] None — use nominal value (by default) | Random tolerance | Apply maximum tolerance value | Apply minimum tolerance value

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 to calculate a random number using the Tolerance distribution parameter.

  • 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.

Tolerance distribution — type of error distribution
Uniform (by default) | Gaussian

Select the type of distribution:

  • Uniform — uniform distribution.

  • Gaussian — normal distribution.

Dependencies

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

Number of standard deviations for quoted tolerance — used to calculate normally distributed random numbers
4 (default)

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

Dependencies

To use this parameter, set the Tolerance distribution parameter to Gaussian.

Noise

Enable noise mode — enable the simulation of the noise effect
disabled (by default) | enabled

Check the box to simulate the noise effect.

Dependencies

Selecting the Enable noise mode checkbox opens the related options.

Sample time — the period of generation of noise values of
1e-3s (default)

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, select the Enable noise mode checkbox.

Repeatability — control of the random number generator
Not repeatable (by default)` | Specify seed

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 Seed parameter.

Dependencies

To use this option, select the Enable noise mode checkbox.

Choosing a value Repeatable or Specify seed opens the related parameters.

Seed — the initial value of random number generation
0 (default)

The initial value should be 0 or a positive integer.

Dependencies

To use this option, select the Noise mode checkbox and the value Specify seed for the Repeatability parameter.

Device simulation temperature — device simulation temperature
25 °C (default)

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

Dependencies

To use this option, select the Noise mode checkbox.

Thermal

Enable thermal port — enable thermal port
disabled (by default) | enabled

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?

Resistance temperature coefficient — coefficient of dependence of resistance on temperature
0.00393 1/K (default)

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

The default value is for copper.

Dependencies

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

Measurement temperature — simulation temperature of the pass device:q[<br>] 25 °C (default)

Temperature , for which the nominal resistance is set .

Dependencies

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

Thermal mass — the thermal mass associated with the thermal port
100 J/K (default) | a positive number

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 option, enable the Enable thermal port option.