what is the relationship between the values in the matlab command makweight and the transfer function ?
7 次查看（过去 30 天）
In loop shaping ,what is the relationship betwen the values of the command W1 = makeweight(100,10,0.1); and the result W1=0.1 s + 9.95/S+0.0995 ?
on the way around , if I know the transfer function W1=0.1 s + 9.95/S+0.0995, how can I kno wthe command makeweight W1 = makeweight(100,10,0.1) ?
Thank you for help in advance
As per my understanding, you would like to convert the transfer function into the “makeweight” function form.
In MATLAB, the "makeweight" command returns the numerator and denominator of the transfer function. The "makeweight” function’s general form is W = makeweight (hcgain, [freq,mag], hfgain). If the second parameter is only an integer ‘wc’ then it indicates mag = 1 and freq = wc.
Here is the code to get coefficients of the transfer function from “makeweight” function you can check:
W1 = makeweight (100,10,0.1);
% Extract the numerator and denominator coefficients
[num, den] = tfdata(W1, 'v');
Let the transfer function be W(s), from the transfer function we can calculate manually the Dcgain, Hfgain and magnitude at some frequency(wc):
dcgain = W (0).
hfgain = W (inf)
| W(j*wc) | = 1.
For further reference, please check the following link to know more about “makeweight” function in MATLAB.
I hope this helps!