It has happened twice now and i am not sure what the cause could be as i have had sex many times previously without no problems but during penetration i seem to have lost my erection. 1 time was after slowing up to reduce feeling of my ejaculating after this i continued and then lost my erection.
Any ideas as to what this could be down to?


Could be any number of things. It may sound odd, I know, but the best way to solve this may very well be NOT to try to solve it. Don't get hung up on it, try not to even think about it at all. Your ability to finish will return. We all know we need to be relaxed and in the moment in order for the moment to progress to our liking. Don't let it worry you. Be in the moment you're in and enjoy it for precisely what it is. Over-thinking it will perpetuate it.
Idea #1: loss of focus
I#2: Performance anxiety
Do not worry about it. There is nothing in the rule book or Holly Grail that says when a man looses his erection the session is over. Quite the contrary, relax, let her rebuild your erection with some more making out and foreplay and continue on.
Benefit #1: The session is extended and sex lasts longer
B#2: She has fun and you regain your erection
If you are wearing a condom, have her tweak your penis with her hand(s) just before entering. Second, do not engage in intercourse until you have been brought to the edge where you are about to loose control yet can still maintain it.
Focus I think is the biggest thing for a lot of guys, at least I would hope that the male race isn't that unconfident that it's the second thing doc said. I know that when I get started i'm a log, but after 3-4 minutes of having rough and/or soft i just lose focus on trying to keep myself hard, and when you wear a condom it doesn't feel nearly as good so it's easy to lose focus.