How can I plot the transfer function? HELP Please.
Mostrar comentarios más antiguos
Hello, I have a problem with plot the transfer function. I have to plot the precision model's transfer function. To understand my function and precision model, I'll insert a photo.
Here, I must use
numerator = [];
denominator = [];
sys = tf(numerator,denominator)
stepplot(sys)
But I cannot write the numerator and denominator. I have numerator = KH * ( TL*s + 1 ) * exp(-t*s) and denominator = ( TI*s + 1 ) * ( ( (p^2) / (WN^2) ) + ( ( (2*zetaN) / (WN) ) * p ) + (1). As I understand, I must write these numerator and denominator as coefficients of s variable. But I couldn't write. Could you help me please? How can I plot the transfer function?
Also, I want to plot step function with 1 amplitude for compare it with transfer function. How can I do that? Is it just step(sys)?? Is this the same thing with stepplot?
If you could help me, I will be very glad. Thanks!

Respuesta aceptada
Más respuestas (1)
Image Analyst
el 13 de Abr. de 2021
You're using both p and s to describe the same p in the formula. Change s to p and I think it should work:
numerator = KH * ( TL*p + 1 ) * exp(-t*p)
term1 = TI*p + 1
term2 = p^2 / WN^2
term3 = 2 * zetaN * p / WN
denominator = term1 * (term2 + term3 + 1)
FH = numerator / denominator
If you'd rather call the independent variable s instead of p, then just change all the p to s.
numerator = KH * ( TL*s + 1 ) * exp(-t*s)
term1 = TI*s + 1
term2 = s^2 / WN^2
term3 = 2 * zetaN * s / WN
denominator = term1 * (term2 + term3 + 1)
FH = numerator / denominator
but don't mix s and p - that could be a disaster if they are separate variables and have different values.
3 comentarios
hgrlk
el 13 de Abr. de 2021
Image Analyst
el 13 de Abr. de 2021
Sorry, I don't know anything about that function. You'll just have to read the documentation or hope someone else knows about it.
hgrlk
el 14 de Abr. de 2021
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!