I have a signal with half-amplitude $A$ and period $T$ and I want to calculate the average power of the signal.
I think I remember the power of a signal $x(t)$ to be $$\frac{1}{T}\int_{0}^{T}|x(t)|^2dt$$ but how do I apply this to a square wave?
I have a signal with half-amplitude $A$ and period $T$ and I want to calculate the average power of the signal.
I think I remember the power of a signal $x(t)$ to be $$\frac{1}{T}\int_{0}^{T}|x(t)|^2dt$$ but how do I apply this to a square wave?
I'm going to guess that the square wave is of the form $x(t) = \begin{cases}\alpha & 0 < t < \frac{T}{2}\\ \beta & \frac{T}{2} < t < T\end{cases}$ for some constants $\alpha$, $\beta$. In your problem, I think $\alpha = A$ and $\beta = -A$, but I'm not 100% sure. You have more context than I do.
Then, you can evaluate the integral by splitting it into pieces:
$\dfrac{1}{T}\displaystyle\int_{0}^{T}|x(t)|^2\,dt = \dfrac{1}{T}\left[\int_{0}^{T/2}|x(t)|^2\,dt+\int_{T/2}^{T}|x(t)|^2\,dt\right] = \dfrac{1}{T}\left[\int_{0}^{T/2}|\alpha|^2\,dt+\int_{T/2}^{T}|\beta|^2\,dt\right]$
Since $x(t)$ is constant on $(0,\frac{T}{2})$ and $x(t)$ is constant on $(\frac{T}{2},T)$, these integrals can be easily evaluated.