This article investigates an inverse approach to determine the coefficients of the Drucker-Prager model for magnesium powder. The approach involves conducting finite element simulations of the powder compression process within LS-DYNA software, employing the Drucker-Prager material model. The goal is to minimize the disparity between force-displacement outcomes derived from simulations and experimental data using a surrogate optimization method. Experimental data were obtained through a uniaxial compression test and served as a basis for adjusting the Cap model coefficients. A random selection of coefficients was made using the Latin cube method and simulations were performed based on the initial coefficients. The optimization was then performed using the particle swarm algorithm over 20 iterations. The optimized coefficients were validated against experimental data, demonstrating close agreement. By utilizing the extracted coefficients, the relative density of the samples was calculated at three different compaction speeds, i.e., 15.5 m/s (using a Hopkinson bar), 8 m/s (using a drop weight), and 1 mm/min (using an Instron machine). The analysis revealed the highest relative density and stress in the densified sample via the Hopkinson bar method, reaching 99.83% and 1.1 GPa, respectively.