¿ªÔÆÌåÓý

Date

Re: Wanted Max7405 model or how to model a switched capacitor filter

 

There is a simulation of a switch capacitor filter in this groups files.
Files > Files sorted by message number > msg 2398
Take a look at this simulation. It may answer some of your questions.

Howard

On 9/23/2011 4:11 PM, poppletech wrote:
I would like to model a switched capacitor low pass filter, specifically the MAX7405. Is there a model availble? Or what would be the best way to model the frequency controlled cutoff frequency and the switching noise?

So far I have been using an 'e' behavorial voltage source with a laplace transform of the filter transfer function. I have not figured out how to control the cutoff frequency by the frequency of an input signal. Can anyone help with that?

Thank you
Ken



------------------------------------

Yahoo! Groups Links




Re: Inductor initial conditions

Ganesan
 

As usual this group is very helpful in helping me find workarounds; but
the basic questions remain unanswered...
cheers
AG

On 9/23/2011 6:07 PM, Rick wrote:



--- In LTspice@... <mailto:LTspice%40yahoogroups.com>,
Ganesan <dg1@...> wrote:

I have just created such a file IC_test.asc.. For reasons I dont
understand I am unable to Upload it to the temp directory.
So I am sending it to you by direct email tosawreyrw@...
cheers
AG
AG,

Hum, you are correct. I don't know why this is, but it is confusing.
Maybe someone else can shed some light on this. Anyway, if I want
nonzero ic's I always specify them according to the method I noted
earlier.

Rick


Re: Inductor initial conditions

 

--- In LTspice@..., Ganesan <dg1@...> wrote:

I have just created such a file IC_test.asc.. For reasons I dont
understand I am unable to Upload it to the temp directory.
So I am sending it to you by direct email tosawreyrw@...
cheers
AG
AG,

Hum, you are correct. I don't know why this is, but it is confusing. Maybe someone else can shed some light on this. Anyway, if I want nonzero ic's I always specify them according to the method I noted earlier.

Rick


Re: Inductor initial conditions

Ganesan
 

I sent it to your email address.. But the netlist is in previous
postings and is below.
Just cut and paste it into a .cir file and run LTspice on it...
cheers
AG

* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
> > R1 out 0 1
> > L2 out 0 1
> > R2 out1 0 1
> > C1 out1 0 1
> > .ic I(L2) =1.0 v(out1) =-1.0
> > .tran 5 uic
> > .backanno
> > .end

On 9/23/2011 5:52 PM, Rick wrote:



--- In LTspice@... <mailto:LTspice%40yahoogroups.com>,
Ganesan <dg1@...> wrote:

I have just created such a file IC_test.asc.. For reasons I dont
understand I am unable to Upload it to the temp directory.
So I am sending it to you by direct email tosawreyrw@...
cheers
AG
AG,

You should be able to upload the file, but my email address is
rsawrey@... <mailto:rsawrey%40yahoo.com>

Rick



Re: Inductor initial conditions

 

--- In LTspice@..., Ganesan <dg1@...> wrote:

I have just created such a file IC_test.asc.. For reasons I dont
understand I am unable to Upload it to the temp directory.
So I am sending it to you by direct email tosawreyrw@...
cheers
AG
AG,

You should be able to upload the file, but my email address is
rsawrey@...

Rick


Re: Inductor initial conditions

Ganesan
 

It is small enough to paste here.
cheers
AG

IC_test.asc


Version 4
SHEET 1 880 680
WIRE 176 64 144 64
WIRE 208 64 176 64
WIRE 368 64 352 64
WIRE 400 64 368 64
WIRE 144 96 144 64
WIRE 208 96 208 64
WIRE 352 96 352 64
WIRE 400 96 400 64
WIRE 144 208 144 160
WIRE 176 208 144 208
WIRE 208 208 208 176
WIRE 208 208 176 208
WIRE 352 208 352 176
WIRE 384 208 352 208
WIRE 400 208 400 176
WIRE 400 208 384 208
WIRE 176 240 176 208
WIRE 384 240 384 208
FLAG 176 240 0
FLAG 384 240 0
FLAG 176 64 out1
FLAG 368 64 out
SYMBOL res 192 80 R0
SYMATTR InstName R2
SYMATTR Value 1
SYMBOL res 384 80 R0
SYMATTR InstName R1
SYMATTR Value 1
SYMBOL cap 128 96 R0
SYMATTR InstName C1
SYMATTR Value 1
SYMBOL ind 368 80 M0
SYMATTR InstName L2
SYMATTR Value 1
TEXT 160 8 Left 2 !.ic I(L2) =1.0 v(out1) =-1.0
TEXT -32 40 Left 2 !.tran 5 uic

On 9/23/2011 5:47 PM, Ganesan wrote:

I have just created such a file IC_test.asc.. For reasons I dont
understand I am unable to Upload it to the temp directory.
So I am sending it to you by direct email tosawreyrw@...
<mailto:tosawreyrw%40yahoo.com>
cheers
AG

On 9/23/2011 5:26 PM, Rick wrote:



--- In LTspice@... <mailto:LTspice%40yahoogroups.com>
<mailto:LTspice%40yahoogroups.com>,
Ganesan <dg1@...> wrote:

The point is when the .tran statement includes UIC, the node voltages
are read from the .IC card but not the inductor currents from the .IC
card. What gives? ( we are not talking about IC= Val on the individual
elements)
Cheers
AG
AG,

No, if .tran UIC is specified the .IC directive is ignored, and any
ic's on cap or inductor cards are used. If you don't agree post, a
.asc file showing your circuit that doesn't work this way.

Rick


Re: Inductor initial conditions

Ganesan
 

I have just created such a file IC_test.asc.. For reasons I dont
understand I am unable to Upload it to the temp directory.
So I am sending it to you by direct email tosawreyrw@...
cheers
AG

On 9/23/2011 5:26 PM, Rick wrote:



--- In LTspice@... <mailto:LTspice%40yahoogroups.com>,
Ganesan <dg1@...> wrote:

The point is when the .tran statement includes UIC, the node voltages
are read from the .IC card but not the inductor currents from the .IC
card. What gives? ( we are not talking about IC= Val on the individual
elements)
Cheers
AG
AG,

No, if .tran UIC is specified the .IC directive is ignored, and any
ic's on cap or inductor cards are used. If you don't agree post, a
.asc file showing your circuit that doesn't work this way.

Rick


Re: Inductor initial conditions

 

--- In LTspice@..., Ganesan <dg1@...> wrote:

The point is when the .tran statement includes UIC, the node voltages
are read from the .IC card but not the inductor currents from the .IC
card. What gives? ( we are not talking about IC= Val on the individual
elements)
Cheers
AG
AG,

No, if .tran UIC is specified the .IC directive is ignored, and any ic's on cap or inductor cards are used. If you don't agree post, a .asc file showing your circuit that doesn't work this way.

Rick


Re: Inductor initial conditions

Ganesan
 

The point is when the .tran statement includes UIC, the node voltages
are read from the .IC card but not the inductor currents from the .IC
card. What gives? ( we are not talking about IC= Val on the individual
elements)
Cheers
AG

On 9/23/2011 4:51 PM, Rick wrote:



--- In LTspice@... <mailto:LTspice%40yahoogroups.com>,
Ganesan <dg1@...> wrote:

Philip,
Here is a simple netlist.
When I include the uic ( userspecified initial condition) option on the
tran card, it still accepts the initial voltage for the nodes but not
the inductor currents..
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
R2 out1 0 1
C1 out1 0 1
.ic I(L2) =1.0 v(out1) =-1.0
.tran 5 uic
.backanno
.end
Now I am totally confused..
Cheers
AG
AG,

There are two different ways to specify initial conditions.

1. If the .tran statement includes UIC, the ic=values from the cap and
inductor "cards" are used. You don't need to edit the netlist to add
them, just add them as Helmut has told you.
2. If the .tran statement does NOT include UIC, then the value(s) in
the .IC directive are applied.

Rick


Re: Wanted Max7405 model or how to model a switched capacitor filter

Ganesan
 

In message #48936 I showed how to model a first order switched Capacitor
filter and the clock frequency can be varied.. I had problems getting it
to work in the time domain . (The Laplace has some quirks).. Helmut in
a subsequent message solved it for that particular circuit.. I believe,
in the general case the frequency domain answer is exact; but the time
domain answer may need to be scrutinized..
Cheers
AG

On 9/23/2011 4:11 PM, poppletech wrote:

I would like to model a switched capacitor low pass filter,
specifically the MAX7405. Is there a model availble? Or what would be
the best way to model the frequency controlled cutoff frequency and
the switching noise?

So far I have been using an 'e' behavorial voltage source with a
laplace transform of the filter transfer function. I have not figured
out how to control the cutoff frequency by the frequency of an input
signal. Can anyone help with that?

Thank you
Ken


Re: Inductor initial conditions

 

--- In LTspice@..., Ganesan <dg1@...> wrote:

Philip,
Here is a simple netlist.
When I include the uic ( userspecified initial condition) option on the
tran card, it still accepts the initial voltage for the nodes but not
the inductor currents..
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
R2 out1 0 1
C1 out1 0 1
.ic I(L2) =1.0 v(out1) =-1.0
.tran 5 uic
.backanno
.end
Now I am totally confused..
Cheers
AG
AG,

There are two different ways to specify initial conditions.

1. If the .tran statement includes UIC, the ic=values from the cap and inductor "cards" are used. You don't need to edit the netlist to add them, just add them as Helmut has told you.
2. If the .tran statement does NOT include UIC, then the value(s) in the .IC directive are applied.

Rick


Re: How to Specify Polarity on Capacitor Initial Conditions

 

When you use an ic=<value> parameter on a capacitor, you have to think
of the SPICE netlist description. The specified voltage is between
the first node and the second one, for example:

Cnnn n1 n2 470p ic=-2.5V

would set node n1 2.5V lower than node n2.

You may need to experiment a bit to see how the schematic symbol (with
its various orientations) translates to the netlist. Use View > SPICE
Netlist to see the netlist.

Andy


Wanted Max7405 model or how to model a switched capacitor filter

poppletech
 

I would like to model a switched capacitor low pass filter, specifically the MAX7405. Is there a model availble? Or what would be the best way to model the frequency controlled cutoff frequency and the switching noise?

So far I have been using an 'e' behavorial voltage source with a laplace transform of the filter transfer function. I have not figured out how to control the cutoff frequency by the frequency of an input signal. Can anyone help with that?

Thank you
Ken


Re: Inductor initial conditions

Ganesan
 

Thanks
Ag

On 9/23/2011 3:31 PM, Helmut wrote:

Hello AG,

Initial conditions can be set in any capacitor or inductor.

Instead of 5n use the following to charge the capacitor with 5V.

5n IC=5

Instead of 10u use the following to set the inductor current to 1A.

10u IC=1

Best regards,
Helmut

--- In LTspice@... <mailto:LTspice%40yahoogroups.com>,
Ganesan <dg1@...> wrote:


Helmut,
Are there symbols for inductors and capacitors, where I can put in
Initial conditions?
Cheers
AG

=============================
On 9/23/2011 1:58 PM, Ganesan wrote:

if I hand edit the net list and put the IC= value manually on the
inductor , it works..
It looks like .IC doesn't work for Inductors...
cheers
AG

On 9/23/2011 1:33 PM, Ganesan wrote:

Further.Help says:
*
L. Inductor
Symbol Names: IND, IND2
Syntax: Lxxx n+ n- <inductance> [ic=<value>]

+ [Rser=<value>] [Rpar=<value>]

+ [Cpar=<value>] [m=<value>] [temp=<value>]

When I invoke the symbol for L there is no place to put IC=Value.
Same is true for the Capacitor.....
What am I missing?
Cheers
AG
===========================

On 9/23/2011 12:47 PM, Apparajan wrote:

Below is a simple netlist.
* C:&#92;Documents and Settings&#92;ganesan&#92;My
Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
.ic I(L2) =1.0
.tran 5 uic
.backanno
.end
I expect the output to be -1v with a time constant of 1 sec.
LTspice says otherwise..
What am I doing stupid?
cheers
AG









Re: Inductor initial conditions

 

Hello AG,

Initial conditions can be set in any capacitor or inductor.

Instead of 5n use the following to charge the capacitor with 5V.

5n IC=5

Instead of 10u use the following to set the inductor current to 1A.

10u IC=1

Best regards,
Helmut

--- In LTspice@..., Ganesan <dg1@...> wrote:


Helmut,
Are there symbols for inductors and capacitors, where I can put in
Initial conditions?
Cheers
AG

=============================
On 9/23/2011 1:58 PM, Ganesan wrote:

if I hand edit the net list and put the IC= value manually on the
inductor , it works..
It looks like .IC doesn't work for Inductors...
cheers
AG

On 9/23/2011 1:33 PM, Ganesan wrote:

Further.Help says:
*
L. Inductor
Symbol Names: IND, IND2
Syntax: Lxxx n+ n- <inductance> [ic=<value>]

+ [Rser=<value>] [Rpar=<value>]

+ [Cpar=<value>] [m=<value>] [temp=<value>]

When I invoke the symbol for L there is no place to put IC=Value.
Same is true for the Capacitor.....
What am I missing?
Cheers
AG
===========================

On 9/23/2011 12:47 PM, Apparajan wrote:

Below is a simple netlist.
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
.ic I(L2) =1.0
.tran 5 uic
.backanno
.end
I expect the output to be -1v with a time constant of 1 sec.
LTspice says otherwise..
What am I doing stupid?
cheers
AG


[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]


Re: Inductor initial conditions

Ganesan
 

Helmut,
Are there symbols for inductors and capacitors, where I can put in
Initial conditions?
Cheers
AG

=============================

On 9/23/2011 1:58 PM, Ganesan wrote:

if I hand edit the net list and put the IC= value manually on the
inductor , it works..
It looks like .IC doesn't work for Inductors...
cheers
AG

On 9/23/2011 1:33 PM, Ganesan wrote:

Further.Help says:
*
L. Inductor
Symbol Names: IND, IND2
Syntax: Lxxx n+ n- <inductance> [ic=<value>]

+ [Rser=<value>] [Rpar=<value>]

+ [Cpar=<value>] [m=<value>] [temp=<value>]

When I invoke the symbol for L there is no place to put IC=Value.
Same is true for the Capacitor.....
What am I missing?
Cheers
AG
===========================

On 9/23/2011 12:47 PM, Apparajan wrote:

Below is a simple netlist.
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
.ic I(L2) =1.0
.tran 5 uic
.backanno
.end
I expect the output to be -1v with a time constant of 1 sec.
LTspice says otherwise..
What am I doing stupid?
cheers
AG







Re: Regarding Monte carlo setup

 

--- In LTspice@..., "pindsen" <windven@...> wrote:



--- In LTspice@..., "Helmut" <helmutsennewald@> wrote:



--- In LTspice@..., "pindsen" <windven@> wrote:

Hi,

When running a monte carlo on a capacitor (in a filter design)
I use the statement (copied from another LTSpice example):

{mc(1n, tol)} for the capacitor, and the following SPICE
directive commands in the design:

.param tol=.2
.step param X 0 5 1

The first line sets the tolerance of 20% (plus/minus I hope?).
The second line I'm more unsure about, what does it say?
When I use the numbers 0, 5 and 1, what does that state?
The variable X, where is that used?

Best regards
Carsten Wind

Hello Carsten,

It's necessary to use .step to get a simulation with multiple
runs and many runs will be necessary to get the most extreme
variation with high probability. The mc()-function creates a
random variation of the value for each of the simulations.

Examples: with 50 steps

.step param abc 1 50 1

.step param abc 0 49 1


Maybe you should have a look to the examples.

Files > Tut > Monte-Carlo-Simulation V2.20



Best regards,
Helmut
Hi Helmut and others,
Thanks for your answer. I have looked at some of the examples, and I think I now more clearly understand. One thing I though can't figure out is, in the ".step param abc..." there are hereafter three numbers, in this post they are 0 5 1. The zero and five I understand, but the number "1" at the end, what does that stand for?
And if I change it to other than "1" what will that cause?

Regards
Carsten Wind

Hello Carsten,

.step param 0 5 1

The 1 is the increment from step to step.


Here is an example with increment 0.1

.step param xy 0 10 0.1

xy=0
xy=0.1
xy=0.2
xy=...
xy=9.9
xy=10

Best regards,
Helmut


Re: Inductor initial conditions

Ganesan
 

Philip,
Here is a simple netlist.
When I include the uic ( userspecified initial condition) option on the
tran card, it still accepts the initial voltage for the nodes but not
the inductor currents..
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
R2 out1 0 1
C1 out1 0 1
.ic I(L2) =1.0 v(out1) =-1.0
.tran 5 uic
.backanno
.end
Now I am totally confused..
Cheers
AG

On 9/23/2011 2:29 PM, kungfu_phil wrote:

Apparently, LTspice uses the initial condition methods differently;
whethter specificed by an .IC command or as an ic value of a component.

If you remove the uic from the .TRAN command, the .ic command as you
had it works fine, without adding the ic statement to the inductor.
The HELP file for the .IC command says, "A DC solution is performed
using the initial conditions as constraints." When you specify uic in
the .TRAN command, you are telling it to skip the initial operating
point solution. Thus, it looks like LTspice does not use the initial
condition set by the .IC command when you tell it to skip the initial
operating point solution.

On the other hand, the HELP for the inductor or a capacitor says that
the ic initial current option is , "used only if uic flagged on the
.tran card".

The same thing seems to happen with voltages. The ic value on a
capacitor is used only when you specify uic in the TRAN command.
Conversely, the .IC command line appears to be ignored when you
specify uic in the TRAN line.

- Philip

--- In LTspice@... <mailto:LTspice%40yahoogroups.com>,
"Apparajan" <dg1@...> wrote:

Below is a simple netlist.
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
.ic I(L2) =1.0
.tran 5 uic
.backanno
.end
I expect the output to be -1v with a time constant of 1 sec.
LTspice says otherwise..
What am I doing stupid?
cheers
AG


Re: Inductor initial conditions

 

Apparently, LTspice uses the initial condition methods differently; whethter specificed by an .IC command or as an ic value of a component.

If you remove the uic from the .TRAN command, the .ic command as you had it works fine, without adding the ic statement to the inductor. The HELP file for the .IC command says, "A DC solution is performed using the initial conditions as constraints." When you specify uic in the .TRAN command, you are telling it to skip the initial operating point solution. Thus, it looks like LTspice does not use the initial condition set by the .IC command when you tell it to skip the initial operating point solution.

On the other hand, the HELP for the inductor or a capacitor says that the ic initial current option is , "used only if uic flagged on the .tran card".

The same thing seems to happen with voltages. The ic value on a capacitor is used only when you specify uic in the TRAN command. Conversely, the .IC command line appears to be ignored when you specify uic in the TRAN line.

- Philip

--- In LTspice@..., "Apparajan" <dg1@...> wrote:

Below is a simple netlist.
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
.ic I(L2) =1.0
.tran 5 uic
.backanno
.end
I expect the output to be -1v with a time constant of 1 sec.
LTspice says otherwise..
What am I doing stupid?
cheers
AG


Re: Inductor initial conditions

Ganesan
 

if I hand edit the net list and put the IC= value manually on the
inductor , it works..
It looks like .IC doesn't work for Inductors...
cheers
AG

On 9/23/2011 1:33 PM, Ganesan wrote:

Further.Help says:
*
L. Inductor
Symbol Names: IND, IND2
Syntax: Lxxx n+ n- <inductance> [ic=<value>]

+ [Rser=<value>] [Rpar=<value>]

+ [Cpar=<value>] [m=<value>] [temp=<value>]

When I invoke the symbol for L there is no place to put IC=Value.
Same is true for the Capacitor.....
What am I missing?
Cheers
AG
===========================

On 9/23/2011 12:47 PM, Apparajan wrote:

Below is a simple netlist.
* C:&#92;Documents and Settings&#92;ganesan&#92;My Documents&#92;Downloads&#92;Draft1.asc
R1 out 0 1
L2 out 0 1
.ic I(L2) =1.0
.tran 5 uic
.backanno
.end
I expect the output to be -1v with a time constant of 1 sec.
LTspice says otherwise..
What am I doing stupid?
cheers
AG