File Exchange

image thumbnail

Simscape Simulation Results Explorer

version 1.10.0.1 (15.6 KB) by

Tools for exploring Simscape™ simulation data and zero crossing statistics, created in MATLAB® code

4.85714
8 Ratings

16 Downloads

Updated

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

This submission contains an interactive GUI for navigating and plotting Simscape simulation data. You can navigate the Simscape logging object using a tree browser, and the data is plotted for you automatically. This makes it easier to plot the different physical quantities in your network without using sensors. To use this file, simply pass the Simscape logging object to the function:
>> ssc_explore(simlog)
This submission also contains a function that lists the components that generated zero crossings and indicate locations in the Simscape language code where the zero crossing was generated. To use this file, simply pass the Simscape logging object to the function:
>> ssc_printzcs(simlog)

To learn more about ssc_printzcs, view the comments within the file:
>> help ssc_printzcs

To see how to use Simscape logging, watch this video (3 min):
http://www.mathworks.com/videos/logging-simulation-data-68839.html

To see how zero-crossing statistics can help you speed up your simulations, watch this video (4 min):
http://www.mathworks.com/videos/finding-causes-of-slow-simulations-73445.html

To find other physical modeling examples, search for posts with the keyword "physical modeling"
http://www.mathworks.com/matlabcentral/fileexchange/?term=%22physical+modeling%22

To learn more about MathWorks Physical Modeling Products, go to: http://www.mathworks.com/physical-modeling/

Comments and Ratings (15)

Todd

Todd (view profile)

Hi Atul,
This is a great tool, we use it a lot. I have a feature request: Could there be a feature for generating the MATLAB code needed to create the current plot? We could then use this as a tool for creating plotting scripts for specific test cases, for comparing runs, etc.
Todd

Aditya

Aditya (view profile)

Hello Atul,
Can you document what the latest changes were that you made on Jan 30, 2013?
Thanks,
Aditya

Aditya

Aditya (view profile)

Hi Atul,
I have a suggestion that I think would improve usability a great deal.
When selecting multiple signals to overplot in the same figure, it is very easy to select the name instead of just the "plus" sign when expanding the hierarchy and inadvertently cause the plot to disappear. Then all of the signals have to be selected again.

Thanks,
Aditya

Todd

Todd (view profile)

Atul,
Area is also missing.

Maybe the script could use the default unit if it cannot find the correct custom/SI/US unit.

Todd

Todd (view profile)

Atul,
The unit lists are missing angular and linear acceleration, which simMechanics uses.

Also, with some of my data sets, the axes extend outside the bounds of the figure. Docking and undocking the figure sometimes fixes this.

This is a handy tool for browsing simulation results.

Doug

Doug (view profile)

Line 1171, U.S. units for mass flow should be "lbm/s" rather than "lb/s". This causes an error when trying to switch to U.S. units for a mass flow plot, because the pm_commensurate command does not recognize 'lb' as being commensurate with 'kg' or any other unit of mass.

Great tool, I use it all the time. This should be a part of the SimScape product!

Aditya

Aditya (view profile)

This is really great.
Some ideas for updates:
- Button to create a new plot and select signals available in the tree.
- Ability to extract data from a signal into a workspace variable.

Etienne

Hi there

I have a dataset that would be best inspected via a tree structure. The labels can be broken into something like a tree. I was hoping to use this tool. Is there a way that I can generate a SimScape logging node without actually using Simulink, but creating a node from the data?

Keith

Keith (view profile)

Very useful tool. However, English units are incorrect.

e.g. simscape doesn't have a "lb" or a "F" (temperature) defined unit . Changing lb->lbm and F->R gives me the correct behavior.

Eric D

Eric D (view profile)

can someone give me a more detailed explanation of how to set this tool up? I am not sure what is exactly meant by "To use this file, simply pass the simscape.logging.Node object to the function:
>> ssc_explore(simlog)"

THANKS!

Roni Peer

Roni Peer (view profile)

Wow.
One of the most useful files I've ever found here.
Nice Work!

James

James (view profile)

Nice work!

Will Campbell

Without this tool, I wouldn't be using Simscape logging. The Results Viewer should be incorporated into product releases :).

Atul Suri

Atul Suri (view profile)

Niall,

Thanks for the feedback. I'll keep this in mind for future updates. I provided this functionality in MATLAB Central so that the community can modify and improve the implementation and submit changes back to MATLAB Central for others to use.

The underlying simscape.logging.Node object provides unit conversion functionality so plotting in "human-friendly" units is supported by the underlying object. It is also simple to implement: all you need to do is define a list of "human-friendly" units and then in the localPlot function extract the values in "human-friendly" units if such units exist for the quantity being plotted. Everything else should work just fine.

Thanks,
-Atul

This is a significant improvement to the usability of Simscape, and an encouraging sign that Simscape will continue to develop.

As well as the obvious productivity improvement, this will help modelling accuracy because the ability to browse all of the logged data using the tree encourages critical examination of all of the activity inside the model, rather than just the signals which have signal converters chosen by the user.

I look forward to the ability to define default "human-friendly" units for the various quantities in a future release. Certainly for hydraulics, "m3/s" and "Pa" are difficult for engineers to relate to.

Updates

1.10.0.1

Updated license

1.10

Added links to videos that demonstrate these functions.

1.7

Updated for R2012b including adding support for zero-crossing statistics.

1.5

Updated ssc_explore to include several new capabilities. New enhancements include:
* Multi-selection
* Reload data
* Plot options
** Marker selection
** Time axis linking
** Axis alignment
** Custom units

1.1

updated trademark

MATLAB Release
MATLAB 7.10 (R2010a)
Acknowledgements

Inspired: simparto pump selector beta

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video