power sensor

Moderators: Frank, paul, Hiwot, Chris, peter

Post Reply
bendesarts
Posts: 49
Joined: Thu Mar 07, 2013 10:10 am

power sensor

Post by bendesarts » Sat May 31, 2014 9:28 am

Hello,

In a multi bond graph, i would like to evaluate the power on the bonds.
As i have to install power sensor for many bonds, i would like to use a quite automatic technique to do this implementation.
I have see that when i click right on a bond, i can do Insert-->knot-->P sensor or Q sensor.
I would like to do the same but with Power sensor.

Is it possible for users to parameter these options so as to have the possibility to do "Insert-->knot-->Power sensor"?

Otherwise, do you have ideas so as to implement easily power sensors in each vector bonds on a multi bond graph ?

Thanks a lot for your help.

paul
Posts: 152
Joined: Mon Sep 19, 2005 2:00 pm
Location: Controllab Products B.V.

Re: power sensor

Post by paul » Mon Jun 02, 2014 8:16 am

You can also drop a power sensor directly on a bond.
However, there is another way of obtaining your result :-)

There is a special command in 20-sim that enables you to do just this: analyze the power and energy of all submodels and ports.
1. Open your model in the 20-sim Editor.
2. Choose "Model" -> "Check Energetic Behavior"
3. A dialog pops up with "Additional energy variables are now available for simulation"

As a result:
1. Every energy port has an additional variable called "p.power"
2. Every submodel has additional variables called "summated_port_power" and its integral "summated_port_energy"

Hope this helps :-)
member 20-sim development team

bendesarts
Posts: 49
Joined: Thu Mar 07, 2013 10:10 am

Re: power sensor

Post by bendesarts » Mon Jun 02, 2014 1:32 pm

Great !!!
Thanks paul for your help.
Your method is far better than the method i have found (which is insert --> from template --> use a power sensor)
I have to use this method for each bond and consequently it can be long.

bendesarts
Posts: 49
Joined: Thu Mar 07, 2013 10:10 am

Re: power sensor

Post by bendesarts » Thu Jun 05, 2014 9:05 am

Hello,

I tried to implement this method that is to say use "check energetic behaviour" so as to build power sensors in all the bonds on the BG model.

I meet 2 issues :

1) A blocking issue linked to the powermux element

In my model, i use some powermux elements in the models of my joints. It enables me to transform scalar bond graph into vector bond graph when i needed.

Image

When i launch the function "check energetic behaviour", the power sensors are created on my bonds. However, when i start a simulation, i obtain this error:

Image

[Glissiere_z\PowerMux1] error: Error during simulation:
Matrix sizes are not compatible in add instruction in expression ((+Glissiere_z\PowerMux1\input1.power + Glissiere_z\PowerMux1\input2.power) + Glissiere_z\PowerMux1\input3.power) + -Glissiere_z\PowerMux1\output.power

Have you a idea how i can deal with this issue (error message for the powermux element) so as to be able to simulate the model without errors after having launched "check energetic behaviour" ?

2) Localisation of the power variables created with the function "check energetic behaviour" in the modeling environnement

After having launched the function "check energetic behaviour", i can see that in the plot environnement, i can select the power information for the bonds. However, i don't see where i can see the add of the power variables in the modeling environnement ? How can i select the power variables created in the modeling environnement? Moreover, after receiving a error message, it seems me that the power variables disappear even in the simulation environnement.

Thanks a lot for your help.

paul
Posts: 152
Joined: Mon Sep 19, 2005 2:00 pm
Location: Controllab Products B.V.

Re: power sensor

Post by paul » Thu Jun 05, 2014 10:18 am

Hi,

Thanks for the questions.

The first question we will test and if it is an issue we will create a ticket with your reference, and you will be informed when it is fixed or when there is a workaround.

The second issue is that the additional power and energy variables are not accessible from the model itself, only from the simulation. This is not a fault, it is designed such that it does not change your model, so it is designed to be an additional check for model validity. If you need all the powers to do additional computations with them, one way might be to use the scripting interface to postprocess this further in octave/matlab etc.

If you have more questions on this you can contact us by mail directly.
Kind regards,
Paul
member 20-sim development team

bendesarts
Posts: 49
Joined: Thu Mar 07, 2013 10:10 am

Re: power sensor

Post by bendesarts » Thu Jun 05, 2014 10:29 am

At the moment you need to drag/drop a PowerSensor from the bondgraph library on the bond to get a signal output for the power of the bond, and you can reuse this power signal of this bond for any other processing that you need to do in your model.
We can of course add it to the insert list if that helps you more?

bendesarts
Posts: 49
Joined: Thu Mar 07, 2013 10:10 am

Re: power sensor

Post by bendesarts » Wed Sep 17, 2014 11:23 am

Hello,

Good news !!!
I have tested the "check energetic behavior" tool on a BG model modelized with multi-bonds (or vectorial bonds).
The option works well. I could obtain "p.power", "summated_port_power" and "summated_port_energy" variables.
I'm trying now to better understand its operation so as to exploit it.

In this sense, I have two questions :

1) When I ask the power of a vectorial bond (such as for me a bond link to translational power (the product of a linear velocity and a force), I obtain 3 powers because the different power come from the fact that the power is decomposed in the frame where my vectorial bond is expressed. How can I sum all the power that I have on a port ? To be clearer, when I analyse a translational power, for the moment, I obtain px=Fx.Vx, py=Fy.Vy and pz=Fz.Vz where Fx,Fy,Fz and Vx,Vy,Vz are respectively the components of the force and the velocity and I would like to obtain p = Fx.Vx+ Fy.Vy + Fz.Vz. There is may be a easy to do it without DIY method.

2) Concerning the "summated_port_power" variables, I have tested this variable for a subsystem for example. In my subsystem, I have 2 ports with the power is as an input and 2 ports with the power is an ouput. As normally, there is no dissipation in this subsystem, I was expecting to find 0 for "summated_port_power". It is not the case. So, I imagine that I don't understand well the operation of this variable. In few words, may you explain me how it works ?

Thanks a lot for your help

bendesarts
Posts: 49
Joined: Thu Mar 07, 2013 10:10 am

Re: power sensor

Post by bendesarts » Mon Sep 22, 2014 9:13 pm

Hello,

I complete my question for the point 1.
In fact, the point is that I didn't manage the make the sum of the components of the power vector because I don't know how to access to these variables. I only be able to see the power components for the variables panel (Model-->Show parameters). For example, I don't see these variables when I look at "interface" tab of a submodel.
I have may be an idea to obtain the sum of the components. It is to export my variables in matlab and do it in my matlab.
However, for pratical reasons, I would like to obtain and plot the sum of the power components directly in 20-sim.
Do you have an idea how can I access to the variables of the components of the power ?
Don't hesitate to let me know if my decription is not clear enough.

Thanks a lot for you help.

Post Reply