Feedback Systems

(Author: Jorge Finke)

Clear All

Transfer Functions

s is assumed to be the Laplace variable, p is an arbitrary parameter.

tf[p_]:= TransferFunctionModel[1/(s^2 + p s + 1),s]
tf[p]

tf1:=(tf[0.1]  + tf[1])/(tf[2]tf[2])

eqns={(M+m)x''[t]-m l Sin[θ[t]] ((θ'[t])^2)+m l Cos[θ[t]] θ''[t]==F[t]+d[t] Cos[θ[t]], m x''[t] Cos[θ[t]]+m l θ''[t]==m g Sin[θ[t]]+d[t]};
invPendulum = StateSpaceModel[eqns,{θ[t],θ'[t],x[t],x'[t]},{F[t],d[t]},{θ[t],x[t]},t];

TransferFunctionModel[invPendulum]

Poles and Zeros

TransferFunctionPoles[tf[p]]

TransferFunctionPoles[tf[.1]]

Show[ListPlot[Flatten[%]/.Complex[x_,y_]:>{x,y},PlotMarkers->{"X", Small},PlotStyle->Red,AspectRatio->1,AxesOrigin->{0,0}],Graphics[{Blue,Circle[{0,0},1]}],PlotRange-> All, ImageSize->300]

Root Locus Plots

RootLocusPlot[TransferFunctionModel[((k  )/((s^2)+2 s)),s],{k,0,10}, PlotRange->Automatic, ImageSize->150]

RootLocusPlot[TransferFunctionModel[2k((s+6  )/((s^2)+2 s)),s],{k,0,10}, PlotRange->Automatic, ImageSize->450]

RootLocusPlot[TransferFunctionModel[((k s)/((s^3)+k (s^2)+s+1)),s],{k,0,5}, PlotRange->Automatic, ImageSize->500]

RootLocusPlot[TransferFunctionModel[k (((s^2)+2 s+4)/(s(s+4)(s+6)((s^2)+1.4s+1))),s],{k,0,150}, ImageSize->500]

Manipulate[RootLocusPlot[k (100 s (s+10))/((s+25) (s-10) (s^2-225)),{k,0,30},PlotRange->All,AspectRatio->1,ImageSize->300,PoleZeroMarkers->{Automatic,"ParameterValues"->kVal}],{kVal,0,30}]