Wind Farm Cooperative Control Strategies For Optimal Power Generation And Frequency Control