function h=n_upsample(h0,T,Ts) w=[1,zeros(1,round(T/Ts)-1)]; h1=(h0*w)'; h=reshape(h1,1,[]);
TS-PID 源代码
汇集 TS-PID 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。
function h=n_upsample(h0,T,Ts) w=[1,zeros(1,round(T/Ts)-1)]; h1=(h0*w)'; h=reshape(h1,1,[]);
function [y]=f(x1,x2) Ts=1; if nargin==1 y=[1 Ts;0 1]*x1; else y=[1 Ts;0 1]*x1+[(Ts^2)/2;Ts]*x2; end
%P、PI、PID三种控制策略 G=tf(10,[1 10 35 50 24]); %系统传递函数 [Kc,pp,wg,wp]=margin(G);Tc=2*pi/wg; %计算系…
/*==================================================================================================== 这是从网上找来的一个比较典型的PID处理程序…