Generation of a Gaussian a random process with Matlab

In summary: Expert_summarizer.In summary, Confused_engineer is using the muKL technique to construct a 2D gaussian kernel and then using the KL theorem to generate realizations of a gaussian random process. However, there seems to be an issue with the results as seen in the third attached figure. Possible reasons for this could include errors in the construction of the kernel or in the calculation of eigenvectors and eigenvalues, not generating enough realizations, or a problem with plotting the data. It is recommended to review the code and calculations and potentially generate more realizations for accurate representation of the Gaussian process. Seeking help from a colleague or mentor may also be beneficial.
  • #1
confused_engineer
39
2
TL;DR Summary
I am working unsing the software Matlab trying to construct realizations of gaussian stochastic processes. However, the results I obtain don't look gaussian.
Hello everyone.

I am currently working with Matlab. I have a 2D gaussian kernel constructed using the muKL technique (first attached figure). I want to use it to generate realizations of a gaussian random process using the KL theorem. For that, I obtain then all eigenvectors and eigenvalues of said kernel and multiply the square root of each eigenvalue by the corresponding eigenvector and a number extracted from a N(0,1) and add all of them together to obtain the realization. I do this a number of times and obtain what can be seen in the second attached figure. However, if I plot the first and second half of each realization differently over a 2D surface, I obtain what can be seen in the third attached figure, which doesn't look gaussian at all. Can someone please tell me what am I doing wrong?

I will too attach a sample code with a smaller covariance matriz so that if anyone is interested, can take a look (since the kernel is too big to upload)

Best regards.
Confused_engineer.
 

Attachments

  • 1_kernel.jpg
    1_kernel.jpg
    18.2 KB · Views: 183
  • 2_realizations.jpg
    2_realizations.jpg
    45.1 KB · Views: 150
  • 3_first_realization.jpg
    3_first_realization.jpg
    21.7 KB · Views: 148
  • CovKernesSmall.txt
    638 KB · Views: 184
  • Like
Likes Delta2
Physics news on Phys.org
  • #2


Hello Confused_engineer,

Thank you for sharing your work and asking for feedback. It seems like you are on the right track with using the KL theorem to generate realizations of a Gaussian random process. However, there are a few things that could potentially be causing the issue you are seeing in the third attached figure.

First, it is important to make sure that your kernel is properly constructed and that the eigenvectors and eigenvalues are calculated correctly. If there are any errors in these steps, it could lead to incorrect realizations.

Second, it is possible that the number of realizations you are generating is not enough to accurately represent the Gaussian process. The KL theorem states that the number of realizations should be equal to the number of eigenvalues, so make sure you are generating enough realizations for your specific case.

Lastly, it is possible that there is an issue with how you are plotting the data in the third figure. It is important to make sure that the data is being plotted correctly and that any scaling or transformations are applied consistently across all realizations.

I would recommend double-checking your code and calculations, and also trying to generate more realizations to see if that improves the results. If you are still having trouble, it might be helpful to reach out to a colleague or mentor for further assistance.

Best of luck with your work!
 

FAQ: Generation of a Gaussian a random process with Matlab

What is a Gaussian random process?

A Gaussian random process, also known as a Gaussian process, is a type of stochastic process where the random variables follow a Gaussian or normal distribution. This means that the values of the process at any given time are normally distributed around a mean value.

How is a Gaussian random process generated with Matlab?

To generate a Gaussian random process with Matlab, you can use the randn function. This function generates a random array of numbers from a standard normal distribution, which can be used to create a Gaussian random process.

What are the advantages of using Matlab for generating a Gaussian random process?

Matlab is a powerful and widely used tool in scientific research, making it a convenient choice for generating a Gaussian random process. It has built-in functions for generating random numbers, as well as tools for analyzing and visualizing data, which can be useful for studying the properties of a Gaussian random process.

Can a Gaussian random process be used to model real-world phenomena?

Yes, a Gaussian random process can be used to model real-world phenomena. Many natural processes and systems exhibit random behavior that can be approximated by a Gaussian random process. For example, stock market fluctuations, weather patterns, and biological processes can be modeled using Gaussian random processes.

Are there any limitations to using a Gaussian random process?

While Gaussian random processes are useful for modeling many phenomena, they may not always accurately represent the behavior of a system. In some cases, the assumption of normality may not hold, and other types of stochastic processes may be more appropriate. Additionally, Gaussian random processes may not be suitable for modeling extreme events or outliers.

Similar threads

Replies
1
Views
1K
Replies
1
Views
1K
Replies
1
Views
2K
Replies
1
Views
1K
Replies
2
Views
1K
Replies
5
Views
1K
Replies
32
Views
3K
Replies
10
Views
2K
Replies
1
Views
1K
Back
Top