1. A system for forming a wellbore in a subterranean formation, comprising: (a) a drilling system including a rig positioned at a surface location, a drill string conveyed into the wellbore by the rig, the drill string having a bottomhole assembly (BHA) attached at an end thereof, and a plurality of sensors associated with the drilling system for measuring surface responses and downhole responses of the drilling system during drilling; and (b) a controller operatively coupled to the drilling system and including at least one model for predicting behavior of the drilling system, the controller utilizing the at least one model, the measured surface and downhole responses and at least one selected control parameter to predict behavior of the drilling system and determine at least one advice parameter that produces at least one selected optimized drilling parameter while satisfying at least one selected constraint.