In this example we show how to design a PID controller for a non linear system. The system is a DC motor driving a pendulum, where the objective is to maintain the pendulum at an angle of 1 radian from the horizontal. We generate the system equations automatically and then linearize the system at the operating point where the angle is 1. We then use the dominant pole design technique and place dominant poles at -2-I, -2+I, and -1. We use the resulting PID controller to control the system. As a comparison, we also show the open loop uncontrolled system. The control design methods used in this model are explored in more detail in the application Designing a PID Controller.