Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12139 > unrolled thread
| Started by | "Eduardo M. A. M.Mendes" <emammendes@gmail.com> |
|---|---|
| First post | 2012-10-22 06:07 +0000 |
| Last post | 2012-10-26 03:35 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
OutputResponse gives funny results "Eduardo M. A. M.Mendes" <emammendes@gmail.com> - 2012-10-22 06:07 +0000
Re: OutputResponse gives funny results richard i pelletier <bitbucket@comcast.net> - 2012-10-26 03:35 +0000
| From | "Eduardo M. A. M.Mendes" <emammendes@gmail.com> |
|---|---|
| Date | 2012-10-22 06:07 +0000 |
| Subject | OutputResponse gives funny results |
| Message-ID | <k62nr9$cg9$1@smc.vnet.net> |
Hello
I am trying to implement some examples on Dorf's book. Here is a code for
one of them.
Tcl[p_,Kp_,Kd_,Ki_]=TransferFunctionModel[(Ki+Kp s+Kd s^2)/(Ki+Kp s+Kd
s^2+p^2 s^2+2 p s^3+s^4),s]
fcl[t_,p_,Kp_,Kd_,Ki_]=Abs[OutputResponse[Tcl[p,Kp,Kd,Ki],UnitStep[t],t]];
Manipulate[{N[TransferFunctionPoles[Tcl[p,6,4,1]],2],Plot[fcl[t,p,6,4,1],{t,
0,Ts},PlotRange->All,AxesLabel->{t,x[t]},PlotStyle->Thickness[0.01],GridLine
s->Automatic]},Style["Example 4.4 - Dorf - 12^th Edition - R(s) = 10/s, D(s)
=
0",Bold],{{p,2},0,100,Appearance->"Labeled"},{{Ts,20},0.1,100,Appearance->"L
abeled"}]
Even though the poles are on the left side (stable system), OutResponse
gives huge numbers (instability) when the slider for the variable Ts is
moved to higher values. More than, it is seems that this simple code makes
Mathematica ever so slow.
Have I missed something?
Many thanks
Ed
[toc] | [next] | [standalone]
| From | richard i pelletier <bitbucket@comcast.net> |
|---|---|
| Date | 2012-10-26 03:35 +0000 |
| Message-ID | <k6d0e1$26o$1@smc.vnet.net> |
| In reply to | #12139 |
In article <k62nr9$cg9$1@smc.vnet.net>,
"Eduardo M. A. M.Mendes" <emammendes@gmail.com> wrote:
> Tcl[p_,Kp_,Kd_,Ki_]=TransferFunctionModel[(Ki+Kp s+Kd s^2)/(Ki+Kp s+Kd
> s^2+p^2 s^2+2 p s^3+s^4),s]
>
> fcl[t_,p_,Kp_,Kd_,Ki_]=Abs[OutputResponse[Tcl[p,Kp,Kd,Ki],UnitStep[t],t]];
>
> Manipulate[{N[TransferFunctionPoles[Tcl[p,6,4,1]],2],Plot[fcl[t,p,6,4,1],{t,
> 0,Ts},PlotRange->All,AxesLabel->{t,x[t]},PlotStyle->Thickness[0.01],GridLine
> s->Automatic]},Style["Example 4.4 - Dorf - 12^th Edition - R(s) = 10/s, D(s)
> =
> 0",Bold],{{p,2},0,100,Appearance->"Labeled"},{{Ts,20},0.1,100,Appearance->"L
> abeled"}]
>
> Even though the poles are on the left side (stable system), OutResponse
> gives huge numbers (instability) when the slider for the variable Ts is
> moved to higher values. More than, it is seems that this simple code makes
> Mathematica ever so slow.
>
as I just posted in response to your comment on my blog, the problem is
with Output Response i don't know why... Simplify didn't seem to help
but if i compute and plot the inverse Laplace transform (for a unit
step input), everything looks fine.
rip
--
email address is r i p 1 AT c o m c a s t DOT n e t
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web