build dc servo permanent magnet using transfer function given and matlab file. must modify values in m file.

profileneedhelporfavor
DCMotorParameters2.m

%Motor Model Parameters% Ra=2; La=5.2e-3; Jeq=152e-6; Ke=0.1; Kt=0.1; Vd=60; Vtri=5; Fs=33e3; kPWM=Vd/Vtri; %Current Controller Design tau_a=La/Ra; Fc=1000; %Given requirement (current controller bandwidth) wc=2*pi*Fc; KI_i=Ra*wc/kPWM; Kp_i=KI_i*tau_a; %Parameter Variation Ra_1=1.9; La_1=5e-3; %Speed controller Design Fc_w=Fc/10; wc_w=2*pi*Fc_w; PM=60; Ratio=tand(PM)/wc_w; %Ratio=Kpw/Kiw KI_w=((wc_w^2)*Jeq)/(Kt*(sqrt(1+((wc_w*Ratio)^2)))); Kp_w=Ratio*KI_w;