资源简介
串级PID控制器Matlab仿真
代码片段和文件信息
% clc;
% clear;
N = 100;
Kp_1=1.56;
Kp_2=0.68;
% Ti_1=3;
% ki_1=1/Ti_1;
ki_1=0.05;
% Ti_2=3;
% ki_2=1/Ti_1;
ki_2=0.01;
kd_1=0.1; %kd=Td;
kd_2=0.05;
Ts=1;
r_1=zeros(1N);
r_2=zeros(1N);
e_1=zeros(1N);
e_2=zeros(1N);
y=zeros(1N);
u_1=zeros(1N);
u_2=zeros(1N);
sum_1=zeros(1N);
sum_2=zeros(1N);
y(1)=0;
% noise=randn(1N);
% load mydata A
% noise=A;
noise=X_estimate;
% for i=1:N
% noise(i)=c(i);
% end
for t=2:N;
%%%%%%%%%%%%%%%%%%%%%%控制%%%%%%%%%%%%%%%%%%%%%%%%%%
y(t)=y(t-1)-u_1(t-1)+noise(t);
%%%%%%%%%%%%%%%%%%%%%%%外环%%%%%%%%%%%%%%%%%%%%%%
- 上一篇:能量算子解调程序
- 下一篇:最小二乘支持向量机程序代码
评论
共有 条评论