Fuzzy model-based optimal energy control during the electrical discharge machining