Multipy inputs.
Multiplies the inputs. The product object is defined through its parameters, which give the kind of Product (dot, cross, elementwise or scalar), the port widths and the number of input ports.
- Author
- Benjamin Scholz
- Date
- 05.09.2007 BSC: Second version.
-
20.07.2011 KGA: Ported to FhSim 2.0.
-
25.07.2011 KGA: Added documentation.
Example configuration excerpt
<Lib
LibName = "fhsim_base"
SimObject = "Math/Product"
Name = "A"
ProdType = "Elementwise"
PortWidth = "3"
/>
...
<Connection
A.In1="10,20,30"
A.In2="30,20,10"
/>
Input Ports
Name | Width | Description |
In1 | <PortWidth> | The input port for signal 1 |
In2 | <PortWidth> | The input port for signal 2 |
Output Ports
Name | Width | Description |
Out | <PortWidth> | The result of the product |
Configuration parameters
Name | Width | Description |
PortWidth | - |
The number of elements in the input and output ports
|
ProdType | - | The type of product must be <elementwise> / <scalar> / <cross>* or <dot> |
- Note
- The cross product is only defined for input ports of width "3".
Initial conditions
There are no initial conditions for this function.
Full example file
<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Math/Product"
Name="A"
ProdType="Elementwise"
PortWidth="3"
/>
<Lib
LibName="base"
SimObject="Math/Product"
Name="B"
ProdType="Cross"
PortWidth="3"
/>
<Lib
LibName="base"
SimObject="Math/Product"
Name="C"
ProdType="Dot"
PortWidth="3"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In1="10,20,30"
A.In2="30,20,10"
B.In1="1,0,0"
B.In2="0,1,0"
C.In1="1,2,3"
C.In2="2,3,4"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 2, 30"
LogStates ="1"
stepsize ="0"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>
This SimObject is referred to as Math/Product