You can connect the models. You would typically connect them with a dc link with a battery. Here is a shipping example of a single phase inverter that you could also use as a starting point: https://www.mathworks.com/help/physmod/sps/ug/single-phase-pwm-inverter.html
Typically, this forum will provide advice for how to accomplish your goals, but not build examples for you.
Regards,
Joel