logopic

 

  Controller Implementation and Discussion

 

In this section the PID Controller implementation in the DSP is introduced, detailed flow chart is depicted in the figure (36)

 

 

 

Figure 36 : Software flow chart

 

 

There were few points that were raised during the implementation of the software;

Figure (37) shows a plot of the angle measurement as a function of time, which was taken from a trial run of balancing the pendulum; the data was obtained using serial communication from the DSPIC30F3011 as each experiment was performed. The data would then need to be saved after each experiment. From this experiment we conclude that the system becomes stable after 3 seconds then it loses the stability condition at the fourth second, as a result of turn off the PID Controller (this step is made for protection reasons at the beginning of the electronic circuit design to stop the turn off the motor after 4 seconds)

 

Figure 37 : Plot of the Pendulum Angle for a Trial Run

 

First off, the cart was able to balance the pendulum for some time completely on its own; which demonstrates a short period of stability. The inability to balance a pendulum for an extended period of time can possibly be attributed to many different factors. A factor that could be limiting the success of the design is the model of the system. Since the system is quite complex mechanically, there are many parts that interact with each other which could lead to miss-modeled and un-modeled dynamics. The system also has some imperfections such as the pendulum is not completely constrained to just two degrees of freedom. Another factor that could cause some error is that the sampling rate is slow enough that it may not be possible to implement x a working controller using a continuous time design. It also sounds that more tuning for the PID controller is needed. Unfortunately, we have run out of time as the end of the semester approaches.

This project is considered as a testing platform for other students in the University of Jordan in the field of control and a foundation for future research. A variety of control designs could be implemented using some of the other suggested methods in this report.

The system is easily programmable, to allow for other solutions, though the software needs to be compatible with the programmer of the DSPIC30F3011 and the user needs to have a working knowledge of the circuitry. For simplicity, the controller code in Appendix (E) has a section heavily commented that it would allow a user to implement their controller in that point of the code. The system is actually self-contained once the DSPIC30F3011 programmed, though to record data, the system needs to be hooked up to a PC for data extraction.

Overall the project can be considered a success. The main goal of the project was reached (the cart was able to balance the pendulum for an extended period of time). Other requirements were met such that a working mechanical system was developed along with a control circuit with an accurate feedback network.

The most beneficial aspect of this project was that it gave exposure to a complete system design. The experience gained from developing each of the subsystems given the constraints they imposed on each other and then integrating them together proved to be invaluable.

The experience of working on the classical problem of Inverted Pendulum is great. It is an ideal exercise to show one’s talent as Control Engineer. The practical work has gone a long way in helping us understand and develop an insight into the designing of control systems for SISO (Single Input Single Output) systems.

The power of MATLAB and Simulink becomes more evident to one as they helped us in the design, and analysis of the system model.