Self-consistent calculation of current-voltage characteristics of resonant tunnelling structures with type II heterojunctions