7 views (last 30 days)

I have defined defined a second order underdamped system in the time domain with a non zero initial condition for Y'(t) but can not implement this in the laplace domain.

My transfer function

In the time domain I have defined my function:

with initial conditions:

Y(0) = 0

Y'(0) = D

when I set D to zero I get the same result from the two methods so I am confident that I have correctly defined the transfer function but I do not understand how I can implement this into my simulink model such that D is non zero.

I tried using the tf2ss but even without trying to apply any initial conditions the output curve is different? I have also tried using the transfer function with initial states but with no luck.

sys = tf(numerator,denominator);

stepplot(sys)

[A,B,C,D] = tf2ss(numerator,denominator);

Any help is appreciated!

Paul
on 14 Jul 2020

Rob,

a. from your clarificatiion, it sounds like you really have a linear, time varying system. So you don't have a transfer function representation, or any linear time invariant (LTI) representation.

b. I'm still confused by your Y(t). It kind of looks like the output of an LTI system, unless the alpha and wd are really functions of t, but just not shown as such. Also, Y(t) seems to be missing the effect of the input vSource. As you say, X1 and X2 are determined by initial conditions on y(t) and y'(t), but the system input should also have an effect on the output as well.

c. From what I gather, you have a second order, linear, time varying differential equation of the form:

z''(t)*Capacitance(t)*Inductance(t) + z'(t)*Inductance(t) = vSource(t) (where vSource(t) is a constant).

or

z''(t) = vSource/(C(t)*I(t)) - z'(t)/C(t)

You can implement this equation directly in Simulink using two integrators in series, one for z and the the other for z'. Set the initial condition on each as you desire. If you must use a time varying state space formulation, you can proceed as follows:

x = [z; z'].

A(t) =[0 1;0 -1/C(t)]

B(t) = [0; 1/(C(t)*I(t))]

C(t) = [1 0];

D(t) = 0;

Then set the initial conditions in your integrator block for x as [z(0) z'(0)]

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 2 Comments

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/557281-initial-conditions-for-first-derivative-defined-as-a-transfer-function#comment_929960

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/557281-initial-conditions-for-first-derivative-defined-as-a-transfer-function#comment_929960

## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/557281-initial-conditions-for-first-derivative-defined-as-a-transfer-function#comment_934550

⋮## Direct link to this comment

https://in.mathworks.com/matlabcentral/answers/557281-initial-conditions-for-first-derivative-defined-as-a-transfer-function#comment_934550

Sign in to comment.