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.

Examples

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 or I-F Controller 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

Speed (after motor starts) until which the I-F controller remains active (in RPM). When the motor speed exceeds this value, the I-F controller becomes inactive and the Status block output turns true.

Dependencies

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

Data Types: single | double | fixed point

After exiting I-F control (and entering closed-loop control), speed required to reactivate the I-F controller (in RPM). When the motor speed falls below this value, the I-F controller becomes active again and the Status block output turns false.

Dependencies

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

Data Types: single | double | fixed point

Maximum current (in amperes) that is supplied to the motor when I-F control is active.

Dependencies

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

Data Types: single | double | fixed point

Maximum rate at which motor speed can change (in RPM/s) when I-F control is active.

Dependencies

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

Data Types: single | double | fixed point

Maximum rate at which motor current can decay (in amperes/s) when I-F control is active.

Dependencies

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

Data Types: single | double | fixed point

Time (in seconds) during which both motor speed and current remains constant when I-F control is active.

Dependencies

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

Data Types: single | double | fixed point

Value of the speed oscillation damping coefficient that the I-F Controller block should use.

Dependencies

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

Data Types: single | double | fixed point

Output

expand all

Computed parameters for the Flux Observer and I-F Controller blocks.

Dependencies

To enable this port, set the Relative path of compatible block that needs functional extension parameter to indicate the relative path of either the Flux Observer or the I-F Controller 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