Deriving Percent Overshoot, Settling Time, and Other Performance Metrics

Christopher Lum
lum@uw.edu

This document accompanies the YouTube video at https://youtu.be/QWCLthgJEbc.

Compute the Analytical Response of a 2nd Order System to a Step Input

(*Define transfer function*)
G[s_]=(((ωn)^2)/((s^2)+2 ζ ωn s+((ωn)^2)));

(*Compute R(s) (response to a step of magnitude A)*)
R[s_]=G[s] (A/s);

(*Perform the inverse Laplace transfer to go back to time domain*)
yStep[t_]=Simplify[InverseLaplaceTransform[R[s],s,t],{ωn>0,ζ>0}]//Expand

You can simplify/reduce this to the form of 

	y(t)=A+(e^(-σ t))(a (e^(-ω t))-b  (e^(ω t)))						(Eq.4)
	
where	a=(((A ζ)/(2 (Sqrt[(ζ^2)-1])))-(1/2)A  )
		b=((1/2)A+((A  ζ)/(2 (Sqrt[(ζ^2)-1])))) 
		σ=ζ (Subscript[ω, n])
		ω=(Sqrt[(ζ^2)-1])(Subscript[ω, n])

yStepCheck[t_]=A+Exp[-σ t](a Exp[-ω t]-b Exp[ω t]);

(*Verify that ystep is the same as ystepcheck*)

yStep[t]==yStepCheck[t]/.{a->((A ζ)/(2 (Sqrt[-1+(ζ^2)])))-(1/2)A,b->(1/2)A+((A ζ)/(2 (Sqrt[-1+(ζ^2)]))),σ->ζ ωn,ω->(Sqrt[(ζ^2)-1]) ωn}//Simplify

Define the cos/sin representation of y(t)

yStepTrig[t_]=A-A Exp[-σ t] (Cos[ωd t]+(ζ/(Sqrt[1-(ζ^2)]))Sin[ωd t])/.{σ->ζ ωn,ωd->(Sqrt[1-(ζ^2)]) ωn}

Verify that this satisfies the original 2nd order ODE

	(Overscript[y, ..])(t)+2 ζ (Subscript[ω, n])(OverDot[y])(t)+((Subscript[ω, n])^2)y(t)=((Subscript[ω, n])^2) A

D[yStepTrig[t],{t,2}]+2 ζ ωn D[yStepTrig[t],t]+((ωn)^2) yStepTrig[t]==((ωn)^2) A//Simplify

Verify that this has zero initial conditions

yStepTrig[0]
D[yStepTrig[t],t]/.{t->0}

Visualize the function y(t)

(*Chose specific values to use for plotting*)
Agiven=2.3;
ωngiven=1.5;
ζgiven=0.2;

tFinal = 15;

(*Plot the function*)
Show[
(*Show y(t)*)
Plot[yStepTrig[t]/.{A->Agiven,ζ->ζgiven, ωn->ωngiven},{t,0,tFinal},
PlotRange->All],

(*Show r(t)*)
Plot[A/.{A->Agiven},{t,0,tFinal},
PlotStyle->Red]
]

Compute Performance Metrics for an Example System

Example

ωngiven
ζgiven
Agiven

Tp=(π/((Sqrt[1-(ζ^2)])ωn))/.{A->Agiven,ζ->ζgiven,ωn->ωngiven}

Mpt=A(1+Exp[-((π ζ)/(Sqrt[1-(ζ^2)]))])/.{A->Agiven,ζ->ζgiven,ωn->ωngiven}

PO=100 Exp[-((π ζ)/(Sqrt[1-(ζ^2)]))]/.{A->Agiven,ζ->ζgiven,ωn->ωngiven}

TsTilde=((-Log[δ])/(ζ ωn))/.{A->Agiven,ζ->ζgiven,ωn->ωngiven,δ->0.05}