How can I simulate the effect of a step disturbance on a plant output that is in feedback to the controller?
11 次查看(过去 30 天)
显示 更早的评论
bz = [0.1];
az=[1 -0.9];
ts=0.1;
Gz=tf(bz,az,ts);
[kpid,info] = pidtune(Gz,'pid');
T_pi = feedback(kpid*Gz, 1);
step(T_pi)
I want to add a constant unit disturbance that affects the system at some point of time and see the response in the presense of the disturbance. How can I do this?
Any advise would be very helpful. Looking forwaed to your replies.
1 个评论
Sam Chak
2023-4-18
hi @Bhindhiya, your title says that adding the disturbance on a plant output. Can you check again whether it's the input to the plant, or the the disturbance is injected at the output of the plant?
回答(1 个)
Gokul Nath S J
2023-4-18
Hi Bhindhiya,
Based on my understanding, it seems that you want to add a disturbance to the system at a specific time. Let's say the disturbance
be a disturbance. For
to be start from a time instance
, it should be multiplied with a unit step and then delayed accordingly. So the disturbance
would be modelled as
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359498/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359503/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359508/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359513/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1359518/image.png)
Convert this disturbance to laplace domain and then multiply with the actual transfer function. As a sample code, if the disturbance is Ks in laplace domain, then
[kpid,info] = pidtune(Gz*Ks,'pid');
T_pi = feedback(kpid*Gz*Ks, 1);
step(T_pi)
with regards,
Gokul Nath S J
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 PID Controller Tuning 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!