Electrical and structural properties of AlN/GaN and AlGaN/GaN heterojunctions