Sunday, 19 May 2013

Wave Equation Solution using Finite Difference Method in MATLAB

Problem:- solve the Wave equation







Copy and Paste the following code in MATLAB command window or Matlab Editor and press F5 or run.
See the result.

MATLAB program::


% To solve wave equation using finite difference method
% By antennatutorials.com
% phitt=phixx            0<x<1
% boundary conditions
% phi(0,t)=0=phi(1,t)    t>=0
% iniital conditions
% phi(x,0)=sin(pi*x)     0<x<1
% phit(x,0)=0            0<x<1

% define no. of steps for r =1
clc
x=0 :0.1 :1;
t=0:0.1:1;
N=10;
%define stepsize
dx=0.1;
dt=0.1;
phi=zeros(11,11);
%Boundary condition
phi(:,1)=0;
phi(:,11)=0;
phi(1,:)= sin(pi.*x);
%initial condition
for i=2:10
phi(2,i)=0.5*(phi(1,i+1) + phi (1,i-1));
end
for j=2:10
    for i=2:10
        phi(j+1,i)=phi(j,i+1)+phi(j,i-1)-phi(j-1,i);
    end
end

fprintf(1,'value of phi in matrix form \n')

fprintf(1,'By antennatutorials.com \n')
fprintf(1,'-------\t-------\t------\n')

phi
[x t]= meshgrid(x,t);
surf(x,t,phi)
axis([0 1 0 1 -1 1])
xlabel('X distance')
ylabel('time ')
zlabel('value of \phi')
text(0,0.4,0.4,'By antennatutorials.com');
title ('wave function as a function of time and distance By antennatutorials.com');

Results::


value of phi in matrix form
------- ------

phi =

         0    0.3090    0.5878    0.8090    0.9511    1.0000    0.9511    0.8090    0.5878    0.3090    0.0000
         0    0.2939    0.5590    0.7694    0.9045    0.9511    0.9045    0.7694    0.5590    0.2939         0
         0    0.2500    0.4755    0.6545    0.7694    0.8090    0.7694    0.6545    0.4755    0.2500         0
         0    0.1816    0.3455    0.4755    0.5590    0.5878    0.5590    0.4755    0.3455    0.1816         0
         0    0.0955    0.1816    0.2500    0.2939    0.3090    0.2939    0.2500    0.1816    0.0955         0
         0         0   -0.0000         0         0   -0.0000         0         0    0.0000   -0.0000         0
         0   -0.0955   -0.1816   -0.2500   -0.2939   -0.3090   -0.2939   -0.2500   -0.1816   -0.0955         0
         0   -0.1816   -0.3455   -0.4755   -0.5590   -0.5878   -0.5590   -0.4755   -0.3455   -0.1816         0
         0   -0.2500   -0.4755   -0.6545   -0.7694   -0.8090   -0.7694   -0.6545   -0.4755   -0.2500         0
         0   -0.2939   -0.5590   -0.7694   -0.9045   -0.9511   -0.9045   -0.7694   -0.5590   -0.2939         0
         0   -0.3090   -0.5878   -0.8090   -0.9511   -1.0000   -0.9511   -0.8090   -0.5878   -0.3090         0




Sunday, 12 May 2013

Comparison of Waveguide and Transmission Line Characteristics


Transmission line






• Two or more conductors separated by some insulating medium (two-wire, coaxial, microstrip, etc.).


• Normal operating mode is the TEM or quasi-TEM mode (can support TE and TM modes but these modes  are typically undesirable).

• No cutoff frequency for the TEM mode. Transmission lines can transmit signals from DC up to high frequency.


• Significant signal attenuation at  high frequencies due to conductor and dielectric losses.
 

• Small cross-section transmission lines (like coaxial cables) can only transmit low power levels due to the relatively high fields concentrated at specific locations within the device (field levels are limited by dielectric breakdown).

• Large cross-section transmission lines (like power transmission lines) can transmit high power
levels.





Waveguide
 
1. Metal waveguides are typically one enclosed conductor filled with an insulating medium (rectangular, circular) while a dielectric waveguide consists of multiple dielectrics.

2.Operating modes are TE or TM modes (cannot support a TEM  mode).

3. Must operate the waveguide at a frequency above the respective TE or TM mode cutoff frequency
for that mode to propagate.

4. Lower signal attenuation at high frequencies than transmission lines.

5. Metal waveguides can transmit high power levels. The fields of the propagating wave are spread
more uniformly over a larger cross-se ctional area than the small cross-section transmission line.

6. Large cross-section (low  frequency) waveguides are impractical due to large size and high cost.

For more infomation please visit www.antennatutorials.com