The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Apr 24th, 2024, 4:16am
Pages: 1
Send Topic Print
Modeling Vout = Vin *{ 1-exp[-(t/alpha)^beta] } (Read 864 times)
jszair
New Member
*
Offline



Posts: 7

Modeling Vout = Vin *{ 1-exp[-(t/alpha)^beta] }
Jul 10th, 2016, 4:02pm
 
Hello,

I want to model a block that produces the following behavior

Vout = Vin *{ 1-exp[-(t/alpha)^beta] }

Since it has exp[-(t/alpha)^beta], I can't simply use an RC like behavior model.

Modeling it with an varying RC as a function of Vin of previous timestep is also tricky, any error will be blown up because of its exponential behavior.

Any suggestions?
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1998
Massachusetts, USA
Re: Modeling Vout = Vin *{ 1-exp[-(t/alpha)^beta] }
Reply #1 - Jul 25th, 2016, 5:45am
 
You can write that equation exactly in Verilog-A, if your simulator supports it.  There are also some simulators that allow you to specify expressions for dependent sources, though I'm not sure if you can use time in those expressions.

Code:
`include "disciplines.vams"

module myfilter(in, out);
  inout in, out;
  electrical in, out;
  parameter real alpha = 1;
  parameter real beta = 1;

  analog begin
    V(out) <+ V(in) * (1 - exp(-pow($abstime/alpha, beta)))
  end
endmodule
 

Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
AMS_ei
Community Member
***
Offline



Posts: 67

Re: Modeling Vout = Vin *{ 1-exp[-(t/alpha)^beta] }
Reply #2 - Jul 30th, 2016, 5:28am
 
There will be a ";" at the end otherwise, it will shout with compilation error.

Here is the correct ones:

analog begin
   V(out) <+ V(in) * (1 - exp(-pow($abstime/alpha, beta)));
 end
Back to top
 
 
View Profile   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.