SHARE
TWEET

CreateTFfromFreqResponse.m

a guest Dec 6th, 2017 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkg load control;
  2. pkg load signal;
  3. clear all
  4. x = csvread('buckVfreqResp.csv');
  5. SampleFrequency = 20000;
  6. T = 1/SampleFrequency;
  7. f = x(:,1);
  8. r = x(:,2);
  9. phase_rad = x(:,3).*(pi/180);
  10. h = r.*cos(phase_rad) + r.*(sin(phase_rad)*i);
  11. w = f.*(2*pi*T);
  12. [b,a] = invfreqz(h,w,2,3)
  13. sys = tf(b,a)
  14. bode(sys)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top