0

I want to ask something about System Identification in MATLAB.

When I used System Identification by changing poles and zeros number by myself, I feel like it's so time-consuming work.

When I put in the poles and zeros number in System Identification, it print out Fitting acurracy like down here.

accuracy output

Fit to estimation data: 70.77%

So I want to use 'for' function to change the poles and zeros number automatically and want to know what is the most accuracy poles and zeros and print out the number in this mat file.

I will be really happy that if give me a some tips for doing this.

Down here is what I made for estimate the Transfer Function.

zfr = Mag_Ori.*exp(i*Phase*pi/180);                                       
data = frd(zfr,Frequency)                                                      

Ts = 0.000005;                                                                   
gfr = idfrd(zfr,Frequency,Ts);                                                     

np = 15;                                                                        
nz = 15;                                                                        
sys = tfest(data,np,nz)                                                         

opts = bodeoptions('cstprefs');                                                   
opts.PhaseWrapping='on';                                                        
opts.Title.FontWeight ='bold';                                                   
opts.XLabel.FontWeight = 'bold';
opts.YLabel.FontWeight = 'bold';
opts.Ticklabel.FontWeight = 'bold';

figure(1)
bode(gfr,'bx' , sys,'r', opts, {61*2*pi,3000*2*pi})

code

Wolfie
  • 27,562
  • 7
  • 28
  • 55
  • [Please do not post code as images](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question/285557#285557) – Wolfie Oct 28 '22 at 10:00

0 Answers0