B M S COLLEGE OF ENGINEERING
(AUTONOMOUS COLLEGE UNDER VTU, BELGAUM)
BANGALORE – 560019
“OPEN-ENDED EXPERIMENTS”
IN
TH
5 SEMESTER
ADVANCED COMMUNICATION LAB (22EC5PCACL)
(PLATFORM-MATLAB)
Submitted in partial fulfilment of the requirements for the Activity plan
BACHELOR OF ENGINEERING
IN
ELECTRONICS AND COMMUNICATION
BY
UTTAM (1BM21EC190)
UNDER THE GUIDANCE OF
Dr. Madhusudhan K N
(Assistant Professor, BMSCE)
Department of Electronics and Communication Engineering
2023-2024
1).Demonstrate sampling,quantization and reconstruction of any given signal.
clc;
close all;
clear all;
% Signal parameters
Fs = 1000; % Sampling frequency (Hz)
t = 0:1/Fs:1; % Time vector from 0 to 1 second with 1/Fs increment
f_original = 5; % Frequency of the original signal (Hz)
original_signal = sin(2*pi*f_original*t); % Original signal (sine wave)
% Plot the original signal
subplot(4, 1, 1);
plot(t, original_signal);
title('Original Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Sampling
Fs_sampled = 200; % Sampling frequency for the sampled signal (Hz)
t_sampled = 0:1/Fs_sampled:1; % Time vector for sampled signal
sampled_signal = sin(2*pi*f_original*t_sampled); % Sampled signal
% Plot the sampled signal
subplot(4, 1, 2);
stem(t_sampled, sampled_signal);
title('Sampled Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Quantization
bits = 4; % Number of quantization bits
quantized_signal = quantize(sampled_signal, bits);
% Plot the quantized signal
subplot(4, 1, 3);
stem(t_sampled, quantized_signal);
title('Quantized Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Reconstruction
reconstructed_signal = interp1(t_sampled, quantized_signal, t, 'linear', 'extrap');
% Plot the reconstructed signal
subplot(4, 1, 4);
plot(t, reconstructed_signal);
title('Reconstructed Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Function to quantize a signal to the specified number of bits
function quantized_signal = quantize(signal, bits)
% Normalize signal to the range [-1, 1]
normalized_signal = signal / max(abs(signal));
% Quantize the normalized signal
quantized_signal = round((2^(bits-1) - 1) * normalized_signal);
% Scale back to the original range
quantized_signal = quantized_signal / (2^(bits-1) - 1);
end
OUTPUT:
2).Determine PCM/DPCM of any signal or speech compression by digital companding (A
or Mu law)
clc;
clear all;
close all;
% Speech compression using PCM and μ-law companding
% Generate a sample speech-like signal (sine wave)
fs = 3000; % Sampling frequency
t = 0:1/fs:1; % 1 second duration
f = 44; % Frequency of the sine wave (change as needed)
speech_signal = 0.5 * sin(2 * pi * f * t);
% Display the original speech signal
subplot(3,1,1);
plot(t, speech_signal);
title('Original Speech Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% PCM Encoding
bits_per_sample = 8; % Number of bits per sample
speech_max = max(abs(speech_signal));
speech_quantized = speech_signal / speech_max * (2^(bits_per_sample-1) - 1);
speech_quantized = round(speech_quantized);
% μ-law companding
mu = 255; % μ value for μ-law companding
speech_companded = sign(speech_quantized) .* log(1 + mu * abs(speech_quantized) / (1 + mu)) / log(1 + mu);
% PCM Decoding
speech_decompanded = sign(speech_companded) .* ((1 + mu).^abs(speech_companded) - 1) / mu;
speech_reconstructed = speech_decompanded * speech_max;
% Display the compressed signal
subplot(3,1,2);
plot(t, speech_companded);
title('Companded Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Display the reconstructed signal
subplot(3,1,3);
plot(t, speech_reconstructed);
title('Reconstructed Signal');
xlabel('Time (s)');
ylabel('Amplitude');
% Play the original and reconstructed signals
sound(speech_signal, fs);
pause(2);
sound(speech_reconstructed, fs);
OUTPUT:
3).Demonstarte digital communication system employing BASK,BPSK,QPSK,BFSK
modulation and demodulation scheme you have studied and show the constellation plot/
BER performance/ Plot waveforms.Assume AWGN channel and demodulation.
For BFSK:
clc;
close all;
clear all;
% BFSK Modulation and Demodulation with AWGN Channel
% Parameters
f_mark = 1000; % Frequency for binary 1
f_space = 500; % Frequency for binary 0
T = 1 / 1000; % Symbol duration (1 ms)
A = 1; % Amplitude
SNR_dB = 10; % Signal-to-Noise Ratio in dB
% Simulation parameters
num_bits = 1000; % Number of bits to transmit
% Generate random data (0s and 1s)
data = randi([0, 1], 1, num_bits);
% Modulation
t = 0:T:(num_bits * T - T);
modulated_signal = zeros(size(t));
for i = 1:num_bits
if data(i) == 1
modulated_signal((i-1)*length(T)+1:i*length(T)) = A * cos(2*pi*f_mark*t((i-1)*length(T)
+1:i*length(T)));
else
modulated_signal((i-1)*length(T)+1:i*length(T)) = A * cos(2*pi*f_space*t((i-1)*length(T)
+1:i*length(T)));
end
end
% Add AWGN to the modulated signal
SNR = 10^(SNR_dB/10);
noise_power = A^2 / (2 * SNR);
noisy_signal = awgn(modulated_signal, SNR_dB, 'measured', 'linear');
% Demodulation
demodulated_data = zeros(1, num_bits);
for i = 1:num_bits
mark_amplitude = sum(noisy_signal((i-1)*length(T)+1:i*length(T)) .* cos(2*pi*f_mark*t((i-1)*length(T)
+1:i*length(T))));
space_amplitude = sum(noisy_signal((i-1)*length(T)+1:i*length(T)) .* cos(2*pi*f_space*t((i-1)*length(T)
+1:i*length(T))));
% Decision based on which frequency has higher amplitude
demodulated_data(i) = (mark_amplitude > space_amplitude);
end
% Calculate Bit Error Rate (BER)
ber = sum(data ~= demodulated_data) / num_bits;
% Plot the Modulated and Noisy Signals
figure;
subplot(2, 2, 1);
plot(t, modulated_signal);
title('BFSK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
subplot(2, 2, 2);
plot(t, noisy_signal);
title('Noisy Signal (AWGN)');
xlabel('Time');
ylabel('Amplitude');
% Constellation Plot
subplot(2, 2, 3);
scatter(real(noisy_signal), imag(noisy_signal));
title('Constellation Plot');
xlabel('In-Phase (I)');
ylabel('Quadrature (Q)');
% BER Performance
subplot(2, 2, 4);
bar([0, 1], [num_bits - sum(data), sum(data)], 'r');
hold on;
bar([0, 1], [sum(demodulated_data == data), num_bits - sum(demodulated_data == data)], 'b');
title(['Bit Error Rate (BER): ' num2str(ber)]);
xlabel('Transmitted Bit');
ylabel('Number of Bits');
legend('Transmitted', 'Received', 'Location', 'NorthEast');
hold off;
Output:
For BASK:
clc;
close all;
clear all;
% BASK Modulation and Demodulation with AWGN Channel
% Parameters
A1 = 1; % Amplitude for binary 1
A0 = 0; % Amplitude for binary 0
T = 1 / 1000; % Symbol duration (1 ms)
SNR_dB = 10; % Signal-to-Noise Ratio in dB
% Simulation parameters
num_bits = 1000; % Number of bits to transmit
% Generate random data (0s and 1s)
data = randi([0, 1], 1, num_bits);
% Modulation
t = 0:T:(num_bits * T - T);
modulated_signal = zeros(size(t));
for i = 1:num_bits
if data(i) == 1
modulated_signal((i-1)*length(T)+1:i*length(T)) = A1 * square(2*pi*(1/T)*t((i-1)*length(T)
+1:i*length(T)));
else
modulated_signal((i-1)*length(T)+1:i*length(T)) = A0 * square(2*pi*(1/T)*t((i-1)*length(T)
+1:i*length(T)));
end
end
% Add AWGN to the modulated signal
SNR = 10^(SNR_dB/10);
noise_power = A1^2 / (2 * SNR);
noisy_signal = awgn(modulated_signal, SNR_dB, 'measured', 'linear');
% Demodulation
demodulated_data = zeros(1, num_bits);
for i = 1:num_bits
demodulated_data(i) = (sum(noisy_signal((i-1)*length(T)+1:i*length(T))) > 0);
end
% Calculate Bit Error Rate (BER)
ber = sum(data ~= demodulated_data) / num_bits;
% Plot the Modulated and Noisy Signals
figure;
subplot(2, 2, 1);
plot(t, modulated_signal);
title('BASK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
subplot(2, 2, 2);
plot(t, noisy_signal);
title('Noisy Signal (AWGN)');
xlabel('Time');
ylabel('Amplitude');
% Constellation Plot
subplot(2, 2, 3);
scatter(real(noisy_signal), imag(noisy_signal));
title('Constellation Plot');
xlabel('In-Phase (I)');
ylabel('Quadrature (Q)');
% BER Performance
subplot(2, 2, 4);
bar([0, 1], [num_bits - sum(data), sum(data)], 'r');
hold on;
bar([0, 1], [sum(demodulated_data == data), num_bits - sum(demodulated_data == data)], 'b');
title(['Bit Error Rate (BER): ' num2str(ber)]);
xlabel('Transmitted Bit');
ylabel('Number of Bits');
legend('Transmitted', 'Received', 'Location', 'NorthEast');
hold off;
OUTPUT:
For QPSK:
clc;
close all;
clear all;
% QPSK Modulation and Demodulation with AWGN Channel
% Parameters
A = 1; % Amplitude for each symbol
T = 1 / 1000; % Symbol duration (1 ms)
SNR_dB = 10; % Signal-to-Noise Ratio in dB
% Simulation parameters
num_bits = 1000; % Number of bits to transmit
% Generate random data (0s and 1s)
data = randi([0, 1], 1, num_bits);
% Convert binary data to QPSK symbols
symbols = 2*data(1:2:end) - 1 + 1i*(2*data(2:2:end) - 1);
% Modulation
t = 0:T:(num_bits/2 * T - T);
modulated_signal = A * symbols;
% Add AWGN to the modulated signal
SNR = 10^(SNR_dB/10);
noise_power = A^2 / (2 * SNR);
noisy_signal = awgn(modulated_signal, SNR_dB, 'measured', 'linear');
% Demodulation
demodulated_symbols = noisy_signal / A;
% Convert symbols back to binary data
demodulated_data = zeros(1, num_bits);
demodulated_data(1:2:end) = real(demodulated_symbols) > 0;
demodulated_data(2:2:end) = imag(demodulated_symbols) > 0;
% Calculate Bit Error Rate (BER)
ber = sum(data ~= demodulated_data) / num_bits;
% Plot the Modulated and Noisy Signals
figure;
subplot(2, 2, 1);
plot(real(modulated_signal), imag(modulated_signal), 'o');
title('QPSK Modulated Signal');
xlabel('In-Phase (I)');
ylabel('Quadrature (Q)');
axis square;
subplot(2, 2, 2);
plot(real(noisy_signal), imag(noisy_signal), 'o');
title('Noisy Signal (AWGN)');
xlabel('In-Phase (I)');
ylabel('Quadrature (Q)');
axis square;
% Constellation Plot
subplot(2, 2, 3);
scatter(real(noisy_signal), imag(noisy_signal));
title('Constellation Plot');
xlabel('In-Phase (I)');
ylabel('Quadrature (Q)');
% BER Performance
subplot(2, 2, 4);
bar([0, 1], [num_bits - sum(data), sum(data)], 'r');
hold on;
bar([0, 1], [sum(demodulated_data == data), num_bits - sum(demodulated_data == data)], 'b');
title(['Bit Error Rate (BER): ' num2str(ber)]);
xlabel('Transmitted Bit');
ylabel('Number of Bits');
legend('Transmitted', 'Received', 'Location', 'NorthEast');
hold off;
OUTPUT:
For BPSK:
clc;
close all;
clear all;
% BPSK Modulation and Demodulation with AWGN Channel
% Parameters
A = 1; % Amplitude for both binary 0 and 1
T = 1 / 1000; % Symbol duration (1 ms)
SNR_dB = 10; % Signal-to-Noise Ratio in dB
% Simulation parameters
num_bits = 1000; % Number of bits to transmit
% Generate random data (0s and 1s)
data = randi([0, 1], 1, num_bits);
% Modulation
t = 0:T:(num_bits * T - T);
modulated_signal = A * cos(2*pi*(1/T)*t + pi*(data-0.5));
% Add AWGN to the modulated signal
SNR = 10^(SNR_dB/10);
noise_power = A^2 / (2 * SNR);
noisy_signal = awgn(modulated_signal, SNR_dB, 'measured', 'linear');
% Demodulation
demodulated_data = (noisy_signal > 0);
% Calculate Bit Error Rate (BER)
ber = sum(data ~= demodulated_data) / num_bits;
% Plot the Modulated and Noisy Signals
figure;
subplot(2, 2, 1);
plot(t, modulated_signal);
title('BPSK Modulated Signal');
xlabel('Time');
ylabel('Amplitude');
subplot(2, 2, 2);
plot(t, noisy_signal);
title('Noisy Signal (AWGN)');
xlabel('Time');
ylabel('Amplitude');
% Constellation Plot
subplot(2, 2, 3);
scatter(real(noisy_signal), imag(noisy_signal));
title('Constellation Plot');
xlabel('In-Phase (I)');
ylabel('Quadrature (Q)');
% BER Performance
subplot(2, 2, 4);
bar([0, 1], [num_bits - sum(data), sum(data)], 'r');
hold on;
bar([0, 1], [sum(demodulated_data == data), num_bits - sum(demodulated_data == data)], 'b');
title(['Bit Error Rate (BER): ' num2str(ber)]);
xlabel('Transmitted Bit');
ylabel('Number of Bits');
legend('Transmitted', 'Received', 'Location', 'NorthEast');
hold off;
OUTPUT:
4).Demonstarte DS OR FH spread spectrum system
clc;
close all;
clear all;
% Spread Spectrum Systems Simulation
% Parameters
fs = 100; % Sampling frequency
T = 1; % Total time duration
fc = 50; % Carrier frequency
SNR_dB = 10; % Signal-to-Noise Ratio in dB
% Generate a binary signal
data = randi([0 1], 1, fs*T);
% Direct Sequence (DS) Spread Spectrum
chipping_code = 2*data - 1; % Convert to bipolar
ds_modulated_signal = kron(chipping_code, ones(1, fs));
% Frequency Hopping (FH) Spread Spectrum
hop_indices = randi([1, fs], 1, fs*T); % Random frequency hopping indices
fh_modulated_signal = zeros(1, fs*T);
for i = 1:length(data)
fh_modulated_signal((i-1)*fs + 1:i*fs) = cos(2*pi*(fc+hop_indices(i))/fs*(1:fs));
end
% Add noise to both signals
noise = randn(1, length(ds_modulated_signal));
SNR_linear = 10^(SNR_dB / 10);
scaled_noise = noise / sqrt(SNR_linear);
ds_received_signal = ds_modulated_signal + scaled_noise;
noise = randn(1, length(fh_modulated_signal));
scaled_noise = noise / sqrt(SNR_linear);
fh_received_signal = fh_modulated_signal + scaled_noise;
% Plotting
figure;
subplot(3,2,1);
plot(data, 'LineWidth', 1.5);
title('Binary Data');
subplot(3,2,2);
plot(ds_modulated_signal, 'r', 'LineWidth', 1.5);
title('DS Modulated Signal');
subplot(3,2,3);
plot(data, 'LineWidth', 1.5);
title('Binary Data');
subplot(3,2,4);
plot(fh_modulated_signal, 'r', 'LineWidth', 1.5);
title('FH Modulated Signal');
subplot(3,2,5);
plot(ds_received_signal, 'g', 'LineWidth', 1.5);
title('DS Received Signal with Noise');
subplot(3,2,6);
plot(fh_received_signal, 'g', 'LineWidth', 1.5);
title('FH Received Signal with Noise');
OUTPUT:
5).Demonstrate Huffman and Shannon Fano coding
Huffman coding:
clc;
clear all;
close all;
probabilities=[1/5 1/5 3/5 2/15 2/15];
probabilities=probabilities/sum(probabilities);
for index=1:length(probabilities)
codewords{index}=[];
set_contents{index}=index;
set_probabilities(index)=probabilities(index);
end
while length(set_contents)>1
[temp,sorted_indices]=sort(set_probabilities);
zero_set=set_contents{sorted_indices(1)};
zero_probability=set_probabilities(sorted_indices(1));
for codeword_index=1:length(zero_set)
codewords{zero_set(codeword_index)}=[codewords{zero_set(codeword_index)},1];
end
one_set=set_contents{sorted_indices(2)};
one_probability=set_probabilities(sorted_indices(2));
for codeword_index=1:length(one_set)
codewords{one_set(codeword_index)}=[codewords{one_set(codeword_index)},0];
end
set_contents(sorted_indices(1:2))=[];
set_contents{length(set_contents)+1}=[zero_set,one_set];
set_probabilities(sorted_indices(1:2))=[];
set_probabilities(length(set_probabilities)+1)=zero_probability+one_probability;
end
for index=1:length(codewords)
disp([num2str(index),' ',num2str(probabilities(index)),' ',num2str(codewords{index}
(length(codewords{index}):-1:1))])
end
entropy=sum(probabilities.*log2(1./probabilities))
av_length=0
for index=1:length(codewords)
av_length=av_length+probabilities(index)*length(codewords{index});
end
disp(['the symbol entropy is:',num2str(entropy)])
disp(['the average huffman codeword length is:',num2str(av_length)]);
disp(['the efficiency is:',num2str(entropy/av_length)]);
OUTPUT:
1 0.15789 0 0 1
2 0.15789 0 0 0
3 0.47368 1
4 0.10526 0 1 1
5 0.10526 0 1 0
entropy =
2.0353
av_length =
the symbol entropy is:2.0353
the average huffman codeword length is:2.0526
the efficiency is:0.99158
Shannon fano coding:
clc;
clear all;
close all;
m=input('Enter the no. of message ensembles : ');
z=[];
h=0;l=0;
display('Enter the probabilities in descending order');
for i=1:m
fprintf('Ensemble %d\n',i);
p(i)=input('');
end
%Finding each alpha values
a(1)=0;
for j=2:m;
a(j)=a(j-1)+p(j-1);
end
fprintf('\n Alpha Matrix');
display(a);
%Finding each code length
for i=1:m
n(i)= ceil(-1*(log2(p(i))));
end
fprintf('\n Code length matrix');
display(n);
%Computing each code
for i=1:m
int=a(i);
for j=1:n(i)
frac=int*2;
c=floor(frac);
frac=frac-c;
z=[z c];
int=frac;
end
fprintf('Codeword %d',i);
display(z);
z=[];
end
%Computing Avg. Code Length & Entropy
fprintf('Avg. Code Length');
for i=1:m
x=p(i)*n(i);
l=l+x;
x=p(i)*log2(1/p(i));
h=h+x;
end
display(l);
fprintf('Entropy');
display(h);
%Computing Efficiency
fprintf('Efficiency');
display(100*h/l);
fprintf('Redundancy');
display(100-(100*h/l));
INPUT:
Enter the no. of message ensembles :
5
Enter the probabilities in descending order
Ensemble 1
0.5
Ensemble 2
0.5
Ensemble 3
0.4
Ensemble 4
0.3
Ensemble 5
0.2
OUTPUT:
Alpha Matrix
a = 0 0.5000 1.0000 1.4000 1.7000
Code length matrix
n=1 1 2 2 3
Codeword 1
z=0
Codeword 2
z =1
Codeword 3
z =2 0
Codeword 4
z =2 1
Codeword 5
z =3 0 1
Avg. Code Length
l =3
Entropy
h =2.5142
Efficiency 83.8082
Redundancy 16.1918
6) Demonstrate BER performance of digital communication system employing BPSK
modulation scheme with (a) Block coding scheme OR (b) Convolution. assume AWGN
channel.
Block coding scheme:
clc;
close all;
clear all;
%% Parameters
N = 10^4; % Number of bits (reduced for demonstration)
EbN0dB = 0:1:10; % Eb/N0 range in dB
EbN0 = 10.^(EbN0dB/10); % Eb/N0 in linear scale
nBitsPerSymbol = 1; % For BPSK
codeRate = 1/2; % Coding rate (for repetition code)
%% Initialization
ber = zeros(size(EbN0));
%% Simulation
for idx = 1:length(EbN0)
% Generate random bits
txBits = randi([0,1], 1, N);
% BPSK modulation
txSymbols = 1 - 2*txBits; % Mapping 0 to 1 and 1 to -1
% Block coding (Repetition code)
odedSymbols = kron(txBits, ones(1, 1/codeRate));
% Adding noise
noise = sqrt(1/(2*codeRate*EbN0(idx))) * randn(1, length(codedSymbols));
rxSymbols = codedSymbols + noise;
% Demodulation
rxBits = rxSymbols < 0; % Decision rule for BPSK
% Decoding (for repetition code)
decodedBits = sum(reshape(rxBits, 2, [])).' > 1; % Reshape into 2 rows, column count determined
automatically
% Truncate decodedBits to match the length of txBits
decodedBits = decodedBits(1:N).';
% Debugging: Check lengths of decodedBits and txBits
disp(['Length of decodedBits: ', num2str(length(decodedBits))]);
disp(['Length of txBits: ', num2str(length(txBits))]);
% Calculate BER using only N bits
ber(idx) = sum(decodedBits ~= txBits) / N;
end
%% Plotting
semilogy(EbN0dB, ber, 'bo-');
grid on;
xlabel('Eb/N0 (dB)');
ylabel('Bit Error Rate (BER)');
title('BER Performance of BPSK with Repetition Coding (1/2)');
OUTPUT:
Length of decodedBits: 10000
Length of txBits: 10000
Convolution method:
clc;
close all;
clear all;
%% Parameters
N = 10^6; % Number of bits
EbN0dB = 0:1:10; % Eb/N0 range in dB
EbN0 = 10.^(EbN0dB/10); % Eb/N0 in linear scale
nBitsPerSymbol = 1; % For BPSK
constraintLength = 7; % Constraint length of the convolutional code
codeRate = 1/2; % Coding rate (for convolutional code)
%% Initialization
ber = zeros(size(EbN0));
%% Convolutional Encoder
trellis = poly2trellis(constraintLength, [171 133]); % Define the convolutional code
convEncoder = comm.ConvolutionalEncoder(trellis); % Create a convolutional encoder object
%% Viterbi Decoder
vitDecoder = comm.ViterbiDecoder(trellis, 'InputFormat', 'Hard'); % Create a Viterbi decoder object
%% Simulation
for idx = 1:length(EbN0)
% Generate random bits
txBits = randi([0,1], 1, N);
% Convolutional encoding
codedBits = convEncoder(txBits.');
% BPSK modulation
txSymbols = 1 - 2*codedBits; % Mapping 0 to 1 and 1 to -1
% Adding noise
noiseVar = 1 / (2*codeRate*EbN0(idx)); % Noise variance
noise = sqrt(noiseVar) * randn(size(txSymbols));
rxSymbols = txSymbols + noise;
% Demodulation
rxBits = rxSymbols < 0; % Decision rule for BPSK
% Convert rxBits to ufix(1) data type
rxBits = fi(rxBits, 0, 1, 0); % Cast to ufix(1) data type
% Reshape rxBits to process each channel separately
rxBits = reshape(rxBits, [], size(txBits, 1)); % Reshape to have one channel per column
% Viterbi decoding
decodedBits = [];
for i = 1:size(rxBits, 2)
decodedBits = [decodedBits; vitDecoder(rxBits(:, i)).']; % Decode each channel separately
end
% Reshape decodedBits to match the size of transmitted bits
decodedBits = decodedBits(:).';
% Calculating BER
ber(idx) = sum(decodedBits ~= txBits) / N;
end
%% Plotting
semilogy(EbN0dB, ber, 'bo-');
grid on;
xlabel('Eb/N0 (dB)');
ylabel('Bit Error Rate (BER)');
title('BER Performance of BPSK with Convolutional Coding');
OUTPUT:
7) Plot the radiation plot of microstrip antenna using antenna design tool box
Fig(2):Radiation Pattern
Fig(3): S Parameter Plot