Smart bioreactor technology