You’ll need to read and take information from the following grammar books:
1) Advanced Language Practice by Michael Wince with Peter Sunderland;
2) Practical English Usage by Michael Swan;
3) Longman English Grammar for Intermediate Students;
You can also use:
4) English Grammar in Use by Raymond Murphy
5) Advanced Grammar in Use by Martin Hewings.
6) http://englishhobby.ru/grammar/verb_tenses/
http://englishhobby.ru/grammar/verb_tenses/tense_formulas_active_voice/
http://englishhobby.ru/grammar/verb_tenses/use_of_tenses/
7) Качалова, Израилевич. Практическая грамматика английского языка.