Approximate a Time-Delay Model
Approximate a Time-Delay Model
A TransferFunctionModel with a delay in the denominator has infinitely many poles. TransferFunctionPoles can be used to plot all the poles in a given region:
tfm = TransferFunctionModel[{{{-20.}}, 30. - 20./E^s + 0.1*s + s^2}, s, SamplingPeriod -> None];delaypoles = Flatten@TransferFunctionPoles[tfm, {{-10, 10}, {-50, 50}}];
ListPlot[Table[{Re[p], Im[p]}, {p, delaypoles}], PlotMarkers -> {Automatic, 8}]Use SystemsModelDelayApproximate to obtain delay-free approximations of time-delay systems. As the order is increased, the approximations converge to the original model:
Manipulate[With[{approxtfm = SystemsModelDelayApproximate[tfm, order]}, Row[{BodePlot[{tfm, approxtfm}, Ticks -> None, Frame -> False, ImageSize -> 250][[1, 1, 1]], ListPlot[{Table[{Re[p], Im[p]}, {p, delaypoles}], Table[{Re[p], Im[p]}, {p, Flatten[TransferFunctionPoles[approxtfm]]}]}, PlotMarkers -> {Automatic, 8}, Ticks -> None, ImageSize -> 250, PlotRange -> {{-10, 10}, {-50, 50}}]}]], {order, 0, 15, 1}, SaveDefinitions -> True]