Experimental study of balanced optical homodyne and heterodyne detection by controlling sideband modulation