LinearPoissonNeuron.h

Go to the documentation of this file.
00001 #ifndef LinearPoissonNeuron_H_
00002 #define LinearPoissonNeuron_H_
00003 
00004 #include "InputTargetTypes.h"
00005 #include "SpikeSender.h"
00006 #include "SimObject.h"
00007 #include "ThreadSpecificRandomDistribution.h"
00008 
00010 /*
00011  * If there are no Conductance based synapses the membrane potential \f$Vm\f$ is given by
00012  * \f[
00013  *   Vm = Rm * ( Isyn + Iinject + Inoise ) 
00014  * \f]
00015  * 
00016  * If there are conductance based synapses the membrane potential \f$Vm\f$ is given by
00017  * \f[
00018  *   Vm = ( Isyn + Iinject + Inoise ) / ( Gsyn + 1 / Rm ) 
00019  * \f]
00020  *  The neuron fires a poisson spike train with firing rate:
00021  * \f[ 
00022  *    R^{post}(t) = C * Vm 
00023  * \f]
00024  *  where  
00025  *  \f$I_s(t)\f$ is the current supplied by synapse \f$s\f$ (Ampere)
00026  *  \f$I_{inject}\f$ is the injected current (Ampere)
00027  *  \f$I_{noise}\f$ is the intrinsic noise current (Ampere)
00028  *  \f$C\f$ is the constant determining the slope of the linear rate function
00029  * 
00030  *  After spiking, \f$R^{post}(t)\f$ is reset to 0 during a refractory period defined by parameter \fT_{refract}\f$
00031  * 
00032  *  The neuron fires poisson spike trains with exact spike times, but it doesn't spike more then
00033  *  one spike per time step. To avoid the refractory period, set \fT_{refract}\f$ equal to the simulation time step.
00034  * 
00035  * References:
00036  *   Gütig R, Aharonov R, Rotter S & Sompolinsky H (2003) Learning Input Correlations Through Non-Linear Temporally Asymmetric Hebbian Plasticity.  Journal of Neuroscience   23  3697-3714.
00037  */
00038 class LinearPoissonNeuron : public SimObject, public SingleOutputSpikeSender, public ConductanceInputTarget 
00039 {
00040         SIMOBJECT( LinearPoissonNeuron , AdvancePhase::One )
00041 public:
00042 
00043     LinearPoissonNeuron( float C = 1,
00044                                                 float Rm = 1e8,
00045                                         float Trefract = 3e-3,                    
00046                                         float Inoise   = 0.0,
00047                                         float Iinject  = 0.0 ) 
00048             :  C(C), Rm(Rm), Trefract(Trefract), Inoise(Inoise), Iinject(Iinject)
00049     {
00050         /* NOOP */
00051     }
00052 
00053     virtual ~LinearPoissonNeuron()
00054     {
00055         /* NOOP */
00056     }
00057 
00059     virtual int reset( double dt );
00060 
00062     inline bool refractoryQ() { return (nStepsInRefr > 0); };
00063 
00064     virtual void clearSynapticInput(void);
00065     
00066     
00068     float C;
00069     
00071     float Rm;
00072     
00074     float Trefract;
00075 
00077     float Inoise;
00078 
00080     float Iinject;
00081     
00082     virtual double getManagedDelay() const { return 0; }
00083     virtual int nSpikeInputPorts() const { return 0; };
00084     virtual int nSpikeOutputPorts() const { return 1; };
00085     virtual int nAnalogInputPorts() const { return 0; };
00086     virtual int nAnalogOutputPorts() const { return 0; };
00087     virtual PortType outputPortType(port_t o) const
00088     {
00089         if( o==0) return spiking; else return undefined;
00090     };
00091     virtual PortType inputPortType(port_t i) const
00092     {
00093         return undefined;
00094     };
00096     virtual int adjust( double dt ) { return 0; };
00097 
00099     virtual int advance(AdvanceInfo const &);
00100 
00101 
00102     virtual void currentInput( double Isyn );
00103     
00104     virtual void conductanceInput( double g, double Erev );
00105 
00106 protected:
00108     double Vm;
00109     
00111     int nStepsInRefr;
00112     
00114     double Isyn;
00115     
00117     double Gsyn;
00118     
00120 
00123     double Twindow;
00124     
00125     // Random distribution for the poisson firing process
00126     static ThreadSpecificRandomDistribution< UniformDistribution > spike_gen;
00127         
00129     static ThreadSpecificRandomDistribution< NormalDistribution > noise_gen;
00130 
00131 };
00132 
00133 
00134 #endif /*LinearPoissonNeuron_H_*/

Generated on Wed Jul 9 16:34:39 2008 for PCSIM by  doxygen 1.5.5