Documente Academic
Documente Profesional
Documente Cultură
Submitted by
BAKYALAKSHMI P 15EC201
PORSELVI S 15EC206
PRATHEBA M 15EC139
SHERLINE HEYNAA 15EC150
BACHELOR OF TECHNOLOGY
SEVENTH SEMESTER
for
We express our deep sense of gratitude to all the teaching and non-teaching staffs
of our Department and to our friends for their support and encouragement during the
entire course of this dissertation work. We also express our warm regards to our parents
who motivated us.
BAKYALAKSHMI
PORSELVI
PRATHEBA
SHERLINE HEYNAA
ABSTRACT
1.6 objective 05
1.7 organization 05
2 PROPOSED MODEL 06
2.1 Introduction 06
2.2 overview 06
2.3 ECG pattern recognition 06
2.4 structure of ecg signal 07
2.5 block diagram 08
2.6 working
2.7 LC-ADC
2.8 digital pattern recognition
3 SOFTWARE CODING
4 4.1 Simulation results
4.2 conclusions
4.3 future scope
LIST OF FIGURES
1.1 INTRODUCTION
1.2 SCOPE
With the increase in Iot applications day by day, optimization of IoT applications
is required in terms of power consumption, area, size and speed of operation. IoT
senosors being continuously on leads to high power consumption and leakage of power
over a gradual course of time. As target data are often sparse in time, the high precision
system is duty cycled to a power-saving mode, e.g., to a sleep mode or to a power-gating
mode, when high precision is not needed. The toggling of the HPS mode is controlled by
an always-on wake-up circuit (WUC) responsible to wake-up the HPS from the power-
saving mode when full precision data is required. The high precision system is toggled to
on state when the pattern matches the target pattern stored thereby minimizing power
consumption.
The exisiting system of pattern recognition system in IoT sensor nodes consume a
large amount of power, nearly 100 mW. Earlier, Threshold based WUC were developed
but it had poor discrimination capabilities which led to misdetected events
Hence, a cognitive based WUC architecture consisting of LC-ADC for signal
preprocessing and feature extraction and trainable digital pattern recognition circuit
for efficient prediction capabilities is being proposed.
2.1 INTRODUCTION
Almost every IoT application require modules that are to be Always-On and
monitoring continuously. This increases power consumption as the system keeps
tracking the input data continuously. So a pattern recognition system which wakes up
only when accurate data matches the specified pattern has been proposed, thereby
minimizing the power consumption.
A low power consumption level crossing ADC and SVM machine learning
algorithm has been employed in the proposed system. This pattern recognition system has
several applications in IoT i.e., speech recognition, automatic medical diagnosis,
multimedia document recognition, heart beat pattern recognition, fingerprint recognition,
automatic face detection, finger snapping detection in touch phones etc. In this paper,
pattern recognition of pathologic heart beats and hand gesture pattern recognition has
been proposed.
However, the U wave is not typically seen and its absence is generally ignored.
Changes in the structure of the heart and its surroundings (including blood composition)
change the patterns of these four entities.
These waves will be of different amplitudes. Among these QRS complex wave
has highest amplitude and specific shape and is the mid to high frequency wave. P and Q
are the low frequency waves. Extracting the information in the P-QRS-T waves is called
feature extraction and it involves in determining the amplitude and intervals in the ECG
signals. Variations in length and width of the QRS complex appear for short period of
time and continue for indefinite periods of time
The LC-ADC outputs a deltamodulated sample, once one of the internal analog
levels is crossed by the preamplified signal Vamp.. The LC-ADC is equivalent to a
combination of multiple comparators with 1 LSB spaced levels, similar to a flash-ADC
architecture, but with higher efficiency .
A sequence of delta-modulated samples of the LC-ADC are segmented, digitally
processed, and sequentially compared against programmable digital thresholds by the
DPR block which implements the binary classifier. If the target pattern stored in the DPR
block matches the pattern sought for in the input signal, then a wake-up line is asserted
which can be used to awake a duty-cycled HPS, triggering high-precision signal
processing.
Fig.2.3 overall block diagram
2.3.5 LC-ADC
Asynchronous level-crossing sampling scheme is an approach which meets data
compression and feature extraction simultaneously.Under the scheme, the sampling rate
is directly proportional to the activity of the input signal and no power is wasted for
sampling, converting, and processing the useless data in the inactive parts of the signal.
This is well suited for ECG signal due to its sparse and burst-like nature.
The input voltage is compared with two reference voltages, VA and VB, generated
from the sliding window reference generator in the continuous time domain. If VIN > VB,
then UP=l, DOWN=O and a clock (CLK) will be generated in order to activate the ADC,
which, in turn, will provide the digital output corresponding to the analog input signal.
Similarly, if VIN < VA then UP=O, DOWN=l and CLK =1. However, if VA < VIN
< VB, then the clock signal is not generated and the ADC remains off for that period of
time, i.e. the clock is generated only and if the input crosses any of the threshold values
within a given thresholds range.
The generated clock pulse is fedback to the reference generator, where the
reference voltages VA and VB are slided up or down by I Least Significant Bit (LSB)
depending on the slope of the input signal. Thus, the input signal again lies in the
thresholds range and both UP and DOWN signals will be logic zero thereby making
CLK=O. The clock is automatically turned off once the input again falls within the
current thresholds range.
It is important to note that, during this operation, the input should not change by
more than I LSB. Thus, the delay of the circuit from clock generation to the shift in the
reference voltages should be less than the time required for the input signal to change by
1 LSB.
Thus, they are immune to metastable behaviour, reduces electromagentic
interferences, speed and saves power. The ADC conversion time is mainly dominated by
the signal tracking time, comparator speed, and digital propagation delay.
The digital pattern recognition block contains the SVM machine learning
algorithm. Support Vector Machine (SVM) is a supervised machine learning algorithm
which can be used mostly used in classification problems.
Support Vectors are simply the co-ordinates of individual observation. Support
Vector Machine is a frontier which best segregates the two classes (hyper-plane/ line).
The basic of SVM involves the adoption of a nonlinear kernel function to
transform input data into a high dimensional feature space, which is easier to separate
data rather than at the original input space. Thus, depending on input data, the iterative
learning process of SVM will finally devise optimal hyper planes with the maximal
margin between each class in a high dimensional feature space. Hence, the maximum
margin hyper planes will be the decision boundaries for distinguishing different data
clusters. Therefore, the larger distance between hyper planes and group data will result in
better classification performance.
An SVM generates parallel partitions by generating two parallel lines for each
category of data in a high-dimensional space and uses almost all attributes. It separates
the space in a single pass to generate flat and linear partitions. It Divides the 2 categories
by a clear gap that should be as wide as possible. This partitioning is done by a plane
called hyperplane.
An SVM creates hyperplanes that have the largest margin in a high-dimensional
space to separate given data into classes. The margin between the 2 classes represents the
longest distance between closest data points of those classes.
The larger the margin, the lower is the generalization error of the classifier. After
training map the new data to same space to predict which category they belong to. The
new data is categorized into different partitions by training data.
SVM provides the largest flexibility. SVMs are like probabilistic approaches but
do not consider dependencies among attributes.
CHAPTER 3
SOFTWARE DESCRIPTION AND CODING
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
use STD.textio.all;
use ieee.std_logic_arith.all;
use ieee.math_real.all;
use ieee.math_complex.all;
use ieee.numeric_std.all;
entity read_file is
port(clk,clr: in std_logic;
eone_out,rfzx,read6: out real);
end read_file;
BEGIN
Nsamp<=10.0;
onebyn<=(1.0/Nsamp);
--Read process
process
file file_pointer : text;
variable line_content : real;
variable line_num : line;
variable add_data : real:=0.00;
variable j : integer := 0;
variable char : character:='0';
begin
--Open the file read.txt from the specified location for reading(READ_MODE).
file_open(file_pointer,"C:\read5.txt",READ_MODE);
while not endfile(file_pointer) loop --till the end of file is reached continue.
readline (file_pointer,line_num); --Read the whole line from the file
--Read the contents of the line from the file into a variable.
READ (line_num,line_content);
file_dat<= line_content;
wait for 5 ns;
sqr_file_dat<= file_dat*file_dat;
wait for 7 ns; --after reading each line wait for 7 ns.
outdata<=add_data;
end loop;
file_close(file_pointer); --after reading all the lines close the file.
wait;
end process;
t1: process
begin
wait for 110 ns;
test_sig<='0';
wait for 110 ns;
test_sig<='1';
end process t1;
t2:process(clr,test_sig)
begin
if clr='1' then
eone<=0.000;
elsif rising_edge(test_sig) then
eone<=(onebyn*outdata);
end if;
end process t2;
eone_value <=eone;
eone_out <=eone;
rfzx<= (eone_value**(0.5));
file_out<=(eone_value**(0.01));
read6<=file_out;
end beha;
3.2 SIGNAL ANALYSIS-TRAINING CODE
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
use ieee.math_real.all;
use ieee.math_complex.all;
use ieee.numeric_std.all;
entity signal_analysis is
port(clk,clr : in std_logic;
elow1,ehigh1,str_low1,str_high1,fmax1,fmin1,far1:in real;
str1 : in real;eone_out1,rfzx1: in real);
end signal_analysis;
begin
sigt:process
begin
wait for 300 ns;
fs<='0';
wait for 300 ns;
fs<='1';
end process;
mbt: process(eone_out1,elow1,str1,str_high1,rfzx1,fmin1,far1,clr)
begin
if clr='1' then
nr_enab<='0';
status2<="NORML******";
end if;
end if;
end if;
end if;
end if;
end process mbt;
mmbt: process(eone_out1,elow1,clr,nr_enab)
begin
if dclr='1' or nr_enab='0' then
nr_enab<='0';
status3<="*****NORML******";
nr_enab<='1';
status3<="MILD-ATTACK*****";
end if;
end if;
end if;
end process mmbt;
pg: process(eone_out1,elow1,d2clr,str1,str_low1,far1,fmax1,rfzx1,fmin1,nr_enab)
begin
if d2clr='1' or nr_enab='0' then
nr_enab<='0';
status4<="*****NORML*********";
nr_enab<='1';
status4<="VENTRIC-ARYTHMIA***";
end if;
end if;
end if;
end if;
end if;
end process pg;
end behave;
3.3 CLASSIFICATION ALGORITHM
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
use ieee.math_real.all;
use ieee.math_complex.all;
use ieee.numeric_std.all;
entity classification_alg is
port(clk,clr: in std_logic;fsample : in real;
elow,ehigh,str_low,str_high,fmax,fmin,far:out real;
str : out real);
end classification_alg;
angle<=30.0;
temp_ver<=(30.0/360);
str<=1.0;
cont_lat:process(clk,clr)
begin
if clr='1' then
elow<=0.0;
ehigh<=0.0;
str_low<=0.00;
str_high<=0.00;
fmin<=0.00;
fmax<=0.00;
plat:process(clk,clr)
begin
if clr='1' then
far<= 0.00;
elsif falling_edge(clk) then
far<= fsample*temp_ver;
end if;
end process plat;
end behave;
Library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
use ieee.math_real.all;
use ieee.math_complex.all;
use ieee.numeric_std.all;
entity top_module is
port(clk,clr:in std_logic;fsample: in real;
read6: out real);
end top_module;
component classification_alg is
port(clk,clr: in std_logic;fsample : in real;
elow,ehigh,str_low,str_high,fmax,fmin,far:out real;
str : out real);
end component;
component signal_analysis is
port(clk,clr : in std_logic;
elow1,ehigh1,str_low1,str_high1,fmax1,fmin1,far1:in real;
str1 : in real;eone_out1,rfzx1: in real);
end component;
begin
end behave;
CHAPTER 4
SIMULATION RESULTS
4.1 RESULTS
This Chapter deals with the simulated results obtained from the project. The dataset is
trained and fed into the system. Random dataset is then fed and signals are classified as per
the training algorithm as normal and abnormal signals.
Abnormal ECG dataset with high peaks
Abnormal ECG dataset with high peaks
CLASSIFIED SIGNAL
POWER CONSUMPTION:
By this methodology of using LC-ADC and SVM ALGORITHM, power
consumption is reduced to approximately 48 mW.
AREA OCCUPIED:
SYNTHESIS REPORT
Release 12.2 - xst M.63c (nt64)
TABLE OF CONTENTS
2) HDL Parsing
3) HDL Elaboration
4) HDL Synthesis
7) Partition Report
8) Design Summary
8.1) Primitive and Black Box Usage
=========================================================================
=========================================================================
Safe Implementation : No
Asynchronous To Synchronous : NO
Optimization Effort :1
Power Reduction : NO
Keep Hierarchy : No
Hierarchy Separator :/
=========================================================================
=========================================================================
* HDL Parsing *
=========================================================================
=========================================================================
* HDL Elaboration *
=========================================================================
=========================================================================
* HDL Synthesis *
=========================================================================
Summary:
inferred 1 Multiplier(s).
=========================================================================
Macro Statistics
# Multipliers :1
32x32-bit multiplier :1
# Registers :3
1-bit register :2
32-bit register :1
=========================================================================
=========================================================================
=========================================================================
WARNING:Xst - The specified part-type was not generated at build time. XST is loading the full
part-type and will therefore consume more CPU and memory.
4.2 CONCLUSIONS:
Speed is faster
Smart pattern recognition system can be further extended for any application. It is
basically designed for mutli application support. It can be further used for EEG pattern
classification, hand gesture recognition pattern recognition, face detection, etc.
4.4 REFERENCES
[1]. S. Jeong, Y. Chen, T. Jang, J.M. Tsai, D. Blaauw, H. Kim, and D. Sylvester,
“Always-On 12-nW Acoustic Sensing and Object Recognition Microsystem for
Unattended Ground Sensor Nodes,” IEEE J. Solid-State Circuits, 2017.
[2]. S. Izumi et al., “Normally Off ECG SoCWith Non-Volatile MCU and Noise
Tolerant Heartbeat Detector,” IEEE Trans. Biomed. Circuits and Syst., vol. 9, no.
5, pp. 641–651, October 2015.
[6]. Giovanni Rovere, “A 2.2 uW Cognitive Always-ON Wake-Up Circuit for Event-
SS Driven Duty-Cycling of IoT sensor nodes”, IEEE Journal on Emerging and
Selected Topics in Circuits and Systems, DOI 10.1109/JETCAS.2018.2828505.