Change specific simulation time in Simulink

Hello,
I have been working on a simulink model and the simulation works perfectly.
I wanna add a new block to the simulation, which only runs for a specific time. So lets say I run the simulation for 10000s, I only want the new block to run from 2000-4000.
Is this possible? And is there a way I can make a specific block start after some seconds?
Your Sincerly

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 13 de Jul. de 2014

0 votos

You can use the block If-Then-Else Blocks

5 comentarios

But I tried to put a variable called simulation_stop_time and im changing that variable in a matlab script. But how do I access this simulation time while it runs? I tried to make a matlab function like this:
if simulation_stop_time > 1000
signal_out = 1
else
signal_out = 0
end
But since I gave this variable a value, it doesnt change. But how do I access the variable that goes from 0 - simulation_stop_time?
Aint it possible to use this value somehow?
Azzi Abdelmalek
Azzi Abdelmalek el 13 de Jul. de 2014
Where did you put this function? There is no start time and stop time for each block
Kalle
Kalle el 13 de Jul. de 2014
I put it in simulink. I can't really see how I can explain it better. It should be a basic question.
Let's say I put a transfer function in a model and run it for '' 10000'' and put a scope to see the output. Now I want to add a disturbance that should only run for 1000-2000. Is this possible? I want to access the increasing simulation time.
Azzi Abdelmalek
Azzi Abdelmalek el 13 de Jul. de 2014
When there is no disturbance signal, we can consider it as equal to zero. Instead of telling: I will run a disturbance from 1000 to 2000, just set your disturbance signal to zero wherever you want
Omar Al-Khatib
Omar Al-Khatib el 22 de En. de 2021
Haha LOL gud answer :)

Iniciar sesión para comentar.

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 13 de Jul. de 2014

Comentada:

el 22 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by