Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer Function from Difference Equations

Status
Not open for further replies.

Jabadab

Mechanical
Dec 14, 2016
4
If you had a difference equation model of say x(k+1) = 0.2x(k)+u(k) and y(k+1)=-0.4y(k)+x(k)+u(k-1), how would you develop a transfer function in the discrete time domain.

Likewise, working backwards, if you were given a transfer function in the continous domain of say (s+3)/(s^2+4s+16), sampled every 0.05s, how would you find a set of difference equations.

Thanks for your time.
 
Replies continue below

Recommended for you

If you had a difference equation model of say x(k+1) = 0.2x(k)+u(k) and y(k+1)=-0.4y(k)+x(k)+u(k-1), how would you develop a transfer function in the discrete time domain.
What is x and what is y?
This is for what kind of application because it doesn't make much sense.
I looks like you just made this up.


Peter Nachtwey
Delta Computer Systems
 
Y is the output and U is the input. X is an intermediate variable I suppose.

I did not make this up.
 
OK, but you didn't answer my question. What is the real application? What does x and y really represent? It could be some unreasonable question a college professor would ask. Yes I could solve it. There are situations where x may be position and y may velocity or the rate of change of x but there is no context to the question which is why I think it is a question a professor made up so then it is just an exercise.


Peter Nachtwey
Delta Computer Systems
 
Oh sorry, yes it is a made up exercise. It's not homework or anything, I would just like to understand maybe in a more general sense how difference equations relate to discrete transfer functions like differential equations relate to continuos time transfer functions.
 
Your question is still backwards. Usually one starts out with the transfer function as a differential equation or Laplace transform and then calculates the difference equation, not the other way around. The controller gains are also calculated as PID gains but then it is possible convert the PID controller to a difference equation. Working the problem backwards can be done but it would require solving for multiple unknowns from multiple equations. Like I said above, it can be done but why?

For instance a digital PID controller can be implemented as
u(n)=u(n-1)+K0*e(n)+K1*e(n-1)+K2*e(n-2)
where
K0=Ki*T+Kp+Kd/T
K1=-Kp-2*Kd/T
K2=Kd/T
So if I know K0,K1,K2 and T I can calculate Ki, Kp and Kd but why? Usually one starts with Ki,Kp, and Kd then calculates K0, K1, K2.


Peter Nachtwey
Delta Computer Systems
 
Oh, that PID example actually cleared up another confusion I had. Thanks for taking the time, really appreciate it.
 
To the OP, you may use z-transforms to resolve you first problem. As for the second, it you must specify where the sampling takes place first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor