Bubbles in parallel microchannels can cause several pressure-drops and flow maldistribution. Use of model-predictive control for effective removal of the trapped bubble in a parallel microchannel. Controller activates the microvalves after sensing presence of bubble and accelerates removal of bubble from the top channel.