Spectrum Software has released Micro-Cap 11, the eleventh generation of our
SPICE circuit simulator.
For users of previous Micro-Cap versions, check out the
new features available in the latest version. For those of you who are
new to Micro-Cap, take our
features tour to see what Micro-Cap has to offer.
PSK Modulator Macro
In communication systems, a binary PCM (Pulse-Code Modulation) signal is often superimposed onto a carrier signal. There are many modulation techniques for this procedure among which are amplitude, frequency, and phase modulation. Phase modulation, also known as phase-shift keying (PSK) modulation, produces a waveform with the following characteristics:
VPSK(t) = A*cos(wo*t + phase(t))
where A is a fixed amplitude and phase will vary according to the binary waveform. A common PSK waveform will have its phase at 0 degrees when the binary signal is at a one state and 180 degrees when the binary signal is at a zero state.
The macro circuit for a PSK modulator appears below. This macro can accept either a digital or an analog waveform as its input and will produce the PSK modulated waveform at its output. The PSK macro accepts three parameters: WMAG, NC, and TB. WMAG defines the magnitude of the output waveform. NC defines the number of cycles of the output waveform that will occur in the duration of one bit of the input waveform. TB defines the duration of a single bit in seconds.
The macro consists of a resistor, a sine source, and two nonlinear function voltage sources. The resistor is present at the input node for two reasons. The first reason is to provide a DC path to ground for the In node so that any element may be connected to it. The second reason is that the NFV sources are only able to work with analog references. If the input waveform happens to be a digital waveform, the resistor will force Micro-Cap to convert it to its equivalent analog voltage for use with the nonlinear function voltage source, E2. The value of the resistor is set to 1e9 ohms so that it will not have a loading effect. The NFV source, E2, has its VALUE attribute defined as:
(V(In) >= 2.5) - (V(In) < 2.5)
This equation will convert the input waveform into a signal that has a value of either 1V or -1V. If the voltage at node In is greater than or equal to 2.5V, than the source will produce an output of 1V. If the voltage at node In is less than 2.5V, then the source will produce an output of -1V. The 2.5V threshold is arbitrary. In this case, it was setup to handle a standard TTL digital waveform. The threshold should be approximately in the middle of the one and zero state voltages of the input waveform. The sine source, V1, has been defined using the following model statement:
.MODEL SINE SIN (F=NC/TB A=WMAG)
where the amplitude of the source is defined by the parameter WMAG, the frequency of the source is determined from the ratio of the NC and TB parameters, and the phase of the source is at its default value of 0. Finally, the NFV source, E1, multiplies the voltages of the E2 and V1 sources. This source produces the PSK output. When the input waveform is at a one state, then the sine source waveform is multiplied by the value 1 which produces a sine output with a 0 degrees phase shift. When the input waveform is at a zero state, then the sine source waveform is multiplied by the value -1 which produces a sine output with a 180 degrees phase shift.
The test circuit for the PSK macro is displayed above. The circuit consists of a simple two bit shift register that feeds the PSK macro. The two D flip-flops are defined with zero gate delays. The clock input to the flip-flops has a period of 10us. The preset inputs have been wired to a Fixed Digital component which produces a one state on those pins. The clear inputs have a short zero pulse of 100ns to initialize the outputs of the flip-flops to zero at the beginning of the simulation. The PSK macro has its VALUE attribute defined as:
which will produce an output waveform with a 4V magnitude at a frequency of 400KHz.
The analysis below displays the results of an 80us transient analysis simulation. The top waveform, V(Out), is the binary input to the PSK macro. The bottom waveform, V(PSK_Out), is the modulated waveform. Note the 180 degree phase shifts of the PSK_Out waveform whenever the V(Out) waveform transitions states.