## Modeling phase noise (frequency domain approach)

In typical wireless system simulations, there is  a need to model the phase noise profile of the local oscillator. For eg, the phase noise profile of the oscillator can be of the shape described in the post on Phase Noise Power Spectral Density to Jitter. While looking around for example Matlab code, found two references…

## Weighted Least Squares and locally weighted linear regression

From the post on Closed Form Solution for Linear regression, we computed the parameter vector  which minimizes the square of the error between the predicted value  and the actual output  for all  values in the training set. In that model all the  values in the training set is given equal importance.  Let us consider the case where it is known…

## Least Squares in Gaussian Noise – Maximum Likelihood

From the previous posts on Linear Regression (using Batch Gradient descent, Stochastic Gradient Descent, Closed form solution), we discussed couple of different ways to estimate the  parameter vector in the least square error sense for the given training set. However, how does the least square error criterion work when the training set is corrupted by…

## Newton’s method to find square root, inverse

Some of us would have used Newton’s method (also known as Newton-Raphson method) in some form or other. The method has quite a bit of history,  starting with the Babylonian way of finding the square root and later over centuries reaching the present recursive way of finding the solution. In this post, we will describe…

## Closed form solution for linear regression

In the previous post on Batch Gradient Descent and Stochastic Gradient Descent, we looked at two iterative methods for finding the parameter vector  which minimizes the square of the error between the predicted value  and the actual output  for all  values in the training set. A closed form solution for finding the parameter vector  is possible, and in this post…

For curve fitting using linear regression, there exists a minor variant of Batch Gradient Descent algorithm, called Stochastic Gradient Descent. In the Batch Gradient Descent, the parameter vector  is updated as, . (loop over all elements of training set in one iteration) For Stochastic Gradient Descent, the vector gets updated as, at each iteration the…

I happened to stumble on Prof. Andrew Ng’s Machine Learning classes which are available online as part of Stanford Center for Professional Development. The first lecture in the series discuss the topic of fitting parameters for a given data set using linear regression.  For understanding this concept, I chose to take data from the top…

## Approximate Vector Magnitude Computation

In this post, let us discuss a simple implementation friendly scheme for computing the absolute value of a complex number . The technique called (alpha Max + beta Min) algorithm is discussed in Chapter 13.2 of Understanding Digital Signal Processing, Richard Lyons and is also available online at Digital Signal Processing Tricks – High-speed vector…

## Linear to log conversion

In signal processing blocks like power estimation used in digital communication, it may be required to represent the estimate in log scale. This post explains a simple linear to log conversion scheme proposed in the DSP Guru column on DSP Trick: Quick-and-Dirty Logarithms. The scheme makes implementation of a linear to log conversion simple and…

## Negative Frequency

Last week, I received an email from Mr. Kishore. He was wondering about the physical significance of negative frequency. Does negative frequency really exist? Though I have seen conflicting views on the net (thread in complextoreal.com, thread in comp.dsp), my perspective is that negative frequency exist. The concept of negative frequency helps me a lot…

## Chi Square Random Variable

While trying to derive the theoretical bit error rate (BER) for BPSK modulation in a Rayleigh fading channel, I realized that I need to discuss chi square random variable prior. What is chi-square random variable? Let there be independent and identically distributed Gaussian random variables with mean and variance and we form a new random…

## Deriving PDF of Rayleigh random variable

In the post on Rayleigh channel model, we stated that a circularly symmetric random variable is of the form , where real and imaginary parts are zero mean independent and identically distributed (iid) Gaussian random variables. The magnitude which has the probability density, is called a Rayleigh random variable. Further, the phase is uniformly distributed from…

## Update: Correction in Matlab code for raised cosine filter

Thanks to the keen observation by Mr. Phan Minh Hoang, I was notified that the Matlab/Octave scripts provided along with the topic raised cosine filtering was not behaving properly. Reason: I was not taking care of the division by zero when creating the raised cosine filter taps. 🙁

## Using CORDIC for phase and magnitude computation

In a previous post (here), we looked at using CORDIC (Co-ordinate Rotation by DIgital Computer) for understanding how a complex number can be rotated by an angle without using actual multipliers. Let us know try to understand how we can use CORDIC for finding the phase and magnitude of a complex number. Basics The CORDIC…