UNIVERSITY OF HERTFORDSHIRE Faculty of Engineering & Information Sciences MSc in Data Communication and Networks Project Report IMPLIMENTATION OF COMPLIMENTARY CODE KEYING MODULATION USING SIMULINK Submitted by: Ibrahim Badshah Supervisor: Dr. Baochun Hou September 2008 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report DECLARATION I certify that the work submitted is my own and that any material derived or quoted from the Published or unpublished work of other persons has been fully acknowledged (ref. UPR AS/C/6.1, section7 and UPR AS/C/5, section 3.6) Ibrahim Badshah Registration No. 07156660 1-September- 2008 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink i School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report ABSTRACT As today’s world is making transition from wired to wireless, Wireless Local Area Networks (WLANs) are providing ubiquitous communication capability and information access regardless of location. There are different aspects which make these LAN’s to perform smoothly. One of them is modulation techniques implemented in WLAN. This project presents performance and working of complementary Code keying, which is used in WLAN 802.11b. Complimentary code performs an important role in WLAN 802.11b which allow WLAN to work upto 11MHz. Three factors are incorporated in the design. First a clear understanding towards working of Complimentary Code keying, second to design a model using Simulink a Mathworks Software which will allow to analyse the CCK modulation and performance in real world and last to verify the outputs from the Simulink model. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink ii School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report ACKNOWLEDGEMENT “Inspiration and guidance are valuable in all process of life especially when we come to the academic stage” Firstly I express my heartiest devotion to the “Almighty Allah” and his graceful blessing at every step without which nothing could have been accomplished. I bow my head towards him for bestowing me with an instinct for exploration, without this will and blessings this would not have been worked out. By the grace of Almighty and blessings of Elders, I am able to present this small piece of study. I hereby take this opportunity to pay my regards and appreciation to the all whose contribution in the completion of this work has been unforgettable. My special regards to Dr. Sayedna Mohammed Burhanuddin Saheb (T.U.S) for his blessings, and prays which supports me as a backbone in every part of life. And special thanks to his family members to consider me and provide a great scholarship which makes for me to this degree. It gives me immense pleasure to record my profound and heartfelt thanks to my Supervisor Dr. Baochun Hou. His inspiring and impeccable guidance, eloquent supervision, constructive criticism, deep sensitivity, unending encouragement and unfailing cooperation helped me not only during the course of this investigation but throughout my degree course. I am really unable to find adequate words to express my feelings on this paper for my parents. My special regards & gratitude to my parents Mr. N. Husain Badshah and Mrs. Arwa Badshah and my sweet sister Fatema for their blessings, encouragement, help, support at each and every step of my life, thanks to make me what I am today, which rendered it possible to complete the present meticulous study. Heartfelt thanks to all my friends and colleagues for their assistance support and kind cooperation throughout my degree and also in completing this difficult task. Lastly I want to thanks each and every person from Staff Member or part of this university and department to give life to such a great degree and for making bright futures. Sincere Hats off to everyone. Date: 01/Sep/2008 Ibrahim Badshah Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink iii School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report TABLE OF CONTENTS DECLARATION......................................................................................................................................i ABSTRACT ........................................................................................................................................... ii ACKNOWLEDGEMENT....................................................................................................................... iii LIST OF TABLES ................................................................................................................................. vi LIST OF FIGURES .............................................................................................................................. vii ABBREVIATIONS & A CROWNS ...................................................................................................... viii INTRODUCTION.................................................................................................................................. 1 1.1 Introduction ................................................................................................................... 1 1.2. Motivation ..................................................................................................................... 2 1.3 Challenges .................................................................................................................... 2 1.4 Aims & Objectives ......................................................................................................... 2 1.5 Project Plan ................................................................................................................... 3 1.5.2 PROJECT OUTLINE .............................................................................................. 3 1.5.2 GANTT CHART...................................................................................................... 3 1.5.3 PROJECT BUDGET & RESOURCES REQUIRED ............................................... 4 1.6 Report layout ................................................................................................................. 4 1.7 Summary ....................................................................................................................... 4 REVIEW OF LITERATURE.................................................................................................................. 5 2.1 BACKGROUND STUDIES ............................................................................................ 5 2.2 What is a WLAN? .......................................................................................................... 5 2.3 Advantages and disadvantages of WLAN .................................................................... 6 2.4 WIRELESS LAN STANDARD ....................................................................................... 7 2.4.1. IEEE 802.11a Standard ........................................................................................ 7 2.4.2. IEEE 802.11b ........................................................................................................ 8 2.4.3. IEEE 802.11g ........................................................................................................ 9 2.5. Modulation Schemes ................................................................................................... 9 2.5.1. PHASE MODULATION: ........................................................................................ 9 2.5.2. OFDM: ................................................................................................................. 11 2.5.3. DSSS .................................................................................................................. 11 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink iv School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 2.6. COMPLIMENTARY CODE KEYING.......................................................................... 12 2.6.1. CCK BACKGROUND .......................................................................................... 12 2.6.2. BINARY COMPLIMENTARY CODE ................................................................... 13 2.6.3 POLYPHASE COMPLIMENTARY CODE ........................................................... 14 2.6.4. CCK MODULATION............................................................................................ 14 2.7. SIMULINK AND MATLAB .......................................................................................... 16 IMPLIMENTATION............................................................................................................................. 18 3.1. Introduction ................................................................................................................ 18 3.2. GENERATE PHASE PARAMETER........................................................................... 19 3.2. CCK COMPLEX CODE GENERATOR ..................................................................... 23 RESULTS AND DISCUSSION .......................................................................................................... 26 4.1. INTRODUCTION........................................................................................................ 26 4.2. CALCULATION .......................................................................................................... 26 4.3. Results ....................................................................................................................... 28 CONCLUSION AND FUTURE WORK............................................................................................... 30 5.1 Conclusion .................................................................................................................. 30 5.2. FUTURE WORK ........................................................................................................ 31 REFERENCES ................................................................................................................................... 32 BIBLIOGRAPHY ................................................................................................................................ 34 APPENDICIES ................................................................................................................................... 35 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink v School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report LIST OF TABLES Table 2.1 Comparison between Wireless 802.11 Standards............................................................... 9 Table 2.2 The OFDM modulation scheme ......................................................................................... 11 Table 2.3 Results of element paring for sequence 1 and 2 ............................................................... 13 Table 3.1 DQPSK Encoding Table .................................................................................................... 18 Table 3.2 QPSK Encoding Table ....................................................................................................... 19 Table 4.1 CCK codes calculated from the obtained phase parameters ............................................ 28 Table 4.2 CCK codes obtained from Simulink CCK modulator model .............................................. 28 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink vi School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report LIST OF FIGURES Figure 2-1 Binary Phase Shift Keying [11] ......................................................................................... 10 Figure 2.2 Quadrature Phase Shift Keying [11] ................................................................................. 10 Figure 2.3 OFDM frequency overlapping [12] .................................................................................... 11 Figure 2.4 Sequence 1 and sequence 2 [15] ..................................................................................... 13 Figure 2.5 Comparing Walsh and Complementary codes [17] .......................................................... 15 Figure 2.6 The Makeup of the four modulation Techniques and respective data rates .................... 16 Figure 3.1: Simulink Model to Generate Phase Parameter for CCK Modulator ................................ 20 Figure 3.2 Simulink Model to Generate CCK code from Phase Parameter ...................................... 24 Figure 4.1 Showing the signal field of real value CCK code generated CCK modulator ................... 29 Figure 4.2 Showing the signal field of complex value CCK code generated CCK modulator ........... 29 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink vii School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report ABBREVIATIONS & A CROWNS ADC : Analogue to digital converter ADSL : Asymmetric digital subscriber line ADS : Advanced design system APs : Access points AWGN : Additive white Gaussian noise BPSK : Binary phase shift keying CCA : Clear Channel Assessment CCK : Complementary code keying DSSS : Direct sequence spread spectrum ED : Energy Detection FEC : Forward error correction FFT : Fast Fourier transforms FHSS : Frequency hopping spread spectrum HR/DSSS : High Rate direct sequence spread spectrum IEEE : Institute of electrical & electronic engineering IFFT : Inverse Fast Fourier Transform LOS : Line-of-sight MAC : Medium access control MPDU : MAC Protocol Data Unit OFDM : Orthogonal Frequency Division Multiplexing PER : Packet-error-rate PHY : Physical layers PLCP : Physical Layer Convergence Procedure PLME : Physical Layer Management Entity PMD : Physical Medium Depended PSDU : PLCP Service Data Unit PPDU : PLCP Protocol Data Unit QAM : Quadrature amplitude modulation QPSK : Quadrature phase shift keying SIR : Signal-to-interference ratio SNMP : Simple Network Management Protocol SNR : Signal to noise ratio WLAN : Wireless Local Area Network Wi-Fi : Wireless fidelity Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink viii School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report CHAPTER 1 INTRODUCTION 1.1 INTRODUCTION Communication is a vital part of human life, in which computer communication plays an extremely important role. [1] Today local area network is so popular that it plays a role of heart in whole communication system. The days are gone when you’ve to drill through walls to install a network; they are now replaced with wireless networks. Wireless communication plays a crucial role in networks as they offer solutions to provide mobility and services where the installation of a complex wired infrastructure is not possible. With the exponential growth of wireless communication, a variety of wireless devices have emerged. These devices operate on licence free frequencies such as 2.4GHz and their technologies are governed by factors such as range, capacity, spectrum availability, link quality and cost. [2] In 1997, the IEEE Institute of Electrical and Electronics Engineers, Inc, released 802.11 standards for wireless LANS, defining 1 and 2 Mbps speeds [3]. But the major problem which wireless transmission was facing while dealing with physical layer were bandwidth allocation, external interference and reflections. But in September 1999 it was ratified with 802.11b “high rate” amendment to the standard which added two higher speeds 5.5 and 11Mbps to 802.11[5] standard. A new modulation method called Complementary Code Keying is used in this, which modulates 8 bits on each symbol. With the changes made only to the physical layer, 802.11b became a particular version of the wireless LAN specification that runs on the 2.4GHz spectrum at high speed. [2] CCK is an M-ary Orthogonal Keying modulation where one of M unique (nearly orthogonal) signal codewords is chosen for transmission. The spread function for CCK is chosen from a set of M nearly orthogonal vectors by the data word. CCK uses one vector from a set of 64 complex (QPSK) vectors for the symbol and thereby modulates 6-bits (one-of-64) on each 8 chip spreading code symbol. [17] Two more bits are sent by QPSK modulating the whole code symbol. This results in modulating 8-bits onto each symbol. The formula that defines the CCK codewords is 𝑐 = {𝑒 𝑗(𝜑1 +𝜑2+𝜑3 +𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑3+𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑2+𝜑4 ) , −𝑒 𝑗(𝜑1 +𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑2 +𝜑3) , 𝑒 𝑗(𝜑1 +𝜑3 ) , − 𝑒 𝑗(𝜑1 +𝜑2 ) , 𝑒 𝑗𝜑1 } Equation 1.1 Overall there are 4 phase terms. One of them modulates all of the chips and this is used for the QPSK rotation of the whole code vector. The 3 others modulate every odd chip, every odd pair of chips and every odd quad of chips respectively. [1][17][5][6] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 1 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 1.2. MOTIVATION The impact of Wireless Local Area Networks (WLAN) has significantly increased in the last years offering flawless integration of wireless terminals nearly anywhere without restriction and access. The high efficacy of 802.11b was possible due to higher susceptibility to interference between I and Q channels and higher throughputs of data rate i.e. 11 Mbps are the key of its success. However utilizing the capabilities of the system in providing a better service to the end user has been a huge concern. Improper network planning, security concerns, higher bandwidth requirements are the areas that are being worked on in both the academia and the industry.[2] 1.3 CHALLENGES The main challenging issue for any application is to provide better Quality of Service (QoS) to all its belonging users. This transmitter of CCK modulation is primarily design as per standard specifications but there are lot of challenges to face for a developed efficient wireless system. Here are some factors that need to be considered in designing better systems. i. Spectrum Use: - A clear understanding of the traffic sources in the network as it operates on the frequency bands of 2.4 GHz. ii. Wireless Medium Unreliability: - The design should account for the limitations of the propagation subject to significant attenuation and distortion due to a number of issues, interference, reflections and relative movement of transmitter. iii. Compatibility: - Ensure backward compatibility with the installed and currently running Wi-Fi base. iv. Power Management: - Since the wireless is powered by batteries they require regular recharge to their finite storage capacity hence a burden for frequent recharging. The traffic generated in the system can be understood by studying the application needs of the users in the system. The main aim of this project was to develop a CCK modulation using Simulink simulation which will overlay the performance of the standard end user. [2] 1.4 AIMS & OBJECTIVES Objectives are those which are simple, measurable, achievable, relevant and time constrained. The objectives of this research project were To design, implement and investigate theory and algorithms of Complementary Code Keying (CCK) modulation using Simulink in fixed-point operation. Design CCK based modulation circuits using Simulink. To gain research and analytical skills through lab work, reading, research and experimental analysis. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 2 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Describe functionality of the Simulink blocks, achieve results as per standards specifications and recording & analysing the results. Test properties and parameters of CCK Modulator by using Simulink & MATLAB software simulation. Self capacity development of knowledge, presentation and design skills to present organised written report on this project. 1.5 PROJECT PLAN 1.5.2 PROJECT OUTLINE This project was subdivided into several parts. The first stage was project realisation and research where in-depth research was done to gain the knowledge of IEEE 802.11b standard and about CCK modulation used under it. A vast amount of research has to be done within each and every major and minor blocks as this area was totally new specially CCK was never been looked up before. Once the basic understanding was clear, the next and crucial stage was to get familiar with Simulink and Matlab environment as these software were also been never used before. Further, procedure was to start building up the simulation for CCK model and try to achieve the results as per requirement. Each and every part of the model should be synchronized and should work properly, and finally was to analyse and record the outputs from the simulation with the given inputs and to verify them that the model generates the accurate required CCK codes. As soon as the practical work was done successfully, a detailed project report has to be compiled about the whole project along with the procedure carried out on each and every stage as well as the final outcomes. 1.5.2 GANTT CHART A Detailed time plan of all the major stages of work for this project was illustrated within a Gantt chart. Time distribution was carefully done as each stage had to have enough time in order to successfully complete the specific section, making sure that nothing was left out in rush. Some of the sections such as familiarization with Simulink, design and development took longer than anticipated compared to the first Gantt chart. The major reason being the Simulink software tool, as it was totally new platform and was never used or even been seen before. Hence development and testing stages were extended compared to previously expected time schedule. The Gantt chart played a very important and crucial role in the completion of project. As proper time management makes a difference between successful project to the one that is not completed successful and left unfinished. The revised Gantt chart was prepared and project was completed on its proper time period. [Appendix 1] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 3 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 1.5.3 PROJECT BUDGET & RESOURCES REQUIRED The budget of this project was set to £50 by the university. However it was not used as all the major necessary software’s were readily available within university. It was confined to Simulink software simulation and there were no other resources required except for the following Mathworks Simulink & Matlab software Microsoft office Computer (a PC) or a lap top 1.6 REPORT LAYOUT This chapter presents a brief introduction and gives details of what the project is about including aims & objectives, outline of the Project and the organisation of this report. Chapter 2: Literature review This chapter contains brief information related to WLAN and wireless technologies, their uses, advantages and disadvantages. More emphasis is towards 802.11b and Complimentary code keying. Finally a brief section also contains an analysis of the Mathworks Simulink and Matlab software which is to be used. Chapter 3: Implementation This chapter describes the implementation stage of the project. It discusses in detail how the project was developed using different blocks in Simulink. Chapter 4: Results and Discussion This chapter covers all the procedures of recording outputs, calculations and comparison of results with required data, and discussion related to the results and performance. Chapter 5: Conclusion and Future work This chapter contains conclusion, the overall view of the project work, a discussion for the future development of the project, and finally References Bibliography and appendices. 1.7 SUMMARY This chapter briefly introduces the CCK modulation and flow of project work to create a CCK modulator. The CCK modulation scheme is used to raise the overall capacity of WLAN 802.11b offering solutions for using scarce frequency resources including better flexibility, mobility, and increased efficiency. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 4 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report CHAPTER 2 REVIEW OF LITERATURE 2.1 BACKGROUND STUDIES Wireless technology is evolving and capturing the market due to interoperability, robustness and cost effectiveness having features of power management, time bounded services and security mechanism offering both productivity and convenience over wired networks. It has been one of the fastest growing segment and covering the market of wired network services as they are forces driving the rapid growth of Wireless LAN such as increased use of laptops, personal digital assistants (PDAs) and rapid advances in WLAN data rates. The IEEE 802.11b standard was approved in 1999 and its technology satisfies the market demands economically while remaining compatible with installed mainstream product.[2] The WLAN technology is standardized by the IEEE 802.11 committee which employs MAC (Medium Access Control). The medium access protocol allows station to support different sets of data rates. All stations are able to transmit all the data rates in a specified parameter as preamble and header are used to minimise overload and maximize the network data throughput. [9] The ever increasing multimedia applications have created a vast demand for tether less access to computing resources that even exceeds the supply. Though instead of using infrared light (IR) wireless LAN works on the unlicensed radio frequencies which are more widely used and have longer range. The IEEE 802.11b provides 4 PHY data rates from 1 Mpbs to 11 Mbps using the unlicensed ISM band of 2.4GHz. Due to its vast advance feature most of the devices available today in the market are based on this PHY. The key contribution of the 802.11b addition to the WLAN standard was to standardize the PHY support of two new speeds, 5.5 Mbps and 11 Mbps. Though it also work on 1 and 2 Mbps when devices move beyond the transmission range of 11 Mbps but it rolls back when they move in high transmission range IEEE 802.11b. The key feature of 802.11b is its modulation technique i.e. complimentary code keying (CCK) modulation. CCK is a form of M-ary code word modulation where one of set of M unique signal codewords is chosen for transmission. This provide 802.11b to work on data rate of 11MHz. 2.2 WHAT IS A WLAN? As the name suggest a WLAN wireless local area network is two devices such as computers, mobile or any other access point or mobile node joint together without any physical wired connection using wireless transmission medium. WLAN utilizes spread spectrum (DSSS) or OFDM modulation technology based on radio waves to enable communication between devices, also known as the basic service set. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 5 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report To work under wireless network each node is required to have a network interface card (NIC) either built in or installed separately. These devices then can be configured under two modes, Ad hoc mode and infrastructure mode. Ad hoc network are one of the simplest form of network which is a peer to peer network is form. As only mobile node take part in the network, they have to do all the medium access mechanism, which make network complex and lots of overhead on packets. Also the nodes have to deal with the hidden and exposed terminal problems. [2] Infrastructure mode is more efficient and it consists of one or more access points (AP) with a central server or hub, which works as the heart of the network. The design of infrastructure based wireless networks is much simpler and all the network functionality lies within the access point. 2.3 ADVANTAGES AND DISADVANTAGES OF WLAN As per the name the major advantage of wireless LAN is mobility, but also there are many other advantages related to building and maintaining a wireless network over a wired LAN: Mobility: - mobility is one of the significant advantages of WLAN. Users can access shared resources without looking for a place to plug in. This wireless network allows user to move at any place anywhere as long they are under network coverage area. Range of Coverage: - Most of the wireless systems use radio frequency, as radio waves can penetrate many indoor walls and surfaces. Normally the range of wireless devices is about 100m but it can be increase to any number by adding more and more access points in such a way that their coverage overlaps each other, which results in providing users a free roaming facility maintaining the seamlessly connection between his node and different access points. Ease of use: - WLAN are very easy to use and the users need to know a very little new information to take advantage of WLAN. Mainly the user has to know only about the setting up a connection and logout from the connection after use. It is quicker and easier to add or move devices on the network (for wired network it can be difficult to move and expensive to change.) Flexibility: - Accessing networks from anywhere giving users the freedom of roaming when and where it is needed and ability of frequency re-use provide more and more users can get connected to a single wireless network without any lack of resources. Robustness: - Networks can withstand disasters and easily created very quickly and relatively easily as compared to the wired one, where the cost of installing and maintaining a WLAN is on average lower than the cost of installing a traditional wired LAN. Scalability: - wireless networks can be designed to be extremely simple or complex. It is quicker and easier to provide network connectivity to areas where it is difficult to drill through walls or undesirable to lay cable. Also it can support a large number of nodes and physical area can be extended by adding more and more access points. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 6 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Above all the advantages, the wireless LANs are a main part of all portable devices such as PDA’s mobiles laptops. They can also be used for Ad-hoc networking to set up peer to peer temporarily link to meet some immediate needs such as conference meeting or to set up networks during military applications. As each and every application has two faces with lots of advantages of wireless networks there are some of disadvantages as well. As the network demand and use increases, the device data transfer rate decreases accordingly due to delay & errors leading to increased error rates. Today’s wireless standards are dynamically changing faster than wired standards resulting frequent changes and higher costs. Whereas after coming out with lots of standard and solutions for a fast speed network, still the users on wireless network have to share the bandwidth typically 11Mbps or 54mbps, while comparing to the wired hub most of the user can use its complete bandwidth typically 10Mbps or 100Mbps. Looking towards the security side the wireless networks are as secure as the wired one. It’s probably quite easy to pick up all the wireless traffic sitting in the wireless network and to crack or create a eavesdropping under the system. The limitation to distance between node, access point and base station is one of the major drawbacks of wireless system. For example the 802.11b base station has a range of only 300 feet which is quite less to withstand between current building infrastructures. As the devices are restricted to the standard regulation they provide poorer performance when they work out of their limitations. 2.4 WIRELESS LAN STANDARD The increasing market demand for higher data rate wireless LANs motivates the search towards new and improved signalling waveforms and receiver architectures. [3] The wireless standards have gone through many iterations and expansions over the years and the IEEE has certified the standards specifications including the 802.11a, 802.11b and 802.11g[2]. IEEE 802.11 is not the only group setting standards for wireless LANs; there are other standards efforts like Bluetooth, Home Radio Frequency Working Group and Personal Area Networks that deal to define WLANs for various activities. But 802.11 is the only one addressing high data rates for building wide networks. The goal of WLANs is to replace cabling, enable tether less access to the internet and introduce a higher flexibility in communications. [3] 2.4.1. IEEE 802.11a Standard IEEE 802.11a is a family member of IEEE 802.11 and amendment to the original standard was ratified in 1999, providing a higher throughput of 54Mbps by using 5 GHz band [7]. This model has the advantage of better interference immunity and High speed Physical Layer standard, which Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 7 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report uses Orthogonal Frequency Division Modulation (OFDM) system to provide a WLAN with different data rates ranging from 6 to 54 Mbps [2][8]. The operating frequencies of 802.11a fall into 5.155.25GHz, 5.25-5.35GHz, and 5.725-5.825GHz which are unlicensed national information structure (U-NII) bands. It accommodates OFDM PHY which is a multicarrier transmission technique for high speed bidirectional wireless data communication effectively squeezes multiple modulated carriers tightly together, reducing the required bandwidth but keeping the modulated signals orthogonal so that they do not interfere with each other. The OFDM system provides with payload communication capabilities of 6,9,12,24,36,48, and 54 Mbps. The system uses 52 subcarriers that are modulated using binary or quadrature phase shift keying (BPSK/QPSK), 16-QAM or 64-QAM. [9][2] 2.4.2. IEEE 802.11b This standard is most popular and successful version of IEEE 802.11. According to the IEEE 802.11b standard, the transmitter is a Direct Sequence Spread Spectrum Phase Shift Keying (DSSS PSK) modulator, which is capable of handling four data rates: 1, 2, 5.5 and 11 Mbps, which are produced by varying the modulation and the channel coding using 2.4GHz frequency band [11]. Spread-spectrum signalling also reduces interference between different systems that might share same frequency band as this frequency is also used by microwaves and cordless phones. The data rate of 1 Mbps uses differential binary phase shift keying (DBPSK) modulation. Every transmitted bit is encoded (spread) into an 11-chip Barker symbol and transmitted at 11Mbps for consequent data rate of 1Mbps. whereas for 2Mbps Differential Quadrature Phase Shift-Keying (DQPSK) modulation is used. A pair of transmitted bits is encoded (spread) into two 11-chip symbols, generated by the Barker code. Chips are transmitted at 11Mbps for consequent data rate of 2Mbps. The higher data rate of 5.5 and 11Mbps uses Complementary Code Keying (CCK) modulation. CCK is a form of Mary Bi-Orthogonal Keying (MQBOK). To reach the data rate of 5.5Mbps every 4 transmitted bits are encoded (spread) into 8-chip symbol. Each symbol is generated by a Walsh code. Chips are transmitted at 11Mbps for consequent data rate of 5.5Mbps. To reach the data rate of 11Mbps every 8 transmitted bits are encoded into an 8-chip symbol.[11] The key features of the standard are: Supports both Infrastructure and Ad hoc mode of Operation. The PHY layer defines three physical characteristics for wireless local area networks: frequency hopping spread spectrum (FHSS), diffused infrared, and direct sequence spread spectrum (DSSS) The WLAN nodes operate in power save mode informing the AP by using the power management bits within the frame control field of the transmitted frames [2] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 8 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 2.4.3. IEEE 802.11g The IEEE 802.11g is based on the combination of 802.11a and 802.11b standards and capable of operating in single-carrier and multi-carrier modes by Combining both DSSS and OFDM through the provision of four different physical layers that’s ERP (Extended Rate PHY)- DSSS/CCK, ERPOFDM, ERP-PBCC and CCK-OFDM handling BPSK, DBPSK, QPSK, DQPSK, 8-PSK, 16QAM, and 64-QAM modulation schemes [10] Table 2.1 Comparison between Wireless 802.11 Standards Protocol Release Freq (MHz) Max Bit rate Band Modulation 802.11 1997 2412-2484 2 Mbps 802.11a 1999 5160-5805 6-54 Mbps UNII OFDM 802.11b 1999 2412-2484 1-11 Mbps ISM DSSS-CCK 802.11g 2003 2412-2484 6-54 Mbps ISM OFDM 802.11g 2003 2412-2484 1-11 Mbps ISM CCK 2.5. MODULATION SCHEMES All WLAN devices must have the capability to encode and decode digital information from an analog carrier signal to prepare it for transmission and a reverse process for reception, much like the functionality of a modem. The conversion process requires modulation techniques that can efficiently convey digital information in analog form. To perform this efficiently, some of the modulation techniques are OFDM and DSSS/CCK which is mainly used in WLAN 802.11.[11] 2.5.1. PHASE MODULATION: The current and efficient modulation technique to convert digital signal in WLAN is Phase modulation. Signal strength is used in AM whereas FM converts the originating signal into cycles to send information. Phase modulation takes advantage of a signal wave’s shape. A continuous sine wave is ideal for sending digital information. The different phases and angles give rise to different ways of sending information. [11] Simple phase modulation schemes begin by encoding a digital stream of bits onto an unchanging analog waveform. There is now a rising and falling pattern, in tune with the 0s and 1s. This pattern is also referred as on-and-off amplitudes. Binary phase shift keying (BSPK) is an example of this type of modulation. BPSK uses one phase to represent a binary 1 and another phase to represent a binary 0 for a total of two bits of binary data (Figure). This is utilized to transmit data at 1 Mbps. [11] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 9 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Figure 2-1 Binary Phase Shift Keying [11] To accommodate the need to carry greater amounts of information more complex technique in the waveform was needed. With QPSK, the carrier undergoes four changes in phase and can therefore represent four or eight binary bits of data. This scheme, used in most high-speed modems, increases the speed and amount of data transferred by doubling the two states BPSK offers to at least four states to send information. QPSK manipulates a sine wave’s normal pattern by shifting its alternation and forcing the wave to fall to its baseline resting point. By forcing this abrupt drop, we can increase the amount of information conveyed in the wave. [11] In QPSK, the portion of the phase from 0 degrees to 90 degrees might represent binary digit 0, 90 degrees to 180 degrees could represent binary digit 1, and 180 to 270 degrees and 270 back to 0 degrees might be represented by binary digits 10 and 11, respectively. The wireless radio configured for QPSK arranges a forced shift in the sine wave at each point that a bit or set of bits is transmitted. The receiving wireless radio expects these shifts and decodes them in the proper sequence. QPSK is utilized to transmit data at 2 Mbps. [11] Figure 2.2 Quadrature Phase Shift Keying [11] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 10 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 2.5.2. OFDM: OFDM is a form of multicarrier modulation which splits the message to be transmitted into a number of parts. A large number of closely-spaced orthogonal sub-carriers are used to carry data. The available spectrum uses a large number of small overlapping channels to transmit the data to be conveyed utilizing up to 54 Mbps data rates in the 2.4GHz for 802.11g and 5GHz for 802.11a bands. OFDM reduces spectrum wastage by dividing the message to be transmitted into a number of frequency carriers and spacing these carriers very close to each other as shown in figure 3. The scheme makes more efficient use of the scarce frequency spectrum, working more likely as FDMA where multiple user access is achieved by the subdividing the available bandwidth into multiple channel, which are then allocated to users [2]. Figure 2.3 OFDM frequency overlapping [12] Table 2.2 The OFDM modulation scheme offers eight PHY modes with different modulation scheme and coding rates MODULATION NOMINAL DATA RATE CODE RATE BPSK 6 Mbps 1/2 BPSK 9 Mbps 3/4 QPSK 12 Mbps 1/2 QPSK 18 Mbps 3/4 16QAM 24 Mbps 1/2 16QAM 36 Mbps 3/4 64QAM 48 Mbps 2/3 64QAM 54 Mbps 3/4 2.5.3. DSSS Compare with traditional transmission systems, Direct Sequence Spread Spectrum (DSSS) uses a signal bandwidth that is much broader than the information signal bandwidth. A wide band signal is generated by multiplying the narrowband information signal with a binary code, also known as a spreading code, to generate the wideband signal that is transmitted. On the receiver hand the original information signal can be recreated by multiplying the received wideband signal by the same binary code (de-spreading code) used to generate the wideband transmitted signal. In order to Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 11 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report recover the intelligence the spreading and de-spreading codes must be synchronised and amplitude should match with each other.[13] DSSS transmission technology is now being applied to multiuser transmission systems such as WLAN and cellular systems. DSSS spreads signals across a broad band of radio frequencies simultaneously in order to keep power densities low and protect against narrowband interference; it operates on data frames of 1, 2, 5.5, and 11 Mbps rates in the 2.4 GHz ISM band. The bit in the original signal is represented by multiple bits in the transmitted signal, using a spreading code. It combines the digital information stream with the spreading code bit stream using an exclusive-OR (XOR) of the data bits. It uses differential binary phase shift keying (DBPSK) for 1Mbps transmission and different quadrature phase shift keying (DQPSK) for 2 Mbps as modulation schemes.[2] To achieve higher data rate, complementary code keying (CCK) is used for 5.5 and 11 Mbps that uses 8- chip complementary code keying. It enables higher data rates of 5.5 Mbps and 11Mbps, the higher data rate capability is known as Higher Rate DSSS (HR/DSSS). The chipping rate is same as the DSSS system and therefore provides the same occupied channel bandwidth. The basic high Rate PHY uses the same preamble and header as the DSSS PHY, so both PHYs can coexist in the same BSS and can use the rate switching mechanism as provided. [2] [14] 2.6. COMPLIMENTARY CODE KEYING Complementary Code Keying (CCK) was developed by Intersil and Lucent Technologies for use at 2.4 GHz for the IEEE 802.11 standard. The CCK waveform is based on complementary codes which have been first used in RADAR and multi-slit spectrometry applications. To get the speed like Ethernet on WLAN the IEEE 802.11 standards board has approved a higher rate extension to the physical layer of the 802.11 WLAN systems. It was directed towards free worldwide available 2.4 GHz ISM band offering 83.5 MHz of spectrum into which up to 3 channels can be implemented. Several competing companies proposed modulations for the high rate application such as M-ary Bi-Orthogonal Keying (MBOK), Barker Code Pulse Position Modulation (BCPM), Orthogonal Frequency Division Multiplex (OFDM), Packet Binary Convolutional Coding, and Orthogonal Code Division Multiplex (OCDM). But finally Intersil and Lucent Technologies joined forces and developed the compromise approach based on complementary Code Keying (CCK). In Sept 1998 the 802.11 standards committee adopted CCK as the basis for the high rate physical layer extension to deliver data rates of 11Mbps. It was adopted because of its high interoperability with existing 1 and 2 Mbps networks at same bandwidth and same preamble and header. [3] 2.6.1. CCK BACKGROUND The subject of CCK modulation is somewhat esoteric in that it is not found in very many textbooks on digital communications. Its roots are in information theory on complementary sequences. [15] Complementary codes were originally conceived by M. J. E. Golay for infrared multi-slit spectrometry to overcome the problem of imaging polychromatic radiation. However, their Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 12 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report properties make them good codes for radar and communications applications. Further he found the complementary sequence to be mathematically attractive. He described the properties of binary complementary sequences and how to synthesize them. [3][15] 2.6.2. BINARY COMPLIMENTARY CODE Complementary codes, also referred to as binary complementary sequences or series, comprise a pair of equal finite length sequences having the property that the number of pairs of like elements with any given separation in one series is equal to the number of pairs of unlike elements with the same separation in the other. The symmetry described in the above definition is not intuitively obvious but is easily demonstrated by an example. Figure 2.4 Sequence 1 and sequence 2 [15] Taking a pair of complimentary sequences from Golay’s paper as mentioned in [15], Sequence 1 has 4 pairs of like elements with a separation of 1 and 3 pairs of unlike elements with a separation of 1; whereas Sequence 2 has 4 pairs of unlike elements with a separation of 1 and 3 pairs of like elements. Table 2.3 summarizes the results of the element pairing for separations of 1, 2 and 3.[15] Table 2.3 Results of element paring for sequence 1 and 2 Pair separation Sequence 1 Sequence2 Like Unlike Like Unlike 1 4 3 3 4 2 4 3 3 4 3 1 5 5 1 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 13 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Therefore complementary codes possess a deep seated symmetry. For digital communication it turns out that complementary codes are characterized by the property that their periodic auto-correlative vector sum is zero everywhere except at the zero shift. This is the property that makes complementary codes useful in digital communications systems. Given a pair of complementary sequences with ai and bi elements, where i = 1, 2, …, n, the respective autocorrelative series are given by: 𝑛−𝑗 𝐶𝑗 = ∑𝑖=1 𝑎𝑖 𝑎𝑖 + 𝑗 𝑎𝑛𝑑 𝑛−𝑗 𝑑𝑗 = ∑𝑖=1 𝑏𝑖 𝑏𝑖 + 𝑗 Equation 2.1 Ideally, the two sequences {ai} and {bi} are complementary if 𝐶𝑖 + 𝑑𝑗 = 0 𝑗 ≠0 and 𝐶0 + 𝑑0 = 2𝑛 Equation 2.2 Where n is the length of the code word. In practice it is difficult to achieve the ideal condition but good codes will have one main peak with minimum residual peaks. [15] 2.6.3 POLYPHASE COMPLIMENTARY CODE Now let’s see the polyphase complimentary code. Like binary complimentary code is binary sequence with complimentary properties, polyphase complimentary code is the complimentary sequence having phase parameter. For example, a polyphase code could contain elements having four different phases. The polyphase codes described in the literature consist of complex elements with unit magnitude. The code set defined in the IEEE 802.11 high rate draft standard is a complex complementary code set i.e. set of complex number {1, -1, j, -j}. In addition, the IEEE 802.11 codes have been shown to possess good Euclidean distance properties for yielding low bit error rates in multipath environments [3] [15]. 2.6.4. CCK MODULATION Complementary code keying is a newer modulation standard based on another modulation technique called M-ary Orthogonal Keying (MOK); it was not a defined modulation technique in the original IEEE 802.11 standard for WLANs unlike BPSK and QPSK. CCK is a form of M-ary code word modulation where one of set of M unique signal codewords is chosen for transmission. The spread function for CCK is chosen from a set of M nearly orthogonal vectors by the data word. CCK uses one vector from a set of 64 complex (QPSK) vectors for the symbol and thereby modulates 6bits (one-of-64) on each 8 chip spreading code symbol. Two additional bits are sent by QPSK modulating the whole code symbol and this thus modulates 8-bits onto each symbol. The formula that defines the CCK codewords is Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 14 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 𝑐 = {𝑒 𝑗(𝜑1 +𝜑2+𝜑3 +𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑3+𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑2+𝜑4 ) , −𝑒 𝑗(𝜑1 +𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑2 +𝜑3) , 𝑒 𝑗(𝜑1 +𝜑3 ) , − 𝑒 𝑗(𝜑1 +𝜑2 ) , 𝑒 𝑗𝜑1 } Equation 2.3 Out of these 4 phase terms which are defined by data di-bits (pairs of data bits), one modulates all of the chips and thus is used for the QPSK rotation of the whole code vector. The others modulate respectively, every odd chip, every odd pair of chips, and every odd quad of chips. Walsh function is used for the M-ary Bi orthogonal keying modulation. These are the code symbols which have not been amplitude modulated. Because the complementary codes are more, there is a large set of nearly orthogonal code to choose. So there is no need for the simultaneous transmission but still can send the same number of bits per symbol. [17] The two modulation methods can be compared as shown in the figure below. In MBOK there are 8 BPSK chips and the maximum number of code words are 256, in this each set of 8 code words are orthogonal. Two independent BPSK vectors are selected for I and Q channels which modulate 3 bits on each, and two bits are used to modulate each of the spreading code vectors. In CCK there are 65536 possible code words in sets of 64 which are nearly orthogonal. [17][1][5][6] 8 BPSK CHIPS: 2^8 = 256 Codeword 8 QPSK CHIPS: 4^8 = 65536 Codeword Figure 2.5 Comparing Walsh and Complementary codes [5] One of the advantages of CCK over MBOK is that it suffers less from multipath distortion in the form of cross coupling of I and Q channel information. The information in CCK is encoded directly onto complex chips which cannot be cross-couple corrupted by multipath since each channel finger has an Aej distortion. A single channel path gain-scales and phase-rotates the signal. A gain scale and phase rotation of a complex chip still maintains I/Q orthogonality. This superior encoding technique avoids the corruption resulting from encoding half the information on the I-channel and the other half on the Q-channel, as in MBOK, which easily cross-couple corrupts with the multipath’s Aej phase rotation. [17][1] There is a code set as well as a cover sequence defining the waveform. The overall 8 bits are transmitted with each symbol where the new symbol type carries 6 bits and can be QPSKmodulated to carry 2 more bits resulting 16 bits of complexity. This is why the data rate for a direct sequence spread spectrum (DSSS) system employing CCK modulation is capable of 11Mbps Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 15 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report throughput rather than 2 Mbps. CCK supports both 5.5Mbps and 11Mbps modulation, and is backward compatible with the 1 to 2 Mbps scheme. The data bit structure per codeword for BPSK, QPSK, and CCK is outlined in figure. One of the advantages of CCK over similar modulation techniques is that it suffers less from multi-path interference than systems based only on QPSK and BPSK. [11] Modulation Technique and Data rates c {e j(1234) , e j(134) , e j(124) , e j(14) , e j(123) , e j(13) , e j(12) , e j1} 11 Bit Barker Word 802.11 DSSS BPSK 1 MBps Barker BPSK 802.11 DSSS QPSK 2MBps Barker QPSK 1 bit used to BPSK code word I, Q Code set 22 MHz 6 bits encoded to 64 complex code words; 2-QPSK 2 bits encoded to 4 complex code words; 2-QPSK 2 bits used to QPSK code word I, Q 11 MBps CCK 5.5 MBps CCK I, Q I, Q 11 chips 11 chips 8 chips 8 chips 1 MSps 1 MSps 1.375 MSps 1.375 MSps Figure 2.6 The Makeup of the four modulation Techniques and respective data rates 2.7. SIMULINK AND MATLAB Simulink is one of the high-level technical computing language developed by matrix laboratory. It provides an interactive graphical environment and a customizable set of block libraries to design, simulate, implement, and test a variety of time-varying systems, including communications, controls, signal processing, video processing, and image processing.[20] With the interactive environment for algorithm development, data visualization, data analysis, and numeric calculation, Simulink can solve technical computing problems faster as compared to traditional programming languages, such as C, C++, and FORTRAN.[19] Simulink is integrated with MATLAB, providing immediate access to an extensive range of tools including image and signal processing, control design, test and measurement, computational biology and financial modelling.[6] Add-on toolboxes (set of special-purpose MATLAB functions, available individually) enlarge the MATLAB environment to solve particular classes of problems in these application areas. MATLAB provides a number of features for documenting and sharing your work. You can integrate your MATLAB code with other languages and applications, and distribute your MATLAB algorithms and applications. [17] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 16 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 1. Simulink (and s-functions): this is a visual programming tool that facilitates performance of simulation building use of block rather than code. There is the extra option of developing the s-functions to code the blocks if the required function blocks are not available. 2. M-files: this is a means by which an application can be designed to work on its own with parameters incorporated into through source code which will provide an end result. The coding of an application in m-files provides advantage of the MATLAB interpretive development environment. Overall the main reason of using Simulink or MATLAB platform is because it integrates a system called the communication block set which is considered specifically for the modelling design and implementation communication systems. Following are the key features of Simulink / Mat lab: High-level language for technical computing Extensive and expandable libraries of predefined blocks Development environment for managing code, files, and data Embedded MATLAB Function blocks for bringing MATLAB algorithms into Simulink and embedded system implementations Interactive tools for iterative exploration, design, and problem solving Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization, and numerical integration 2-D and 3-D graphics functions for visualizing data Tools for building custom graphical user interfaces Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, FORTRAN, Java, COM, and Microsoft Excel. [19][20] Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 17 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report CHAPTER 3 IMPLIMENTATION 3.1. INTRODUCTION To start with the implementation of Simulink model of Complimentary code keying, one of the most important point was to keep in mind the 802.11b standard and all the background regarding CCK. The very first step to create a Simulink model was to make a rough sketch and divide the task and then find out which are the blockset to be used from Simulink library. Starting with the rough sketch of the model, let’s see the 802.11b standard. As we know for the lower rates (1 mbps and 2 Mbps), DBPSK and DQPSK modulation was used and the signal was spread with the help of the 11 chips long barker code (10110111000). But for the higher rates i.e. 11Mpbs and 5.5 Mbps DQPSK modulation was used and 64 CCK codes were spread over channel. Now the IEEE 802.11 complementary spreading codes have code length of 8 where these 8 complex chips comprise a single symbol. This 8 bit CCK code word was derived by the formula: 𝑐 = {𝑒 𝑗(𝜑1 +𝜑2+𝜑3 +𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑3+𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑2+𝜑4 ) , −𝑒 𝑗(𝜑1 +𝜑4 ) , 𝑒 𝑗(𝜑1 +𝜑2 +𝜑3) , 𝑒 𝑗(𝜑1 +𝜑3 ) , − 𝑒 𝑗(𝜑1 +𝜑2 ) , 𝑒 𝑗𝜑1 } Equation 3.1 Where C is the code word with LSB first and MSB last. This formula was used to generate the data rate of 11 Mbps. Thus the phase parameters Φ1 - Φ4 determined the phase value of complex code. At 11 Mb/s, 8 bits (d0 to d7; d0 first in time) were transmitted per symbol. These di-bit was used to encode the phase parameters. The first di-bit (d0, d1) encodes Φ1 based on DQPSK. The DQPSK encoder is specified in Table 4 where the data di-bits (d2, d3), (d4, d5), and (d6, d7) encode Φ2, Φ3, and Φ4, respectively, based on QPSK as specified in Table 5. Note that this table is binary (not Gray) coded. [14] Table 3.1 DQPSK Encoding Table Dibit Pattern (d0, d1) (d0 is first in time) Phase change (+jw) 00 0 01 /2 11 10 3/2 (-/2) Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 18 School of Electronics, Communication and Electrical Engineering Table 3.2 QPSK Encoding Table Di-bit pattern [di, d(i+1)] (di in first in time) M.Sc. Final Project Report Phase 00 0 01 /2 10 11 3/2 (-/2) To more clarify it lets take an example and see how typical phase parameter and from parameter’s how code is generated. Let the di-bit (d7, d6, …….d0) is 10110101, thus according to above theory d1, d0 = 0,1 so 1 = in the similar manner d3, d2 = 0,1 so 2 = d5, d4 = 1,1 so 3 = -/2 d7, d6 = 1,0 so 4 = /2 Thus substituting the phase parameter value into the code word formula we have 𝑐 = {𝑒 𝑗(+−/2+/2) , 𝑒 𝑗(−/2+/2) , 𝑒 𝑗(++/2) , −𝑒 𝑗(+/2) , 𝑒 𝑗(+−/2) , 𝑒 𝑗(−/2) , − 𝑒 𝑗(+) , 𝑒 𝑗 } Equation 3.2 Thus, 𝑐 = {𝑒 𝑗2 , 𝑒 𝑗 , 𝑒 𝑗5/2 , −𝑒 𝑗3/2 , 𝑒 𝑗3/2 , 𝑒 𝑗/2 , − 𝑒 𝑗2, 𝑒 𝑗 } … … …. … .7 Equation 3.3 Now by using Euler’s formula 𝑒 𝑗𝜃 = cos 𝜃 + 𝑗𝑠𝑖𝑛 𝜃 Equation 3.4 So therefore our complex code word will be 𝑐 = {1, −1, 𝑗, 𝑗, −𝑗, 𝑗, −1, −1} Therefore referring to all the above theory, whole implementation can be divided into two major parts. First is to generate the phase parameter and second is to generate Complex code: 3.2. GENERATE PHASE PARAMETER Constructing a Simulink model to generate the phase parameters Φ1 - Φ4 the following steps is to be taken: 1. Generate di-bit for as a input to create phase parameters. 2. DQPSK and QPSK modulators 3. complex to radian converter. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 19 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Thus taking into mind all the factors a typical Simulink model is created to generate phase parameter. Figure 3.1: Simulink Model to Generate Phase Parameter for CCK Modulator Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 20 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Now to understand the working of the model all the block are describe as under: RANDOM INTEGER GENERATOR: Library: Communication Block set – Comm Sources – Random Data Sources Function: Generate random uniformly distributed integers in the range [0, M-1], where M is the M-ary number. M-ary number are the positive integer, or vector of positive integers, that indicates the range of output values [16] thus at output we get random integer numbers which can be further digitized into integer to bit converter. INTEGER TO BIT CONVERTER Library: Communication Block set – utility Blocks Function: The Integer to Bit Converter block maps each integer in the input vector to a group of bits in the output vector. If M is the Number of bits per integer parameter, then the input integers must be between 0 and 2M-1. The block maps each integer into a group of M bits, using the first bit as the most significant bit. As a result, the output vector length was M times the input vector length. [16] Here number of bits per integer was configured to 8. As we want to generate 8 di-bits thus this block set converted the random integer input to 8 bit output. MULTIPORT SELECTOR Library: Signal processing Block set – Signal management – Indexing Function: Output specified rows or columns to one or more output ports. The number of output ports is determined by the number of index vectors, each specified as a separate vector entry in a cell array. Indices are 1-based and needed not to be unique [16], here the output parameter were set to select row, and indices to output was given for four output as { [1 2], [3 4], [5 6], [ 7 8] }. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 21 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Therefore first two bits i.e. d0 and d1 were sent to first output port and second two bits d2 and d3 were sent to second port respectively. Now as the 8 di-bit were divided into three respective pairs, so as per standard the further step was to apply DQPSK to first two bits and QPSK to remaining bits. Thus the first output of selector was connected to DQPSK modulator and remaining three outputs were connected to three QPSK modulators. Also the formats of these bits were changed from row to column for the proper input to the modulators. RESHAPE Library: Simulink Block set – Math Operation Function: Change the dimensions of a vector or matrix input signal. Output can be a onedimensional array, column vector [M x 1], row vector [1xN] or a vector with specified dimensions e.g. [M, N]. [16] Here the parameter was set to column vector. DQPSK MODULAR BASEBAND Library: Communication Block set – Modulation – Digital Baseband - Phase Modulation Function: DQPSK Modulator Baseband block modulates using the differential quaternary phase shift keying method. The output is a baseband representation of the modulated signal. The input must be a discrete-time signal. [16] Here the parameters were set to input type as pairs of bits constellation ordering to binary and phase offset to 0. QPSK MODULAR BASEBAND Library: Communication Block set – Modulation – Digital Baseband - Phase Modulation Function: QPSK Modulator Baseband block modulates using the quaternary phase shift keying method. The output is a baseband representation of the modulated signal. The input must be a discrete-time signal. [16] Here the parameters were set to input type as pairs of bits constellation ordering to binary and phase offset to 0. Finally from DQPSK and QPSK modulators we get the required Phase parameters. But all of these were in complex form thus to convert them into radian complex two magnitude-angle blocks were used. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 22 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report COMPLEX TO MAGNITUDE ANGLE Library: Simulink block set – Math Operations Function: The Complex to Magnitude-Angle block accepts a complex-valued signal of type double. It outputs the magnitude and/or phase angle of the input signal, depending on the setting of the Output parameter. The outputs are real values of type double. The input can be an array of complex signals; in this case the output signals were also arrays. The magnitude signal array contained the magnitudes of the corresponding complex input elements. The angle output similarly contained the angles of the input elements. [16] Here the parameter was set to magnitude and Angle. Therefore we got the required phase parameters at the four output Goto blocks (shown in figure 7). These outputs are further linked to second part of the model with From block. Now next step is to generate the CCK complex code as per the standard equation. 3.2. CCK COMPLEX CODE GENERATOR As the first part of the model generates the phase parameter, the second part will use these phase parameters to generate the CCK codes (figure 8). Both the parts of the model were connected with the help of Goto and From blocks. The data type of the output was the same as that of the input from the Goto block. From and Goto blocks allowed to pass a signal from one block to another without actually connecting them. A From block can receive its signal from only one Goto block, although a Goto block can pass its signal to more than one From block. Now these four phase Φ1 - Φ4 was added in different combinations as per the standard equation to get eight different values of ‘’. So looking to equation – 5 the 8 combinations of phase were (Φ1 Φ+ Φ2 + Φ3 + Φ4), (Φ1 + Φ3 + Φ4), (Φ1 + Φ2 + Φ4), (Φ1 + Φ4), (Φ1 + Φ2 + Φ3), (Φ1 + Φ3), (Φ1 + Φ2), (Φ1). To add these phases sum block is used. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 23 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Figure 3.2 Simulink Model to Generate CCK code from Phase Parameter SUM Library: Simulink block set – Math operation Function: The Sum block performs addition or subtraction on its inputs. This block can add or subtract scalar, vector, or matrix inputs. It can also collapse the elements of a single input vector. You specify the operations of the block with the List of Signs parameter. Plus (+), minus (-), and spacer (|) characters indicate the operations to be performed on the inputs. If there are three inputs the sign will be as ‘+++’ or ‘---‘. It performs operation on any number of inputs. Now to perform exponential function i.e. to apply Euler’s Formula, complex exponential Block was used. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 24 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report COMPLEX EXPONENTIAL Library: Signal Processing Block set – Math functions - Math Operations Function: The Complex Exponential block computes the complex exponential function for each element of the real input, u. the output is complex, with the same size and frame status as the input. 𝑦 = 𝑒 𝑗𝑢 = cos 𝑢 + 𝑗𝑠𝑖𝑛 𝑢 𝑤ℎ𝑒𝑟𝑒 𝑗 = √−1 Equation 3.4 Now the 4th and 7th code was supplied with negative gain to perform negative operation as per the CCK code. Thus finally all the 8 outputs were concatenated with the help of matrix concatenation block which performs horizontal or vertical concatenation. Here 1-D vector input signals were treated as column vectors i.e. [Mx1] matrices. And thus, final output i.e. CCK complex code was send to workspace, where the output was saved as simout file. Thus, the above given set of model performed the function of Complimentary code keying modulator. The model was supplied with random integer input with after all process which provided CCK complex codes. The simulation time was set to infinite. And output was taken to the workspace as file name Simout. The values of di-bits from integer to bit converter were also taken to workspace as file name simout1. These two file were used to verify the results by comparing input with output codes. Normally the output from integer to bit converter are sets of binary numbers, where as the output taken after simulation is complex code with real and imaginary numbers. All these results are verified in next chapter and it was revealed that the above model works as a CCK modulator to generate CCK codes. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 25 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report CHAPTER 4 RESULTS AND DISCUSSION 4.1. INTRODUCTION As seen in the previous chapter the CCK modulator was implemented using a Software model made in Simulink Software using different blocks and block sets. The performance of the model was then analysed by generating and testing random sequence numbers (di-bits) with the obtained CCK codes form the model. With the help of Matlab software these values were tested at different stages of the model to make sure that the assumptions, distributions, inputs, outputs, and results were corrected with specifications. Matlab software ensures flexibility, delivers high level tools for signal processing and can be used within different field of expertise. 4.2. CALCULATION During the construction of model, we recorded the results at two places. First of all we copied the di-bits at the input of the model in file simout1 and also recorded the CCK codes generated by model in file simout. Now the most important stage of this project work was to calculate the actual CCK codes as per theory and standard by taking the input di-bits values and then to compare with the CCK codes one which were obtained from the simulation model, which will prove whether the model is working correct as per specification or not. To verify this about 1000 samples from the di-bit sample file [Appendix 2] and about 500 samples from the CCK codes sample file [Appendix 3] were recorded for testing purpose. Following Matlab commands were used to do so. in=(real(simout1.signals.values(1:1000))); out=(real(simout.signals.values(1:500))); …. …4.1 ……..4.2 Now following calculations were done using the input di-bits values: i. First of all the di-bits were divided into sets of two such as (d1, d0), (d3, d2), (d5, d4), (d7, d6). ii. Now Φ1 was obtained by DQPSK encoding to the first set of di-bit and Φ2, Φ3, Φ4 are obtained by QPSK encoding according to the other three set of data. iii. Further the values were converted into radian and sets of values (Φ1 + Φ2 + Φ3 + Φ4), (Φ1 + Φ3 + Φ4), (Φ1 + Φ2 + Φ4), (Φ1 + Φ4), (Φ1 + Φ2 + Φ3), (Φ1 + Φ3), (Φ1 + Φ2), (Φ1) were calculated. iv. Eulers formula as mention in equation 7 was applied to these sets to get the theoretical values of CCK codes Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 26 School of Electronics, Communication and Electrical Engineering v. M.Sc. Final Project Report These CCK codes were then matched with one which were obtained from the simulation model Though it requires plenty of space to show the calculation on all the recorded values in this piece of project report, to get the proper idea here a sample of first 32 di-bits were used to perform the above procedure of calculation and all the results from the actual recorded samples were attached in appendices. Step By Step Calculation First 32 di-bits from the file simout1 1,1,0,0,1,1,0,0,0,0,1,0,0,1,1,1,1,0,1,1,0,1,0,1,0,1,1,1,1,1,0,1 Or (d1, d0) = 1, 1, 0, 0, 1, 0, 0, 1 (d3, d2) = 0, 0, 1, 0, 1, 1, 1, 1 (d5, d4) = 1, 1, 0, 1, 0, 1, 1, 1 (d7, d6) = 0, 0, 1, 1, 0, 1, 0, 1 DQPSK and QPSK encoding was done as Dibit Phase d1d0 or d2i d2i-1 Φ1 or Φi d1d0 Φ1 00 0 d3d2 Φ2 01 /2 d5d4 Φ3 10 -/2 d7d6 Φ4 11 Where Therefore the values of Φ1, Φ2, Φ3, Φ4 were Phi1 Phi2 Phi3 Phi4 Degree Radian Degree Radian Degree Radian Degree Radian -90 -1.5708 0 0 -90 -1.5708 0 0 -90 -1.5708 180 3.14.16 90 1.5708 -90 -1.5708 90 1.5708 -90 -1.5708 90 1.5708 90 1.5708 180 3.14.16 -90 -1.5708 -90 -1.5708 90 1.5708 0 0 0 0 180 3.14.16 -90 -1.5708 0 0 90 1.5708 -90 -1.5708 0 0 0 0 180 3.14.16 -90 -1.5708 -90 -1.5708 0 0 180 3.14.16 180 3.14.16 0 0 Now applying the values for each set of Φ1, Φ2, Φ3, Φ4 as explained in 3.1 and 4.1, and using Eulers formula to take the exponential values we derived the following results Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 27 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Table 4.1 CCK codes calculated from the obtained phase parameters c1 c2 c3 c4 -1 j -1 j -1 -j -j -1 -j 0 j -1 -j 1 1 j -1 -1 j 0 -1 1 -1 j j -j -1 -j -j -j J -1 Furthermore, comparing these values with the CCK codes generated by the Simulink model we found that the codes calculated were almost similar to the codes generated by the model. All the real and the imaginary values were same in both the sets. Table 4.2 CCK codes obtained from Simulink CCK modulator model c1 c2 c3 c4 -1 2.83E-16 -1 5.05E-16 -1 -3.83E-16 -1.84E-16 -1 -1.61E-16 0 2.83E-16 -1 1.61E-16 1 1 1.84E-16 -1 -1 2.83E-16 0 -1 1 -1 2.83E-16 1.61E-16 -2.83E-16 -1 -2.83E-16 -1.61E-16 -1.61E-16 6.12E-17 -1 4.3. RESULTS Therefore, after comparing both the values it was concluded that both the parts of Simulink model of CCK modulator i.e. Phase parameter generator and CCK code generator were working as according to the CCK standard. Also all the blocks were simulated properly and after comparing the theoretical values with the modulator values it was confirmed that the modulator generates required CCK codes when supplied with any random di-bits. Both DQPSK and QPSK modulator generated proper phase parameter and after taking the exponential of the phases we obtained the appropriate output as required. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 28 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report Figure 4.1 Showing the signal field of real value CCK code generated CCK modulator Figure 4.2 Showing the signal field of complex value CCK code generated CCK modulator Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 29 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report CHAPTER 5 CONCLUSION AND FUTURE WORK 5.1 CONCLUSION Wireless networking technology has gain market acceptance providing a effective response in past few years. Providing agile communications platform facilitating outstanding communications qualities and on to the mark a quality of service to the end users, it has open doors for the bright future of wireless technologies. As number of wireless components, devices are increasing day by day, it will never end the demand of throughput, more bandwidth share, cheap and reliable quality of services. Thus to suit the current market and to give business a convenient and cost effective way 802.11b shows a positive step with using Complimentary code keying modulation which provides high data rate of 11Mbps, also strong immunity to multipath fading as the data are strongly coded under CCK complex code and do a cross coupling between I and Q channel information. Working throughout this project work it provides a very good understanding about all wireless LAN’s specially about 802.11b and its most important part of CCK modulation. CCK modulation is one of the unique technique of modulation and it is not define as a separate standard as BPSK or QPSK, due to which it is very hard to find in any academic book or Journals. This project work has provided a vast knowledge about CCK and its unique properties which made it to be used not only in RADAR and multislit spectrometry application but also make its place in today’s wireless LAN standards. It provide wireless LAN to work on high data rate such as 5.5Mbps and 11Mbps by providing 256 combination of CCK codes for transmission. The simulation modelling using Simulink has offered a creative attitude for trying new ideas, knowledge and information. Understanding creating, synchronizing the blocks of CCK modulator and together comparing the results of the simulation model with the results calculated as per IEEE standards, give a vast knowledge of understanding of model running in real world in real time. On other hand also showed the key factors and limitations of the model. Designing a model in Simulink was not a trivial task as firstly it was a totally new platform and the time comparing to the functionally of software was very less, but overall it had given a very good understanding to create effective models. However, in the simulation there are non-linearities which are notoriously difficult to model analytically but better analysis such as bit error rate and signal to noise ratio could be drawn if time could allow me to do the receiver part which was not possible. Finally after comparing the results obtained from the simulation model with derived CCK codes it has been concluded that the model is working properly and the simulation provides appropriate required CCK codes, thus after creating a demodulator both together can work as a CCK modem and can be used for different wireless devices and LANs. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 30 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 5.2. FUTURE WORK As demand and use of wireless technology is growing day by day there is need to develop new mechanisms and techniques which can provide more reliable quality of services. Looking towards the future of wireless networks CCK can play a major part in wireless technologies. As in past these CCK codes were used in Radar systems and then they capture the WLAN market, further research in this field can draw up with new wireless devices that can work on this technology, which can provide a better and high speed service with less distortion and errors. Looking towards this project work one of the important future work is to develop receiver side of model and then check the performance and data rate of the model at different channels and environment. And signal to noise ratio, bit error rate, and constellation performance can be found out. As the model is created in the Simulink software one of the greatest advantages is that it allows to perform simulation under real world conditions. Whereas after achieving a better to best model it can easily be implemented on FPGA’s and thus converted into actual hardware. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 31 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report REFERENCES [1] M. Makkapati “Simulation of the performance of complementary code keying modem under AWGN channel in wireless system. MSc Project report, University of Hertfordshire, Hatfield September 2005. [2] A. Abdi Bulle “Modelling of 802.11g WLAN Transmitter” MSc Project report, University of Hertfordshire, Hatfield September 2005. [3] C. Andren, K. Halford, M. Webster, “CCK, the new IEEE 802.11 standard for 2.4 GHz wireless LANS”. International IC – Taipei. Conference Proceedings. [4] H. Davis and R. Mansfield “The Wi-Fi experience, everyone’s guide to 802.11b wireless networking, QUE Indianapolis Indiana 2002. [5] J. Mikulka, S. Hanus “Complementary Code Keying Implementation in the Wireless Networking”, Brno University of Technology Dept. of Radio Electronics Czech Republic [6] J.D. Gibson, “The Mobile Communication Handbook” A CRC handbook Published in Cooperation with IEEE Press Second Edition 2005. [7] S. kaur Thind “An interactive tour of wireless LAN IEEE 802.11a system”, final year project report, University of Hertforshire Hatfield, UK April 2007 [8] Daji, Qiao at al. An optimal low-energy transmission strategy for ieee802.11a/h. The University of Michigan &Seoul National University, USA Seoul, 151-744, Korea. [9] IEEE standard 802.11a-1999 “Supplement to IEEE standard for information technology” 1999. [10] Frank H. H and Terng-Yin Hsu. IEEE .A Frequency Domain Equalizer for WLAN 802.11g Single-Carrier Transmission Mode, Department of Computer Science and Information National Chiao Tung University [11] Syngress, M. E. Flannagan, C. Riley, R. Fuller, U. Khan, K. O'Brien, M. Walshaw, “The Best Damn Cisco Internetworking Book Period” Published by Syngress, 2003 ISBN 931836914, 9781931836913. [12] IEEE 802.11-Wikipedia, the free encyclopaedia, http://www.ieee802.org/wiki/IEEE-802.11 [13] Direct Sequence Spread Spectrum (DSSS) communications systems with frequency modulation utilized to achieve spectral spreading, United States Patent, Sep 22, 1992. Patent number 5150377, Vannucci. [14] IEEE Standard for Information technology, Telecommunications and information exchange between systems, Local and metropolitan area networks IEEE Std 802.11™-2007 (Revision of IEEE Std 802.11-1999 ), 12 June 2007. Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 32 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report [15] B. Pearson, “Complimentary Code Keying Made simple”, Intersil Application Note, November 2001. [16] Mathworks Matlab, Simulink Library “help navigator”, Version 7. [17] C. Andren, M. Webster “CCK modulation delivers 11 Mbps for high rate 802.11extension”, wireless symposium portable by design conference, spring 1999 [18] IEEE Std 802.11b-1999. [Online]. Available: http://standards.ieee.org/getieee802/ [19] http://www.mathworks.com/products/matlab/description1.html [20] http://www.mathworks.com/products/simulink/description1.html [21] Neng-Jian Tai, J. Wu, Yan-Xin Gou, Yong-Min Wang, Cheng-Xi Dong, Y. Tian, “A New Approach to Analyze CCK Performance”, Telecommunication Engineering Institute Air Force Engineering University Xi’an, China IEEE, 2007 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 33 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report BIBLIOGRAPHY B.U. Klepser, M. Punzenberger, T. Ruhlicke, M. Zannoth “5-GHz and 2.4-GHz Dual-Band RF-Transceiver for WLAN 802.1 1 a/b/g Applications”, IEEE Radio Frequency Integrated Circuits Symposium Infineon Technologies MDCA, Development Center Villach, Austria 2003 J. Lansford, A. Stephens, and R. Nevo, “Mobilian Corporation Wi-Fi (802.11 b) and Bluetooth: Enabling Coexistence IEEE Network” September- October 2001 M. Fainberg, D. Goodman “Analysis of the Interference Between IEEE 802.11b and Bluetooth Systems”, Polytechnic University Electrical Engineering 6 Metrotech Center Brooklyn, NY IEEE 2001 DOBKIN, D.,M. RF Engineering for Wireless Networks: Hardware, Antennas, and Propagation Newnes; Pap/Cdr edition, 2004. 448p ISBN 978-0750678735 IEEE Std 802.11b-1999. [Online]. Available: http://standards.ieee.org/getieee802/ lMOLISH, F.,A. Wireless Communications IEEE Press,2005. 668p ISBN 978-0470848883 MORROW, R. Wireless Network Coexistence McGraw Hill Professional, 2004. 444p ISBN 0071399151 Neng-Jian Tai, J. Wu, Yan-Xin Gou, Yong-Min Wang, Cheng-Xi Dong, Y. Tian, “A New Approach to Analyze CCK Performance”, Telecommunication Engineering Institute Air Force Engineering University Xi’an, China IEEE, 2007 OHRTMAN, F. Wi-Fi Handbook: Building 802.11b Wireless Networks McGraw Hill Professional, 2003. 363p ISBN 0071412514 STAVROULAKIS, P. Interference Analysis and Reduction for Wireless Systems Artech House, 2003. 407 p. ISBN 1-58052-316-7 B.U. Klepser, M. Punzenberger, T. Ruhlicke, M. Zannoth “5-GHz and 2.4-GHz Dual-Band RF-Transceiver for WLAN 802.1 1 a/b/g Applications”, IEEE Radio Frequency Integrated Circuits Symposium Infineon Technologies MDCA, Development Center Villach, Austria 2003 M. Fainberg, D. Goodman “Analysis of the Interference Between IEEE 802.11b and Bluetooth Systems”, Polytechnic University Electrical Engineering 6 Metrotech Center Brooklyn, NY IEEE 2001 J. Lansford, A. Stephens, and R. Nevo, “Mobilian Corporation Wi-Fi (802.11 b) and Bluetooth: Enabling Coexistence IEEE Network” September- October 2001 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 34 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report APPENDICIES APPENCIES 1 GANTT CHART Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 35 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report APPENCIES 2 DI- BIT SAMPLES 1 1 101 1 201 0 301 0 401 1 501 1 601 1 701 0 801 1 901 1 2 1 102 0 202 0 302 1 402 0 502 0 602 1 702 1 802 0 902 0 3 0 103 0 203 0 303 0 403 1 503 0 603 0 703 0 803 1 903 1 4 0 104 1 204 1 304 0 404 0 504 0 604 0 704 1 804 0 904 0 5 1 105 1 205 1 305 0 405 1 505 0 605 1 705 1 805 0 905 0 6 1 106 1 206 1 306 1 406 1 506 0 606 0 706 0 806 0 906 0 7 0 107 0 207 0 307 1 407 1 507 1 607 1 707 1 807 0 907 1 8 0 108 1 208 1 308 0 408 1 508 0 608 0 708 1 808 1 908 0 9 0 109 0 209 0 309 0 409 1 509 1 609 1 709 0 809 1 909 0 10 0 110 1 210 1 310 0 410 0 510 0 610 1 710 0 810 0 910 0 11 1 111 1 211 0 311 1 411 1 511 1 611 0 711 0 811 0 911 1 12 0 112 0 212 0 312 1 412 0 512 1 612 1 712 0 812 0 912 0 13 0 113 1 213 1 313 0 413 1 513 1 613 0 713 0 813 0 913 0 14 1 114 0 214 1 314 1 414 0 514 0 614 1 714 0 814 0 914 1 15 1 115 0 215 0 315 0 415 0 515 1 615 0 715 1 815 1 915 1 16 1 116 1 216 0 316 1 416 0 516 1 616 1 716 1 816 0 916 1 17 1 117 1 217 1 317 0 417 1 517 1 617 0 717 1 817 0 917 1 18 0 118 0 218 1 318 0 418 1 518 0 618 0 718 0 818 0 918 0 19 1 119 1 219 1 319 0 419 0 519 1 619 1 719 1 819 1 919 0 20 1 120 1 220 0 320 0 420 1 520 1 620 1 720 1 820 1 920 1 21 0 121 0 221 0 321 0 421 0 521 0 621 0 721 0 821 0 921 1 22 1 122 1 222 0 322 0 422 1 522 0 622 1 722 0 822 1 922 0 23 0 123 0 223 0 323 0 423 1 523 1 623 0 723 0 823 0 923 0 24 1 124 0 224 0 324 0 424 1 524 1 624 0 724 1 824 1 924 1 25 0 125 1 225 1 325 0 425 0 525 0 625 0 725 0 825 0 925 0 26 1 126 1 226 0 326 0 426 1 526 0 626 1 726 0 826 1 926 1 27 1 127 0 227 1 327 1 427 0 527 0 627 1 727 0 827 1 927 1 28 1 128 1 228 1 328 0 428 1 528 1 628 0 728 0 828 1 928 1 29 1 129 0 229 0 329 0 429 1 529 0 629 1 729 0 829 0 929 0 30 1 130 0 230 1 330 1 430 0 530 0 630 1 730 0 830 0 930 0 31 0 131 0 231 0 331 1 431 0 531 0 631 0 731 1 831 0 931 1 32 1 132 1 232 1 332 1 432 0 532 0 632 0 732 0 832 0 932 0 33 1 133 1 233 1 333 0 433 0 533 0 633 0 733 0 833 1 933 0 34 0 134 0 234 1 334 1 434 1 534 1 634 0 734 0 834 0 934 1 35 0 135 0 235 0 335 0 435 0 535 1 635 1 735 1 835 0 935 1 36 0 136 0 236 1 336 0 436 0 536 0 636 0 736 1 836 0 936 1 37 1 137 0 237 0 337 0 437 1 537 1 637 0 737 1 837 1 937 1 38 0 138 1 238 1 338 0 438 0 538 0 638 1 738 1 838 1 938 0 39 1 139 0 239 0 339 0 439 0 539 0 639 0 739 0 839 1 939 0 40 1 140 1 240 0 340 0 440 0 540 1 640 0 740 1 840 1 940 1 41 0 141 0 241 0 341 0 441 1 541 0 641 0 741 1 841 1 941 0 42 0 142 1 242 1 342 0 442 0 542 1 642 0 742 1 842 1 942 0 43 0 143 1 243 1 343 0 443 0 543 1 643 0 743 0 843 0 943 1 44 1 144 1 244 0 344 0 444 0 544 0 644 0 744 0 844 0 944 0 45 1 145 0 245 0 345 1 445 1 545 0 645 1 745 1 845 1 945 1 46 1 146 0 246 0 346 1 446 1 546 1 646 1 746 0 846 0 946 0 47 0 147 1 247 0 347 0 447 0 547 0 647 0 747 0 847 0 947 1 48 0 148 1 248 1 348 0 448 1 548 0 648 1 748 0 848 0 948 1 49 0 149 1 249 0 349 0 449 0 549 1 649 1 749 1 849 0 949 1 50 0 150 0 250 1 350 1 450 0 550 1 650 0 750 1 850 1 950 0 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 36 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report 51 1 151 0 251 1 351 0 451 1 551 1 651 1 751 0 851 1 951 1 52 0 152 1 252 1 352 1 452 1 552 1 652 1 752 1 852 1 952 1 53 1 153 1 253 0 353 1 453 0 553 0 653 1 753 0 853 0 953 0 54 1 154 0 254 1 354 0 454 1 554 1 654 1 754 0 854 0 954 0 55 1 155 0 255 1 355 0 455 1 555 1 655 0 755 0 855 1 955 1 56 1 156 0 256 0 356 1 456 1 556 0 656 1 756 0 856 1 956 1 57 0 157 1 257 0 357 1 457 0 557 1 657 0 757 1 857 0 957 0 58 0 158 0 258 0 358 0 458 1 558 1 658 0 758 1 858 0 958 1 59 1 159 0 259 1 359 1 459 1 559 0 659 0 759 1 859 1 959 1 60 0 160 1 260 0 360 0 460 0 560 0 660 0 760 1 860 0 960 1 61 1 161 0 261 0 361 1 461 1 561 1 661 0 761 0 861 0 961 0 62 0 162 1 262 1 362 0 462 0 562 0 662 0 762 0 862 1 962 1 63 0 163 0 263 1 363 1 463 1 563 1 663 0 763 0 863 0 963 1 64 0 164 0 264 0 364 1 464 1 564 1 664 0 764 1 864 0 964 0 65 0 165 1 265 0 365 1 465 0 565 0 665 1 765 1 865 0 965 0 66 0 166 1 266 0 366 1 466 1 566 1 666 1 766 1 866 0 966 0 67 1 167 0 267 0 367 0 467 1 567 0 667 0 767 0 867 1 967 0 68 0 168 1 268 1 368 0 468 1 568 1 668 0 768 1 868 0 968 0 69 1 169 0 269 1 369 0 469 1 569 1 669 1 769 0 869 1 969 0 70 1 170 1 270 0 370 1 470 0 570 0 670 0 770 0 870 1 970 1 71 1 171 0 271 1 371 1 471 1 571 0 671 0 771 0 871 1 971 0 72 0 172 0 272 0 372 1 472 0 572 0 672 1 772 0 872 1 972 0 73 1 173 0 273 0 373 1 473 1 573 0 673 0 773 1 873 0 973 1 74 0 174 1 274 1 374 1 474 0 574 1 674 1 774 1 874 1 974 1 75 0 175 0 275 0 375 1 475 1 575 1 675 1 775 0 875 0 975 0 76 0 176 0 276 1 376 0 476 1 576 0 676 0 776 0 876 0 976 1 77 0 177 1 277 1 377 1 477 1 577 1 677 1 777 0 877 1 977 0 78 0 178 1 278 0 378 1 478 1 578 0 678 0 778 1 878 0 978 1 79 0 179 0 279 0 379 0 479 0 579 0 679 1 779 0 879 1 979 1 80 1 180 0 280 0 380 1 480 1 580 0 680 0 780 0 880 1 980 1 81 0 181 0 281 0 381 1 481 0 581 0 681 0 781 0 881 1 981 0 82 1 182 0 282 0 382 1 482 0 582 0 682 1 782 1 882 0 982 0 83 1 183 1 283 1 383 0 483 1 583 1 683 0 783 1 883 0 983 1 84 1 184 1 284 1 384 0 484 1 584 1 684 0 784 1 884 0 984 1 85 0 185 0 285 0 385 0 485 0 585 0 685 1 785 0 885 0 985 1 86 0 186 1 286 0 386 1 486 1 586 0 686 1 786 1 886 0 986 0 87 0 187 0 287 0 387 1 487 0 587 1 687 1 787 0 887 1 987 1 88 0 188 1 288 0 388 0 488 1 588 0 688 0 788 1 888 0 988 1 89 0 189 1 289 1 389 0 489 1 589 0 689 0 789 0 889 0 989 1 90 0 190 1 290 0 390 1 490 1 590 0 690 1 790 0 890 1 990 1 91 0 191 1 291 1 391 1 491 0 591 1 691 1 791 0 891 1 991 0 92 1 192 1 292 1 392 0 492 0 592 1 692 0 792 0 892 1 992 0 93 0 193 1 293 1 393 0 493 0 593 1 693 1 793 0 893 0 993 1 94 0 194 0 294 0 394 1 494 1 594 0 694 1 794 0 894 1 994 0 95 1 195 1 295 0 395 0 495 0 595 0 695 0 795 0 895 0 995 1 96 1 196 0 296 1 396 1 496 1 596 1 696 0 796 1 896 0 996 1 97 0 197 1 297 1 397 1 497 1 597 0 697 1 797 1 897 0 997 1 98 0 198 0 298 0 398 1 498 1 598 1 698 0 798 0 898 0 998 1 99 1 199 1 299 1 399 1 499 0 599 1 699 0 799 0 899 1 999 1 100 1 200 1 300 0 400 1 500 1 600 0 700 0 800 0 900 1 1000 1 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 37 School of Electronics, Communication and Electrical Engineering M.Sc. Final Project Report APPENCIES 3 CCK COMPLEX CODES 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 -1 -1 -1.61E-16 1.61E-16 -1 -1 1.61E-16 -1.61E-16 2.83E-16 -3.83E-16 1 1 -1 1 -2.83E-16 -1.61E-16 -1 -1.84E-16 2.83E-16 1 2.83E-16 -1 -1 6.12E-17 5.05E-16 -1 -1 1.84E-16 1 2.83E-16 -2.83E-16 -1 2.83E-16 2.83E-16 -1.61E-16 1.61E-16 -1 -1 -1 1 1 -1.61E-16 6.12E-17 -1 1 -1.61E-16 -6.12E-17 1 1 -1 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 2.83E-16 1.61E-16 2.83E-16 -1.61E-16 1 1 1 -1 -1 -1 1 -1 1 1 -1.84E-16 2.83E-16 1 1 2.83E-16 -1.61E-16 1 1 -1.84E-16 -1.84E-16 -1.84E-16 1.84E-16 -1 -1 1 -1 -1 -1.61E-16 -1 1.61E-16 -1 -1.61E-16 1 -1.61E-16 -3.83E-16 -1 -3.83E-16 1 1 -1.61E-16 -1 -1.61E-16 5.05E-16 -1 -3.83E-16 -1 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 1 2.83E-16 1 -1.61E-16 -1 3.06E-16 3.06E-16 -1 1 -1.84E-16 1.84E-16 -1 -1 2.83E-16 1 1.61E-16 -1.84E-16 -1 -6.12E-17 1 2.83E-16 2.83E-16 -1 1 1 1 -6.12E-17 6.12E-17 1 -1.84E-16 -1 -6.12E-17 1 -1.84E-16 1 6.12E-17 -1.84E-16 -1 -1 -2.83E-16 1 -1.84E-16 1.84E-16 -1 1 3.06E-16 -1 1.84E-16 -1.84E-16 1 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 -2.83E-16 -1 -1.84E-16 -1.84E-16 6.12E-17 -6.12E-17 -1 -1 -1 1 2.83E-16 2.83E-16 -1 1 1 1 -6.12E-17 6.12E-17 -1.84E-16 -1.84E-16 -1 1 -1.84E-16 -1.84E-16 1 -1 1 1 1 -1 6.12E-17 6.12E-17 -6.12E-17 6.12E-17 2.83E-16 1 -1 -2.83E-16 -1 2.83E-16 1.84E-16 -1 -1.84E-16 2.83E-16 2.83E-16 1.61E-16 1 -1 1 1 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 2.83E-16 1 -1 -6.12E-17 1 -1.61E-16 -6.12E-17 1 1 1 6.12E-17 -6.12E-17 1 1 -6.12E-17 6.12E-17 -1 1 -1 -1 -1 1 1 1 -1.84E-16 1 -1 1.84E-16 -1 -1.84E-16 -2.83E-16 -1 -1.84E-16 -1 -1 -6.12E-17 -1.84E-16 -1 1 6.12E-17 3.06E-16 -1.84E-16 3.06E-16 1.84E-16 1 -1 -1 -1 5.05E-16 -1 38 School of Electronics, Communication and Electrical Engineering 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 1 -2.83E-16 -3.83E-16 1 1 -1.61E-16 1 -1 -1.84E-16 -2.83E-16 -1 1 -2.83E-16 -1.61E-16 1 -1.84E-16 -1 -2.83E-16 -1 2.83E-16 -1 -1.61E-16 -1.84E-16 -1 6.12E-17 -1 -1.84E-16 -1 -6.12E-17 1 -1.61E-16 1 -1.61E-16 -1 -1.61E-16 1 1.61E-16 1 1 3.06E-16 -1 1.84E-16 -1.84E-16 1 -2.83E-16 -1 -1.84E-16 6.12E-17 -1 -1 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 -1.84E-16 6.12E-17 1 1 -1 1 -1 -1 -1.84E-16 6.12E-17 1.84E-16 6.12E-17 -1.84E-16 -1 -1.84E-16 1 -1.84E-16 -1 1.84E-16 -1 1 1 1 -1 -1 -1 1 -1 -3.83E-16 1 -1 1.61E-16 -3.83E-16 1 1 -1.61E-16 -1.61E-16 -1.61E-16 -1.61E-16 1.61E-16 -1.61E-16 -1.61E-16 1.61E-16 -1.61E-16 1 1 -1.84E-16 1.84E-16 -1.84E-16 -1.84E-16 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 1 -1 3.06E-16 1 -1.84E-16 1 -1.84E-16 -1 -6.12E-17 1 1 2.83E-16 2.83E-16 1 1 2.83E-16 -2.83E-16 -1 -8.27E-16 1 1 -2.83E-16 7.04E-16 -1 1 -1.61E-16 -1 2.83E-16 -1.84E-16 1 -1 2.83E-16 1.84E-16 -1 1 -1 -1.84E-16 -2.83E-16 -1 1 -2.83E-16 -1.61E-16 -3.83E-16 -1 1 1.61E-16 1 -1.61E-16 -6.12E-17 1 M.Sc. Final Project Report 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 -1 1 -1.84E-16 -2.83E-16 -1.84E-16 2.83E-16 -1 -1 1 -1 -1 -1 1 -1 1 1 1 -3.83E-16 -3.83E-16 1 2.83E-16 1 -1 -1.61E-16 -1.84E-16 -1 6.12E-17 -1 -1.84E-16 -1 -6.12E-17 1 -1.84E-16 -1.84E-16 6.12E-17 -6.12E-17 -1.84E-16 -1.84E-16 -6.12E-17 6.12E-17 -3.83E-16 -3.83E-16 1 -1 -1 -1 1.61E-16 -1.61E-16 -1 -3.83E-16 Ibrahim BadshahImplementation of Complimentary Code Keying using Simulink 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 7.04E-16 1 -3.83E-16 1 1 -1.61E-16 -1.84E-16 2.83E-16 2.83E-16 1.61E-16 1 -1 1 1 1 3.06E-16 -1 1.84E-16 -1 -1.84E-16 -1 6.12E-17 -1 -3.83E-16 -3.83E-16 -1 7.04E-16 -1 1 -1.61E-16 1 2.83E-16 -3.83E-16 -1 -3.83E-16 1 1 -1.61E-16 1 1 -1.84E-16 1.84E-16 -1.84E-16 -1.84E-16 1 -1 1 -1.84E-16 -1 -6.12E-17 39