During the Enhanced Smog Test the smog machine determines whether or not the EGR system is functioning properly based on the NOx emissions content. NOx is always created when there is an EGR malfunction either due to a plugged valve or defective vacuum system.
Dirty EGR Valve: Since the EGR valve simply pulls exhaust gasses from your exhaust and introduces them back into your engine's intake air over time it will become clogged or stuck open/closed from the carbon deposits. It is possible to clean the EGR valve if you remove it from your vehicle and either spray it out or let it sit in regular gasoline. This cleaning process can not be used for an Electronic EGR valve without removing the electrical components first.
Testing the EGR Valve: This test only applies to vacuum controlled EGR valves only. A defective EGR valve will not open or close when vacuum is applied. The next step is to find out whether the EGR passages are plugged with carbon deposits or if the passages are open.
The way to test this out is to start your vehicle and let it run at idle. Disconnect the EGR valve's vacuum line and apply direct vacuum in order to open the valve.
When the valve opens; if the passages are clean and open you should notice a large RPM decrease. If the passages are plugged up, you will not see any RPM difference. If there is a RPM decrease, then the passages are free, and the next step is to inspect the vacuum signal which is supposed to open the EGR valve. It may be possible your vehicle is not opening the EGR valve by applying vacuum at the right time, or at all. If there is no RPM decrease, the passages may be plugged up. You will need to disable the EGR valve and clean all passages within the valve and within your engine's intake and exhaust passages eliminating any obstructions.