Not all the elements are purely bondgraphic elements. One of them cares about the processing of the signals in the bondgraphic model.
| Name | Description |
|---|---|
| modulated transformer for a prismatic joint | |
| optionally modulated transformer for a translation | |
| translates the position |
MultiBondLib.PlanarMechanics.AdditionalMBG.prismaticTF
This element is used to model a prismatic joint.
| Type | Name | Default | Description |
|---|---|---|---|
| Real | d[2] | {1,0} |
| Type | Name | Description |
|---|---|---|
| MultiBondCon | MultiBondConA | |
| MultiBondCon | MultiBondConB | |
| RealSignal | phi |
model prismaticTF "modulated transformer for a prismatic joint"
extends MultiBondLib.Interfaces.TwoDiffPort(final nA=1,final nB=2);
parameter Real d[2] = {1,0};
public
MultiBondLib.Interfaces.RealSignal phi;
equation
fB[1] = (cos(phi)*d[1] + sin(phi)*d[2])*fA[1];
fB[2] = (-sin(phi)*d[1] + cos(phi)*d[2])*fA[1];
eA[1] = (cos(phi)*d[1] + sin(phi)*d[2])*eB[1] + (-sin(phi)*d[1] + cos(phi)*d[2])*eB[2];
end prismaticTF;
MultiBondLib.PlanarMechanics.AdditionalMBG.translationalTF
The vector d can be amplified by an optional real signal "ampl".
The angular velocity is then transformed along a vector d*ampl. d can be set by a parameter and is resolved in the body system, which is specified by the signal phi.
This element is used to model a fixed translation or a prismatic joint
| Type | Name | Default | Description |
|---|---|---|---|
| Real | d[2] | {1,0} |
| Type | Name | Description |
|---|---|---|
| MultiBondCon | MultiBondCon1 | |
| MultiBondCon | MultiBondCon2 | |
| RealSignal | phi | |
| RealSignal | ampl |
model translationalTF
"optionally modulated transformer for a translation"
extends MultiBondLib.Interfaces.TwoPort(final n=3);
parameter Real d[2] = {1,0};
MultiBondLib.Interfaces.RealSignal phi;
MultiBondLib.Interfaces.RealSignal ampl;
equation
if cardinality(ampl) == 0 then
ampl = 1;
end if;
f2[1] = f1[1] + (-sin(phi)*d[1] + cos(phi)*d[2])*ampl*f1[3];
f2[2] = f1[2] + (-cos(phi)*d[1] - sin(phi)*d[2])*ampl*f1[3];
f2[3] = f1[3];
e1[1] = e2[1];
e1[2] = e2[2];
e1[3] = e2[3]+ (-sin(phi)*d[1]+cos(phi)*d[2])*ampl*e2[1]+ (-cos(phi)*d[1]-sin(phi)*d[2])*ampl*e2[2];
end translationalTF;
MultiBondLib.PlanarMechanics.AdditionalMBG.Translation
The translation is specified by the parameter d, which is resolved in the body system specified by the signal q1[3].
The translation can optionally be amplified by the signal ampl
The positonal signal can optionally be rotated by the angle phi of the corresponding signal.
| Type | Name | Default | Description |
|---|---|---|---|
| Real | d[2] | {1,0} |
| Type | Name | Description |
|---|---|---|
| RealSignal | q1[3] | |
| RealSignal | ampl | |
| RealSignal | q2[3] | |
| RealSignal | phi |
model Translation "translates the position"
MultiBondLib.Interfaces.RealSignal q1[3];
MultiBondLib.Interfaces.RealSignal ampl;
MultiBondLib.Interfaces.RealSignal q2[3];
MultiBondLib.Interfaces.RealSignal phi;
parameter Real d[2] = {1,0};
equation
if cardinality(ampl) == 0 then
ampl = 1;
end if;
if cardinality(phi) == 0 then
phi = 0;
end if;
q2[1] = q1[1] + (cos(q1[3])*d[1] + sin(q1[3])*d[2])*ampl;
q2[2] = q1[2] + (-sin(q1[3])*d[1] + cos(q1[3])*d[2])*ampl;
q2[3] = q1[3]+phi;
end Translation;