I'm designing an application in which the current running into a load is controlled by PWM. A microcontroller generates a PWM cycle at 20kHz and this signal is used to control a MOSFET which is directly connected to the load. The MOSFET operates at 5V gate logic, while the load absorbs 10A at 100% duty cycle, at 12V DC. The microcontroller-to-MOSFET signal is carried by a shielded cable of circa 30 cm length, while the MOSFET is placed in direct proximity of the load. Which is the best way to minimize the EMI in order to comply with electro-magnetic compatibility regulations? It is important to focus on the microcontroller-to-MOSFET path, which is more likely to act as an antenna, or do I need to worry about the MOSFET-to-load, due to the high current involved?
Best way to minimize EMI is to have the MOSFET close to the load for sure but also have the MOSFET driver close to the MOSFET. I have a concern that along 30cm the pulse distortion and introduced impedances might cause issues such as spurious ringing and / or inefficient FET turn-on and turn-off. If you can't get the MCU generating the PWM close to the FET then maybe use a driver circuit at the FET that can "square" the signal back up again and offer a low impedance drive to the FET.
You will also reduce EMI by having a good reservoir capacitor on the DC line feeding the MOSFET - it needs to be up close to the MOSFET so no pulses of large current are carried down the cable feed from the 12V power supply. A good reservoir capacitor would be a decent sized electrolytic (100uF plus) with 1uF ceramic and 1n ceramic in parallel. This maybe over the top but I wouldn't take chances on this.
You might also consider what effects the power PWM has on the load and if necessary apply inductor and capacitor filtering on the FET's output. I'm presuming that you have a fly-back diode on the output of the FET and if you haven't you'll likely need one.
The wavelength of a 20kHz signal is approximately 15000 meters, so with a cable of only 30cm length, I doubt that there will be significant generation of electromagnetic waves. Even the higher harmonics (since your PWM is a square/"rectangle" wave) are probably not causing any issues.