![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1681796/image.png)
why does the switch exist at the speed reference in PMSM control?
조회 수: 1 (최근 30일)
이전 댓글 표시
I'm going to use this PMSM control blockset, and I found that there's a switch at the speed reference.
As shown in the attached photo, I simulated with the speed reference set to 1000(green circle), and there's a step signal that applied to the output by the initial reference (blue circle) from the switch(red circle).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1668866/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1668871/image.png)
If I remove this switch, then the output immediately apply a speed reference to the input, the step output disappears, so I wonder why the switch was installed.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1668876/image.png)
댓글 수: 0
채택된 답변
Sayan
2024년 4월 29일
Hi Esther Kang,
The switch in the example is for the reversal of the motor shaft. Suppose you need to control the motor speed in the anti-clockwise direction for some duration and in the clockwise direction after anti-clockwise rotation, and you need the speed reversal to happen dynamically while the model runs without running the model twice in different directions. In that case, the Switch block becomes very useful.
I am attaching a photo of the measured speed where the motor speed is reversed after 3 seconds, i.e., I have provided a negative speed reference in the "Speed_Ref_Final (rpm)" Constant block.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1681796/image.png)
However, if you need to control the motor for a constant reference speed, you can omit the Switch and the Step function block and use a Constant block to provide a constant reference speed.
You can find more information on the Switch block in the following documentation.
Hope this answers the query.
댓글 수: 0
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!