Navya C
Ansys Employee
you can use a pwl function to define the squre voltage.
You can look at the following forum discussion for how to define a pwl function.
https://forum.ansys.com/discussion/comment/116644#Comment_116644
Please refer to Maxwell help document for more detail on defining pwl functions.

Regards Navya