[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: gnucap: Multi-disciplinary / mixed language simulation



On Tuesday 30 January 2007 19:41, Peter Clifton wrote:
> As part of my research into linear generators, it would be
> useful to produce a full system level simulation combining
> gnucap as well as mechanical modelling I have in Octave.
>
> Another student has done circuit modelling for the power
> conversion stage (using PSpice), and my work so far has
> investigated the mechanical aspects of the system in Octave.
>
> To solve for the system's response, I find myself
> implementing crude circuit models in Octave, I wounder if
> there is some way to embed gnucap, calling it to provide
> solutions to circuit-side aspects of the system from within
> the mechanical simulation. I'm not sure how the time-stepping
> of the two numerical solvers would tie together though.
>
> I'm keen to write a gnucap model for the generator at some
> stage, so more accurate modelling of arbitrary converter
> waveforms / control algorithms can be evaluated for the
> system as a whole.
>
> I'm currently going around in circles trying to work out
> whether is is best to try and build a mechanical model of the
> generator into gnucap (probably calling Octave), or to try
> and use gnucap to solve the electrical problems for a
> "system" simulation in Octave. (Which may well be embedded in
> a gui).

Probably the best way is to write the model in Verilog-AMS.  
Work is in progress to add that, and convert to Verilog-AMS as 
the native language.

Get the development snapshot of gnucap.  It supports plug-ins.  
I do not recommend doing any models as "built-in" to gnucap.  
Instead, do them as plugins.  Before the next stable release, 
all existing models will move to plugins, so the core will have 
no models.

If you want to write a gnucap model, use the model compiler.  It 
takes care of the internals, so you can do it as a mix of 
circuit level and mathematical level.  You can make a ".model" 
file.  The model compiler generates C++, compile that into a 
shared-object file (.so).  Then you can attach it at run time 
using the "attach" command, or the "-a" command line option.  
You get all of the benefits of a built-in model, with the 
advantage that you can maintain it separately, and keep 
complete control.

Since you mentioned octave ...  You could make a plug-in that 
makes an interface to octave.


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user