diff --git a/QAM/constellation.dat b/QAM/constellation.dat index 2706465..76f0605 100644 --- a/QAM/constellation.dat +++ b/QAM/constellation.dat @@ -1,416 +1,416 @@ --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 1.34164079 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 -1.34164079 --0.44721360 0.44721360 --1.34164079 1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 - 0.44721360 -0.44721360 --0.44721360 0.44721360 --1.34164079 -1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --0.44721360 1.34164079 - 0.44721360 -1.34164079 --0.44721360 1.34164079 - 0.44721360 0.44721360 --0.44721360 1.34164079 - 0.44721360 1.34164079 --0.44721360 1.34164079 --0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 0.44721360 --0.44721360 1.34164079 - 1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 0.44721360 --0.44721360 1.34164079 - 1.34164079 0.44721360 --0.44721360 0.44721360 - 1.34164079 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 -1.34164079 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 1.34164079 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 -1.34164079 --0.44721360 0.44721360 --1.34164079 1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 - 0.44721360 -0.44721360 --0.44721360 0.44721360 --1.34164079 -1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --0.44721360 1.34164079 - 0.44721360 -1.34164079 --0.44721360 1.34164079 - 0.44721360 0.44721360 --0.44721360 1.34164079 - 0.44721360 1.34164079 --0.44721360 1.34164079 --0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 0.44721360 --0.44721360 1.34164079 - 1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 0.44721360 --0.44721360 1.34164079 - 1.34164079 0.44721360 --0.44721360 0.44721360 - 1.34164079 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 -1.34164079 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 1.34164079 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 -1.34164079 --0.44721360 0.44721360 --1.34164079 1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 - 0.44721360 -0.44721360 --0.44721360 0.44721360 --1.34164079 -1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --0.44721360 1.34164079 - 0.44721360 -1.34164079 --0.44721360 1.34164079 - 0.44721360 0.44721360 --0.44721360 1.34164079 - 0.44721360 1.34164079 --0.44721360 1.34164079 --0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 0.44721360 --0.44721360 1.34164079 - 1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 0.44721360 --0.44721360 1.34164079 - 1.34164079 0.44721360 --0.44721360 0.44721360 - 1.34164079 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 -1.34164079 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 1.34164079 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 -1.34164079 --0.44721360 0.44721360 --1.34164079 1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 - 0.44721360 -0.44721360 --0.44721360 0.44721360 --1.34164079 -1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --0.44721360 1.34164079 - 0.44721360 -1.34164079 --0.44721360 1.34164079 - 0.44721360 0.44721360 --0.44721360 1.34164079 - 0.44721360 1.34164079 --0.44721360 1.34164079 --0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 0.44721360 --0.44721360 1.34164079 - 1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 0.44721360 --0.44721360 1.34164079 - 1.34164079 0.44721360 --0.44721360 0.44721360 - 1.34164079 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 -1.34164079 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 1.34164079 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 - 0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 -1.34164079 --0.44721360 0.44721360 --1.34164079 1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 1.34164079 - 0.44721360 -0.44721360 --0.44721360 0.44721360 --1.34164079 -1.34164079 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 1.34164079 --0.44721360 1.34164079 - 0.44721360 -1.34164079 --0.44721360 1.34164079 - 0.44721360 0.44721360 --0.44721360 1.34164079 - 0.44721360 1.34164079 --0.44721360 1.34164079 --0.44721360 -1.34164079 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 0.44721360 --0.44721360 0.44721360 --0.44721360 1.34164079 - 1.34164079 -1.34164079 --0.44721360 1.34164079 - 1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 0.44721360 --0.44721360 1.34164079 - 1.34164079 0.44721360 --0.44721360 0.44721360 - 1.34164079 -0.44721360 --1.34164079 1.34164079 --1.34164079 -1.34164079 --0.44721360 1.34164079 --1.34164079 -0.44721360 --0.44721360 0.44721360 --1.34164079 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 1.34164079 --0.44721360 -0.44721360 --0.44721360 0.44721360 --0.44721360 -0.44721360 --0.44721360 0.44721360 - 1.34164079 -1.34164079 +-0.48961254 -0.44544459 +-0.46513110 1.40428312 +-0.29307347 1.38893240 + 1.31089689 -0.55680171 +-0.38632169 1.36097312 +-0.33123545 1.38726262 +-1.26549075 1.37974405 +-1.49852105 -1.19958987 +-0.31017669 1.30222164 + 1.50729893 1.24105325 +-0.43017215 0.48948646 +-0.54096932 -0.28558853 +-0.26310886 1.41585924 +-0.43457847 0.44417363 +-0.19980151 1.35561085 +-0.44785998 -0.33107245 +-1.14331753 1.50994919 + 0.14820610 -1.42291697 +-1.10811359 1.44551804 +-1.57079461 -1.11961078 +-0.38427593 0.43042485 +-0.81528420 -1.22676725 +-0.44084375 0.55211323 +-1.12415715 1.46959617 +-0.22904642 1.34965939 +-0.50438838 -0.39136139 +-0.20762621 1.38489848 + 0.33614255 -0.59435058 +-0.42253847 0.49986333 +-1.60347736 -0.95239233 +-0.03566900 1.37591841 +-0.51774331 -0.40091728 +-0.44026540 0.59544844 + 1.61978249 0.94637465 +-0.92149464 1.71093438 +-1.56102417 -0.94051892 +-0.01285030 1.38478328 +-1.19627264 0.83013282 +-0.06307302 1.47052202 +-0.58523530 -0.26077664 +-0.98115028 1.59689715 +-1.66141576 -0.88628493 +-0.00852613 1.43712353 +-0.94510653 1.68296522 + 0.02796472 1.45841907 + 0.04359314 -1.43960140 + 0.02915805 1.41430273 + 0.59530686 0.23857004 + 0.01512380 1.39441413 + 0.87304003 1.07342230 + 0.03850944 1.47994568 +-0.74819139 -1.08237048 +-0.80309466 1.82889157 +-1.69114176 -0.75838051 +-0.22871349 0.55763008 +-0.28017727 0.51990165 + 0.05134513 1.43745319 + 0.70298158 -1.76376530 + 0.06299865 1.44501145 + 1.04763519 -0.94454689 +-0.14211486 0.57473317 +-1.05659494 0.90567818 + 0.21562582 1.42864813 + 1.43794919 -0.18192650 +-0.17191186 0.72065825 + 1.06943225 -1.00399960 +-0.62563602 1.77948004 +-1.75877350 -0.58976746 + 0.15742790 1.38156984 +-1.36716105 0.18569423 +-0.10959253 0.56159108 +-1.38029979 0.27498475 +-0.16662433 0.63815496 +-0.69299949 -0.22078711 + 0.24097931 1.43158061 +-0.56183026 -0.17886504 +-0.20186054 0.69913865 +-0.62490100 -0.14390235 +-0.20291470 0.59305976 + 0.51209376 -1.90033204 +-0.45613235 1.87052028 +-0.33525878 -1.36406488 +-0.52204801 1.87033049 +-1.80395817 -0.49649028 +-0.56417371 -0.09817205 + 0.33527724 1.34641187 + 0.25267449 1.38825080 + 0.89090250 -1.07383883 + 0.29405742 1.35820577 + 0.34849465 1.37038226 +-0.31128450 1.84170483 +-1.79739912 -0.39840073 + 0.33475505 1.42320930 + 1.73584529 0.41520891 +-0.11884979 0.65144257 +-0.58057834 -0.09703036 + 0.41486733 1.25197673 +-0.08610506 0.61807043 + 0.48157488 1.34603546 +-0.51959424 -0.10279402 +-0.22181939 1.85567303 +-0.43696196 -1.32625724 +-0.22859344 1.91431107 +-1.86197344 -0.21673157 +-0.07335711 0.70160975 +-1.19148834 -0.78920537 +-0.13331574 0.62574148 +-0.12591132 1.90861215 + 0.55253930 1.36648515 +-0.61017418 -0.07900305 + 0.56494240 1.25763125 + 0.03588819 -0.60607038 +-0.16605597 0.61282039 +-1.83991758 -0.05832141 + 0.44707974 1.32300615 +-0.58169728 -0.00595536 + 0.04035602 0.60491026 + 1.82488117 0.13148933 +-0.09894890 1.85431403 +-1.94432949 -0.01478929 + 0.65139963 1.21039977 +-0.73792715 1.19409828 + 0.61274010 1.20774353 +-0.55048746 0.06897033 +-0.00216719 1.94731226 +-1.90572088 -0.00961994 + 0.63257907 1.28332411 +-0.03658697 1.88600425 + 0.72958333 1.30050643 +-0.69441386 -1.20574763 + 0.59432528 1.18046372 + 0.57212587 0.03035341 + 0.72664451 1.15150859 + 1.33739250 0.53193906 + 0.65798374 1.22337579 +-1.27476518 -0.49007002 + 0.05715084 1.91518006 +-1.92376764 0.20568610 + 0.03337894 0.52213641 + 0.09766169 0.76246638 + 0.72672206 1.20756452 +-0.24726369 -1.82461637 + 0.84049477 1.19627841 + 0.45402707 -1.32737360 + 0.10396333 0.67426301 +-0.46558946 1.36599073 + 0.75612467 1.20061076 + 1.20224816 -0.82351951 + 0.09945559 0.64980823 + 0.40092147 -1.39275741 + 0.28095155 1.95902585 +-1.89902051 0.38443177 + 0.81312652 1.06565550 +-1.10523485 0.81614169 + 0.17539027 0.60607147 +-1.08341524 0.85037101 + 0.11703295 0.56780442 +-0.62514703 0.08280138 + 0.93688915 1.13972258 +-0.62616770 0.08694894 + 0.07656169 0.60466805 +-0.58304627 0.12275201 + 0.14060574 0.65332465 +-0.46504121 -1.86336679 + 0.47300263 1.79896550 +-0.91510621 -1.05313216 + 0.47114393 1.85433307 +-1.77301753 0.46009286 +-0.54507731 0.16083904 + 0.88330875 0.97594803 + 0.84930908 0.97970934 + 0.26180808 -1.39899938 + 0.92125691 0.88504166 + 1.04997851 1.00795302 + 0.52998259 1.81511825 +-1.71489073 0.52823691 + 0.98904512 1.04053873 + 1.82532442 -0.57436133 + 0.13520730 0.50528308 +-0.61914934 0.21982490 + 1.01503204 1.05277598 + 0.21159036 0.57605876 + 0.91660475 0.94049546 +-0.61541016 0.29095564 + 0.62609787 1.74017153 +-1.08752399 -0.99132647 + 0.76525865 1.72200222 +-1.76420782 0.71663228 + 0.22353957 0.49553689 +-1.36548697 -0.13614393 + 0.30057974 0.60480370 + 0.72688319 1.69890859 + 1.02144075 0.87191682 +-0.53104473 0.20727986 + 1.12890578 0.89874637 +-0.34307893 -0.59073421 + 0.21189859 0.47810079 +-1.67898034 0.75335891 + 1.11877996 0.92515156 +-0.53524443 0.19639758 + 0.40246637 0.55394168 + 1.71671976 -0.84851742 + 0.85241157 1.67085885 +-1.65999861 0.88996632 + 1.14343675 0.77619951 + 0.01973882 1.50709965 + 1.23496270 0.84604907 +-0.58865986 0.31450775 + 0.90706106 1.63673024 +-1.64951586 0.99700496 + 1.23705620 0.79200846 + 0.90811187 1.69230330 + 1.21871516 0.77786107 +-1.21417902 -0.82676679 + 1.21843545 0.79754650 + 0.46830390 -0.39568361 + 1.23591198 0.75994717 + 1.30664386 -0.15646879 + 1.20837214 0.66956495 +-1.33597135 0.20770639 + 1.07684938 1.58402836 +-1.63631303 0.97690329 + 0.42837377 0.46174780 + 0.33755803 0.49496571 + 1.28309836 0.72649413 +-1.02856457 -1.51936209 + 1.27789182 0.74562945 +-0.22354338 -1.43585457 + 0.40585314 0.61327824 + 0.18263466 1.44556002 + 1.29947395 0.65836781 + 0.67059393 -1.27143638 + 0.30976849 0.50595737 +-0.35133388 -1.38306488 + 1.09424882 1.46139023 +-1.54993037 1.18919991 + 1.26990578 0.58664272 +-0.64627153 1.28576337 + 0.40915803 0.43278891 +-0.60210501 1.29808665 + 0.31782993 0.51648304 +-0.53174512 0.34997737 + 1.27252369 0.54738946 +-0.50931719 0.38587497 + 0.37844860 0.43542442 +-0.57010280 0.32272275 + 0.41449300 0.52494515 +-1.27703904 -1.43171480 + 1.31351682 1.41133254 +-1.33669046 -0.53197769 + 1.20667648 1.34711079 +-1.36551992 1.34228552 +-0.53606785 0.42397625 + 1.42643488 0.52754677 + 1.25063823 0.46187229 +-0.38606726 -1.35182299 + 1.35171097 0.53935539 + 1.35062855 0.42160177 + 1.36233237 1.34029509 +-1.31043230 1.34643901 + 1.38244016 0.39373355 + 1.25066238 -1.44855873 + 0.43200556 0.46788979 +-0.42134427 0.47098778 + 1.36281212 0.46815575 + 0.44083823 0.36229051 + 1.38305322 0.32810010 +-0.45110773 0.46380056 + 1.43603839 1.20120537 +-1.32190338 -0.37624311 + 1.49449818 1.20125391 +-1.20567682 1.55232534 + 0.58422493 0.41427894 +-1.20715782 0.48988342 + 0.34866497 0.39151998 + 1.49886828 1.20337418 + 1.44048084 0.19095526 +-0.39314298 0.50199366 + 1.37274013 0.21145366 +-0.51646556 -0.34849968 + 0.46286982 0.32106549 +-1.11795301 1.55817381 + 1.43635472 0.12670014 +-0.45229655 0.46130994 + 0.51300846 0.36804529 + 1.09069505 -1.46299574 + 1.56406300 1.04566660 +-0.99216278 1.57795669 + 1.48352041 0.22764812 + 0.67153229 1.22104534 + 1.38989645 0.16687950 +-0.26628596 0.55482193 + 1.55176085 1.05592934 +-1.00805648 1.59717399 + 1.39738347 0.13954744 + 1.64093666 1.09085350 + 1.33149219 0.07607907 +-1.49718163 -0.19222213 + 1.46484721 0.11587303 + 0.30323162 -0.52722447 + 1.44154326 -0.04261822 + 1.15996483 -0.78417104 + 1.46808337 0.06327806 +-1.13150524 0.70882611 + 1.73417711 0.92971637 +-0.88679017 1.65283145 + 0.65323782 0.27004474 + 0.62156850 0.23908697 + 1.43120236 -0.01977933 +-1.69704199 -0.81548161 + 1.50195468 -0.11010930 +-0.89704982 -1.11511745 + 0.51339586 0.28540725 + 0.86939319 1.07216313 + 1.41848331 -0.03882423 +-0.12057756 -1.45947991 + 0.69599133 0.22852746 +-0.91695338 -1.05331735 + 1.78578231 0.74835257 +-0.74016968 1.81822295 + 1.40289027 -0.11172712 + 0.07084859 1.43723720 + 0.58119839 0.21524718 + 0.04198519 1.49789145 + 0.57210920 0.22097615 +-0.22366343 0.58627521 + 1.42455620 -0.12982301 +-0.13362457 0.68263829 + 0.54696227 0.24686813 +-0.24118480 0.58089469 + 0.56356655 0.30392984 +-1.77517966 -0.69108184 + 1.83172461 0.61442927 +-1.42019865 0.19993192 + 1.84241886 0.55973948 +-0.54492246 1.84798540 +-0.22529925 0.58683552 + 1.42416898 -0.22866871 + 1.44660767 -0.19126394 +-1.06656064 -1.02613643 + 1.33374832 -0.27671784 + 1.35663736 -0.31437592 + 1.81277928 0.50904140 +-0.42071499 1.94048571 + 1.34430120 -0.30054542 + 0.49215095 -1.80490515 + 0.55692097 0.14763690 +-0.09100418 0.57967127 + 1.31097206 -0.32851058 + 0.60454127 0.10088269 + 1.38250158 -0.31253244 +-0.03627446 0.57912606 + 1.85238460 0.35877373 +-1.35123008 0.43176677 + 1.94955103 0.36646367 +-0.35021803 1.81764768 + 0.64238008 0.17451633 +-0.82792393 1.19165344 + 0.61155272 0.17222952 + 1.81529035 0.32912303 + 1.34665515 -0.39850446 +-0.07146229 0.59176372 + 1.31666474 -0.42121180 +-0.66679149 -0.07441151 + 0.65795799 0.16475121 +-0.23277688 1.87718572 + 1.28531280 -0.57869031 +-0.03715614 0.63080589 + 0.63786408 0.09445329 + 0.20978234 -1.91444420 + 1.89066545 0.19889781 +-0.14577078 1.89789268 + 1.30375767 -0.50887943 + 1.20271768 0.69208730 + 1.33826305 -0.56560928 +-0.06780183 0.63430771 + 1.93393669 0.05628379 +-0.13854581 1.90279530 + 1.28577881 -0.54780021 + 1.89384896 0.06695432 + 1.33780890 -0.55354551 +-1.25558620 0.66576944 + 1.33159009 -0.48283724 + 0.04017382 -0.64200065 + 1.23844040 -0.59677820 + 0.68829395 -1.26704094 + 1.29130299 -0.59222046 +-0.67535838 1.20820049 + 1.93869890 -0.05791543 + 0.12713845 1.87484374 + 0.77657913 0.02040247 + 0.63160102 0.00660691 + 1.24244624 -0.67370943 +-1.84109063 0.08797837 + 1.28182793 -0.69719047 +-1.31319236 -0.52642967 + 0.63488504 -0.07598658 + 1.32781009 0.62256655 + 1.22594177 -0.71521729 +-0.76582438 -1.24994760 + 0.63268726 -0.15553386 +-1.32682719 -0.53291695 + 2.01777801 -0.13027800 + 0.14464114 1.90637156 + 1.12406593 -0.75712395 + 0.78498751 1.21465878 + 0.62142786 -0.04518144 + 0.77876616 1.15380949 + 0.61338544 -0.00774816 + 0.06401641 0.66848491 + 1.15548903 -0.83882198 + 0.12182780 0.68004504 + 0.54187921 -0.06399507 + 0.02153134 0.60988530 + 0.75335082 -0.07216479 +-1.85238231 0.19396941 diff --git a/QAM/out b/QAM/out index 0b0112e..a288096 100755 Binary files a/QAM/out and b/QAM/out differ diff --git a/QAM/qam.c b/QAM/qam.c index 97b7472..9d7b971 100644 --- a/QAM/qam.c +++ b/QAM/qam.c @@ -234,6 +234,86 @@ double complex* concat_preamble_signal(double complex* preamble_mod, int preambl return s_concat; } +// Coarse Frequency Offset avec préambule avec N = 1 (lag 1) +void cfo(double complex* s_with_preamble, int N, int L, double Fs, int total_samples, double Fc) { + double complex sum = 0; + int lag = 5; + for (int n = lag; n < L * N; n++) { + sum += s_with_preamble[n] * conj(s_with_preamble[n - lag]); + } + double phi = carg(sum); + double f_est = (phi / (2.0 * M_PI * lag)) * Fs; + double f_offset = f_est - Fc; + printf("CFO estimé : %f Hz \n", f_offset); + for (int n = 0; n < total_samples; n++) { + s_with_preamble[n] *= cexp(-I * 2.0 * M_PI * f_offset * n / Fs); + } +} + +// Fine Frequency Offset (FFO) Correction +void ffo(qam_system* qam, double complex* s_with_preamble, double complex* preamble_ref, int L, int total_samples) { + + double complex r_preamble[L]; + for (int k = 0; k < L; k++) { + double complex r = 0; + for (int n = 0; n < qam->N; n++) { + int idx = k * qam->N + n; + r += s_with_preamble[idx] * cexp(-2 * I * M_PI * qam->Fc * ((double)idx / qam->Fs)) / A; + } + r /= qam->N; + r_preamble[k] = r; + } + + double complex diff_phase_sum = 0; + double Ts_symbole = qam->N / qam->Fs; + + for (int k = 1; k < L; k++) { + double complex error_k = r_preamble[k] * conj(preamble_ref[k]); + double complex error_k_minus_1 = r_preamble[k - 1] * conj(preamble_ref[k - 1]); + + diff_phase_sum += error_k * conj(error_k_minus_1); + } + + double phi_sym = carg(diff_phase_sum); + double delta_f_fine_est = phi_sym / (2.0 * M_PI * Ts_symbole); + + printf("FFO estimé (Delta f fine) : %f Hz\n", delta_f_fine_est); + + for (int n = 0; n < total_samples; n++) { + s_with_preamble[n] *= cexp(-I * 2.0 * M_PI * delta_f_fine_est * n / qam->Fs); + } +} + +// Phase Offset (PO) Correction +void po(qam_system* qam, double complex* s_with_preamble, double complex* preamble_ref, int L, int total_samples) { + double complex r_preamble[L]; + + for (int k = 0; k < L; k++) { + double complex r = 0; + for (int n = 0; n < qam->N; n++) { + int idx = k * qam->N + n; + r += s_with_preamble[idx] * cexp(-2 * I * M_PI * qam->Fc * ((double)idx / qam->Fs)) / A; + } + r /= qam->N; + r_preamble[k] = r; + } + + double complex phase_error_sum = 0; + for (int k = 0; k < L; k++) { + phase_error_sum += r_preamble[k] * conj(preamble_ref[k]); + } + + double phi_est = carg(phase_error_sum); + + printf("Phase Offset (PO) estimée : %f radians (soit %f degrés)\n", phi_est, phi_est * 180.0 / M_PI); + + double complex phase_corr = cexp(-I * phi_est); + + for (int n = 0; n < total_samples; n++) { + s_with_preamble[n] *= phase_corr; + } +} + int main () { // Initialisation du system qam qam_system qam; @@ -274,22 +354,29 @@ int main () { double complex* s_with_preamble = concat_preamble_signal(preamble_mod, L, s_mod, nb_symbols, qam.N); // Ajout du bruit - add_noise(s_with_preamble, total_samples, 0); + add_noise(s_with_preamble, total_samples, 10); FILE *fp_ref = fopen("constellation_ref.dat", "w"); fill_constellation_data(&qam, fp_ref); fclose(fp_ref); // Ajout de dephasage - //add_dephasage(s, M_PI / 6.0, total_samples); + add_dephasage(s_with_preamble, M_PI / 6.0 , total_samples); // AJout de decalage de fréquence - add_freq(&qam, s_with_preamble, 0, total_samples); + add_freq(&qam, s_with_preamble, 10, total_samples); + + // Estimation / correction du CFO + cfo(s_with_preamble, qam.N, L, qam.Fs, total_samples, qam.Fc); + ffo(&qam, s_with_preamble, preamble, L, total_samples); + + // Correction phase + po(&qam, s_with_preamble, preamble, L, total_samples); // Démodulation FILE *fp_constel = fopen("constellation.dat", "w"); uint8_t* output_bits = (uint8_t*)malloc(nb_bits * sizeof(uint8_t)); - demodulate(&qam, s_mod, nb_symbols, output_bits, fp_constel); + demodulate(&qam, s_with_preamble + L * qam.N, nb_symbols, output_bits, fp_constel); fclose(fp_constel); // Reconstruction du texte @@ -307,7 +394,10 @@ int main () { free(input_bits); free(output_bits); free(symbols); - free(s); + free(preamble); + free(preamble_mod); + free(s_with_preamble); + free(texte_recup); free_constellation(&qam); return 0;