Tuesday, December 31, 2013

Proof Wiki Short Review

A resource I used when learning random signals was Proof Wiki (http://www.proofwiki.org/wiki/Main_Page). It has the proofs of many PDFs, CDFs, and PMFs, some of which were not covered in the textbook. Although the proving involved in the introductory random signal course was not hard, having Proof Wiki to compare the methods used to prove were still helpful (inspiring me somehow).

If checking the homepage, one might find that the theories included in Proof Wiki are not only the fundamental ones (ex. complex modulus) but also those more advanced ones (ex. central limit theorem), used in specific engineering and scientific fields.

I am thinking to contribute something, too, but so far, there have been many smart (or simply enthusiastic) people who have contributed the stuff I think of. Maybe some day I can catch up the giants' progress?

Codecademy

Although I have spent time on the website Codecademy (http://www.codecademy.com/) for a few years, I finally have had time to commit to spending time on it learning something new daily not until recently.

Codecademy Logo (I do not own this image.) 


I highly recommend it to those who barely know programming or who simply want to learn a new programming language. Its content is mainly for web programming, but the basic ideas of programming are the same.

The website allows the user to view the progress and work on some projects. There are also tutorials for specific APIs, whose progress can also be tracked.

I will try keeping spending at least a little amount of time on it daily and would be glad if this introduction to the website helps someone (without hurting anyone).

Sunday, December 29, 2013

Found an Information Visualization MOOC

Although I found this a while ago, I finally decided to share it on this new blog.

Indiana University will start its MOOC course on Information Visualization again on January 28, 2014. I didn't know its existence, so I can not share any review on the previous one. The site is: http://ivmooc.cns.iu.edu/.

Dealing with data a lot in signal processing, I think data presentation might be important for my area of study, so I might take the class if time permits. If it happens that any of reader takes the class with me, maybe we can form a casual study group (which I seldom do).

Simple Feedback System with Random Sequence Added

It turned out that my first mini-project on random processes was really a mini one. What I did was generating a random sequence x[k] meeting the equation
x[k] = ax[k - 1] + b[k] 
where a is a constant and b[k] is a binary white noise sequence taking on values -1 and +1 with equal probabilities.

I set x[-1] = 0. Four values for a were used: 0.95, 0.80, -0.95, and 2. For 50 samples for each, the results are

If removing the random variable, the system is clearly a feedback system with the current value depending on the previous value multiplied by a constant. Without the random variable, the system can be analyzed as the cases below:

  1. |a| < 1: If the magnitude of the constant a is less than 1, without the random variable and zero-initial conditions, the system should show attenuation in the magnitude of the signal. This case can be further divided into two subcases: 
    • a > 0: The signal should be strictly decreasing. 
    • a < 0: The sequence is an alternating sequence with the magnitude of the signal decreasing. 
  2. |a| = 0: The magnitude of the signal remains the same. 
  3. |a| > 0: The magnitude of the signal increases as time goes. As in the case of |a| < 1, this can be further divided into two subcases: 
    • a > 0: The signal should be strictly increasing. 
    • a < 0: The sequence is an alternating sequence with the magnitude of the signal increasing as time goes. 
With the random variable, however, the magnitude of the signal might be amplified or attenuated by the random variable with the probability of the contribution of the random variable to each being equal. This breaks the trend in the cases where the random variable does not exist because the random variable of the current value of the sequence has influence on the next value, which results from multiplying the constant by the value before it in time. 

I expect the result will be quite "random" and difficult to have further analysis without using the frequency domain techniques for the system. As a comparison, below is another set of results of the generation (the images are clickable, and by clicking, an enlarged one will pop up). 

Comparing this with the previous results (and other results I attempted), I can not see a clear trend of the sequence with either value of a. Although this might result of any possible error I made, I can not see any at least for now. 

I planned to get this done earlier but really wanted to see if there is more finding. Still, this mini-project will end here unless I think of something else. 

MATLAB Code:

Project Script:

% Generate and plot 50 samples for 
% 1. a = 0.95
% 2. a = 0.70
% 3. a = -0.95
% 4. |a| > 1

% 1. a = 0.95
[x,k] = RandSeqGenerator8p3(50,0.95);
subplot(2,2,1);
stem(k,x);
axis([-1,50,-26,26]);
title('a = 0.95');
xlabel('time');
ylabel('x[k]');

% 2. a = 0.70
[x,k] = RandSeqGenerator8p3(50,0.70);
subplot(2,2,2);
stem(k,x);
axis([-1,50,-26,26]);
title('a = 0.70');
xlabel('time');
ylabel('x[k]');

% 3. a = -0.95
[x,k] = RandSeqGenerator8p3(50,-0.95);
subplot(2,2,3);
stem(k,x);
axis([-1,50,-26,26]);
title('a = -0.95');
xlabel('time');
ylabel('x[k]');

% 1. |a| > 1
[x,k] = RandSeqGenerator8p3(50,2);
subplot(2,2,4);
stem(k,x);
axis([-1,50,-26,26]);
title('a = 2 (|a| > 1)');
xlabel('time');
ylabel('x[k]');

Random Sequence Generator:

function [ x, k ] = RandSeqGenerator8p3( n, a )
%RandSeqGenerator8p3 Generates n samples of the random sequence: 
%   x[k] = a*x[k - 1] + b[k], 
%   a: a constant
%   b[k]: a binary white noise sequence taking on values -1 and +1 with
%   equal probabilities
%
%   x: samples of the random sequence
%   k: sample time points
%   n: number of samples

x = [];
k = 0:(n - 1);
b = 2*(rand(1,n) < 0.5) - 1;

if n > 0
    x(1) = b(1);
    
    if n > 1
        for l = 2:n
            x(l) = x(l - 1) + b(l);
        end
    end
end

end

Update on 12/30/2013:

I thought of the random walk today. The random sequence above, when the constant is equal to 1, is actually a random walk if x[k] = 0 for k < 0. In this case, the initial condition x[0] for the random walk is a random signal taking on values of +1 and -1 with equal probabilities.

Ashlar's 3D Modeling Tutorials Page

Today's new finding (for myself) is the 3D Modeling Tutorials page on Ashlar's website (http://www.ashlar.com/support/3d-modeling-tutorials.html). I don't know whether I will have time on these, but knowing there is something I might use in the future is often good.

My New Blog

I think it might be good for me to start a new blog focusing on something more technical, so here it is. There might be some of my mini-projects or some learning notes or simply something I found interesting. There might be some experiments, too. For any good visitor, welcome, and thank you for visiting.