# How to calculate non centrality parameter?

Suppose $Y\sim N_p(\mu,\sigma^2I_p)$. Let $A$ be a symmetric idempotent matrix. I want to show $Y^{T}AY$ follows a chi-sq distribution with some non centrality parameter.

Suppose $tr(A)=r(A)=k$. Note that $A=P^{T}\Delta P$ where $P$ is orthogonal and $\Delta$ is diagonal. WLOG assume first $k$ elements of $\Delta$ are $1$. Then $Z:=PY \sim N_p(P\mu,\sigma^2I_p)$

$Y^{T}AY=Z^{T}\Delta Z$= $\sum_{i=1}^{k} Z_i^2$ which is evidently a chisq distribution by this definition. And the non centrality parameter is $$\frac1{\sigma^2}\sum_{i=1}^{k}[(P\mu)_i]^2$$ But this representation is very inconvenient. Is there better representation of the above?