Introduction
This notebook illustrates how to build a dynamic model of a
physical system and then generate efficient code for simulation.
The physical system is a seesaw in which two carts C1 and C2 can
be moved along two tracks by controling the forces acting on them.
Cart C1 carries a weight, and cart C2 has an inverted pendulum attached
to it by a friction-free joint.
The model of the open loop system has the forces
and
actingon each cart as inputs. We first model the system by Lagrangian
methodology and then linearize the obtained nonlinear model.
The linearized model is used for control system design, for which the
Control System Professional (CSP) application package is used.
The closed loop system are then simulated both within Mathematica
and by external code generated using MathCode C++.
Converted by Mathematica
July 8, 1999 |