필터 지우기
필터 지우기

Using the simulation time as a variable during a SimPowerSystems simulation

조회 수: 20 (최근 30일)
Stuart
Stuart 2012년 3월 18일
I was wondering if it was at all possible to use the simulation time as a variable in a SimPowerSystems simulation to calculate the rate of change of another variable while the simulation is running?
Also is there a function in matlab that can take in a time threshold and detect if a system variable goes above a certain limit for that threshold time?
I have tried using tic and toc functions as well as simtime but it did not work.

답변 (2개)

Stephan
Stephan 2012년 4월 18일
Try the Simulink Source "Clock". The output of the Clock-Block is the current simulation time.

K E
K E 2012년 4월 18일
You could use the Switch block to perform some actions once time passes a given limit, if that is what you want your model to do.

카테고리

Help CenterFile Exchange에서 Switches and Breakers에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by