Simplification in Design of Wireless Systems: 5 Useful Steps

As we all know, wireless is the preferred method of connectivity between most of our devices. This is going to take more precedence in coming years. The number of connected devices per person and the demand for fast, reliable content delivery within a network is rapidly increasing. Add that to the already ongoing craze of developing IoT devices and the super-scaling of server farms to support them. In my view, RF, DSP and embedded systems engineers will have a lot going on. This shift is largely dependent on the wireless systems we build. In this post, I try to figure out the best way forward in design of wireless systems.

 

The RF spectrum houses a number of wireless standards and medium in use today, these include WiFi, Bluetooth, FM broadcast, DVB-T, DAB, GSM, UTMS, LTE, WLAN, radar. The upcoming 5G standards are yet to be agreed upon as I illustrated here, but we can consider some technologies already in use today such as MIMO and MU-MIMO. Engineers responsible for the development of these systems are aware of the standards involved, however, they are required to understand a vast number of fields during the design phase that implementation takes a lot of time. This, of course, is uneconomical in the fast paced world we live in. Fortunately, engineers have figured out that the design process could be simplified into 5 major blocks:

  1. Modelling and simulation of digital, RF and antenna systems
  2. Optimization of design algorithms
  3. Automatic HDL and C code for hardware and software implementation
  4. Prototype design and testing with SDR hardware
  5. Iterative verification using model as a reference

 

Modelling and Simulation

There are a number of softwares in use for modelling. In today’s case, we will consider MATLAB (free alternative GNU Octave). MATLAB is a renowned development kit for engineers and scientists. It is rare that you find something you can’t do with this software and its additional toolboxes. Must be why it costs a kidney, but it’s a good place to start. Simulink is an environment within MATLAB that you use to perform model-based design. I’ve developed  a simple communications link, Figure 1, that I can use as a basis of further developments.

Figure 1: Simple communications link designed in MATLAB Simulink

The model in Figure 1 is initiated by the following script:


bitRate = 1000000;
numBitsPerFrame = 100;
bitsPerSymbol = 2;
numTrainSyms = 30;
pulseDelay = 8;
oversampleFactor = 8;
rolloffFactor = 0.2;
modOrder = 2^bitsPerSymbol;
numDataSymsPerFrame = numBitsPerFrame / bitsPerSymbol;
numSymsPerFrame = numDataSymsPerFrame + numTrainSyms;
trainSig = pskmod(randi([0, modOrder-1],numTrainSyms,1)...
,modOrder, pi/modOrder );

maxDoppler = 10;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
numEqWeights = 15;
refTap = 8;
lambda = 0.95;
snrdB = 30;

symbolPeriod = bitsPerSymbol/bitRate;
chanSamplePeriod = symbolPeriod/oversampleFactor * 50/80;

pathDelays = [0 chanSamplePeriod];
pathGains = [0 -6];

numDataSymsPerFrame = numBitsPerFrame / bitsPerSymbol;
numSymsPerFrame = numDataSymsPerFrame + numTrainSyms;

 

The model above used the DSP System Toolbox and Communication System Toolbox. This model can be useful in the following ways:

  • a starting point of system level design and verification
  • a test-bench of design algorithms written in C language
  • a point of generation of C or HDL code for use in DSP/FPGA implementation

This model also allows us to simulate the results of our input and process variables to ensure we are getting the desired outputs.

 

Algorithm Design and Optimization

Algorithms are the coded processes within a process block of a program. It defines what steps are in between the START and STOP operations of a process. Simple well known algorithms are flow control loops, error handling and on higher level languages we have object oriented programming (OOP). A while back I wrote an article touching on FFT algorithms.

Many programming environments are set up with debugging features for your code. They analyze and give warnings of bad syntax and compile errors. This is particularly useful before running bad code into your hardware that may bring firmware failure. The best environments go a step further and allow you to optimize your code. You can set break points to see what happens when your program reaches a certain step, allowing you to tweak your variables accordingly. Very useful in precise calculations, characteristic of antenna design.

A feature of MATLAB called Profiler allows you to run your algorithm while measuring its performance. It then generates a profile with details of the areas of your code that could use some improvement. This is based on the time the section took to run and how much of the processing resources it required.

 

HDL and C code Generation

Hardware Description Language (HDL) and C/C++ language are pretty similar languages used in design and implementation of integrated circuits on supported microcontrollers, microprocessors or FPGA devices. They are the core of every embedded system, like in Figure 2, a Xilinx FPGA board.

Figure 2: A Xilinx FPGA programming board, this can be used in tandem with a SDR to test a number of wireless parameters

While developing complex wireless systems involving several devices, it is inefficient to separate simulated algorithms and IC programming. A software like MATLAB enables the automatic generation of HDL and C code using MATLAB Coder. To illustrate, we will generate C code from a Kalman filter algorithm. A Kalman filter is an optimal estimation algorithm used for parameter prediction. It is quite popular and used in the fields of vehicle navigation and guidance, computer vision  and wireless systems design. MathWorks provides a write up of the example in use. In that example kalmanfilter.m is my function file and ObjTrack.m is my algorithm which defines inputs, runs the Kalman filter and plots it in a graph, Figure 3.

Figure 3: Graph of an object trajectory with a predicted estimate of its trajectory using a Kalman filter

 

Conversion involves using the MATLAB Coder. Add the function on the entry point file and define its inputs types after which go ahead and build the C code, Figure 4. The generated C code can be obtained from your MATLAB code directory.

Figure 4: C code generation procedure

 

SDR Hardware Prototypes

Software-defined radios (SDRs) deserve a post of their own and thus will be briefly covered here. Basically these are computers whose components, traditionally implemented in hardware, are implemented through software. This means that the filters,  amplifiers, modulators/demodulators are implemented using programming languages. In the previous section we discussed how to perform code generation. What SDRs offer is the flexibility to test and implement wireless designs and architecture with the provision to add more features in future. SDRs are used in conjunction with FPGA, GPP (general purpose processors), DSP or ASIC (application specific ICs) to implement various wireless architectures.

It is a low cost method that is becoming increasingly popular in wireless systems design.

 

Verification

Finally, the system is rigorously verified using simulated and on-field test parameters to ensure the best product is designed. Verification is a core practice of the best systems engineers as we covered here.

 

Conclusion

Wireless systems design is a daunting task. I conducted one in my final year school project and since have been thinking on ways it could have been done better. If you have made it this far, we are wiser now. These processes will become even more refined as I use them throughout my engineering life. If you are a seasoned designer perhaps this post is too simple and I’d like to have any more tips and pointers from you if you are one. Myself and anyone else reading would appreciate. Think I’ve convinced you enough to use this method in your next project? Tell me about it.

Leave a Reply

Your email address will not be published. Required fields are marked *