1- the window size is the number of measures averaged in order to get a “smoothed-out” value. This “averaged” value is compared to the threshold.
For instance, window size for PC LEVEL = 4 means :
RX LEV (t=1) = -60
RX LEV (t=2) = -62
RX LEV (t=3) = -61
RX LEV (t=4) = -63
At t=4, the AV-RX-LEV = -61.5 dBm. This value will be cmpared to the threshold UPPER PC LEV and LOWER PC LEV.
2- i learnt about Px and Nx long time ago, but since they are not modifiable, i forgot about them. I didn’t ask you to change these values though… just keep the current values.
if av_rx_lev > upper pc lev threshold, then the Tx Power of the MS will be increased.
if av_rx_lev < lower pc lev threshold, then the Tx Power of the MS will be decreased. i hope it helps.. i suggest you have a look through 3GPP specifications regarding GSM algorithms if you need additional details.