RE: center of gravity effects?
The O.P. didn't mention if he was at full power, half power, no power, etc., the whole time it was porpoising. He did say the c.g. was at the recommended spec. Assuming that is the correct location for said plane, then something else would have to be afoot. Possibly no down thrust in the motor, or even up thrust. Maybe the wing incidence somehow got positive. Then when at power the plane would climb up and if it doesn't have enough power to pull it over the top, then I could see it diving back down for another climb. Of course, if the c.g. was truly too far back, then you have pretty much the same results. It sounds like the plane has a lot of dihedral or polyhedral to keep it from snapping out during the porpoising if it was actually an extreme tail heavy situation. Just some ideas. Really need more info about the plane.