Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to define derivatives in Matlab?

Status
Not open for further replies.

abhigopal

Member level 3
Joined
Dec 21, 2004
Messages
61
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
624
matlab help

Hi,
I need to find out the transfer function of a given system. I have the input /output relationship. But i dont know how to define derivatives in matlab. As in, I have one of the terms as (d/dt)*X .. How will i incorporate this in the tf[num,den].?? please help
Thanks
 

Re: matlab help

The derivative function is equivalent to multiplying by s. Similarly, the integration function is equivalent to dividing by s. So you can easily do it manually.

The tf function only accepts coefficients of the various s-powers.

Eg.

y=5(d/dt)x + 6int(x)dt
Y = 5Xs + 6X/s
Y/X = (5s^2 + 6)/(s)

You enter tf([5 0 6] [1 0]) in MATLAB.

Note : Not too sure on the MATLAB syntax, but you should get the rough idea.
 

matlab help

transfer functions are in S or Z domain. integration or accumulation and derivation or differentiation are in TIME domain. go to "Signals and systems" by openheima nd read page 691 and 775
 

matlab help

thanks guys.. appreciate ur help
 

Re: matlab help

Hi,
If I am not mistaken, Matlab has a powerfull tool for derivatives. I haven't use it, but I remember reading for this in some forums. Check it also I think it has to do with object oriented tools from simulink or something. Of course you have to update your knowledge on Signals and Systems if you want to work with transfer functions. I learned this the hard way myself...
D.
 

matlab help

there are some good books that teach u the use of Matlab in signals and systems
 

Re: matlab help

no need to consult books
try ur search query on google
 

Re: matlab help

Ok, I assume that you have a system simular to this:

dx/dt = Ax + Bu
y = Cx + Du

This is called State-space description.

What you want is the transfer function in terms of s (=j ω):

So you should use the state-space to transfer function instruction:

ss2tf

type in your matlab command interface "help ss2tf".

syntax like this:

[num, den] = ss2tf(A,B,C,D,iu)



It's easy! Try it.
 

Re: matlab help

if u want to have exact function then go for the evalunationary computing

where u have to supply i/p o/p it calculates the function.


from google u can get the source code of evalutionary computing in matlab

bye
 

Re: matlab help

And one of the functions of transfer function is to make the differential equations which describe the dynamics of system to algebrac equations.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top