Inverted Pendulum
The vrpend example illustrates the various ways a dynamic model in Simulink can
interact with a virtual reality scene. It is the model of 2-dimensional inverted pendulum
controlled by a PID controller. What distinguishes this model from "common" inverted pendulum
models is visualization and the methods of setting the setpoint.
You visualize and interact with a virtual world by using a Trajectory Graph and VR Sink blocks.
The Trajectory Graph block allows you to track the history of the pendulum position and change the setpoint
in three ways:
Notice the pseudo orthographic view defined in the associated VRML file. This effect is achieved by creating a viewpoint which is located far from the object of interest with a very narrow view defined by the VRML FieldOfView parameter. An orthographic view is useful for eliminating the panoramic distortion that occurs when using a wide-angle lens. This technique is also known in photography. The fallback of this technique is that locating the viewpoint in a distance makes the standard viewer navigation tricky or difficult in some navigation modes. If you want to navigate around the virtual pendulum bench, we recommend that you switch to some other viewpoint.