SlideShare a Scribd company logo
By,
J.Sheela Arokia Mary
 Simulation of stochastic model like SIR model is
very useful. However, the software simulation of
this kind of model becomes so slow with the
individual number increasing, so this project
provides a much faster hardware solution for it.
 A simulation is implemented on MATLAB to test
and verify the mathematical algorithm
 The final project is implemented on DE-115 board
using Verilog, which gives a much faster
performance than on PC
 To make the Verilog code more flexible and
variable, a MATLAB program is designed to
automatically generate the Verilog code
 In SIR model, each individual has to be one of the
three stages: S(Susceptible), I(Infectious) or
R(Recovered)
 Once the individual is recovered, it can’t be
infected again
 We can abstract the real world local relationship
network to a simplified one, where each individual
is connected to all the closely related ones, which
means they can infect others through connections
 Initially, one or several individuals are set to be
infectious and the transition rates(possibility for
infecting and recovering) are fixed
 If we observe the number of individuals of
each state, assuming all the individuals are
randomly connected, we should expect a
theoretical result as below
 The green one, which indicates the number of
infected individuals, is the data that we
observe in the actual simulation
Acceleration of stochastic algorithm on fpga system
 Instead of solving the problem in continuous
domain, we use discrete domain which is
compatible with hardware system. Moreover,
we use a uniform time step for simulation,
which lead to a fixed infecting and recovering
probability for every step.
 The most important component for this project
is a high performance random number
generator(RNG). In this case, we use a 64-bit
XOR feedback shift register as the RNG, which
is easy to implement in FPGA
 Since we need a easily changeable code for
implementing, a MATLAB program is designed
with which users can change just the parameters
and get auto-generated Verilog code.
 If SIR cell is in S state, any connected infected
individual could infect it with specified random
number
 If SIR cell is in I state, it could recover with
specified random number
 P_StoI and P_ItoR are fixed based on parameters, if
RNG gives out a number less than fixed P, the
comparer gives out 1 which enables the next stage.
 First of all, we test the algorithm in MATLAB
simulation
 MATLAB simulation gives out a similar result
as theoretical one which has a sharp rising and
a slow decaying.
 If we double the possibility for both infecting
and recovering, the shapes of the figures stay
similar but the time steps decrease a half,
which shows the validation of the algorithm
 For verification, there are three steps:
 First, with the same RNG, FPGA and MATLAB
should give out exactly same results, which proves
the Verilog code authentic
 Second, test the RNG that we used, especially
compare it with the MATLAB rand() function
which we assume is good enough
 Last, repeat the simulation on FPGA, with the
same seeds for RNG, the result should not change
 To examine the FPGA version, we build a same
RNG on MATLAB and give them the same seeds
as FPGA. Also, setting a smaller group of
individual makes it easier to identify them
 We designed a hardware solution to accelerate the
simulation for SIR model and implemented it on Altera
DE2-115 board
 MATLAB simulation was introduced to validate the
mathematical algorithm for the simulation
 Verilog code was automatically generated from a MATLAB
program which made it easier to change the parameters
 We used a 64-bit XOR feedback shift register as random
number generator in FPGA and prove it to be good enough
for simulation
 Verilog code was verified by comparing to the MATLAB
version with the same RNG
 The final implementation was stable during repeats
 The hardware solution gave a 5000 times better speed with
120 individuals than software
 1]A. Hoogland, J. Spaa, B. Selman and A.
Compagner, A special-purpose processor for
the Monte Carlo simulation of ising spin
systems, Journal of Computational Physics,
Volume 51, Issue 2, August 1983, Pages 250-260
 [2]http://www.cse.wustl.edu/~jain/cse567-
08/ftp/k_27trg.pdf
 [3]http://en.wikipedia.org/wiki/Compartmen
tal_models_in_epide miology

More Related Content

PPTX
Iwsm2014 on automatically collectable metrics for software maintainability ...
PPTX
Evolution of JDK Tools for Multithreaded Programming
PPTX
LSRepair: Live Search of Fix Ingredients for Automated Program Repair
PPTX
Μεταπρογραµµατισµός κώδικα Python σε γλώσσα γραµµικού χρόνου για αυτόµατη επα...
PPTX
Automated Program Repair Keynote talk
PPTX
Isorc18 keynote
PPTX
20100522 software verification_sharygina_lecture02
ODP
Fpga creating counter with internal clock
Iwsm2014 on automatically collectable metrics for software maintainability ...
Evolution of JDK Tools for Multithreaded Programming
LSRepair: Live Search of Fix Ingredients for Automated Program Repair
Μεταπρογραµµατισµός κώδικα Python σε γλώσσα γραµµικού χρόνου για αυτόµατη επα...
Automated Program Repair Keynote talk
Isorc18 keynote
20100522 software verification_sharygina_lecture02
Fpga creating counter with internal clock

Viewers also liked (17)

PPTX
Calculator design with lcd using fpga
ODP
FPGA Tutorial - LCD Interface
PDF
GO SMS Backup, Restore, and Decrypt
DOCX
Uart
PDF
Advanced Encryption Standard (AES) with Dynamic Substitution Box
PDF
Advanced encryption standard (aes) epul
PDF
Advanced encryption standard (aes)
PPT
AES Cryptosystem
PDF
Advanced Encryption Standard (AES)
PPT
PDF
Advanced Encryption Standard (AES) Implementaion using Java
PPT
Backup And Recovery
PDF
AES-Advanced Encryption Standard
PPTX
Aes (advance encryption standard)
PPT
Backup And Recovery
PPT
Presentation on backup and recoveryyyyyyyyyyyyy
Calculator design with lcd using fpga
FPGA Tutorial - LCD Interface
GO SMS Backup, Restore, and Decrypt
Uart
Advanced Encryption Standard (AES) with Dynamic Substitution Box
Advanced encryption standard (aes) epul
Advanced encryption standard (aes)
AES Cryptosystem
Advanced Encryption Standard (AES)
Advanced Encryption Standard (AES) Implementaion using Java
Backup And Recovery
AES-Advanced Encryption Standard
Aes (advance encryption standard)
Backup And Recovery
Presentation on backup and recoveryyyyyyyyyyyyy
Ad

Similar to Acceleration of stochastic algorithm on fpga system (9)

DOCX
Acceleration of stochastic algorithm on fpga system
DOCX
Acceleration of stochastic algorithm on fpga system
PPT
14911259.ppt
PDF
Simulation rules are almost the same to what I coded using Python bu.pdf
PDF
Quantifying Information Leaks via Model Counting Modulo Theories
PDF
Imms phage lambda_2011
PDF
Reliability Improvement in Logic Circuit Stochastic Computation
PPTX
An Introduction to Simulation in the Social Sciences
PDF
A COMPUTER VIRUS PROPAGATION MODEL USING DELAY DIFFERENTIAL EQUATIONS WITH PR...
Acceleration of stochastic algorithm on fpga system
Acceleration of stochastic algorithm on fpga system
14911259.ppt
Simulation rules are almost the same to what I coded using Python bu.pdf
Quantifying Information Leaks via Model Counting Modulo Theories
Imms phage lambda_2011
Reliability Improvement in Logic Circuit Stochastic Computation
An Introduction to Simulation in the Social Sciences
A COMPUTER VIRUS PROPAGATION MODEL USING DELAY DIFFERENTIAL EQUATIONS WITH PR...
Ad

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Pharma ospi slides which help in ospi learning
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
master seminar digital applications in india
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Pre independence Education in Inndia.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
Complications of Minimal Access Surgery at WLH
TR - Agricultural Crops Production NC III.pdf
GDM (1) (1).pptx small presentation for students
Abdominal Access Techniques with Prof. Dr. R K Mishra
Sports Quiz easy sports quiz sports quiz
Pharma ospi slides which help in ospi learning
Microbial disease of the cardiovascular and lymphatic systems
master seminar digital applications in india
Renaissance Architecture: A Journey from Faith to Humanism
Anesthesia in Laparoscopic Surgery in India
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Cell Types and Its function , kingdom of life
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
01-Introduction-to-Information-Management.pdf
Cell Structure & Organelles in detailed.
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Pre independence Education in Inndia.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Final Presentation General Medicine 03-08-2024.pptx

Acceleration of stochastic algorithm on fpga system

  • 2.  Simulation of stochastic model like SIR model is very useful. However, the software simulation of this kind of model becomes so slow with the individual number increasing, so this project provides a much faster hardware solution for it.  A simulation is implemented on MATLAB to test and verify the mathematical algorithm  The final project is implemented on DE-115 board using Verilog, which gives a much faster performance than on PC  To make the Verilog code more flexible and variable, a MATLAB program is designed to automatically generate the Verilog code
  • 3.  In SIR model, each individual has to be one of the three stages: S(Susceptible), I(Infectious) or R(Recovered)  Once the individual is recovered, it can’t be infected again  We can abstract the real world local relationship network to a simplified one, where each individual is connected to all the closely related ones, which means they can infect others through connections  Initially, one or several individuals are set to be infectious and the transition rates(possibility for infecting and recovering) are fixed
  • 4.  If we observe the number of individuals of each state, assuming all the individuals are randomly connected, we should expect a theoretical result as below  The green one, which indicates the number of infected individuals, is the data that we observe in the actual simulation
  • 6.  Instead of solving the problem in continuous domain, we use discrete domain which is compatible with hardware system. Moreover, we use a uniform time step for simulation, which lead to a fixed infecting and recovering probability for every step.  The most important component for this project is a high performance random number generator(RNG). In this case, we use a 64-bit XOR feedback shift register as the RNG, which is easy to implement in FPGA
  • 7.  Since we need a easily changeable code for implementing, a MATLAB program is designed with which users can change just the parameters and get auto-generated Verilog code.  If SIR cell is in S state, any connected infected individual could infect it with specified random number  If SIR cell is in I state, it could recover with specified random number  P_StoI and P_ItoR are fixed based on parameters, if RNG gives out a number less than fixed P, the comparer gives out 1 which enables the next stage.
  • 8.  First of all, we test the algorithm in MATLAB simulation  MATLAB simulation gives out a similar result as theoretical one which has a sharp rising and a slow decaying.  If we double the possibility for both infecting and recovering, the shapes of the figures stay similar but the time steps decrease a half, which shows the validation of the algorithm
  • 9.  For verification, there are three steps:  First, with the same RNG, FPGA and MATLAB should give out exactly same results, which proves the Verilog code authentic  Second, test the RNG that we used, especially compare it with the MATLAB rand() function which we assume is good enough  Last, repeat the simulation on FPGA, with the same seeds for RNG, the result should not change  To examine the FPGA version, we build a same RNG on MATLAB and give them the same seeds as FPGA. Also, setting a smaller group of individual makes it easier to identify them
  • 10.  We designed a hardware solution to accelerate the simulation for SIR model and implemented it on Altera DE2-115 board  MATLAB simulation was introduced to validate the mathematical algorithm for the simulation  Verilog code was automatically generated from a MATLAB program which made it easier to change the parameters  We used a 64-bit XOR feedback shift register as random number generator in FPGA and prove it to be good enough for simulation  Verilog code was verified by comparing to the MATLAB version with the same RNG  The final implementation was stable during repeats  The hardware solution gave a 5000 times better speed with 120 individuals than software
  • 11.  1]A. Hoogland, J. Spaa, B. Selman and A. Compagner, A special-purpose processor for the Monte Carlo simulation of ising spin systems, Journal of Computational Physics, Volume 51, Issue 2, August 1983, Pages 250-260  [2]http://www.cse.wustl.edu/~jain/cse567- 08/ftp/k_27trg.pdf  [3]http://en.wikipedia.org/wiki/Compartmen tal_models_in_epide miology