Effacer les filtres
Effacer les filtres

What function in Matlab is equivalent to the block in Simulink "Transport Delay"?

4 vues (au cours des 30 derniers jours)
I am trying to write a SimScape component file (.ssc) that uses a function that gives the same result as the Transport Delay block in Simulink. I can implement the functionality that I need within a SimScape model. However, I would like to encapsulate a part of this model in a component that is easily reused within a library.
What function in Matlab will implement the capability of the Transport Delay block?

Réponse acceptée

Stephen Thompson
Stephen Thompson le 20 Déc 2017
I found what I needed. There is a demo called "Variable Transport Delay" in the help files. (I don't need the variable delay, but it is simple to make that a constant.) The code shows how to encapsulate the block in a .ssc file. It also shows the use of a function called delay(x,tau,...) that delays the signal x by the time tau.

Plus de réponses (2)

Stephen Thompson
Stephen Thompson le 19 Déc 2017
Thank you Birdman. Your code runs for your simple demo case. Let me try it in my real case.

Stephen Thompson
Stephen Thompson le 19 Déc 2017
On further review...
This does not do the same thing as the Transport Delay block. It does calculate a delayed version of system time, but it will not delay any other signal.
  1 commentaire
Birdman
Birdman le 20 Déc 2017
What do you want actually? I can modify the model according to your need.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Model Statistics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by