How can I use two different parameters as an input?
이전 댓글 표시
Hey,
I designed a suspension system and need two variables to adjust (s and Ks). I tried to use the memory block to set Ks at the beginning and a demux block for the second input. But then I get an error that Ks is not defiened.
The input Zr is for the validation later on and replaced with the pulse generator.
I attached a picture and the file itself, hopefully someone can help me.

Thank you
Tim
답변 (1개)
Fangjun Jiang
2020년 12월 7일
0 개 추천
If you are talking about "Ks" in the transfer functions, all you need is to define it in MATLAB base workspace, e.g. Ks=100;
댓글 수: 8
Tim Patzke
2020년 12월 7일
Fangjun Jiang
2020년 12월 7일
what is "s" in your mind?
Tim Patzke
2020년 12월 7일
Fangjun Jiang
2020년 12월 7일
If you want to vary the value of coefficient "Ks" in the transfer function, then you need to construct the transfer function with integrator "1/s" discretely and make the constant part "Ks" an input. With so many transfer functions using "Ks" in the model, I doubt that is the true need.
I sense you have fundermental misunderstanding of transfer function, control theory or Simulink modeling. What do you intend to do with those Mux and DeMux blocks? They don't make sense to me.
Tim Patzke
2020년 12월 7일
Fangjun Jiang
2020년 12월 7일
No. Do you know what is a "Transfer function" (in control theory)?
Tim Patzke
2020년 12월 7일
Fangjun Jiang
2020년 12월 7일
Then this task is over your head. The "s" in the transfer function is not what you have in your mind. It represetns "Laplace transform" in control theory.
Run "Ks=9330" in MATLAB Command window. Then all the "red frame" error indication in all the Transfer function blocks will disappear. But then, you will have other errors coming up. I don't think any further help will be meaningful.
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!