Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

How to use Line spectral pairs in matlab?

Status
Not open for further replies.

best_77

Newbie level 4
Joined
Apr 21, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
Hi all
I am a new in matlab. I need to use line spectral pairs for my sensor signals. So, is there anyone who knows how to use it in matlab?
Any help appreciated. Thanks beforehand!
 

best_77

Newbie level 4
Joined
Apr 21, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
Hi sorry for not giving more details. Here are for you.
I am doing some research which is related signals. So I am using Accelerometer sensor and I was going to extract features from raw sensor data. So, I have been told that LSP is one of the good method for extracting good features from raw sensor data. That is way I was looking
some matlab code for this purpose. So could you help to me please?
 

pancho_hideboo

Advanced Member level 5
Joined
Oct 21, 2006
Messages
2,856
Helped
765
Reputation
1,530
Reaction score
718
Trophy points
1,393
Location
Real Homeless
Activity points
17,450
Your descriptions can not be helpful for understanding what you want to do at all.
First of all, do you understand what you want to do and what you should do mathematically ?

So, I have been told that LSP is one of the good method for extracting good features from raw sensor data.
Describe mathematically what you want to do.

Do you mean two tones extraction from noisy data by some spectrum estimation algorithm such as MEM, MUSIC, etc. ?

Spectral estimation - MATLAB
Spectrum Estimation
 
Last edited:

best_77

Newbie level 4
Joined
Apr 21, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
Hi, sorry for been a late with my description.
My project is not related to sound or speech. I am doing my research in human activity recognition area. So, accelerometer is used for analyzing human activities such as walking, jogging and standing. As we know, that all sensor data when it is as a raw format, it has a noise and it needs to be reprocessed before using. According to this purpose, I was looking some code for extracting good features from the raw sensor data. So, LSP is one of the good candidate for this purpose. However, i couldn't find any code for that.
I hope you can understand me. Thanks in advance for your next post.
 

pancho_hideboo

Advanced Member level 5
Joined
Oct 21, 2006
Messages
2,856
Helped
765
Reputation
1,530
Reaction score
718
Trophy points
1,393
Location
Real Homeless
Activity points
17,450
My project is not related to sound or speech.
I am doing my research in human activity recognition area.
There is no remarkable difference regarding signal processing even for your project.

I think simply you can't understand what you want to do mathematically.

Describe mathematically what you want to do.
 
Last edited:

best_77

Newbie level 4
Joined
Apr 21, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
Hi yes you are right, I can't understand it mathematically. According to this, I am asking a help from someone who knows it. I tried to find some files about LSP and I found only one paper and this paper also related to speech recognition. The code is shown in below:
function lsp=lpc_lsp(a)
p=length(a); A(1)=1; B(1)=1;
for k=2:p
A(k)=(a(k) - a(p+2-k)) + A(k-1);
B(k)=(a(k) + a(p+2-k)) - B(k-1);
end
r1=roots(A);
r2=roots(B);
for k=1:p-1
if (real(r1(k)) < 0)
theta1(k)=pi-abs(atan(imag(r1(k))/real(r1(k))));
else
theta1(k)=abs(atan(imag(r1(k))/real(r1(k))));
end
if (real(r2(k)) < 0)
theta2(k)=pi-abs(atan(imag(r2(k))/real(r2(k))));
else
theta2(k)=abs(atan(imag(r2(k))/real(r2(k))));
end
end
p=p-1;
for k=1:p/2
theta(k)=theta1(k*2);
theta(k+ round(p/2))=theta2(k*2);
end
lsp=sort(theta); %Sort into ascending order

This code was took from the following link : ScienceDirect - Signal Processing : Line spectral pairs

or it is shown the book which is named "Applied Speech and Audio Processing: With MATLAB Examples", 106-112 pages.
So, could you help to me to use this code or to explain it for me, please ?
 

pancho_hideboo

Advanced Member level 5
Joined
Oct 21, 2006
Messages
2,856
Helped
765
Reputation
1,530
Reaction score
718
Trophy points
1,393
Location
Real Homeless
Activity points
17,450
Last edited:
  • Like
Reactions: best_77

    V

    points: 2
    Helpful Answer Positive Rating

    best_77

    points: 2
    Helpful Answer Positive Rating

best_77

Newbie level 4
Joined
Apr 21, 2011
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
Thanks for your help.
However, i have a question about the input argument 'a'? I have used my raw sensor data as a input 'a' argument. I think i have done mistake in that case. So, could you tell me whether i have done right or not ?
Thanks in advance.
 

pancho_hideboo

Advanced Member level 5
Joined
Oct 21, 2006
Messages
2,856
Helped
765
Reputation
1,530
Reaction score
718
Trophy points
1,393
Location
Real Homeless
Activity points
17,450
I have used my raw sensor data as a input 'a' argument.
I think i have done mistake in that case.
So, could you tell me whether i have done right or not ?
"a" is a vector composed from data sequence.
 
Last edited:
Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top