source: project/release/4/9ML-toolkit/trunk/examples/TestIzhikevich03.9ML @ 25698

Last change on this file since 25698 was 25698, checked in by Ivan Raikov, 9 years ago

9ML-toolkit version 1.12

File size: 4.5 KB
Line 
1
2(*
3   Simple Model of Spiking Neurons, Izhikevich  E
4
5   IEEE Transactions on Neural Networks (2003) 14:1569- 1572
6 
7*)
8
9
10component Izhikevich03 =
11struct
12
13  binding construct t V U k1 k2 k3 theta a b c d spike tspike Isyn h =
14
15    binding subthreshold_eq = [
16                                [ d (V t h) =  (k1 * V * V) + (k2 * V) + k3 + (- U) + Isyn ]
17                                [ d (U t h) =  a * ((b * V) - U) ]
18                              ]
19
20    binding threshold_detect  =  [ spike = (V > theta) ]
21
22    binding tspike_set        =  [ tspike = (if spike then t else tspike) ]
23
24    binding subthreshold_regime  = Diagram.SEQUENCE subthreshold_eq (Diagram.SEQUENCE threshold_detect tspike_set)
25                 
26    binding refractory_eq        = [
27                                     [ t      =  t ]
28                                     [ spike  = false ]
29                                     [ tspike = tspike ]
30                                     [ V      = c ]
31                                     [ U      = (U + d) ]
32                                    ]
33
34    return   Diagram.TRANSIENT subthreshold_regime refractory_eq spike
35
36end
37
38component S = Signal
39
40component TestIzhikevich03 =
41struct
42
43
44  val h = S.realsig `h (S.realconst 0.001)
45
46  (* Parameters common to all spiking regimes *)
47  val k1    =    S.realsig `k1 (S.realconst (Real.mul 4. 0.01))
48  val k2    =    S.realsig `k2 (S.realconst 5.0)
49  val k3    =    S.realsig `k3 (S.realconst 140.0)
50  val theta =    S.realsig `theta (S.realconst 30.0)
51  val Isyn  =    S.realsig `Isyn  (S.realconst 10.0)
52
53  (* State initial values *)
54  val t      = S.realsig `t (S.realconst 0.0)
55  val V      = S.realsig `V (S.realconst -65.0)
56  val tspike = S.realsig `tspike (S.realconst 0.0)
57  val spike  = S.boolsig `spike (S.boolconst false)
58
59  (* Regular spiking (RS) parameters *)
60  val RS_a   = S.realsig `a (S.realconst 0.02)
61  val RS_b   = S.realsig `b (S.realconst 0.2)
62  val RS_c   = S.realsig `c (S.realconst -65.0)
63  val RS_d   = S.realsig `d (S.realconst 8.0)
64  val RS_U   = S.realsig `U (S.mul RS_b V)
65  val RS     = Izhikevich03.construct t V RS_U k1 k2 k3 theta RS_a RS_b RS_c RS_d spike tspike Isyn h
66  val RS_ivp = IVP.construct RS `t `h 0.0 250.0
67
68  (* Intrinsically bursting (IB) parameters *)
69  val IB_a = S.realsig `a (S.realconst 0.02)
70  val IB_b = S.realsig `b (S.realconst 0.2)
71  val IB_c = S.realsig `c (S.realconst -55.0)
72  val IB_d = S.realsig `d (S.realconst 4.0)
73  val IB_U = S.realsig `U (S.mul IB_b V)
74  val IB   = Izhikevich03.construct t V IB_U k1 k2 k3 theta IB_a IB_b IB_c IB_d spike tspike Isyn h
75  val IB_ivp = IVP.construct IB `t `h 0.0 250.0
76
77  (* Chattering (CH) parameters *)
78  val CH_a = S.realsig `a (S.realconst 0.02)
79  val CH_b = S.realsig `b (S.realconst 0.2)
80  val CH_c = S.realsig `c (S.realconst -50.0)
81  val CH_d = S.realsig `d (S.realconst 2.0)
82  val CH_U = S.realsig `U (S.mul CH_b V)
83  val CH   = Izhikevich03.construct t V CH_U k1 k2 k3 theta CH_a CH_b CH_c CH_d spike tspike Isyn h
84  val CH_ivp = IVP.construct CH `t `h 0.0 250.0
85             
86  (* Fast-spiking (FS) parameters *)
87  val FS_a = S.realsig `a (S.realconst 0.1)
88  val FS_b = S.realsig `b (S.realconst 0.2)
89  val FS_c = S.realsig `c (S.realconst -65.0)
90  val FS_d = S.realsig `d (S.realconst 2.0)
91  val FS_U = S.realsig `U (S.mul FS_b V)
92  val FS   = Izhikevich03.construct t V FS_U k1 k2 k3 theta FS_a FS_b FS_c FS_d spike tspike Isyn h
93  val FS_ivp = IVP.construct FS `t `h 0.0 250.0
94             
95  (* Thalamo-cortical (TC) parameters *)
96  val TC_a = S.realsig `a (S.realconst 0.02)
97  val TC_b = S.realsig `b (S.realconst 0.25)
98  val TC_c = S.realsig `c (S.realconst -65.0)
99  val TC_d = S.realsig `d (S.realconst 0.05)
100  val TC_U = S.realsig `U (S.mul TC_b V)
101  val TC   = Izhikevich03.construct t V TC_U k1 k2 k3 theta TC_a TC_b TC_c TC_d spike tspike Isyn h
102  val TC_ivp = IVP.construct TC `t `h 0.0 250.0
103             
104  (* Resonator (RZ) parameters *)
105  val RZ_a = S.realsig `a (S.realconst 0.1)
106  val RZ_b = S.realsig `b (S.realconst 0.26)
107  val RZ_c = S.realsig `c (S.realconst -65.0)
108  val RZ_d = S.realsig `d (S.realconst 2.0)
109  val RZ_U = S.realsig `U (S.mul RZ_b V)
110  val RZ   = Izhikevich03.construct t V RZ_U k1 k2 k3 theta RZ_a RZ_b RZ_c RZ_d spike tspike Isyn h
111  val RZ_ivp = IVP.construct RZ `t `h 0.0 250.0
112             
113  (* Low-threshold spiking (LTS) parameters *)
114  val LTS_a = S.realsig `a (S.realconst 0.02)
115  val LTS_b = S.realsig `b (S.realconst 0.25)
116  val LTS_c = S.realsig `c (S.realconst -65.0)
117  val LTS_d = S.realsig `d (S.realconst 2.0)
118  val LTS_U = S.realsig `U (S.mul LTS_b V)
119  val LTS   = Izhikevich03.construct t V LTS_U k1 k2 k3 theta LTS_a LTS_b LTS_c LTS_d spike tspike Isyn h
120  val LTS_ivp = IVP.construct LTS `t `h 0.0 250.0
121
122end
123
Note: See TracBrowser for help on using the repository browser.