Hello, I'm testing the NMOS transistor as a switch to see its linearity and I got the following spectrum. on the left the spectrum of the input and on the right the spectrum of the output. the harmonics of the output is very large. Is that normal for the linearity of the NMOS transistor or there is something wrong in the simulation?
First, are you sure you're running this in the linear region? If not, you may just be seeing distortion. Have you looked at your input/output in the time domain?
I'm a little confused by the circuit. There seem to be two inputs; a square wave and a sine wave. I also don't see a DC path between source and drain, or any DC power source.
What is the circuit supposed to do? Where is the output?
I'm a little confused by the circuit. There seem to be two inputs; a square wave and a sine wave. I also don't see a DC path between source and drain, or any DC power source.
What is the circuit supposed to do? Where is the output?
On second thoughts, I guess it's being used to switch a signal, as in the JFET version below. It does need a load impedance on the output though.
To check linearity it should be tested with the switch either on or off. Looking at the spectrum while it is switching is no good, since the signal is being chopped up and some of the switching waveform will leak to the output too.