Model for evaluation of terahertz plasma resonances in HEMT-based devices with grating gate