How can I use two different parameters as an input?
Show older comments
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
Answers (1)
Fangjun Jiang
on 7 Dec 2020
0 votes
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 Comments
Tim Patzke
on 7 Dec 2020
Fangjun Jiang
on 7 Dec 2020
what is "s" in your mind?
Tim Patzke
on 7 Dec 2020
Fangjun Jiang
on 7 Dec 2020
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
on 7 Dec 2020
Fangjun Jiang
on 7 Dec 2020
No. Do you know what is a "Transfer function" (in control theory)?
Tim Patzke
on 7 Dec 2020
Fangjun Jiang
on 7 Dec 2020
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.
Categories
Find more on Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!