Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

OutputResponse gives funny results

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128463] OutputResponse gives funny results
  • From: "Eduardo M. A. M.Mendes" <emammendes at gmail.com>
  • Date: Mon, 22 Oct 2012 02:03:12 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@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


  • Prev by Date: question about writing an expression in another way
  • Next by Date: Making a stack.
  • Previous by thread: question about writing an expression in another way
  • Next by thread: Re: OutputResponse gives funny results