To compensate the glucose variability caused by meals is essential in developing Artificial Pancreas for type 1 diabetes. Most existing algorithms rely on meal announcements and determine the insulin doses based on an Insulin-to-Carbohydrate ratio (I:C ratio). However, patients, especially young patients, often forget to provide meal information under natural living conditions. A Variable State Dimension (VSD) based algorithm is developed to detect meals which are unknown to the controller (unannounced meals). The algorithm is evaluated using an FDA-approved UVa/Padova simulator and has demonstrated to achieve 95% success rate in meal detection with less than 17% false alarm rate. In addition, the average meal size estimation error is no more than 13%. We then integrate the VSD-based meal detection and estimation algorithm with our previous published glucose dynamics model consisting of both insulin and carbohydrate inputs. The goodness of fit for 30min-ahead glucose predictions using meal information provided by the VSD-based algorithm has increased by 86% in average compared to the prediction using a model without meal input based on plasma blood glucose (BG) data. Simulation results also show that compared to several meal detection/estimation algorithms in the literature, the VSD-based algorithm has comparable or shorter detection time.