Engee documentation
Notebook

Using buses

In this example, we will explore the possibilities of using buses of multiple signals to visually simplify models.

The model is shown in the figure below. The purpose of this model is to combine three signals into one bus and convert them within the subsystem.

The input is a sinusoidal signal whose frequency varies linearly with time, a sinusoidal signal with a constant frequency and a switching signal from 0 to 1.

image.png

The following figure shows the inner workings of the subsystem. In it we split the bus into three separate signals, after which we double the first signal, increase the frequency of the second signal by a factor of 10, and reverse all input values of the third signal. After that we reassemble the bus again, but with new names. It is also worth mentioning that signals within the bus can be of different lengths and have different sampling frequencies.

image.png

The figure below shows the interface of the Bus Selector block, which allows us to select the signals we need from the bus. image.png

Next, let's compare the input and output values for the manipulated signals.

image.png In the first case, we see that the value of the output signal is the negation of the input.

image_2.png In the second case, we see that the amplitude of the output signal is twice that of the input signal.

image_3.png In the third case, we see that the frequency of the output sinusoid is ten times higher than that of the input sinusoid.

Conclusion

Our experiments on signals have shown that working with buses allows us to interact with any number of signals quite easily. If necessary, we can always find them by their pre-described name in the list of bus signals. This greatly simplifies the work with projects that have a large number of signals to be transferred between different subsystems of the model.