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

Last change on this file since 30976 was 30976, checked in by Ivan Raikov, 6 years ago

signal-diagram / 9ML-toolkit: refactoring transients

File size: 4.2 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 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 subthreshold_regime  = subthreshold_eq
23                 
24    binding refractory_eq        = [
25                                     [ t      = t ]
26                                     [ h      = h ]
27                                     [ V      = c ]
28                                     [ U      = (U + d) ]
29                                    ]
30
31    return   Diagram.TRANSIENT subthreshold_regime refractory_eq spike threshold_detect
32
33end
34
35component S = Signal
36
37component TestIzhikevich03 =
38struct
39
40
41  val h = S.realsig `h (S.realconst 0.1)
42
43  (* Parameters common to all spiking regimes *)
44  val k1    =    S.realsig `k1 (S.realconst 0.04)
45  val k2    =    S.realsig `k2 (S.realconst 5.0)
46  val k3    =    S.realsig `k3 (S.realconst 140.0)
47  val theta =    S.realsig `theta (S.realconst 30.0)
48  val Isyn  =    S.realsig `Isyn  (S.realconst 10.0)
49  (* State initial values *)
50  val t      = S.realsig `t (S.realconst 0.0)
51  val V      = S.realsig `V (S.realconst -65.0)
52  val spike  = S.signal `spike
53
54  (* Regular spiking (RS) parameters *)
55  val RS_a   = S.realsig `a (S.realconst 0.02)
56  val RS_b   = S.realsig `b (S.realconst 0.2)
57  val RS_c   = S.realsig `c (S.realconst -65.0)
58  val RS_d   = S.realsig `d (S.realconst 8.0)
59  val RS_U   = S.realsig `U (S.mul RS_b V)
60  val RS     = Izhikevich03.construct t V RS_U k1 k2 k3 theta RS_a RS_b RS_c RS_d spike Isyn h
61  val RS_ivp = IVP.run RS `t `h 0.0 250.0
62
63(*
64  (* Intrinsically bursting (IB) parameters *)
65  val IB_a = S.realsig `a (S.realconst 0.02)
66  val IB_b = S.realsig `b (S.realconst 0.2)
67  val IB_c = S.realsig `c (S.realconst -55.0)
68  val IB_d = S.realsig `d (S.realconst 4.0)
69  val IB_U = S.realsig `U (S.mul IB_b V)
70  val IB   = Izhikevich03.construct t V IB_U k1 k2 k3 theta IB_a IB_b IB_c IB_d spike Isyn h
71  val IB_ivp = IVP.run IB `t `h 0.0 250.0
72
73  (* Chattering (CH) parameters *)
74  val CH_a = S.realsig `a (S.realconst 0.02)
75  val CH_b = S.realsig `b (S.realconst 0.2)
76  val CH_c = S.realsig `c (S.realconst -50.0)
77  val CH_d = S.realsig `d (S.realconst 2.0)
78  val CH_U = S.realsig `U (S.mul CH_b V)
79  val CH   = Izhikevich03.construct t V CH_U k1 k2 k3 theta CH_a CH_b CH_c CH_d spike Isyn h
80  val CH_ivp = IVP.run CH `t `h 0.0 250.0
81             
82  (* Fast-spiking (FS) parameters *)
83  val FS_a = S.realsig `a (S.realconst 0.1)
84  val FS_b = S.realsig `b (S.realconst 0.2)
85  val FS_c = S.realsig `c (S.realconst -65.0)
86  val FS_d = S.realsig `d (S.realconst 2.0)
87  val FS_U = S.realsig `U (S.mul FS_b V)
88  val FS   = Izhikevich03.construct t V FS_U k1 k2 k3 theta FS_a FS_b FS_c FS_d spike Isyn h
89  val FS_ivp = IVP.run FS `t `h 0.0 250.0
90             
91  (* Thalamo-cortical (TC) parameters *)
92  val TC_a = S.realsig `a (S.realconst 0.02)
93  val TC_b = S.realsig `b (S.realconst 0.25)
94  val TC_c = S.realsig `c (S.realconst -65.0)
95  val TC_d = S.realsig `d (S.realconst 0.05)
96  val TC_U = S.realsig `U (S.mul TC_b V)
97  val TC   = Izhikevich03.construct t V TC_U k1 k2 k3 theta TC_a TC_b TC_c TC_d spike Isyn h
98  val TC_ivp = IVP.run TC `t `h 0.0 250.0
99             
100  (* Resonator (RZ) parameters *)
101  val RZ_a = S.realsig `a (S.realconst 0.1)
102  val RZ_b = S.realsig `b (S.realconst 0.26)
103  val RZ_c = S.realsig `c (S.realconst -65.0)
104  val RZ_d = S.realsig `d (S.realconst 2.0)
105  val RZ_U = S.realsig `U (S.mul RZ_b V)
106  val RZ   = Izhikevich03.construct t V RZ_U k1 k2 k3 theta RZ_a RZ_b RZ_c RZ_d spike Isyn h
107  val RZ_ivp = IVP.run RZ `t `h 0.0 250.0
108             
109  (* Low-threshold spiking (LTS) parameters *)
110  val LTS_a = S.realsig `a (S.realconst 0.02)
111  val LTS_b = S.realsig `b (S.realconst 0.25)
112  val LTS_c = S.realsig `c (S.realconst -65.0)
113  val LTS_d = S.realsig `d (S.realconst 2.0)
114  val LTS_U = S.realsig `U (S.mul LTS_b V)
115  val LTS   = Izhikevich03.construct t V LTS_U k1 k2 k3 theta LTS_a LTS_b LTS_c LTS_d spike Isyn h
116  val LTS_ivp = IVP.run LTS `t `h 0.0 250.0
117*)
118end
119
Note: See TracBrowser for help on using the repository browser.