How do I reset the time in Signal Editor block?

1 vue (au cours des 30 derniers jours)
Preetham Jonnalagadda
Preetham Jonnalagadda le 17 Jan 2019
I have designed a signal using signal editor and it is placed in an enabled subsystem. During the run of my simulation, the sub system is usually enabled after certain time(t) depending on the satisfaction of a condition. The output from the signal editor is not from time zero but rather it is from time 't'. How do I make this signal editor run from time 0 when the subsystem is enabled?

Réponses (1)

Jordan Olson
Jordan Olson le 7 Mar 2023
You can achieve this by using an "Integrator" block with a constant input feeding into a "1-D Lookup Table" where the breakpoints are the time axis. This is especially useful if you have a full timeseries before simulation. This method allows you to leverage the integrator's reset port to "reset" the signal by returning to index 1 in the table. Be sure to pick an interpolation setting appropriate for your system. For instance, if "linear" causes discontinuities in the signal slope, you can try "cubic spline" instead.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by