A harmonic balance technique for the analysis of periodic attractors and their bifurcations in cellular neural networks