How to linearly vary the amplitude and frequency in a 3 phase voltage source block with time?
조회 수: 3 (최근 30일)
이전 댓글 표시
I am working with the 'Three-Phase Programmable Voltage Source' block in simulink and I want to linearly vary both amplitude and frequency of the source with respect to simulation time. The exact functions I want are something like:
Amplitude = 5.5 + 10*t Volts (for 0<t<10) and 105.5 (for t>10)
Frequency = 5 + 8*t Hertz (for 0<t<10) and 85 (for t>10)
Where t is simulation time in seconds
How should I go about doing this? I am a novice so any help is appreciated.
댓글 수: 0
채택된 답변
Shubham
2024년 5월 25일
Hey Muhammad,
You can try using custom functions as per your need. For example, the following images show that you can parameterize the PID controller block for programmatically setting parameter values:
For more information about setting block paramter values, refer to the following documentation:
You can also retrieve the current simulation time and incorporate in your functions to modify the parameter values as desired. For this purpose, you may find the following MATLAB Answer helpful: https://www.mathworks.com/matlabcentral/answers/57825-how-to-get-current-time-of-simulation-while-model-is-executing
Once you have obtained the simulation time, you can update your parameter value by using the custom function.
You may also find the following useful:
Just putting it out there that you can create custom blocks as well:
I hope this helps!
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!