Main Content

Compute Parameter

Extend functionality of blocks by enabling additional inputs

Since R2024a

Libraries:
Motor Control Blockset / Signal Management

Description

The Compute Parameter block extends the functionality of compatible blocks available in the current model. The block customizes itself according to the settings of a compatible block and provides the parameters needed by the compatible block through either an output bus or multiple output signals.

You can use the Compute Parameter block parameters dialog box to select a compatible block by providing its relative path. The dialog box can also list the relative paths of all compatible blocks available in the current model, which you can then copy to the Relative path of compatible block that needs functional extension field in the dialog box.

For example when you configure the Compute Parameter block to connect with Flux Observer block, the Compute Parameter block provides an output in the form of a bus. You can then connect this bus to the additional input port ParameterBus available in the Flux Observer block.

For the other compatible blocks, you can connect the Compute Parameter output signals to the corresponding additional input ports available in the compatible blocks.

Therefore, the block provides a functional extension to the compatible blocks by enabling them to accept parameter values at run-time. The block supports these compatible blocks:

It is recommended that you run this block at a rate that is slower than the task rate of compatible block to minimize the computation load in hardware targets.

Ports

Input

expand all

Number of pole pairs available in the motor.

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

Data Types: single | double | fixed point

Stator phase winding resistance of the motor (in ohms).

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

Data Types: single | double | fixed point

Stator winding inductance of the motor along the d-axis (in henries).

Dependencies

To enable this port:

  • Set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

  • Set the Motor selection parameter of the Flux Observer block to PMSM.

Data Types: single | double | fixed point

Leakage inductance of the induction motor stator winding (in henries).

Dependencies

To enable this port:

  • Set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

  • Set the Motor selection parameter of the Flux Observer block to ACIM.

Data Types: single | double | fixed point

Leakage inductance of the induction motor rotor winding (in henries).

Dependencies

To enable this port:

  • Set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

  • Set the Motor selection parameter of the Flux Observer block to ACIM.

Data Types: single | double | fixed point

Magnetizing inductance of the induction motor (in henries).

Dependencies

To enable this port:

  • Set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

  • Set the Motor selection parameter of the Flux Observer block to ACIM.

Data Types: single | double | fixed point

Cutoff frequency (in hertz) of the internal highpass filter that filters noise.

The Flux Observer block uses an internal first-order IIR highpass filter. Specify a frequency at this port that is lower than the lowest frequency corresponding to the minimum speed of the motor. For example, you can enter a value that is one-tenth of the lowest electrical frequency of the stator voltages and currents. You can adjust the value you specify at this port to determine a more accurate cutoff frequency that generates the desired block output.

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

Data Types: single | double | fixed point

The number of slits available in each phase of the quadrature encoder.

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Quadrature Decoder block in the current model.

Data Types: single | double | fixed point

The number of counts that the quadrature encoder generates for every slit. A count indicates a slit position. For example, set this port to 4 (quadrature mode) if you want the encoder to generate four counts corresponding to 00, 10, 11, and 01 slit positions or values. If you select the quadrature mode:

Encoder counts per revolution (post-quadrature) = Encoder counts per slitEncoder slits

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Quadrature Decoder block in the current model.

Data Types: single | double | fixed point

Output

expand all

Computed parameters for the Flux Observer block.

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Flux Observer block in the current model.

Data Types: single

Number of counts the quadrature encoder generates for each revolution.

CountsPerRev = Encoder slitsEncoder counts per slit

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Quadrature Decoder block in the current model.

Data Types: single

The block outputs the inverse of the number of counts the quadrature encoder generates for each revolution at this port.

1/CountsPerRev = 1/(Encoder slitsEncoder counts per slit)

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of the Quadrature Decoder block in the current model.

Data Types: single

Parameters

expand all

Relative path of the compatible block from the current model that needs functional extension.

Click this button to obtain a list of relative paths of all compatible blocks in the current model. The block displays this list in the Supported block paths section.

Copy and paste the relevant path from the list in the Relative path of compatible block that needs functional extension parameter to configure this block.

This section displays the list of relative paths of the compatible blocks in the current model.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2024a