Forum Discussion
Altera_Forum
Honored Contributor
11 years agoCostas Loop oscillates in ModelSim while locks in MATLAB!
Hello again, I have designed a Costas Loop in MATLAB and it simulates very well... locking and recovering the carrier. Here are the results: http://www.alteraforum.com/forum/attachment.php?...
Altera_Forum
Honored Contributor
11 years agoThe above code should prove the concept.
The feedback point is at this equation below bb(i) = rf_signal(i).*exp(j*2*pi*fc*i+j*phase_offset).*exp(-j*PhErr(i-1)); The expression exp(-j*err) means rotate phase 90 degrees *err clockwise while frequency is unchanged. This may suit software based dsp but in rtl the nco is controlled via inc value which controls both phase and frequency. So keep on modelsim