Envelope Detection Using MATLAB For Any Time Domain Signal (Thorugh Hilbert Transform)
Envelope Detection Using MATLAB For Any Time Domain Signal (Thorugh Hilbert Transform)
Transform)
The above diagram/plot is of an Amplitude Modulated wave, & we have just found its envelope. This was
the result of one of the MATHWORK'S example in simulink to demodulate the AM signal. Electronically
envelope detector is a very simple circuit, consisting of a diode, resistor & capacitor. From ages it has
been used to De-modulate the amplitude modulated signals, on the receiver side. The output of the circuit
is approximately a voltage-shifted version of the original baseband signal. A simple filter (like a
capacitor) can be used to filter out the DC component. In order to get the desired amplitude variation.
That was a little about the circuit implementation of Envelope Detector, but how through a MATLAB
code we are going to implement the envelope detection?
The answer lies hidden in the Hilbert Transform. It been a very common and efficient technique for
envelope detection. The Hilbert transform is typically implemented as an FIR filter so the original signal
must be delayed to match the group delay of the Hilbert transform. This process can be followed by
absolute and then peak hold functions. Another option for detecting the envelope is to use the square root
of the energies of the original and the Hilbert transformed signals, as follows :
In general, this will give similar results to the absolute value technique but can be more run-time efficient.
So, in order to do it, in MATLAB just the simplest way to add this line after the signal of which the
envelope has to be calculated.
envelope = abs(hilbert(Signal));
clc;
clear all;
close all;
plot(AM, 'b');
hold on;
plot(envelope, 'r');
hold off
Another similar result we have obtained by applying it to a product of exponential & cosine signal. The
code & result as follows:
clc;
clear all;
close all;
plot(AM, 'b');
hold on;
plot(envelope, 'r');
hold off
Technique-2
Envelope Detection Using MATLAB for Any time Domain Signal (Thorugh Hilbert Transform)
% Modulation Process
Fc = 20; % carrier frequency of 20 kHz
t = 0:1/Fs:10; % t of 10 seconds
figure;
subplot(4,1,1);
plot(t, m);
subplot(4,1,2);
plot(t, c);
subplot(4,1,3);
plot(t, s);
subplot(4,1,4);
plot(t, dsb_sc);
for i = 2:length(s)
end
end
Vd(1) = 0;
for i = 2:length(dsb_sc)
Vd(i) = dsb_sc(i);
end
end
foutputc = filter(h,1,Vc);
figure;
subplot(3,1,1);
plot(t, Vc);
subplot(3,1,2);
plot(t, Vd);
subplot(3,1,3);
plot(t, foutputc);