Modelica.ComplexBlocks.Sources

Library of signal source blocks generating Complex signals

Information

Extends from Modelica.Icons.SourcesPackage (Icon for packages containing sources).

Package Content

NameDescription
Modelica.ComplexBlocks.Sources.ComplexExpression ComplexExpression Set output signal to a time varying Complex expression
Modelica.ComplexBlocks.Sources.ComplexConstant ComplexConstant Generate constant signal of type Complex
Modelica.ComplexBlocks.Sources.ComplexStep ComplexStep Generate step signal of type Complex
Modelica.ComplexBlocks.Sources.ComplexRotatingPhasor ComplexRotatingPhasor Generate a phasor with constant magnitude and constant angular velocity of type Complex


Modelica.ComplexBlocks.Sources.ComplexExpression Modelica.ComplexBlocks.Sources.ComplexExpression

Set output signal to a time varying Complex expression

Modelica.ComplexBlocks.Sources.ComplexExpression

Information


The (time varying) Complex output signal of this block can be defined in its parameter menu via variable y. The purpose is to support the easy definition of Complex expressions in a block diagram. Note, that "time" is a built-in variable that is always accessible and represents the "model time" and that Variable y is both a variable and a connector.

Parameters

TypeNameDefaultDescription
Time varying output signal
ComplexOutputyComplex(0)Value of Complex output

Connectors

TypeNameDescription
Time varying output signal
output ComplexOutputyValue of Complex output

Modelica definition

block ComplexExpression 
  "Set output signal to a time varying Complex expression"

  output Modelica.ComplexBlocks.Interfaces.ComplexOutput y=Complex(0) 
    "Value of Complex output";


end ComplexExpression;

Modelica.ComplexBlocks.Sources.ComplexConstant Modelica.ComplexBlocks.Sources.ComplexConstant

Generate constant signal of type Complex

Modelica.ComplexBlocks.Sources.ComplexConstant

Information


The Complex output y is a constant signal:

Extends from Modelica.ComplexBlocks.Interfaces.ComplexSO (Single Output continuous control block).

Parameters

TypeNameDefaultDescription
Complexk Constant output value

Connectors

TypeNameDescription
output ComplexOutputyConnector of Complex output signal

Modelica definition

block ComplexConstant "Generate constant signal of type Complex"
  parameter Complex k(re(start=1),im(start=0)) "Constant output value";
  extends Modelica.ComplexBlocks.Interfaces.ComplexSO;

equation 
  y = k;
end ComplexConstant;

Modelica.ComplexBlocks.Sources.ComplexStep Modelica.ComplexBlocks.Sources.ComplexStep

Generate step signal of type Complex

Modelica.ComplexBlocks.Sources.ComplexStep

Information


The Complex output y is a step signal (of real and imaginary part):

Extends from ComplexBlocks.Interfaces.ComplexSignalSource (Base class for continuous signal source).

Parameters

TypeNameDefaultDescription
ComplexheightComplex(1)Height of step
ComplexoffsetComplex(0)Offset of output signal y
TimestartTime0Output y = offset for time < startTime [s]

Connectors

TypeNameDescription
output ComplexOutputyConnector of Complex output signal

Modelica definition

block ComplexStep "Generate step signal of type Complex"
  parameter Complex height=Complex(1) "Height of step";
  extends ComplexBlocks.Interfaces.ComplexSignalSource;

equation 
  y = offset + (if time < startTime then Complex(0) else height);
end ComplexStep;

Modelica.ComplexBlocks.Sources.ComplexRotatingPhasor Modelica.ComplexBlocks.Sources.ComplexRotatingPhasor

Generate a phasor with constant magnitude and constant angular velocity of type Complex

Modelica.ComplexBlocks.Sources.ComplexRotatingPhasor

Information


The output y is a complex phasor with constant magnitude, spinning with constant angular velocity.

Extends from Modelica.ComplexBlocks.Interfaces.ComplexSO (Single Output continuous control block).

Parameters

TypeNameDefaultDescription
Realmagnitude1Magnitude of complex phasor
AngularVelocityw1Constant angular velocity of complex phasor [rad/s]
Anglephi00Initial angle of complex phasor at time = 0 [rad]

Connectors

TypeNameDescription
output ComplexOutputyConnector of Complex output signal

Modelica definition

block ComplexRotatingPhasor 
  "Generate a phasor with constant magnitude and constant angular velocity of type Complex"
  parameter Real magnitude=1 "Magnitude of complex phasor";
  parameter Modelica.SIunits.AngularVelocity w=1 
    "Constant angular velocity of complex phasor";
  parameter Modelica.SIunits.Angle phi0 = 0 
    "Initial angle of complex phasor at time = 0";
  extends Modelica.ComplexBlocks.Interfaces.ComplexSO;

equation 
  y = magnitude * Modelica.ComplexMath.exp(Complex(0,w*time+phi0));
end ComplexRotatingPhasor;

Automatically generated Fri Nov 12 16:27:41 2010.