ddt

Navigation:  Language Reference > Functions > Arithmetic >

ddt

Previous pageReturn to chapter overviewNext page

Syntax

y = ddt(x,init);

Description

Returns the derivative value of x with respect to the time. The initial value of y is equal to the value of init.

Method

20-sim will always try to rewrite equations in such a way that only integrals are used (integral form). This is done automatically and means all integration methods can be applied. Sometimes an integral form cannot be found. Then only the Backward-Differentiation Method can be used for simulation.

Examples

equation

integral form

integration

 

ddt(x,0) = u - k*x;

x = int(u - k*x);

All methods

x = ddt(sin(time),0);

not possible!

Only BDF

 

Limitations

When no integral form can be found, the use of the derivative function can introduce noisy signals or may even cause signals to exceed the data range.