Parameter sweep on synapse model

27 views
Skip to first unread message

Raviteja Kedarasetti

unread,
Oct 18, 2015, 8:35:03 PM10/18/15
to xyce-users
Hi, I need help

I was running the basic synapse model from page 29 of this sandia report:


I wanted to run a parameter sweep to find the minimum value of max conductance (gmax). When I change the line ".param gRheo=1.318e-12" to ".global_param gRheo=1.318e-12", there is no action potential generated in the post-synaptic neuron. 

I also tried using 

.step syn12:gmax 1.318e-13 1.318e-12 1.318e-13

but I get the following error

Netlist error: Unable to find parameter SYN12:GMAX


What am I doing wrong? 


Thanks,

Ravi

xyce-users

unread,
Oct 19, 2015, 5:28:04 PM10/19/15
to xyce-users

Ravi,

Unfortunately this is a bug in the way the synapse device sets up its model and instance parameters.  At this time there isn't a straightforward workaround to this other than to run several independent simulations.  I'll file bug report and we will try to get this fixed.

Thanks,

Xyce-Team

xyce-users

unread,
Oct 19, 2015, 6:01:00 PM10/19/15
to xyce-users
Ravi,

We did find a work-around for this bug.  

On the .step line you'll need to specify the fully qualified device name.  For the synapse in question the full name is "ysynapse!syn12" 

The internal naming structure changed in Xyce since the guide you're using was published.  So, you will also have to change the ".step" and ".print" lines as follows: 

ysynapse syn12 a1 a2 synParams P={1} gMax={gRheo/N_Neu}

.tran 0 8.4
.step ysynapse!syn12:gmax 1.318e-13 1.318e-12 1.318e-13

.print tran i(In11) v(a1) v(a2) n(ysynapse!syn12_w) n(ysynapse!syn12_vl1)
+ n(ysynapse!syn12_vl2) n(ysynapse!syn12_vl3)

You can also move the gMax={gRheo/N_Neu} to the instance line but my testing so far doesn't indicate that this is necessary.  I get the same answers with gMax specified as either a model parameter or instance parameter.

Hopefully that will work for you.

Thanks

Xyce-Team

On Sunday, October 18, 2015 at 6:35:03 PM UTC-6, Raviteja Kedarasetti wrote:

xyce-users

unread,
Oct 19, 2015, 6:32:18 PM10/19/15
to xyce-users, xyce-...@googlegroups.com


On Monday, October 19, 2015 at 4:01:00 PM UTC-6, xyce-users wrote:


You can also move the gMax={gRheo/N_Neu} to the instance line but my testing so far doesn't indicate that this is necessary.  I get the same answers with gMax specified as either a model parameter or instance parameter.

 I can clarify why this is the case.

When you specify the .step loop over "ysynapse!syn12:gmax" you're sweeping the instance variable associated with the syn12 synapse device.  This *always* overrides the model parameter when it is specified. 

The gmax parameter in the model card is only used when no gmax variable is specified on the instance line (or in this case, via a step loop).  Once you put gmax on the instance line, the value in the model card is irrelevant.

NOTE:  Xyce 6.3 (and any version of Xyce prior to the upcoming 6.4 release) has a bug where the copying of model parameters into instance variables (such as is done here when gmax is not given on the instance line) happens at the wrong time, and renders .step loops over *model* parameters of this kind broken.  ".step synparams:gmax ..." would not work in Xyce 6.3, the simulation would proceed as if gmax were not changing.  So the only way to accomplish what you want in Xyce 6.3 is to sweep over the *instance* parameter version, and to do that you must step over "ysynapse!syn12:gmax", the actual name of the variable associated with the instance.

The bug referred to in the last paragraph has been fixed and the fix will be present in Xyce 6.4.

Raviteja Kedarasetti

unread,
Oct 20, 2015, 12:44:15 AM10/20/15
to xyce-users
Hi,

Thanks for the work-around. This should be good enough for most of my work. 

Cheers,
Ravi
Reply all
Reply to author
Forward
0 new messages