The post Migrated to Amazon EC2 instance (from shared hosting) appeared first on DSP log.

]]>One particular issue which I faced was frequent crashing of MySQL due to memory limitations. Followed few online instructions to improve the situation and the current configuration seems to be holding up (but this is a cause of worry – need to figure the right solution).

Anyhow, hope you like the decreased page load time!

**Some helpful links from the web:**

a) How to install WordPress on Amazone EC2

b) Move WordPress site from shared hosting to Amazon EC2

c) DIY: Enable CGI on your Apache server

d) Import MySQL Dumpfile, SQL Datafile Into My Database

e) Making WordPress Stable on EC2-Micro

f) how to enable mod_rewrite in apache2.2 (debian/ubuntu)

The post Migrated to Amazon EC2 instance (from shared hosting) appeared first on DSP log.

]]>The post GATE-2012 ECE Q28 (electromagnetics) appeared first on DSP log.

]]>To answer this question, let us first understand the propagation in a transmission line, termination and the concept of impedance matching. The **section 2.1 in Microwave Engineering, David M Pozar (buy from Amazon.com, Buy from Flipkart.com) ** is used as reference.

Consider a transmission line of very small length having the parameters as show in figure below.

**Figure : Transmission line model (Reference Figure 2.1 in Microwave Engineering, David M Pozar (buy from Amazon.com, Buy from Flipkart.com)**

is the resistance per unit length ,

is the inductance per unit length ,

is the conductance per unit length ,

is the capacitance per unit length.

Applying Kirchoff’s voltage law,

Applying Kirchoff’s current law,

Dividing the above equations by and taking the limit ,

If we assume that the inputs are sinusoidal, then the above equation can be re-written as

Substituting,

,

,

where

.

The solution to the above equations are,

.

The current on the line can be alternately expressed as,

,

where the characteristic impedance of the line is defined as,

.

The wavelength on the line is,

.

**Loss less transmission line case**

For a lossless transmission line, we can set .

Then the propagation constant reduces to, the characteristic impedance is and the voltage and current on the line can be written as,

Consider a transmission line terminated with load impedance as shown in figure below.

**Figure: Transmission line with load impedance (Reference Figure 2.4 in Microwave Engineering, David M Pozar (buy from Amazon.com, Buy from Flipkart.com)**

At the load , the relation between the total voltage and current is related to the load impedance

.

Alternatively,

.

The reflection coefficient is defined as the amplitude of the reflected voltage to the incident voltage,

.

**For no reflection to happen, i.e , the load impedance should be equal to the characteristic impedance of the transmission line. The above equation captures the impedance seen at the load . **

The voltage and current on the line can be represented using ** **as,

When looking from a point from the load, the input impedance seen is,

.

Substituting for **, **

.

**Special case when (and it’s odd multiples)**

For the case when the input impedance seen is,

.

This result can be used to for impedance matching.

Consider a circuit with load and a line with characteristic impedance connected by a transmission line of characteristic impedance with length .

**Figure: Quarter Wave Matching transformer (Reference Figure 2.16 in Microwave Engineering, David M Pozar (buy from Amazon.com, Buy from Flipkart.com)**

The input impedance seen is,

.

So if we choose , then the input impedance seen is which is the condition required for having no reflection i.e. .

One important aspect to note here is that is not guaranteed for all frequencies, but rather only for certain frequencies. The frequency dependence can be found by finding the frequencies for which .

Replacing where is the wave length corresponding to frequency ,

.

It can be seen that only for , the term resulting in reflection coefficient only for those frequencies.

Applying all this to the problem at hand, we have , and .

Given that , we know that a quarter wave transformer is used to achieve impedance matching.

Now we also know that we need to match for two frequencies and .

The wavelength for each frequencies are,

The least common multiple of these two wavelength is, and the corresponding quarter wave length is .

Given than is not listed in the options, we can go for the next higher odd multiple i.e.

**Based on the above, the right choice is (C) 1.58m**

[1] GATE Examination Question Papers [Previous Years] from Indian Institute of Technology, Madras http://gate.iitm.ac.in/gateqps/2012/ec.pdf

[2] **Microwave Engineering, David M Pozar (buy from Amazon.com, Buy from Flipkart.com) **

The post GATE-2012 ECE Q28 (electromagnetics) appeared first on DSP log.

]]>The post Image Rejection Ratio (IMRR) with transmit IQ gain/phase imbalance appeared first on DSP log.

]]>

Consider an IQ modulator having gain of and on each arm and phase imbalance of as shown in figure below.

**Figure : IQ modulator with gain and phase imbalance**

The output signal is,

.

Considering an ideal IQ demodulator multiplying the received signal with and respectively,

.

.

Ignoring the common term and writing the base band equivalent form,

.

**This is the model for transmit IQ imbalance. **

By sending a complex sinusoidal , and by taking ratio of the power of the signal at the image frequency and desired frequency , the image rejection ratio can be computed.

Let and correspondingly, and .

**Finding the component**

To find the component, multiply the received signal with and integrate over period .

The power of the component is,

**Finding the component**

To find the component, multiply the received signal with and integrate over period .

**The Image Rejection Ratio (IMRR) is**

.

Substituting and with variable and , the equation simplifies to,

.

**A useful approximation to IMRR**

When there is no phase imbalance i.e , the equation reduces to,

.

When there is no gain imbalance i.e , the equation reduces to,

.

As these two are independent, they can be added to give an approximate value of Image Rejection Ratio.

**Summarizing, the Image Rejection Ratio for a given value of gain imbalance and phase imbalance is,**

.

**Simulation Results**

Simple Matlab/Octave code plotting the simulated and theoretical values of Image Rejection for different values of gain and phase imbalance.

clear; close all N = 64; fm = 2; gammadB_v = [-3:.1:3]; phiDeg_v = [-6:.2:6]; [tt gammadB_zeroIdx ] = min(abs((gammadB_v-0))); [tt phiDeg_zeroIdx ] = min(abs((phiDeg_v-0))); for (ii = 1:length(gammadB_v)) for (jj = 1:length(phiDeg_v)) gammadB = gammadB_v(ii); phiDeg = phiDeg_v(jj); gammaLin = 10^(gammadB/20); phiRad = phiDeg*pi/180; epsilonLin = gammaLin -1 ; % transmitted signal xt = exp(j*2*pi*fm*[0:N-1]/N); % received signal with IQ imbalance xht_re = gammaLin*cos(phiRad/2)*real(xt) + sin(phiRad/2)*imag(xt); xht_im = gammaLin*sin(phiRad/2)*real(xt) + cos(phiRad/2)*imag(xt); xht = xht_re + j*xht_im; % taking ifft() to find the +fm and -fm components yF = fft(xht,N); y_pfm = yF(fm+1); y_nfm = yF(N-fm+1); est_imrr_lin = (abs(y_nfm)./abs(y_pfm))^2; theory_imrr_lin = (gammaLin^2 + 1 - 2*gammaLin*cos(phiRad))./(gammaLin^2 + 1 + 2*gammaLin*cos(phiRad)); approx_imrr_lin = (epsilonLin^2 + phiRad^2)/4; est_imrr_dB(ii,jj) = 10*log10(est_imrr_lin); theory_imrr_dB(ii,jj) = 10*log10(theory_imrr_lin); approx_imrr_dB(ii,jj) = 10*log10(approx_imrr_lin); end end figure plot(gammadB_v,theory_imrr_dB(:,phiDeg_zeroIdx),'bs-'); hold on plot(gammadB_v,est_imrr_dB(:,phiDeg_zeroIdx),'md-'); plot(gammadB_v,approx_imrr_dB(:,phiDeg_zeroIdx),'gx-'); xlabel('gain imbalance, dB'); ylabel('image rejection, dB'); grid on; legend('theory','estimated','approx') title('Image Rejection Ratio with gain imbalance alone'); axis([-3 3 -50 -10]); figure plot(phiDeg_v,theory_imrr_dB(gammadB_zeroIdx,:),'bs-'); hold on plot(phiDeg_v,est_imrr_dB(gammadB_zeroIdx,:),'md-'); plot(phiDeg_v,approx_imrr_dB(gammadB_zeroIdx,:),'gx-'); xlabel('phase imbalance, degree'); ylabel('image rejection, dB'); grid on; legend('theory','estimated','approx') title('Image Rejection Ratio with phase imbalance alone'); axis([-6 6 -50 -20]);

**Figure : Image Rejection Ratio (IMRR) with gain imbalance alone**

**Figure : Image Rejection Ratio (IMRR) with phase imbalance alone**

**Observations**

1) The approximate expression holds good for reasonable values of gain and phase imbalance.

2) As a rule of thumb, the following numbers are useful :

** – For 1 degree of phase imbalance, the Image Rejection Ratio (IMRR) is around -41dB**

** – For 1dB of gain imbalance, the Image Rejection Ratio (IMRR) is around -25dB**

**[1] Cavers, J.K.; Liao, M.W.; , “Adaptive compensation for imbalance and offset losses in direct conversion transceivers,” Vehicular Technology, IEEE Transactions on , vol.42, no.4, pp.581-588, Nov 1993 doi: 10.1109/25.260752**

[2] Table of trignometric identities http://www.sosmath.com/trig/Trig5/trig5/trig5.html

The post Image Rejection Ratio (IMRR) with transmit IQ gain/phase imbalance appeared first on DSP log.

]]>The post GATE-2012 ECE Q15 (communication) appeared first on DSP log.

]]>Entropy of a random variable is defined as ,

.

**Refer **Chapter 2 in Elements of Information Theory, Thomas M. Cover, Joy A. Thomas (Buy from Amazon.com, Buy from Flipkart.com)

Let us consider a simple case where can take two values 1 and 0 with probability and respectively, i.e.

.

The entropy of is,

.

The plot of the entropy versus the probability is shown in the figure below.

clear all; close p = [0:.001:1]; hx = -p.*log2(p) - (1-p).*log2(1-p); plot(p,hx); xlabel('probability, p'); ylabel('H(X)'); title('entropy versus probability, p'); axis([0 1 0 1]);grid on;

**Figure : Entropy versus probability for binary symmetric source**

It can be see that the entropy (also termed as uncertainty) is maximum when and for other values of , the entropy is lower. The entropy becomes 0 when i.e. when the value of becomes deterministic. If we extend this to a source with more than two symbols, **when probability of one of the symbols becomes more higher than the other, the uncertainty decreases and hence entropy also decreases**.

**Based on the above, the right choice is (D) decreases**

** **

[1] GATE Examination Question Papers [Previous Years] from Indian Institute of Technology, Madras http://gate.iitm.ac.in/gateqps/2012/ec.pdf

**[2] Elements of Information Theory, Thomas M. Cover, Joy A. Thomas (Buy from Amazon.com, Buy from Flipkart.com)**

The post GATE-2012 ECE Q15 (communication) appeared first on DSP log.

]]>The post GATE-2012 ECE Q7 (digital) appeared first on DSP log.

]]>Let’s write all the 16 possible combinations of A and B and count the number of times A is greater than B. Can easily see that the count is 16.

A |
B |
Out |

0 | 0 | 0 |

0 | 1 | 0 |

0 | 2 | 0 |

0 | 3 | 0 |

1 | 0 | 1 |

1 | 1 | 0 |

1 | 2 | 0 |

1 | 3 | 0 |

2 | 0 | 1 |

2 | 1 | 1 |

2 | 2 | 0 |

2 | 3 | 0 |

3 | 0 | 1 |

3 | 1 | 1 |

3 | 2 | 1 |

3 | 3 | 0 |

TOTAL |
6 |

Alternately, pick each value of A and count the number of instances when A is greater than B. The count is 0 + 1 + 2 + 3 for A = 0,1,2,3 respectively.

**Based on the above, the right choice is (B) 6**

** **

[1] GATE Examination Question Papers [Previous Years] from Indian Institute of Technology, Madras http://gate.iitm.ac.in/gateqps/2012/ec.pdf

The post GATE-2012 ECE Q7 (digital) appeared first on DSP log.

]]>The post GATE-2012 ECE Q13 (circuits) appeared first on DSP log.

]]>The first half of the circuit is a **negative clamper circui**t and the second half is a **peak detector circuit** as shown in the figure below.

(Discussed in** **Section 3.8** of MicroElectronic Circuits Sedra/Smith (from Amazon.com, from Flipkart.com) **or in Chapter 6.17 of **Millman’s Electronic Devices and Circuits (from Amazon.com, from Flipkart.com)**

The negative clamper circuit works as follows :

The diode D1 will be initially conducting till the voltage across the capacitor C1 is charged to the peak voltage of 1 volts. In the following cyclesDuring the first half of the +ve cycle, the diode D1 will be ON and the capacitor is charged to peak voltage. The diode D1 will remain OFF during the further cycles and the voltage is given by,

The second half of the circuit i.e the peak detector circuit, provides a negative voltage of -2 volts at the output of capacitor C2. Anyhow, given that we are only interested in the output of the negative clamper, the voltage is

**Based on the above, the right choice is (A) 1**

** **

[2]** MicroElectronic Circuits Sedra/Smith (Buy from Amazon.com, Buy from Flipkart.com) **

[3] **Millman’s Electronic Devices and Circuits ( Buy from Amazon.com, Buy from Flipkart.com)**

The post GATE-2012 ECE Q13 (circuits) appeared first on DSP log.

]]>The post GATE-2012 ECE Q34 (signals) appeared first on DSP log.

]]>

Let us Laplace transform to find and later

The Laplace transform of function’s derivative is

, where with real numbers and .

Using integration by parts,

.

Rearranging,

.

Extending this to find the Laplace Transform of the second derivative of the function,

.

Coming back to the problem,

Taking Laplace transform,

.

To find the inverse Laplace transform, let us revisit the Laplace transform for some simple functions.

For , the Laplace transform is,

.

From the discussion in the post on Q11 in GATE 2012,

.

Also from the earlier discussion in this post,

Applying the above equations to find the inverse Laplace transform

.

Taking the differential,

.

Plugging in ,

**Based on the above, the right choice is (D) 1**

** **

[2] Wiki entry on Laplace transform of function’s derivative

The post GATE-2012 ECE Q34 (signals) appeared first on DSP log.

]]>