This document compares analog and discrete PI controllers for regulating the output of a buck converter. It first describes the buck converter circuit and derives its transfer function. It then simulates both continuous and discrete PI controllers in MATLAB to control the buck converter. The results show that the analog PI controller has faster rise time and settling time with less overshoot and variation, while the discrete controller has higher flexibility and simpler design but more jitter and overshoot. In conclusion, each controller type has advantages for different applications depending on the needed performance and complexity.