Asin

block Asin "Output the arc sine of the input"
    extends Interfaces.SISO(y(unit = "rad"));
equation
    y = Modelica.Math.asin(u);

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Polygon(
                    points = {
                        {0, 90}, 
                        {-8, 68}, 
                        {8, 68}, 
                        {0, 90}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {0, -80}, 
                        {0, 68}},
                    color = {192, 192, 192}), 
                Line(
                    points = {
                        {-80, -80}, 
                        {-79.2, -72.8}, 
                        {-77.6, -67.5}, 
                        {-73.6, -59.4}, 
                        {-66.3, -49.8}, 
                        {-53.5, -37.3}, 
                        {-30.2, -19.7}, 
                        {37.4, 24.8}, 
                        {57.5, 40.8}, 
                        {68.7, 52.7}, 
                        {75.2, 62.2}, 
                        {77.6, 67.5}, 
                        {80, 80}},
                    smooth = Smooth.Bezier), 
                Line(
                    points = {
                        {-90, 0}, 
                        {68, 0}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {90, 0}, 
                        {68, 8}, 
                        {68, -8}, 
                        {90, 0}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Text(
                    extent = {
                        {-88, 78}, 
                        {-16, 30}},
                    lineColor = {192, 192, 192},
                    textString = "asin")}),
        Diagram(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(
                    points = {
                        {0, 80}, 
                        {-8, 80}},
                    color = {192, 192, 192}), 
                Line(
                    points = {
                        {0, -80}, 
                        {-8, -80}},
                    color = {192, 192, 192}), 
                Line(
                    points = {
                        {0, -90}, 
                        {0, 84}},
                    color = {192, 192, 192}), 
                Text(
                    extent = {
                        {9, 102}, 
                        {36, 82}},
                    lineColor = {160, 160, 164},
                    textString = "y"), 
                Polygon(
                    points = {
                        {0, 100}, 
                        {-6, 84}, 
                        {6, 84}, 
                        {0, 100}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Text(
                    extent = {
                        {-40, -72}, 
                        {-15, -88}},
                    textString = "-pi/2",
                    lineColor = {0, 0, 255}), 
                Text(
                    extent = {
                        {-38, 88}, 
                        {-13, 72}},
                    textString = " pi/2",
                    lineColor = {0, 0, 255}), 
                Text(
                    extent = {
                        {70, 25}, 
                        {90, 5}},
                    textString = "+1",
                    lineColor = {0, 0, 255}), 
                Text(
                    extent = {
                        {-90, 21}, 
                        {-70, 1}},
                    textString = "-1",
                    lineColor = {0, 0, 255}), 
                Line(
                    points = {
                        {-100, 0}, 
                        {84, 0}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {100, 0}, 
                        {84, 6}, 
                        {84, -6}, 
                        {100, 0}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(points = {
                    {-80, -80}, 
                    {-79.2, -72.8}, 
                    {-77.6, -67.5}, 
                    {-73.6, -59.4}, 
                    {-66.3, -49.8}, 
                    {-53.5, -37.3}, 
                    {-30.2, -19.7}, 
                    {37.4, 24.8}, 
                    {57.5, 40.8}, 
                    {68.7, 52.7}, 
                    {75.2, 62.2}, 
                    {77.6, 67.5}, 
                    {80, 80}}), 
                Text(
                    extent = {
                        {74, -4}, 
                        {100, -26}},
                    lineColor = {160, 160, 164},
                    textString = "u")}),
        Documentation(info = "<html>\n<p>\nThis blocks computes the output <strong>y</strong> as the\n<em>sine-inverse</em> of the input <strong>u</strong>:\n</p>\n<pre>\n    y = <strong>asin</strong>( u );\n</pre>\n<p>\nThe absolute value of the input <strong>u</strong> need to\nbe less or equal to one (<strong>abs</strong>( u ) <= 1).\nOtherwise an error occurs.\n</p>\n\n<p>\n<img src=\"modelica://Modelica/Resources/Images/Math/asin.png\"\n     alt=\"atan.png\">\n</p>\n\n</html>"));
end Asin;