(This is actually the second one, it's much better than the first)
A nuclear submarine with electrically cooled skin forms ice around it for bouyancy. When the boat wants to surface, power to the coolers is increased. When it wants to dive, power is decreased. The boat would still need ballast tanks for quick emergency surfacing/diving, but this eliminates much of the need for them. Less moving parts mean less to break horribly. Ice forming around the sub is much quieter than a ballast tank. Plus, the ice is nice and slick.
Problems:
-Salt water has a low freezing point, which adds to the problem of...
-Takes a lot of power. This is mainly resolved by the fact that this is a nuclear sub, so I can assume a huge power source.
-Speed. The system is slower to dive/surface than ballast tanks.
And of course the biggest one...
-Subs need to perform lots of electrolysis to produce oxygen for the crew ANYWAY...so why do we need my system? That's why it's interestingly useless :D