series of values in the statistical model if a known pattern is detected then control actions for modifying one or more operating parameters are issued by processor 30 for example commands to valves 24 for modifying gas injection such commands would be intended to optimize production of the well based upon past performance as represented by the statistical model as will be discussed below these commands are validated in the diagnostic mode after sufficient diagnostic operation processor 30 is then ready for use in operating the well certain patterns might also be indicative of problems for example actual measurements could include anomalies indicative of undesirable gas recycling and the statistical model can recognize such anomalies as they match past behavior and issue commands for corrective action if no pattern is recognized processor 30 prompts an operator to enter appropriate control actions and the non recognized pattern along with entered control actions are then added to the statistical model so that the model is expanded to recognize and if necessary act on additional behavior patterns of the well in this way the system of the present invention becomes capable of better control of a gas injection process as the process continues fig1 further illustrates operation of the invention processor 30 carries out a series of steps including step 32 wherein real time statistical signal processing is carried out and a statistical model is created or updated step 34 wherein real time values in the model are associated with actual production events and or operating parameters so as to complete the initial model step 36 wherein.