The problem you're encountering -- and the reason you will NOT "crack the code" -- is you (and all of us) are working with far too limited data.
BG is affected by much more than just insulin and carbs. Yet, these are the only three datapoints you have to work with: BG, carb input, insulin input, compared against time.
If adrenalin, cortisol, glucagon, GLP, and many other dimensions to this system didn't affect it, you'd have a chance. Since all these things can have significant impact on glucose metabolism, you're SOL as long as data about these factors is non-existent in your analysis.
What you're doing is very much like weather prediction. Accounting for only a fraction of the inputs that affect the system, then approximating the effects of the rest with formulas based on patterns will result in exactly what you're getting: Something that approximately right, most of the time, wildly wrong sometimes, useful, but not definitive.