Expression to set value of VCVS?

View: New views
4 Messages — Rating Filter:   Alert me  

Expression to set value of VCVS?

by Stefan Dröge-2 :: Rate this Message:

| View Threaded | Show Only this Message

Hi, I just tried to set the value of an VCVS by using an expression,
but can't get it to work.
Here I what I want to do:

If Input voltage Vin < -5mV then Vout := 0V
If Vin > 5mV then Vout := 5V
else (Vin between -5mV and 5mV) linear interpolated between 0V and 5V.

Here the code I tried:
---
ECMP 11 0 10 9 FIT (-5MV,0V 5MV,5V) Order=1
---

and here another line that failed:
---
ECMP 11 0 10 9 VCVS E={FIT (-5MV,0V 5MV,5V) Order=1}
---

This does not work as expected. I tried also several other
descriptions. All I could get to work is that it sets the gain of the
VCVS. But I want to set the output voltage directly.
The user manual says that it can be done, but I can't seem to find out how.
I also tried these examples with expressions
http://gnucap.org/dokuwiki/doku.php?id=gnucap:manual:howto:expressions
But the "eval" command seems to be unknown to my gnucap installation.
Im using gnucap 0.35 (from Ubuntu 10.04 repo).

Regards, Stefan

_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap

Re: Expression to set value of VCVS?

by Rubén Gómez Antolí :: Rate this Message:

| View Threaded | Show Only this Message

Hello:

El 30/07/10 12:48, Stefan Dröge escribió:
> Hi, I just tried to set the value of an VCVS by using an expression,
> but can't get it to work.
> [...]

> The user manual says that it can be done, but I can't seem to find out how.
> I also tried these examples with expressions
> http://gnucap.org/dokuwiki/doku.php?id=gnucap:manual:howto:expressions
> But the "eval" command seems to be unknown to my gnucap installation.
> Im using gnucap 0.35 (from Ubuntu 10.04 repo).

I think that these wiki is for snapshot version, 0.35 version don't
support parameter expressions.

Try with snapshot version, is so stable.

> Regards, Stefan

Best regards.

Salud y Revolución.

Lobo.
--
Libertad es poder elegir en cualquier momento. Ahora yo elijo GNU/Linux,
para no atar mis manos con las cadenas del soft propietario.
---------
Desde El Ejido, en Almería, usuario registrado Linux #294013
http://www.counter.li.org

_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap

Parent Message unknown Re: Expression to set value of VCVS?

by al davis-13 :: Rate this Message:

| View Threaded | Show Only this Message

On Friday 30 July 2010, Stefan Dröge wrote:

> Hi, I just tried to set the value of an VCVS by using an
> expression, but can't get it to work.
> Here I what I want to do:
>
> If Input voltage Vin < -5mV then Vout := 0V
> If Vin > 5mV then Vout := 5V
> else (Vin between -5mV and 5mV) linear interpolated between
> 0V and 5V.
>
> Here the code I tried:
> ---
> ECMP 11 0 10 9 FIT (-5MV,0V 5MV,5V) Order=1
> ---

You need to specify what happens out of range.  If you don't,
(with order=1) it extends the slope of the end intervals.  You
can either add flat intervals above and below, or use the
parameters "above" and "below"


> and here another line that failed:
> ---
> ECMP 11 0 10 9 VCVS E={FIT (-5MV,0V 5MV,5V) Order=1}

This syntax doesn't work.  There in nothing that says it works.

_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap

Re: Expression to set value of VCVS?

by al davis-13 :: Rate this Message:

| View Threaded | Show Only this Message

On Friday 30 July 2010, al davis wrote:

> On Friday 30 July 2010, Stefan Dröge wrote:
> > Hi, I just tried to set the value of an VCVS by using an
> > expression, but can't get it to work.
> >
> > Here I what I want to do:
> >
> >
> > If Input voltage Vin < -5mV then Vout := 0V
> > If Vin > 5mV then Vout := 5V
> > else (Vin between -5mV and 5mV) linear interpolated between
> > 0V and 5V.
> >
> >
> >
> > Here the code I tried:
> > ---
> > ECMP 11 0 10 9 FIT (-5MV,0V 5MV,5V) Order=1
> > ---
>
> You need to specify what happens out of range.  If you
> don't,  (with order=1) it extends the slope of the end
> intervals.  You can either add flat intervals above and
> below, or use the parameters "above" and "below"

Example:

ECMP 11 0 10 9 FIT (-10MV,0V -5MV,0V 5MV,5V 10MV,5V) Order=1

or:
ECMP 11 0 10 9 FIT (-5MV,0V 5MV,5V) Order=1 above=0 below=0

_______________________________________________
Help-gnucap mailing list
Help-gnucap@...
http://lists.gnu.org/mailman/listinfo/help-gnucap