Magnitude-Angle to Complex
Converts the modulus and/or phase angle of a signal to a complex signal.
Description
Supported operations
The Magnitude-Angle to Complex block converts modulus and phase angle input signals to a complex output value. The input angle must be specified in radians.
If two input ports are available, the block supports any combination of dimensions that satisfies the brodcast capabilities.
If the input of the block is an array, the output will be an array of complex signals. The elements of the input vector of modules correspond to the modules of the complex output elements. Similarly, the elements of the input vector of angles correspond to the angles of the complex output elements. If one of the input signals is a scalar, it corresponds to a component (modulus or angle) of all complex output signals.
Ports
Input
#
|u|
—
module
scalar
| vector
| matrix
| N-dimensional array
Details
A module in the form of a real scalar, vector, matrix or N-dimensional array.
Dependencies
To use this port, set the Input parameter to Magnitude and angle
or Magnitude
.
Limitations.
If one of the inputs has a floating point data type, the other input must use the same data type.
Data types |
|
Complex numbers support |
No |
#
∠u
—
phase angle
scalar | vector | matrix | N-dimensional array
Details
The phase angle in radians given as a real scalar, vector, matrix, or N-dimensional array. If the CORDIC approximation method is used for calculations, the input angle must lie in the range .
Dependencies
To use this port, set the Input parameter to Magnitude and angle
or Angle
.
Limitations.
If one of the inputs has a floating point data type, the other input must use the same data type.
Data types |
|
Complex numbers support |
No |
Output
#
u
—
complex signal
scalar
| vector
| matrix
Details
A complex signal formed from given values of modulus and phase angle.
If the input of the block is an array, the output is an array of complex signals. The elements of the input modulus vector correspond to the moduli of the complex output elements. Similarly, the elements of the input vector of angle correspond to the angles of the complex output elements. If one of the input signals is a scalar, it corresponds to a component (module or angle) of all complex output signals.
Data types |
|
Complex numbers support |
Yes |
Parameters
Main
#
Input —
input port type
Magnitude
| Angle
| Magnitude and angle
Details
Specify which input data is used:
-
Magnitude
- modulus. -
Angle
- angle. -
Magnitude and angle
- modulus and angle.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Approximation method —
approximation method
None
| CORDIC
Details
Specify the approximation method for calculating the output.
Approximation method | When to use this method |
---|---|
|
If the Taylor series algorithm is used (by default). |
|
If a quick and approximate calculation is needed. |
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Magnitude —
output module
Scalar / array of real numbers
Details
A constant output modulus specified as a real scalar, vector, matrix, or N-dimensional array.
Dependencies
To use this parameter, set the Input parameter to Angle
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Angle —
input signal phase angle
Scalar / array of real numbers
Details
The phase angle in radians specified as a real scalar, vector, matrix or N-dimensional array. If the CORDIC approximation method is used for calculations, the input angle must lie in the range .
Dependencies
To use this parameter, set the Input parameter to Magnitude
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Number of iterations —
number of iterations for the CORDIC algorithm
Real number
Details
The number of iterations to execute the CORDIC algorithm as a positive integer.
Dependencies
To use this parameter, set the Approximation method parameter to CORDIC
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Scale output by reciprocal of gain factor —
scaling option for real and imaginary parts of the complex output
Logical
Details
Select this check box to scale the real and imaginary parts of the complex output signal by a factor of . This value depends on the number of iterations specified. As the number of iterations increases, the value approaches 1.647
.
This checkbox is selected by default, which leads to a numerically more accurate result for the complex output . However, scaling the output adds two additional multiplication operations, one for and one for .
Dependencies
To use this option, set the Approximation method parameter to CORDIC
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
Read more
CORDIC
CORDIC is an abbreviation for COordinate Rotation DIgital Computer. The Givens rotation-based CORDIC algorithm is one of the most hardware-efficient algorithms because it requires only iterative shift-add operations (cf. [Ссылки]). The CORDIC algorithm eliminates the need for explicit multipliers. Various functions such as sine, cosine, arcsine, arccosine, arccosine, arctangent and modulus of a vector can be computed using CORDIC. You can also use this algorithm for division, square root, hyperbolic and logarithmic functions.
References
-
Volder, Jack E., "The CORDIC Trigonometric Computing Technique." IRE Transactions on Electronic Computers EC-8 (1959); 330-334.
-
Andraka, Ray, "A Survey of CORDIC Algorithm for FPGA Based Computers." Proceedings of the 1998 ACM/SIGDA Sixth International Symposium on Field Programmable Gate Arrays. Feb. 22-24 (1998): 191-200.
-
Walther, J.S., "A Unified Algorithm for Elementary Functions," Proceedings of the Spring Joint Computer Conference, May 18-20, 1971: 379-386.
-
Schelin, Charles W., "Calculator Function Approximation," The American Mathematical Monthly 90, no. 5 (1983): 317-325.