Fourier Series Representation of a Square Wave using only cosine terms.

In summary: Hi ENB242 guy, to begin with, what you are doing is wrong. I have done it and comparing what i have done to yours, I am wondering why you don't have the -ve part of the signal?? Also your initial assumption is wrong as well.
  • #1
Dint
8
0
Hello, I am attempting a past exam paper in preparation for an upcoming exam. The past exam papers do not come with answers and I'm a little unsure as to whether I'm doing all of the questions correctly and would like some feedback if I'm going wrong somewhere.

Any help is greatly appreciated :)

Here are the questions:

Homework Statement



Draw a square wave of amplitude 1 and period 1 second whose trigonometric Fourier Series Representation consists of only cosine terms and has no DC component.

Now, I assume they want the FSR to be made up of only cosine terms, there is another question on another past exam that asks for the same thing but in sine terms. A normal square wave that is:

1 for 0<x<.5
0 for -.5<x<0

Consists of only sine terms when you do the FSR (when I did it). It also makes sense because it looks like a sine wave in that it rises at the origin.

2. The attempt at a solution

However, to make it consist of only cosine terms, I'm not quite sure how to draw this, this is what I came up with.

http://img34.imageshack.us/img34/2/squarewave.jpg [Broken]

I did this because I figured it resembles what a cosine wave looks like, in that it peaks at the origin. (I know it's a square wave so it doesn't really peak, but I'm picturing a cosine wave representing the signal in the box)

PART B - 1. Homework Statement

The next part of the problem asks:

For the signal in part A, compute the trigonometrical FSR.

then

Compute the exponential FSR directly from the trigonometric FSR.

Homework Equations



[tex]a_{0} = \frac{1}{T} \int\limits_{f_{0}}^{f_{0}+T} f(t) dt[/tex]

[tex]a_{n} = \frac{2}{T} \int\limits_{f_{0}}^{f_{0}+T} f(t) cos\left(\frac{2{\pi}nt}{T}\right) dt[/tex]

[tex]b_{n} = \frac{2}{T} \int\limits_{f_{0}}^{f_{0}+T} f(t) sin\left(\frac{2{\pi}nt}{T}\right) dt[/tex]

I've also been told that for the exponential FSR:

[tex]c_{0} = a_{0}[/tex]

[tex]c_{n} = {\frac{1}{2}}\left(a_{n} - jb_{n}\right)[/tex]

[tex]c_{-n} = {\frac{1}{2}}\left(a_{n} + jb_{n}\right)[/tex]

The Attempt at a Solution



[tex]a_{0} = \frac{1}{2}[/tex]

By inspection I can see that the average value of one period of the square wave is going to be 0.5.

[tex]a_{n} = \frac{2}{1} \int\limits_{-{\frac{1}{4}}}^{{\frac{1}{4}}} cos\left(\frac{2{\pi}nt}{1}\right) dt[/tex]

Now when I do this integral, I get:

[tex] \frac{1}{{\pi}n} \left[ sin\left(\frac{{\pi}n}{2}\right) - sin\left(-\frac{{\pi}n}{2}\right)\right][/tex]

I'm kinda stuck here. This answer does not give zero, I need the FSR to contain no sine terms, and this answer for my an term does give sine terms...

Any ideas?

Thanks a lot for taking the time to read this.
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
This is also my first time using latex, so if I stuffed anything up I'm sorry.
 
  • #3
Dint said:
I did this because I figured it resembles what a sin wave looks like, in that it peaks at the origin. (I know it's a square wave so it doesn't really peak, but I'm picturing a sine wave representing the signal in the box)

A sine wave is 0 at the origin, sin(0)=0.

Your latex is good.

Hint: If you want the cosine series to be zero you should find yourself an f(t) which is odd.
 
Last edited:
  • #4
In the drawing that I did, was I wrong to say the amplitude of that is 1? Is the amplitude actually .5? If it's a square wave as I drew it, does that not mean that It's pk-pk amplitude is 1?

I'm getting really confused with the amplitude now. I've always understood amplitudes using sin and cosine waves but I've never worked out amplitudes with a vertical shift.
 
  • #5
In your drawing their are no negative peaks, so there is no ambiguity. The peak to peak amplitude is the same as half peak to peak amplitude in this case. You're correct that the amplitude is 1.
 
  • #6
hi ENB242 guy, to begin with, what you are doing is wrong. I have done it and comparing what i have done to yours, I am wondering why you don't have the -ve part of the signal?? Also your initial assumption is wrong as well.
 
  • #7
acurabot said:
hi ENB242 guy, to begin with, what you are doing is wrong. I have done it and comparing what i have done to yours, I am wondering why you don't have the -ve part of the signal?? Also your initial assumption is wrong as well.

can you clarify what you mean? do you mean there should be a negative component as well in the cos wave. that makes sense. i don't get why there is no negative part there. would the amplitudes be 1 and -1 respectively?
 
  • #8
Well to put it blunty, yes there should be a -ve and +ve part in the one period. This would mean having amplitudes of -1 and 1 respectively.
 
  • #9
Hey,

EVEN --> all cosine terms, bn = 0
ODD --> all sine terms, a0 = 0 and an = 0

So I am assuming one would have to draw an even square wave for all cos terms and an odd square wave for all sine terms.
 
  • #10
I've figured out this problem. What I was actually getting confused with was that when it asked for no cosine/sin terms, it was actually referring to an/bn respectively.

My confusion came when I integrated sin and got a cos term, thinking this meant that there were cosine terms. When really this was just the sin term (bn).

Anyway, it's all cleared up and it makes sense to me now.
 
  • #11
thanks that explains alot. just a question with the drawing. if it had a negative component going down to -1 at t = .5 second would it still be an even function? would it still reflect across the x-axis or wouldn it reflect across both.. therefore making it an odd function.. i think I am confusing myself unnecessarily..
 
  • #12
An even function is when f(x) = f(-x)

In other words, it is symmetrical about the Y-axis (if you flip it over the Y axis, it is identical.

An odd function is when -f(x) = f(-x)

In other words when the function is symmetrical about the X-axis, once flipped about the Y-axis.

Hope this helped.
 
Last edited:
  • #13
Yeah I'm not really sure of your question, I just re-read it and I don't know if I really answered it.

Draw your function on a page, if you fold it so the positive axis flips onto the negative axis and they perfectly line up, the function is even :P

That's probably the easiest way I can explain it. Otherwise, just check if f(x) = f(-x)
 
  • #14
ha ahh I am so going to do that.. thanks alot. yeah i was just trying to visualise the question above with a negative component.. but the folding thing just confirmed what i already had. thanks a lot mate.. good luck for 242
 
  • #16
yeah any type.. good luck
 
  • #17
guys what about the Fourier transform of s(t) * thatoddsymbol (t)

where s((t) = pike 1 (t)

sorry for horrible use of english there

i get that it will be a square wave of width 1 from 0 to 1 convolving with a ?? i don't get that part. any ideas?
 
  • #18
that's delta...

When you find the Fourier transform of the convolution of two functions... eg.

[tex] s(t) * \delta(t)[/tex]

The answer is the multiplication of each functions Fourier transform.

The Fourier transform of a delta function (that funny symbol), is 1. So it's actually just the Fourier transform of s(t).

Correct me if I'm wrong, but I'm pretty positive.
 
Last edited:
  • #19
Dint said:
that's delta...

When you find the Fourier transform of the convolution of two functions... eg.

[tex] s(t) * a(t)[/tex]

The answer is the multiplication of each Fourier transform.

Where a(t) is the delta function (that funny symbol), the Fourier transform of a delta symbol is 1. So it's actually just the Fourier traansform of s(t).

Correct me if I'm wrong, but I'm pretty positive.

Yeah that sounds about right.
 
  • #20
Jacobs section is going to be harder than Eds, in order to do well on Jacobs we need to know the formulas for each modulation method...

Then the last question of each exam question I just can't do. :<
 
  • #21
I'm not expecting to do well to be honest. After the effort I have put in for ENB240 I ran out of steam for this one. I have done well in the Assignments and Lab, hopefully that helps pull me throught.
 
  • #22
im hoping that it will be the same as the last exam papers.. both of them are almost identical.. and there quite straight forward albeit with some parts ha.. you guys know more than me so don't worry
 

What is a Fourier Series representation?

A Fourier Series representation is a mathematical tool used to decompose a periodic function into a sum of sine and cosine functions. It is commonly used in signal processing and image analysis to analyze and manipulate periodic signals.

What is a square wave?

A square wave is a periodic function that alternates between two distinct values, typically 0 and 1, in a square-like shape. It has an infinite number of sharp transitions and is commonly used in electronics and digital signal processing.

Why only cosine terms are used in the Fourier Series representation of a square wave?

In the Fourier Series representation of a square wave, only cosine terms are used because a square wave is an even function, meaning it is symmetric about the y-axis. This results in the sine terms canceling out, leaving only the cosine terms in the representation.

How is the amplitude of the cosine terms determined in the Fourier Series representation of a square wave?

The amplitude of the cosine terms in the Fourier Series representation of a square wave is determined by the height of the square wave. The larger the height, the larger the amplitude of the cosine terms will be.

Can a square wave be accurately represented using only cosine terms?

Yes, a square wave can be accurately represented using only cosine terms. As the number of terms in the Fourier Series increases, the accuracy of the representation also increases. However, an infinite number of terms is required to accurately represent a square wave, as it has an infinite number of sharp transitions.

Similar threads

  • Calculus and Beyond Homework Help
Replies
1
Views
95
  • Calculus and Beyond Homework Help
Replies
3
Views
355
  • Calculus and Beyond Homework Help
Replies
1
Views
491
  • Calculus and Beyond Homework Help
Replies
2
Views
87
  • Calculus and Beyond Homework Help
Replies
3
Views
163
  • Calculus and Beyond Homework Help
Replies
16
Views
474
  • Calculus and Beyond Homework Help
Replies
2
Views
322
  • Calculus and Beyond Homework Help
Replies
3
Views
685
  • Calculus and Beyond Homework Help
Replies
5
Views
220
  • Calculus and Beyond Homework Help
Replies
8
Views
938
Back
Top