How Do I Process AR and Speech Signals in MATLAB?

In summary, to generate 25000 samples according to an order 40 AR model, you can use the Matlab command "filter" with the appropriate polynomials and a vector of unitary variance noise. To find the "true" autocorrelation matrix, the command "xcorr" can be used. And to write the Yule-Walker equations, the command "ar2rc" can be used with the model coefficients and maximum lag specified.
  • #1
ahmedxx
1
0
matlab help!

I have a task :

Two different signals will be used as input signal u . The first one is an AR model generated
signal. The second one is a speech signal recorded with 16bits/sample at 8kHz sampling rate. The name of the speech file is speech.mat

**Generating an order 40 AR signal:

i. Generate randomly the poles of the model and find the coefficients of polynomial from the
roots (Matlab function poly).>> (I have done this)

ii. Generate 25000 samples according to this model (unitary variance driving noise).

iii. Find the “true” autocorrelation matrix starting from the coefficients of the model. Let us
write the Yule-Walker equations having the values of autocorrelation function as
unknowns.


Can anybody help me and which command I can use?
 
Physics news on Phys.org
  • #2
To generate 25000 samples according to this model, you can use the Matlab command "filter". The syntax is:y = filter(B,A,u)where B is the numerator polynomial of your filter and A is the denominator polynomial. u is a vector of noise with unitary variance. To find the “true” autocorrelation matrix, you can use the Matlab command "xcorr". The syntax is: [R, lags] = xcorr(x, maxlag) where x is the vector containing the AR model generated signal and maxlag is the maximum lag for which you want to compute the autocorrelation. Finally, to write the Yule-Walker equations, you can use the Matlab command "ar2rc". The syntax is: [rc, lag] = ar2rc(arcoef, maxlag) where arcoef is the vector containing the coefficients of the model and maxlag is the maximum lag for which you want to compute the autocorrelation.
 
  • #3


Sure, I would be happy to help you with your MATLAB signal processing task. To generate an AR model signal, you can use the "ar" function in MATLAB. This function takes in the coefficients of the polynomial and the noise variance as inputs and generates the desired signal. For example, if your coefficients are stored in a vector called "a" and the noise variance is stored in a variable called "var", the command would be:

u = ar(a, var, 25000);

To find the true autocorrelation matrix, you can use the "xcorr" function which calculates the cross-correlation between two signals. In this case, you can use it to calculate the autocorrelation of the signal "u" that you generated and compare it with the autocorrelation function that you obtained from the Yule-Walker equations.

I hope this helps. Best of luck with your task!
 

Related to How Do I Process AR and Speech Signals in MATLAB?

1. What is MATLAB Signal Processing?

MATLAB Signal Processing is a tool used for analyzing, processing, and visualizing signals or data. It is a powerful software that allows scientists and engineers to perform various signal processing tasks such as filtering, spectral analysis, and time-frequency analysis.

2. How can I use MATLAB for Signal Processing?

To use MATLAB for Signal Processing, you need to have a basic understanding of the software and its functions. You can start by learning the basics of MATLAB, such as creating variables, writing scripts, and using built-in functions. Then, you can explore the Signal Processing Toolbox, which contains functions and tools specifically designed for signal processing.

3. What are some common signal processing tasks that can be performed using MATLAB?

Some common signal processing tasks that can be performed using MATLAB include filtering, spectral analysis, time-frequency analysis, signal generation, and feature extraction. MATLAB also has tools for signal visualization and data analysis, making it a versatile tool for signal processing tasks.

4. Can I use MATLAB for real-time signal processing?

Yes, you can use MATLAB for real-time signal processing. MATLAB has a Real-Time Workshop feature that allows you to generate code from your MATLAB algorithms and run them on hardware in real-time. This feature is useful for applications that require fast and accurate signal processing, such as in digital signal processing systems.

5. Are there any resources available for learning MATLAB Signal Processing?

Yes, there are many resources available for learning MATLAB Signal Processing. The MathWorks website offers tutorials, documentation, and examples for using the Signal Processing Toolbox. You can also find online courses, books, and forums where you can learn from other MATLAB users and experts. Additionally, there are many YouTube channels and blogs dedicated to teaching MATLAB signal processing techniques.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
796
  • Engineering and Comp Sci Homework Help
Replies
11
Views
2K
  • General Engineering
Replies
1
Views
814
  • Engineering and Comp Sci Homework Help
Replies
1
Views
6K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
15
Views
2K
  • Electrical Engineering
Replies
4
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
11
Views
6K
Back
Top