Why does my car make a loud thumping sound and jerks when brakes are applied? on 2006 Ford Five Hundred

I have had braked replaced and center mount replaced. the noise is lke something is stuck under the hood and the car thumps and jerks. It does not do it all the time but after driving awhile it starts. Also if battery is disconnected, it will stop for a day and then start back

Asked by for the 2006 Ford Five Hundred