12-01-2021 03:06 AM
Hi again and thanks for the comment,
Well, I have not tried to write down a formula for this, however, the implementation logic is simple, once the input hits the threshold then make it reset immodestly to reset values and make a static input for a few seconds, and then again produce the input and produce the same behavior.
might be this will help you to understand,
12-01-2021 03:37 AM
Hi sam,
@sam67 wrote:
Well, I have not tried to write down a formula for this, however, the implementation logic is simple
And because the logic is simple you aren't able to produce the expected results...
Please write down the formula you want to implement in your VI, and write down the other "side conditions" in some kind of pseudocode!
12-01-2021 04:11 AM
Hi,
Agreed, if it seems easy then might be already solved but as mentioned earlier the same methodology works fine. with Y-Axis (positive voltage) values but when I just tried to change the Y-Axis values to mV values or negative its stuck on static might be the negative values are so small as you mentioned but definitely, there is some implementation lake into the implementation as well.
Here is the pseudocode of the algorithm,
# Set parameters V_th, V_reset = pars['-55*mV'], pars['-75*mV'] tau_m, c_m, g_L = pars['10*ms'] , pars['0.2*nF'], pars['c_m/tau'] V_init, E_L = pars['-75*mV'], pars['-75*mV']
t_static = pars['10*ms']
# Initialize voltage V[0] = V_init
While (True):
If V >= V_th:
V = V_reset
V = t_static
However, the other terms which are mentioned in the differential equation with required values are also mentioned above.
Hope this will help you,
12-01-2021 04:17 AM
Hi sam,
now only the formula to calculate "V" in the while loop is missing. I repeat: not that differential equation in your image, but the actual formula implemented in your VI!
(As far as I remember you forgot the "V[0]=V_init" step in your VI...)
12-01-2021 04:32 AM
Hi again,
I think you are looking for this,
12-01-2021 04:38 AM - edited 12-01-2021 04:40 AM
Hi sam,
@sam67 wrote:
I think you are looking for this,
(-(v-v_rest)*g_l + I(t))/c_m
And why is there an "e^x" function in your VI?
(Please reread my messages #2 and #6 on "differences between actual implementation and expectations"...)
12-01-2021 04:51 AM
Hi again,
The ex function helps me to generate waves into the chart that's my understanding if I will remove this the chart will not produce the exact results that I am looking. This is included based on some random suggestions.
regarding comment #6, V[0] is the starting point that is already implemented into the VI where V[0] starts from the user-defined reset point values.
and regarding #2: as I mentioned many times based on the calculation with only Voltage or positive values it's right.
Could you please try to run a VI with positive or Voltage values and then just change the values of Y-Axis to mV.
Of course, I am looking for your suggestion but your questions help me a lot to understand even my own understanding on this issue but without running a VI I think that will not clear your concern as well.
Best regards
Sam
12-01-2021 05:11 AM
Hi sam,
@sam67 wrote:
The ex function helps me to generate waves into the chart that's my understanding if I will remove this the chart will not produce the exact results that I am looking.
So there is a mismatch between your expectations and the math/formulas/algorithm in your VI?
@sam67 wrote:
Could you please try to run a VI with positive or Voltage values and then just change the values of Y-Axis to mV.
I repeat: changing the Y axis scaling will NOT change anything to the calculations done in your VI! It will only change which part of the plot will be visible...
12-01-2021 05:19 AM
Hi again,
As you are continuously referred to the implementation part which I already know and that's the reason I am not receiving the same output which is required and because of failure implementation I am looking for appropriate suggestion not just only referred that the implementation is wrong.
I will keep this question open and look for other people's suggestions that might be helpful for me and others who are following this question.
Best regards
Sam