Design and construction of miniature artificial ecosystem based on dynamic response optimization