Just want to display the scope's parameters for a period not from 0

Currently my simulation time is between 0-50s but I just want to get parameters like RMS or overshoot between 20-35s and 35s-50s. I tried changing the time-span and time-offset in the View tab but the graph shows completely wrong and the result is also wrong. Hope you guys can help me!

 Accepted Answer

  1. Put the Scope block inside an Enabled Subsystem.
  2. Use the Digital Clock block to get the simulation time
  3. Use Relational Operator block to compare the simulation time with your threshold values '20' and '35'
  4. Use a Logical Operator block set to 'AND' to result a signal which is TRUE when the simulation time is in between '20' and '35'
  5. Use this Boolean signal to enable the Enabled Subsystem
When simulating, the Scope block will be blank (no data) outside the simulation times when the signal to the enabler of the Enabled Subsystem is false.

4 Comments

Thank you so much for answering my question. This is inside my enable subsystem block, but i have some problems as follows:
  1. What is boolean signal I can use?
  2. Sampling time in digital block how much should I put?
  3. In terms of the signal for the scope, where should I plug it in, or directly into the scope with 2 inputs, one for time and one for em as in the picture?
Hi
Your connection of the blocks using the Digital Clock, the Relational Operators and the Logical AND block is correct. However, this set of blocks should be located OUTSIDE the Enabled Subsystem, and the output signal of that AND block should be connected to the Enable port of the Enabled Subsystem (it is the port at the top of the subsystem block).
Then, from what you are saying I assume you have a Scope block with two inputs. Put that Scope block INSIDE the Enabled Subsystem, and connect it to two inputs of the Enabled Subsystem. Then, the signals which were going to your Scope block previously, connect the to the two inputs of the Enabled Subsystem.
Sample time of the Digital Clock should be -1 if possible.
Thank you so much for this enthusiasm. I have solved the problem based on your suggestions. Wish all the best to you.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!