This is a combined version pdf of a collection of dsp cusat question papers, please see full post for PDF.

### Operations on signals -Time Scaling, Down Sampling, Up Sampling, Decimation

27.9.10

Time Scaling

In the sequence x(n) if we replace n with lambda n or say Kn we get a time scaled version of x(n).

Consider K=2 in x(n) = {-4,-3,-2,-1,

y(0)=x(2*0)=x(0)=0

y(1)=x(2*1)=x(2)=2

y(2)=x(2*2)=x(4)=4

like that we get y(n)={-4,-2,

This efect can be obtained by reducing the sampling rate while sampling from continuous signal x(t). This process of reducing sampling rate is called downsampling.

The other case up-sampling you can think on your own, up-sampling above x(n) with k=1/2 will produce a signal y(n)={-4,0,-3,0,-2,0,-1,0,

In the sequence x(n) if we replace n with lambda n or say Kn we get a time scaled version of x(n).

Consider K=2 in x(n) = {-4,-3,-2,-1,

**0**,1,2,3,4}y(0)=x(2*0)=x(0)=0

y(1)=x(2*1)=x(2)=2

y(2)=x(2*2)=x(4)=4

like that we get y(n)={-4,-2,

**0**,2,4}This efect can be obtained by reducing the sampling rate while sampling from continuous signal x(t). This process of reducing sampling rate is called downsampling.

The other case up-sampling you can think on your own, up-sampling above x(n) with k=1/2 will produce a signal y(n)={-4,0,-3,0,-2,0,-1,0,

**0**,0,1,0,2,0,3,0,4}### Operations on signals -Time reversal

Time Reversal

The time reversal of a signal x(n) is obtained by folding the sequence about n=0. It is denoted as x(-n).

if x(n)={2,1,2,1} (first one is n=0 if not arrow marked(bold) explicitly)

x(-n)={1,2,1,

Now let us see some combination of time reversal and shifting

x(-n-2) is x(n) time reversed and advanced 2 units of time. ie. {1,2,1,2,0,

x(-n+2) is x(n) time reversed and delayed 2 units of time. ie {1,

It is good to draw graphical representation of these signals yourselves.

The time reversal of a signal x(n) is obtained by folding the sequence about n=0. It is denoted as x(-n).

if x(n)={2,1,2,1} (first one is n=0 if not arrow marked(bold) explicitly)

x(-n)={1,2,1,

**2**}Now let us see some combination of time reversal and shifting

x(-n-2) is x(n) time reversed and advanced 2 units of time. ie. {1,2,1,2,0,

**0**}x(-n+2) is x(n) time reversed and delayed 2 units of time. ie {1,

**2**,1,2}It is good to draw graphical representation of these signals yourselves.

### Operations on signals -Shifting

**Shifting**

The shift operation shifts the input signal by an integer increment of the independent variable.

ie. y(n)=x(n-k) where k is the independent variable.

If k is positive shifting delays the sequence, if k is negative shifting advances the sequence

x(n)={

**2**,1,2,1}

**bold marked is n=0**

x(n-3)={

**0**,0,0,2,1,2,1}

x(n-2)={

**0**,0,2,1,2,1}

x(n+2)={2,1,

**2**,1}

you can draw the graphical representation of these operations to better understand the operation.

### Operations on signals

In signals processing we apply a group of operations on input signal to produce an output signal, this is what a discrete time system does. Generally there are the following basic operations that we can apply on a signal, ususally we will need a combination of these basic operations.

The basic operations on discrete time signals are

1.Shifting

2.Time reversal

3.Time scaling

4.Scalar multiplication

5.Signal Multiplier

6.Signal Addition

The basic operations on discrete time signals are

1.Shifting

2.Time reversal

3.Time scaling

4.Scalar multiplication

5.Signal Multiplier

6.Signal Addition

### Some types of signals

We will go through some general concepts before going to operations on signals,

A signal is periodic if x(n) is periodic if

x(n+N)=x(n) for all n

else signal is aperiodic

Signal is symmetric or even signal if

x(-n)=x(n) for all n

Signal is antisymmetric if

x(-n)=-x(n) for all n

x(n) is causal if x(n) is zero or doent exist for values less than zero. In other words for causal sequence x(n) exist for only values of n greater than or equal to zero.

Other wise non-causal ie x(n) exist for negative values of n also.

x(n) is anti-causal if x(n) exist for n>=0 ie. x(n)=0 for n>=0

Rest after sometime i am taking a break buddy.

**Periodic and aperiodic signals**A signal is periodic if x(n) is periodic if

x(n+N)=x(n) for all n

else signal is aperiodic

**Symmertric and antisymmetric signals**Signal is symmetric or even signal if

x(-n)=x(n) for all n

Signal is antisymmetric if

x(-n)=-x(n) for all n

**Causal and non-causal signals**x(n) is causal if x(n) is zero or doent exist for values less than zero. In other words for causal sequence x(n) exist for only values of n greater than or equal to zero.

Other wise non-causal ie x(n) exist for negative values of n also.

x(n) is anti-causal if x(n) exist for n>=0 ie. x(n)=0 for n>=0

Rest after sometime i am taking a break buddy.

### Energy signals and power signals

Before going to the next topic ie.Properties of discrete time signals we will just skim through the concept of power and energy signals.

Energy of a signal x(n) is given by

E= sigma n=-infinity to infinty |x(n)|square

A signal is said to be energy signal if the energy of signal is finite, in that case power of the signal will be zero.

Power of a signal is given by

limit N tends to infinity 1/2N+1 sigma n=-N to N |x(n)|square

A signal is power signal if power is finite, in that case the energy of signal will be infinity.

**Energy of a signal**Energy of a signal x(n) is given by

E= sigma n=-infinity to infinty |x(n)|

A signal is said to be energy signal if the energy of signal is finite, in that case power of the signal will be zero.

**Power of a signal**Power of a signal is given by

limit N tends to infinity 1/2N+1 sigma n=-N to N |x(n)|square

A signal is power signal if power is finite, in that case the energy of signal will be infinity.

### Discrete time systems

A system is an inter connection of components. It is a physical device that performs an operation on an input signal and produces another signal as output.

A discrete time system is one that takes discrete time signal as input and produces a discrete time signal as output. The input is denoted by x(n) and out put signal is denoted by y(n).

The system may be denoted by.

y(n)=T[x(n)] ie. output is a transformation of input.

The transformation can be shifting,scaling,etc or a mixture of these, we will come to these operations on signals later :).

A discrete time system is one that takes discrete time signal as input and produces a discrete time signal as output. The input is denoted by x(n) and out put signal is denoted by y(n).

The system may be denoted by.

y(n)=T[x(n)] ie. output is a transformation of input.

The transformation can be shifting,scaling,etc or a mixture of these, we will come to these operations on signals later :).

### Discrete time signals

The signals that are defined at discrete instants of time are called discrete time signals. The discrete time signals are discrete in time and continuous in amplitude. It is denoted by x(n).

The meaning of discrete in time is that the signal will be defined only in some specific intervals of time, on rest of the time values signal will be undefined. For example consider a continuous signal x(t) ,it will be defined for every value of 't'. To make it discrete time we take only values at a fixed interval T.

ie. x(nT)=x(t)|t=nT

We but simply denote it as x(n) instead of x(nT). where n=...-1,0,1,...

The meaning of discrete in time is that the signal will be defined only in some specific intervals of time, on rest of the time values signal will be undefined. For example consider a continuous signal x(t) ,it will be defined for every value of 't'. To make it discrete time we take only values at a fixed interval T.

ie. x(nT)=x(t)|t=nT

We but simply denote it as x(n) instead of x(nT). where n=...-1,0,1,...

### Digital Signal Processing Syllabus Module 1

Introduction to discrete time signals and systems

Discrete time signals and systems

properties of discrete time systems

linearilty

time invariance

causality

stability

convolution

difference equation representation of discrete systems

The Z-transform

Properties of Z-transform

Inverse Z-transform

System Function

Discrete time signals and systems

properties of discrete time systems

linearilty

time invariance

causality

stability

convolution

difference equation representation of discrete systems

The Z-transform

Properties of Z-transform

Inverse Z-transform

System Function

### Organize tabs with tab Candy, new firefox 4 feature to organize your tabs

22.9.10

Firefox 4 comes with the new feature that lets you organize your tabs in an innovative way. Have a look at the new feature video here or download and test it in Firefox 4 Beta release.

:)

An Introduction to Firefox's Tab Candy from Aza Raskin on Vimeo.

You can have a look at aza raskin blog and see his post on this feature at http://www.azarask.in/blog/post/tabcandy/

:)

An Introduction to Firefox's Tab Candy from Aza Raskin on Vimeo.

You can have a look at aza raskin blog and see his post on this feature at http://www.azarask.in/blog/post/tabcandy/

### Firefox sync now a part of firefox starting from Firefox 4

Access your history, passwords, bookmarks and even open tabs across all your devices. Use same account on your devices and the firefox server will synchronize your browser usage across your devices. The earlier add-on for firefox is now a feature in firefox starting from firefox 4, and you can see the preview in firefox 4 beta release.

The design of the firefox beta4 has also evolved into something that looks a hybrid of many competing browsers like opera chrome etc. They have also added a feedback button on the browser itself :)

The design of the firefox beta4 has also evolved into something that looks a hybrid of many competing browsers like opera chrome etc. They have also added a feedback button on the browser itself :)

### Etc - Et Cetera

15.9.10

Et cetera is a Latin expression that means "and other things", or "and so forth". It is taken directly from the Latin expression which literally means "and the rest (of such things)" .

**Et**means "and";**cētera**means "the rest".### Raphaël—JavaScript Library

**Raphaël**is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and rotate widget, for example, you can achieve it simply and easily with this library.

Raphaël [ˈrafēəl] uses the SVG W3C Recommendation and VML as a base for creating graphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing vector art compatible cross-browser and easy.

Raphaël currently supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+.

### Ayisha - Malayalam Kavitha(poem) by Vayalar.

8.9.10

'Ayisha' is an extraordinary Malayalam poem by Vayalar reflecting the social situation that existed during 1950s .But when we go deep into the basic problems contained in the plot, we will understand that the problem is still existent.

The plot start with the narrator admiring the cuteness and innocence of Ayisha. There also happens some conversations between them that makes us understand her innocence and childishness. The narrator has the habit of making her angry and usually ends up in Ayisha crying for silly matters.

After one such incident Ayisha won't come at morning to narrators house to deliver milk, instead her father Andruman comes and tell the narrator that Ayisha got married. Narrator will be shocked as hears the marriage of the kid. It is a fact that such marriages where common at that time in Kerala especially in Muslim communities.

The picture of Innocence and Ayisha slowly fades away from narrators life. He after long time, four years visits town along with his friend. They will see a mob looking at something seriously, they follows them to see the scene of the corpse of newborn torn into pieces by street dogs. Narrator later finds that Ayisha got arrested for killing her new born child.

The rich fellow who married Ayisha leaves her after enjoying her to the maximum. Ayisha will be already pregnant when she joins the street community. Her streets friends tells her to deliver the child as soon as possible so that she can start earning some real money with prostitution.

Ayisha gives birth to her child in street under the shades of the tent she made with her own clothes.As soon as the child is born her friends throws it away to the bushes. She will be helpless and cries silently.

Ayisha will be released from jail later on, and she will be carrying the child of some police man this time. She grows more strong as her society plays games with her, she decides to bring the child and says that the child will take revenge on the society that almost killed Ayisha. The boy will be born and names him 'Raheem'.

'Raheem' groes up as a street singer and sings a song starting with, 'Im the son of my loving mother Ayisha' and people gave them money to avoid his mere presence. Ayisha ran her own whore house as she understood it was the only way she could bring up her child. They went on living this way and they gets accustomed to the life style.

One day some one unexpected visits Ayisha's whore house, her earlier husband who if fully drunken. Ayisha's whole hatred to the society comes up to the brim and overflows and ends up killing him. She again gets arrested and goes to Jail.

'Raheem' grows up in the street silently decalring ' I will live, and will not die whatever condition comes'. He still have his song starting with Ayisha and keeps singing it. One day as he sings the song along with his street friends, one old man comes andasks who is Ayishas child. It will be Andruman who came back from jail after kililng someone in communal hatred. He grabs the child and they together fades away to the streets.

The poets story telling is exellent that we gets the correct feeling at every situation. Also Vayalar has the habit of taking themes from real. The following lines from this poem are especially famous in Kerala and ususally used in 'Kathaprasangam'.

photo:http://www.weblokam.com/literature/profiles/2002/10/vayalar1.htm

The plot start with the narrator admiring the cuteness and innocence of Ayisha. There also happens some conversations between them that makes us understand her innocence and childishness. The narrator has the habit of making her angry and usually ends up in Ayisha crying for silly matters.

After one such incident Ayisha won't come at morning to narrators house to deliver milk, instead her father Andruman comes and tell the narrator that Ayisha got married. Narrator will be shocked as hears the marriage of the kid. It is a fact that such marriages where common at that time in Kerala especially in Muslim communities.

The picture of Innocence and Ayisha slowly fades away from narrators life. He after long time, four years visits town along with his friend. They will see a mob looking at something seriously, they follows them to see the scene of the corpse of newborn torn into pieces by street dogs. Narrator later finds that Ayisha got arrested for killing her new born child.

The rich fellow who married Ayisha leaves her after enjoying her to the maximum. Ayisha will be already pregnant when she joins the street community. Her streets friends tells her to deliver the child as soon as possible so that she can start earning some real money with prostitution.

Ayisha gives birth to her child in street under the shades of the tent she made with her own clothes.As soon as the child is born her friends throws it away to the bushes. She will be helpless and cries silently.

Ayisha will be released from jail later on, and she will be carrying the child of some police man this time. She grows more strong as her society plays games with her, she decides to bring the child and says that the child will take revenge on the society that almost killed Ayisha. The boy will be born and names him 'Raheem'.

'Raheem' groes up as a street singer and sings a song starting with, 'Im the son of my loving mother Ayisha' and people gave them money to avoid his mere presence. Ayisha ran her own whore house as she understood it was the only way she could bring up her child. They went on living this way and they gets accustomed to the life style.

One day some one unexpected visits Ayisha's whore house, her earlier husband who if fully drunken. Ayisha's whole hatred to the society comes up to the brim and overflows and ends up killing him. She again gets arrested and goes to Jail.

'Raheem' grows up in the street silently decalring ' I will live, and will not die whatever condition comes'. He still have his song starting with Ayisha and keeps singing it. One day as he sings the song along with his street friends, one old man comes andasks who is Ayishas child. It will be Andruman who came back from jail after kililng someone in communal hatred. He grabs the child and they together fades away to the streets.

The poets story telling is exellent that we gets the correct feeling at every situation. Also Vayalar has the habit of taking themes from real. The following lines from this poem are especially famous in Kerala and ususally used in 'Kathaprasangam'.

**"Vedana vingum samoohathil ninnu njan****verode cheethipparichathanikkatha'**photo:http://www.weblokam.com/literature/profiles/2002/10/vayalar1.htm

### Using Viewfield Arguments in Views 2

5.9.10

Think of a situation where you have Place nodes,each node representing a Place.

Now you have company nodes, which represent companies.

In company node you have a Node Reference field referring to 'Place' where company resides.

Now I will explain How you can use viewfield module along with cck + view to automatically list "Companies at this location" on each 'Place' Node with out user entering them.

I am no good at explaining so I can give only a rough idea.

1. In the 'Places' Node Type, create a new field of type viewfield name it "Companies at this location".

2.You can see options to select the view to be used and a field for arguments. Set Argument as "%nid" and view as the view you want to use.(In our case view will be one that filters nodeType=Company).

3.Now in arguments of view(not viewfield) set argumentto content-> name of Node Reference field referring to 'Place' in Company node.

4. current nid of open page is passed by viewfield, the view defined by viewfield grabs this nid and checks with argument set in view definintion.

ie.

This can be done in reverse way by creating a multiple field for 'companies' in 'Place' nodes. That can be filtered by using views for nodes that can be referenced.

But this is 1:M relation place:companies. I feel it hard to enter data.

I feel it easier to enter place as we create a Company.

Now you have company nodes, which represent companies.

In company node you have a Node Reference field referring to 'Place' where company resides.

Now I will explain How you can use viewfield module along with cck + view to automatically list "Companies at this location" on each 'Place' Node with out user entering them.

I am no good at explaining so I can give only a rough idea.

1. In the 'Places' Node Type, create a new field of type viewfield name it "Companies at this location".

2.You can see options to select the view to be used and a field for arguments. Set Argument as "%nid" and view as the view you want to use.(In our case view will be one that filters nodeType=Company).

3.Now in arguments of view(not viewfield) set argumentto content-> name of Node Reference field referring to 'Place' in Company node.

4. current nid of open page is passed by viewfield, the view defined by viewfield grabs this nid and checks with argument set in view definintion.

ie.

SELECT node.nid AS nid,

node.title AS node_title

FROM node node

LEFT JOIN content_type_company node_data_field_place ON node.vid = node_data_field_place.vid

WHERE (node.type in ('company')) AND (node_data_field_place.field_place_nid = 2)

This can be done in reverse way by creating a multiple field for 'companies' in 'Place' nodes. That can be filtered by using views for nodes that can be referenced.

But this is 1:M relation place:companies. I feel it hard to enter data.

I feel it easier to enter place as we create a Company.

### Quotes after long time :)

4.9.10

Because of a great love, one is courageous.

Being deeply loved by someone gives you strength, while loving someone deeply gives you courage.

Fill your bowl to the brim and it will spill. Keep sharpening your knife and it will blunt.

From caring comes courage.

If you do not change direction, you may end up where you are heading.

Nature does not hurry, yet everything is accomplished.

Lao Tzu

Being deeply loved by someone gives you strength, while loving someone deeply gives you courage.

Fill your bowl to the brim and it will spill. Keep sharpening your knife and it will blunt.

From caring comes courage.

If you do not change direction, you may end up where you are heading.

Nature does not hurry, yet everything is accomplished.

Lao Tzu

### Eg i.e what? If you still don't know.....

Eg comes from 'exempli gratia'(Latin) meaning 'for the sake of example'.

i.e comes from 'id est'(Latin) meaning 'that is'

i.e comes from 'id est'(Latin) meaning 'that is'

### Blogger doesn'nt allow me to set birthday as Feb 29 :(

I recently updated my blogger profile to include my website as www.sabithpocker.com. But after I updated I am now not able to save my profile with old birthday Feb 29, at last I ended up saving with Feb 28 :(

Blogger Profile Showing Feb 29 as invalid birthday date :( |

### Apple iPod nano- Amazing finger print design

3.9.10

As always they stand out in design and usability, thistime I am impressed by the fingerprint design in iPod nano launch page. Here is the image, its copyrighted by apple of-course.

### Find amount of mousemove with jQuery, track big or long mouse moves.

1.9.10

I wanted to trigger an action with mouse move, but I didn't want the event to trigger if the mouse move is very small, here is the code I ended up with.

Can be done without jquery using

var iniX=0,iniY=0,triggerLength=150;

$(document).mousemove(function(e){

if(iniX==0&&iniY==0){

iniX=e.pageX;

iniY=e.pageY;

}

movementlength=Math.sqrt( Math.pow(Math.abs(iniX-e.pageX),2) + Math.pow(Math.abs(iniY-e.pageY),2) );

if(movementlength > triggerLength){

//code goes here

}

});

Can be done without jquery using

var iniX=0,iniY=0,triggerLength=150;

document.onmousemove = function(e){

if(iniX==0&&iniY==0){

iniX=e.pageX;

iniY=e.pageY;

}

movementlength=Math.sqrt( Math.pow(Math.abs(iniX-e.pageX),2) + Math.pow(Math.abs(iniY-e.pageY),2) );

if(movementlength > triggerLength){

//code goes here

}

}

Subscribe to:
Posts (Atom)