Electrical optimization of AlGaN/GaN devices for power and RF applications