**1.-** From :

[**An Introduction to Signals and Noise in Electrical Communications**][1]

Author : Bruce Carlson

Search for much cheaper copies readily available online.

The sought figure-of-merit is   **SNR=S/N** 

`S` : signal power

`N` : noise power

`s` signal may be anything to measure, over time, for then calculate signal power.

`s` is often measured to control work [kg*m] or [lb*ft] . Work is, or should be, proportional to money [$] or [£] or equivalent.

**Power** measures **capacity to generate work**.

When working with electrical signals power is [V^2/Ohm] or [A^2*Ohm].

Most relevant literature obviate what **impedance** value(s) exactly to use, because it depends upon what network is used.

So [CARLSON] included assume 1[Ohm] and develop accordingly. So


    S=mean(s^2)
    N=mean(n^2)

but receivers always catch `S+N` , not just `S` .

**2.-** **Refreshing Random Variables**

From [**this**][2] Carnegie Mellon University lecture 

in general : `mean((x+y)^2)=(mean(x+y))^2+var(x+y)`

**2.1.-** For **signals** `mean(s^2)=(mean(s))^2+var(s)`

If the link budget has been correctly designed and since signals and pulses to detect are supposed to be known
on the receiver side 

    (mean(s))^2 >> var(s) and S ~ (mean(s))^2

**2.2.-** For **noise** it's the contrary. 

It's in the nature of noise `var(n) >> mean(n)` 

**3.-** **AWG** `n` is supposed to be **uncorrelated** to `s`

in general `mean((x+n)^2)=mean(x^2)+2*mean(x*n)+mean(n^2)`

So even if point **1.-** takes place, meaning 

`mean(s^2)>>mean(n^2)` and 

    mean(s^2)+mean(n^2) ~ mean(s^2) 

if noise `n` is is correlated to signal `s` that the term `2*mean(x*n)` cannot be neglected

However, for a satisfatory system design, with **A**dditive **W**hite **G**ausian **AWG** Noise **only**, in absence of interference, or any other **non-AWG** noise correlated to signal, then 

    S>>N and S+N ~ S

**3.-** So

    (mean(s))^2/(var(n)^2) % SNR linear

same as

    20*log10(abs(var(s)))-20*log10(abs(var(n)))  % SNR in [dB]


**4.-** I found [this][3] interesting website where **SNR** is calculated from **QAM** constellation parameters

**QAM webdemo**, 
Institute of Telecommunications, University of Stuttgart, Germany, Jan. 2023. 

Author : Michael Bernhard



**5.-** [**This Mathworks page**][4] shows how to use MATLAB command `snr` for *narrow band signals*.


**6.-** For **digital signals** you should focus on **Eb/N0** rather than **SNR**, **SNR** being important, but digital signals quality is about having 

 - enough pulse or **bit enery** `Eb` 
   
 - over **noise power spectral density**, aka n**oise power per Hz** `N0`

rather than signal Watts over Noise Watts (SNR).

Often you will read **EbN0** instead of **Eb/N0** both being the same, it's just *'simplified'* notation.

**Eb/N0 101** reading, by Jim Pearce [**available here**][5].

However

All above said is for **narrow band signals only**. 

For broadband signals more or less complicated expressions may or nay not be available and it may be far more practical to obtain **direct measurements**.

**7.-** An example: **OFDM signals** are considered broadband because several close carriers are often used and the overall bandwidth being much larger than the band for each single carrier.

An available detailed explanation how to estimate **SNR** for **OFDM** systems is available in this thesis : 

**Pilot-Based Time Domain SNR Estimation for Broadcasting OFDM Systems**
 
Authors : Abid Muhammad Khan, Varun Jeoti, Muhammad Zaka Ur Rehman, Muhammad Taha Jilani, Omer Chugtai, Mubashir Hussain Rehmani.

Journal of Computer Networks and Communications, vol. 2018, Article ID 9319204, 8 pages, 2018. 
https://doi.org/10.1155/2018/9319204

[**Complete text available in Hindawi**][6]

Particularly [**this table**][7] shows a couple ways **SNR** can be estimated for **OFDM** signals as defined in this text.

And I say it again : Reliable **measurements** with calibrated instruments are the best way to really know what **SNR** a signal really has.


  [1]: https://www.amazon.co.uk/Communication-Systems-Solutions-Introduction-Electrical/dp/0070099588/ref=sr_1_6?crid=3O6YLVNUXE38F&keywords=communication%20systems%20bruce%20carlson&qid=1673637400&s=books&sprefix=communcation%20systems%20bruce%20carlson%2Cstripbooks%2C62&sr=1-6
  [2]: https://www.stat.cmu.edu/~cshalizi/36-220/lecture-6.pdf
  [3]: https://webdemo.inue.uni-stuttgart.de/webdemos/02_lectures/uebertragungstechnik_1/qam_constellation_diagram_from_snr/index.php?id=2#
  [4]: https://uk.mathworks.com/help/signal/ref/snr.html
  [5]: http://www.sss-mag.com/ebn0.html
  [6]: https://www.hindawi.com/journals/jcnc/2018/9319204/
  [7]: https://www.hindawi.com/journals/jcnc/2018/9319204/tab1/