Make the transfer function from magnitude and phase data

18 次查看(过去 30 天)
Following are the practical magnitude and phase data, now i want to make the transfer function of any order whose magnitude and phase response should approx. match with this data. I tried many time using system identification but end up with unstable transfer function , please help .
Magnitude_dB = [0,0.0294382792088619,0.0621252890325977,-0.0317757995233922,-0.529502211330154,-1.50167657755005,-2.43642719895843,-3.24485628416788,-3.98529452106657,-4.56346322230199,-5.13670696756743,-5.41005379073451,-5.76590849844941,-6.36303108991967,-6.42397690778927,-6.56136765621800,-7.00077651119822,-7.37130232917411,-7.72121762130983,-9.01958493128253];
Phase_deg = [-1.86617534558493,-4.59853973674537,-7.62466018649141,-14.3210302476963,-20.3444251905058,-36.3420780563449,-50.8612623082813,-52.7685476392275,-62.4730146334328,-74.8270616852208,-74.2327606392636,-79.9698622712670,-86.1645419213363,-92.5982487919277,-92.8045908328856,-103.595378289453,-107.504690696956,-118.822856754981,-126.986214461683,-130.614971839560];
Frequency_Hz = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20];

回答(1 个)

Sandeep Mishra
Sandeep Mishra 2024-10-10
Hi Anil,
I observe that you have data which includes magnitude , phase , and frequency values, and you want to create a transfer function which resembles this data.
Based on this approach, you can determine the numerator polynomial ‘b’ and denominator polynomial ‘a’ by adjusting their respective orders to achieve the optimal result.
Once you have the polynomials, you can generate the transfer function using the ‘tf’ command in MATLAB as shown below:
sys = tf(b, a);
To validate the transfer function, you can compute its frequency response using the ‘bode’ function as demonstrated:
w = Frequency_Hz * 2 * pi
[mag, phase, wout] = bode(sys, w);
For more information, refer to the following MathWorks Documentation:
  1. tf(Transfer function model) function: https://www.mathworks.com/help/releases/R2024a/control/ref/tf.html
  2. bode(Bode frequency response of dynamic system) function: https://www.mathworks.com/help/releases/R2024a/ident/ref/dynamicsystem.bode.html
I hope this helps you.

类别

Help CenterFile Exchange 中查找有关 Linear Model Identification 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by