Simulation

Numerical simulation is an important tool in the analysis and design of dynamical systems. Numerical simulations have a variety of uses. First, simulations can help in visualizing the system kinematics and dynamics, particularly when used with graphical animations. Simulations also permit one to test different control system designs rapidly, and without risking damage to the laboratory apparatus.

There are numerous computer programming languages that may be used to develop numerical simulations. In addition to the many general purpose programming language languages such as C and FORTRAN, today there are a number of programming languages in which the program is written using block diagram notation. We will use Simulink, a popular block diagram programming language for our simulation examples.

In this section, we will use a numerical simulation of the SPENDULAP to verify the second-order dynamics analysis presented in the previous section. Consider the Simulink model of the SPENDULAP shown in Figure 8. In this model, equation (27) is implemented in Function block Compute theta_dot_dot. Since a constant frame angular velocity is desired, the frame angular acceleration is supplied by Constant block phi_dot_dot, which is configured with a value of zero. The initial condition of Integrator blocks theta_dot integrator and phi_integrator are set to zero. To make the initial pendulum deflection and the frame angular velocity visible, Integrator blocks theta integrator and phi_dot integrator are configured with initial condition ports, which receive the output of constant blocks configured with the initial conditions for a particular test case. The state and acceleration trajectories are sent to the MATLAB workspace for post processing to compute the reactions and torques and for plotting. Given the state trajectory, the motor torque tau can be computed from equation (20). The reaction forces are computed using equations (22) and (23). The state trajectory and torque for initial pendulum deflection of 30.5 deg. are plotted in Figure 9 and the corresponding reactions at AB are plotted in Figure 10.

From Figure 9 we measure the oscillation period to be 1.78 sec, which agrees well with the period computed earlier using linearization. Figure 11 illustrates computed trajectories [theta(0) = -35, 35, 45 deg, thetadot(0) =0 deg/sec] in the state plane superimposed on the state portrait discussed earlier.


Figure 8. Simulink model of constant frame angular velocity SPENDULAP.



Figure 9. Constant frame angular velocity state trajectory.



Figure 10. Reaction forces at AB for constant frame angular velocity trajectory.



Figure 11. State portrait for constant frame angular velocity with sate trajectories superimposed.

Graphical animations can facilitate visualization of the system dynamics. The Simulink model shown in Figure 8 contains a graphical animation block constructed as described in [2]. The corresponding animation window is shown in Figure 12.


Figure 12. SPENDULAP animation figure.

Next Previous