Had the same problem on my iphone 6 (iOS 10). I tried everything suggested on this site- hard reset, starting the phone as new...Eventually I took the phone to the service. They concluded my U2 chip died, due to wrong charging (bad cable, charging in the car etc). They explained that chip couldn't display correct values of the battery and it caused draining the battery even on stand by or random shut downs (even when phone is on its 30% or so).They replaced the chip (70 euros) as well as battery (30euros). That solved the problem. Other solution- when phone is charged to 100%, put it on low power mode and there will be no shut downs. On the other hand you will not get the best of your battery life, cause the problem with chip will still persist. Two authorised apple services didn't want to replace the chip ("we don't do this, you give your old phone to recycle and add 500 euros to get a new one"). Hope this will help!