This document describes a project to design an optimal controller for a Segway robot using linear quadratic regulator (LQR) and soft computing optimization techniques like genetic algorithm (GA) and bacteria foraging algorithm (BFOA). The project aims to derive the Segway robot's mathematical model and use LQR with GA and BFOA to tune controller parameters to stabilize the robot. Simulation results show that GA-LQR provides better performance than BFOA-LQR, achieving the robot's stabilization with less computational power. While the paper concludes BFOA is better, the values it provides do not match simulation results. The document also discusses modeling approach, methodology, observations, and opportunities for future work.