Energy per symbol calculation I am having trouble calculating my Energy per symbol and Es/No. Using these parameters and equation
$N_s = $Number Symbols
$R_s = $Symbol Rate
$T_s = $Symbol Time
$sps = $samples per symbol
x = signal = QAM-16 with no noise added
Then using these, two equations:
$E_s = E_{total} / N_s = sum(abs(x)^2) / N_s $
$E_s=P_{avg} / (sps/R_s)  = P_{avg} sps T_s$
This second equation comes from Energy = Power x Time. So Energy per symbol = Power x Time for Symbol, but my symbol spans more samples because its upsampled, one symbol spans sps samples. So Energy per symbol = Power x time for symbol x sps.
Where
$P_{avg} = sum(abs(x)^2) / N $
N = Number Samples
I have tried both equations after the RRC transmit and after the RRC receive filters, both times these equations give two different answers.
First equation gives a very large number and the second is incredibly small number in comparison. Ive tried removing sps from the second equation but does not get anywhere close to first equation.
Ultimately I need to work out Es/No and I cant get Es right.  Any thoughts please? :/
The first equation, $ \frac{1}{N_s}\sum |x[n]|^2 $, is correct. Applying the RRC filter kind of smears the energy of the symbol over several samples so that when you add them all back up again you get $E_s$, and of course divide by $N_s$ for multiple symbols. The RRC filter should be normalized as someone in the comments noted.
The second equation I can't say much as it is not clear how you compute $P_{avg}$. Secondly, dimensional analysis is a fancy way of saying writing out the units and seeing what cancels out. For example, in the second equation:
$$\text{sps }T_s\rightarrow \frac{\text{samples}}{\text{symbol}}\frac{\text{seconds}}{\text{symbol}}=\frac{\text{(samples)(seconds)}}{(\text{symbol})^2}$$
I've found this method useful as a &quot;sanity check&quot; for myself many times. The above units should suggest to you that something is amiss (also why do you need two equations for the same quantity?).
Edit
The question was updated to include definition of $P_{avg}$. The OP is computing average power per sample and trying to convert it to average power per symbol. Again, write out the units it becomes clear:
$$\frac{\text{energy}}{\text{sample}}\frac{\text{samples}}{\text{symbol}}=\frac{\text{energy}}{\text{symbol}} $$
sps = 4;
Ns = 100;
Es = 10;
rrc = rcosdesign(0.25, 6, sps, 'sqrt');
s = sqrt(Es)*qammod(randi([0, 15], Ns, 1), 16, 'UnitAveragePower', true);
x = upfirdn(s, rrc, sps);

equation1 = sum(abs(x).^2)/Ns;
equation2 = sum(abs(x).^2)/length(x)*sps;