Adding signal operations to plots

December 3rd, 2012 by Mike Dempsey

Besides plotting general expressions, Dymola 2013 FD01 allows the user a straightforward calculation of several relevant magnitudes in a plot window. To select this, right-click on a plotted signal and select Signal Operators. A menu will be displayed with the following list of applicable operators, which can be used over a user-defined time range:

Selection and menu of Signal Operators from a plot window

Figure 1. Selection and menu of Signal Operators from a plot window

When an specific operator is selected, a dialog box pops in order to allow the user to set the time range (or any other magnitude used as abscissa) over which the operator shall be applied. The operators First Harmonic and THD require, besides, entering the period of the signal.

If the minimum was larger than the maximum or if the horizontal range was out of bounds, an error message would be displayed. If everything is correct, the results will be seen in the plot depending on the operator executed, see figure 4.

Dialog box for Max signal operator

Figure 2. Dialog box for Max signal operator

Dialog box for First Harmonic signal operator

Figure 3. Dialog box for First Harmonic signal operator

Several operators applied to a signal (different horizontal ranges)

Figure 4. Several operators applied to a signal (different horizontal ranges)

As it can be seen in the above figure, the default colour for horizontal range line and associated text is black. If there were more than one signal in the plot window, then the associated text would be shown in the same colour as the signal they correspond to.

Furthermore, it is possible to edit the results provided by these operators in two ways:

1.    Use a drag-and-drop operation to move the horizontal line that represents the time range or its start and end points. Deleting a result can also be made by clicking on a time range and pressing the key “Delete”.

2.    Right-click on a result and select one of the following options:

Edit options for a signal operator

Figure 5. Edit options for a signal operator

The Signal Operator functionality has support in the scripting environment (except for THD and First Harmonic) using the function plotSignalOperator with the following general syntax:

plotSignalOperator("variablePath", signalOperator, startTime, stopTime)
Inputs and outputs of the function plotSignalOperator

Figure 6. Inputs and outputs of the function plotSignalOperator

 

Archives

2017

2016

2015

2013

2012

2011

2010