WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2007-Nov-29 09:30:03

shaunee
Member
Registered: 2007-Nov-06
Posts: 24

Simulink Library Error

I've been getting this error message when trying to simulate the <ofdm_txrx_mimo> model in Simulink:

Failed to find library 'commchan3' referenced by 'ofdm_txrx_mimo/"Channel"/AWGN Channel'. This library must be on your MATLAB path.

I can't locate such a library to add it to my Matlab path. I am using SVN revision 821. I already successfully simulated this model about a week ago, but can't remember what revision of the model I used. Thanks.

Offline

 

#2 2007-Nov-30 09:37:24

shaunee
Member
Registered: 2007-Nov-06
Posts: 24

Re: Simulink Library Error

Okay, so I found the answer to my question in other posts. I do not have the Comm of Filter blocksets (or any additional blocksets), so I removed all the "Bad Link" blocks from the model that required these libraries. I guess my time-limited trial blocksets that I had when I first successfully simulated the model have expired. But now I get the following error message when trying to simulate:

Error evaluating 'InitFcn' callback of block_diagram 'ofdm_txrx_mimo'. Undefined function or method 'firpm' for input arguments of type 'double'.

I cannot find the function 'firpm'. By default, Matlab/Simulink use the data type 'double'. What should I change this to? I am using the <ofdm_txrx_mimo.mdl> model under \ResearchApps\PHY\MIMO_OFDM, SVN version 821.

Also, how does removing blocks from the Simulink model (that are not necessary for hardware, eg. Comm blocks) affect the conversion into an OPB-compliant periheral core? Thanks.

Offline

 

#3 2007-Dec-11 12:57:31

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Simulink Library Error

The firpm function defines the filter coefficients for the decimation filters inside the channel subsystem. These filters are realized using Simulink blocks; in hardware, the actual filters are implemented in the AGC core. You can safely remove this filters in simulation, and let the input gateways in the OFDM receiver decimate the input samples.

Offline

 

#4 2007-Dec-11 13:42:00

shaunee
Member
Registered: 2007-Nov-06
Posts: 24

Re: Simulink Library Error

Sorry if this question seems trivial, but I had already removed the 4 decimation filters in the Channel subsystem, along with all the other "Bad Link" blocks. My Channel subsystem looks like this:
4 Antenna Inports -> 2 Real-Imag to Complex -> MIMO "Channel" -> 2 Gain -> 2 Integer Delay -> 2 Complex to Real-Imag -> 4 Ant Outports
I still get the same error message when I try to compile. Thanks for your help.

Offline

 

#5 2007-Dec-11 14:00:39

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Simulink Library Error

The firpm function is called in the init script (ofdm_tx_mimo_init.m) on line 179. It's safe to comment this out (I don't think we use the variable 'lpf_h' anywhere in the current version).

Offline

 

#6 2007-Dec-13 13:49:26

shaunee
Member
Registered: 2007-Nov-06
Posts: 24

Re: Simulink Library Error

So I commented out line 179, recompiled, and Simulink gave the same error messages for the "rcosfir" and "interp" functions. I commented these lines out as well (lines 181,183 for rcosfir; 233,234 for interp), and get this error:

Error in 'ofdm_txrx_mimo/OFDM Tx MIMO/Filter & DACs/Polyphase Interpolator': Parameter 'interpFilter_4' cannot be evaluated.  MATLAB error message: Undefined function or variable 'interpFilter_4'.

Since the 'interpFilter_4' variable is derived using the "interp" fcn (line 234), and I commented this line out, of course this error will occur. So how do I compile the model w/o any additional blocksets? Thanks.

Offline

 

#7 2007-Dec-13 14:12:37

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Simulink Library Error

Here's the vector of values for interpFilter_4:

Code:

 interpFilter_4 = [1.060263e-013 -4.559319e-003 -6.777514e-003 -5.177760e-003 -1.989520e-013 2.578440e-002 3.945777e-002 3.118661e-002 -6.612488e-013 -8.770110e-002 -1.426581e-001 -1.220465e-001 2.824407e-013 2.910058e-001 6.098364e-001 8.713054e-001 1.000000e+000 8.713054e-001 6.098364e-001 2.910058e-001 2.824407e-013 -1.220465e-001 -1.426581e-001 -8.770110e-002 -6.612488e-013 3.118661e-002 3.945777e-002 2.578440e-002 -1.989520e-013 -5.177760e-003 -6.777514e-003 -4.559319e-003 1.060263e-013];

Offline

 

#8 2008-Jan-02 13:54:36

shaunee
Member
Registered: 2007-Nov-06
Posts: 24

Re: Simulink Library Error

Happy New Year!
Is it possible for you to put up a Reference Design that does NOT require any additional Matlab or Simulink toolboxes/blocksets? I did manage to compile the above model into an OPB core, but when trying to repeat it for the <ofdm_TxRx_mimo> model under the Ref. Design v4 (instead of Research Apps), I get similar error messages for different functions. I noticed that the 2 models are slightly different and so are the <ofdm_tx_mimo_init.m> files (eg. "randint" fcn is used in Ref. Design but not in Research Apps). Instead of replying about every little fcn/block that needs an additional toolbox/blockset, can you please provide a Ref. Design that doesn't require them? Thanks.

Offline

 

Board footer