RectangularToPolar

Convert rectangular coordinates to polar coordinates

    RectangularToPolar

Library

Modelica/Blocks/Math

Description

The input values of this block are the rectangular componentsu_re and u_im of a phasor in two dimensions.This block calculates the length y_abs andthe angle y_arg of the polar representation of this phasor.

y_abs = abs(u_re + j*u_im) = sqrt( u_re2 + u_im2 )y_arg = arg(u_re + j*u_im) = atan2(u_im, u_re)

Ports

NameTypeDescriptionIO TypeNumber

u_re

implicit

Real part of rectangular representation

input

1

u_im

implicit

Imaginary part of rectangular representation

input

2

y_abs

implicit

Length of polar representation

output

1

y_arg

implicit

Angle of polar representation

output

2

See Also