Main Content

Sine-Cosine Lookup

Implement sine and cosine functions using lookup table approach

Since R2020a

Libraries:
Motor Control Blockset / Controls / Math Transforms

Description

The Sine-Cosine Lookup block implements sine and cosine functions using the specified position or phase input signal.

The block uses the lookup table approach. This approach results in optimized code-execution when used with the model settings and configuration adopted by the examples shipped in Motor Control Blockset™. You can specify the number of lookup table points in the Number of data points for lookup table parameter.

This figure shows the input position and the generated sine and cosine output signals:

Ports

Input

expand all

Position or phase value of the reference voltage signal specified as scalar in either per-unit, radians, or degrees.

Data Types: single | double | fixed point

Output

expand all

Sine waveform output with a frequency that is identical to the position or phase signal (θe) frequency.

Data Types: single | double | fixed point

Cosine waveform output with a frequency that is identical to the position or phase signal (θe) frequency.

Data Types: single | double | fixed point

Parameters

expand all

Unit of the input reference voltage position.

Size of the lookup table array. This parameter accepts a value between 125 and 4095.

Note

Based on the value your enter in this parameter, the block uses a value nearest to (125*n)+2. The block performs this approximation to optimize the computation in the hardware.

Extended Capabilities

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

Fixed-Point Conversion
Design and simulate fixed-point systems using Fixed-Point Designer™.

Version History

Introduced in R2020a