Statespace generation