Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a MATLAB code for this problem please: Harmonic Analysis A fundamental technique of engineering analysis is Fourier decomposition - representing a periodic function as

Write a MATLAB code for this problem please:

image text in transcribed

Harmonic Analysis A fundamental technique of engineering analysis is Fourier decomposition - representing a periodic function as a sum of sine or cosine functions at multiples of the fundamental frequency. Calculate the first five non-zero terms (including the DC term) of the series for 50 % duty cycle over the domain t = [-21, 2 tt), taking m. = 1 and A = 1. Choose the step size so that you get a smooth plot (see plotting instructions below). Create one graph containing plots of: a. The fundamental term + DC offset (= 0.5) b. The sum of the first 3 terms (DC, fundamental, and 3rd harmonic) C. The sum of the first 5 terms (DC, fundamental, 3rd, 5th and 7th harmonic) d. The exact function, which can be calculated using the MATLAB built-in function square () as follows: Yuexact = 0.5+square (x + pi/2)/2; Include in graphs a. Distinguish each series clearly (i.e., with different line types, and don't forget to include a legend). b. Title your plot. Note: your title should be more informative than simply Y vs X. C. Label all axes with a name and units. (When there are no units, indicate 'unitless'). For this particular problem, assume that the time unit is milliseconds, and the amplitude unit is centimeters. Harmonic Analysis A fundamental technique of engineering analysis is Fourier decomposition - representing a periodic function as a sum of sine or cosine functions at multiples of the fundamental frequency. Calculate the first five non-zero terms (including the DC term) of the series for 50 % duty cycle over the domain t = [-21, 2 tt), taking m. = 1 and A = 1. Choose the step size so that you get a smooth plot (see plotting instructions below). Create one graph containing plots of: a. The fundamental term + DC offset (= 0.5) b. The sum of the first 3 terms (DC, fundamental, and 3rd harmonic) C. The sum of the first 5 terms (DC, fundamental, 3rd, 5th and 7th harmonic) d. The exact function, which can be calculated using the MATLAB built-in function square () as follows: Yuexact = 0.5+square (x + pi/2)/2; Include in graphs a. Distinguish each series clearly (i.e., with different line types, and don't forget to include a legend). b. Title your plot. Note: your title should be more informative than simply Y vs X. C. Label all axes with a name and units. (When there are no units, indicate 'unitless'). For this particular problem, assume that the time unit is milliseconds, and the amplitude unit is centimeters

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Climate And Environmental Database Systems

Authors: Michael Lautenschlager ,Manfred Reinke

1st Edition

1461368332, 978-1461368335

More Books

Students also viewed these Databases questions