Introduction to ASK modulation
In this post, we are going to understand the fundamental of Digital Modulation from the basic. An example of VHDL implementation of a digital modulator is given at the end of the post.
Digital Modulation technique is very important in the telecommunication world and substituted the analog modulation since is more flexible and can be implemented if a small and cheap electronics. We will focus on the implementation of the digital modulator.
SKD3013 3 Channel HD Encode Modulator
SKD19 Series 1U Rack 12CH Encode Modulator
HDMI Encoder Modulator,16in1 Digital Headend,HD RF Modulator at Soukacatv.com
The basic implementation of Amplitude-shift keying (ASK) is a form of amplitude modulation that represents digital data as variations in the amplitude of a carrier wave.
For example, the transmission of the binary symbol ‘1’ can be represented by transmitting a fixed-amplitude carrier wave and fixed frequency for a bit duration of T seconds (bit rate). If the signal value is ‘1’ then the carrier signal will be transmitted; otherwise, a signal value of ‘0’ will be transmitted.
Like AM, an ASK is also linear and very sensitive to atmospheric noise, distortions, propagation conditions so the efficiency in terms of Signal-to-Noise ratio is very low. The ASK modulation and demodulation processes are relatively inexpensive. The ASK technique is also commonly used to transmit digital data over optical fiber.
More general, ASK can be used to transmit a finite number of amplitudes, each assigned a unique pattern of binary digits. Usually, each amplitude encodes an equal number of bits.
For example, if we decide to encode 2 bit per symbol transmitted, the amplitude transmitted are:
For example, if we decide to encode 2 bit per symbol transmitted, the amplitude transmitted are:
00 => A0
01 => A1
10 => A2
11 => A3
Of course, increasing the number of different transmitted amplitude (the number of bit we transmit for each symbol), the Signal-to-noise ratio must increase.
ASK modulator architecture
· Digital source
· Bit-formatter
· Mapper
· Low-pass interpolator shaping filter
· Optional Up-converter
The digital source can be either internal or external and provides the serial bit-stream to be transmitted at bit rate Rb. The serial bit-stream is “packetized” into a meta-symbol of two or more bit, two bits in this example. The output frequency of the meta-symbols is Rb/Np, where Np is the number of bit of the meta-symbol. The meta symbols are mapped following the desired modulation scheme.
For ASK example, the input symbol is mapped in an N-BIT discrete amplitude.
In this post, we will focus on the mapper using 2 bit for the input meta-symbol and 8 bit for mapper output.
VHDL implementation of ASK mapper
The mapper can receive a 2-bit input i.e. four different meta symbols value:
· 00
· 01
· 10
· 11
The meta-symbol will be mapped into an 8-bit amplitude. The mapping scheme can be decided to maximize the channel efficiency. In this example, we will map the 4 values into 4 different equally distributed intervals. For 8 bit mapping, the possible values are 0, 1, .. 255. Dividing the interval 0..255 in 4 we get 256/4 = 64
· 00 => 63
· 01=> 127
· 10 => 191
· 11 => 255
A possible VHDL code implementation is given below:
1. library ieee;
2. use ieee.std_logic_1164.all;
3. use ieee.numeric_std.all;
4.
5. entity mapper_ask is
6. port (
7. i_clk : in std_logic;
8. i_rstb : in std_logic;
9. i_meta_sym : in std_logic_vector(1 downto 0);
10. o_mapper : out std_logic_vector(7 downto 0));
11. end mapper_ask;
12.
13. architecture rtl of mapper_ask is
14. type t_mapper_table is array(0 to 3) of integer range 0 to 255;
15. constant mapper_table : t_mapper_table := (
16. 63,
17. 127,
18. 191,
19. 255);
20.
21. signal r_meta_sym : integer range 0 to 3; -- used as mapper_table pointer
22.
23. begin
24.
25. p_mapper_ask : process(i_clk,i_rstb)
26. begin
27. if(i_rstb='0') then
28. r_meta_sym <= 0;
29. o_mapper <= (others=>'0');
30. elsif(rising_edge(i_clk)) then
31. r_meta_sym <= to_integer(unsigned(i_meta_sym));
32. o_mapper <= std_logic_vector(to_unsigned(mapper_table(r_meta_sym),8));
33. end if;
34. end process p_mapper_ask;
35.
36. end rtl;
VHDL Code for the ASK mapper
The output pattern is stored in the LUT “mapper_table”. If you need different or programmable mapping pattern the solution can be:
· Use an internal dual-port RAM
· Use a set of register
The dual port RAM approach is adopted when the number of mapper symbols is huge (greater than 8 – 10 or more), the register is used otherwise.
In Figure2 is reported a simulation of the mapper behavior when the input meta-symbol is cycling 0,1,2,3,0,…
Figure 2 – ModelSim Mapper simulation
Simplified implementation of ASK modulator
In Figure 3 is shown a simplified architecture of an ASK modulator. In the architecture, no shaping filter is present. The modulator is implemented using a Mapper, and up-converter. The up-conversion is implementer multiplying the mapper output with a digital generated sine waveform. In the example, we will use the dds_sine sine waveform generator implemented in this post.
The VHDL code of ASK modulator multiplies the mapper output by sine wave generated by dds_sine in the process “p_mapper_ask_simple”. When you multiply two integer number of N and M bit, the result is N+M bit. In this case, the mapper output is 8 bit unsigned, so if we want to multiply two number the first signed (sine wave) by the second unsigned (the mapper output) we need to add the sign bit to the unsigned number. Of course, the sign bit will be zero because the mapper output is always positive. In this case, the result will be N+M+1 as inline 66 of the VHDL code for the modulator below.
1. library ieee;
2. use ieee.std_logic_1164.all;
3. use ieee.numeric_std.all;
4.
5. entity modulator_ask_simple is
6. port (
7. i_clk : in std_logic;
8. i_rstb : in std_logic;
9. i_sync_reset : in std_logic;
10. i_fcw : in std_logic_vector(31 downto 0);
11. i_start_phase : in std_logic_vector(31 downto 0);
12. i_meta_sym : in std_logic_vector( 1 downto 0);
13. o_molulator : out std_logic_vector(11 downto 0));
14. end modulator_ask_simple;
15.
16. architecture rtl of modulator_ask_simple is
17.
18. component mapper_ask
19. port (
20. i_clk : in std_logic;
21. i_rstb : in std_logic;
22. i_meta_sym : in std_logic_vector(1 downto 0);
23. o_mapper : out std_logic_vector(7 downto 0));
24. end component;
25.
26. component dds_sine
27. port(
28. i_clk : in std_logic;
29. i_rstb : in std_logic;
30. i_sync_reset : in std_logic;
31. i_fcw : in std_logic_vector(31 downto 0);
32. i_start_phase : in std_logic_vector(31 downto 0);
33. o_sine : out std_logic_vector(13 downto 0));
34. end component;
35.
36. signal w_sine : std_logic_vector(13 downto 0);
37. signal w_mapper : std_logic_vector( 7 downto 0);
38. signal r_molulator : signed(11 downto 0);
39. signal r_upconverted : signed(22 downto 0); -- 14 + 8 + 1 bit sign always '0'
40.
41. begin
42. o_molulator <= std_logic_vector(r_molulator);
43.
44. u_mapper_ask : mapper_ask
45. port map(
46. i_clk => i_clk ,
47. i_rstb => i_rstb ,
48. i_meta_sym => i_meta_sym ,
49. o_mapper => w_mapper );
50.
51. u_dds_sine : dds_sine
52. port map(
53. i_clk => i_clk ,
54. i_rstb => i_rstb ,
55. i_sync_reset => i_sync_reset ,
56. i_fcw => i_fcw ,
57. i_start_phase => i_start_phase ,
58. o_sine => w_sine );
59.
60. p_modulator_ask_simple : process(i_clk,i_rstb)
61. begin
62. if(i_rstb='0') then
63. r_upconverted <= (others=>'0');
64. r_molulator <= (others=>'0');
65. elsif(rising_edge(i_clk)) then
66. r_upconverted <= signed(w_sine) * signed('0'&w_mapper);
67. -- 12 MSB; bit 22 and bit 21 are always the same
68. r_molulator <= r_upconverted(21 downto 10);
69. end if;
70. end process p_modulator_ask_simple;
71.
72. end rtl;
VHDL code for a simplified ASK modulator
Since the modulator output is 12 bit, we need to take the most significant bit of the multiplication. In this case, we need to pay attention, the first two MSB of the multiplication result are always equal since we have added the sign bit equal to zero to the mapper output.
The output bit selection will be as line 68 where we select bit 21 down to 10 i.e. the instead of 22 down to 11 because of bit 22 and bit 21 are always the same as clear in the simulation results of FIGURE where the bit 22 and bit 21 of the “r_upconverted” signals are always the same.
The output bit selection will be as line 68 where we select bit 21 down to 10 i.e. the instead of 22 down to 11 because of bit 22 and bit 21 are always the same as clear in the simulation results of FIGURE where the bit 22 and bit 21 of the “r_upconverted” signals are always the same.
Layout on FPGA
In #Figure 5 is reported the layout report of the modulator implemented above. The FPGA is the Cyclone III present in the Altera DE0 board. As clear from the report the modulator uses the internal RAM to implement the sine wave for the up-conversion and the resource required are low: less than 1% of the (small) FPGA. The working frequency is about 200 MHz.
Figure 5 – ASK Modulator FPGA layout report on Cyclone III EP3C16F484C6.
Conclusion
In this post, we developed a simple APK modulator in VHDL. The VHDL code example for the modulator has been simulated and implemented in a Cyclone III Altera FPGA. You can use this baseline to implement your custom digital modulator in VHDL.
Established in 2000, the Soukacatv.com main products are modulators both in analog and digital ones, amplifier and combiner. We are the very first one in manufacturing the headend system in China. Our 16 in 1 and 24 in 1 now are the most popular products all over the world.
For more, please access to https://www.soukacatv.com.
CONTACT US
Dingshengwei Electronics Co., Ltd
Company Address: Buliding A,the first industry park of Guanlong,Xili Town,Nanshan,Shenzhen,Guangdong,China
Tel : +86 0755 26909863
Fax : +86 0755 26984949
Phone: +86 13410066011
Email:ken@soukacatv.com
Skype: soukaken
Website: https://www.soukacatv.com
Source: surf-vhdl
没有评论:
发表评论