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

Answers (1)

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

I want Ks variable, basically it’s like a close-loop. Ks is 9330 at the beginning but as soon as s is e.g. 5 Ks is getting a different value.
what is "s" in your mind?
s is the input generated by the pulse
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.
I have no idea about SimuLink and it is more confusing than helping me, but it is required so I try my best.
The model is based on an excisting model with a constant Ks. My intention was to add an equation which describes Ks and take this as an second input to the transfer function. Hence I used Mux and DeMux to set two inputs for the functions.
Does this make sense?
No. Do you know what is a "Transfer function" (in control theory)?
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.

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Asked:

on 7 Dec 2020

Commented:

on 7 Dec 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!