Simulink multiport switch problem

조회 수: 9 (최근 30일)
Kit
Kit 2016년 6월 22일
댓글: Thorsten Tatarek 2017년 2월 8일
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.
This is the PID controller output (the first PID controller output)
This is the PID controller3 output (the second PID controller output)
This is the PID controller6 output (the third PID controller output)
I suppose to have the following controller output
But I got this controller output which is the same as the PID controller output (the first PID controller)
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?

답변 (2개)

goerk
goerk 2016년 6월 22일
Try to typecast your switching signal (from signal builder) to int32.
  댓글 수: 3
goerk
goerk 2016년 6월 23일
There is a block called: Data Type Conversion
Kit
Kit 2016년 6월 23일
same result. Anyway, thanks a lot.

댓글을 달려면 로그인하십시오.


Kit
Kit 2016년 6월 23일
Solved. I think the switch is working.
  댓글 수: 1
Thorsten Tatarek
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 CenterFile Exchange에서 PID Controller Tuning에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by