DSPRelated.com
Forums

Display output in Simulink OFDM demo

Started by vcteo November 8, 2005
I am currently doing a simulation of OFDM in Simulink to be later
used in a TI DSP.

There are a few demos in Simulink which involves OFDM which i play
around to familiarise with the blocks before i build my own model.

There is one demo in Simulink called [b]HiperLan2[/b] which involves
OFDM. What i'm trying to do now is to display the output after every
block with a display block to observe how does the bits get
manipulated and changed.

However in the model, the Bernoulli Binary Generator generates an
output of 144x1 and after coding it becomes 288x1. Thus it is not
possible to observe these values with the display block.

I have tried using the To Workspace block to send the data to Matlab
workspace. However, the variable apprearing instead of having a value
of 144x1 or 288x1, its value is displayed as <1x1 structure>.

What should i do?

This is the model from Simulink demo
http://img439.imageshack.us/img439/9255/image001sl5dm.th.png
(The image in the link might be quite small, try saving the picture
into your PC and then open it)


double click on the "To Workspace" block. Then change the "Save Format"
option from Structure (default) to Array.

Otherwise, your data is already in the structure. So you can access it by
doing something like struct_name.signal_name.time
i.e. you add dots and step down the structure hierarchy. To find out the
structure hierarchy, you can just type the struct name at the Matlab prompt
and it will tell you what the fields inside are.

I usually just change the save format to Array. Makes life easier.

Nandan

On 11/8/05, vcteo <vcteo@vcte...> wrote:
>
> I am currently doing a simulation of OFDM in Simulink to be later
> used in a TI DSP.
>
> There are a few demos in Simulink which involves OFDM which i play
> around to familiarise with the blocks before i build my own model.
>
> There is one demo in Simulink called [b]HiperLan2[/b] which involves
> OFDM. What i'm trying to do now is to display the output after every
> block with a display block to observe how does the bits get
> manipulated and changed.
>
> However in the model, the Bernoulli Binary Generator generates an
> output of 144x1 and after coding it becomes 288x1. Thus it is not
> possible to observe these values with the display block.
>
> I have tried using the To Workspace block to send the data to Matlab
> workspace. However, the variable apprearing instead of having a value
> of 144x1 or 288x1, its value is displayed as <1x1 structure>.
>
> What should i do?
>
> This is the model from Simulink demo
> http://img439.imageshack.us/img439/9255/image001sl5dm.th.png
> (The image in the link might be quite small, try saving the picture
> into your PC and then open it)


Yep, i've just discovered that. But heres another problem, for instance the Bernoulli Binary Generator. It outputs bits in frames of 144x1 then after the convo block 288x1. The problem is when i run the simulation and use the To Workspace block, the size of the array generated becomes multiples of 144 for eg 47524x33 and for the array generated from the convo block 9504(8x33. I suppose its because the simulation has ran 33 steps and instead of updating the array, the output for every step is concatenated in the array.

How do i make sure the arrays produced are 144x1 and 288x1? Or how do i configure the simulation to run only 1 step? Nandan Das <nandan@nand...> wrote: double click on the "To Workspace" block. Then change the "Save Format"
option from Structure (default) to Array.

Otherwise, your data is already in the structure. So you can access it by
doing something like struct_name.signal_name.time
i.e. you add dots and step down the structure hierarchy. To find out the
structure hierarchy, you can just type the struct name at the Matlab prompt
and it will tell you what the fields inside are.

I usually just change the save format to Array. Makes life easier.

Nandan

On 11/8/05, vcteo <vcteo@vcte...> wrote:
>
> I am currently doing a simulation of OFDM in Simulink to be later
> used in a TI DSP.
>
> There are a few demos in Simulink which involves OFDM which i play
> around to familiarise with the blocks before i build my own model.
>
> There is one demo in Simulink called [b]HiperLan2[/b] which involves
> OFDM. What i'm trying to do now is to display the output after every
> block with a display block to observe how does the bits get
> manipulated and changed.
>
> However in the model, the Bernoulli Binary Generator generates an
> output of 144x1 and after coding it becomes 288x1. Thus it is not
> possible to observe these values with the display block.
>
> I have tried using the To Workspace block to send the data to Matlab
> workspace. However, the variable apprearing instead of having a value
> of 144x1 or 288x1, its value is displayed as <1x1 structure>.
>
> What should i do?
>
> This is the model from Simulink demo
> http://img439.imageshack.us/img439/9255/image001sl5dm.th.png
> (The image in the link might be quite small, try saving the picture
> into your PC and then open it)