Power Quality in Power Systems and Electrical Machines

Appendix 2: Program List for Fourier Analysis [81, Chapter 2]

This appendix contains the program list to compute the Fourier coefficient of a periodic nonsinusoidal function. An output example is given for a rectangular wave.

A2.1 FOURIER ANALYSIS PROGRAM LIST

Following is the program list (in FORTRAN) to compute the Fourier terms (DC offset, even and odd harmonics) of a periodic nonsinusoidal function:

C      PROGRAM ANAFORC      test, square wave       COMMON NW,DEG(361),RAD(361),         XV(361),YVALUE(361)       COMMON       NPTS,NPS,INT,INC,NH,GA,         PI,WW,OM,NC,RF,ER,EL       COMMON ERR,ITMAX       DIMENSION Y(30,365),SCALE(30),         YMAX(30),X(365)       DIMENSION       CURVT(100),         CURVC(100),CURVS(100),CURVP(100)       DIMENSION AMP(30,100),          ANG(30,100)C      READ DATA FROM DATA FILE.C       OPEN(5,FILE='INDUCTOR.         DAT',STATUS='OLD',         ACCESS='SEQUENTIAL')C      REWIND 5C*******************       NSETS=1       NPTS=42C***************       SCALE(1)=1.0C      CLOSE(UNIT=5)C      OPEN(3,FILE='FODA.DAT',...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Data Acquisition
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.