Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Re: Fourier series example problem

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
08:42 AM

03-28-2021
08:42 AM

Good day.

I was hoping you could help me with my assignment on programming a fourier series analysis.

Can someone teach me how to graph this on mathcad prime? I need to find the function that will replicate the attached file below.

Your help would be much appreciated, since I am still learning from this software.

Thank you in advance and God Bless.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
03:58 AM

03-29-2021
03:58 AM

34 REPLIES 34

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
09:02 AM

03-28-2021
09:02 AM

Re: Fourier series example problem

We'd love to help!

Please attach your Mathcad file so we can see what you have so far.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
11:52 AM

03-28-2021
11:52 AM

Re: Fourier series example problem

In the attached file you will find everything required and more.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
01:00 PM

03-28-2021
01:00 PM

Re: Fourier series example problem

This examples would surely help me a lot in my future references. I am still learning a lot from this software. My professor introduced me to mathcad last 3 months and I am still trying to explore these things.

I really appreciate your response for helping me.

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
01:04 PM

03-28-2021
01:04 PM

Re: Fourier series example problem

On the graphing stage, I do not have any idea on how I would graph it, but here is my file on my fourier series exam.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
10:32 AM

03-28-2021
10:32 AM

Re: Fourier series example problem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
10:54 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
11:29 AM

03-28-2021
11:29 AM

Re: Fourier series example problem

Nice,

but, how would you proceed if you had to extend it from -100, 100...

There's a handy mathematical function, also available in Prime, that allows you to convert a running variable (like t is) to a short sequence..

It is somewhat related to division. I'll spoil your assignment no further.

Anyway, here is the result:

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
12:55 PM

03-28-2021
12:55 PM

Re: Fourier series example problem

Spoil me more, please. I am badly running out of time for my problem set. I really appreciate you for helping me out.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
12:57 PM

03-28-2021
12:57 PM

Re: Fourier series example problem

How can I use this if I want an infinite number of expansion? like if I use a multiple number of expression "n" so it will not be limited to 6pi?

I really appreciate your response for helping me.

Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-28-2021
01:11 PM

03-28-2021
01:11 PM

Re: Fourier series example problem

Can I ask for a lower version of your mathcad prime? I can't open it. Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
03:58 AM

03-29-2021
03:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
04:04 AM

03-29-2021
04:04 AM

Re: Fourier series example problem

Can i verify the variables that you used?

N is the maximum number of expansion

L is the number of period

Z is the final value of the series.

If possible, elaborate it for me. Thank you so much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
04:15 AM

03-29-2021
04:15 AM

Re: Fourier series example problem

N is the maximum number of expansion: Yes.

L is the number of period : L is the 1/2 of the period of the fundamental waveform, in your case L=2*pi.

Z is the final value of the series. : Yes Real and Imaginary indexes from o to N.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
04:20 AM

03-29-2021
04:20 AM

Re: Fourier series example problem

I'm so amazed on how you can think of such programs.

I need to study more.

do you mind if I ask one more? what does res() does, and on the 3 variables on the functions that you gave (FC(f,N,L), can you explain them? What does the first, 2nd and 3rd variable does to the whole program.

I am having a hard time exploring this software. I hope you can enlighten me so I can use this on my research in the future.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
02:36 PM

03-29-2021
02:36 PM

Re: Fourier series example problem

I want to implement your variant for a square wave signal.

What is wrong with my implementation of your variant for a square wave?

What I am doing wrong?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
04:06 PM

03-29-2021
04:06 PM

Re: Fourier series example problem

'It's a sin'...

In your definition of p(x) you've got **cos** in both terms under the sum.

The second should be **sin**

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-29-2021
04:11 PM

03-29-2021
04:11 PM

Re: Fourier series example problem

Ah...

Yes, it works now...after correction.

Thank you for your remark and sight.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-30-2021
08:53 AM

03-30-2021
08:53 AM

Re: Fourier series example problem

@ttokoro, @LucMeekes, @-MFra-. @Fred_Kohlhepp, @Teddy

It would be interesting and nice, for those who want and have time, of course, to add other graphs in this topic (besides the one in the sawtooth and square wave signals), that can be used with @ttokoro **functions** to generate such graphs and calculate the corresponding Fourier series.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-30-2021
12:30 PM

03-30-2021
12:30 PM

Re: Fourier series example problem

Some time ago, I published in the community a collection of ** periodic signals** (there are one or two signals to correct), about forty, if I am not mistaken. You have to search for all the content.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-31-2021
10:37 AM

03-31-2021
10:37 AM

Re: Fourier series example problem

You can use an even simpler function (no programming required, works also in Prime Express) to calculate the Fourier coefficients of a periodic function:

As an example, take a square wave as a function of t, with period T, offset O and amplitude A:

e.g.:

Define:

Calculate the Fourier coefficients:

(Note that Re and Im are Premium functions, they do not work in Express,

but they can be easily built with:

)

Now you can build the Fourier representation with either one of:

The first uses the A and B vectors and the sine and cosine functions. The second uses the array C with complex values.

The results are:

I've offset the Fes(t) function by 0.2 to be able to see it alongside Fs(t)

You can cut it short in a single function now, defined as:

Example for a triangle:

Last example:

Now it's up to your imagination regarding periodic functions.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-01-2021
02:27 PM

04-01-2021
02:27 PM

Re: Fourier series example problem

@LucMeekes, @ttokoro, @Fred_Kohlhepp, @-MFra-, @Teddy

How can achieve the Fourier spectrum for these kinds of signals that were derived in this topic?

For example:

These images are an example to show you the idea.

I think you know what it is all about ... the Fourier spectrum of a signal.

The spectrum does not necessarily have to be performed for the signals in the image, but for those that have been deduced in this topic, but it is also possible for these of course.

But as much as possible to use @ttokoro functions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-01-2021
03:46 PM

04-01-2021
03:46 PM

Re: Fourier series example problem

To create a spectrum from data, use the dft() function. It is built into Prime.

Be sure to consult the online help and view the examples provided by Prime.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-02-2021
11:52 PM

04-02-2021
11:52 PM

Re: Fourier series example problem

What do you mean by creating a spectrum from data? is this the same as the spectral acceleration of any earthquakes?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-03-2021
07:41 AM

04-03-2021
07:41 AM

Re: Fourier series example problem

A Fourier transform takes the time history of a measurement and "transforms" it to display information (magnitude and phase) against frequency. This information is sometimes called the frequency spectrum. If you have the spectrum of an earthquake, the magnitude and phase of the frequencies of an accelerometer, you could recreate the time history of the earthquake.

That would be one example.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-03-2021
09:35 PM

04-03-2021
09:35 PM

Re: Fourier series example problem

FFT needs 2^n data for evaluate the spectrum.

dft can evaluate the spectrum for non 2^n data set.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-04-2021
07:05 AM

04-04-2021
07:05 AM

Re: Fourier series example problem

Can you put a Mathcad file with these things?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

04-06-2021
08:31 AM

04-06-2021
08:31 AM

Re: Fourier series example problem

you can use "Writeprn (" Destination file "," Origin file ")

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-30-2021
07:31 AM

03-30-2021
07:31 AM

Re: Fourier series example problem

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-30-2021
09:27 PM

03-30-2021
09:27 PM

Re: Fourier series example problem