I'm trying to display the output response of a transfer function in Mathematica with and without a compensator. The problem is very strange: while the transfer function compensate is showing well, the other is not.
The plot seems incomplete and no matter what PlotRange
I set, the graph always stays incomplete at the same point.
Here is a screenshot:
Anybody have an idea of what is wrong? I'm pretty sure the math itself is okay, because I get the second transfer function from the first. But when I want to compare the two responses graph, the first always stays incomplete.
Answer
o1
isn't always real - it has a small imaginary component. For example o1 /. t -> 4
gives 0.995493 - 5.18448*10^-7 I
. What you could do is Chop
the output response:
o1 = Chop @ OutputResponse[tfm, UnitStep[t], t];
This gives you a nice smooth graph.
But on the other hand if you look at the unchopped version o1 /. t-> 8
you get 831840. + 332820. I
. Not a small imaginary component at all - so maybe chopping it wasn't a good idea.
You could also try an exact equation by replacing 43.35 with 4335/100. This gives real results, but goes haywire when t > 5.
Unfortunately I know nothing about transfer functions to say which might be right.
Comments
Post a Comment