Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

simulink spectrum scope export data to workspace

231 views
Skip to first unread message

bene

unread,
Mar 30, 2012, 10:28:35 AM3/30/12
to
Hey,

I would like to further process some data from Simulink in Matlab. Is there a way to export the data from a spectrum scope in Simulink into Matlab, like with the To-Workspace-Block for time-domain data?

Phil Goddard

unread,
Mar 31, 2012, 12:00:39 PM3/31/12
to
Is there a reason you can't use the To Workspace block?

You may want to
1. disable the library link to the Specrum Scope block in your model -- right click on the block and look under Link Options to see how to do this.
2. Look Under the Mask of the block -- right click on the block to see how to do this.
3. Connect the To WorkSpace block in parallel with the last block in here.
4. Set the To Workspace block to save a Structure With Time.

Phil.

John

unread,
Apr 18, 2012, 2:36:09 PM4/18/12
to
"Phil Goddard" <ph...@goddardconsulting.ca> wrote in message <jl79n7$7uh$1...@newscl01ah.mathworks.com>...
I too am interested in extracting the Simulink Spectrum Scope data.

I am modelling a signal path where the signal source (data.mat file) is loaded in the workspace using the "From Workspace" source block. Using the Spectrum Scope block to view the spectrum of this data, I see the expected spectrum, with the noise floor some 130 dB down. Connecting the "From Workspace" block directly to a "To Workspace" block in the Simulink model, I am able to export the data (through Simulink). Post processing the output data in Matlab, the resulting spectrum is as expected (with the noise floor some 130 dB down).

Expanding my Simulink model by inserting a filter (plus some other blocks) in the signal path, I use the Spectrum Scope to examine the resulting spectrum along the signal path and it is as expected. However, using the "To Workspace" block to probe the nodes between my blocks in the signal path and post processing in Matlab, the resulting spectrum is different from that observed by the Spectrum Scope with the noise floor of the Matlab produced spectrum severely degraded (by some 70 dB). I suspect that I am not controlling the time step correctly when sampling the data using the "To Workspace" block. I am using "Sample time (-1 for inherited)", but there must be some subtlety about the timestep control that I am missing.

Being able to extract the Scope and the Spectrum Scope data would help debug my problem.

The version of Matlab is R2007b.

John.
0 new messages