FM Receiver

In this chapter we are going to design a digital FM receiver circuit, assuming the Frequency Modulated signal is converted to series of numerical values (digital signal) via Analog to Digital Conversion (ADC) circuit. CREDIT TO THE ORIGINAL OWNER Nursani Rahmatullah(Institute of technology Bandung).

  • The attributes notation , which is used in Signal Processing Workbench, is explained here.
  • For example If the signal attribute is <8,2,t>, then the signal is as follows,
  • 8: signal width is 8 bit
  • 2: integer part is 2 bits
  • t: two's complement number, then the MSB bit of the signal is sign bit.
  • For example, "01101111" with attribute <8,2,t> is as follows.

The design of the Digital FM Receiver circuit in this project uses Phase Locked Loop (PLL) as the main core. The task of the PLL is to maintain coherence between the input (modulated) signal frequency, ωi and the respective output frequency, ωo via phase comparison. This self-correcting ability of the system also allows the PLL to track the frequency changes of the input signal once it is locked. Frequency modulated input signal is assumed as a series of numerical values (digital signal) via 8-bit of analog to digital conversion (ADC) circuit. The FM Receiver gets the 8 bits signal every clock cycle and outputs the demodulated signal.

Phase Detector (PD) detects phase error between input signal and output signal from NCO(Numerical controlled Oscillator we discuss this later section). This operation employs a multiplier module as shown below. The input signal is frequency modulated, so the input signal Vi(n) can be expressed as follows:

Vi(n) = sin( ωi(n)+ θi)

Feedback loop mechanism of the PLL will force NCO to generate sinusoidal signal Vo(n) with the same frequency of Vi(n), then:

Vo(n) = cos(ωi(n) + θo)

Output of phase detector is product of these two signals, using familiar trigonometric identity we obtain:

Vd(n) =Kdsin(ωi(n) + θi) cos(ωi(n) + θo)
Kd/2[sin(2ωin + θi+ θo) + sin( θi - θo)]

Kd is the gain of the phase detector. The first term corresponds to high frequency component. The second term corresponds to the phase difference between Vi(n) and Vo(n) . By removing the first term thru loop filtering, the phase difference can be obtained.

In the VHDL model, we use Booth’s Multiplication algorithm for the multiplier instead of simple signed arithmetic multiplier operation (denoted by ∗ ). Arithmetic multiplier will consume large area, while Booth’s multiplication algorithm for 8-bit multiplication only needs eight 8-bit adders which is much save in area consumption. The Booth’s Multiplication algorithm is discussed below.

A typical implementation of Booth's algorithm
Booth's algorithm can be implemented by repeatedly adding (with ordinary unsigned binary addition) one of two predetermined values A and S to a product P, then performing a rightward arithmetic shift on P. Let m and r be the multiplicand and multiplier, respectively; and let x and y represent the number of bits in m and r. The Booth's algorithm steps are given below.

1. Determine the values of A and S, and the initial value of P. All of these numbers should have a length equal to (x + y + 1).

  • A: Fill the most significant (leftmost) bits with the value of m. Fill the remaining (y + 1) bits with zeros.
  • S: Fill the most significant bits with the value of (−m) in two's complement notation. Fill the remaining (y + 1) bits with zeros.
  • P: Fill the most significant x bits with zeros. To the right of this, append the value of r. Fill the least significant (rightmost) bit with a zero.

2. Determine the two least significant (rightmost) bits of P.

  • If they are 01, find the value of P + A. Ignore any overflow.
  • If they are 10, find the value of P + S. Ignore any overflow.
  • If they are 00, do nothing. Use P directly in the next step.
  • If they are 11, do nothing. Use P directly in the next step.

3. Arithmetically shift the value obtained in the 2nd step by a single place to the right. Let P now equal this new value.

4. Repeat steps 2 and 3 until they have been done y times.

5. Drop the least significant (rightmost) bit from P. This is the product of m and r.

Example

Find 3 × (−4), with m = 3 and r = −4, and x = 4 and y = 4:

  • m = 0011, -m = 1101, r = 1100
  • A = 0011 0000 0
  • S = 1101 0000 0
  • P = 0000 1100 0

Perform the loop four times:
P = 0000 1100 0. The last two bits are 00.

  • P = 0000 0110 0. Arithmetic right shift.
  • P = 0000 0110 0. The last two bits are 00.
    • P = 0000 0011 0. Arithmetic right shift.
  • P = 0000 0011 0. The last two bits are 10.
    • P = 1101 0011 0. P = P + S.
      • P = 1110 1001 1. Arithmetic right shift.
    • P = 1110 1001 1. The last two bits are 11.
      • P = 1111 0100 1. Arithmetic right shift.
    The product is 1111 0100, which is −12.

    The above-mentioned technique is inadequate when the multiplicand is the most negative number that can be represented (e.g. if the multiplicand has 4 bits then this value is −8). One possible correction to this problem is to add one more bit to the left of A, S and P. This then follows the implementation described above, with modifications in determining the bits of A and S;

    e.g., the value of m, originally assigned to the first x bits of A, will be assigned to the first x+1 bits of A. Below, the improved technique is demonstrated by multiplying −8 by 2 using 4 bits for the multiplicand and the multiplier:

    • A = 1 1000 0000 0
    • S = 0 1000 0000 0
    • P = 0 0000 0010 0
    • Perform the loop four times:
    • P = 0 0000 0010 0. The last two bits are 00.
      • P = 0 0000 0001 0. Right shift.
    • P = 0 0000 0001 0. The last two bits are 10.
      • P = 0 1000 0001 0. P = P + S.
      • P = 0 0100 0000 1. Right shift.
    • P = 0 0100 0000 1. The last two bits are 01.
      • P = 1 1100 0000 1. P = P + A.
      • P = 1 1110 0000 0. Right shift.
    • P = 1 1110 0000 0. The last two bits are 00.
      • P = 1 1111 0000 0. Right shift.
    The product is 11110000 (after discarding the first and the last bit) which is −16.

    This previous example was edited from wiki, now this is our own implementation:
    consider y = 1101, x = 1011; where x*y = 10001111 = M. WATCH THE VIDEO FOR EXPLANATION

    Y X Description
    1 1-1-1-1-0-1-0-1 -X
    01 0-0-0-1-0-1-1 X
    10 1-1-0-1-0-1 -X
    11 0-0-0-0-0 0
    01 1-0-1-1 X
    sum total 1-0-0-0-1-1-1-1 => M

    LIBRARY ieee;
       USE ieee.std_logic_1164.all;
       USE IEEE.numeric_std.ALL;
    
    
       ENTITY multiplier IS
       -- Declarations
       port (CLK   	: in  std_logic;
       			RESET 	: in  std_logic;
       			input1  	: in  std_logic_vector(7 downto 0);
             input2  	: in  signed(7 downto 0);
             output  	: out signed(7 downto 0)
       		);
       END multiplier ;
    
    
       ARCHITECTURE behavior OF multiplier IS
    
       signal out_temp : signed(15 downto 0);
       signal input1_buf : signed(15 downto 0);
       signal part0, part1, part2, part3, part4, part5, part6, part7 : signed(15 downto 0);
    
       begin
    
       process(CLK, RESET)
       begin
           if (RESET='1') then
           	out_temp <= (others => '0');
       	  	output <= (others => '0');
       	  	input1_buf <= (others => '0');
       	  	part0 <= (others => '0');
       	  	part1 <= (others => '0');
       	  	part2 <= (others => '0');
       	  	part3 <= (others => '0');
       	  	part4 <= (others => '0');
       	  	part5 <= (others => '0');
       	  	part6 <= (others => '0');
       	  	part7 <= (others => '0');
       		elsif rising_edge(CLK) then
       			input1_buf <= input1(7)&input1(7)&input1(7)&input1(7)&input1(7)&input1(7)&input1(7)&input1(7)&signed(input1);
       			if (input2(0)='1') then
       				part0 <= -(input1_buf);
       					else
       							part0 <= (others => '0');
       			end if;
       			if (input2(1)='1') then
       				if (input2(0)='1') then
       					part1 <= (others => '0');
       						else
       							part1 <= -(input1_buf);
       				end if;
       				else
       					if (input2(0)='1') then
       						part1 <= input1_buf;
       							else
       								part1 <= (others => '0');
       					end if;
       			end if;
       			if (input2(2)='1') then
       				if (input2(1)='1') then
       					part2 <= (others => '0');
       						else
       							part2 <= -(input1_buf);
       				end if;
       				else
       					if (input2(1)='1') then
       						part2 <= input1_buf;
       							else
       								part2 <= (others => '0');
       					end if;
       			end if;
       			if (input2(3)='1') then
       				if (input2(2)='1') then
       					part3 <= (others => '0');
       						else
       							part3 <= -(input1_buf);
       				end if;
       				else
       					if (input2(2)='1') then
       						part3 <= input1_buf;
       							else
       								part3 <= (others => '0');
       					end if;
       			end if;
       			if (input2(4)='1') then
       				if (input2(3)='1') then
       					part4 <= (others => '0');
       						else
       							part4 <= -(input1_buf);
       				end if;
       				else
       					if (input2(3)='1') then
       						part4 <= input1_buf;
       							else
       								part4 <= (others => '0');
       					end if;
       			end if;
       			if (input2(5)='1') then
       				if (input2(4)='1') then
       					part5 <= (others => '0');
       						else
       							part5 <= -(input1_buf);
       				end if;
       				else
       					if (input2(4)='1') then
       						part5 <= input1_buf;
       							else
       								part5 <= (others => '0');
       					end if;
       			end if;
       			if (input2(6)='1') then
       				if (input2(5)='1') then
       					part6 <= (others => '0');
       						else
       							part6 <= -(input1_buf);
       				end if;
       				else
       					if (input2(5)='1') then
       						part6 <= input1_buf;
       							else
       								part6 <= (others => '0');
       					end if;
       			end if;
       			if (input2(7)='1') then
       				if (input2(6)='1') then
       					part7 <= (others => '0');
       						else
       							part7 <= -(input1_buf);
       				end if;
       				else
       					if (input2(6)='1') then
       						part7 <= input1_buf;
       							else
       								part7 <= (others => '0');
       					end if;
       			end if;
       		out_temp <= part0+
       		(part1(14 downto 0)&'0')+
       		(part2(13 downto 0)&"00")+
       		(part3(12 downto 0)&"000")+
       		(part4(11 downto 0)&"0000")+
       		(part5(10 downto 0)&"00000")+
       		(part6(9 downto 0)&"000000")+
       		(part7(8 downto 0)&"0000000");
       		output <= out_temp(15 downto 8);
       end if;
       end process;
       END behavior;
       






    John Doe
    06:20:06pm On 2022.09.14
    japan gay teen boy chat gay chat on webcam <a href="https://free-gay-sex-chat.com/">gay teen chat groups </a>.
    John Doe
    02:41:44am On 2022.09.16
    gay priest chat <a href=https://chatcongays.com>gay chat roulette adult</a> free gay chat lines.
    John Doe
    02:19:28am On 2022.09.20
    application essay writing service <a href=https://au-bestessays.org>descriptive essay help</a> best essay writers.
    John Doe
    09:33:19pm On 2022.09.20
    custom essay writing service <a href=https://bestcampusessays.com>help writing a compare and contrast essay</a> Who wants to write my essay.
    John Doe
    11:35:10am On 2022.09.23
    buy college essays <a href=https://bestessaysden.com>custom essay meister review</a> what is the best essay writing service.
    John Doe
    01:13:32am On 2022.09.25
    essay help toronto <a href=https://bestsessays.org>affordable essay writing service</a> essay help forum.
    John Doe
    08:12:20pm On 2022.09.25
    essay writting services <a href=https://buyacademicessay.com>essay writers online</a> good essay writing website.
    John Doe
    03:51:50pm On 2022.09.26
    in an essay help you guide <a href=https://buy-eessay-online.com>essay assignment help</a> best online essay writers.
    John Doe
    10:59:22am On 2022.09.27
    premium essay writing service <a href=https://buytopessays.com>cheap essays to buy</a> essay revision help online.
    John Doe
    06:52:35am On 2022.09.28
    english essay help <a href=https://cheapessaywritingservice1.com>best essay writing service online</a> college application essay help online.
    John Doe
    02:49:16am On 2022.09.29
    help writing essays for college <a href=https://customcollegeessays.net>college application essay service</a> scholarship essay help.
    John Doe
    10:27:47pm On 2022.09.29
    which is the best essay writing service <a href=https://customessays-writing.org>essay paper writing help</a> what is the best college essay editing service.
    John Doe
    05:21:02pm On 2022.09.30
    custom essay writers <a href=https://customessaywwriting.com>national junior honor society essay help</a> help essays.
    John Doe
    11:54:07am On 2022.10.01
    essay writing help for students <a href=https://customs-essays-writing.org>best essay</a> best college essay writing services.
    John Doe
    07:26:02am On 2022.10.02
    best essay writing services <a href=https://firstessayservice.net>essay writing service recommendation</a> write my essay today.
    John Doe
    04:10:52am On 2022.10.03
    cheap custom essay <a href=https://geniusessaywriters.net>essay writing company reviews</a> law school essay writing service.
    John Doe
    02:05:38am On 2022.10.04
    essay service cheap <a href=https://howtobuyanessay.com>law school essay editing service</a> essay about service.
    John Doe
    02:00:42am On 2022.10.07
    custom essays no plagiarism <a href=https://lawessayhelpinlondon.com>best essay writer</a> write my essays.
    John Doe
    01:59:05pm On 2022.10.09
    write my essay review <a href=https://lawessayhelpinlondon.com>easy essay help</a> essay writing company.
    John Doe
    11:18:22am On 2022.10.13
    extended essay help <a href=https://writemyessaycheap24h.com>custom essays for sale</a> cheap essays.
    John Doe
    05:44:01am On 2022.11.16
    editing essay services <a href=https://au-bestessays.org>the best essay writer</a> need someone to write my essay.
    John Doe
    02:58:41pm On 2022.11.20
    best custom essay sites <a href=https://besteasyessays.org>lord of the flies essay help</a> where can i buy an essay online.
    John Doe
    10:48:01pm On 2022.11.21
    best writing paper <a href=https://bestessayreviews.net>custom essay writing</a> essay help forum.
    John Doe
    07:41:47am On 2022.11.23
    personal statement essay help <a href=https://bestessaysden.com>help writing an essay</a> essay writing websites.
    John Doe
    03:21:42pm On 2022.11.24
    best college essay help <a href=https://bestsessays.org>essays writing services</a> help writing a descriptive essay.
    John Doe
    12:38:53am On 2022.11.26
    help me write a essay <a href=https://buyacademicessay.com>write my college essay</a> buy cheap essay.
    John Doe
    09:54:39am On 2022.11.27
    argumentative essay help <a href=https://buy-eessay-online.com>top essay editing service</a> help with writing essays at university.
    John Doe
    07:08:11pm On 2022.11.28
    university essay help <a href=https://buytopessays.com>write my essays</a> custom essays service.
    John Doe
    01:42:09pm On 2023.01.25
    coursework only degree <a href=https://brainycoursework.com>design coursework</a> custom coursework.