File Exchange

image thumbnail

HOSA - Higher Order Spectral Analysis Toolbox

version 1.0 (2.92 MB) by

Spectral and polyspectral analysis, and time-frequency distributions.

3.71429
85 Ratings

136 Downloads

Updated

No License

There is much more information in a stochastic non-Gaussian or deterministic signal than is conveyed by its autocorrelation and power
spectrum. Higher-order spectra which are defined in terms of the higher-order moments or cumulants of a signal, contain this additional information. The Higher-Order Spectral Analysis (HOSA) Toolbox provides comprehensive higher-order spectral analysis capabilities for signal processing applications. The toolbox is an excellent resource for the advanced researcher and the practicing engineer, as well as the novice
student who wants to learn about concepts and algorithms in statistical signal processing.

The HOSA Toolbox is a collection of M-files that implement a variety of advanced signal processing algorithms for the estimation of cross- and auto-cumulants (including correlations), spectra and olyspectra,bispectrum, and bicoherence, and omputation of time-frequency
distributions. Based on these, algorithms for parametric and non-parametric blind system identification, time-delay estimation, harmonic retrieval, phase-coupling, direction of arrival estimation, parameter estimation of Volterra (non-linear) models, and adaptive linear prediction are implemented. Also included are algorithms for testing of Gaussianity and Linearity of a time series. A full tutorial and demo set are included in the toolbox.

Comments and Ratings (135)

li wang

ABB

ABB (view profile)

save/ rename file 'HOSAVER.M' as hosaver.m and do for all of the files. Furthermore, make minor corrections to avoid warnings and increase the speed.

obaldia

Could you generate a .tar for people who do not use windows?

Seonghun Park

Thank you all, finally it works.

Josh

Josh (view profile)

Common installation issues with HOSA Toolbox

Issue 1: All .m files are uppercase
Solution: Rename .m files to lowercase. See Stefano Tronci's post (25 Jul 2015) if using Linux.

Issue 2: HOSA Demo does not work
Solution: See Part d) of Stefano Tronci's post (25 Jul 2015) and Alexander Kalweit post (14 Mar 2016)

Issue 3: Every time MATLAB is launched, the following error appears:

"Warning: [...]\hosa\hosa\info.xml did not validate.
The schema [Ljava.lang.Object;@1f474720 shows the following errors:"

Solution: Open info.xml; On Line 5, change <area> to <type>, and </area> to </type>.

transform yi

after setup,I tried the command below,and an error occured.
>> hosaver
Cannot find an exact (case-sensitive) match for 'HOSAVER.m'

The closest match is E:\Program
Files\MATLAB\R2014a\toolbox\hosa\hosa\HOSAVER.M

To change the file extension, cd to the file's folder, type:
   movefile HOSAVER.M HOSAVER.m_bad; movefile HOSAVER.m_bad
   HOSAVER.m and then cd back.

and everytime I reluanch matlab2014a ,it rise up:
Warning: File e:\program
files\matlab\r2014a\toolbox\hosa\hosa\info.xml did not validate.
The schema [Ljava.lang.Object;@1f474720 shows the following errors:

org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 7;
cvc-complex-type.2.4.a: Invalid content was found starting with
element 'area'. One of '{MathWorksID, type}' is expected.

Often, errors result from incorrect ordering of XML tags. Correct
the error by updating the info.xml file contents to follow the
guidelines in the MATLAB help documentation.

Is anyone can help me ?thanks very much!!!

transform yi

Is anyone can help me ?thanks!!!

tanglj22

the readme tells me to 'Download the SETUP.EXE file to your machine.' Where should I find thie SETUP.EXE file ?

Devyani

how to calculate zero squared bicoherence using the file bicoher.m?

Tien Kai Ming

good

Genevieve

For those saying they ca'nt run it because filenames are uppercase: it is very easy to run a simple shell command like find to change filenames to lowercase.
e.g.:
find my_root_dir -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

Xiaohui Tao

Warning: File d:\program files\matlab\r2012a\toolbox\hosa\hosa\info.xml did not validate. The schema [Ljava.lang.Object;@4e69048b
shows the following errors:

org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'area'. One of '{MathWorksID,
type}' is expected.

Often, errors result from incorrect ordering of XML tags. Correct the error by updating the info.xml file contents to follow the
guidelines in the MATLAB help documentation.

can this toolbox work on Matlab 2014a
I have this error message
Warning: File c:\users\michael\documents\matlab\hosa\info.xml did not validate. The schema [Ljava.lang.Object;@9d3e0b1
shows the following errors:

org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 7; cvc-complex-type.2.4.a: Invalid content was found starting
with element 'area'. One of '{MathWorksID, type}' is expected.

Feng Li

Hi ..thx for this great toolbox...I also had some problems getting "hosademo" to run (but solved it):
for the choice.m-file problem:
get wafo from here:

http://www.maths.lth.se/matstat/wafo/download/index.html

copy the "choices.m" from
"yourFolder\wafo-.1.1\misc" to the hosademo-folder

if you start hosademo now you might get an error-message
to get rid of it change:

CHOICEHANDLES(matchn) = figure('Position',rect,'number','off', ...
       'name','','resize','off','colormap',[],...
       'Menubar','none','visible','off');

to:

CHOICEHANDLES(matchn) = figure('Position',rect,'NumberTitle','off', ...
       'name','','resize','off','colormap',[],...
       'Menubar','none','visible','off');

so "NumberTitle" instead of "number"
it´s in line 162 of choice.m

Hi. I think I got this running (I need some further test) on Matlab R2014a. Just unpack, rename all the files to lowercase and download choices.m. If you have Linux it is quite straightforward:

a) Unpack the hosa_d.exe file (I used virtualbox for that but probably also wine can do it. I bet that also tar or other utilities can do it somewhat...).

b) Follow the instructions in the README.TXT file to add the unpacked folder to the paths. The only difference is that the "Set Path" button is under the HOME tab in the current Matlab versions.

c) Open a command prompt on your Linux (probably works also with Mac) box and cd to the unpacked folder. Enter the hosa subfolder and issue this to convert all the filenames from Upper case to Lower case:

for f in * ; do mv -v $f `echo $f | tr '[A-Z]' '[a-z]'`; done

Do the same in the hosademo folder.

d) Go to http://www.maths.lth.se/matstat/wafo/documentation/wafodoc/wafo/misc/choices.html, copy and paste the source code of choices.m in a empty file. Save this file in hosademo as choices.m. You need to get rid of the line numbers:

sed 's/^.\{4\}//g' choices.m >> temp

This will save a file called temp. Open it, remove the last survived number at the bottom (206) and save it as choice.m, overwriting the old one.

This should do the trick, hope it helps.

luo yisheng

Siddharth

I want help to download and use this toolbox...
Someone please help..
Thank you..!

yue

yue (view profile)

rate

Khujasta

unable to install HOSA on MATLAB2012b..
can anybody help..i have followed all the steps in the read me text..but to no avail

Tiffany

Anybody else having issues getting the 'Hosa Demo' to work? It tells me
'Undefined function 'choices' for input arguments of type 'char'. Granted, I can go into the folder and open any demo I need, but I'm not really sure what they all are.

Second question (and maybe I just need to read on this), but how does the window work? From the demo, it seemed he chose an arbitrary size? I'm looking to calculate the bi-spectrum. I'm used to making my own hanning window when I do a regular FFT; this appears to be different.

yangyang

zhongguo

very good

Damon Bradley

Also, to remove the annoyance of inexact case matches when you use the any of the HOSA functions, I'd recommend putting this line of code at the top of your script:

warning('off','MATLAB:dispatcher:InexactCaseMatch').

For some strange reason, all of the HOSA function file names are written in all caps.

Convert from upper to lower all files in both folder using this script:

files = dir;
for i = 3:length(files)
    system(['REN ',lower(files(i).name),' ',lower(files(i).name)]);
end

Wolfgang

Hi,

i have tried as described in the readme.txt. Unfortunately all file names and extentions are in uppercase after extracting !

Because of that no chance to use anything (like hosaver or hosademo).

Please advice what to do.

Russell

I have the HOSA pack working, but I run out of memory with the WIG2C function when using a array of 2500 rows and 1 column. Can the function not handle a array like this?

MIAO DU

Hi,all, I tried to use the function bispecd.m on my data, but it always shows
??? Subscript indices must either be real positive integers or logicals.

Error in ==> BISPECD at 123
        xseg = y(locseg);
 
How can I fix this problem?
Thanks.

Hi All,

I can't seem to get the toolbox installed having followed the text file to the T. I am using MATLAB Student Version 7.12.0.635 (R2011a) with an additional wavelet toolbox. Any ideas? Does it even work for a student licence?

Cheers!

Jered Wells

For those who get an error due to the info.xml file: to fix the error in hosa\info.xlm, the line containing <area>matlab</area> should be changed to <type>matlab</type>. Now, to try HOSA...

It is good and helpful.

The installation seems to have worked incompletely. I get the following error:
>> HOSADEMO
??? Undefined function or method 'choices' for input arguments of type 'char'.
Error in ==> HOSADEMO at 68
choices('HoSatDemo', 'HOSA Demo', labels, callbacks, interruptible);
My Matlab cannot find the command/function "choices".
I have MATLAB Version 7.8.0.347 (R2009a)
Signal Processing Toolbox Version 6.11 (R2009a)
Can you please help me solve this?
Thanks
please tell me how to use these toolboxes.please reply on my email tanjii023@yahoo.com

Evan

Evan (view profile)

For those in need of choices.m

http://www.maths.lth.se/matstat/wafo/documentation/wafodoc/wafo/misc/choices.html

has the source code.

Create a new .m, paste in code, delete all code line numbers :)

henry gorx

sorry, I was wrong. The comment was for other function (MATS).

henry gorx

Hi, I tested the function Bicorrelation(xV,tauV,flag), how I must to interpret the results? for example, bicV=-0.18738 and cumbicV=0.70683. Many thanks for your help.

leo

leo (view profile)

it is grateful

wu

wu (view profile)

File "choices.m" is lost. Is the problem of version of matlab, and mine is 7.1?

wu

wu (view profile)

great tool of researchers whose major is signal processing

andrea ruju

Why the window specification for frequency-domain smoothing is differetn in bispectrum and bicoherence estimation?

Hi, i'm a phd student in coastal oceanography. My e-mail is matumaloa@gmail.com

Help: why the bispectrum of the gaussian noise does not equal zero in HOSA
Hi :
    I am a student from Wuhan, China. I have download the toolbox of HOSA. Thank you very much of your job. BUt I have met a problem in compute the bispectrum of the gaussian noise, because the result of it does not equal to zero. I can not find the solution of it. can you help me? and thanks.
   The signal of gaussian noise is given by the commad 'rand'.
my e_mail: xhdu1981@yahoo.com.cn

Sayan

Sayan (view profile)

having errors please help
>> hosademo
??? Undefined function or method 'choices' for input arguments of type 'char'.

Error in ==> HOSADEMO at 68
choices('HoSatDemo', 'HOSA Demo', labels, callbacks, interruptible);

wang ?

wang ? (view profile)

thank you

Rafael J.

Great toolbox, but there are clearly some typos and errors. Capitalized filenames causes warnings (or the fact that they don't match the functions calls with respective to caps).

Also, why does bicoherx and bispecdx have three inputs when most people only have two inputs for a cross-bicoherence or cross-bispectrum analysis? Anyone figure this issue out? Which two inputs should we use? (eg x-x-y, x-y-x, etc)

Salai Selvam V

Salai Selvam V (view profile)

Excellent!!!

Ali Ali

Thanks alot. fantastic tool

The installation seems to have worked incompletely. I get the following error:
>> HOSADEMO
??? Undefined function or method 'choices' for input arguments of type 'char'.
Error in ==> HOSADEMO
choices('HoSatDemo', 'HOSA Demo', labels, callbacks, interruptible);
My Matlab cannot find the command/function "choices".
Can you please help me solve this?
Thanks.
please send reply to my e-mail

Rae

Rae (view profile)

Is there a simple way to edit bicoher to normalize it such that it's giving the bounded (0-1) version rather than the current skewness version?

I can't access the Kim and Powers paper and if others have sucessfully done this, I'd love to know how!

Paul

Paul (view profile)

The installation seems to have worked incompletely. I get the following error:
>> HOSADEMO
??? Undefined function or method 'choices' for input arguments of type 'char'.
Error in ==> HOSADEMO at 68
choices('HoSatDemo', 'HOSA Demo', labels, callbacks, interruptible);
My Matlab cannot find the command/function "choices".
I have MATLAB Version 7.8.0.347 (R2009a)
Signal Processing Toolbox Version 6.11 (R2009a)
Can you please help me solve this?
Thanks,
Paul Axon, Sydney, Australia
paul.axon@thalesgroup.com.au

David Gagnon

I meant to submit this post first...
(Both posts refer to BICOHER.m)

Beware that there are multiple ways to normalize the bispectrum, and they are all referred to as the "bicoherence." The formula that this m-file uses is NOT the one that bounds the bicoherence between 0 and 1. If you are looking for that one, check out Kim and Powers' 1979 paper "Digital Bispectral Analysis and Its Applications to Nonlinear Wave Interactions." They provide an explanation of how to code that version, and it has worked reasonably well for me.

David Gagnon

By the way, "segsamp" (actually implemented as "nsamp") is the number of samples per segment, that is, the number of points in each chunk of data that you're throwing into the bicoherence. You can use datasets of any length, and the program will typically calculate fft's with a length that is a power of two and is greater than or equal to "segsamp." It does this by adding zeros to the data record. However, you can specify "nfft" to tell the program how many points you want the fft to use. If you set "segsamp" and "nfft" to be equal, then you can avoid zero-padding. Powers of two are calculated faster, but MATLAB can handle fft's of any length.

As for the frequency axis, "waxis" is based on the number of points that are used in the fft. As a result, "0.5" on the axis corresponds to the highest frequency that can be resolved with that number of points, also known as the Nyquist frequency. Exactly how you want to scale the axis will depend on the nature of your data.

On an unrelated note, the demo gives me errors, too.

Rakesh

Rakesh (view profile)

I have tried WIG2.m function on a times series on 28800 samples (288 sec signal sampled at 100Hz) but function doesnt seem to handle this big signal. However, I have also tried it on chunks of this signal but it takes forever to complete. Is it my computer or the program itself? any help?

But, however, lowercase filenames would be a great improvement.

This toolbox is greatly appreciated. Is this still developed/maintained?

Edwin Wu

Does anybody have the experience to use TDE.M? I encounter some problem when I use it as a way to estimate the time delay of 2 channels of signal. I would be so appreciated for your helps.My msn is wjr0529@gmail.com,it is also my E-mail.I would like to make friends with anyone of you.join me , share our knowledge and be brilliant together.

Bessie Bao

EEG

elahe alavi

Yue ZHOU

To identify whether one time serial is norm-distribution

Femi Osunnuyi

I've had some problems using the 'bicoher' function. With most industrial data sets, i obtain bicoherence values greater than 1, which in theory is not meant to be possible.
Any ideas?
Also is 'segasamp' meant to be square root of no. of data set (which must be even powers of 2 [4,16,64,256,1024], right?)?
  

Alex Yakubovich

Does anybody what the frequency units are in BICOHER and BISPECD? Some of the examples in the tutorial suggest it is in Hz, but that doesn't make sense given the plot I get with my signal.

Guy Incognito

jason yun

Kacimi Abderrahmane

Vinayak swarnkar

I downloaded it..but facing problem in running it. Even 'hosademo.m' dosent work...it gives error saying 'Undefined function or method 'choices' for input arguments of type 'char'.'. Can some please help in this.
Thanks you

as as

bahman abc

thx!

Alhade Mohamed

hi

guang yang

it's good

Morteza Dardel

I want some more description about “nlpow” command (estimation with volterra serises). If this command can be used for more than one input and output cases?

navya showry

I have downloaded this file, but .exe file is missing from the extracted one.. plz advice how to proceed further or email me the latest updated one.

Ali Ozgur Argunsah

hi,
?s there any linux matlab version of this toolbox?

ahmed badawy

pls I hope to make good relation in working
in HOSA and Signal Separation Using HOSA

yhaofly yhaofly

your work is execellent,thank you very much,
I will support you for ever.

song jianjiang

good article

Chang David

I want to know if the software is only compliant with Matlab 6.0(R12 version)

Florencio Calle

Vishnuvenkatesh Dhage

liu xiangle

the help system is not covinent.

Frederico Melo

Scott Miller

How do you open this thing? I have tried to extract it and nothing happens. It seems corrupted.

to reply take out chinese food

M Nage

not see yet

ali dashti

needed box

Mohsen Afrasiabi

Sivaganesh Mullapudi

Jon Hobbs

Great Box

meng yusong

Ghassan Maalouli

Excellent toolbox. Very good documentation.
Brilliant author.

Jon-Fredrik Hopperstad

Excellent toolbox with very good documentation.

essam anwer

i can not run this toolbox how can download and who can help me

xu guisen

how to download? who teach me!

Neil L Scott

Demo fails.
Crashes with GUI callback issues.
Uppercase file names???

Bruce Lena

great tools for me

xunkai wei

great

xjtuljp Lin

chen xushuang

very good

ZHONGCHAO HUANG

It is really good and very helpful to me

Marcin J...

I would be thankfull if you can send me more informations about high order moments. Thank for help.

farzaneh shayegh

hawk wei

Anyway but can you share it ?
It's really great

Chuanshuang Hu

It looks great. I need HOSA. Also, could you tell me whether it is possible to compute Auto-and cross-spectra or not using HOSA?

Wei Zhang

why this toolbox is not concluded in Matlab 7 ?

Nej Nej

Kindly send me a HOSA tool box for study purpose

Kim Gunnium

I need HOSA for learning.

Kianoush Nazarpour

Jim Green

I need much higher order spectral analysis toolbox

sina niki

Dear Sir,
Problem:
 We want simulate by matlab "Passive Radar localization by time difference of arrival esimator".
For this purpose we have two site on the ground and we want by two widwband receivers estimate two same received pulse at separate station.
could you help me to send m.files for this purpose.
thanks your helps.
Regards.

Feng Changjian

I have like this toolbox because it can help me to complete my school work.

abdelali belabassi

i'm etudiant ,i need it to complet my thesis , thanks

Jianwen Luo

Marcus Kruger

xnkj xnkj

hao dong dong

zheng qing

wang shenghui

ok

Dr. Abdul-Bary Sulaiman

A very useful toolbox, but i\I surprised that it is only found in V5.3 Matlab and has been cancelled in the uper versions !!!

Camilo Londoño

Nice work!!!!

Brian Powell

Excellent toolbox. The only negative is that it is distributed as an EXE. If you distribute as a tar, it should work everywhere. After unpacking on a borrowed windows box, I use it on Solaris and MacOSX.

Norbert Marwan

Why this toolbox is not provided as a zip-package or Matlab-installation file (eg. created with Makeinstall). Moreover, all filenames are upperletter. The exe-package as well as the upperletter filenames make it hard for a Unix user to use this toolbox.

Jaime Aviles

qiang xueming

excellent

Dale Clifford

This IS a matlab toolbox and installs the same even as far as the icon in the view window of Matlab. Previously not available as a student edition, but now free.This toolbox provides much information on signals, especially if the researcher is looking for non-linear dynamics. Works well when used along the side of wavelets.

w w

very good

Moh Al-jebori

Mokrane Malek

dylan mckay

extra ll

Ma Yongfeng

It is good and helpful.

x yg

guojun yang

Usama Zaher

Excellent application

If there are more examples it would be nice.Especially if it is concerned with some application of sensor validation

D. Gansawat

Dr. Cornelis Los

This the best non-wavelet, higher-order time-frequency analysis of time series and the only one freely available. Use it closely together with the excellent book for the best results and for easy and accurate interpretation.

George Barakos

Pity it is not part of the main MatLab release!

- -

Is this the same as TMW's HOSA Toolbox?

John Brown

MATLAB Release
MATLAB 6.5 (R13)
Acknowledgements

Inspired: Fast Third Order Cross-Cumulant calculation

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

» Watch video