Laptop battery at 80% freezes the Mac

I have to use my laptop with the charger because the battery died and have tried 3 batteries and the problem persists. Even with the charger the performance is quite ok, but sometimes it freezes and works slow. When I use it only with the battery, at 80% of use it freezes and it's impossible to use. I run the hardware diagnostic and "everything was ok". Even the damaged USB port wasn't reported. Any help? What else should I do?

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0