OneStopGate.Com
OnestopGate   OnestopGate
   Monday, April 29, 2024 Login  
OnestopGate
Home | Overview | Syllabus | Tutorials | FAQs | Downloads | Recommended Websites | Advertise | Payments | Contact Us | Forum
OneStopGate

GATE Resources
Gate Articles
Gate Books
Gate Colleges 
Gate Downloads 
Gate Faqs
Gate Jobs
Gate News 
Gate Sample Papers
Training Institutes

GATE Overview
Overview
GATE Eligibility
Structure Of GATE
GATE Coaching Centers
Colleges Providing M.Tech/M.E.
GATE Score
GATE Results
PG with Scholarships
Article On GATE
Admission Process For M.Tech/ MCP-PhD
GATE Topper 2012-13
GATE Forum




GATE 2025 Exclusive
Organizing Institute
Important Dates
How to Apply
Discipline Codes
GATE 2025 Exam Structure

GATE 2025 Syllabus
Aerospace Engg..
Agricultural Engg..
Architecture and Planning
Chemical Engg..
Chemistry
Civil Engg..
Computer Science / IT
Electronics & Communication Engg..
Electrical Engg..
Engineering Sciences
Geology and Geophysics
Instrumentation Engineering
Life Sciences
Mathematics
Mechanical Engg..
Metallurgical Engg..
Mining Engg..
Physics
Production & Industrial Engg..
Pharmaceutical Sciences
Textile Engineering and Fibre Science

GATE Study Material
Aerospace Engg..
Agricultural Engg..
Chemical Engg..
Chemistry
Civil Engg..
Computer Science / IT
Electronics & Communication Engg..
Electrical Engg..
Engineering Sciences
Instrumentation Engg..
Life Sciences
Mathematics
Mechanical Engg..
Physics
Pharmaceutical Sciences
Textile Engineering  and Fibre Science

GATE Preparation
GATE Pattern
GATE Tips N Tricks
Compare Evaluation
Sample Papers 
Gate Downloads 
Experts View

CEED 2013
CEED Exams
Eligibility
Application Forms
Important Dates
Contact Address
Examination Centres
CEED Sample Papers

Discuss GATE
GATE Forum
Exam Cities
Contact Details
Bank Details

Miscellaneous
Advertisment
Contact Us


Home » GATE Study Material » Electrical Engineering » Time and Frequency » FFT Algorithms - Mathcad

FFT Algorithms - Mathcad

Looking for GATE Preparation Material? Join & Get here now!

** Gate 2013 Question Papers.. ** CEED 2013 Results.. ** Gate 2013 Question Papers With Solutions.. ** GATE 2013 CUT-OFFs.. ** GATE 2013 Results.. **

FFT Algorithms - Mathcad

Using the FFT Algorithm(s) in Mathcad

        If you use Mathcad to get the FFT you could use a workspace like the one below.  Here is a link to the complete workspace.  This workspace does the following:

  • Data := READPRN("5VoltSqWvData.txt")

    • Brings the data from the file 5VoltSqWvData.txt into the Mathcad workspace.
    • The file is "tab-delimited".
    • The file should be a pure text file, and that's the kind of file many data acquisition programs generate, even if they use other extensions like ".dat".
    • The file is assumed to have only one column, so if you generated the data with a program like Benchlink, you need to strip out the header and the time information, and just have a column of data that starts in the first row.
  • SigFFT := CFFT(Data)

    • This uses the CFFT algorithm which will FFT an arbitray length vector (which can have complex elements).
    • If you are lucky enough to have a vector that has a length that is exactly a power of 2 (something like 512 elements, or 1024 or 4048, etc.) use FFT - which will compute faster.

Points to note:

    • Mathcad indices start at 0, and we start with a coefficient, ao.  The first coefficient is ao and it will be stored in the first element of the array (SigFFT in the example m-file), i.e, SigFFT(0).  Unlike Matlab, the indices work out in Mathcad.  For example, SigFFT(11) will contain the 11th harmonic.

    • The calculation will be done in terms of the harmonics of the fundamental frequency of the data set.  If you have a square wave that shows two periods in the data set, the first harmonic of the square wave will be the second harmonic of the fundamental frequency of the data set, and - given the first point just above - will appear in the third element of the FFT array.

      • When you do the calculation, you will often have data that has many periods in one data set.  Those frequencies - in the periodice signal - will be at exact multiples of the fundamental frequency of the data set (a sharp line in the computed FFT) or near a multiple (a spread-out line).  You shouldn't expect the fundamental of a periodice signal to be the fundamental frequency of the data set unless you have exactly one period of your periodic signal in the data set.

      • Example:  You have a data set that is 2 milliseconds long.  The fundamental frequency of the data set is 0.5 kHz (= 500 Hz).  If you have a one kHz signal embedded in that data, it will be at the second harmonic of the 500 Hz.  (In Mathcad, that will be at the index = 2.)

    • The calculations includes a 1/N term.  You have to compensate for that since you will probably want it to be 2/N.  In a five volt square wave with 4000 data points, the first harmonic of the square wave will calculate out at a magnitude of 3.2 or thereabouts.  The actual first harmonic (i.e., the fundamental) of a square wave of amplitude A is 4A/p

      , and that would calculate out to about 6.4.  To get from 3.2 to 6.4 you need to multiply 3.2 by 2.

    • There are other options in Mathcad.  They include the following - which have different normalizing factors and other peculiarities:

      • FFT - if you have exactly 2m data points, where m is an integer.

      • cfft - which gives results that need to be multiplied by 2*SQRT(N).

      • fft - which gives results that need to be multiplied by 2*SQRT(N) - if you have exactly 2m data points, where m is an integer.

    • Note that there are also inverse transform functions available if you need to go from FFT data back to time data.



Discussion Center

Discuss/
Query

Papers/
Syllabus

Feedback/
Suggestion

Yahoo
Groups

Sirfdosti
Groups

Contact
Us

MEMBERS LOGIN
  
Email ID:
Password:

  Forgot Password?
 New User? Register!

INTERVIEW EBOOK
Get 9,000+ Interview Questions & Answers in an eBook. Interview Question & Answer Guide
  • 9,000+ Interview Questions
  • All Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades
GATE RESOURCES
 
  • Gate Books
  • Training Institutes
  • Gate FAQs
  • GATE BOOKS
     
  • Mechanical Engineeering Books
  • Robotics Automations Engineering Books
  • Civil Engineering Books
  • Chemical Engineering Books
  • Environmental Engineering Books
  • Electrical Engineering Books
  • Electronics Engineering Books
  • Information Technology Books
  • Software Engineering Books
  • GATE Preparation Books
  • Exciting Offers



    GATE Exam, Gate 2009, Gate Papers, Gate Preparation & Related Pages


    GATE Overview | GATE Eligibility | Structure Of GATE | GATE Training Institutes | Colleges Providing M.Tech/M.E. | GATE Score | GATE Results | PG with Scholarships | Article On GATE | GATE Forum | GATE 2009 Exclusive | GATE 2009 Syllabus | GATE Organizing Institute | Important Dates for GATE Exam | How to Apply for GATE | Discipline / Branch Codes | GATE Syllabus for Aerospace Engineering | GATE Syllabus for Agricultural Engineering | GATE Syllabus for Architecture and Planning | GATE Syllabus for Chemical Engineering | GATE Syllabus for Chemistry | GATE Syllabus for Civil Engineering | GATE Syllabus for Computer Science / IT | GATE Syllabus for Electronics and Communication Engineering | GATE Syllabus for Engineering Sciences | GATE Syllabus for Geology and Geophysics | GATE Syllabus for Instrumentation Engineering | GATE Syllabus for Life Sciences | GATE Syllabus for Mathematics | GATE Syllabus for Mechanical Engineering | GATE Syllabus for Metallurgical Engineering | GATE Syllabus for Mining Engineering | GATE Syllabus for Physics | GATE Syllabus for Production and Industrial Engineering | GATE Syllabus for Pharmaceutical Sciences | GATE Syllabus for Textile Engineering and Fibre Science | GATE Preparation | GATE Pattern | GATE Tips & Tricks | GATE Compare Evaluation | GATE Sample Papers | GATE Downloads | Experts View on GATE | CEED 2009 | CEED 2009 Exam | Eligibility for CEED Exam | Application forms of CEED Exam | Important Dates of CEED Exam | Contact Address for CEED Exam | CEED Examination Centres | CEED Sample Papers | Discuss GATE | GATE Forum of OneStopGATE.com | GATE Exam Cities | Contact Details for GATE | Bank Details for GATE | GATE Miscellaneous Info | GATE FAQs | Advertisement on GATE | Contact Us on OneStopGATE |
    Copyright © 2024. One Stop Gate.com. All rights reserved Testimonials |Link To Us |Sitemap |Privacy Policy | Terms and Conditions|About Us
    Our Portals : Academic Tutorials | Best eBooksworld | Beyond Stats | City Details | Interview Questions | India Job Forum | Excellent Mobiles | Free Bangalore | Give Me The Code | Gog Logo | Free Classifieds | Jobs Assist | Interview Questions | One Stop FAQs | One Stop GATE | One Stop GRE | One Stop IAS | One Stop MBA | One Stop SAP | One Stop Testing | Web Hosting | Quick Site Kit | Sirf Dosti | Source Codes World | Tasty Food | Tech Archive | Software Testing Interview Questions | Free Online Exams | The Galz | Top Masala | Vyom | Vyom eBooks | Vyom International | Vyom Links | Vyoms | Vyom World
    C Interview Questions | C++ Interview Questions | Send Free SMS | Placement Papers | SMS Jokes | Cool Forwards | Romantic Shayari