Good Morning,
The function NIntegate was spelt incorrectly in your file. Note that you also set the limits of the integration the same. I'm pretty sure you intended {t, -tper/2.0, tper/2.0}. Also, I often find in these kinds of problems using the function HeavisideTheta works better than UnitStep.
Jesse Sheinwald
Attachments: