© 2022, The Author(s), under exclusive license to Springer Nature Switzerland AG.The wireless robotic capsule endoscopy technique is a relatively painless and invasive medical imaging technique. Most diseases in the gastrointestinal (GI) tract can be diagnosed with robotic capsule endoscopy, even in areas that cannot be reached with conventional colonoscopy. Knowing the position of the robot in robotic capsule endoscopy both speeds up the treatment process and gives the opportunity to control the robot from the outside during the procedure (active capsule endoscopy). In this study, magnetic positioning technique was used to obtain the positions of the robotic capsule in the small intestine model. With a ring-shaped permanent magnet placed around the capsule, the Magnetic Flux Density (MFD) equations were calculated analytically using two different techniques: Biot-Savart and Charge model. The positioning performances of both magnetic models were compared, and the Artificial Bee Colony (ABC) optimization algorithm and the Levenberg-Marquardt (LM) method were used together while calculating the nonlinear equations. As a result, we found that the Charge model was 61% faster than the Biot-Savart model under the same simulation conditions, and the position and angle errors of the Charge model were at least 87% less on average than the Biot-Savart model. Under noisy simulation conditions, the performance of the Charge model was observed to be either better or very close to that of Biot-Savart.