Initial Conditions for first derivative defined as a transfer function
20 views (last 30 days)
Show older comments
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!
2 Comments
Paul
on 8 Jul 2020
What exactly are you trying to do? Generate the output of your second order system in response to a step input with a non-zero initial condition on the derivative of the output?
Is Y(t) as defined above the output of the system in response to a particular type of input? If so, what is that input? It would be helpul if you showed the code for the "two methods" so we can see exactly what you're trying to do.
Accepted Answer
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)]
More Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!