File:Second order transfer function.svg

Original file (SVG file, nominally 631 × 356 pixels, file size: 80 KB)

Summary

Description
English: Step responses for a second order system defined by the transfer function:

where is the damping ratio and is the undamped natural frequency. The equations were obtained from here, plotted using maxima and edited in a text editor to insert the Greek alphabets in the plot. The equations are:

Date
Source Own work
Author Krishnavedala
Source code using w:python (programming language) with numpy and matplotlib toolboxes
from matplotlib.pyplot import *
from numpy import *

wt = linspace(0,15,100)
b = lambda z: sqrt(1. - z**2)
t = lambda z: arctan(b(z)/z)
h1 = lambda wt,z: 1. - exp(-z*wt)*sin(b(z)*wt+t(z))/b(z)
h2 = lambda wt: 1. - cos(wt)
h3 = lambda wt: 1. - exp(-wt)*(1.+wt)
s1 = lambda z: (z + sqrt(z**2-1.))
s2 = lambda z: (z - sqrt(z**2-1.))
h4 = lambda wt,z: 1. + ( (exp(-s1(z)*wt)/s1(z)) - \
	(exp(-s2(z)*wt)/s2(z)) ) / (2.*sqrt(z**2-1.))

fig = figure(figsize=(8,4))
ax = fig.add_subplot(111)
ax.grid(True)
ax.plot(wt,h2(wt),'g',label=r"undamped $(\zeta=0)$")
ax.plot(wt,h1(wt,.5),'b',label=r"under $(\zeta=0.5)$")
ax.plot(wt,h3(wt),'r',label=r"critical $(\zeta=1.0)$")
ax.plot(wt,h4(wt,1.5),'m',label=r"over $(\zeta=1.5)$")
ax.set_ylim(0,2)
ax.minorticks_on()

leg = ax.legend(frameon=False,handletextpad=.05)
setp(leg.get_texts(),fontsize=10)
ax.set_xlim(0,15)
ax.set_xlabel(r"$\omega t$",fontsize=15)
ax.set_ylabel("Step response",fontsize=12)
fig.savefig("Second_order_transfer_function.svg",bbox_inches="tight",\
	pad_inches=.15)
The maxima source code
beta(zeta) := sqrt(1-zeta^2);
theta(zeta) := atan(beta(zeta)/zeta);
h_under(wt) := 1 - beta(0.5)^-1*exp(-0.5*wt)*sin(wt*beta(.5)+theta(0.5));
h_un(wt) := 1 - cos(wt);
h_crit(wt) := 1 - exp(-wt) * (1+wt);
s1(zeta) := zeta+sqrt(zeta^2-1);
s2(zeta) := zeta-sqrt(zeta^2-1);
h_over(wt) := 1 + ((exp(-s1(1.5)*wt)/s1(1.5))-(exp(-s2(1.5)*wt)/s2(1.5)))/(2*sqrt(1.5^2-1));
load(draw);
draw2d(dimensions=[800,400],terminal=svg,
  user_preamble="set mxtics; set mytics;",
  grid=true, yrange=[0,2], xlabel="omega t",
  line_width=1.5, ylabel="Step response",
  key="under (zeta=0.5)",color=blue,explicit(h_under(wt),wt,0,15),
  key="critical (zeta=1)",color=red,explicit(h_crit(wt),wt,0,15),
  key="over (zeta=1.5)",color=magenta,explicit(h_over(wt),wt,0,15),
  key="undamped (zeta=0)",color=green,explicit(h_un(wt),wt,0,15)
 );

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

26 May 2011

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current15:57, 7 June 2011Thumbnail for version as of 15:57, 7 June 2011631 × 356 (80 KB)Krishnavedalafigure correction after correcting the equations
19:25, 26 May 2011Thumbnail for version as of 19:25, 26 May 2011800 × 400 (36 KB)Krishnavedalaerroneous under-damped curve corrected.
18:28, 26 May 2011Thumbnail for version as of 18:28, 26 May 2011800 × 400 (36 KB)Krishnavedala

The following 2 pages use this file:

Global file usage

The following other wikis use this file: