Mastering Matlab for Bode Plots: Understanding Transfer Functions Easily

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
onceinalifetim
Messages
38
Reaction score
0
Hello

I need to do bode plot..

but i not to sure how to use matlab..

i need this 1 / (a + bs)s

num = 1
how to key in the den to get (a + bs)s..

i try different way and i can't get 1/(a+bs)s

hope to get help
 
Physics news on Phys.org
You can define vectors in descending powers of s, for both the numerator and the denomator:
ie, for s^3+5s+1, you would use :
den=[1 0 5 1], where the vector is made up of the coefficients of the polynomial in s.

Then, you use function tf to create the transfer function from the numerator and denominator created as described above. Then, you can invoke the bode function in Matlab to obtain the bode plot.

I don't remember if bode is part of the standard Matlab distribution or if it is part of a tool box...
In case it is not, you can do it yourself by substituting jw for s, and solving the complex math for the numerator and denominator and then taking the 20log of the numerator - 20log of the denominator for the different values of w.