Proportional Integral Derivative (PID) controller tuning is an area of interest for researdhers in many areas of science and engineering. This paper presents a new algorithm for PID controller tuning based on a combination of bacteria foraging and particle swarm optimization. BFO algorithm has recently emerged as a very powerful technique for real parameter Optimization. To overcome delay in an optimization, combine the features of BFOA and PSO for tuning the PID controller. This new algorithm is proposed to combine both the algorithms to get better optimization values. The real time prototype model of paper machine is designed and controlled by using PIC microcontroller embedded with the programming in C language.