code for control and measurment of turbine