A real time feed forward control of slug flow in microchannels