Addressing Initial Voltage Peaks in HH model due to noise

Hello! I am quite new to Brian2 and had a question about an unusual behaviour - while providing noise to the neurons, their membrane potential initially peaks and then stabilizes. This could cause some unintended behaviour in the network and synchronization that is not meant to be. The peak occurred using simple white noise and OU noise as declared below:

I_noise = mu_noise + (sigma_noise*randn()) : amp (constant over dt) -> simple white noise

dI_noise/dt = (mu_noise - I_noise)/tau_noise + sigma_noise*sqrt(2/tau_noise)*xi : amp -> OU noise

I would appreciate any guidance on the topic and would like to learn how to correctly implement noise within HH models in Brian2. Have you encountered this problem before? To provide more context, I added below the model I am using. Thank you in advance :slight_smile:

eqs = '''
    dv/dt =  -(I_leak + I_Na + I_K + I_M - I_noise) / (1*ufarad*cm**-2 * size) : volt
    I_leak = (2.05e-5*siemens*cm**-2) * size * (v - (-70.3*mV)) : amp
    I_Na = (0.056*siemens*cm**-2) * size * (m**3) * h * (v - (50*mV)) : amp
        dm/dt = alpham * (1 - m) - betam * m : 1
        dh/dt = alphah * (1 - h) - betah * h : 1
        alpham = - 0.32 * (mV ** -1) * (v - (-56.2*mV) - 13 * mV) / (exp(- (v - (-56.2*mV) - 13 * mV) / (4 * mV)) - 1.) / ms : Hz
        betam = 0.28 * (mV ** -1) * (v - (-56.2*mV) - 40 * mV) / (exp((v - (-56.2*mV) - 40 * mV) / (5 * mV)) - 1.) / ms : Hz
        alphah = 0.128 * exp(- (v - (-56.2*mV) - 17 * mV) / (18 * mV)) / ms : Hz
        betah = 4. / (1 + exp(- (v - (-56.2*mV) - 40 * mV) / (5 * mV))) / ms : Hz
    I_K = (0.006*siemens*cm**-2) * size * (n**4) * (v - (Ek)) : amp
        dn/dt = alphan * (1 - n) - betan * n : 1
        alphan =  - 0.032 * (mV ** -1) * (v  - (-56.2*mV) - 15 * mV) / (exp(- (v - (-56.2*mV) - 15 * mV) / (5 * mV)) - 1.) / ms : Hz
        betan = 0.5 * exp( - (v - (-56.2*mV) - 10 * mV) / (40 * mV)) / ms : Hz
    I_M = (7.5e-5*siemens*cm**-2) * size * p * (v - (-90*mV)) : amp
        dp/dt = (pInf - p) / pTau : 1
        pInf = 1. / (1 + exp(- (v + (35 * mV)) / (10 * mV))) : 1
        pTau = (608*ms) / (3.3 * exp((v + (35 * mV)) / (20 * mV)) + exp(- (v + (35 * mV)) / (20 * mV))) : second


    size : metre**2
   
    x:metre
    y:metre
    z:metre

    I_noise = UO or white

    sigma_noise : amp
    mu_noise : amp
    tau_noise : second
    '''

I have solved the issue! The problem was to do with both the I_noise starting at 0 and then rapidly climbing and also the gating variables in the HH model were initialized far from equilibrium and caused the membrane voltage peak. So I made the following edits to my NeuronGroup:

# Initialize the Noise at Steady State
neuron_group.I_noise = mu_noise

# Initialize the Gating Variables at a Stable Rest
neuron_group.m = 'alpham / (alpham + betam)'
neuron_group.h = 'alphah / (alphah + betah)'
neuron_group.n = 'alphan / (alphan + betan)'
neuron_group.p = 'pInf'

Sorry for the bother and hope this helps some other newbie out there :slight_smile:

1 Like