modelCircleTrayectory

Generate the trayectory of a circle from parametric equations

Extends from Modelica.Blocks.Interfaces.MO (Multiple Output continuous control block), Servomechanisms.Utilities.IconXY.

Information

General

This blocks generates the x and y coordinates of a circle trayectory with the circle parametric equation.

Implementation

It inherits the real interfaces from the block for multiple outputs Modelica.Blocks.Interfaces.MO

The parametric equations implemented are:

circleequation.png

r: radius, T:period, xc and yc : x and y coordinates of the center, t0: start time.

Notes

  • The output is an array y where y[1] is the x coordinate and y[2] is the y coordinate.
  • To connect the output to other component the user must input the index of the array (1 or 2).
  • The user can change the radius, center and the time to complete the circle trayectory by changing the parameters of the block.

Example

With the default parameters the plot results will be:

and with plot parametric:

Parameters

TypeNameDefaultDescription
Integernout (from MO)1Number of outputs
SI.Distancer1radius of circle
SI.Distancexc0x coordinate of center of circle
SI.Distanceyc0y coordinate of center of circle
SI.Timeperiod1time to complete 1 revolution
SI.TimestartTime0start time

Connectors

TypeNameDefaultDescription
RealOutput[nout]y (from MO)Connector of Real output signals

Components

TypeNameDefaultDescription
Realpaso2*Const.pi/periodfactor