The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> ODE solving in verilog-A?
https://designers-guide.org/forum/YaBB.pl?num=1282862657

Message started by manus on Aug 26th, 2010, 3:44pm

Title: ODE solving in verilog-A?
Post by manus on Aug 26th, 2010, 3:44pm

If a differential equation is being solved in verilog-a, how are the initial conditions set? There doesn't seem to be any requirement that initial conditions be provided. What does it do without initial conditions? What's the way to force initial conditions?

I'm using verilog-a to model an electro-mechanical system with a 2nd order ODE governing the kinematics.

Pos(x):ddt(Vel(vl))==-gamma*Vel(vl)/Mro-Kro/Mro*Pos(x)+F(Fw)/Mro;

F(Fw) has been assigned as a function of input voltages in a preceding line.

Thanks!

Title: Re: ODE solving in verilog-A?
Post by carlgrace on Aug 26th, 2010, 4:27pm

Have you tried forcing the various parameters during the @(initial_step) code block?

Carl

Title: Re: ODE solving in verilog-A?
Post by manus on Aug 26th, 2010, 4:42pm

Is the @(initial_step) code block used for all analyses, or just transient?

I can set an initial condition for Vel(vl) that way, but I can't set an initial condition for Pos(x). If I try to set an initial condition for Pos(x) I get the error: "Encountered an illegal mixing of direct and indirect assignments to branch quantity 'x'. Remove one of the assignments and try again."

For a second order ODE I think I need to set two initial conditions to solve for all parameters. Is there another way to set an initial condition for Pos(x) that verilog-a will allow?

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.