Shifting a wave in time domain in simulink
古いコメントを表示
how to shift a wave in the time domain?? My situation:-i have a wave which has a some variations initially (say till time is 2) after this settling time i get my required stable wave..So i want to shift the signal like the value at time 2 must be assigned to time 0..and this signal i want it on the scope...
Transport delay or getting a zero till time 2 does not help..i want the wave to start from 2 itself
i think i am clear on my question...if you want some clarifications in the questions plz comment...
Awaiting for an answer from you folks...
回答 (2 件)
Fangjun Jiang
2011 年 8 月 9 日
2 投票
Set your simulation start time at 2.
10 件のコメント
Vinol Joy D'souza
2011 年 8 月 10 日
Fangjun Jiang
2011 年 8 月 10 日
Both Kaustubha and I had hard time understanding your use case. When you run simulation, everything starts at t=0. If you want to ignore the first 2 seconds of a particular signal. You have a few options.
1. Pre-process that signal data, truncate the first 2 seconds and then feed it into your model.
2. Run your simulation as normal but ignore the first 2 seconds
Vinol Joy D'souza
2011 年 8 月 11 日
Fangjun Jiang
2011 年 8 月 11 日
That's the problem, Vinol! In your original question, you said that you wanted to start at t=2. Now you said that you couldn't know the time but it was 2 cycles. Anyway, how is the signal coming to your model, or how is this signal generated in your model?
Vinol Joy D'souza
2011 年 8 月 11 日
Fangjun Jiang
2011 年 8 月 11 日
Is it possible that you run a simulation with that sine wave and transfer function alone to collect the output signal data? Then you can process the output signal data and use it for your model. I know this is kind cumbersome but I really don't have any other solution.
Vinol Joy D'souza
2011 年 8 月 12 日
Fangjun Jiang
2011 年 8 月 12 日
You can use the "To Workspace" block. It will save your signal data to a workspace variable. Then you can truncate the first 2-cycle data. Then use a "From Workspace" block to import the processed data form workspace to your Simulink model.
Vinol Joy D'souza
2011 年 8 月 16 日
Fangjun Jiang
2011 年 8 月 16 日
As you suggested earlier, use zero-crossing. You could visually inspect it if it just needs to be done occasionally. Or you can write a m-function to automate it. There got be a way. Otherwise, if there is no manual solution, how could a computer knows how to do it.
Kaustubha Govind
2011 年 8 月 6 日
1 投票
The best you can do is to actually use a zero signal until time=2 and then switch to your actual signal - this can be done by using the Switch block where the control signal is driven by comparing the output of the Clock block to time>=2sec. One input is a constant zero and the other input is your actual signal.
Note that it does not make sense to have you signal start at time=2 itself. Since simulation starts at time=0, you need to provide your model some signal. You can always analyze your outputs such that everything for time<2sec is ignored.
7 件のコメント
Vinol Joy D'souza
2011 年 8 月 7 日
Kaustubha Govind
2011 年 8 月 7 日
Perhaps you can delay your other signal (which is in a good state at t=0) also by 2secs. That way, all valid processing of your system starts at t=2sec. Otherwise, if you are importing you signals from the MATLAB workspace, you can always process your input signal in MATLAB before importing it into your Simulink model.
Vinol Joy D'souza
2011 年 8 月 8 日
Kaustubha Govind
2011 年 8 月 8 日
Yes. The "Hit Crossing" block does what you need.
Vinol Joy D'souza
2011 年 8 月 8 日
Vinol Joy D'souza
2011 年 8 月 9 日
Vinol Joy D'souza
2011 年 8 月 11 日
カテゴリ
ヘルプ センター および File Exchange で Interactive and Graphical Tuning についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!