Editing Ocs package
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
__TOC__ | __TOC__ | ||
== History and Motivation == | == History and Motivation == | ||
== Problem Formulation == | == Problem Formulation == | ||
Line 27: | Line 13: | ||
n = 1, \, \ldots \, ,N | n = 1, \, \ldots \, ,N | ||
</math> | </math> | ||
where <math>F_{mn}</math> denotes the current from the node n due to element m. | where <math>F_{mn}</math> denotes the current from the node n due to element m. | ||
The equations above are the Kirchhoff current law (KCL) for each of the electrical nodes of the network. | The equations above are the Kirchhoff current law (KCL) for each of the electrical nodes of the network. | ||
The currents can be expressed in terms of the node voltages <math>e</math> and the internal variables <math>r_m \; (m = 1\ | The currents can be expressed in terms of the node voltages <math>e</math> and the internal variables <math>r_m \; (m = 1\ldotsM)</math> | ||
<math> | <math> | ||
F_{mn} = | F_{mn} = | ||
A_{mn} \dot{\mathbf{r}}_{m} + J_{mn} \left( \mathbf{e}, \mathbf{r}_{m} \right) | |||
\qquad | \qquad | ||
\begin{ | \begin{aligned} | ||
n = 1, \, \ldots \, ,N \\ | n &=& 1, \, \ldots \, ,N \\ | ||
m = 1, \, \ldots \, ,M | m &=& 1, \, \ldots \, ,M | ||
\end{ | \end{aligned} | ||
</math> | </math> | ||
Notice that the variables <math>{{r}}_{m}</math> only appear in the equations defining the fluxes relative to the m-th element, for this reason they are sometimes referred to as internal variables of the m-th element. | Notice that the variables <math>{\mathbf{r}}_{m}</math> only appear in the equations defining the fluxes relative to the m-th element, for this reason they are sometimes referred to as internal variables of the m-th element. | ||
The full MNA model is finally obtained by substituting the current definitions in the KCL and complementing it with a suitable number < | The full MNA model is finally obtained by substituting the current definitions in the KCL and complementing it with a suitable number <matj>I_{m}</matj> of constitutive relations for the internal variables of each element | ||
<math> | <math> | ||
\ | \begin{gather} | ||
\ A_{mn} \dot{{r}}_{m} + | \Sum_{{m}=1}^{\nel} \left[ | ||
J_{mn} \left( {e}, {r}_{m} \right) | \ A_{mn} \dot{\mathbf{r}}_{m} + | ||
J_{mn} \left( \mathbf{e}, \boldsymbol{\theta}, \mathbf{r}_{m} \right) | |||
\right] = 0 | \right] = 0 | ||
\qquad | \qquad {n} = 1, \, \ldots \, ,\nnodes \\ \label{eq:abstractmnab} | ||
B_{mi} \dot{\mathbf{r}}_{m} + | |||
{n} = 1, \, \ldots \, , | Q_{mi}\ \left( \mathbf{e}, \boldsymbol{\theta}, \mathbf{r}_{m} \right) = 0. | ||
\ | \qquad | ||
\begin{aligned} | |||
B_{mi} \dot{{r}}_{m} + | |||
Q_{mi}\ \left( {e}, {r}_{m} \right) = 0 \qquad | |||
\begin{ | |||
{i} = 1, \, \ldots \, ,{I}_m \\ | {i} = 1, \, \ldots \, ,{I}_m \\ | ||
{m} = 1, \, \ldots \, , | {m} = 1, \, \ldots \, ,\nel | ||
\end{ | \end{aligned} | ||
\end{gather} | |||
</math> | </math> | ||
Notice that the assumption that only time derivatives of internal variables appear above and that terms involving such derivatives are linear does not impose restrictions on the applicability of the model. | Notice that the assumption that only time derivatives of internal variables appear above and that terms involving such derivatives are linear does not impose restrictions on the applicability of the model. | ||
Line 73: | Line 54: | ||
A circuit is represented in OCS by a struct variable with the fields listed below | A circuit is represented in OCS by a struct variable with the fields listed below | ||
{{Code| | {{Code|CIR file format |<syntaxhighlight lang="text" style="font-size:13px"> | ||
cir_struct = | cir_struct = | ||
{ | { | ||
Line 186: | Line 167: | ||
{{Code|Model evaluator file for simple MOSFET models |<syntaxhighlight lang="octave" style="font-size:13px"> | {{Code|Model evaluator file for simple MOSFET models |<syntaxhighlight lang="octave" style="font-size:13px"> | ||
function [a, b, c] =... | function [a, b, c] =... | ||
func (string , | func (string , m(i ,:) , extvar , intvar , t) | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
i.e. it should get as inputs: | i.e. it should get as inputs: | ||
Line 574: | Line 555: | ||
}} | }} | ||
=== Creating a model for a memristor device === | === Creating a model for a memristor device === | ||
To demonstrate how to write a model evaluator file (SBN file), we | To demonstrate how to write a model evaluator file (SBN file), we | ||
will discuss the simplest memristor model shown in this paper by [[User:KaKiLa| KaKiLa]] et al. | will discuss the simplest memristor model shown in this paper by [[User:KaKiLa| KaKiLa]] et al. (KaKiLa, can you please add a reference to the paper?) | ||
The device model is presented in the original paper as | The device model is presented in the original paper as | ||
Line 911: | Line 792: | ||
The results are shown in the figure to the right. | The results are shown in the figure to the right. | ||