Numerical Techniques (Basic)

This page contains some basic Numerical techniques problems. Some problems regarding curve fitting, differential equation solving, nonlinear equation solving, numerical integration, system of linear equations etc. are given here. PDF files of the questions and solution are available to download. MATLAB codes of all the problems are also available for download.

Curve Fitting

Question 1:

Okumura/Hata model describes the signal path loss (in dB) of a mobile-cellular system. The truncated version of the Okumura/Hata model is given by:

Here, d = distance between mobile-station and base-station (in km).

fc = Carrier frequency (in MHz) (it is a constant).

a = a constant.

From the following experimental data, find fc and a. Also plot the function.

[Hint: Use curve fitting techniques. Convert the equation into the form y = mx + c. Find the co-efficients of the equation from linear curve fitting. From those co-efficients, find fc and a]

Download Question and Answer Download MATLAB Codes

Answer 1:

fc = 890.006 MHz (Standard operating frequency of GSM system)

a = 44.9

Differential Equation Solving

Question 1:

Consider a RL series circuit driven by an AC voltage source. The frequency of the voltage source is 100Hz and its peak amplitude is 1 volt. The circuit parameters are: R = 40 Ω and L = 0.05 H. Plot source voltage and the inductor voltage on the same graph for t = 0 to 0.06 second. Assume that the initial value of the inductor current is 0 at t = 0. Choose a step size of 0.0001 second. The calculation must be done numerically.

Download Question and Answer Download MATLAB Codes

Answer 1:

Nonlinear Equation Solving

Question 1:

Consider the following equation:

Find the root of the equation located between x = 3 and x = 4 using Newton-Raphson method as well as Bisection method. Set total number of iterations = 16 for both cases. For Newton-Raphson method, choose initial value of the root to be 3. For Bisection method, use x = 3 and x = 4 as the boundary values. For both algorithms, evaluate relative error at each iterative step. Relative error, r.e., is defined as:

Here, x(i+1) = root estimated at (i+1)th iteration, x(i) = root estimated at ith iteration. Note there is an absolute value, so r.e. is always positive.

Plot the Relative error vs iteration number for Newton-Raphson method and Bisection method on the same plot. The y-axis should be in log scale [for this, use semilogy(.) function]. From the graph, comment on which technique will give the result faster if we consider acceptable relative error to be (i) 10-4 and (ii) 10-6.

[Hint: You should have two arrays of length 16. One array will contain the relative errors for the Newton-Raphson method and the other will contain relative errors for the Bisection method.]

Download Question and Answer Download MATLAB Codes

Answer 1:

Root, x = 3.946727599893295

From the curve, it can be seen that for relative error = 10-4, the bisection method converges faster. But for relative error = 10-6, Newton-Raphson method coverges faster.

Numerical Integration

Question 1:

The normalized Gaussian distribution function F(x) is given by the following equation:

For numerical evaluation of this integration, assume the lower limit of the integration to be – 3. Plot F(x) for x = -3 to 3. Use a step size of h = 0.01.

[Hint: Use trapezoidal rule. Assume F(-3) = 0. Store the value of the integration in an array at each step. Note that the integration is cumulative, so add the value of the integration from the previous step to the current step.]

Download Question and Answer Download MATLAB Codes

Answer 1:

Numeric integration (Gaussian distribution function):

System of Linear Equations

Question 1:

Solve the following set of linear equations using Gauss-Seidel iterative method. Perform 100 iterations.

Show that without changing the order of the equations, the iterative method does not converge and shows oscillatory behavior. Also show that after appropriate interchange of equations, the method converges. To check of convergence/divergence, use relative error parameter. It is defined as:

[Hints: Plot relative error vs. number of iterations. The y-axis should be in log scale. Use semilogy(.) command.]

Download Question and Answer Download MATLAB Codes

Answer 1:

Solution without changing order of the equations

x1 = -2.607641937712129e+067

x2 = 1.194111617833575e+068

x3 = -4.158717916554396e+068

Solution after changing order of the equations

x1 = -1.742268041237114

x2 = -2.670103092783505

x3 = -4.164948453608248

This page was last updated on: 6th November, 2011.