Forum Discussion
Altera_Forum
Honored Contributor
14 years agoDSP code snippets
I thought the following link to code snippets at dsprelated.com may further help members of this forum.
http://www.dsprelated.com/showcode/241.php My contributions thus far include: 16QAM Modem (basic model) NCO phase drift NCO phase continuity NCO bit true model IQ conjugates complex filter using 3 multipliers even/odd FIR structure vector alignment OFDM symbol model kaz (kadhiem ayob)2 Replies
- Altera_Forum
Honored Contributor
The two inputs (.25 & 1) to function firrcos represent as you know sampling frequency of filter module and its cutoff.
The term Fs and Fc I use them for different purpose in the main program. Fs is the final digital IF. Fc is centre frequency for upconversion. So both are unrelated to filter stage. For firrcos, the minimum practical upsampling is x2 hence we need to cut off at Nyquist relative to Fs of 2 i.e you can enter as .5 & 2 or .25 & 1. The actual physical sampling frequency of filter is normalised here to 1. The code implies symbol rate = 12.5 Msps and so upcomverted to 25 by filter then to 100 by upsampling stage then frequency shifted to 10MHz. I edited that snippet accordingly to make this point clearer, thanks for the question. kaz - Altera_Forum
Honored Contributor
HI kaz
In the pulse shaping, root raised cosine h = firrcos(50,.25,.15,1,'rolloff','sqrt'); Can u explain me why 0.25 and 1 are taken in the RRC function which represent cutoff and sampling as Fs = 100; %MHz, IF sampling frequency Fc = 20; %MHz, upconverter frequency Fc/Fs = 20/100 = 0.2 so can i use h = firrcos(50,.2,.15,1,'rolloff','sqrt');