Period analysis of three close binary systems: TW And, TT Her and W UMi