Optimal bit and power allocation for rate-constrained decentralized detection and estimation