How do I calculate the average voltage of this wave?
Here's a more mathematical approach to your problem. I understand your graph as the flat parts are at 120V. We can divide the area of the half period into a DC part before and after the sine wave (green) when the sine voltage is higher than 120V (blue).



We start by finding the angles, \$\theta_1\$ by setting the sine voltage equal to the dc voltage and \$\theta_2\$ by symmetry:

\begin{align}
V_{dc} = \sqrt{2} V_{RMS} * sin(\theta_1) \rightarrow \theta_1 &amp;= sin^{-1} \left( \frac{V_{dc}}{\sqrt{2} V_{RMS}} \right) \\\\
\theta_2 &amp;= \pi - \theta_1 
\end{align}

Using \$V_{dc}=120V\$ and \$V_{ac}=230V\$, we get the values \$\theta_1 = 21.649^o \$ and \$\theta_2 = 158.35^o\$. We then calculate the average voltage from the basic formula:

\begin{align}
V_{avg} &amp;= \frac{1}{T_p} \int^{T_p} v(t) d \theta \\\\
&amp;= \frac{1}{\pi} \left[ \int_0^{\theta_1} V_{dc} d \theta + \int_{\theta_1}^{\theta_2} \sqrt{2}V_{ac}sin(\theta) d \theta + \int_{\theta_2}^\pi V_{dc} d \theta \right] \\\\
&amp;= \frac{1}{\pi} \left[ V_{dc} \theta \bigg\rvert_0^{\theta_1} - \sqrt{2}V_{ac}cos(\theta) \bigg\rvert_{\theta_1}^{\theta_2} + V_{dc} \theta \bigg\rvert_{\theta_2}^\pi \right] \\\\
&amp;= \frac{1}{\pi} \bigg[ V_{dc} (\theta_1 + \pi - \theta_2) - \sqrt{2}V_{ac}\Bigr(cos(\theta_2) -cos(\theta_1)\Bigr) \bigg] \\\\
&amp;= \underline{\underline{221.33V}}
\end{align}