Transfer functions with delays in Matlab

I was wondering how to use delays in transfer functions. First I modeled the delay explicity with the e function. In this example I create the laplace variable s and use it in my transfer function Tf.

s = tf('s')
Tf = exp(-s) * G

In a forum I read about the function fieldnames() which lists all the argument names that a given matlab function takes.

fieldnames(tf)

ans = 

    'num'
    'den'
    'ioDelay'
    'Variable'
    'Ts'
    'InputDelay'
    'OutputDelay'
    'InputName'
    'OutputName'
    'InputGroup'
    'OutputGroup'
    'Name'
    'Notes'
    'UserData'

The list of the argument names of tf() contains ioDelay and that’s what can be used to delay a transfer function. Because matlab functions take a variable amount of arguments you cannot just type in

G = tf( 1, 1)

for the system 1 with a delay of one second as the second argument. The first argument is the numerator and the second the denumerator in this case. If you don’t use the standard order of arguments you have to list the arguments as matlab_function(‘fieldname1′, value1, ‘fieldname2′, value2, …).

Example:

G = tf( 1, 'ioDelay', 1)
DeliciousDiggTechnorati FavoritesRedditLinkedInFacebookSpurlTwitterWebnewsYiGGMySpaceYahoo BookmarksFriendFeedGoogle BookmarksLiveJournalShare

Matlab commands for feedback controls

Here is a small matlab reference for feedback calculations or simulations:

  • roots: Find polynomial roots
  • poly: Convert roots to polynomial
  • conv: Convolution and polynomial multiplication
  • polyval: Evaluate polynomial
  • tf: Creation of transfer functions or conversion to transfer function
  • pzmap: Pole-zero map of LTI models
  • pole: Compute the poles of LTI models
  • zero: Computes the transmission zeros of LTI models
  • series: Series interconnection of the two LTI models
  • parallel: Parallel interconnection of two LTI models
  • feedback: Feedback connection of two LTI models
  • minreal: Minimal realization and pole-zero cancellation
  • step: Step response of LTI models
DeliciousDiggTechnorati FavoritesRedditLinkedInFacebookSpurlTwitterWebnewsYiGGMySpaceYahoo BookmarksFriendFeedGoogle BookmarksLiveJournalShare