optical simulation system for brain waves detection & measurements

17
Optical Simulation System for Optical Simulation System for Brain Brain Waves Detection & Waves Detection & Measurements Measurements FRS FRS Presenters: Presenters: Yevgeny Safovich Yevgeny Safovich 307015578 307015578 Nadav Pilnick Nadav Pilnick 028824449 028824449 Supervised By: Supervised By: Hen Brodney Hen Brodney

Upload: tallulah-raymond

Post on 30-Dec-2015

29 views

Category:

Documents


0 download

DESCRIPTION

Optical Simulation System for Brain Waves Detection & Measurements. FRS. Presenters: Yevgeny Safovich307015578 Nadav Pilnick028824449 Supervised By:Hen Brodney. Definition of Terms. Element – a unit filled with a single color Pattern – collection of atomic Elements - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Optical Simulation System for Brain Waves Detection & Measurements

Optical Simulation System for BrainOptical Simulation System for BrainWaves Detection & MeasurementsWaves Detection & Measurements

FRSFRSPresenters:Presenters:

Yevgeny SafovichYevgeny Safovich307015578307015578

Nadav PilnickNadav Pilnick 028824449028824449

Supervised By:Supervised By: Hen BrodneyHen Brodney

Page 2: Optical Simulation System for Brain Waves Detection & Measurements

Definition of TermsDefinition of Terms

Element – a unit filled with a single colorElement – a unit filled with a single color

Pattern – collection of atomic ElementsPattern – collection of atomic Elements

Step – definition of Patterns changing with a specified Step – definition of Patterns changing with a specified frequency and a D.C.frequency and a D.C.

Program – a set of StepsProgram – a set of Steps

Supervisor – the programmer of the Patterns and the stepsSupervisor – the programmer of the Patterns and the steps

Operator – the tester of the person examined, will select Operator – the tester of the person examined, will select the predefined stepsthe predefined steps

Page 3: Optical Simulation System for Brain Waves Detection & Measurements

Problem Definition Problem Definition

Measure eye vision quality objectivelyMeasure eye vision quality objectively

– The vision should be measured (almost) The vision should be measured (almost) without cooperation of the person being without cooperation of the person being examinedexamined

Page 4: Optical Simulation System for Brain Waves Detection & Measurements

Project Objectives/Goals + Needs Project Objectives/Goals + Needs AnalysisAnalysis

Output programmable Patterns by programmable Steps Output programmable Patterns by programmable Steps to the Monitorto the MonitorOutput an electrical pulseOutput an electrical pulseThe above should be synchronizedThe above should be synchronized

The following should be programmable by the The following should be programmable by the supervisor:supervisor:– ProgramsPrograms– PatternsPatterns– StepsSteps

The following should be selected by the operator:The following should be selected by the operator:– Select program to be usedSelect program to be used

Page 5: Optical Simulation System for Brain Waves Detection & Measurements

Constraints & Definitions Constraints & Definitions

3 pairs of colors:3 pairs of colors:– Blue, YellowBlue, Yellow– Green, RedGreen, Red– Black, WhiteBlack, White

Each pair has its own “blank” color: the average Each pair has its own “blank” color: the average of the colors in the pairof the colors in the pair

Steps frequency: 0.5Hz – 10Hz, resolution 1HzSteps frequency: 0.5Hz – 10Hz, resolution 1Hz

dx = The delta between the Monitor output and dx = The delta between the Monitor output and the electrical pulse output. 0.5ms < dx < 1.5msthe electrical pulse output. 0.5ms < dx < 1.5ms

Page 6: Optical Simulation System for Brain Waves Detection & Measurements

SolutionSolution

Write a software application which will do the following:Write a software application which will do the following:

– Allow the supervisor to program the programs, steps, patterns Allow the supervisor to program the programs, steps, patterns for the required testsfor the required tests

– Allow the operator to select a program to useAllow the operator to select a program to use

– Output the programmed graphics to the monitor synchronized Output the programmed graphics to the monitor synchronized with an electrical pulsewith an electrical pulse

– The electrical pulse above will lead to a measurement of the The electrical pulse above will lead to a measurement of the waves within a human’s brainwaves within a human’s brain

– The measurement of the waves within a human’s brain is out of The measurement of the waves within a human’s brain is out of the scope of the project. learn the video interfacethe scope of the project. learn the video interface

Page 7: Optical Simulation System for Brain Waves Detection & Measurements

Solution AlgorithmSolution Algorithm

Computer

Monitor

Video Card

Human

Brain Wavesmeter

Operator

* The red interfaces should be synchronized

Page 8: Optical Simulation System for Brain Waves Detection & Measurements

TimingTiming

• 0.5ms < |t5 – t3| < 1.5ms

• |t4 – t3|- We suppose this time does not matter and is taken care of by the “Brain Waves meter”

• |t3 – t2|- We suppose this interval is negligible

• |t2 – t1b| - The major problem of the project, discussed below

• |t5 – t1a| - A problem discussed below

Computer

MonitorVideoCard

HumanBrain Waves

meter

Operator

t

t1b t3 t4t2 t5t1a

Page 9: Optical Simulation System for Brain Waves Detection & Measurements

Timing cont.Timing cont.

We have 2 major issues:We have 2 major issues:– Output of the graphics delay Output of the graphics delay

The time it takes for the screen to show the data since it was The time it takes for the screen to show the data since it was sentsent to the video cardto the video card

– Output of the electrical pulse delayOutput of the electrical pulse delayThe time it takes for the output port to The time it takes for the output port to change the output change the output levellevel since the opcode was sent to the processor since the opcode was sent to the processor

Supposed the above are constant (deterministic) Supposed the above are constant (deterministic) we can force synchronizationwe can force synchronization

Page 10: Optical Simulation System for Brain Waves Detection & Measurements

Pattern programmingPattern programming

The way to define a pattern:The way to define a pattern:– Squares: Size, Colors (2 colors)Squares: Size, Colors (2 colors)– Bands: Size, Colors, Type (horiz., vert.)Bands: Size, Colors, Type (horiz., vert.)– Q1: Element typeQ1: Element type– Q2: Element typeQ2: Element type– Q3: Element typeQ3: Element type– Q4: Element typeQ4: Element type

Example: Pattern1Example: Pattern1– Squares: 10, blue: redSquares: 10, blue: red– Bands: 10,white:black,horizBands: 10,white:black,horiz– Q1: SquaresQ1: Squares– Q2: BandsQ2: Bands– Q3: BlankQ3: Blank– Q4: BlankQ4: Blank

Q1

Q4

Q2

Q3

Page 11: Optical Simulation System for Brain Waves Detection & Measurements

Steps programmingSteps programming

The way to define a step:The way to define a step:– Patterns usedPatterns used– Duration (frequency)Duration (frequency)– D.C.D.C.

Example:Example:– Pattern1, Pattern2Pattern1, Pattern2

Page 12: Optical Simulation System for Brain Waves Detection & Measurements

Example of a programExample of a program

Program1:Program1:– Pattern:P1Pattern:P1

Squares: 10, blue: redSquares: 10, blue: redBands: 10,white:black,horizBands: 10,white:black,horizQ1: SquaresQ1: SquaresQ2: BandsQ2: BandsQ3: BlankQ3: BlankQ4: BlankQ4: Blank

– Pattern:P2Pattern:P2……

– Step:S1Step:S1P1:30%, P2:70%P1:30%, P2:70%Frequency: 5HzFrequency: 5HzDuration = 2secDuration = 2sec

Page 13: Optical Simulation System for Brain Waves Detection & Measurements

Development TimeframesDevelopment Timeframes

All major problems must be solved not later than in 2 All major problems must be solved not later than in 2 weeks.weeks.

The FRS must be completed not later than in 3 weeksThe FRS must be completed not later than in 3 weeks

The FRS should contain solutions and decisions for all The FRS should contain solutions and decisions for all issues mentioned in “issues mentioned in “Risks & ProblemsRisks & Problems” on the following ” on the following slidesslides

Page 14: Optical Simulation System for Brain Waves Detection & Measurements

Project Blocks DiagramProject Blocks Diagram

The below is relevant only if the FRS is finished as stated aboveThe below is relevant only if the FRS is finished as stated above

ProgrammableModule

Electrical pulseInterface

VideoInterface

Uni-TestsQA

System Tests

Arbiter –Main Application

Module

Page 15: Optical Simulation System for Brain Waves Detection & Measurements

Major Risks & ProblemsMajor Risks & Problems

Is the synchronization accuracy of 1ms correct?Is the synchronization accuracy of 1ms correct?

The delay of the video card is unknownThe delay of the video card is unknown

It takes the screen (5 – 10)ms (? – refresh rate) to draw It takes the screen (5 – 10)ms (? – refresh rate) to draw the image. What should be the synchronization point ???the image. What should be the synchronization point ???

We have to catch a beginning of a Vertical Sync. of the We have to catch a beginning of a Vertical Sync. of the image we sent.image we sent.

Verify the delay of an output port is constant and short Verify the delay of an output port is constant and short enough.enough.

Page 16: Optical Simulation System for Brain Waves Detection & Measurements

Major Risks & Problems cont.Major Risks & Problems cont.

Supposed the application is written in Windows we have Supposed the application is written in Windows we have the following problems:the following problems:– There might be a Context Switch between 2 commands…There might be a Context Switch between 2 commands…– Does the Kernel run if the process’s priority is Real-TimeDoes the Kernel run if the process’s priority is Real-Time– Video Card buffer’s delay is unknown (32 Mb)Video Card buffer’s delay is unknown (32 Mb)– Any HW access requires a device driverAny HW access requires a device driver

Supposed the application is written in DOS we have the Supposed the application is written in DOS we have the following issues & problems:following issues & problems:– Is direct writing to the Video memory possible?Is direct writing to the Video memory possible?– Is the data sent to video card un-buffered?Is the data sent to video card un-buffered?– Are video paging switches possible? How much time it takes to Are video paging switches possible? How much time it takes to

switch paging?switch paging?

Page 17: Optical Simulation System for Brain Waves Detection & Measurements

Gathered InformationGathered Information

Maximum Refresh Rate: 200HzMaximum Refresh Rate: 200Hz

ECP: output takes ~ 1microsecondECP: output takes ~ 1microsecond

There is a driver API allowing to block the There is a driver API allowing to block the application till the next Vertical Blank application till the next Vertical Blank (Windows - DirectDraw)(Windows - DirectDraw)