How to create initial and final values on simulink?
Mostrar comentarios más antiguos
Hello I am currently working on a problem in which I have 5 identical tanks in series. I have found the transfer function of each tank to be of the form 1/(s+1). I am trying to model the system in simulink when the inlet flow concentration of A changes from 0.6 at t=0 to 0.45 when t>0.
The way I am setting it up is to use the step block and set the initial and final value to the ones above and making the step time 0. Then I connect this to 5 transfer functions in series and connect the output to a scope. However, no matter what I try the system always starts at 0 at t =0 and not 0.6 but it always goes to 0.45 after some time. I am new to simulink and don't know what is the correct way to tell the system to start at 0.6 and then go to 0.45.
Do I have to use another type of source block? I have tried everything with the step block and nothing sims to work.
1 comentario
Azzi Abdelmalek
el 13 de Abr. de 2016
Editada: Azzi Abdelmalek
el 13 de Abr. de 2016
Alejandro, try to make your question clear. What initial value? and what final value? what those have to do with a step block? Try just to focus on your real problem. For example telling us that you are connecting the output to the scope has nothing to do with your problem!
Respuesta aceptada
Más respuestas (1)
Alejandro Morales
el 19 de Abr. de 2016
0 votos
1 comentario
Stefan Raab
el 19 de Abr. de 2016
Unfortunately I can't endorse your workaround. Acutally you are adding a constant disturbance to your output signal. This might have the same result as long as you are steady-state accurate, but as soon as you have an input that is not "perfectly suited" to this constant or the plant is more complex, the results are wrong. To underline my words, I made a simple model where the Transfer Function block and the State Space block represent the exact same system, but put the two different step inputs:

As you can see in the plot, the output signals are far from equivalent.
I don't know where your work is leading, but if you don't do this correctly, it may cause many errors in the end and nobody wants that. :)
By the way, you could also build the transfer functions with integrator blocks and feedbacks. The next picture shows the modeling of a PT1 block. In the Integrator block you can then also specify initial conditions:

Kind regards, Stefan
Categorías
Más información sobre Interactive Model Editing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!