World number one Rafael Nadal has announced that he has withdrawn from the ATP Finals because of a knee injury.