Skip to main content
Skip table of contents

Fan Tutorial - Desktop Fan Modes

Did you complete our Beginner Tutorial Part I and our Beginner Tutorial Part II?

Congratulations, you will now learn how to create mode dependent properties of the Fan in only a few steps.

This tutorial will take approx. 15 minutes to complete.

(1) Add Modes

Some values are not static but depend on the state of the product you are building. This is what modes are made for: they track different configurations and their relationships with your product.

Define the modes of your system: different speeds, power modes, and ON/OFF-states.

  • Our motor can run at 3 discrete speeds which can be modelled by "modes". Therefore, to create these 3 modes, open the Motor (1) component. Then:

    • Click on the Modelists tab (2) in the top bar as shown in Figure Creating Modes.

image-20240326-112652.png

Creating Modes - Modelists serve to model mode dependent properties, such as Power Consumption, Rotational Speed, Thrust etc..

  • Click on the + at the bottom right to add a new Modelists

    • Insert name = speed_settings (1) and ´#´ number of modes = 3 (2)

    • Click Create (3)

image-20240326-112926.png

Setting up a Modelist - Here you decide on the name and the number of Modes.

  • Click on the arrow on the left of the new modelist

  • Rename the speed_settings field names by clicking on the default names a,b, and  c and change them to:

    • a = ZERO

    • b = LOW

    • c = HIGH

  • Go back to the Valis page by clicking on the Properties tab in the top bar alongside Modelists

  • Click on the + button to open the “Create Property” dialogue and choose Matrix (1). Add the following properties:

    • Name = rotational_speeds (2)

    • Mode reference = Motor.speed_settings (3)

    • Unit = rpm (4)

    • Click Create (5)

image-20240326-113158.png

Creating a Mode dependent Matrix - The Matrix is linked to the Modelist in the “Mode reference“.

Note: Since you are adding the “Mode reference”, the number of rows and columns will be automatically taken and filed from the Modelist. Therefore, you do not have to define the rows and columns in the above step.

  • Expand the properties of the Vali rotational_speeds by clicking on the arrow

  • Change the values (which currently are 0) by clicking on them. Modify them to the following:

    • ZERO = 0

    • LOW = 2000

    • HIGH = 5000

  • The matrix properties now shall look like in the following Figure

image-20240326-114440.png

Mode Dependent Matrix - The Rotational Speed Matrix is now linked to the Speed Settings Modelist.

  • Now create another mode for the speed_controller: click on the component Speed_controller (1). Go to the Modelists tab (2). Add a new modelist with:

    • mode name = power_modes

    • number of modes = 2

  • Rename the names of the fields: a = ON and b = OFF (3)

image-20240326-115104.png

Power Modes Modelist - Create another Modelist but this time for the Speed_Controller System.

  • Repeat these steps to add a mode for the component Fan (1) with:

    • mode name = state (2)

    • number of modes = 3

    • fields names OFFMIN, and MAX (3)

image-20240326-115303.png

Satet Modelist - Create another Modelist but this time for the whole Fan.

(2) Make Valis Mode-Dependent

Now that you have defined the modes of your system, you can make Valis dependent on them. A Vali might not always have the same value, but a value dependent on a certain mode.

Make your PowerConsumption Mode-Dependent (see Figure Make an existing Vali Mode-dependent)

  • Open the component Fan (1) and go to the Properties (2) in the top bar

  • Click on the Vali PowerConsumption (3) to show the Vali description

  • Click on the button Make mode dependent (4)

image-20240326-115537.png

Make an existing Vali Mode-dependent - You can transform an already existing Vali into a Mode-dependent Vali.

  • In the pop-up, select mode = Fan.state and confirm with Update

  • Repeat the same procedure for Motor and Speed_controller:

    • Go to the PowerConsumption of the Motor, click on "make mode dependent" and choose Motor.speed_settings in the pop-up

    • Go to the PowerConsumption of the Speed_controller, click on "make mode dependent" and choose Speed_controller.power_modes in the pop-up

  • Then, change the values of the power consumption of Motor and Speed_controller in the different modes as shown in Figures PowerConsumption Motor and PowerConsumption Speed_controller.

  • Motor:

    • ZERO = 0

    • LOW = 1.0

    • HIGH = 4.0

image-20240326-120254.png

PowerConsumption Motor

  • Speed_controller:

    • ON = 0.1

    • OFF = 0

image-20240326-120125.png

PowerConsumption Speed_controller

(3) Link the Modes

States of a system can depend on each other. This is why in Valispace you can link modes that belong together.

Create a connection between Fan-states and the modes of Motor and Speed_controller (see Figure Linking Modes).

  • Go to the Fan component (1)

  • Go to the Modelists (2) tab from the top bar and click on the mode state (3)

  • Click on the linking symbol (4)

image-20240326-120720.png

Linking Modes - See how you can link modes between different components.

  • Click on Select Modelist, select Speed_controller.power_modes and click + Add Link

  • Click on Select Modelist, select Motor.speed_settings and click + Add Link

  • Now select the links between the Modes as follows and don’t forget to save:

image-20240326-121354.png

Linked Modes and their States - Here you can set up how the modes are linked and how each property is added up to the main Mode.

Click on the Fan component. Go to the Properties tab. After Valispace has finished its calculations, you can observe that the Fan PowerConsumption has changed to the following values:

image-20240326-121605.png

Fan PowerConsumption Values - Depending on the subsystem properties the main PowerConsumption is calculated. Try changing some PowerConsumption values on the Motor and Speed_controller to see this in action.

Next Steps?

Congratulations, you now know your way around Valispace!

 You can continue improving your Desktop Fan project. Here are some ideas:

  • How about creating a simulation to calculate the resulting air displacement depending on the fan modes? You can directly access all Valis from Matlab, using the Valispace Matlab Toolbox

  • Add a solar panel component to make the fan portable. You can make the maximum rotational speed dependent on the sun angle of the solar panel.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.