ressistors with small random offset in SIMULINK
이전 댓글 표시
Hello , I want to have 10 resistors with a littles offset in resistance by random number arounk 1kohm
i have itried to use matlab simuling VAriable ressistor.
But i dont see how i enter there some random offset in the value.
Thanks.

댓글 수: 11
Walter Roberson
2020년 5월 27일
Under what circumstances should the random resistance change? For example can it be chosen once at the beginning of the run and will hold for the duration of the run? Or should it change (say) after every 3 seconds? Or do you want it to be different "every time" it is used (if so are you using continuous or discrete?) Or are you trying to model increased resistance as temperatures increase as the circuit gets warmer?
Walter Roberson
2020년 5월 28일
Use a MATLAB function that does set_param() to modify the resistances .
fima v
2020년 5월 28일
Walter Roberson
2020년 5월 28일
That should be ones(1,10);
I am having difficulty figuring out which block you are looking at. The blocks I find with similar descriptions do not have the same icon, but the icon can be important as it gives information about which Domain you are working with. The PS on the icon hints to me you might be using Specialized Power Systems (SPS), but the discussion I find for variable resistors for SPS use quite a different approach.
fima v
2020년 5월 28일
Walter Roberson
2020년 5월 28일
Which Domain are you using? Are you using pure Simulink? Simscape Electrical? Specialized Power Systems?
fima v
2020년 5월 28일
Walter Roberson
2020년 5월 28일
I am having difficulty finding resistors in pure simulink. I find resistors in
- RF Blockset
- Simscape Electrical
- Specialized Power Systems
fima v
2020년 5월 28일
채택된 답변
추가 답변 (1개)
Fangjun Jiang
2020년 5월 27일
편집: Fangjun Jiang
2020년 5월 28일
0 개 추천
This "Variable Resistor" is not the right one to use. This "Variable Resistor" represents a physical variable resistor in the lab where you can move a handle or turn a knob to adjust the value of the resistor. The "PS" port of this block can be connect to a motor (for example) to move the handle or turn the knob thus change the resistor.
To implement what you want, you just need to set "R=10e3-10+20*rand(10,1)" in workspace and drop 10 regular resistor blocks in your model, set the parameter for the first resistor to be R(1), ... and the last one to be R(10).
카테고리
도움말 센터 및 File Exchange에서 Simulation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!