S diagram