In Pendulum Bond Graph model we discussed the construction of the Bond Graph model of the Pendulum problem. We included in the model the basic physical relationships guided by the transfer of power within the system. In this way we obtain a model that corresponds closely to the behavior of the physical system. However, to be useful such a model must permit the extraction of information we are interested in such as how some important quantities changes, like the velocities, positions, currents, voltages, etc. We already showed how we can extract the relevant information from the bond graphs Figure 2 and Figure 4. However, we usually do not use them in the original form but post-process and display them. Thus, control ports on Particle component generate x and y component of its velocity, and that of Support component generates the angular velocity of the Rod around the rotation point (see pendulum mechanics). We are interested in the coordinates of the particle position, xP and yP, and Rod's rotation angle φ.
Thus, in the Figure 1. below we pick up the Inegrator components from Continuous Signal
Component's section of Edit Box, drag them and drop in front of these control ports (to
complete the operation, similar to other components, we need to click somewhere outside of the component).
Next, we connect the Integrators' input ports to the Particle's output ports. Similarly, we do it
with the Integrator in front of the Support's control port. We need also to define the initial
values of these position quantities. We use, e.g., for the angle the value φ(0)=π/3. Hence,
we set the initial position of the particle to:
xP(0)=L∙sin(π/3),
yP(0)=-L∙cos(π/3).
To set these initial conditions for the integrators we will
double-click their output ports and write the right sides of these expressions in the corresponding textboxes.
Figure 1. Pendulum model
Figure 2. IPC Node
The output angle, which is in radians, is transformed into the degrees before the use by multiplying by 180/π. To insert such a function we drag and drop the Function component to the position ahead of the last integrator, and when textual caret appears write the function's title and click outside it. After that, we connect the last integrator's output to the function's input.Because the BondSim accepts the ASCII characters only (not the Greek ones), we double-click the function input port and write phi as the input angle and click OK. The program now asks to define the constitutive relation of the function. We may define the output as phi_deg, and the Output Relation as phi*180/PI and click OK ( PI is an internal constant ≈π).
To complete operations with the integrators, we drag and drop three Node components, two behind top integrators, and one behind the bottom function. The input ports of the first two nodes we connect to the output ports of the upper two integrations. Thus, these nodes represent x and y coordinates of the particle. One pair of the output ports is connected to the input ports of Rod and the other pair to the display. The input port of the lst node we connect to the output port of the function. Thus, this node represents rotation angle φ of the pendulum. The output ports are connected to a display component at the right, and red ring on the top.
To insert two display components in the form of X-Y plotters, we pick-drag-drop X_Y Displays components from Continuous Signal Component and place them at appropriate places in the model (see Figure 1. above). In the bottom display we delete one input port and the other moves around the component's periphery and put it in the front of the bottom node's control port. Connect these two ports by a signal line. Similarly, we arrange the ports of the upper display component to face the ports of the upper nodes and connect them. We add the additional two ports on the other side of the display. The display components show x-t, or x-y, plotts of the signals connected to their ports.
Finally, there is in Figure 1. above a component in the form of red ring with one input and one output ports. This is IPC component, which is shorten of Inter Process Communication. It is used to enable the communication between two different processes based on named pipe technique. Here it is between BondSim simulation of the Pendulum and its 3D Visualization Thus, to rotate 3D model of the Pendulum we need information on the rotation angle, which is connected to the IPC's input port and transfered by the pipe. At the output port the pipe returns information on the position the Pendulum's particle. To extract the information on the corresponding coordinates we added a component in the form of a Node at PCS's right. The structure of this component is shown in Figure 2. above on the right. Assumung the the input port has dimension 2 we insert two nodes to extract x and y component of the delivered signal. These componenets are in Figure 1. connected to the upper right ports of the top display.