Did some digging.
http://www.subsim.com/radioroom/showthread.php?t=232919
It's just a linear formula y=mx + b, where x is the speed in knots and y is the depth in feet, with m equal to the first parameter (20) and b equal to the second parameter (-100). Were you testing the depths manually or using the new automated depth control?
Although 19 vs 20 are in fact not identical, they're very close. Honestly, when you're diving and the boat is at an angle, I don't know how useful the keel depth would be to determine cavitation given that the bow and stern would be at different depths. I'm not sure if the game takes that into account.