Simulink multiport switch problem
10 次查看(过去 30 天)
显示 更早的评论
I would like to use 3 pid controllers with a switch to control the system (switch from PID controller to PID controller3 at t=5s and then to PID controller6 at t=10s). But the switch seems not working properly.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154338/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154339/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154340/image.jpeg)
This is the PID controller output (the first PID controller output)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154341/image.jpeg)
This is the PID controller3 output (the second PID controller output)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154342/image.jpeg)
This is the PID controller6 output (the third PID controller output)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154343/image.jpeg)
I suppose to have the following controller output
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154346/image.jpeg)
But I got this controller output which is the same as the PID controller output (the first PID controller)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154347/image.jpeg)
Here is the .zip file of this Simulink model.
p.s. I tried to adjust the parameters in the PID controllers and the switch is working properly. So, I think the switch is affected by the port1,2,3 inputs which are the controller outputs??? Where's the problem?
0 个评论
回答(2 个)
Kit
2016-6-23
1 个评论
Thorsten Tatarek
2017-2-8
How do you solved it? i have a similar problem with the multiport switch. I use a rectangular pulse generator signal on port 1 and a sin wave signal on port 2. i wanna switch between them. When i have the sin wave connected, but use the rectangular switch port with a constant, the signal is kind of diagonal instead of a rectangular up and down.
另请参阅
类别
在 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!