Visual Spatial Covert Attention is a cognitive effect that is produced when a person is looking into whatever it has in front of him, and some event appears on the visual field. If the person decides to pay attention to the event without gazing at it, a shift is produced in the alpha band of the EEG signals (10 Hz) towards those electrodes located on the same side of the event location.
Events are triggered one per second according to the timer on each side of the screen, one after the other, being -1 for left, and 1 for right. For each event, the brain signals will shift towards each side and if a threshold is reached, the output of the system will change to the side where the brain signals drifted.
Each signal from each channel is band-passed to 8-12 hz and the power spectral density of all of them will be vectorized and summed up (according to their relative position, as suggested by the the figure)
We are considering that the person always pays COVERT attention to the event, and the signal will drift to the same side where each event was triggered.
The model is:
For this model, we will consider the brainwaves to be linear drifts to each direction.
What about the jump-map ?
The sets being:
Ok, let’s see the results on the simulation:
It can be seen how the output of the system, adapts accordingly to the direction where the brainwaves drifted (left, right) based on the direction of the previous stimulation event. The timer is only triggered the first time because the brainwaves are moving towards the stimulus’ direction (left) and the output is already there.
If we plot against we see a sheared hysteresis characteristic plot. The brainwaves affects the output of the system after the jump has occurred, so both signals end up being shifted by a lag.
In red, jumps are plotted from regions to their new positions after the jump.
function inC = C(x) % check if x is in C tau = x(3); if (tau >= 0) && (tau <= 1) inC = 1; else inC = 0; end end
function inD = D(x) % check if x is in D global h_upper; global h_lower; tau = x(3); u = x(1); y = x(2); if (tau >= 1) || (y == -1 && u>=h_upper) || (y==1 && u<=h_lower) inD = 1; else inD = 0; end end
function xdot = f(x) % flow map q=x(4); y=x(2); if (q==1) udot = 1; else udot = -1; end xdot = [ udot; 0; 1; 0]; end
function xplus = g(x) % jump map global h_upper; global h_lower; u = x(1); q = x(4); % on jumps we are always over or bellow the bound. if (u>=h_upper) ydot = 1; elseif (u<=h_lower) ydot = -1; else ydot = x(2); end xplus = [0; ydot; 0; -q]; end
Finally, the run.m code
function hybridsystem() global h_upper; global h_lower; h_upper = 0.5; h_lower = -0.5; % define initial conditions x0 = [0; -1; 0; -1] % simulation horizon TSPAN = [0 10]; JSPAN = [0 20]; % Rule for OVERLAPS, what to choose when C and D collide? % rule = 1 -> priority for jumps % rule = 2 -> priority for flows, % rule = 3 -> random priority rule=1; options = odeset('RelTol', 1e-6,'MaxStep', .1); %Do your magic..... [t j x] = HyEQsolver( @f,@g,@C,@D,x0, TSPAN, JSPAN, rule, options); % t continuous time % j discrete time % x state variable for each (j,t) figure(1); clf subplot(4,1,1);plotflows(t,j,x(:,1)); grid on; ylabel('u'); subplot(4,1,2);plotflows(t,j,x(:,2)); grid on; axis([0 10 -1.5 1.5]); ylabel('y'); subplot(4,1,3);plotflows(t,j,x(:,3)); grid on; ylabel('tau'); subplot(4,1,4);plotflows(t,j,x(:,4)); grid on; axis([0 10 -1.5 1.5]); ylabel('q'); figure(2); plot(x(:,1),x(:,2),'-'); grid on; ylabel('y: output'); xlabel('u: brain waves'); axis([-2 2 -2 2]);
Done!. Thanks for reading !