MATLAB vs Python Computational Speed

Windows Edition Windows 8.1 Pro System Processor Intel(R) Core(TM) i7-5500U CPU @ 2.4GHz Installed Memory 8.00 GB System Type 64 Bit Operating System, x64 Based Processor Integrated Development Environment (IDE) Enthought Canopy Version 2.1.3.3542 (32 bit) Operation Time in sec (MATLAB) Time in sec (PYTHON) 10 million uniform random variable generation 0.10 0.15 10 million normal random variable generation 0.13 0.40 for loop counting up to 100 million 0.40 11.60 Comparing two vectors of length 10 million each 0.39 0.55 Plotting a histogram of 10 million values 0.89 0.76 Plotting a scatter plot of 1 million values 0.30 0.23 Bit […]

Read more

BPSK Bit Error Rate Calculation Using Python

Have you ever thought about how life would be without MATLAB. As it turns out there are free and open source options such as Python. We have so far restricted ourselves to MATLAB in this blog but now we venture out to find out what are the other options. Given below is a most basic Python code that calculates the Bit Error Rate of Binary Phase Shift Keying (BPSK). Compare this to our MATLAB implementation earlier [BPSK BER]. There are various IDEs available for writing your code but I have used Enthought Canopy Editor (32 bit) which is free to […]

Read more

Knife Edge Diffraction Model

Diffraction is a phenomenon where electromagnetic waves (such as light waves) bend around corners to reach places which are otherwise not reachable i.e. not in the line of sight. In technical jargon such regions are also called shadowed regions (the term again drawn from the physics of light). This phenomenon can be explained by Huygen’s principle which states that “as a plane wave propagates in a particular direction each new point along the wavefront is a source of secondary waves”.

Read more

Reflection vs Scattering in Ray-Tracing

In ray-tracing simulations one is faced with a complexity at points of intersection between rays and objects. How to handle the reflection, should it be specular or scattered. In this post we consider the two extreme cases; pure reflection vs scattering. For this we consider that in the case of specular reflection the power of the ray is reduced by 3dB (that is R=0.5) and the ray continues as it would if there was no interaction with the object (off course direction would be changed with angle of reflection being equal to angle of incidence). In the case of scattered […]

Read more

How to Find Point of Intersection of Two Lines

Finding the point of intersection of two lines has many important application such as in Ray-Tracing Simulation.  Two lines always intersect at some point unless they are absolutely parallel, like the rails of a railway track. We start with writing the equations of the two lines in slope-intercept form. y1=b1+m1*x1 y2=b2+m2*x2 Here m1 and m2 are the slopes of the two lines and b1 and b2 are their y-intercepts. At the point of intesection y1=y2, so we have. b1+m1*x1=b2+m2*x2 But at  the point of intersection x1=x2 as well, so replacing x1 and x2 with x we have. b1+m1*x=b2+m2*x or b1-b2=-x*(m1-m2) […]

Read more

Shannon Capacity CDMA vs OFDMA

We have previously discussed Shannon Capacity of CDMA and OFMDA, here we will discuss it again in a bit more detail. Let us assume that we have 20 MHz bandwidth for both the systems which is divided amongst 20 users. For OFDMA we assume that each user gets 1 MHz bandwidth and there are no guard bands or pilot carriers. For CDMA we assume that each user utilizes full 20 MHz bandwidth. We can say that for OFDMA each user has a dedicated channel whereas for CDMA the channel is shared between 20 simultaneous users. We know that Shannon Capacity […]

Read more

Udemy Course

Introduction to Wireless Communications • In this course you will learn the basic principles of wireless communications from 1G to 5G and beyond. You will learn about frequency reuse, capacity, channel coding, modulation and demodulation, OFDM, MIMO, and a host of other topics. • This course is for you if you are a student and have just started learning about wireless communications or if you are a guy in the field who wants to get a better handle on the fundamental concepts of wireless communications. Here is the link to the course.

Read more

Noise Calibration in Simulation of Communication Systems

We have been using a wireless signal model in our simulations without going into the details of noise calibration for simulation. In this article we discuss this. Lets assume the received signal is given as r(t)=s(t)+n(t) where r(t) is the received signal s(t) is the transmitted signal and n(t) is the Additive White Gaussian Noise (AWGN). Channel fading is ignored at the moment. Signal to noise ratio for simulation of digital communication systems is given as ρ=Eb/No (1) Where Eb is the energy per bit and No is the noise Power Spectral Density (PSD). We also know that for the case […]

Read more

Modified Young’s Fading Simulator

In the previous posts we had discussed generation of a correlated Rayleigh fading sequence using Smith’s method [1] and Young’s modification of Smith’s method [2]. The main contribution of Young was that he proposed a mechanism where the number of IDFTs was reduced by half. This was achieved by first adding two length N IID zero mean Gaussian sequences filtered by the filter F[k] and then performing the IDFT on the resulting complex sequence. This was different to Smith’s method where the IDFT was performed simultaneously on two branches and then the outputs of these branches were added in quadrature […]

Read more