Since I don't do any math beyond simple algebra can't give you the magic formula. Many products are the result of test, evaluate test, modify product, and test again until the desired product is created.
Previously on this site a book by someone named McPherson was referenced as a scientific starting point. Since i don't do advanced math that book never made into my library but some others here can point you in it's direction. The M4 carbine site seems to have access to many folks with technical backgrounds who could assist you.
Have fun in your quest!