Engee documentation

First Steps. Creating a simple model

Engee allows you to first model a system and then simulate its dynamic behaviour. The basic techniques discussed in this example for creating a simple model are also applicable to more complex models.

As an example, consider a simplified model of an equally accelerated car. The input will be a signal corresponding to the position of the accelerator pedal, and the output will be a graph of the car’s movement, representing the dependence of the distance travelled on time.

Let us assume the following assumptions:

  • if the accelerator pedal is depressed, the car accelerates;

  • if the accelerator pedal is released, the car moves by inertia.

Equally accelerated motion of the car in this case can be described by the formula:

,

where:

  • - vehicle position at time ;

  • - car position at the initial time ;

  • - vehicle speed at the initial time ;

  • - vehicle acceleration when the accelerator pedal is depressed.

Selecting and setting the units

To create a new model, click img2 in the Navigation bar. The first time you start the system, a new model is created automatically.

img3

Let’s design a model with given conditions using blocks. Block Engee is an element of the model that realises the mathematical relationship between its input and output.

The finished model is shown in the figure.

first steps img0

Let’s consider selection and setting of model blocks in details.

In the example we use blocks from the library subsections Basic:

Subsection name and block name Block icon Block task Modelling object

Sources: *Pulse Generator

pulse generator

Generates rectangular pulses.

The position of the accelerator pedal.

Maths: Gain

gain

Multiplies the input signal by a constant value.

Vehicle acceleration value , when the accelerator pedal is depressed.

Continuous: *Second-Order Integrator

second order integrator

Integrates the input signal twice.

Calculates the position of depending on the accelerator pedal position and the set acceleration.

Receivers: *Terminator

terminator

Service Block.

Closes block outputs.

To add blocks to the model:

  • Drag them from the Block Library onto the canvas using the left mouse button.

    first steps 1

  • Or double left-click on the canvas to bring up the block search bar.

    first steps 1 x

Searching by block name works even if the keyboard layout is set incorrectly.

To learn more about working with blocks on canvas, see the article Model building.

You can run models with unconnected blocks and lines on the canvas. This is convenient for debugging models and conducting virtual tests, and also reduces the routine when developing multi-variant models.

After adding a block, its parameters are set by default. To view and change parameters of a block, double left-click on the necessary block, or right-click on the block and select Parameters.

For our example, set the Gain parameters in the Gain block to 2, this value will correspond to the value of car acceleration when the accelerator pedal is pressed. Let’s leave the settings for parameters of other blocks by default.

The output signal from the block Pulse Generator simulates the position of the accelerator pedal. By default parameters of the block correspond to the following mode of operation: the signal period is 10 seconds, the output signal has the value 1 during the first 0.5 seconds of the period (the accelerator pedal is pressed and the car is driving with acceleration), the rest of the period the output signal has the value 0 (the accelerator pedal is released, the car is moving with inertia, gradually decelerating). The output signal is shown in the figure.

pulse gen

To display the simulation results on the graph, click on the output signal x of the block Second-Order Integrator and select Write from the context menu. This signal will output the value of linear movement of the car. For a better understanding of the model operation, you can also record the signal at the output of the Pulse Generator block, which will correspond to the position of the accelerator pedal, and the output signal dx of the Second-Order Integrator block, which will correspond to the speed of the car.

first steps 2

Engee allows you to change some parameters during simulation. To find out which parameters can be changed, open the help for the block in question. If a block parameter has a *Tunable attribute, its value can be changed directly during the simulation.

tunable setting 1

Running the model

In the Head menu of the workspace, in the field for setting the simulation time, specify the required simulation time in seconds, e.g. 30. You can then start the simulation.

first steps img2

To run the simulation, press the button Start img12. The current status of the simulation can be seen in the Status bar:

img13

You can read more about setting up and running the model at Setting up and running the model.

The graph window opens automatically. The graph will show the set state of the accelerator pedal and the calculated speed and linear movement of the vehicle during the simulation time.

For clarity, we will plot the signal values on different graphs.

first steps 1

first steps 2

You can read more about working with charts at link.

After analysing the results, you can go back to the original model and change the parameters of the blocks (e.g. accelerator position settings) and run simulations with other parameters of the model.

More information about Model-Based Design in Engee can be found at the links:

Saving and opening a saved model

To save a model, right-click on the model and then click:

  • Save as for a new (not saved in the file browser) model.

    img7

  • Save or Save as for a previously created model.

    img x z

Next, you can change the name of the model in the file browser. To rename a model, right-click on the desired model, then click Rename. Enter the new model name and press Enter.

To open an existing model, click File Browser img4. This will open a file browser window, find the desired model and double click on it with the left mouse button. The model will appear in the Navigation Pane.

img5