Implementation of the Mathematical Model of a Generating Block in Matlab and Simulink Using S-functions | IEEE Conference Publication | IEEE Xplore