The DC microgrid is an important structure of microgrids. Aiming at the problem of the grid-connected DC microgrid modeling, a grid-connected DC microgrid equivalent modeling method based on the optimized Broad Learning System (BLS) is proposed. Taking the electrical parameter data of the grid-connected DC microgrid access point as the training data set of BLS, the equivalent model of the grid-connected equivalent model is constructed. In order to further improve the accuracy and generalization performance of the model, the shark smell optimization (SSO) algorithm is used to optimize the input weights and thresholds of the BLS. Furthermore, the shark smell optimization-Broad Learning System (SSO-BLS) algorithm is proposed. SSO-BLS is compared with RBF, BLS, BFO-ELM, and other algorithms. The results show that the grid-connected DC microgrid model based on SSO-BLS has good accuracy and generalization characteristics.