Autocorrelation and spectral density in MATLAB











up vote
0
down vote

favorite












This question is twofold.



We have an LTI system that is a first degree Butterworth LP filter with the power TF



enter image description here



where fu = 110Hz and f1 = 90Hz



The input X(t) has the autocorrelation: R_X(tau) = 5e^{-600|tau|}



1) How can I calculate the power spectral density of the output in MATLAB? FFT? How do I represent the autocorrelation as a vector?



2) How can I simulate the system and plot the output in MATLAB?










share|cite|improve this question













migrated from stackoverflow.com Apr 13 '14 at 22:13


This question came from our site for professional and enthusiast programmers.















  • mathworks.se/help/signal/ug/psd-estimate-using-fft.html
    – tashuhka
    Apr 12 '14 at 13:57










  • possible duplicate of Calculate autocorrelation using FFT in matlab
    – tashuhka
    Apr 12 '14 at 13:58










  • I thought I had posted this in math.stackexhange, oh well.
    – user2750354
    Apr 12 '14 at 17:12















up vote
0
down vote

favorite












This question is twofold.



We have an LTI system that is a first degree Butterworth LP filter with the power TF



enter image description here



where fu = 110Hz and f1 = 90Hz



The input X(t) has the autocorrelation: R_X(tau) = 5e^{-600|tau|}



1) How can I calculate the power spectral density of the output in MATLAB? FFT? How do I represent the autocorrelation as a vector?



2) How can I simulate the system and plot the output in MATLAB?










share|cite|improve this question













migrated from stackoverflow.com Apr 13 '14 at 22:13


This question came from our site for professional and enthusiast programmers.















  • mathworks.se/help/signal/ug/psd-estimate-using-fft.html
    – tashuhka
    Apr 12 '14 at 13:57










  • possible duplicate of Calculate autocorrelation using FFT in matlab
    – tashuhka
    Apr 12 '14 at 13:58










  • I thought I had posted this in math.stackexhange, oh well.
    – user2750354
    Apr 12 '14 at 17:12













up vote
0
down vote

favorite









up vote
0
down vote

favorite











This question is twofold.



We have an LTI system that is a first degree Butterworth LP filter with the power TF



enter image description here



where fu = 110Hz and f1 = 90Hz



The input X(t) has the autocorrelation: R_X(tau) = 5e^{-600|tau|}



1) How can I calculate the power spectral density of the output in MATLAB? FFT? How do I represent the autocorrelation as a vector?



2) How can I simulate the system and plot the output in MATLAB?










share|cite|improve this question













This question is twofold.



We have an LTI system that is a first degree Butterworth LP filter with the power TF



enter image description here



where fu = 110Hz and f1 = 90Hz



The input X(t) has the autocorrelation: R_X(tau) = 5e^{-600|tau|}



1) How can I calculate the power spectral density of the output in MATLAB? FFT? How do I represent the autocorrelation as a vector?



2) How can I simulate the system and plot the output in MATLAB?







matlab correlation






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Apr 12 '14 at 11:11









user2750354

94212




94212




migrated from stackoverflow.com Apr 13 '14 at 22:13


This question came from our site for professional and enthusiast programmers.






migrated from stackoverflow.com Apr 13 '14 at 22:13


This question came from our site for professional and enthusiast programmers.














  • mathworks.se/help/signal/ug/psd-estimate-using-fft.html
    – tashuhka
    Apr 12 '14 at 13:57










  • possible duplicate of Calculate autocorrelation using FFT in matlab
    – tashuhka
    Apr 12 '14 at 13:58










  • I thought I had posted this in math.stackexhange, oh well.
    – user2750354
    Apr 12 '14 at 17:12


















  • mathworks.se/help/signal/ug/psd-estimate-using-fft.html
    – tashuhka
    Apr 12 '14 at 13:57










  • possible duplicate of Calculate autocorrelation using FFT in matlab
    – tashuhka
    Apr 12 '14 at 13:58










  • I thought I had posted this in math.stackexhange, oh well.
    – user2750354
    Apr 12 '14 at 17:12
















mathworks.se/help/signal/ug/psd-estimate-using-fft.html
– tashuhka
Apr 12 '14 at 13:57




mathworks.se/help/signal/ug/psd-estimate-using-fft.html
– tashuhka
Apr 12 '14 at 13:57












possible duplicate of Calculate autocorrelation using FFT in matlab
– tashuhka
Apr 12 '14 at 13:58




possible duplicate of Calculate autocorrelation using FFT in matlab
– tashuhka
Apr 12 '14 at 13:58












I thought I had posted this in math.stackexhange, oh well.
– user2750354
Apr 12 '14 at 17:12




I thought I had posted this in math.stackexhange, oh well.
– user2750354
Apr 12 '14 at 17:12










1 Answer
1






active

oldest

votes

















up vote
0
down vote













To calculate the Autocorrelation of the output:



R_y = xcorr(y); % with Y(f) = X(f).H(f) or y(t) = x(t)*h(t)


To calculate the P.S.D of the output:



PSD_y = fft (R_y);


To reprensent them graphically, you can use plot



if you do not have the x(t) or X(f) expressions, you could use this relation:



PSD_y (f) = PSD_x (f) . |H(f)|^2  % with PSD_x (f) = fft(R_x);





share|cite|improve this answer





















  • I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
    – user2750354
    Apr 12 '14 at 11:50










  • see my updated answer, and let me know if it worked. thx
    – user51886
    Apr 12 '14 at 13:59










  • you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
    – reuns
    Oct 11 '16 at 0:12













Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f752473%2fautocorrelation-and-spectral-density-in-matlab%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













To calculate the Autocorrelation of the output:



R_y = xcorr(y); % with Y(f) = X(f).H(f) or y(t) = x(t)*h(t)


To calculate the P.S.D of the output:



PSD_y = fft (R_y);


To reprensent them graphically, you can use plot



if you do not have the x(t) or X(f) expressions, you could use this relation:



PSD_y (f) = PSD_x (f) . |H(f)|^2  % with PSD_x (f) = fft(R_x);





share|cite|improve this answer





















  • I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
    – user2750354
    Apr 12 '14 at 11:50










  • see my updated answer, and let me know if it worked. thx
    – user51886
    Apr 12 '14 at 13:59










  • you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
    – reuns
    Oct 11 '16 at 0:12

















up vote
0
down vote













To calculate the Autocorrelation of the output:



R_y = xcorr(y); % with Y(f) = X(f).H(f) or y(t) = x(t)*h(t)


To calculate the P.S.D of the output:



PSD_y = fft (R_y);


To reprensent them graphically, you can use plot



if you do not have the x(t) or X(f) expressions, you could use this relation:



PSD_y (f) = PSD_x (f) . |H(f)|^2  % with PSD_x (f) = fft(R_x);





share|cite|improve this answer





















  • I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
    – user2750354
    Apr 12 '14 at 11:50










  • see my updated answer, and let me know if it worked. thx
    – user51886
    Apr 12 '14 at 13:59










  • you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
    – reuns
    Oct 11 '16 at 0:12















up vote
0
down vote










up vote
0
down vote









To calculate the Autocorrelation of the output:



R_y = xcorr(y); % with Y(f) = X(f).H(f) or y(t) = x(t)*h(t)


To calculate the P.S.D of the output:



PSD_y = fft (R_y);


To reprensent them graphically, you can use plot



if you do not have the x(t) or X(f) expressions, you could use this relation:



PSD_y (f) = PSD_x (f) . |H(f)|^2  % with PSD_x (f) = fft(R_x);





share|cite|improve this answer












To calculate the Autocorrelation of the output:



R_y = xcorr(y); % with Y(f) = X(f).H(f) or y(t) = x(t)*h(t)


To calculate the P.S.D of the output:



PSD_y = fft (R_y);


To reprensent them graphically, you can use plot



if you do not have the x(t) or X(f) expressions, you could use this relation:



PSD_y (f) = PSD_x (f) . |H(f)|^2  % with PSD_x (f) = fft(R_x);






share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Apr 12 '14 at 11:29







user51886



















  • I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
    – user2750354
    Apr 12 '14 at 11:50










  • see my updated answer, and let me know if it worked. thx
    – user51886
    Apr 12 '14 at 13:59










  • you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
    – reuns
    Oct 11 '16 at 0:12




















  • I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
    – user2750354
    Apr 12 '14 at 11:50










  • see my updated answer, and let me know if it worked. thx
    – user51886
    Apr 12 '14 at 13:59










  • you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
    – reuns
    Oct 11 '16 at 0:12


















I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
– user2750354
Apr 12 '14 at 11:50




I have the autocorrelation of X, but I don't know the actual x. How can I do this given the autocorrelation?
– user2750354
Apr 12 '14 at 11:50












see my updated answer, and let me know if it worked. thx
– user51886
Apr 12 '14 at 13:59




see my updated answer, and let me know if it worked. thx
– user51886
Apr 12 '14 at 13:59












you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
– reuns
Oct 11 '16 at 0:12






you mean PSD_y = abs(fft(y)).^2 possibly with zero padding PSD_y = abs(fft(y, 2*length(y))).^2
– reuns
Oct 11 '16 at 0:12




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f752473%2fautocorrelation-and-spectral-density-in-matlab%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Bressuire

Cabo Verde

Gyllenstierna