Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

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!
 

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?
 

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. ?

**broken link removed**
Spectrum Estimation
 
Last edited:
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.
 

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:
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 : **broken link removed**

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 ?
 

Last edited:
  • Like
Reactions: best_77

    V

    Points: 2
    Helpful Answer Positive Rating

    best_77

    Points: 2
    Helpful Answer Positive Rating
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.
 

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top