Opposed-piston free-piston engine generators (OFPEGs) are emerging as a promising technology for next-generation hybrid and electrified transportation systems due to their high efficiency, reduced mechanical complexity, and improved noise, vibration, and harshness (NVH) characteristics. However, due to eliminating the conventional crankshaft mechanism and directly coupling a free-piston engine with linear generators, performance of OFPEG systems is governed by a strong coupling between piston dynamics, in-cylinder combustion processes, and electrical loading conditions. This coupling presents substantial challenges for system design, control, and optimization, limiting the further development and application of OFPEGs. Existing researches lack a comprehensive numerical model that integrates detailed in-cylinder thermodynamic process with control system of linear generator, and quantitative analysis of the effect of piston motion trajectory on system performance remains insufficiently explored. In this study, a novel one-dimensional OFPEG model is developed in Gasdyn and coupled with a linear motor model and a control strategy in MATLAB/Simulink, thus forming a complete numerical model for OFPEG. The model is validated against experimental measurements, demonstrating effective prediction of thermodynamic and dynamic performance with acceptable errors. Based on the validated model, the effects of varying piston motion trajectory on system performance are analyzed. Lower Rt and higher Ωcom and Ωexp are recommended for higher performance. When Rt is reduced to 2.5:1, thermal efficiency and indicated power improve to 36.3% and 3.4 kW, respectively. When Ωcom is increased to 0.6, thermal efficiency and indicated power improve to 35.5% and 3.22 kW, respectively. When Ωexp is increased to 0.6, thermal efficiency and indicated power improve to 36.0% and 3.41 kW, respectively. These improvements are primarily attributed to reduced heat transfer losses and enhanced scavenging efficiency under the modified trajectories. The results provide valuable insights into the optimization of piston motion trajectory to achieve higher performance. Furthermore, the proposed numerical model provides an effective tool for OFPEG design, optimization, and control strategy development, supporting the advancement of high-efficiency, low-carbon OFPEG systems for future transportation applications.