An all scalar PWM and control approach for the four-leg inverter based three phase transformerless UPS is proposed. The output voltage of each phase is controlled independently and its controller is formed by a stationary frame resonant filter bank accompanied with proportional control and output capacitor current based active damping loops. The resonant filter bank consists of the fundamental component controller and one controller for each dominant harmonic. The simple to implement scalar control method exhibits superior overall steady-state and dynamic performance in the UPS application. Utilizing the inverter zero-state partitioning, a generalized form of scalar PWM for the four-leg inverter is developed. A novel minimum loss discontinuous PWM (MLDPWM) method, which provides minimum switching losses under all operating conditions (including unbalanced load operation) is derived. This simple scalar method provides superior performance and unlike the vector methods it is easy to implement. The controller and modulator design and implementation details for the system are given. Linear and nonlinear loads for balanced and unbalanced load operating conditions are considered. The scalar control and PWM methods are proven by means of theory, simulations, and thorough laboratory experiments of a 5 kVA UPS system.